fix: The user modified the workspace range but did not automatically refresh after returning to the workspace (#3830)

This commit is contained in:
shaohuzhang1 2025-08-06 15:07:19 +08:00 committed by GitHub
parent b3f7d5ed4f
commit e923422cae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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
})
}
}
})