ソースを参照

style(ui): 优化自检页面布局与文本展示格式

1. 调整卡片布局为纵向排列,新增对应样式类
2. 为设备位置和定检小组文本添加前缀标签
3. 修复部分样式注释与指示器高度配置
huoyi 3 週間 前
コミット
2a781ea530
共有2 個のファイルを変更した33 個の追加20 個の削除を含む
  1. 24 17
      src/pages/home-new/components/selfCheck.vue
  2. 9 3
      src/pages/selfCheck/index.vue

+ 24 - 17
src/pages/home-new/components/selfCheck.vue

@@ -20,11 +20,11 @@
20 20
                             <text class="item-label">{{ item.serialNumber }}</text>
21 21
                             <text class="item-date">{{ item.date }}</text>
22 22
                         </view>
23
-                        <view class="item-row">
24
-                            <text class="item-label">{{ item.terminlName }}{{ item.terminlName ? '/' : '' }}{{
23
+                        <view class="item-row-column">
24
+                            <view class="item-label">设备位置:{{ item.terminlName }}{{ item.terminlName ? '/' : '' }}{{
25 25
                                 item.regionalName
26
-                            }}{{ item.regionalName ? '/' : '' }}{{ item.channelName }}</text>
27
-                            <text class="item-role">{{ item.role }}</text>
26
+                                }}{{ item.regionalName ? '/' : '' }}{{ item.channelName }}</view>
27
+                            <view class="item-role">定检小组:{{ item.role }}</view>
28 28
                         </view>
29 29
                     </view>
30 30
                 </view>
@@ -44,11 +44,11 @@
44 44
                             <text class="item-label">{{ item.serialNumber }}</text>
45 45
                             <text class="item-date">{{ item.date }}</text>
46 46
                         </view>
47
-                        <view class="item-row">
48
-                            <text class="item-label">{{ item.terminlName }}{{ item.terminlName ? '/' : '' }}{{
47
+                        <view class="item-row-column">
48
+                            <view class="item-label">设备位置:{{ item.terminlName }}{{ item.terminlName ? '/' : '' }}{{
49 49
                                 item.regionalName
50
-                            }}{{ item.regionalName ? '/' : '' }}{{ item.channelName }}</text>
51
-                            <text class="item-role">{{ item.role }}</text>
50
+                                }}{{ item.regionalName ? '/' : '' }}{{ item.channelName }}</view>
51
+                            <view class="item-role">定检小组:{{ item.role }}</view>
52 52
                         </view>
53 53
                     </view>
54 54
                 </view>
@@ -68,11 +68,11 @@
68 68
                             <text class="item-label">{{ item.serialNumber }}</text>
69 69
                             <text class="item-date">{{ item.date }}</text>
70 70
                         </view>
71
-                        <view class="item-row">
72
-                            <text class="item-label">{{ item.terminlName }}{{ item.terminlName ? '/' : '' }}{{
71
+                        <view class="item-row-column">
72
+                            <view class="item-label">设备位置:{{ item.terminlName }}{{ item.terminlName ? '/' : '' }}{{
73 73
                                 item.regionalName
74
-                            }}{{ item.regionalName ? '/' : '' }}{{ item.channelName }}</text>
75
-                            <text class="item-role">{{ item.role }}</text>
74
+                                }}{{ item.regionalName ? '/' : '' }}{{ item.channelName }}</view>
75
+                            <view class="item-role">定检小组:{{ item.role }}</view>
76 76
                         </view>
77 77
                     </view>
78 78
                 </view>
@@ -153,8 +153,8 @@ export default {
153 153
 <style scoped>
154 154
 .self-check-container {
155 155
     width: 100%;
156
-    padding: 12px;
157
-    background-color: #f5f7fa;
156
+    /* padding: 12px;
157
+    background-color: #f5f7fa; */
158 158
 }
159 159
 
160 160
 .self-check-header {
@@ -227,17 +227,17 @@ export default {
227 227
 
228 228
 .item-indicator.expired {
229 229
     background-color: #FF0000;
230
-    height: 48px;
230
+    height: 66px;
231 231
 }
232 232
 
233 233
 .item-indicator.urgent {
234 234
     background-color: #FFA500;
235
-    height: 48px;
235
+    height: 66px;
236 236
 }
237 237
 
238 238
 .item-indicator.normal {
239 239
     background-color: #FFD700;
240
-    height: 48px;
240
+    height: 66px;
241 241
 }
242 242
 
243 243
 .item-content {
@@ -253,6 +253,13 @@ export default {
253 253
     align-items: center;
254 254
 }
255 255
 
256
+.item-row-column {
257
+    display: flex;
258
+    justify-content: space-between;
259
+    align-items: flex-start;
260
+    flex-direction: column;
261
+}
262
+
256 263
 .item-label {
257 264
     font-size: 14px;
258 265
     color: #333;

+ 9 - 3
src/pages/selfCheck/index.vue

@@ -18,9 +18,9 @@
18 18
                             <text class="card-label">{{ item.serialNumber }}</text>
19 19
                             <text class="card-date">{{ item.date }}</text>
20 20
                         </view>
21
-                        <view class="card-row" style="justify-content: flex-start;">
22
-                            <text class="item-label">{{ item.terminlName }}{{ item.terminlName ? '/' : '' }}{{item.regionalName}}{{ item.regionalName ? '/' : '' }}{{ item.channelName }}</text>
23
-                            <text class="card-role" style="margin-left: 10px;">{{ item.role }}</text>
21
+                        <view class="card-row-column" style="justify-content: flex-start;">
22
+                            <view class="card-label">设备位置:{{ item.terminlName }}{{ item.terminlName ? '/' : '' }}{{item.regionalName}}{{ item.regionalName ? '/' : '' }}{{ item.channelName }}</view>
23
+                            <view class="card-role">定检小组:{{ item.role }}</view>
24 24
                         </view>
25 25
                     </view>
26 26
                     <view :class="['status-tag', getStatusClass(item.colorType)]">
@@ -241,6 +241,12 @@ export default {
241 241
     justify-content: space-between;
242 242
     align-items: center;
243 243
 }
244
+.card-row-column {
245
+    display: flex;
246
+    justify-content: space-between;
247
+    align-items: flex-start;
248
+    flex-direction: column;
249
+}
244 250
 
245 251
 .card-label {
246 252
     font-size: 14px;