|
@@ -779,7 +779,8 @@ const columns=[
|
|
|
this.getSceneData();
|
|
|
this.getGenderData()
|
|
|
this.getMaterialData()
|
|
|
- this.getColumnsByAccountId()
|
|
|
+ this.getColumnsByAccountId();
|
|
|
+ this.echartIndex='charge'
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -1452,8 +1453,8 @@ const columns=[
|
|
|
option= this.getLineOption(data);
|
|
|
|
|
|
}else if( type=='pie'){
|
|
|
- option= this.getPieOption()
|
|
|
- option.series[0].data=data
|
|
|
+ option= this.getPieOption(data);
|
|
|
+
|
|
|
}
|
|
|
return option
|
|
|
},
|
|
@@ -1525,7 +1526,7 @@ const columns=[
|
|
|
},
|
|
|
|
|
|
|
|
|
- getPieOption(){
|
|
|
+ getPieOption(data){
|
|
|
const colorList = ['#58D5FF', '#73ACFF', '#FDD56A', '#FDB36A', '#FD866A','#9E87FF']
|
|
|
let option = {
|
|
|
|
|
@@ -1538,7 +1539,7 @@ const columns=[
|
|
|
// left: '3%',
|
|
|
// top:'center',
|
|
|
// icon:'circle'
|
|
|
- orient: 'horizontal',
|
|
|
+ orient: 'horizontal',
|
|
|
left: '3%',
|
|
|
top:'top',
|
|
|
icon:'circle'
|
|
@@ -1554,39 +1555,42 @@ const columns=[
|
|
|
show:false
|
|
|
},
|
|
|
series: [
|
|
|
- {
|
|
|
- name:'',
|
|
|
- type: 'pie',
|
|
|
- radius: ['40%', '70%'],
|
|
|
- labelLine:{
|
|
|
- length:5,
|
|
|
- length2:5
|
|
|
- },
|
|
|
- label:{
|
|
|
- show: false,
|
|
|
- position:'center'
|
|
|
- },
|
|
|
- emphasis: {
|
|
|
- label: {
|
|
|
- show: true,
|
|
|
- fontSize: '18',
|
|
|
- fontWeight: 'bold'
|
|
|
- }
|
|
|
- },
|
|
|
- labelLine: {
|
|
|
- show: true
|
|
|
- },
|
|
|
- itemStyle: {
|
|
|
- borderRadius: 5,
|
|
|
- color: (params) => {
|
|
|
- return colorList[params.dataIndex]
|
|
|
- }
|
|
|
- },
|
|
|
- data: []
|
|
|
- }
|
|
|
+
|
|
|
]
|
|
|
}
|
|
|
-
|
|
|
+ option.series=[];
|
|
|
+ option.series.push(
|
|
|
+ {
|
|
|
+ name:'',
|
|
|
+ type: 'pie',
|
|
|
+ radius: ['40%', '70%'],
|
|
|
+ labelLine:{
|
|
|
+ length:5,
|
|
|
+ length2:5
|
|
|
+ },
|
|
|
+ label:{
|
|
|
+ show: false,
|
|
|
+ position:'center'
|
|
|
+ },
|
|
|
+ emphasis: {
|
|
|
+ label: {
|
|
|
+ show: true,
|
|
|
+ fontSize: '18',
|
|
|
+ fontWeight: 'bold'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ labelLine: {
|
|
|
+ show: true
|
|
|
+ },
|
|
|
+ itemStyle: {
|
|
|
+ borderRadius: 5,
|
|
|
+ color: (params) => {
|
|
|
+ return colorList[params.dataIndex]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ data: data
|
|
|
+ }
|
|
|
+ )
|
|
|
return option
|
|
|
},
|
|
|
|
|
@@ -1599,7 +1603,7 @@ const columns=[
|
|
|
// myChart.showLoading({
|
|
|
// text: "图表数据正在努力加载..."
|
|
|
// });
|
|
|
-
|
|
|
+ myChart.clear()
|
|
|
myChart.setOption(optionName)
|
|
|
window.addEventListener('resize', function() {
|
|
|
myChart.resize()
|
|
@@ -1909,7 +1913,8 @@ const columns=[
|
|
|
// },0)
|
|
|
|
|
|
}else{
|
|
|
- this.accountIndexEchartSpinning=false
|
|
|
+ this.accountIndexEchartSpinning=false;
|
|
|
+ this.initEchart('accountIndexEchart',this.initAccountIndexEchart(indexName,[]))
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -1943,6 +1948,8 @@ const columns=[
|
|
|
// this.initEchart('ageEchart',this.initAdpositionChart(type,data))
|
|
|
// })
|
|
|
|
|
|
+ }else{
|
|
|
+ this.initEchart('ageEchart',{})
|
|
|
}
|
|
|
|
|
|
})
|
|
@@ -2000,6 +2007,8 @@ const columns=[
|
|
|
this.initEchart('genderEchart',this.initAdpositionChart(type,this.handlerLineData(res)))
|
|
|
}
|
|
|
|
|
|
+ }else{
|
|
|
+ this.initEchart('genderEchart',{})
|
|
|
}
|
|
|
|
|
|
|
|
@@ -2034,7 +2043,7 @@ const columns=[
|
|
|
}
|
|
|
}else{
|
|
|
this.$message.error(res.message)
|
|
|
-
|
|
|
+ this.initEchart('adPositionEchart',{})
|
|
|
}
|
|
|
|
|
|
|