Commit 7ed7865d authored by danfuman's avatar danfuman

修改

parent 55f0b416
......@@ -218,7 +218,7 @@
border
show-summary
max-height="280"
:summary-method="getSummaries"
:summary-method="getSummaries1"
fit
highlight-current-row
:default-sort = "{prop: 'count', order: 'descending'}"
......@@ -277,16 +277,7 @@
created() {
this.dataRegion()
this.yearsData()
setTimeout(() => {
this.getCountBidByType()
this.getCountBidGroupByProvince()
this.getRangeBidMoney()
this.getRangeBidFiveYears()
this.getLowerRateByYear()
this.getLowerRangeTenderType()
this.isSkeleton=false;
}, 1500);
this.getCountBidByType()
},
mounted() {
},
......@@ -299,12 +290,18 @@
yearStr:this.years.join(",")
}
countBidByType(params).then(res => {
this.isSkeleton=false;
this.xmtjList=res.data.date;
if(res.data){
this.$nextTick(() => {
this.initChart1(res.data.date)
})
}
this.getCountBidGroupByProvince()
this.getRangeBidMoney()
this.getRangeBidFiveYears()
this.getLowerRateByYear()
this.getLowerRangeTenderType()
})
},
getCountBidGroupByProvince(){
......@@ -390,7 +387,7 @@
}
}
this.xmxflList=res.data;
if(res.data){
if(this.xmxflList){
this.$nextTick(() => {
this.initChart6(this.xmxflList)
})
......@@ -949,8 +946,8 @@
case 2:
this.getCountBidGroupByProvince()
break;
case 4:
this.getRangeBidFiveYears()
case 3:
this.getRangeBidMoney()
break;
case 5:
this.getLowerRateByYear()
......@@ -1005,6 +1002,35 @@
});
return sums;
},
getSummaries1(param){
const { columns, data } = param;
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计';
return;
}
if (index === 1) {
sums[index] = '-';
return;
}
const values = data.map(item => Number(item[column.property]));
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return Number(prev) + Number(curr)
} else {
return prev;
}
}, 0);
if (index === 2||index === 3||index === 4) {
sums[index] = Number(sums[index]).toFixed(2);
return;
}
});
return sums;
},
}
}
......@@ -1153,10 +1179,10 @@
}
.has-gutter{
tr{
th:nth-child(4){
th:nth-last-child(2){
border-right:0;
}
td:nth-child(4){
td:nth-last-child(2){
border-right:0;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment