Commit 7ed7865d authored by danfuman's avatar danfuman

修改

parent 55f0b416
...@@ -218,7 +218,7 @@ ...@@ -218,7 +218,7 @@
border border
show-summary show-summary
max-height="280" max-height="280"
:summary-method="getSummaries" :summary-method="getSummaries1"
fit fit
highlight-current-row highlight-current-row
:default-sort = "{prop: 'count', order: 'descending'}" :default-sort = "{prop: 'count', order: 'descending'}"
...@@ -277,16 +277,7 @@ ...@@ -277,16 +277,7 @@
created() { created() {
this.dataRegion() this.dataRegion()
this.yearsData() this.yearsData()
setTimeout(() => { this.getCountBidByType()
this.getCountBidByType()
this.getCountBidGroupByProvince()
this.getRangeBidMoney()
this.getRangeBidFiveYears()
this.getLowerRateByYear()
this.getLowerRangeTenderType()
this.isSkeleton=false;
}, 1500);
}, },
mounted() { mounted() {
}, },
...@@ -299,12 +290,18 @@ ...@@ -299,12 +290,18 @@
yearStr:this.years.join(",") yearStr:this.years.join(",")
} }
countBidByType(params).then(res => { countBidByType(params).then(res => {
this.isSkeleton=false;
this.xmtjList=res.data.date; this.xmtjList=res.data.date;
if(res.data){ if(res.data){
this.$nextTick(() => { this.$nextTick(() => {
this.initChart1(res.data.date) this.initChart1(res.data.date)
}) })
} }
this.getCountBidGroupByProvince()
this.getRangeBidMoney()
this.getRangeBidFiveYears()
this.getLowerRateByYear()
this.getLowerRangeTenderType()
}) })
}, },
getCountBidGroupByProvince(){ getCountBidGroupByProvince(){
...@@ -390,7 +387,7 @@ ...@@ -390,7 +387,7 @@
} }
} }
this.xmxflList=res.data; this.xmxflList=res.data;
if(res.data){ if(this.xmxflList){
this.$nextTick(() => { this.$nextTick(() => {
this.initChart6(this.xmxflList) this.initChart6(this.xmxflList)
}) })
...@@ -949,8 +946,8 @@ ...@@ -949,8 +946,8 @@
case 2: case 2:
this.getCountBidGroupByProvince() this.getCountBidGroupByProvince()
break; break;
case 4: case 3:
this.getRangeBidFiveYears() this.getRangeBidMoney()
break; break;
case 5: case 5:
this.getLowerRateByYear() this.getLowerRateByYear()
...@@ -1005,6 +1002,35 @@ ...@@ -1005,6 +1002,35 @@
}); });
return sums; 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 @@ ...@@ -1153,10 +1179,10 @@
} }
.has-gutter{ .has-gutter{
tr{ tr{
th:nth-child(4){ th:nth-last-child(2){
border-right:0; border-right:0;
} }
td:nth-child(4){ td:nth-last-child(2){
border-right:0; 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