fix(测试跟踪):修复功能用例关联场景/UI用例列表数据显示不对问题

--bug=1026168 --user=王旭 【测试跟踪】功能用例-关联场景/UI用例-列表数据显示不符 https://www.tapd.cn/55049933/s/1371659
This commit is contained in:
WangXu10 2023-05-16 11:40:56 +08:00 committed by 刘瑞斌
parent e83dcb2431
commit 8b9d7f2a22
3 changed files with 11 additions and 3 deletions

View File

@ -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 MxVersionSelect from "metersphere-frontend/src/components/version/MxVersionSelect";
import { getVersionFilters } from "@/business/utils/sdk-utils"; import { getVersionFilters } from "@/business/utils/sdk-utils";
import { getTestCaseRelevanceLoadList } from "@/api/testCase"; import { getTestCaseRelevanceLoadList } from "@/api/testCase";
import {getCurrentProjectID} from "metersphere-frontend/src/utils/token";
export default { export default {
name: "CaseRelateLoadList", name: "CaseRelateLoadList",
@ -154,7 +155,7 @@ export default {
projectId() { projectId() {
this.condition.versionId = null; this.condition.versionId = null;
this.getVersionOptions(); this.getVersionOptions();
this.initTable(); this.initTable(this.projectId);
}, },
}, },
computed: { computed: {
@ -178,6 +179,9 @@ export default {
} else if (this.projectId != null) { } else if (this.projectId != null) {
this.condition.projectId = this.projectId; this.condition.projectId = this.projectId;
} }
if (this.condition.projectId === "") {
this.condition.projectId = getCurrentProjectID();
}
this.condition.notInIds = this.notInIds; this.condition.notInIds = this.notInIds;
this.condition.testCaseId = this.testCaseId; this.condition.testCaseId = this.testCaseId;
getTestCaseRelevanceLoadList( getTestCaseRelevanceLoadList(

View File

@ -130,6 +130,7 @@ import { getVersionFilters } from "@/business/utils/sdk-utils";
import MxVersionSelect from "metersphere-frontend/src/components/version/MxVersionSelect"; import MxVersionSelect from "metersphere-frontend/src/components/version/MxVersionSelect";
import { getTestCaseRelevanceScenarioList } from "@/api/testCase"; import { getTestCaseRelevanceScenarioList } from "@/api/testCase";
import {getTagToolTips, parseColumnTag} from "@/business/case/test-case"; import {getTagToolTips, parseColumnTag} from "@/business/case/test-case";
import {getCurrentProjectID} from "metersphere-frontend/src/utils/token";
export default { export default {
name: "CaseRelateScenarioList", name: "CaseRelateScenarioList",
@ -190,7 +191,7 @@ export default {
projectId() { projectId() {
this.condition.versionId = null; this.condition.versionId = null;
this.getVersionOptions(); this.getVersionOptions();
this.initTable(); this.initTable(this.projectId);
}, },
}, },
computed: { computed: {
@ -215,6 +216,9 @@ export default {
} else if (this.projectId != null) { } else if (this.projectId != null) {
this.condition.projectId = this.projectId; this.condition.projectId = this.projectId;
} }
if (this.condition.projectId === "") {
this.condition.projectId = getCurrentProjectID();
}
this.condition.notInIds = this.notInIds; this.condition.notInIds = this.notInIds;
this.condition.testCaseId = this.testCaseId; this.condition.testCaseId = this.testCaseId;
this.$emit('setCondition', this.condition); this.$emit('setCondition', this.condition);

View File

@ -185,7 +185,7 @@ export default {
}, },
projectId() { projectId() {
this.condition.versionId = null; this.condition.versionId = null;
this.initTable(); this.initTable(this.projectId);
}, },
}, },
computed: { computed: {