Browse Source

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

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

1
src/locales/zh-CN.ts

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

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

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

Loading…
Cancel
Save