From 790abfac8581cd3c590886246bc64a88b81de705 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Wed, 18 Mar 2026 13:45:37 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E7=94=A8=E6=88=B7=E7=AE=A1=E7=90=86?= =?UTF-8?q?=20=E5=A2=9E=E5=8A=A0=E7=94=A8=E6=88=B7=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E8=A7=A3=E9=94=81=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/user/index.ts | 12 ++++++++++++ src/views/system/user/index.vue | 13 +++++++++++++ 2 files changed, 25 insertions(+) diff --git a/src/api/system/user/index.ts b/src/api/system/user/index.ts index 911a5ad..a432171 100644 --- a/src/api/system/user/index.ts +++ b/src/api/system/user/index.ts @@ -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, resetUserPwd, changeUserStatus, + unlockUser, getUserProfile, updateUserProfile, updateUserPwd, diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 04dd0aa..fa08670 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -89,6 +89,9 @@ 删除 + + 解锁 + 更多 @@ -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 text = row.status === '0' ? '启用' : '停用';