fix(图表): 修复明细表设置常规翻页后,切换每页显示条目数后点击翻页,每页显示条目数恢复默认的问题

This commit is contained in:
ulleo 2024-06-28 14:56:38 +08:00
parent 548d2c89b0
commit 56a55e2a44

View File

@ -109,6 +109,14 @@ const containerId = 'container-' + showPosition.value + '-' + view.value.id
const viewTrack = ref(null)
const calcData = (view: Chart, callback, resetPageInfo = true) => {
if (view.customAttr.basicStyle.tablePageStyle === 'general') {
if (state.currentPageSize !== 0) {
view.chartExtRequest.pageSize = state.currentPageSize
}
} else {
delete view.chartExtRequest.pageSize
}
console.log(view)
if (view.tableId || view['dataFrom'] === 'template') {
isError.value = false
const v = JSON.parse(JSON.stringify(view))
@ -258,6 +266,9 @@ const handleCurrentChange = pageNum => {
}
const handlePageSizeChange = pageSize => {
if (state.pageStyle === 'general') {
state.currentPageSize = pageSize
}
let extReq = { pageSize: pageSize }
if (chartExtRequest.value) {
extReq = { ...extReq, ...chartExtRequest.value }