|
|
@@ -1,11 +1,10 @@
|
|
1
|
1
|
<template>
|
|
2
|
|
- <home-container :customStyle="{ background: 'none',padding: '0' }" >
|
|
|
2
|
+ <home-container :customStyle="{ background: 'none', padding: '0' }">
|
|
3
|
3
|
<view class="self-check-page">
|
|
4
|
4
|
<!-- 标签页区域 -->
|
|
5
|
5
|
<view class="tabs-section">
|
|
6
|
6
|
<view v-for="(tab, index) in tabs" :key="index"
|
|
7
|
|
- :class="['tab-item', { 'active': currentTab === tab.value }]"
|
|
8
|
|
- @click="switchTab(tab.value)">
|
|
|
7
|
+ :class="['tab-item', { 'active': currentTab === tab.value }]" @click="switchTab(tab.value)">
|
|
9
|
8
|
<text class="tab-text">{{ tab.label }}</text>
|
|
10
|
9
|
</view>
|
|
11
|
10
|
</view>
|
|
|
@@ -20,7 +19,7 @@
|
|
20
|
19
|
<text class="card-date">{{ item.date }}</text>
|
|
21
|
20
|
</view>
|
|
22
|
21
|
<view class="card-row" style="justify-content: flex-start;">
|
|
23
|
|
- <text class="card-label">{{ item.location }}</text>
|
|
|
22
|
+ <text class="item-label">{{ item.terminlName }}{{ item.terminlName ? '/' : '' }}{{item.regionalName}}{{ item.regionalName ? '/' : '' }}{{ item.channelName }}</text>
|
|
24
|
23
|
<text class="card-role" style="margin-left: 10px;">{{ item.role }}</text>
|
|
25
|
24
|
</view>
|
|
26
|
25
|
</view>
|
|
|
@@ -66,7 +65,7 @@ export default {
|
|
66
|
65
|
},
|
|
67
|
66
|
computed: {
|
|
68
|
67
|
filteredItems() {
|
|
69
|
|
- switch(this.currentTab) {
|
|
|
68
|
+ switch (this.currentTab) {
|
|
70
|
69
|
case 'all':
|
|
71
|
70
|
return this.allItems;
|
|
72
|
71
|
case 'expired':
|
|
|
@@ -86,7 +85,7 @@ export default {
|
|
86
|
85
|
this.fetchDeviceList();
|
|
87
|
86
|
},
|
|
88
|
87
|
getStatusClass(colorType) {
|
|
89
|
|
- switch(colorType) {
|
|
|
88
|
+ switch (colorType) {
|
|
90
|
89
|
case 'RED':
|
|
91
|
90
|
return 'expired';
|
|
92
|
91
|
case 'ORANGE':
|
|
|
@@ -98,7 +97,7 @@ export default {
|
|
98
|
97
|
}
|
|
99
|
98
|
},
|
|
100
|
99
|
getStatusText(colorType) {
|
|
101
|
|
- switch(colorType) {
|
|
|
100
|
+ switch (colorType) {
|
|
102
|
101
|
case 'RED':
|
|
103
|
102
|
return '已过期';
|
|
104
|
103
|
case 'ORANGE':
|
|
|
@@ -112,7 +111,7 @@ export default {
|
|
112
|
111
|
fetchDeviceList() {
|
|
113
|
112
|
// 根据当前 tab 请求不同的接口
|
|
114
|
113
|
let colorType = '';
|
|
115
|
|
- switch(this.currentTab) {
|
|
|
114
|
+ switch (this.currentTab) {
|
|
116
|
115
|
case 'all':
|
|
117
|
116
|
colorType = 'MIXED';
|
|
118
|
117
|
break;
|
|
|
@@ -126,11 +125,11 @@ export default {
|
|
126
|
125
|
colorType = 'YELLOW';
|
|
127
|
126
|
break;
|
|
128
|
127
|
}
|
|
129
|
|
-
|
|
|
128
|
+
|
|
130
|
129
|
getDeviceList({ colorType }).then(res => {
|
|
131
|
130
|
if (res.code === 200) {
|
|
132
|
131
|
const data = res.data || [];
|
|
133
|
|
- switch(this.currentTab) {
|
|
|
132
|
+ switch (this.currentTab) {
|
|
134
|
133
|
case 'all':
|
|
135
|
134
|
this.allItems = data.map(item => this.formatDeviceItem(item));
|
|
136
|
135
|
break;
|
|
|
@@ -151,6 +150,7 @@ export default {
|
|
151
|
150
|
},
|
|
152
|
151
|
formatDeviceItem(item) {
|
|
153
|
152
|
return {
|
|
|
153
|
+ ...item,
|
|
154
|
154
|
name: item.equipmentName || '空',
|
|
155
|
155
|
serialNumber: item.equipmentCode || '空',
|
|
156
|
156
|
location: item.installationLocation || '空',
|
|
|
@@ -259,7 +259,7 @@ export default {
|
|
259
|
259
|
|
|
260
|
260
|
.status-tag {
|
|
261
|
261
|
padding: 4px 12px;
|
|
262
|
|
- border-radius:10px 0 10px 0;
|
|
|
262
|
+ border-radius: 10px 0 10px 0;
|
|
263
|
263
|
font-size: 14px;
|
|
264
|
264
|
font-weight: bold;
|
|
265
|
265
|
margin: -12px -12px -12px 0;
|
|
|
@@ -281,8 +281,3 @@ export default {
|
|
281
|
281
|
color: #333;
|
|
282
|
282
|
}
|
|
283
|
283
|
</style>
|
|
284
|
|
-
|
|
285
|
|
-
|
|
286
|
|
-
|
|
287
|
|
-
|
|
288
|
|
-
|