From 66922ca2c9360f4c06e10eea57691170eea9288a Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期一, 02 三月 2026 16:07:08 +0800
Subject: [PATCH] 设备保养重构\设备巡检修改

---
 src/pages/equipmentManagement/upkeep/index.vue |   54 +++++++++++++++++++++++++++++++++---------------------
 1 files changed, 33 insertions(+), 21 deletions(-)

diff --git a/src/pages/equipmentManagement/upkeep/index.vue b/src/pages/equipmentManagement/upkeep/index.vue
index cca1b04..f14712f 100644
--- a/src/pages/equipmentManagement/upkeep/index.vue
+++ b/src/pages/equipmentManagement/upkeep/index.vue
@@ -41,7 +41,9 @@
               <u-tag v-if="item.status === 1"
                      type="success">瀹岀粨</u-tag>
               <u-tag v-if="item.status === 0"
-                     type="error">寰呬繚鍏�</u-tag>
+                     type="warning">寰呬繚鍏�</u-tag>
+              <u-tag v-if="item.status === 2"
+                     type="error">澶辫触</u-tag>
             </view>
           </view>
           <up-divider></up-divider>
@@ -72,35 +74,24 @@
             </view>
             <view class="detail-row">
               <text class="detail-label">淇濆吇缁撴灉</text>
-              <view class="detail-value">
-                <u-tag v-if="item.maintenanceResult === 1"
-                       type="success"
-                       size="mini">
-                  瀹屽ソ
-                </u-tag>
-                <u-tag v-if="item.maintenanceResult === 0"
-                       type="error"
-                       size="mini">
-                  缁翠慨
-                </u-tag>
-                <text v-if="item.maintenanceResult === undefined || item.maintenanceResult === null">-</text>
-              </view>
+              <text class="detail-value">{{item.maintenanceResult || '-'}}
+              </text>
             </view>
           </view>
           <!-- 鎸夐挳鍖哄煙 -->
           <view class="action-buttons">
-            <u-button type="primary"
+            <!-- <u-button type="primary"
                       size="small"
                       class="action-btn"
                       :disabled="item.status === 1"
                       @click.stop="edit(item.id)">
               缂栬緫
-            </u-button>
+            </u-button> -->
             <u-button type="warning"
                       size="small"
                       class="action-btn"
                       :disabled="item.status === 1"
-                      @click.stop="addMaintain(item.id)">
+                      @click.stop="addMaintain(item.id, item)">
               淇濆吇
             </u-button>
             <u-button type="error"
@@ -110,12 +101,18 @@
                       @click.stop="delUpkeepByIds(item.id)">
               鍒犻櫎
             </u-button>
-            <u-button type="warning"
+            <u-button type="info"
+                      size="small"
+                      class="action-btn"
+                      @click.stop="viewDetail(item)">
+              璇︽儏
+            </u-button>
+            <!-- <u-button type="warning"
                       size="small"
                       class="action-btn"
                       @click.stop="addFile(item.id)">
               闄勪欢
-            </u-button>
+            </u-button> -->
           </view>
         </view>
       </view>
@@ -236,19 +233,34 @@
   };
 
   // 鏂板淇濆吇 - 璺宠浆鍒颁繚鍏婚〉闈�
-  const addMaintain = id => {
+  const addMaintain = (id, item) => {
     if (!id && multipleList.value.length !== 1) {
       showToast("璇烽�夋嫨涓�鏉¤褰�");
       return;
     }
     const targetId = id || multipleList.value[0].id;
-    // 浣跨敤鏈湴瀛樺偍浼犻�抜d
+    const targetItem = item || multipleList.value[0];
+    // 浣跨敤鏈湴瀛樺偍浼犻�抜d鍜屽畬鏁存暟鎹�
     uni.setStorageSync("repairId", targetId);
+    uni.setStorageSync("upkeepItemData", JSON.stringify(targetItem));
     uni.navigateTo({
       url: "/pages/equipmentManagement/upkeep/maintain",
     });
   };
 
+  // 鏌ョ湅璇︽儏 - 璺宠浆鍒拌鎯呴〉闈�
+  const viewDetail = item => {
+    if (!item) {
+      showToast("鍙傛暟閿欒");
+      return;
+    }
+    // 浣跨敤鏈湴瀛樺偍浼犻�掓暣鏉℃暟鎹�
+    uni.setStorageSync("upkeepDetailData", JSON.stringify(item));
+    uni.navigateTo({
+      url: "/pages/equipmentManagement/upkeep/detail",
+    });
+  };
+
   // 鏂板璁″垝 - 璺宠浆鍒版柊澧為〉闈�
   const addPlan = () => {
     uni.navigateTo({

--
Gitblit v1.9.3