From 6d27ba4375bf22da042ea0569d27f833633a3a34 Mon Sep 17 00:00:00 2001 From: xingyu Date: Wed, 20 Jul 2022 00:05:40 +0800 Subject: [PATCH] fix: user status error --- yudao-ui-admin-vue3/src/views/system/user/index.vue | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/yudao-ui-admin-vue3/src/views/system/user/index.vue b/yudao-ui-admin-vue3/src/views/system/user/index.vue index 84c8277e7..20770a25e 100644 --- a/yudao-ui-admin-vue3/src/views/system/user/index.vue +++ b/yudao-ui-admin-vue3/src/views/system/user/index.vue @@ -138,7 +138,7 @@ const submitForm = async () => { } // 改变用户状态操作 const handleStatusChange = async (row: UserVO) => { - const text = row.status === CommonStatusEnum.ENABLE ? '停用' : '启用' + const text = row.status === CommonStatusEnum.ENABLE ? '启用' : '停用' ElMessageBox.confirm('确认要"' + text + '""' + row.username + '"用户吗?', t('common.reminder'), { confirmButtonText: t('common.ok'), cancelButtonText: t('common.cancel'), @@ -146,9 +146,8 @@ const handleStatusChange = async (row: UserVO) => { }) .then(async () => { row.status = - row.status === CommonStatusEnum.ENABLE ? CommonStatusEnum.DISABLE : CommonStatusEnum.ENABLE - const res = await UserApi.updateUserStatusApi(row.id, row.status) - console.info(res) + row.status === CommonStatusEnum.ENABLE ? CommonStatusEnum.ENABLE : CommonStatusEnum.DISABLE + await UserApi.updateUserStatusApi(row.id, row.status) ElMessage.success(text + '成功') await getList() }) @@ -159,12 +158,10 @@ const handleStatusChange = async (row: UserVO) => { } // 重置密码 const handleResetPwd = (row: UserVO) => { - ElMessageBox.prompt('请输入"' + row.username + '"的新密码', '提示', { + ElMessageBox.prompt('请输入"' + row.username + '"的新密码', t('common.reminder'), { confirmButtonText: t('common.ok'), cancelButtonText: t('common.cancel') }).then(({ value }) => { - console.log(row.id) - console.log(value) UserApi.resetUserPwdApi(row.id, value).then(() => { ElMessage.success('修改成功,新密码是:' + value) })