fix: 公用函数禁止编辑
This commit is contained in:
parent
acc43df3a3
commit
ce464c5ddf
@ -311,6 +311,9 @@ h5 {
|
|||||||
.cursor {
|
.cursor {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
.notAllowed {
|
||||||
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
超出省略号
|
超出省略号
|
||||||
|
|||||||
@ -41,8 +41,9 @@
|
|||||||
<CardBox
|
<CardBox
|
||||||
:title="item.name"
|
:title="item.name"
|
||||||
:description="item.desc"
|
:description="item.desc"
|
||||||
class="function-lib-card cursor"
|
class="function-lib-card"
|
||||||
@click="openCreateDialog(item)"
|
@click="openCreateDialog(item)"
|
||||||
|
:class="item.permission_type === 'PUBLIC' ? 'notAllowed' : 'cursor'"
|
||||||
>
|
>
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<AppAvatar class="mr-12 avatar-green" shape="square" :size="32">
|
<AppAvatar class="mr-12 avatar-green" shape="square" :size="32">
|
||||||
@ -65,13 +66,18 @@
|
|||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-divider direction="vertical" />
|
<el-divider direction="vertical" />
|
||||||
<el-tooltip effect="dark" content="删除" placement="top">
|
<el-tooltip effect="dark" content="删除" placement="top">
|
||||||
<el-button text @click.stop="deleteFunctionLib(item)">
|
<el-button
|
||||||
|
:disabled="item.permission_type === 'PUBLIC'"
|
||||||
|
text
|
||||||
|
@click.stop="deleteFunctionLib(item)"
|
||||||
|
>
|
||||||
<el-icon><Delete /></el-icon>
|
<el-icon><Delete /></el-icon>
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
<div @click.stop>
|
<div @click.stop>
|
||||||
<el-switch
|
<el-switch
|
||||||
|
:disabled="item.permission_type === 'PUBLIC'"
|
||||||
v-model="item.is_active"
|
v-model="item.is_active"
|
||||||
@change="changeState($event, item)"
|
@change="changeState($event, item)"
|
||||||
size="small"
|
size="small"
|
||||||
@ -111,8 +117,10 @@ const changeStateloading = ref(false)
|
|||||||
|
|
||||||
function openCreateDialog(data?: any) {
|
function openCreateDialog(data?: any) {
|
||||||
title.value = data ? '编辑函数' : '创建函数'
|
title.value = data ? '编辑函数' : '创建函数'
|
||||||
|
if (data?.permission_type !== 'PUBLIC') {
|
||||||
FunctionFormDrawerRef.value.open(data)
|
FunctionFormDrawerRef.value.open(data)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function searchHandle() {
|
function searchHandle() {
|
||||||
paginationConfig.total = 0
|
paginationConfig.total = 0
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user