From ed84062f4eca7ee7341f1c8617647394c2c4f521 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=89=E8=99=B9=E7=9D=BF?= <297504645@qq.com> Date: Tue, 7 Nov 2023 16:48:04 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=8A=A5=E8=A1=A8=E3=80=91=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E5=90=8E=E6=80=BB=E8=AE=A1bug=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/AgTable/index.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/PC/UI.WinIn.FasterZ.AgGridReport/src/components/AgTable/index.vue b/PC/UI.WinIn.FasterZ.AgGridReport/src/components/AgTable/index.vue index 5689f93..6f3418f 100644 --- a/PC/UI.WinIn.FasterZ.AgGridReport/src/components/AgTable/index.vue +++ b/PC/UI.WinIn.FasterZ.AgGridReport/src/components/AgTable/index.vue @@ -116,12 +116,15 @@ export default { }, // 总计 setTableTotal(gridApi) { + // 设置页码器 + let _pageData = this.getCurrentPageData(gridApi) + this.pageTotal = this.allPageData.length + // 设置底部汇总 if(!this.BottomFixedItem || this.BottomFixedItem.length <= 0)return let result = [{}] this.BottomFixedItem.forEach(item=>{ result[0][item] = 0 }) - let _pageData = this.getCurrentPageData(gridApi) _pageData.forEach((item,key) => { for(let o in item){ if(this.BottomFixedItem.indexOf(o) >= 0){ @@ -129,7 +132,6 @@ export default { } } }); - console.log(132,result) // 平均值的特殊处理 if(this.averageFixedItem){ for(let i in result[0]){ @@ -138,7 +140,6 @@ export default { } } } - this.pageTotal = this.allPageData.length this.gridApi.setPinnedBottomRowData(result); }, // 设置表格高度 @@ -151,6 +152,7 @@ export default { }, // 更新table值 updateTableData(data){ + this.currentPage = 1 this.gridApi.setRowData(data) this.setTableTotal(this.gridApi) this.gridApi.resetRowHeights();