diff --git a/frontend/src/components/business/ms-minders/caseReviewMinder/index.vue b/frontend/src/components/business/ms-minders/caseReviewMinder/index.vue index bd7c9cb85f..588c78f17b 100644 --- a/frontend/src/components/business/ms-minders/caseReviewMinder/index.vue +++ b/frontend/src/components/business/ms-minders/caseReviewMinder/index.vue @@ -221,7 +221,6 @@ }; importJson.value.treePath = []; clearSelectedNodes(); - window.minder.importJson(importJson.value); if (props.moduleId !== 'all') { // 携带具体的模块 ID 加载时,进入该模块内 nextTick(() => { @@ -580,6 +579,7 @@ } // 用例下面所有节点都展开 expendNodeAndChildren(node); + node.layout(); } else if (data?.resource?.includes(moduleTag) && data.count > 0 && data.isLoaded !== true) { // 模块节点且有用例且未加载过用例数据 await initNodeCases(node); diff --git a/frontend/src/components/business/ms-minders/featureCaseMinder/index.vue b/frontend/src/components/business/ms-minders/featureCaseMinder/index.vue index 306a2646ed..30390b2309 100644 --- a/frontend/src/components/business/ms-minders/featureCaseMinder/index.vue +++ b/frontend/src/components/business/ms-minders/featureCaseMinder/index.vue @@ -212,7 +212,6 @@ }; importJson.value.treePath = []; clearSelectedNodes(); - window.minder.importJson(importJson.value); if (props.moduleId !== 'all') { // 携带具体的模块 ID 加载时,进入该模块内 nextTick(() => { @@ -603,6 +602,7 @@ } // 用例下面所有节点都展开 expendNodeAndChildren(node); + node.layout(); } else if (data?.resource?.includes(moduleTag) && data.count > 0 && data.isLoaded !== true) { // 模块节点且有用例且未加载过用例数据 await initNodeCases(node); @@ -726,6 +726,7 @@ function customBatchExpand(node: MinderJsonNode) { if (node.data?.resource?.includes(caseTag)) { expendNodeAndChildren(node); + node.layout(); } } diff --git a/frontend/src/components/business/ms-minders/testPlanFeatureCaseMinder/index.vue b/frontend/src/components/business/ms-minders/testPlanFeatureCaseMinder/index.vue index 91d1620aef..5e6442383a 100644 --- a/frontend/src/components/business/ms-minders/testPlanFeatureCaseMinder/index.vue +++ b/frontend/src/components/business/ms-minders/testPlanFeatureCaseMinder/index.vue @@ -287,7 +287,6 @@ }; importJson.value.treePath = []; clearSelectedNodes(); - window.minder.importJson(importJson.value); if (props.activeModule !== 'all') { // 携带具体的模块 ID 加载时,进入该模块内 nextTick(() => { @@ -798,6 +797,7 @@ } // 用例下面所有节点都展开 expendNodeAndChildren(node); + node.layout(); } else if (data?.resource?.includes(moduleTag) && data.count > 0 && data.isLoaded !== true) { // 模块节点且有用例且未加载过用例数据 if (data.id !== 'NONE') { diff --git a/frontend/src/components/pure/ms-minder-editor/script/tool/utils.ts b/frontend/src/components/pure/ms-minder-editor/script/tool/utils.ts index 6981d39782..55140b5856 100644 --- a/frontend/src/components/pure/ms-minder-editor/script/tool/utils.ts +++ b/frontend/src/components/pure/ms-minder-editor/script/tool/utils.ts @@ -184,7 +184,6 @@ export function expendNodeAndChildren(node: MinderJsonNode) { if (node.children?.length) { node.expand(); node.renderTree(); - node.layout(); node.children?.forEach((child) => expendNodeAndChildren(child)); } }