diff --git a/frontend/src/components/business/ms-minders/caseReviewMinder/index.vue b/frontend/src/components/business/ms-minders/caseReviewMinder/index.vue index 7b9180f1c4..fe533e39c0 100644 --- a/frontend/src/components/business/ms-minders/caseReviewMinder/index.vue +++ b/frontend/src/components/business/ms-minders/caseReviewMinder/index.vue @@ -65,7 +65,7 @@ @@ -94,6 +95,7 @@ import MsButton from '@/components/pure/ms-button/index.vue'; import MsDescription, { Description } from '@/components/pure/ms-description/index.vue'; + import MsEmpty from '@/components/pure/ms-empty/index.vue'; import MsMinderEditor from '@/components/pure/ms-minder-editor/minderEditor.vue'; import type { MinderJson, MinderJsonNode, MinderJsonNodeData } from '@/components/pure/ms-minder-editor/props'; import { MinderEvent } from '@/components/pure/ms-minder-editor/props'; @@ -126,6 +128,10 @@ moduleTree: ModuleTreeNode[]; }>(); + const emit = defineEmits<{ + (e: 'operation', type: string, data: MinderJsonNodeData): void; + }>(); + const route = useRoute(); const appStore = useAppStore(); const { t } = useI18n(); @@ -348,7 +354,7 @@ } const extraVisible = ref(false); - const activeExtraKey = ref<'baseInfo' | 'attachment' | 'history'>('baseInfo'); + const activeExtraKey = ref<'baseInfo' | 'attachment' | 'history'>('history'); const baseInfoLoading = ref(false); const activeCaseInfo = ref>({}); const descriptions = ref([]); @@ -461,7 +467,7 @@ const node: MinderJsonNode = window.minder.getSelectedNode(); const { data } = node; if (extraVisible.value && data?.resource?.includes(caseTag)) { - activeExtraKey.value = 'baseInfo'; + activeExtraKey.value = 'history'; initCaseDetail(data); initReviewHistoryList(data); } @@ -470,35 +476,35 @@ const canShowFloatMenu = ref(false); // 是否展示浮动菜单 const canShowEnterNode = ref(false); const showCaseMenu = ref(false); - const moreMenuOtherOperationList = [ - { - value: 'changeReviewer', - label: t('caseManagement.caseReview.changeReviewer'), - permission: ['CASE_REVIEW:READ+UPDATE'], - onClick: () => { - // TODO 操作 - console.log('🤔️ =>', t('caseManagement.caseReview.changeReviewer')); + const moreMenuOtherOperationList = ref(); + function setMoreMenuOtherOperationList(data: MinderJsonNodeData) { + moreMenuOtherOperationList.value = [ + { + value: 'changeReviewer', + label: t('caseManagement.caseReview.changeReviewer'), + permission: ['CASE_REVIEW:READ+UPDATE'], + onClick: () => { + emit('operation', 'changeReviewer', data); + }, }, - }, - { - value: 'reReview', - label: t('caseManagement.caseReview.reReview'), - permission: ['CASE_REVIEW:READ+UPDATE'], - onClick: () => { - // TODO 操作 - console.log('🤔️ =>', t('caseManagement.caseReview.reReview')); + { + value: 'reReview', + label: t('caseManagement.caseReview.reReview'), + permission: ['CASE_REVIEW:READ+UPDATE'], + onClick: () => { + emit('operation', 'reReview', data); + }, }, - }, - { - value: 'disassociate', - label: t('caseManagement.caseReview.disassociate'), - permission: ['CASE_REVIEW:READ+RELEVANCE'], - onClick: () => { - // TODO 操作 - console.log('🤔️ =>', t('caseManagement.caseReview.disassociate')); + { + value: 'disassociate', + label: t('caseManagement.caseReview.disassociate'), + permission: ['CASE_REVIEW:READ+RELEVANCE'], + onClick: () => { + emit('operation', 'disassociate', data); + }, }, - }, - ]; + ]; + } /** * 处理节点选中 @@ -515,8 +521,8 @@ } // 展示浮动菜单: 模块节点有子节点且非根节点、用例节点 if ( - node?.data?.resource?.includes(caseTag) || - (node?.data?.resource?.includes(moduleTag) && node.type !== 'root' && (node.children || []).length > 0) + node.data?.resource?.includes(caseTag) || + (node.data?.resource?.includes(moduleTag) && node.type !== 'root' && (node.children || []).length > 0) ) { canShowFloatMenu.value = true; } else { @@ -532,6 +538,7 @@ if (data?.resource?.includes(caseTag)) { showCaseMenu.value = true; + setMoreMenuOtherOperationList(node.data as MinderJsonNodeData); if (extraVisible.value) { toggleDetail(true); } diff --git a/frontend/src/components/business/ms-minders/featureCaseMinder/attachment.vue b/frontend/src/components/business/ms-minders/featureCaseMinder/attachment.vue index 3909b94544..50f23b6e4d 100644 --- a/frontend/src/components/business/ms-minders/featureCaseMinder/attachment.vue +++ b/frontend/src/components/business/ms-minders/featureCaseMinder/attachment.vue @@ -87,6 +87,7 @@ +