Sfoglia il codice sorgente

-修改统计图报错

jiangbiao 2 anni fa
parent
commit
86c89117a5

+ 2 - 2
ui/src/views/statistics/pie/jplPieChart.vue

@@ -94,8 +94,8 @@ export default {
         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].jpl, name: this.pointList[i].pointType}
+            this.option.legend.data.push(this.pointList[i].pointType)
+            this.option.series[0].data.push({value: this.pointList[i].jpl, 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].jpl),

+ 2 - 2
ui/src/views/statistics/pie/pflPieChart.vue

@@ -94,8 +94,8 @@ export default {
         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].pfl, name: this.pointList[i].pointType}
+            this.option.legend.data.push(this.pointList[i].pointType)
+            this.option.series[0].data.push({value: this.pointList[i].pfl, 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].pfl),

+ 2 - 2
ui/src/views/statistics/pie/xllPieChart.vue

@@ -94,8 +94,8 @@ export default {
         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}
+            this.option.legend.data.push(this.pointList[i].pointType)
+            this.option.series[0].data.push({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),