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: {