fix: 修复创建函数问题
This commit is contained in:
parent
e8480013ee
commit
9d670c44d4
@ -119,12 +119,16 @@ const title = ref('')
|
|||||||
const changeStateloading = ref(false)
|
const changeStateloading = ref(false)
|
||||||
|
|
||||||
const canEdit = (row: any) => {
|
const canEdit = (row: any) => {
|
||||||
return user.userInfo?.id === row.user_id
|
return user.userInfo?.id === row?.user_id
|
||||||
}
|
}
|
||||||
|
|
||||||
function openCreateDialog(data?: any) {
|
function openCreateDialog(data?: any) {
|
||||||
title.value = data ? '编辑函数' : '创建函数'
|
title.value = data ? '编辑函数' : '创建函数'
|
||||||
if (data?.permission_type !== 'PUBLIC' && !canEdit(data)) {
|
if (data) {
|
||||||
|
if (data?.permission_type !== 'PUBLIC' || canEdit(data)) {
|
||||||
|
FunctionFormDrawerRef.value.open(data)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
FunctionFormDrawerRef.value.open(data)
|
FunctionFormDrawerRef.value.open(data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user