diff --git a/frontend/src/components/business/ms-minders/featureCaseMinder/basInfo.vue b/frontend/src/components/business/ms-minders/featureCaseMinder/basInfo.vue index 289ee35c00..90877c58d8 100644 --- a/frontend/src/components/business/ms-minders/featureCaseMinder/basInfo.vue +++ b/frontend/src/components/business/ms-minders/featureCaseMinder/basInfo.vue @@ -35,14 +35,17 @@
- - {{ t('common.save') }} - + + + {{ t('common.save') }} + + {{ t('common.cancel') }}
diff --git a/frontend/src/components/business/ms-minders/featureCaseMinder/index.vue b/frontend/src/components/business/ms-minders/featureCaseMinder/index.vue index 7fcd48cd00..af5cee4639 100644 --- a/frontend/src/components/business/ms-minders/featureCaseMinder/index.vue +++ b/frontend/src/components/business/ms-minders/featureCaseMinder/index.vue @@ -27,6 +27,7 @@ :can-show-batch-delete="true" :priority-tooltip="t('caseManagement.caseReview.caseLevel')" :disabled="!hasEditPermission" + :disabled-extra-tab="!!activeCase.moduleIsNew" can-show-more-batch-menu single-tag tag-enable @@ -426,6 +427,7 @@ id: data.id, name: data.text, moduleId: node.parent?.data?.id || '', + moduleIsNew: !!node.parent?.data?.isNew, // 标记父模块节点是否为新建 isNew: true, }; } diff --git a/frontend/src/components/business/ms-minders/locale/en-US.ts b/frontend/src/components/business/ms-minders/locale/en-US.ts index dca5fc3b33..6017bb79d1 100644 --- a/frontend/src/components/business/ms-minders/locale/en-US.ts +++ b/frontend/src/components/business/ms-minders/locale/en-US.ts @@ -17,6 +17,8 @@ export default { 'ms.minders.createChildCase': 'Insert child Case', 'ms.minders.moreCase': 'More Cases...', 'ms.minders.moreModule': 'More Modules...', + 'ms.minders.moduleNewTip': + 'The module node to which the current use case belongs has not been saved. Please save the mind map first', // 测试规划脑图文案 'ms.minders.failStop': 'Failure stop', 'ms.minders.failRetry': 'Retry on failure', diff --git a/frontend/src/components/business/ms-minders/locale/zh-CN.ts b/frontend/src/components/business/ms-minders/locale/zh-CN.ts index 3b2e935034..29d9d90bed 100644 --- a/frontend/src/components/business/ms-minders/locale/zh-CN.ts +++ b/frontend/src/components/business/ms-minders/locale/zh-CN.ts @@ -17,6 +17,7 @@ export default { 'ms.minders.createChildCase': '添加子级用例', 'ms.minders.moreCase': '更多用例...', 'ms.minders.moreModule': '更多模块...', + 'ms.minders.moduleNewTip': '当前用例所属模块节点未保存,请先保存脑图', // 测试规划脑图文案 'ms.minders.failStop': '失败停止', 'ms.minders.failRetry': '失败重试', diff --git a/frontend/src/components/pure/ms-minder-editor/hooks/useMinderOperation.ts b/frontend/src/components/pure/ms-minder-editor/hooks/useMinderOperation.ts index 88829d2c36..86c8e74a0f 100644 --- a/frontend/src/components/pure/ms-minder-editor/hooks/useMinderOperation.ts +++ b/frontend/src/components/pure/ms-minder-editor/hooks/useMinderOperation.ts @@ -182,6 +182,7 @@ export default function useMinderOperation(options: MinderOperationProps) { // 由于粘贴逻辑中为了排除子节点重新排序导致逆序,因此复制的时候倒过来 for (let i = noFakeNodeTree.length - 1; i >= 0; i--) { _node = minder.createNode(null, node); + _node.setData({ isNew: true }); minder.importNode(_node, noFakeNodeTree[i]); selectedNodes.push(_node); node.appendChild(_node); diff --git a/frontend/src/components/pure/ms-minder-editor/minderEditor.vue b/frontend/src/components/pure/ms-minder-editor/minderEditor.vue index ca5271415f..ec3da5b34b 100644 --- a/frontend/src/components/pure/ms-minder-editor/minderEditor.vue +++ b/frontend/src/components/pure/ms-minder-editor/minderEditor.vue @@ -21,7 +21,12 @@
- +
diff --git a/frontend/src/components/pure/ms-minder-editor/props.ts b/frontend/src/components/pure/ms-minder-editor/props.ts index b9549e5e26..d8d506d2ec 100644 --- a/frontend/src/components/pure/ms-minder-editor/props.ts +++ b/frontend/src/components/pure/ms-minder-editor/props.ts @@ -64,6 +64,7 @@ export const mainEditorProps = { minderKey: String as PropType, disabled: Boolean, extractContentTabList: Array as PropType<{ label: string; value: string }[]>, + disabledExtraTab: Boolean, insertNode: { type: Function as PropType<(node: MinderJsonNode, type: string, value?: string) => void>, default: undefined, diff --git a/frontend/src/components/pure/ms-tab/index.vue b/frontend/src/components/pure/ms-tab/index.vue index 3b8f943633..739e59106f 100644 --- a/frontend/src/components/pure/ms-tab/index.vue +++ b/frontend/src/components/pure/ms-tab/index.vue @@ -5,7 +5,12 @@ :class="[props.class, props.noContent ? 'no-content' : '']" @change="(val) => handleTabClick(val as string)" > - +