|
|
@ -57,7 +57,7 @@ |
|
|
|
:page-size="demand.pageSize" |
|
|
|
:total="demand.total" |
|
|
|
background |
|
|
|
layout="prev, pager, next" |
|
|
|
layout="prev, pager, next,total" |
|
|
|
@current-change="handlePageNoChange_demand"> |
|
|
|
</el-pagination> |
|
|
|
</div> |
|
|
@ -327,6 +327,7 @@ export default { |
|
|
|
element.label = { |
|
|
|
show: true, |
|
|
|
|
|
|
|
|
|
|
|
}; |
|
|
|
element.labelLine = { |
|
|
|
show: true, |
|
|
@ -353,6 +354,7 @@ export default { |
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
this.pieOption.series[1].data = this.pieData |
|
|
|
|
|
|
|
this.$refs.pieChart.setOption(this.pieOption) |
|
|
@ -379,14 +381,18 @@ export default { |
|
|
|
|
|
|
|
this.pieData.forEach((item, index) => { |
|
|
|
item.name = item.categoryName |
|
|
|
debugger |
|
|
|
|
|
|
|
let aa = parseInt(item.count) / parseInt(this.pieTotal) |
|
|
|
let percent = new Number(parseInt(item.count) / parseInt(this.pieTotal)).toFixed(4) * 100 + '%' |
|
|
|
|
|
|
|
let percent = (aa * 100).toFixed(1) |
|
|
|
|
|
|
|
// percent = percent + '%' |
|
|
|
|
|
|
|
item.value = percent |
|
|
|
this.colorArray.push(item.color) |
|
|
|
|
|
|
|
if (item.value > maxValue) { |
|
|
|
maxValue = item.value |
|
|
|
if (item.count > maxValue) { |
|
|
|
maxValue = item.count |
|
|
|
maxIndex = index |
|
|
|
item.selected = true |
|
|
|
} else if (index !== 0) { |
|
|
@ -395,7 +401,7 @@ export default { |
|
|
|
|
|
|
|
}); |
|
|
|
// 获取pieChart配置 |
|
|
|
this.pieOption = pieOption(this.pieChartS) |
|
|
|
this.pieOption = pieOption(this.pieChartS, this.pieData) |
|
|
|
this.pieOption.title.text = this.pieTotal |
|
|
|
this.pieOption.series[1].itemStyle = { |
|
|
|
color: function (params) { |
|
|
@ -453,6 +459,7 @@ export default { |
|
|
|
this.demand.loading = false; |
|
|
|
|
|
|
|
if (code === 0) { |
|
|
|
|
|
|
|
this.demand.total = data.total; |
|
|
|
this.tableList = data.list |
|
|
|
this.demand.list = data.list.map((item) => { |
|
|
|