From e923422cae5590a3c058598271cfe26e0ae0ffed Mon Sep 17 00:00:00 2001 From: shaohuzhang1 <80892890+shaohuzhang1@users.noreply.github.com> Date: Wed, 6 Aug 2025 15:07:19 +0800 Subject: [PATCH] fix: The user modified the workspace range but did not automatically refresh after returning to the workspace (#3830) --- .../user-manage/component/UserDrawer.vue | 34 +++++++++++++------ 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/ui/src/views/system/user-manage/component/UserDrawer.vue b/ui/src/views/system/user-manage/component/UserDrawer.vue index 632e10441..701f184a3 100644 --- a/ui/src/views/system/user-manage/component/UserDrawer.vue +++ b/ui/src/views/system/user-manage/component/UserDrawer.vue @@ -336,17 +336,31 @@ const submit = async (formEl: FormInstance | undefined) => { role_setting: list.value, } if (isEdit.value) { - userManageApi.putUserManage(userForm.value.id, params, loading).then((res) => { - emit('refresh') - MsgSuccess(t('common.editSuccess')) - visible.value = false - }) + userManageApi + .putUserManage(userForm.value.id, params, loading) + .then((res) => { + return user.profile(loading).then(() => { + return res + }) + }) + .then((res) => { + emit('refresh') + MsgSuccess(t('common.editSuccess')) + visible.value = false + }) } else { - userManageApi.postUserManage(params, loading).then((res) => { - emit('refresh') - MsgSuccess(t('common.createSuccess')) - visible.value = false - }) + userManageApi + .postUserManage(params, loading) + .then((res) => { + return user.profile(loading).then(() => { + return res + }) + }) + .then((res) => { + emit('refresh') + MsgSuccess(t('common.createSuccess')) + visible.value = false + }) } } })