From 7d78a171fd7f14b7444ad176a8dba40a05956890 Mon Sep 17 00:00:00 2001 From: baiqi Date: Wed, 14 Aug 2024 15:51:11 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E8=84=91=E5=9B=BE):=20=E8=84=91=E5=9B=BE?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E6=80=A7=E8=83=BD=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/business/ms-minders/caseReviewMinder/index.vue | 2 +- .../components/business/ms-minders/featureCaseMinder/index.vue | 3 ++- .../business/ms-minders/testPlanFeatureCaseMinder/index.vue | 2 +- .../src/components/pure/ms-minder-editor/script/tool/utils.ts | 1 - 4 files changed, 4 insertions(+), 4 deletions(-) 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)); } }