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