fix(测试跟踪): 修复测试计划报告不同状态的用例没有展示的问题

This commit is contained in:
Jianguo-Genius 2024-04-24 14:46:49 +08:00 committed by 刘瑞斌
parent 1ce98885db
commit bf9d09d539
2 changed files with 9 additions and 8 deletions

View File

@ -117,11 +117,8 @@ import FunctionalCases from "@/business/plan/view/comonents/report/detail/compon
import FunctionalIssueList from "@/business/plan/view/comonents/report/detail/component/FunctionalIssueList";
import TestPlanReportContainer from "@/business/plan/view/comonents/report/detail/TestPlanReportContainer";
import TabPaneCount from "@/business/plan/view/comonents/report/detail/component/TabPaneCount";
import { hasPermission } from "metersphere-frontend/src/utils/permission";
import {
getPlanFunctionAllCase,
getSharePlanFunctionAllCase,
} from "@/api/remote/plan/test-plan";
import {hasPermission} from "metersphere-frontend/src/utils/permission";
import {getPlanFunctionAllCase, getSharePlanFunctionAllCase,} from "@/api/remote/plan/test-plan";
export default {
name: "TestPlanFunctionalReport",
@ -248,6 +245,9 @@ export default {
case "failure":
_failureTestCase.push(data[i]);
break;
case "Failure":
_failureTestCase.push(data[i]);
break;
default:
break;
}
@ -260,9 +260,9 @@ export default {
},
getAllFunctionalTestCase() {
if (this.isTemplate || this.isDb) {
this.allTestCase = this.report.functionAllCases
this.initAllTestCase(this.report.functionAllCases
? this.report.functionAllCases
: [];
: []);
} else if (this.isShare) {
this.loading = true;
let param = this.getStatusList();

View File

@ -158,7 +158,8 @@ export default {
this.currentPage = 1;
this.filterCases = this.allTestCase.filter(
(e) =>
e.name.includes(this.keyword) || e.customNum.includes(this.keyword)
(e.name && e.name.includes(this.keyword))
|| (e.num + '').includes(this.keyword)
);
this.handlePageChange(this.currentPage);
},