From b5e4adfc3a55490ad1cd49f50dfcc9dfb7b57d33 Mon Sep 17 00:00:00 2001
From: qushaowei <qushaowei@163.com>
Date: 星期四, 31 八月 2023 13:45:34 +0800
Subject: [PATCH] 文档名称来源 修改

---
 src/views/eam/DailyMaintenanceOrderList.vue |   49 ++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 48 insertions(+), 1 deletions(-)

diff --git a/src/views/eam/DailyMaintenanceOrderList.vue b/src/views/eam/DailyMaintenanceOrderList.vue
index 60ac8a4..91351b9 100644
--- a/src/views/eam/DailyMaintenanceOrderList.vue
+++ b/src/views/eam/DailyMaintenanceOrderList.vue
@@ -64,6 +64,7 @@
         @click="handleAdd"
         type="primary"
         icon="plus"
+        v-has="'dailyMaintenanceOrder:add'"
       >鏂板</a-button>
       <!-- <a-button
         v-if="selectedRowKeys.length > 0"
@@ -126,6 +127,7 @@
         class="j-table-force-nowrap"
         @change="handleTableChange"
         :rowSelection="rowSelection"
+        :rowClassName="tableRowClass"
       >
         <!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" -->
         <!-- <span
@@ -223,6 +225,7 @@
           <a-popconfirm
             title="纭畾涓嬪彂宸ュ崟鍚�?"
             @confirm="() => handleOrderIssue(record)"
+            v-has="'dailyMaintenanceOrder:issue'"
           >
             <a v-if="record.status == '1'">涓嬪彂</a>
           </a-popconfirm>
@@ -233,6 +236,7 @@
           <a-popconfirm
             title="纭畾鎾ゅ洖宸ュ崟鍚�?"
             @confirm="() => handleOrderReset(record)"
+            v-has="'dailyMaintenanceOrder:issue'"
           >
             <a v-if="record.status == '2'">鎾ゅ洖</a>
           </a-popconfirm>
@@ -243,6 +247,7 @@
           <a-popconfirm
             title="纭畾鎭㈠宸ュ崟鍚�?"
             @confirm="() => handleOrderRecover(record)"
+            v-has="'dailyMaintenanceOrder:recover'"
           >
             <a v-if="record.status == '7'">鎭㈠</a>
           </a-popconfirm>
@@ -253,6 +258,7 @@
           <a-popconfirm
             title="纭畾浣滃簾宸ュ崟鍚�?"
             @confirm="() => handleOrderCancel(record)"
+            v-has="'dailyMaintenanceOrder:recover'"
           >
             <a v-if="record.status == '2'">浣滃簾</a>
           </a-popconfirm>
@@ -263,16 +269,19 @@
           <a-popconfirm
             title="纭畾棰嗗彇宸ュ崟鍚�?"
             @confirm="() => handleOrderGet(record)"
+            v-has="'dailyMaintenanceOrder:get'"
           >
             <a v-if="record.status == '2' && record.assignMode == '1'">棰嗗彇</a>
           </a-popconfirm>
           <a
             v-if="record.status == '2' && record.assignMode == '2'  "
             @click="handleAssignOrder(record)"
+            v-has="'dailyMaintenanceOrder:assign'"
           >娲惧伐</a>
           <a
             v-if="record.status == '3'&& record.assignMode == '2'  && record.maintenanceUserName != null  "
             @click="handleAssignOrder(record)"
+            v-has="'dailyMaintenanceOrder:assign'"
           >鏀规淳</a>
           <!-- <a
             v-if="record.status == '3'"
@@ -289,6 +298,7 @@
           <a
             v-if="record.status === '3' || record.status === '4'  "
             @click="handleOrderExe(record)"
+            v-has="'dailyMaintenanceOrder:exe'"
           >鎵ц</a>
           <a-divider
             v-if="record.status === '3' || record.status === '4' "
@@ -297,6 +307,7 @@
           <a
             v-if="record.status === '1'"
             @click="handleEdit(record)"
+            v-has="'dailyMaintenanceOrder:edit'"
           >缂栬緫</a>
           <a-divider
             v-if="record.status === '1'"
@@ -312,6 +323,7 @@
                 <a-popconfirm
                   title="纭畾鍒犻櫎鍚�?"
                   @confirm="() => handleDelete(record.id)"
+                  v-has="'dailyMaintenanceOrder:delete'"
                 >
                   <a v-if="record.status === '1'">鍒犻櫎</a>
                 </a-popconfirm>
@@ -636,9 +648,44 @@
     //   //娓呯┖鍒楄〃閫変腑
     //   this.onClearSelected()
     // },
+
+    //棰勮棰滆壊
+    tableRowClass(record, index) {
+      if ("1" == record.status || "2" == record.status) {
+        if (record.yellowWarningTime < record.currentDateTime && record.currentDateTime < record.redWarningTime) {
+          return 'yellow'
+        } else if (record.redWarningTime < record.currentDateTime && record.currentDateTime < record.planStartTime) {
+          return 'error'
+        } else if (record.planStartTime < record.currentDateTime) {
+          return 'frozenRowClass'
+        }
+      }
+    },
   }
 }
 </script>
-<style scoped>
+<style >
 @import '~@assets/less/common.less';
+.frozenRowClass {
+  color: #c9c9c9;
+  font-weight: bold;
+}
+.success {
+  color: green;
+}
+.error {
+  color: red;
+  font-weight: bold;
+}
+.yellow {
+  color: yellow;
+  font-weight: bold;
+}
+.fontweight {
+  font-weight: bold;
+}
+
+.ant-table-tbody .red {
+  background-color: red !important;
+}
 </style>
\ No newline at end of file

--
Gitblit v1.9.3