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())) {
|
if (StringUtils.equalsIgnoreCase(table.getType(), DatasetType.DB.name())) {
|
||||||
datasourceRequest.setTable(dataTableInfoDTO.getTable());
|
datasourceRequest.setTable(dataTableInfoDTO.getTable());
|
||||||
if (StringUtils.equalsAnyIgnoreCase(view.getType(), "text", "gauge", "liquid")) {
|
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")) {
|
} else if (StringUtils.containsIgnoreCase(view.getType(), "stack")) {
|
||||||
querySql = qp.getSQLStack(dataTableInfoDTO.getTable(), xAxis, yAxis, fieldCustomFilter, rowPermissionsTree, extFilterList, extStack, ds, view);
|
querySql = qp.getSQLStack(dataTableInfoDTO.getTable(), xAxis, yAxis, fieldCustomFilter, rowPermissionsTree, extFilterList, extStack, ds, view);
|
||||||
} else if (StringUtils.containsIgnoreCase(view.getType(), "scatter")) {
|
} else if (StringUtils.containsIgnoreCase(view.getType(), "scatter")) {
|
||||||
|
@ -640,7 +640,7 @@ export default {
|
|||||||
},
|
},
|
||||||
viewInCache(param) {
|
viewInCache(param) {
|
||||||
this.view = param.view
|
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)
|
this.currentPage.pageSize = parseInt(JSON.parse(this.view.customAttr).size.tablePageSize)
|
||||||
}
|
}
|
||||||
param.viewId && param.viewId === this.element.propValue.viewId && this.getDataEdit(param)
|
param.viewId && param.viewId === this.element.propValue.viewId && this.getDataEdit(param)
|
||||||
@ -703,7 +703,7 @@ export default {
|
|||||||
requestInfo.proxy = { userId: this.panelInfo.proxy }
|
requestInfo.proxy = { userId: this.panelInfo.proxy }
|
||||||
}
|
}
|
||||||
// table-info明细表增加分页
|
// table-info明细表增加分页
|
||||||
if (this.view.customAttr) {
|
if (this.view && this.view.customAttr) {
|
||||||
const attrSize = JSON.parse(this.view.customAttr).size
|
const attrSize = JSON.parse(this.view.customAttr).size
|
||||||
if (this.chart.type === 'table-info' && this.view.datasetMode === 0 && (!attrSize.tablePageMode || attrSize.tablePageMode === 'page')) {
|
if (this.chart.type === 'table-info' && this.view.datasetMode === 0 && (!attrSize.tablePageMode || attrSize.tablePageMode === 'page')) {
|
||||||
requestInfo.goPage = this.currentPage.page
|
requestInfo.goPage = this.currentPage.page
|
||||||
@ -1162,7 +1162,7 @@ export default {
|
|||||||
queryFrom: 'panel'
|
queryFrom: 'panel'
|
||||||
}
|
}
|
||||||
// table-info明细表增加分页
|
// table-info明细表增加分页
|
||||||
if (this.view.customAttr) {
|
if (this.view && this.view.customAttr) {
|
||||||
const attrSize = JSON.parse(this.view.customAttr).size
|
const attrSize = JSON.parse(this.view.customAttr).size
|
||||||
if (this.chart.type === 'table-info' && this.view.datasetMode === 0 && (!attrSize.tablePageMode || attrSize.tablePageMode === 'page')) {
|
if (this.chart.type === 'table-info' && this.view.datasetMode === 0 && (!attrSize.tablePageMode || attrSize.tablePageMode === 'page')) {
|
||||||
requestInfo.goPage = this.currentPage.page
|
requestInfo.goPage = this.currentPage.page
|
||||||
|
Loading…
Reference in New Issue
Block a user