From 4c510484f5527b19cb1d9bc9314d1341780ea713 Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Mon, 20 Mar 2023 15:12:57 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8A=9F=E8=83=BD=E7=94=A8=E4=BE=8B-?= =?UTF-8?q?=E5=85=B3=E8=81=94UI=E7=94=A8=E4=BE=8B-=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=9D=9E=E5=BD=93=E5=89=8D=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=AF=B9=E5=BA=94=E6=95=B0=E6=8D=AE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1024626 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001024626 --- .../case/components/TestCaseRelateUiScenarioList.vue | 8 +++++--- .../case/relate/CaseRelateUiScenarioList.vue | 11 +++++++---- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/test-track/frontend/src/business/case/components/TestCaseRelateUiScenarioList.vue b/test-track/frontend/src/business/case/components/TestCaseRelateUiScenarioList.vue index 9452fc5f60..2b54852cdf 100644 --- a/test-track/frontend/src/business/case/components/TestCaseRelateUiScenarioList.vue +++ b/test-track/frontend/src/business/case/components/TestCaseRelateUiScenarioList.vue @@ -76,7 +76,7 @@ import PlanStatusTableItem from "@/business/common/tableItems/plan/PlanStatusTab import MsTableAdvSearchBar from "metersphere-frontend/src/components/search/MsTableAdvSearchBar"; import MsTag from "metersphere-frontend/src/components/MsTag"; import {TEST_CASE_RELEVANCE_API_CASE_CONFIGS} from "metersphere-frontend/src/components/search/search-components"; -import {getVersionFilters} from "@/business/utils/sdk-utils"; +import {getCurrentProjectID, getVersionFilters} from "@/business/utils/sdk-utils"; import MxVersionSelect from "metersphere-frontend/src/components/version/MxVersionSelect"; import {getTestCaseRelevanceScenarioList, getTestCaseRelevanceUiScenarioList} from "@/api/testCase"; @@ -150,10 +150,12 @@ export default { initTable(projectId) { this.condition.status = ""; this.condition.moduleIds = this.selectNodeIds; - if (projectId != null && typeof projectId === 'string') { + if (projectId != null && typeof projectId === "string" && projectId !== "") { this.condition.projectId = projectId; - } else if (this.projectId != null) { + } else if (this.projectId != null && this.projectId !== "") { this.condition.projectId = this.projectId; + } else { + this.condition.projectId = getCurrentProjectID(); } this.condition.notInIds = this.notInIds; this.condition.testCaseId = this.testCaseId; diff --git a/test-track/frontend/src/business/case/components/case/relate/CaseRelateUiScenarioList.vue b/test-track/frontend/src/business/case/components/case/relate/CaseRelateUiScenarioList.vue index 97dfe494de..272b465d42 100644 --- a/test-track/frontend/src/business/case/components/case/relate/CaseRelateUiScenarioList.vue +++ b/test-track/frontend/src/business/case/components/case/relate/CaseRelateUiScenarioList.vue @@ -115,8 +115,8 @@ import MsTablePagination from "metersphere-frontend/src/components/pagination/Ta import PlanStatusTableItem from "@/business/common/tableItems/plan/PlanStatusTableItem"; import MsTableAdvSearchBar from "metersphere-frontend/src/components/search/MsTableAdvSearchBar"; import MsTag from "metersphere-frontend/src/components/MsTag"; -import { TEST_CASE_RELEVANCE_API_CASE_CONFIGS } from "metersphere-frontend/src/components/search/search-components"; -import { getVersionFilters } from "@/business/utils/sdk-utils"; +import {TEST_CASE_RELEVANCE_API_CASE_CONFIGS} from "metersphere-frontend/src/components/search/search-components"; +import {getCurrentProjectID, getVersionFilters} from "@/business/utils/sdk-utils"; import MxVersionSelect from "metersphere-frontend/src/components/version/MxVersionSelect"; import { getTestCaseRelevanceScenarioList, @@ -200,11 +200,14 @@ export default { this.refreshBySearch = true; this.condition.status = ""; this.condition.moduleIds = this.selectNodeIds; - if (projectId != null && typeof projectId === "string") { + if (projectId != null && typeof projectId === "string" && projectId !== "") { this.condition.projectId = projectId; - } else if (this.projectId != null) { + } else if (this.projectId != null && this.projectId !== "") { this.condition.projectId = this.projectId; + } else { + this.condition.projectId = getCurrentProjectID(); } + this.condition.notInIds = this.notInIds; this.condition.testCaseId = this.testCaseId; getTestCaseRelevanceUiScenarioList(