From f8979fd28ebc04c3087868f78ef81eadc33703f9 Mon Sep 17 00:00:00 2001 From: ray <1490493387@qq.com> Date: Tue, 16 Jul 2024 21:59:58 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20:bug:=20=E5=AF=86=E7=A0=81=E9=87=8D?= =?UTF-8?q?=E7=BD=AE=E5=8F=96=E6=B6=88=E6=8E=A7=E5=88=B6=E5=8F=B0=E6=8A=A5?= =?UTF-8?q?=E9=94=99=20Uncaught=20(in=20promise)=20cancel=20=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #IACULP #IACULP --- src/views/system/user/index.vue | 74 ++++++++++++++++++++------------- 1 file changed, 46 insertions(+), 28 deletions(-) diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index f480b0a2..08b02b57 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -46,13 +46,14 @@ - 搜索 + + + 搜索 + - 重置 + 重置 + @@ -65,24 +66,30 @@ v-hasPerm="['sys:user:add']" type="success" @click="handleOpenDialog()" - >新增 + + 新增 + 删除 + + 删除 +
- 导入 + + + 导入 + - 导出 + + + 导出 +
@@ -135,9 +142,9 @@ 重置密码 + + 重置密码 + 编辑 + + 编辑 + 删除 + + 删除 + @@ -392,16 +405,21 @@ function hancleResetPassword(row: { [key: string]: any }) { confirmButtonText: "确定", cancelButtonText: "取消", } - ).then(({ value }) => { - if (!value || value.length < 6) { - // 检查密码是否为空或少于6位 - ElMessage.warning("密码至少需要6位字符,请重新输入"); - return false; + ).then( + ({ value }) => { + if (!value || value.length < 6) { + // 检查密码是否为空或少于6位 + ElMessage.warning("密码至少需要6位字符,请重新输入"); + return false; + } + UserAPI.updatePassword(row.id, value).then(() => { + ElMessage.success("密码重置成功,新密码是:" + value); + }); + }, + () => { + ElMessage.info("已取消重置密码"); } - UserAPI.updatePassword(row.id, value).then(() => { - ElMessage.success("密码重置成功,新密码是:" + value); - }); - }); + ); } /**