fix: Update visibility handling after user profile retrieval and enhance permission checks in dropdown items

This commit is contained in:
zhangzhanwei 2025-07-07 17:33:50 +08:00 committed by zhanweizhang7
parent 1bb2a1ae12
commit f6b36b7801
2 changed files with 6 additions and 4 deletions

View File

@ -431,8 +431,9 @@ const submit = async (formEl: FormInstance | undefined) => {
.then((res: any) => {
MsgSuccess(t('common.editSuccess'))
emit('refresh', res.data)
visible.value = false
return user.profile()
})
.then(() => {visible.value = false})
} else {
const obj = {
folder_id: folder.currentFolder?.id,
@ -443,8 +444,9 @@ const submit = async (formEl: FormInstance | undefined) => {
.then((res: any) => {
MsgSuccess(t('common.createSuccess'))
emit('refresh')
visible.value = false
return user.profile()
})
.then(() => {visible.value = false})
}
}
})

View File

@ -213,7 +213,7 @@
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item
v-if="item.template_id"
v-if="item.template_id && permissionPrecise.edit(item.id)"
@click.stop="addInternalTool(item, true)"
>
<el-icon>
@ -238,7 +238,7 @@
{{ $t('common.copy') }}
</el-dropdown-item>
<el-dropdown-item
v-if="item.init_field_list?.length > 0"
v-if="item.init_field_list?.length > 0 && permissionPrecise.edit(item.id)"
@click.stop="configInitParams(item)"
>
<AppIcon iconName="app-operation" class="mr-4"></AppIcon>