fix(工作台): 测试计划关联功能用例页面,异常的用例标签数据导致页面崩溃
--bug=1021958 --user=陈建星 【测试跟踪】测试计划-关联功能用例-关联页面卡死 https://www.tapd.cn/55049933/s/1327266
This commit is contained in:
parent
1d0dc3c6c0
commit
068f4f4a12
|
@ -16,6 +16,7 @@ import {getPageDate, getPageInfo} from "metersphere-frontend/src/utils/tableUtil
|
||||||
import {TEST_PLAN_RELEVANCE_FUNC_CONFIGS} from "metersphere-frontend/src/components/search/search-components";
|
import {TEST_PLAN_RELEVANCE_FUNC_CONFIGS} from "metersphere-frontend/src/components/search/search-components";
|
||||||
import FunctionalRelevance from "@/business/plan/view/comonents/functional/FunctionalRelevance";
|
import FunctionalRelevance from "@/business/plan/view/comonents/functional/FunctionalRelevance";
|
||||||
import {addTestCaseRelationship, getTestCaseNodesByCaseFilter, testCaseRelationshipRelateList} from "@/api/testCase";
|
import {addTestCaseRelationship, getTestCaseNodesByCaseFilter, testCaseRelationshipRelateList} from "@/api/testCase";
|
||||||
|
import {parseTag} from "@/business/utils/sdk-utils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "RelationshipFunctionalRelevance",
|
name: "RelationshipFunctionalRelevance",
|
||||||
|
@ -86,10 +87,7 @@ export default {
|
||||||
.then(response => {
|
.then(response => {
|
||||||
getPageDate(response, this.page);
|
getPageDate(response, this.page);
|
||||||
let data = this.page.data;
|
let data = this.page.data;
|
||||||
data.forEach(item => {
|
parseTag(data);
|
||||||
item.checked = false;
|
|
||||||
item.tags = JSON.parse(item.tags);
|
|
||||||
});
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getTreeNodes(vueObj) {
|
getTreeNodes(vueObj) {
|
||||||
|
|
|
@ -114,7 +114,7 @@ import {
|
||||||
} from "metersphere-frontend/src/components/search/search-components";
|
} from "metersphere-frontend/src/components/search/search-components";
|
||||||
import MsSearch from "metersphere-frontend/src/components/search/MsSearch";
|
import MsSearch from "metersphere-frontend/src/components/search/MsSearch";
|
||||||
import ApiListContainer from "@/business/plan/view/comonents/api/ApiListContainer";
|
import ApiListContainer from "@/business/plan/view/comonents/api/ApiListContainer";
|
||||||
import {buildBatchParam, hasLicense, isProjectVersionEnable} from "@/business/utils/sdk-utils";
|
import {buildBatchParam, hasLicense, isProjectVersionEnable, parseTag} from "@/business/utils/sdk-utils";
|
||||||
import PriorityTableItem from "@/business/common/tableItems/planview/PriorityTableItem";
|
import PriorityTableItem from "@/business/common/tableItems/planview/PriorityTableItem";
|
||||||
import {apiDefinitionGet} from "@/api/remote/api/api-definition";
|
import {apiDefinitionGet} from "@/api/remote/api/api-definition";
|
||||||
import {testPlanApiCaseRelevanceList} from "@/api/remote/plan/test-plan-api-case";
|
import {testPlanApiCaseRelevanceList} from "@/api/remote/plan/test-plan-api-case";
|
||||||
|
@ -246,11 +246,7 @@ export default {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.total = response.data.itemCount;
|
this.total = response.data.itemCount;
|
||||||
this.tableData = response.data.listObject;
|
this.tableData = response.data.listObject;
|
||||||
this.tableData.forEach(item => {
|
parseTag(this.tableData);
|
||||||
if (item.tags && item.tags.length > 0) {
|
|
||||||
item.tags = JSON.parse(item.tags);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
clear() {
|
clear() {
|
||||||
|
|
|
@ -18,6 +18,7 @@ import FunctionalRelevance from "@/business/plan/view/comonents/functional/Funct
|
||||||
import {testPlanRelevance} from "@/api/remote/plan/test-plan";
|
import {testPlanRelevance} from "@/api/remote/plan/test-plan";
|
||||||
import {testCaseRelateList} from "@/api/testCase";
|
import {testCaseRelateList} from "@/api/testCase";
|
||||||
import {testCaseNodeListPlanRelate} from "@/api/test-case-node";
|
import {testCaseNodeListPlanRelate} from "@/api/test-case-node";
|
||||||
|
import {parseTag} from "@/business/utils/sdk-utils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TestPlanFunctionalRelevance",
|
name: "TestPlanFunctionalRelevance",
|
||||||
|
@ -88,9 +89,9 @@ export default {
|
||||||
this.page.loading = false;
|
this.page.loading = false;
|
||||||
getPageDate(response, this.page);
|
getPageDate(response, this.page);
|
||||||
let data = this.page.data;
|
let data = this.page.data;
|
||||||
|
parseTag(this.page.data);
|
||||||
data.forEach(item => {
|
data.forEach(item => {
|
||||||
item.checked = false;
|
item.checked = false;
|
||||||
item.tags = JSON.parse(item.tags);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
export {operationConfirm, removeGoBackListener, handleCtrlSEvent, byteToSize, resizeTextarea,
|
export {operationConfirm, removeGoBackListener, handleCtrlSEvent, byteToSize, resizeTextarea,
|
||||||
getTypeByFileName, strMapToObj, getUUID, windowPrint} from "metersphere-frontend/src/utils";
|
getTypeByFileName, strMapToObj, getUUID, windowPrint, parseTag} from "metersphere-frontend/src/utils";
|
||||||
export {parseCustomFilesForList, getCustomFieldFilter, buildBatchParam} from "metersphere-frontend/src/utils/tableUtils";
|
export {parseCustomFilesForList, getCustomFieldFilter, buildBatchParam} from "metersphere-frontend/src/utils/tableUtils";
|
||||||
export {sortCustomFields, parseCustomField, buildCustomFields} from "metersphere-frontend/src/utils/custom_field";
|
export {sortCustomFields, parseCustomField, buildCustomFields} from "metersphere-frontend/src/utils/custom_field";
|
||||||
export {getCurrentProjectID, getCurrentWorkspaceId, getCurrentUser, setCurrentProjectID} from "metersphere-frontend/src/utils/token";
|
export {getCurrentProjectID, getCurrentWorkspaceId, getCurrentUser, setCurrentProjectID} from "metersphere-frontend/src/utils/token";
|
||||||
|
|
Loading…
Reference in New Issue