forked from github/dataease
Merge pull request #3771 from dataease/pr@dev@fix_table
fix(视图): 修复明细表分页导致的视图异常
This commit is contained in:
commit
2ccc2492be
@ -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")) {
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user