fix: Update visibility handling after user profile retrieval and enhance permission checks in dropdown items
This commit is contained in:
parent
1bb2a1ae12
commit
f6b36b7801
@ -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})
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@ -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>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user