Merge pull request #6838 from dataease/pr@dev@fix_table_page_size_change

fix(视图-明细表): 修复非直连模式下明细表分页由小变大不显示数据
This commit is contained in:
wisonic-s 2023-11-24 15:39:01 +08:00 committed by GitHub
commit 26533c0143
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -254,6 +254,9 @@ export default {
if (this.chart.data && this.chart.data.fields) { if (this.chart.data && this.chart.data.fields) {
this.fields = JSON.parse(JSON.stringify(this.chart.data.fields)) this.fields = JSON.parse(JSON.stringify(this.chart.data.fields))
const attr = JSON.parse(this.chart.customAttr) const attr = JSON.parse(this.chart.customAttr)
if (this.currentPage.pageSize < attr.size.tablePageSize) {
this.currentPage.page = 1
}
this.currentPage.pageSize = parseInt(attr.size.tablePageSize ? attr.size.tablePageSize : 20) this.currentPage.pageSize = parseInt(attr.size.tablePageSize ? attr.size.tablePageSize : 20)
data = JSON.parse(JSON.stringify(this.chart.data.tableRow)) data = JSON.parse(JSON.stringify(this.chart.data.tableRow))
if (this.chart.datasetMode === 0 && !NOT_SUPPORT_PAGE_DATASET.includes(this.chart.datasourceType)) { if (this.chart.datasetMode === 0 && !NOT_SUPPORT_PAGE_DATASET.includes(this.chart.datasourceType)) {

View File

@ -294,6 +294,9 @@ export default {
} }
this.fields = fields this.fields = fields
const attr = JSON.parse(this.chart.customAttr) const attr = JSON.parse(this.chart.customAttr)
if (this.currentPage.pageSize < attr.size.tablePageSize) {
this.currentPage.page = 1
}
this.currentPage.pageSize = parseInt(attr.size.tablePageSize ? attr.size.tablePageSize : 20) this.currentPage.pageSize = parseInt(attr.size.tablePageSize ? attr.size.tablePageSize : 20)
// column width // column width