|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+<template>
|
|
|
2
|
+ <view class="self-check-container">
|
|
|
3
|
+ <view class="self-check-header">
|
|
|
4
|
+ <text class="header-title">定/自检</text>
|
|
|
5
|
+ <text class="view-all" @click="goToSelfCheckPage('all')">查看全部</text>
|
|
|
6
|
+ </view>
|
|
|
7
|
+
|
|
|
8
|
+ <view class="self-check-content">
|
|
|
9
|
+ <!-- 已过期定检提醒 -->
|
|
|
10
|
+ <view class="check-section">
|
|
|
11
|
+ <view class="section-header">
|
|
|
12
|
+ <text class="section-title">已过期定检提醒</text>
|
|
|
13
|
+ <text class="view-more" @click="goToSelfCheckPage('expired')">查看更多</text>
|
|
|
14
|
+ </view>
|
|
|
15
|
+ <view class="check-item" v-for="(item, index) in expiredItems" :key="index">
|
|
|
16
|
+ <view class="item-indicator expired"></view>
|
|
|
17
|
+ <view class="item-content">
|
|
|
18
|
+ <view class="item-row">
|
|
|
19
|
+ <text class="item-label">{{ item.name }}</text>
|
|
|
20
|
+ <text class="item-label">{{ item.serialNumber }}</text>
|
|
|
21
|
+ <text class="item-date">{{ item.date }}</text>
|
|
|
22
|
+ </view>
|
|
|
23
|
+ <view class="item-row">
|
|
|
24
|
+ <text class="item-label">{{ item.location }}</text>
|
|
|
25
|
+ <text class="item-role">{{ item.role }}</text>
|
|
|
26
|
+ </view>
|
|
|
27
|
+ </view>
|
|
|
28
|
+ </view>
|
|
|
29
|
+ </view>
|
|
|
30
|
+
|
|
|
31
|
+ <!-- 两周内到期提醒 -->
|
|
|
32
|
+ <view class="check-section">
|
|
|
33
|
+ <view class="section-header">
|
|
|
34
|
+ <text class="section-title">两周内到期提醒</text>
|
|
|
35
|
+ <text class="view-more" @click="goToSelfCheckPage('twoWeeks')">查看更多</text>
|
|
|
36
|
+ </view>
|
|
|
37
|
+ <view class="check-item" v-for="(item, index) in twoWeeksItems" :key="index">
|
|
|
38
|
+ <view class="item-indicator urgent"></view>
|
|
|
39
|
+ <view class="item-content">
|
|
|
40
|
+ <view class="item-row">
|
|
|
41
|
+ <text class="item-label">{{ item.name }}</text>
|
|
|
42
|
+ <text class="item-label">{{ item.serialNumber }}</text>
|
|
|
43
|
+ <text class="item-date">{{ item.date }}</text>
|
|
|
44
|
+ </view>
|
|
|
45
|
+ <view class="item-row">
|
|
|
46
|
+ <text class="item-label">{{ item.location }}</text>
|
|
|
47
|
+ <text class="item-role">{{ item.role }}</text>
|
|
|
48
|
+ </view>
|
|
|
49
|
+ </view>
|
|
|
50
|
+ </view>
|
|
|
51
|
+ </view>
|
|
|
52
|
+
|
|
|
53
|
+ <!-- 一月内检到期提醒 -->
|
|
|
54
|
+ <view class="check-section">
|
|
|
55
|
+ <view class="section-header">
|
|
|
56
|
+ <text class="section-title">一月内检到期提醒</text>
|
|
|
57
|
+ <text class="view-more" @click="goToSelfCheckPage('oneMonth')">查看更多</text>
|
|
|
58
|
+ </view>
|
|
|
59
|
+ <view class="check-item" v-for="(item, index) in oneMonthItems" :key="index">
|
|
|
60
|
+ <view class="item-indicator normal"></view>
|
|
|
61
|
+ <view class="item-content">
|
|
|
62
|
+ <view class="item-row">
|
|
|
63
|
+ <text class="item-label">{{ item.name }}</text>
|
|
|
64
|
+ <text class="item-label">{{ item.serialNumber }}</text>
|
|
|
65
|
+ <text class="item-date">{{ item.date }}</text>
|
|
|
66
|
+ </view>
|
|
|
67
|
+ <view class="item-row">
|
|
|
68
|
+ <text class="item-label">{{ item.location }}</text>
|
|
|
69
|
+ <text class="item-role">{{ item.role }}</text>
|
|
|
70
|
+ </view>
|
|
|
71
|
+ </view>
|
|
|
72
|
+ </view>
|
|
|
73
|
+ </view>
|
|
|
74
|
+ </view>
|
|
|
75
|
+ </view>
|
|
|
76
|
+</template>
|
|
|
77
|
+
|
|
|
78
|
+<script>
|
|
|
79
|
+export default {
|
|
|
80
|
+ name: 'SelfCheck',
|
|
|
81
|
+ data() {
|
|
|
82
|
+ return {
|
|
|
83
|
+ // 已过期定检数据
|
|
|
84
|
+ expiredItems: [
|
|
|
85
|
+ { name: '设备名称', serialNumber: '设备序列号', location: '设备位置', role: '组长、组员、组员', date: '2026-06-10' },
|
|
|
86
|
+ { name: '设备名称', serialNumber: '设备序列号', location: '设备位置', role: '组长、组员、组员', date: '2026-06-10' }
|
|
|
87
|
+ ],
|
|
|
88
|
+ // 两周内到期数据
|
|
|
89
|
+ twoWeeksItems: [
|
|
|
90
|
+ { name: '设备名称', serialNumber: '设备序列号', location: '设备位置', role: '组长、组员、组员', date: '2026-06-10' },
|
|
|
91
|
+ { name: '设备型号', serialNumber: '设备序列号', location: '设备位置', role: '组长、组员、组员', date: '2026-06-10' }
|
|
|
92
|
+ ],
|
|
|
93
|
+ // 一月内到期数据
|
|
|
94
|
+ oneMonthItems: [
|
|
|
95
|
+ { name: '设备型号', serialNumber: '设备序列号', location: '设备位置', role: '组长、组员、组员', date: '2026-06-10' },
|
|
|
96
|
+ { name: '设备型号', serialNumber: '设备序列号', location: '设备位置', role: '组长、组员、组员', date: '2026-06-10' }
|
|
|
97
|
+ ]
|
|
|
98
|
+ }
|
|
|
99
|
+ },
|
|
|
100
|
+ methods: {
|
|
|
101
|
+ goToSelfCheckPage(tab) {
|
|
|
102
|
+ uni.navigateTo({
|
|
|
103
|
+ url: `/pages/selfCheck/index?tab=${tab}`
|
|
|
104
|
+ });
|
|
|
105
|
+ }
|
|
|
106
|
+ }
|
|
|
107
|
+}
|
|
|
108
|
+</script>
|
|
|
109
|
+
|
|
|
110
|
+<style scoped>
|
|
|
111
|
+.self-check-container {
|
|
|
112
|
+ width: 100%;
|
|
|
113
|
+ padding: 16px;
|
|
|
114
|
+ background-color: #f5f7fa;
|
|
|
115
|
+}
|
|
|
116
|
+
|
|
|
117
|
+.self-check-header {
|
|
|
118
|
+ display: flex;
|
|
|
119
|
+ justify-content: space-between;
|
|
|
120
|
+ align-items: center;
|
|
|
121
|
+ margin-bottom: 16px;
|
|
|
122
|
+}
|
|
|
123
|
+
|
|
|
124
|
+.header-title {
|
|
|
125
|
+ font-size: 24px;
|
|
|
126
|
+ font-weight: bold;
|
|
|
127
|
+ color: #333;
|
|
|
128
|
+}
|
|
|
129
|
+
|
|
|
130
|
+.view-all {
|
|
|
131
|
+ font-size: 16px;
|
|
|
132
|
+ color: #409eff;
|
|
|
133
|
+}
|
|
|
134
|
+
|
|
|
135
|
+.self-check-content {
|
|
|
136
|
+ background-color: #fff;
|
|
|
137
|
+ border-radius: 12px;
|
|
|
138
|
+ padding: 16px;
|
|
|
139
|
+}
|
|
|
140
|
+
|
|
|
141
|
+.check-section {
|
|
|
142
|
+ margin-bottom: 24px;
|
|
|
143
|
+}
|
|
|
144
|
+
|
|
|
145
|
+.check-section:last-child {
|
|
|
146
|
+ margin-bottom: 0;
|
|
|
147
|
+}
|
|
|
148
|
+
|
|
|
149
|
+.section-header {
|
|
|
150
|
+ display: flex;
|
|
|
151
|
+ justify-content: space-between;
|
|
|
152
|
+ align-items: center;
|
|
|
153
|
+ margin-bottom: 12px;
|
|
|
154
|
+}
|
|
|
155
|
+
|
|
|
156
|
+.section-title {
|
|
|
157
|
+ font-size: 20px;
|
|
|
158
|
+ font-weight: bold;
|
|
|
159
|
+ color: #333;
|
|
|
160
|
+}
|
|
|
161
|
+
|
|
|
162
|
+.view-more {
|
|
|
163
|
+ font-size: 16px;
|
|
|
164
|
+ color: #409eff;
|
|
|
165
|
+}
|
|
|
166
|
+
|
|
|
167
|
+.check-item {
|
|
|
168
|
+ display: flex;
|
|
|
169
|
+ align-items: flex-start;
|
|
|
170
|
+ padding: 12px 0;
|
|
|
171
|
+ border-bottom: 1px solid #f0f0f0;
|
|
|
172
|
+}
|
|
|
173
|
+
|
|
|
174
|
+.check-item:last-child {
|
|
|
175
|
+ border-bottom: none;
|
|
|
176
|
+}
|
|
|
177
|
+
|
|
|
178
|
+.item-indicator {
|
|
|
179
|
+ width: 6px;
|
|
|
180
|
+ border-radius: 3px;
|
|
|
181
|
+ margin-right: 12px;
|
|
|
182
|
+ flex-shrink: 0;
|
|
|
183
|
+}
|
|
|
184
|
+
|
|
|
185
|
+.item-indicator.expired {
|
|
|
186
|
+ background-color: #8c3c34;
|
|
|
187
|
+ height: 80px;
|
|
|
188
|
+}
|
|
|
189
|
+
|
|
|
190
|
+.item-indicator.urgent {
|
|
|
191
|
+ background-color: #ff291f;
|
|
|
192
|
+ height: 80px;
|
|
|
193
|
+}
|
|
|
194
|
+
|
|
|
195
|
+.item-indicator.normal {
|
|
|
196
|
+ background-color: #b97c45;
|
|
|
197
|
+ height: 80px;
|
|
|
198
|
+}
|
|
|
199
|
+
|
|
|
200
|
+.item-content {
|
|
|
201
|
+ flex: 1;
|
|
|
202
|
+ display: flex;
|
|
|
203
|
+ flex-direction: column;
|
|
|
204
|
+ gap: 8px;
|
|
|
205
|
+}
|
|
|
206
|
+
|
|
|
207
|
+.item-row {
|
|
|
208
|
+ display: flex;
|
|
|
209
|
+ justify-content: space-between;
|
|
|
210
|
+ align-items: center;
|
|
|
211
|
+}
|
|
|
212
|
+
|
|
|
213
|
+.item-label {
|
|
|
214
|
+ font-size: 16px;
|
|
|
215
|
+ color: #333;
|
|
|
216
|
+}
|
|
|
217
|
+
|
|
|
218
|
+.item-date {
|
|
|
219
|
+ font-size: 16px;
|
|
|
220
|
+ color: #333;
|
|
|
221
|
+}
|
|
|
222
|
+
|
|
|
223
|
+.item-role {
|
|
|
224
|
+ font-size: 16px;
|
|
|
225
|
+ color: #333;
|
|
|
226
|
+}
|
|
|
227
|
+</style>
|