From 3ca8ce266bf5b06556d80c78b31405e7a54aa4e5 Mon Sep 17 00:00:00 2001
From: jinlin <jinlin>
Date: 星期一, 24 六月 2024 11:01:13 +0800
Subject: [PATCH] 修改

---
 web/src/views/modules/taskReliability/OperatCondit.vue |   26 ++++++++++++++++++++++++--
 1 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/web/src/views/modules/taskReliability/OperatCondit.vue b/web/src/views/modules/taskReliability/OperatCondit.vue
index 4bd53e3..9004898 100644
--- a/web/src/views/modules/taskReliability/OperatCondit.vue
+++ b/web/src/views/modules/taskReliability/OperatCondit.vue
@@ -19,13 +19,13 @@
                 </el-form-item>
               </el-form>
               <el-table v-loading="table.dataLoading" :data="table.dataList" height="100px"
-                        :highlight-current-row="isSelect"
+                        :row-class-name="tableRowClassName"
                         v-adaptive="{bottomOffset:70}"
                         border @row-click="selectOperatCondit" @selection-change="table.selectionChangeHandle">
                 <el-table-column type="selection" width="40" align="center"/>
                 <el-table-column prop="name" label="宸ュ喌鍚嶇О"/>
                 <el-table-column prop="remark" label="澶囨敞"
-                /
+                />
                 <zt-table-column-handle :table="table"
                                         delete-perm="taskReliability::delete"/>
               </el-table>
@@ -56,6 +56,7 @@
           productId: '',
         },
         isSelect: false,
+        currentId: ''
       }
     },
     mounted() {
@@ -80,6 +81,11 @@
         console.log(this.productList, ' async getTaskProductList()')
       },
       selectOperatCondit(row) {
+        if (this.$refs.model.isChange) {
+          this.$alert("鏈夋湭淇濆瓨鐨勫伐鍐垫ā鍨�")
+          return;
+        }
+        this.currentId = row.id
         this.$emit('selectOperatCondit', row)
         let param = {
           row: row,
@@ -87,6 +93,22 @@
         }
         this.$refs.model.init(param)
       },
+      tableRowClassName(
+        {
+          row,
+          rowIndex
+        }) {
+        if (row.id == this.currentId) {
+          return 'select-row';
+        } else {
+          return 'not-select-row';
+        }
+      }
     }
   }
 </script>
+<style>
+  .el-table .select-row {
+    background: rgba(23, 179, 163, 0.2) !important;
+  }
+</style>

--
Gitblit v1.9.1