From a2e6ef22cc74bdff9d54f986f6e1de7f1b9559ff Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Sat, 21 Aug 2021 16:04:11 +0800
Subject: [PATCH] 保安员审查异常标记修改

---
 src/views/securityGuard/securityGuard.vue |   35 +++++++++++++++++++++++++++++++++++
 1 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/src/views/securityGuard/securityGuard.vue b/src/views/securityGuard/securityGuard.vue
index 4b96a44..2b3a007 100644
--- a/src/views/securityGuard/securityGuard.vue
+++ b/src/views/securityGuard/securityGuard.vue
@@ -25,6 +25,7 @@
           :permission="permissionList"
           @row-del="rowDel"
           @row-update="rowUpdate"
+          :row-style="rowStyle"
           @row-save="rowSave"
           @row-click="rowClick"
           :before-open="beforeOpen"
@@ -124,6 +125,14 @@
               v-if="permission.securityGuard_delete"
               @click.stop="rowDel(row)"
               >离职登记
+            </el-button>
+            <el-button
+              icon="el-icon-edit"
+              :size="size"
+              :type="type"
+              v-if="permission.securityGuard_check"
+              @click.stop="rowCheck(row)"
+              >审查异常标记
             </el-button>
           </template>
 
@@ -1133,6 +1142,24 @@
           });
         });
     },
+    rowCheck(row) {
+      this.$confirm("确定审查异常标记?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          row.examinationType = "1";
+          return update(row);
+        })
+        .then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!",
+          });
+        });
+    },
     searchReset() {
       this.query = {};
       this.treeDeptId = "";
@@ -1277,6 +1304,14 @@
     currentChange(currentPage) {
       this.page.currentPage = currentPage;
     },
+    //行样式调整
+    rowStyle({ row, column, rowIndex }) {
+      if (row.examinationType == "1") {
+        return {
+          color: "#ff2727",
+        };
+      }
+    },
     sizeChange(pageSize) {
       this.page.pageSize = pageSize;
     },

--
Gitblit v1.9.3