From 78957eac22fce66ada1638cbec33c8df363f0ece Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Tue, 1 Nov 2022 18:44:21 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix(=E8=A7=86=E5=9B=BE):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=AF=BC=E5=87=BA=E8=A7=86=E5=9B=BExlsx=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=9C=A8mac=E4=B8=8A=E7=9A=84Excel=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E6=89=93=E5=BC=80=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dataease/service/panel/PanelGroupService.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/backend/src/main/java/io/dataease/service/panel/PanelGroupService.java b/backend/src/main/java/io/dataease/service/panel/PanelGroupService.java index 4e44e60753..a32f624813 100644 --- a/backend/src/main/java/io/dataease/service/panel/PanelGroupService.java +++ b/backend/src/main/java/io/dataease/service/panel/PanelGroupService.java @@ -40,6 +40,7 @@ import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; import org.apache.poi.hssf.usermodel.*; import org.apache.poi.ss.usermodel.*; +import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.pentaho.di.core.util.UUIDUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -621,9 +622,9 @@ public class PanelGroupService { List details = request.getDetails(); Integer[] excelTypes = request.getExcelTypes(); details.add(0, request.getHeader()); - HSSFWorkbook wb = new HSSFWorkbook(); + Workbook wb = new XSSFWorkbook(); //明细sheet - HSSFSheet detailsSheet = wb.createSheet("数据"); + Sheet detailsSheet = wb.createSheet("数据"); //给单元格设置样式 CellStyle cellStyle = wb.createCellStyle(); @@ -641,11 +642,11 @@ public class PanelGroupService { if (CollectionUtils.isNotEmpty(details)) { for (int i = 0; i < details.size(); i++) { - HSSFRow row = detailsSheet.createRow(i); + Row row = detailsSheet.createRow(i); String[] rowData = details.get(i); if (rowData != null) { for (int j = 0; j < rowData.length; j++) { - HSSFCell cell = row.createCell(j); + Cell cell = row.createCell(j); if (i == 0) {// 头部 cell.setCellValue(rowData[j]); cell.setCellStyle(cellStyle); @@ -669,14 +670,14 @@ public class PanelGroupService { } if (StringUtils.isNotEmpty(snapshot)) { //截图sheet 1px ≈ 2.33dx ≈ 0.48 dy 8*24 个单元格 - HSSFSheet snapshotSheet = wb.createSheet("图表"); + Sheet snapshotSheet = wb.createSheet("图表"); short reDefaultRowHeight = (short) Math.round(request.getSnapshotHeight() * 3.5 / 8); int reDefaultColumnWidth = (int) Math.round(request.getSnapshotWidth() * 0.25 / 24); snapshotSheet.setDefaultColumnWidth(reDefaultColumnWidth); snapshotSheet.setDefaultRowHeight(reDefaultRowHeight); //画图的顶级管理器,一个sheet只能获取一个(一定要注意这点)i - HSSFPatriarch patriarch = snapshotSheet.createDrawingPatriarch(); + Drawing patriarch = snapshotSheet.createDrawingPatriarch(); HSSFClientAnchor anchor = new HSSFClientAnchor(0, 0, reDefaultColumnWidth, reDefaultColumnWidth, (short) 0, 0, (short) 8, 24); anchor.setAnchorType(ClientAnchor.AnchorType.DONT_MOVE_DO_RESIZE); patriarch.createPicture(anchor, wb.addPicture(Base64Utils.decodeFromString(snapshot.replace(DATA_URL_TITLE, "")), HSSFWorkbook.PICTURE_TYPE_JPEG)); From 1af415f69bf8da020175345a769a43b9e9f9c4bc Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Tue, 1 Nov 2022 21:48:38 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8DTab=E7=BB=84=E4=BB=B6=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E6=B6=88=E5=A4=B1=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/widget/DeWidget/DeTabs.vue | 57 ++++++++++++++++--- frontend/src/store/index.js | 3 - 2 files changed, 49 insertions(+), 11 deletions(-) diff --git a/frontend/src/components/widget/DeWidget/DeTabs.vue b/frontend/src/components/widget/DeWidget/DeTabs.vue index 865f1e8ed8..b4f635e8ae 100644 --- a/frontend/src/components/widget/DeWidget/DeTabs.vue +++ b/frontend/src/components/widget/DeWidget/DeTabs.vue @@ -3,6 +3,8 @@ class="de-tabs-div" :class="headClass" > +
+
diff --git a/frontend/src/store/index.js b/frontend/src/store/index.js index 9396868b96..f6a2031416 100644 --- a/frontend/src/store/index.js +++ b/frontend/src/store/index.js @@ -206,9 +206,6 @@ const data = { } state.styleChangeTimes = 0 state.curComponent = component - if (index !== null && !isNaN(index)) { - state.componentData.splice(index, 1, component) - } state.curComponentIndex = index },