From e5fae45afc610c0cbc5620f2e9138e2188dcf243 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期四, 16 一月 2025 12:20:29 +0800
Subject: [PATCH] 资产管理权限、工单故障显示优化

---
 src/views/system/work-order/detail/index.vue |   30 +++++++++++++++++++++---------
 1 files changed, 21 insertions(+), 9 deletions(-)

diff --git a/src/views/system/work-order/detail/index.vue b/src/views/system/work-order/detail/index.vue
index 88a65cb..52b102d 100644
--- a/src/views/system/work-order/detail/index.vue
+++ b/src/views/system/work-order/detail/index.vue
@@ -16,7 +16,16 @@
               <div class="item-warp">
                 <div>鏁呴殰绫诲瀷锛�</div>
                 <div>
-                  <el-tag style="margin-right: 5px;height:24px;overflow:auto" effect="dark" v-for="(error, index) in workOrderInfo.errorTypeList" :key="index" size="small" type="warning">{{ error }}</el-tag>
+                  <el-tag
+                    style="margin-right: 5px;height:24px;overflow:auto" effect="dark"
+                    v-for="(error, index) in workOrderInfo.errorTypeList"
+                    :key="index" size="small"
+                    :type="error === '鍥惧儚寮傚父'
+                     || error ===  '鐐逛綅淇℃伅閿欒'
+                     || error ===  '鏃堕挓鍋忓樊'
+                     || error ===  'OSD寮傚父'
+                     ? 'danger' : 'warning'">{{ error }}
+                  </el-tag>
                 </div>
               </div>
               <div class="item-warp">
@@ -156,12 +165,13 @@
       <div class="img-info" v-for="(img, index) in workOrderInfo.imgList" :key="index">
         <div>
           <el-image
-            style="width: 160px; height: 100px"
+            style="width: 100%; height: auto"
             :src="getImgUrl(img.imgUrl)"
-            :preview-src-list="getImgUrl(img.imgUrl)">
+            :preview-src-list="workOrderInfo.imgList.map(i => getImgUrl(i.imgUrl))"
+            >
           </el-image>
         </div>
-        <div style="margin-top: 8px">{{img.createTime}}</div>
+        <div style="margin-top: 8px;text-align: center">{{img.createTime}}</div>
       </div>
     </div>
 
@@ -213,6 +223,7 @@
     this.getWorkOrder()
   },
   methods: {
+
     closeAuditing() {
       this.auditingOpen = false
     },
@@ -287,14 +298,15 @@
 
 <style scoped>
 .img-info {
-  display: flex;
-  flex-direction: column;
-  justify-content: center;
-  align-items: center;
-  padding: 0 5px;
+  flex: 0 0 calc(20% - 8px); /* 姣忚浜斾釜锛屾墍浠ユ瘡涓崰20%锛屽噺鍘婚棿璺� */
+  box-sizing: border-box;
 }
+
 .work-order-img {
   margin-top: 15px;
+  display: flex;
+  flex-wrap: wrap;
+  gap: 8px; /* 鍙�夛細璁剧疆鍥剧墖涔嬮棿鐨勯棿璺� */
 }
 .work-order-info {
   width: 100%;

--
Gitblit v1.8.0