fix(用例管理): 修复功能用例模块树权限问题

--bug=1039850 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001039850
This commit is contained in:
guoyuqi 2024-04-23 10:47:22 +08:00 committed by 刘瑞斌
parent f6c6469f06
commit 519e41d1d1
2 changed files with 5 additions and 1 deletions

View File

@ -16,7 +16,7 @@
:node-more-actions="caseMoreActions" :node-more-actions="caseMoreActions"
:expand-all="props.isExpandAll" :expand-all="props.isExpandAll"
:empty-text="t('common.noData')" :empty-text="t('common.noData')"
draggable :draggable="!props.isModal && hasAnyPermission(['FUNCTIONAL_CASE:READ+UPDATE'])"
:virtual-list-props="virtualListProps" :virtual-list-props="virtualListProps"
block-node block-node
:field-names="{ :field-names="{
@ -139,11 +139,13 @@
{ {
label: 'caseManagement.featureCase.rename', label: 'caseManagement.featureCase.rename',
eventTag: 'rename', eventTag: 'rename',
permission: ['FUNCTIONAL_CASE:READ+UPDATE'],
}, },
{ {
label: 'caseManagement.featureCase.delete', label: 'caseManagement.featureCase.delete',
eventTag: 'delete', eventTag: 'delete',
danger: true, danger: true,
permission: ['FUNCTIONAL_CASE:READ+DELETE'],
}, },
]; ];

View File

@ -39,6 +39,7 @@
</MsButton> </MsButton>
</a-tooltip> </a-tooltip>
<MsPopConfirm <MsPopConfirm
v-if="hasAnyPermission(['FUNCTIONAL_CASE:READ+ADD'])"
ref="confirmRef" ref="confirmRef"
v-model:visible="addSubVisible" v-model:visible="addSubVisible"
:is-delete="false" :is-delete="false"
@ -159,6 +160,7 @@
import { useI18n } from '@/hooks/useI18n'; import { useI18n } from '@/hooks/useI18n';
import useAppStore from '@/store/modules/app'; import useAppStore from '@/store/modules/app';
import useFeatureCaseStore from '@/store/modules/case/featureCase'; import useFeatureCaseStore from '@/store/modules/case/featureCase';
import { hasAnyPermission } from '@/utils/permission';
import type { CaseModuleQueryParams, CreateOrUpdateModule, ValidateInfo } from '@/models/caseManagement/featureCase'; import type { CaseModuleQueryParams, CreateOrUpdateModule, ValidateInfo } from '@/models/caseManagement/featureCase';
import { TableQueryParams } from '@/models/common'; import { TableQueryParams } from '@/models/common';