From b29d261c58137865d5c5e34c35599a557280bf89 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Mon, 22 Apr 2024 13:38:53 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9C=AA=E6=89=A7=E8=A1=8C=E7=9A=84=E7=94=A8?= =?UTF-8?q?=E4=BE=8B=E6=B2=A1=E6=9C=89=E7=8A=B6=E6=80=81=E7=9A=84=E7=BC=BA?= =?UTF-8?q?=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/dto/definition/ApiReportStepDTO.java | 3 ++- .../api/service/definition/ApiReportService.java | 2 +- .../report/component/step/reportInfoHeaders.vue | 12 ++++-------- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/dto/definition/ApiReportStepDTO.java b/backend/services/api-test/src/main/java/io/metersphere/api/dto/definition/ApiReportStepDTO.java index a2585124b1..3f185fd0d2 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/dto/definition/ApiReportStepDTO.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/dto/definition/ApiReportStepDTO.java @@ -1,5 +1,6 @@ package io.metersphere.api.dto.definition; +import io.metersphere.sdk.constants.ApiReportStatus; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; @@ -21,7 +22,7 @@ public class ApiReportStepDTO { private String stepType; @Schema(description = "结果状态") - private String status; + private String status = ApiReportStatus.PENDING.name(); @Schema(description = "误报编号/误报状态独有") private String fakeCode; diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiReportService.java b/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiReportService.java index 4b30baa9b7..96b7226c40 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiReportService.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiReportService.java @@ -140,7 +140,7 @@ public class ApiReportService { private ApiReport checkResource(String id) { ApiReportExample example = new ApiReportExample(); - example.createCriteria().andIdEqualTo(id).andDeletedEqualTo(false); + example.createCriteria().andIdEqualTo(id); List apiReport = apiReportMapper.selectByExample(example); if (CollectionUtils.isEmpty(apiReport)) { throw new MSException(Translator.get("api_case_report_not_exist")); diff --git a/frontend/src/views/api-test/report/component/step/reportInfoHeaders.vue b/frontend/src/views/api-test/report/component/step/reportInfoHeaders.vue index 7640855a65..ec3a5a9aac 100644 --- a/frontend/src/views/api-test/report/component/step/reportInfoHeaders.vue +++ b/frontend/src/views/api-test/report/component/step/reportInfoHeaders.vue @@ -94,14 +94,10 @@ value: `${key}-PENDING`, label: t(`report.detail.pendingCount`), }, - ...(key === ScenarioStepType.API_SCENARIO - ? [] - : [ - { - value: `${key}-scriptIdentifier`, - label: t(`report.detail.api.scriptError`), - }, - ]), + { + value: `${key}-scriptIdentifier`, + label: t(`report.detail.api.scriptError`), + }, ]; const cascaderOptions = ref([ {