From 3c3da249fd5e2d90229914d8faa5be01f15d05e6 Mon Sep 17 00:00:00 2001 From: ludc Date: 星期二, 24 十月 2023 09:24:10 +0800 Subject: [PATCH] 用户停用启用按钮修改,前端代码打包 --- 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