Browse Source

【报表】查询后总计bug处理

faster_AG_grid
安虹睿 1 year ago
parent
commit
ed84062f4e
  1. 8
      PC/UI.WinIn.FasterZ.AgGridReport/src/components/AgTable/index.vue

8
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();

Loading…
Cancel
Save