fix(测试跟踪):修复功能用例-关联UI用例-显示数据非当前项目对应数据问题

--bug=1024626 --user=郭雨琦
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001024626
This commit is contained in:
guoyuqi 2023-03-20 15:12:57 +08:00 committed by jianxing
parent ebb9b1ebc0
commit 4c510484f5
2 changed files with 12 additions and 7 deletions

View File

@ -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;

View File

@ -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(