From 8ef998b03b56ff36e84658509112a4599270f8fc Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Mon, 3 Jun 2024 12:14:27 +0800 Subject: [PATCH] =?UTF-8?q?fix(X-Pack):=20=E5=AE=9A=E6=97=B6=E6=8A=A5?= =?UTF-8?q?=E5=91=8A=E5=AF=BC=E5=87=BA=E8=A7=86=E5=9B=BE=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E7=9B=B8=E5=90=8C=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../manage/CoreVisualizationExportManage.java | 10 +++++++--- de-xpack | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/core/core-backend/src/main/java/io/dataease/visualization/manage/CoreVisualizationExportManage.java b/core/core-backend/src/main/java/io/dataease/visualization/manage/CoreVisualizationExportManage.java index 4f53fb57a0..6a263eabc5 100644 --- a/core/core-backend/src/main/java/io/dataease/visualization/manage/CoreVisualizationExportManage.java +++ b/core/core-backend/src/main/java/io/dataease/visualization/manage/CoreVisualizationExportManage.java @@ -54,14 +54,18 @@ public class CoreVisualizationExportManage { } if (CollectionUtils.isEmpty(chartViewDTOS)) return null; Map chartExtRequestMap = buildViewRequest(visualization, onlyDisplay); - List sheets = chartViewDTOS.stream().map(view -> { + List sheets = new ArrayList<>(); + for (int i = 0; i < chartViewDTOS.size(); i++) { + ChartViewDTO view = chartViewDTOS.get(i); ChartExtRequest extRequest = chartExtRequestMap.get(view.getId().toString()); if (ObjectUtils.isNotEmpty(extRequest)) { view.setChartExtRequest(extRequest); } view.getChartExtRequest().setUser(AuthUtils.getUser().getUserId()); - return exportViewData(view); - }).toList(); + view.setTitle((i + 1) + "-" + view.getTitle()); + sheets.add(exportViewData(view)); + } + return VisualizationExcelUtils.exportExcel(sheets, visualization.getName(), visualization.getId().toString()); } diff --git a/de-xpack b/de-xpack index e22c8ef0d9..0cf469c20f 160000 --- a/de-xpack +++ b/de-xpack @@ -1 +1 @@ -Subproject commit e22c8ef0d999bdf902fd8b5f537c0830d5261b7a +Subproject commit 0cf469c20f184e57c2e7e88e99896b2f6baed265