|
@@ -29,52 +29,51 @@ export default {
|
|
|
return {
|
|
|
chart: null,
|
|
|
option: {
|
|
|
- title: {
|
|
|
- text:'泄漏量',
|
|
|
- left: 'center'
|
|
|
- },
|
|
|
- tooltip: {
|
|
|
- trigger: 'item',
|
|
|
+ title: {
|
|
|
+ text: '泄漏量',
|
|
|
+ left: 'center'
|
|
|
+ },
|
|
|
+ tooltip: {
|
|
|
+ trigger: 'item',
|
|
|
formatter: '{a} <br/>{b} : {c} ({d}%)'
|
|
|
- },
|
|
|
- legend: {
|
|
|
- orient: 'vertical',
|
|
|
+ },
|
|
|
+ legend: {
|
|
|
+ orient: 'vertical',
|
|
|
left: 'left',
|
|
|
data: []
|
|
|
- },
|
|
|
- toolbox: {
|
|
|
- show: true,
|
|
|
+ },
|
|
|
+ toolbox: {
|
|
|
+ show: true,
|
|
|
feature: {
|
|
|
- mark: {show: true},
|
|
|
- magicType: {
|
|
|
- show: true,
|
|
|
+ mark: {show: true},
|
|
|
+ magicType: {
|
|
|
+ show: true,
|
|
|
type: ['funnel']
|
|
|
- },
|
|
|
- restore: {show: true},
|
|
|
- saveAsImage: {show: true}
|
|
|
- }
|
|
|
- },
|
|
|
- series: [
|
|
|
- {
|
|
|
- label: {
|
|
|
- formatter: '{b}: ({d}%)'
|
|
|
- },
|
|
|
- name: '泄漏量',
|
|
|
- type: 'pie',
|
|
|
- radius: ['40%', '60%'],
|
|
|
- selectedMode: 'single',
|
|
|
- data: [
|
|
|
- ],
|
|
|
- emphasis: {
|
|
|
+ },
|
|
|
+ restore: {show: true},
|
|
|
+ saveAsImage: {show: true}
|
|
|
+ }
|
|
|
+ },
|
|
|
+ series: [
|
|
|
+ {
|
|
|
label: {
|
|
|
- show: true,
|
|
|
- fontSize: '13',
|
|
|
- fontWeight: 'bold'
|
|
|
- }
|
|
|
- },
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
+ formatter: '{b}: ({d}%)'
|
|
|
+ },
|
|
|
+ name: '泄漏量',
|
|
|
+ type: 'pie',
|
|
|
+ radius: ['40%', '60%'],
|
|
|
+ selectedMode: 'single',
|
|
|
+ data: [],
|
|
|
+ emphasis: {
|
|
|
+ label: {
|
|
|
+ show: true,
|
|
|
+ fontSize: '13',
|
|
|
+ fontWeight: 'bold'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
@@ -88,13 +87,16 @@ export default {
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
- if (flag && ((this.plantName != '合计' && this.plantName == this.pointList[i].plantName) || this.plantName == '合计' || this.plantName == '')) {
|
|
|
- this.option.legend.data[i] = this.pointList[i].pointType
|
|
|
- this.option.series[0].data[i] = {value: this.pointList[i].xll, name: this.pointList[i].pointType}
|
|
|
- } else {
|
|
|
- this.option.series[0].data[j] = {
|
|
|
- value: parseFloat(this.option.series[0].data[j].value) + parseFloat(this.pointList[i].xll),
|
|
|
- name: this.pointList[i].pointType
|
|
|
+ if ((this.plantName != '合计' && this.plantName == this.pointList[i].plantName)
|
|
|
+ || this.plantName == '合计' || this.plantName == '') {
|
|
|
+ if (flag) {
|
|
|
+ this.option.legend.data[i] = this.pointList[i].pointType
|
|
|
+ this.option.series[0].data[i] = {value: this.pointList[i].xll, name: this.pointList[i].pointType}
|
|
|
+ } else {
|
|
|
+ this.option.series[0].data[j] = {
|
|
|
+ value: parseFloat(this.option.series[0].data[j].value) + parseFloat(this.pointList[i].xll),
|
|
|
+ name: this.pointList[i].pointType
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|