|
@@ -10,14 +10,31 @@ export default {
|
|
|
data(){
|
|
|
return{
|
|
|
getChartDataValue:[],
|
|
|
- getChartDataValue2:[]
|
|
|
+ getChartDataValue2:[],
|
|
|
+ chartsAName2:''
|
|
|
}
|
|
|
},
|
|
|
methods:{
|
|
|
- getPackageData(gridData){
|
|
|
+ getPackageData(gridData,value2){
|
|
|
+ console.log(value2)
|
|
|
for(let i=0;i<gridData.length;i++){
|
|
|
- this.getChartDataValue.push({value:gridData[i].fdl,name:gridData[i].wpName})
|
|
|
- this.getChartDataValue2.push({value:gridData[i].gzss,name:gridData[i].wpName})
|
|
|
+ this.getChartDataValue.push({value:gridData[i].fdl,name:gridData[i].wpName});
|
|
|
+ if(value2 == 'gz'){
|
|
|
+ this.chartsAName2 = '故障损失占比';
|
|
|
+ this.getChartDataValue2.push({value:gridData[i].gzss,name:gridData[i].wpName});
|
|
|
+ }else if(value2 == 'xn'){
|
|
|
+ this.chartsAName2 = '性能损失占比';
|
|
|
+ this.getChartDataValue2.push({value:gridData[i].qfss,name:gridData[i].wpName});
|
|
|
+ }else if(value2 == 'qf'){
|
|
|
+ this.chartsAName2 = '弃风率占比';
|
|
|
+ this.getChartDataValue2.push({value:gridData[i].qfl,name:gridData[i].wpName});
|
|
|
+ }else if(value2 == 'jx'){
|
|
|
+ this.chartsAName2 = '检修损失占比';
|
|
|
+ this.getChartDataValue2.push({value:gridData[i].whss,name:gridData[i].wpName});
|
|
|
+ }else if(value2 == 'sl'){
|
|
|
+ this.chartsAName2 = '受累损失占比';
|
|
|
+ this.getChartDataValue2.push({value:gridData[i].slss,name:gridData[i].wpName});
|
|
|
+ }
|
|
|
}
|
|
|
this.getChartDataImport();
|
|
|
this.getChartDataValue = [];
|
|
@@ -59,7 +76,7 @@ export default {
|
|
|
var charts2 = echarts.init(document.getElementById("chartPieRight"))
|
|
|
let option2 = {
|
|
|
title: {
|
|
|
- text: '故障损失占比',
|
|
|
+ text: this.chartsAName2,
|
|
|
left: 'center'
|
|
|
},
|
|
|
color:['#90ED7D', '#F7A35C', '#7CB5EC','#434348','#8085E9'],
|