From d65206c4c2efbff7b73fb2fccfbb637992a76a1d Mon Sep 17 00:00:00 2001 From: "xinxin.wu" Date: Tue, 24 Dec 2024 16:30:48 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=B7=A5=E4=BD=9C=E5=8F=B0):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=B7=A5=E4=BD=9C=E5=8F=B0=E6=B5=8B=E8=AF=95=E8=AE=A1?= =?UTF-8?q?=E5=88=92=E6=A6=82=E8=A7=88=E5=88=87=E6=8D=A2=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E6=A1=86=E6=98=BE=E7=A4=BA=E7=9A=84=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../homePage/components/testPlanOverview.vue | 33 +++++++++---------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/frontend/src/views/workbench/homePage/components/testPlanOverview.vue b/frontend/src/views/workbench/homePage/components/testPlanOverview.vue index ff77e4ffb4..120ba2668e 100644 --- a/frontend/src/views/workbench/homePage/components/testPlanOverview.vue +++ b/frontend/src/views/workbench/homePage/components/testPlanOverview.vue @@ -357,23 +357,6 @@ } } - async function changeHandler(value: string[]) { - selectValue.value = value; - innerPlanId.value = value[value.length - 1]; - innerProjectIds.value = [value[0]]; - const planLevel = 3; - if (value.length === planLevel) { - innerGroupPlanId.value = value[value.length - 2]; - } else { - innerGroupPlanId.value = ''; - } - - await nextTick(); - labelPath.value = getLabelPath(innerPlanId.value); - initOverViewDetail(); - emit('change'); - } - async function loadMore(option: CascaderOption, done: (children?: CascaderOption[]) => void) { try { let testPlanOptionsNode = await getWorkTestPlanListUrl(option.value as string); @@ -419,6 +402,22 @@ } } + async function changeHandler(value: string[]) { + selectValue.value = value; + + innerPlanId.value = value[value.length - 1]; + const [newProjectId] = value; + innerProjectIds.value = [newProjectId]; + + const planLevel = 3; + innerGroupPlanId.value = value.length === planLevel ? value[planLevel - 2] : ''; + + await nextTick(); + refreshHandler(newProjectId); + labelPath.value = getLabelPath(innerPlanId.value); + emit('change'); + } + function getSelectedParams() { const [newProjectId] = innerProjectIds.value; const selectedData = [newProjectId, innerGroupPlanId.value, innerPlanId.value];