From 8e5d4572da7134511b8858e4be209462c061adc0 Mon Sep 17 00:00:00 2001 From: junjun Date: Wed, 16 Nov 2022 18:05:29 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E8=A7=86=E5=9B=BE):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=98=8E=E7=BB=86=E8=A1=A8=E5=88=86=E9=A1=B5=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E7=9A=84=E8=A7=86=E5=9B=BE=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/dataease/service/chart/ChartViewService.java | 2 +- frontend/src/components/canvas/customComponent/UserView.vue | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/src/main/java/io/dataease/service/chart/ChartViewService.java b/backend/src/main/java/io/dataease/service/chart/ChartViewService.java index 34b5601182..32d6f0f62d 100644 --- a/backend/src/main/java/io/dataease/service/chart/ChartViewService.java +++ b/backend/src/main/java/io/dataease/service/chart/ChartViewService.java @@ -908,7 +908,7 @@ public class ChartViewService { if (StringUtils.equalsIgnoreCase(table.getType(), DatasetType.DB.name())) { datasourceRequest.setTable(dataTableInfoDTO.getTable()); if (StringUtils.equalsAnyIgnoreCase(view.getType(), "text", "gauge", "liquid")) { - datasourceRequest.setQuery(qp.getSQLSummary(dataTableInfoDTO.getTable(), yAxis, fieldCustomFilter, rowPermissionsTree, extFilterList, view, ds)); + querySql = qp.getSQLSummary(dataTableInfoDTO.getTable(), yAxis, fieldCustomFilter, rowPermissionsTree, extFilterList, view, ds); } else if (StringUtils.containsIgnoreCase(view.getType(), "stack")) { querySql = qp.getSQLStack(dataTableInfoDTO.getTable(), xAxis, yAxis, fieldCustomFilter, rowPermissionsTree, extFilterList, extStack, ds, view); } else if (StringUtils.containsIgnoreCase(view.getType(), "scatter")) { diff --git a/frontend/src/components/canvas/customComponent/UserView.vue b/frontend/src/components/canvas/customComponent/UserView.vue index f6a0cd6c92..cfedd58b54 100644 --- a/frontend/src/components/canvas/customComponent/UserView.vue +++ b/frontend/src/components/canvas/customComponent/UserView.vue @@ -640,7 +640,7 @@ export default { }, viewInCache(param) { this.view = param.view - if (this.view.customAttr) { + if (this.view && this.view.customAttr) { this.currentPage.pageSize = parseInt(JSON.parse(this.view.customAttr).size.tablePageSize) } param.viewId && param.viewId === this.element.propValue.viewId && this.getDataEdit(param) @@ -703,7 +703,7 @@ export default { requestInfo.proxy = { userId: this.panelInfo.proxy } } // table-info明细表增加分页 - if (this.view.customAttr) { + if (this.view && this.view.customAttr) { const attrSize = JSON.parse(this.view.customAttr).size if (this.chart.type === 'table-info' && this.view.datasetMode === 0 && (!attrSize.tablePageMode || attrSize.tablePageMode === 'page')) { requestInfo.goPage = this.currentPage.page @@ -1162,7 +1162,7 @@ export default { queryFrom: 'panel' } // table-info明细表增加分页 - if (this.view.customAttr) { + if (this.view && this.view.customAttr) { const attrSize = JSON.parse(this.view.customAttr).size if (this.chart.type === 'table-info' && this.view.datasetMode === 0 && (!attrSize.tablePageMode || attrSize.tablePageMode === 'page')) { requestInfo.goPage = this.currentPage.page