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([ {