|
|
@ -179,7 +179,6 @@ export default { |
|
|
|
_this.$nextTick(function () { |
|
|
|
this.renderChart() |
|
|
|
this.renderCharts() |
|
|
|
this.initList() |
|
|
|
}); |
|
|
|
}, |
|
|
|
watch: { |
|
|
@ -201,7 +200,6 @@ export default { |
|
|
|
this.getCategoryAnalysis() |
|
|
|
this.getEventStat() |
|
|
|
this.getEvaluationTotal() |
|
|
|
this.initList() |
|
|
|
this.renderChart() |
|
|
|
this.renderCharts() |
|
|
|
} |
|
|
@ -243,6 +241,7 @@ export default { |
|
|
|
let { data, code, msg } = await getEventStat(parm) |
|
|
|
if (code == 0) { |
|
|
|
this.eventStatList = data |
|
|
|
this.initList(data) |
|
|
|
if(this.eventStatList.length === 0){ |
|
|
|
this.noData = true |
|
|
|
} |
|
|
@ -502,27 +501,28 @@ export default { |
|
|
|
} |
|
|
|
}, 5000) |
|
|
|
}, |
|
|
|
initList() { |
|
|
|
initList(data) { |
|
|
|
// 民生诉求总数 |
|
|
|
if(this.eventStatList.length === 0)return |
|
|
|
this.totalLivelihoodCount = this.eventStatList.reduce((sum, element) => { |
|
|
|
if(data.length === 0) return |
|
|
|
this.totalLivelihoodCount = data.reduce((sum, element) => { |
|
|
|
return sum + element.livelihoodCount; |
|
|
|
}, 0); |
|
|
|
// 发展诉求总数 |
|
|
|
this.developCountTotal = this.eventStatList.reduce((sum, element) => { |
|
|
|
this.developCountTotal = data.reduce((sum, element) => { |
|
|
|
return sum + element.developCount; |
|
|
|
}, 0); |
|
|
|
//执法诉求总数 |
|
|
|
this.lawCountCountTotal = this.eventStatList.reduce((sum, element) => { |
|
|
|
this.lawCountCountTotal = data.reduce((sum, element) => { |
|
|
|
return sum + element.lawCount; |
|
|
|
}, 0); |
|
|
|
this.eventStatList = this.eventStatList.map(element => [ |
|
|
|
this.eventStatList = data.map(element => [ |
|
|
|
element.deptName, |
|
|
|
element.eventCount, |
|
|
|
element.livelihoodCount, |
|
|
|
element.developCount, |
|
|
|
element.lawCount, |
|
|
|
]); |
|
|
|
console.log(this.eventStatList); |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|