fix(系统设置): 模板未开启的字段禁用编辑问题
This commit is contained in:
parent
e49ac968e8
commit
1ac7e3e458
|
@ -52,7 +52,11 @@
|
||||||
/>
|
/>
|
||||||
<a-tooltip :content="record.name">
|
<a-tooltip :content="record.name">
|
||||||
<div
|
<div
|
||||||
class="ellipsis max-w-[200px] cursor-pointer text-[rgb(var(--primary-5))]"
|
class="ellipsis max-w-[200px]"
|
||||||
|
:class="{
|
||||||
|
'text-[rgb(var(--primary-5))]': isEnableTemplate,
|
||||||
|
'cursor-pointer': isEnableTemplate,
|
||||||
|
}"
|
||||||
@click="showDetail(record)"
|
@click="showDetail(record)"
|
||||||
>{{ record.name }}</div
|
>{{ record.name }}</div
|
||||||
>
|
>
|
||||||
|
@ -61,7 +65,7 @@
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
<template #updateTime="{ record }"> {{ dayjs(record.updateTime).format('YYYY-MM-DD HH:mm:ss') }} </template>
|
<template #updateTime="{ record }"> {{ dayjs(record.updateTime).format('YYYY-MM-DD HH:mm:ss') }} </template>
|
||||||
<template #operation="{ record }">
|
<template v-if="isEnableTemplate" #operation="{ record }">
|
||||||
<div class="flex flex-row flex-nowrap items-center">
|
<div class="flex flex-row flex-nowrap items-center">
|
||||||
<MsPopConfirm
|
<MsPopConfirm
|
||||||
type="error"
|
type="error"
|
||||||
|
@ -221,6 +225,14 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 是否开启模板(项目/组织)
|
||||||
|
const isEnableTemplate = computed(() => {
|
||||||
|
if (props.mode === 'organization') {
|
||||||
|
return templateStore.ordStatus[route.query.type as string];
|
||||||
|
}
|
||||||
|
return templateStore.projectStatus[route.query.type as string];
|
||||||
|
});
|
||||||
|
|
||||||
const hasOperationPermission = computed(() =>
|
const hasOperationPermission = computed(() =>
|
||||||
hasAnyPermission([...props.updatePermission, ...props.deletePermission])
|
hasAnyPermission([...props.updatePermission, ...props.deletePermission])
|
||||||
);
|
);
|
||||||
|
@ -375,6 +387,8 @@
|
||||||
|
|
||||||
// 详情
|
// 详情
|
||||||
const showDetail = (record: AddOrUpdateField) => {
|
const showDetail = (record: AddOrUpdateField) => {
|
||||||
|
if (!isEnableTemplate.value) return;
|
||||||
|
|
||||||
showDetailVisible.value = true;
|
showDetailVisible.value = true;
|
||||||
let fieldType;
|
let fieldType;
|
||||||
if (record.type === 'MEMBER') {
|
if (record.type === 'MEMBER') {
|
||||||
|
|
Loading…
Reference in New Issue