From 0298531d0a8e23d00a0851c24c9e1ad67c56daf0 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Sat, 25 Sep 2021 19:32:43 +0800
Subject: [PATCH] 保安员新增删除,培训报名修改字段名称

---
 src/views/securityGuard/securityGuard.vue |   29 +++++++++++++++++++++++++----
 1 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/src/views/securityGuard/securityGuard.vue b/src/views/securityGuard/securityGuard.vue
index 8999b56..18bd865 100644
--- a/src/views/securityGuard/securityGuard.vue
+++ b/src/views/securityGuard/securityGuard.vue
@@ -131,7 +131,7 @@
               :size="size"
               :type="type"
               v-if="permission.securityGuard_delete && row.status != 2"
-              @click.stop="rowDel(row)"
+              @click.stop="rowStatus(row)"
               >离职登记
             </el-button>
             <el-button
@@ -473,8 +473,7 @@
         searchMenuSpan: 6,
         stripe: true,
         border: true,
-        delBtn: false,
-
+        delBtn: true,
         align: "center",
         index: true,
         delBtnText: "注销",
@@ -766,6 +765,11 @@
                   //   value: 3,
                   // },
                 ],
+                rules: [{
+                    required: true,
+                    message: "请选择性别",
+                    trigger: "blur"
+                }]
               },
               // {
               //   label: "生日",
@@ -1120,7 +1124,7 @@
         }
       );
     },
-    rowDel(row) {
+    rowStatus(row) {
       this.$prompt("离职原因", "提示", {
         confirmButtonText: "确定离职",
         cancelButtonText: "取消",
@@ -1142,6 +1146,23 @@
         })
         .catch(() => {});
     },
+    rowDel(row) {
+      this.$confirm("确定注销当前用户?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          return remove(row.id);
+        })
+        .then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!",
+          });
+        });
+    },
     rowCheck(row) {
       this.$confirm("确定审查异常标记?", {
         confirmButtonText: "确定",

--
Gitblit v1.9.3