From 8a857fe1b0b69dafbdaa15b45edab03a2c3bcdb2 Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期二, 09 七月 2024 09:52:47 +0800
Subject: [PATCH] 成员管理表格查询 增删改 分配成员 统计 下载导入模板

---
 Source/plt-web/plt-web-ui/src/views/system/user/index.vue |   38 +++++++++++++++++++++++++-------------
 1 files changed, 25 insertions(+), 13 deletions(-)

diff --git a/Source/plt-web/plt-web-ui/src/views/system/user/index.vue b/Source/plt-web/plt-web-ui/src/views/system/user/index.vue
index 2303278..94dba49 100644
--- a/Source/plt-web/plt-web-ui/src/views/system/user/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/system/user/index.vue
@@ -53,7 +53,7 @@
         <el-button icon="el-icon-delete" size="small" type="text" @click.stop="rowDeleteHandler(row)">鍒犻櫎</el-button>
         <el-button size="small" type="text" @click.stop="stopUserHandler(row)">
           <span v-if="row.status === 0" style="color: #fa3434"><i class="el-icon-video-pause"></i> 鍋滅敤</span>
-          <span v-if="row.status === 1" style="color: #55b61d"><i class="el-icon-video-pause"></i> 鍚敤</span>
+          <span v-if="row.status === 1" style="color: #55b61d"><i class="el-icon-video-play"></i> 鍚敤</span>
         </el-button>
       </template>
 
@@ -387,7 +387,7 @@
     },
 
     // 鏂板
-    rowSaveHandler(row, done) {
+    rowSaveHandler(row, done,loading) {
       if (row.password != row.confirmPassword) {
         this.$message.error('璇锋鏌ヤ袱娆″瘑鐮佹槸鍚﹁緭鍏ヤ竴鑷达紒')
         return this.$refs.userCrud.$refs.dialogForm.$refs.tableForm.allDisabled = false;
@@ -397,11 +397,12 @@
         if (res.data.code === 200) {
           this.$message.success(res.data.obj);
           this.getTableList();
+          done()
         }
       }).catch(err => {
+        loading()
         console.log(err);
       })
-      done()
     },
 
     // 鎿嶄綔鏍忕紪杈�
@@ -417,7 +418,7 @@
     },
 
     // 缂栬緫
-    rowUpdateHandler(row, index, done) {
+    rowUpdateHandler(row, index, done,loading) {
       if (row.password != row.confirmPassword) {
         this.$message.error('璇锋鏌ヤ袱娆″瘑鐮佹槸鍚﹁緭鍏ヤ竴鑷达紒')
         return this.$refs.userCrud.$refs.dialogForm.$refs.tableForm.allDisabled = false;
@@ -427,11 +428,12 @@
         if (res.data.code === 200) {
           this.$message.success(res.data.obj);
           this.getTableList();
+          done()
         }
       }).catch(err => {
+        loading()
         console.log(err);
       });
-      done()
     },
 
     // 鍒犻櫎
@@ -439,14 +441,24 @@
       let params = {
         ids: row.oid
       }
-      deleteUser(params).then(res => {
-        if (res.data.code === 200) {
-          this.$message.success(res.data.obj);
-          this.getTableList();
-        }
-      }).catch(err => {
-        console.log(err);
-      })
+
+      this.$confirm('鎮ㄧ‘瀹氳鍒犻櫎褰撳墠鐨勬垚鍛樺悧锛�', '鎻愮ず', {
+        confirmButtonText: '纭畾',
+        cancelButtonText: '鍙栨秷',
+        type: 'warning'
+      }).then(() => {
+        deleteUser(params).then(res => {
+          if (res.data.code === 200) {
+            this.$message.success(res.data.obj);
+            this.getTableList();
+          }
+        });
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '宸插彇娑堝垹闄�'
+        });
+      });
     },
 
     // 澶氶�夊垹闄�

--
Gitblit v1.9.3