Browse Source

1、未冻结账号点击解冻弹出提示

hella_online_20240919
bjang03 2 months ago
parent
commit
6c05b85e17
  1. 1
      src/locales/zh-CN.ts
  2. 13
      src/views/system/user/index.vue

1
src/locales/zh-CN.ts

@ -54,6 +54,7 @@ export default {
createTime: '创建时间',
updateTime: '更新时间',
unLockSuccess: '解冻成功',
unLockFail: '账号未冻结',
copy: '复制',
copySuccess: '复制成功',
copyError: '复制失败',

13
src/views/system/user/index.vue

@ -81,7 +81,7 @@
v-hasPermi="['system:permission:assign-user-role']">
<Icon icon="ep:circle-check" />分配角色
</el-button>
<el-button type="primary" link @click="handleFree(scope.row.id)" v-hasPermi="['system:user:update-password']" v-if="useUserStore().userSelfInfo.userType=='MASTER'">
<el-button type="primary" link @click="handleFree(scope.row)" v-hasPermi="['system:user:update-password']" v-if="useUserStore().userSelfInfo.userType=='MASTER'">
<Icon icon="ep:edit" />解冻
</el-button>
<el-button type="danger" link @click="handleDelete(scope.row.id)" v-hasPermi="['system:user:delete']">
@ -240,7 +240,7 @@ const handleCommand = (command: string, row: UserApi.UserVO) => {
handleRole(row)
break
case 'handleFree':
handleFree(row.id)
handleFree(row)
break
default:
break
@ -260,13 +260,18 @@ const handleDelete = async (id: number) => {
} catch { }
}
/** 解冻按钮操作 */
const handleFree = async (id: number) => {
const handleFree = async (row: any) => {
try {
debugger
//
await UserApi.unLockUser(id)
if(row.frozenStatus=="是"){
await UserApi.unLockUser(row.id)
message.success(t('common.unLockSuccess'))
//
await getList()
}else{
message.error(t('common.unLockFail'))
}
} catch { }
}
/** 重置密码 */

Loading…
Cancel
Save