mirror of
https://gitee.com/JavaLionLi/plus-ui.git
synced 2026-09-15 00:25:07 +08:00
update 用户管理 增加用户登录状态解锁功能
This commit is contained in:
parent
e138c314a8
commit
790abfac85
@ -111,6 +111,17 @@ export const changeUserStatus = (userId: number | string, status: string) => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 解锁用户
|
||||||
|
* @param userId 用户ID
|
||||||
|
*/
|
||||||
|
export const unlockUser = (userId: number | string) => {
|
||||||
|
return request({
|
||||||
|
url: '/system/user/unlock/' + userId,
|
||||||
|
method: 'get',
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询用户个人信息
|
* 查询用户个人信息
|
||||||
*/
|
*/
|
||||||
@ -219,6 +230,7 @@ export default {
|
|||||||
delUser,
|
delUser,
|
||||||
resetUserPwd,
|
resetUserPwd,
|
||||||
changeUserStatus,
|
changeUserStatus,
|
||||||
|
unlockUser,
|
||||||
getUserProfile,
|
getUserProfile,
|
||||||
updateUserProfile,
|
updateUserProfile,
|
||||||
updateUserPwd,
|
updateUserPwd,
|
||||||
|
|||||||
@ -89,6 +89,9 @@
|
|||||||
<el-button v-has-permi="['system:user:remove']" type="danger" plain :disabled="multiple" icon="Delete" @click="handleDelete()">
|
<el-button v-has-permi="['system:user:remove']" type="danger" plain :disabled="multiple" icon="Delete" @click="handleDelete()">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button v-hasPermi="['system:user:edit']" type="warning" plain icon="Unlock" :disabled="single" @click="handleUnlock()">
|
||||||
|
解锁
|
||||||
|
</el-button>
|
||||||
<el-dropdown class="mt-[1px]">
|
<el-dropdown class="mt-[1px]">
|
||||||
<el-button plain type="info">
|
<el-button plain type="info">
|
||||||
更多
|
更多
|
||||||
@ -511,6 +514,16 @@ const handleDelete = async (row?: UserVO) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** 解锁按钮操作 */
|
||||||
|
const handleUnlock = async () => {
|
||||||
|
const userId = ids.value[0];
|
||||||
|
const [err] = await to(proxy?.$modal.confirm('是否确认解锁用户编号为"' + userId + '"的数据项?') as any);
|
||||||
|
if (!err) {
|
||||||
|
await api.unlockUser(userId);
|
||||||
|
proxy?.$modal.msgSuccess('用户编号"' + userId + '"解锁成功');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
/** 用户状态修改 */
|
/** 用户状态修改 */
|
||||||
const handleStatusChange = async (row: UserVO) => {
|
const handleStatusChange = async (row: UserVO) => {
|
||||||
const text = row.status === '0' ? '启用' : '停用';
|
const text = row.status === '0' ? '启用' : '停用';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user