From 8b9d7f2a22796d56288edbe8ffc880055ed40a15 Mon Sep 17 00:00:00 2001 From: WangXu10 Date: Tue, 16 May 2023 11:40:56 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA)?= =?UTF-8?q?=EF=BC=9A=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=94=E5=9C=BA=E6=99=AF/UI=E7=94=A8=E4=BE=8B?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=95=B0=E6=8D=AE=E6=98=BE=E7=A4=BA=E4=B8=8D?= =?UTF-8?q?=E5=AF=B9=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1026168 --user=王旭 【测试跟踪】功能用例-关联场景/UI用例-列表数据显示不符 https://www.tapd.cn/55049933/s/1371659 --- .../case/components/case/relate/CaseRelateLoadList.vue | 6 +++++- .../case/components/case/relate/CaseRelateScenarioList.vue | 6 +++++- .../components/case/relate/CaseRelateUiScenarioList.vue | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/test-track/frontend/src/business/case/components/case/relate/CaseRelateLoadList.vue b/test-track/frontend/src/business/case/components/case/relate/CaseRelateLoadList.vue index 05dbffb75b..02084388fd 100644 --- a/test-track/frontend/src/business/case/components/case/relate/CaseRelateLoadList.vue +++ b/test-track/frontend/src/business/case/components/case/relate/CaseRelateLoadList.vue @@ -108,6 +108,7 @@ import { TEST_CASE_RELEVANCE_LOAD_CASE } from "metersphere-frontend/src/componen import MxVersionSelect from "metersphere-frontend/src/components/version/MxVersionSelect"; import { getVersionFilters } from "@/business/utils/sdk-utils"; import { getTestCaseRelevanceLoadList } from "@/api/testCase"; +import {getCurrentProjectID} from "metersphere-frontend/src/utils/token"; export default { name: "CaseRelateLoadList", @@ -154,7 +155,7 @@ export default { projectId() { this.condition.versionId = null; this.getVersionOptions(); - this.initTable(); + this.initTable(this.projectId); }, }, computed: { @@ -178,6 +179,9 @@ export default { } else if (this.projectId != null) { this.condition.projectId = this.projectId; } + if (this.condition.projectId === "") { + this.condition.projectId = getCurrentProjectID(); + } this.condition.notInIds = this.notInIds; this.condition.testCaseId = this.testCaseId; getTestCaseRelevanceLoadList( diff --git a/test-track/frontend/src/business/case/components/case/relate/CaseRelateScenarioList.vue b/test-track/frontend/src/business/case/components/case/relate/CaseRelateScenarioList.vue index a81796084c..02d60e3762 100644 --- a/test-track/frontend/src/business/case/components/case/relate/CaseRelateScenarioList.vue +++ b/test-track/frontend/src/business/case/components/case/relate/CaseRelateScenarioList.vue @@ -130,6 +130,7 @@ import { getVersionFilters } from "@/business/utils/sdk-utils"; import MxVersionSelect from "metersphere-frontend/src/components/version/MxVersionSelect"; import { getTestCaseRelevanceScenarioList } from "@/api/testCase"; import {getTagToolTips, parseColumnTag} from "@/business/case/test-case"; +import {getCurrentProjectID} from "metersphere-frontend/src/utils/token"; export default { name: "CaseRelateScenarioList", @@ -190,7 +191,7 @@ export default { projectId() { this.condition.versionId = null; this.getVersionOptions(); - this.initTable(); + this.initTable(this.projectId); }, }, computed: { @@ -215,6 +216,9 @@ export default { } else if (this.projectId != null) { this.condition.projectId = this.projectId; } + if (this.condition.projectId === "") { + this.condition.projectId = getCurrentProjectID(); + } this.condition.notInIds = this.notInIds; this.condition.testCaseId = this.testCaseId; this.$emit('setCondition', this.condition); 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 0a8d262092..2d1e417554 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 @@ -185,7 +185,7 @@ export default { }, projectId() { this.condition.versionId = null; - this.initTable(); + this.initTable(this.projectId); }, }, computed: {