From ef2f87ae615b5a759cddf0678563453c74cee862 Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期二, 24 十月 2023 11:16:34 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 Source/UBCS-WEB/src/views/system/user.vue |   28 +++++++++++++++++++++-------
 1 files changed, 21 insertions(+), 7 deletions(-)

diff --git a/Source/UBCS-WEB/src/views/system/user.vue b/Source/UBCS-WEB/src/views/system/user.vue
index c13bff2..f780dd8 100644
--- a/Source/UBCS-WEB/src/views/system/user.vue
+++ b/Source/UBCS-WEB/src/views/system/user.vue
@@ -777,7 +777,7 @@
     /** 淇敼鐢ㄦ埛鐘舵�� */
     updateUserStatus(){
       let list = this.selectionList;
-      if(func.isEmpty(list)){
+      if(list.length < 1){
         this.$message({
           type: "warning",
           message: "璇疯嚦灏戦�夋嫨涓�鏉$敤鎴锋暟鎹紒"
@@ -793,13 +793,27 @@
       }
       let userIds = func.joinedString(list,"id");
       let status = list[0].userStatus == 1 ? true:false;
-      updateUserStatus(userIds,status).then(res=>{
-        this.$message({
-          type: "success",
-          message: "鎿嶄綔鎴愬姛!"
-        });
-        this.onLoad(this.page);
+      let msg = status ? "纭畾灏嗛�夋嫨璐﹀彿鍚敤":"纭畾灏嗛�夋嫨璐﹀彿鍋滅敤"+"锛�";
+      console.log(msg);
+      this.$confirm(msg, {
+        confirmButtonText: "纭畾",
+        cancelButtonText: "鍙栨秷",
+        type: "warning"
       })
+        .then(() => {
+          return updateUserStatus(userIds,status);
+        })
+        .then(() => {
+          this.$message({
+            type: "success",
+            message: "鎿嶄綔鎴愬姛!",
+            duration: 1000,// 璁剧疆娑堟伅鏄剧ず3绉掑悗鑷姩鍏抽棴
+            onClose: () => {
+              // 鍦ㄦ秷鎭叧闂椂閲嶆柊鍔犺浇鏁版嵁
+              this.onLoad(this.page);
+            }
+          });
+        });
     },
     //esc鍙栨秷閿搷浣�
     /*handleClose(done) {

--
Gitblit v1.9.3