From bf9d09d5397a68bcb18bc31b4378648655afb5f4 Mon Sep 17 00:00:00 2001 From: Jianguo-Genius Date: Wed, 24 Apr 2024 14:46:49 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E6=8A=A5?= =?UTF-8?q?=E5=91=8A=E4=B8=8D=E5=90=8C=E7=8A=B6=E6=80=81=E7=9A=84=E7=94=A8?= =?UTF-8?q?=E4=BE=8B=E6=B2=A1=E6=9C=89=E5=B1=95=E7=A4=BA=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../report/detail/TestPlanFunctionalReport.vue | 14 +++++++------- .../report/detail/component/FunctionalCases.vue | 3 ++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/test-track/frontend/src/business/plan/view/comonents/report/detail/TestPlanFunctionalReport.vue b/test-track/frontend/src/business/plan/view/comonents/report/detail/TestPlanFunctionalReport.vue index 518642fde9..5ad2a26f35 100644 --- a/test-track/frontend/src/business/plan/view/comonents/report/detail/TestPlanFunctionalReport.vue +++ b/test-track/frontend/src/business/plan/view/comonents/report/detail/TestPlanFunctionalReport.vue @@ -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(); diff --git a/test-track/frontend/src/business/plan/view/comonents/report/detail/component/FunctionalCases.vue b/test-track/frontend/src/business/plan/view/comonents/report/detail/component/FunctionalCases.vue index 01fad7ad3e..833ec53e7d 100644 --- a/test-track/frontend/src/business/plan/view/comonents/report/detail/component/FunctionalCases.vue +++ b/test-track/frontend/src/business/plan/view/comonents/report/detail/component/FunctionalCases.vue @@ -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); },