From f4aaccee4aa533912a0e618b7c3c599f4c674609 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Wed, 13 Apr 2022 15:06:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=85=A8=E9=87=8F=E5=88=A0=E9=99=A4UI?= =?UTF-8?q?=E6=8A=A5=E5=91=8A=E4=BC=9A=E5=88=A0=E9=99=A4=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E6=8A=A5=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/service/ApiScenarioReportStructureService.java | 4 ++-- .../base/mapper/ext/ExtApiScenarioReportMapper.xml | 9 +++++++++ .../components/api/automation/report/ApiReportList.vue | 1 + 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/metersphere/api/service/ApiScenarioReportStructureService.java b/backend/src/main/java/io/metersphere/api/service/ApiScenarioReportStructureService.java index 0336dda36f..8eab90a013 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiScenarioReportStructureService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiScenarioReportStructureService.java @@ -169,7 +169,8 @@ public class ApiScenarioReportStructureService { StepTreeDTO children = new StepTreeDTO(element.getString("name"), resourceId, element.getString("type"), resourceId, element.getIntValue("index")); if (StringUtils.isNotBlank(children.getType()) && children.getType().equals("MsUiCommand")) { children.setResourceId(resourceId); - children.setLabel(element.getString("command")); + children.setLabel(element.getString("name")); + children.setCmdType(element.getString("commandType")); } else if (StringUtils.isNotEmpty(dto.getAllIndex())) { children.setAllIndex(dto.getAllIndex() + "_" + (children.getIndex() == 0 ? (i + 1) : children.getIndex())); children.setResourceId(resourceId + "_" + children.getAllIndex()); @@ -177,7 +178,6 @@ public class ApiScenarioReportStructureService { children.setAllIndex("" + (children.getIndex() == 0 ? (i + 1) : children.getIndex())); children.setResourceId(resourceId + "_" + children.getAllIndex()); } - children.setCmdType(element.getString("commandType")); dto.getChildren().add(children); if (element.containsKey("hashTree") && !requests.contains(children.getType())) { JSONArray elementJSONArray = element.getJSONArray("hashTree"); diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiScenarioReportMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiScenarioReportMapper.xml index 4d9dd8b250..fc6ff47e01 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiScenarioReportMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiScenarioReportMapper.xml @@ -261,6 +261,15 @@ AND r.project_id = #{request.projectId} + + + AND r.report_type like 'UI%' + + + + AND r.report_type not like 'UI%' + + diff --git a/frontend/src/business/components/api/automation/report/ApiReportList.vue b/frontend/src/business/components/api/automation/report/ApiReportList.vue index 9e3deb6829..7061d223b9 100644 --- a/frontend/src/business/components/api/automation/report/ApiReportList.vue +++ b/frontend/src/business/components/api/automation/report/ApiReportList.vue @@ -379,6 +379,7 @@ export default { sendParam.selectAllDate = this.isSelectAllDate; sendParam.unSelectIds = this.unSelection; sendParam = Object.assign(sendParam, this.condition); + sendParam.isUi = this.isUI; this.$post('/api/scenario/report/batch/delete', sendParam, () => { this.selectRows.clear(); this.$success(this.$t('commons.delete_success'));