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 2fcc553..0cd917a 100644
--- a/PC/UI.WinIn.FasterZ.AgGridReport/src/components/AgTable/index.vue
+++ b/PC/UI.WinIn.FasterZ.AgGridReport/src/components/AgTable/index.vue
@@ -47,6 +47,11 @@ export default {
type:Array,
default:[]
},
+ // 底部汇总配置-平均值
+ averageFixedItem:{
+ type: Array,
+ default: null
+ },
},
data () {
return {
@@ -62,7 +67,7 @@ export default {
autoHeight:true
},
tableHeight:null,
- pageSizes:[10, 100, 300, 500, 1000, 3000, 5000, 10000],
+ pageSizes:[10, 20,100, 300, 500, 1000, 3000, 5000, 10000],
pageTotal:null,
currentPage:1,
currentPageSize:100,
@@ -116,15 +121,19 @@ export default {
let _pageData = this.getCurrentPageData(gridApi)
_pageData.forEach((item,key) => {
for(let o in item){
- // if(o == '合格率'){
- // // 百分比的特殊处理
- // }
if(this.BottomFixedItem.indexOf(o) >= 0){
result[0][o] += item[o]
}
}
});
- console.log(127,result)
+ // 平均值的特殊处理
+ if(this.averageFixedItem){
+ for(let i in result[0]){
+ if(this.averageFixedItem.indexOf(i) >= 0){
+ result[0][i] = result[0][i]/_pageData.length
+ }
+ }
+ }
this.pageTotal = this.allPageData.length
this.gridApi.setPinnedBottomRowData(result);
},
@@ -132,6 +141,7 @@ export default {
setTableHeight(){
let _headerH = document.getElementsByClassName('reportPageHeader')[0].clientHeight
let _footH = 50;
+
let _outH = _headerH + _footH
this.tableHeight = `calc(100vh - ${_outH}px)`
},
diff --git a/PC/UI.WinIn.FasterZ.AgGridReport/src/components/exportExcel/index.vue b/PC/UI.WinIn.FasterZ.AgGridReport/src/components/exportExcel/index.vue
index 37f2d0a..ab9f355 100644
--- a/PC/UI.WinIn.FasterZ.AgGridReport/src/components/exportExcel/index.vue
+++ b/PC/UI.WinIn.FasterZ.AgGridReport/src/components/exportExcel/index.vue
@@ -1,10 +1,17 @@
- 导出数据
+
+ 导出数据
+
\ No newline at end of file