From 6c0dcb5e7dabb8e1e62533db7f677211dd13ddee Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Wed, 9 Mar 2022 16:28:54 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E5=BC=80=E5=90=AF=E5=85=81?= =?UTF-8?q?=E8=AE=B8=E9=87=8D=E5=A4=8D=E5=90=8E=EF=BC=8C=E5=85=B3=E8=81=94?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=B2=A1=E6=9C=89=E8=BF=87=E6=BB=A4=E6=8E=89?= =?UTF-8?q?case=E4=B8=BA=E7=A9=BA=E7=9A=84=E6=8E=A5=E5=8F=A3=20--bug=3D101?= =?UTF-8?q?0731=20--user=3D=E9=99=88=E5=BB=BA=E6=98=9F=20=E3=80=90?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E3=80=91-=E5=BC=80?= =?UTF-8?q?=E5=90=AF=E5=85=81=E8=AE=B8=E5=85=B3=E8=81=94=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E7=94=A8=E4=BE=8B-=E8=AF=A5=E8=AE=A1=E5=88=92=E5=85=B3?= =?UTF-8?q?=E8=81=94=E6=8E=A5=E5=8F=A3=E7=94=A8=E4=BE=8B=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=98=BE=E7=A4=BA=E4=BA=86=E5=85=A8=E9=83=A8?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3-=E8=BF=99=E4=BA=9B=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E9=83=BD=E6=B2=A1=E6=9C=89CASE=20https://www.tapd.cn/55049933/?= =?UTF-8?q?s/1115706?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../base/mapper/ext/ExtApiDefinitionMapper.xml | 3 +++ .../api/automation/report/ApiReportDetail.vue | 8 +++++++- .../detail/component/ApiScenarioFailureResult.vue | 12 ++++++++++-- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionMapper.xml index 0e10d8c4b4..f0d9bc9ffd 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionMapper.xml @@ -480,6 +480,9 @@ ) ) + + and api_definition.case_total is not null and api_definition.case_total > 0 + diff --git a/frontend/src/business/components/api/automation/report/ApiReportDetail.vue b/frontend/src/business/components/api/automation/report/ApiReportDetail.vue index f0c24735fb..2fa37f1b88 100644 --- a/frontend/src/business/components/api/automation/report/ApiReportDetail.vue +++ b/frontend/src/business/components/api/automation/report/ApiReportDetail.vue @@ -327,15 +327,21 @@ export default { this.buildReport(); } else if (this.isShare) { getShareScenarioReport(this.shareId, this.reportId, (data) => { + this.checkReport(data); this.handleGetScenarioReport(data); }); } else { getScenarioReport(this.reportId, (data) => { + this.checkReport(data); this.handleGetScenarioReport(data); }); } }, - + checkReport(data) { + if (!data) { + this.$emit('reportNotExist'); + } + }, handleGetScenarioReport(data) { if (data) { this.report = data; diff --git a/frontend/src/business/components/track/plan/view/comonents/report/detail/component/ApiScenarioFailureResult.vue b/frontend/src/business/components/track/plan/view/comonents/report/detail/component/ApiScenarioFailureResult.vue index 892a4fff97..7c3de7e27e 100644 --- a/frontend/src/business/components/track/plan/view/comonents/report/detail/component/ApiScenarioFailureResult.vue +++ b/frontend/src/business/components/track/plan/view/comonents/report/detail/component/ApiScenarioFailureResult.vue @@ -57,8 +57,16 @@ - +
{{ $t('test_track.plan.load_case.content_empty') }}