From 2d3530a7c11557a40807ad7c0b9e302ce6ce3a9f Mon Sep 17 00:00:00 2001
From: hsy <1029150275@qq.com>
Date: 星期五, 28 八月 2026 10:16:32 +0800
Subject: [PATCH] feat: 综合业务模块页面重构与交互完善

---
 src/views/equipmentManagement/operationManagement/index.vue |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/views/equipmentManagement/operationManagement/index.vue b/src/views/equipmentManagement/operationManagement/index.vue
index 99c3bd1..f920bd4 100644
--- a/src/views/equipmentManagement/operationManagement/index.vue
+++ b/src/views/equipmentManagement/operationManagement/index.vue
@@ -61,9 +61,9 @@
               :type="getDeviceStatusType(scope.row.status)"
               size="small"
             >
-              <el-icon v-if="scope.row.status === '杩愯涓�'"><VideoPlay /></el-icon>
+              <el-icon v-if="String(scope.row.status) === '1'"><VideoPlay /></el-icon>
               <el-icon v-else><VideoPause /></el-icon>
-              {{ scope.row.status || '鏈煡' }}
+              {{ String(scope.row.status) === '1' ? '杩愯涓�' : '鍋滄杩愯' }}
             </el-tag>
           </template>
         </el-table-column>
@@ -126,7 +126,7 @@
             <!-- 姝e父鐘舵�佹椂鏄剧ず瀵瑰簲鐨勬搷浣滄寜閽� -->
             <template v-else>
               <el-button
-                v-if="scope.row.status === '杩愯涓�'"
+                v-if="String(scope.row.status) === '1'"
                 type="danger"
                 size="small"
                 @click="changeDeviceStatus(scope.row, '鍋滄杩愯')"
@@ -186,9 +186,9 @@
   // 鏍规嵁璁惧鐘舵�佺瓫閫�
   if (deviceFilter.value !== 'all') {
     if (deviceFilter.value === 'start') {
-      filtered = filtered.filter(device => device.status === '杩愯涓�')
+      filtered = filtered.filter(device => String(device.status) === '1')
     } else if (deviceFilter.value === 'stop') {
-      filtered = filtered.filter(device => device.status === '鍋滄杩愯')
+      filtered = filtered.filter(device => String(device.status) === '0')
     }
   }
 
@@ -264,7 +264,7 @@
   }
 
   const statusStr = String(row?.status ?? '').trim()
-  const isRunning = statusStr === '杩愯涓�' || statusStr === '1'
+  const isRunning = statusStr === '1'
   const endRaw = pickEndTime(row)
   const hasEnd = hasMeaningfulEnd(endRaw)
 
@@ -289,7 +289,7 @@
 
 // 妫�鏌ヨ澶囨槸鍚﹁秴鏃舵湭鍚姩
 const isOverdue = (device) => {
-  if (!device.planRuntimeTime || device.status === '杩愯涓�' || device.startRuntimeTime) {
+  if (!device.planRuntimeTime || String(device.status) === '1' || device.startRuntimeTime) {
     return false
   }
   
@@ -330,12 +330,12 @@
     
     // 鏇存柊璁惧鐘舵�佸拰鐩稿叧鏃堕棿瀛楁
     if (status === '鍚姩杩愯') {
-      device.status = '杩愯涓�'
+      device.status = 1
       device.startRuntimeTime = currentTime
       device.endRuntimeTime = null // 娓呯┖缁撴潫鏃堕棿
       device.runtimeDuration = null // 娓呯┖杩愯鏃堕暱
     } else {
-      device.status = '鍋滄杩愯'
+      device.status = 0
       device.endRuntimeTime = currentTime
       // 璁$畻杩愯鏃堕暱
       if (device.startRuntimeTime) {
@@ -370,9 +370,9 @@
 }
 
 const getDeviceStatusType = (status) => {
-  if (status === '杩愯涓�') {
+  if (String(status) === '1') {
     return 'success'
-  } else if (status === '鍋滄杩愯') {
+  } else if (String(status) === '0') {
     return 'danger'
   } else {
     return 'info'

--
Gitblit v1.9.3