|
|
@ -266,13 +266,13 @@ export default {
|
|
|
|
center: ['50%', '50%'],
|
|
|
|
center: ['50%', '50%'],
|
|
|
|
startAngle: 0,
|
|
|
|
startAngle: 0,
|
|
|
|
endAngle: 359.9,
|
|
|
|
endAngle: 359.9,
|
|
|
|
splitNumber: -1,
|
|
|
|
splitNumber: 8,
|
|
|
|
hoverAnimation: true,
|
|
|
|
hoverAnimation: true,
|
|
|
|
axisTick: {
|
|
|
|
axisTick: {
|
|
|
|
show: false,
|
|
|
|
show: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
splitLine: {
|
|
|
|
splitLine: {
|
|
|
|
length: 60,
|
|
|
|
length: 15,
|
|
|
|
lineStyle: {
|
|
|
|
lineStyle: {
|
|
|
|
width: 5,
|
|
|
|
width: 5,
|
|
|
|
color: '#061740',
|
|
|
|
color: '#061740',
|
|
|
@ -291,9 +291,6 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
detail: {
|
|
|
|
detail: {
|
|
|
|
show: false,
|
|
|
|
show: false,
|
|
|
|
textStyle: {
|
|
|
|
|
|
|
|
fontSize: 12
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
data: [],
|
|
|
|
data: [],
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -338,9 +335,9 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
mounted() {
|
|
|
|
/* setInterval(() => {
|
|
|
|
/* setInterval(() => {
|
|
|
|
//this.angle = this.angle + 3
|
|
|
|
this.angle = this.angle + 3
|
|
|
|
//myChart.setOption(option,true)
|
|
|
|
myChart.setOption(option,true)
|
|
|
|
}, 100);*/
|
|
|
|
}, 1000);*/
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
//轴point设置
|
|
|
|
//轴point设置
|
|
|
@ -358,6 +355,7 @@ export default {
|
|
|
|
//this.setOptionsLegend();
|
|
|
|
//this.setOptionsLegend();
|
|
|
|
//this.setOptionsColor();
|
|
|
|
//this.setOptionsColor();
|
|
|
|
this.setOptionsData();
|
|
|
|
this.setOptionsData();
|
|
|
|
|
|
|
|
this.setOptionLine();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
setOptionsTitle() {
|
|
|
|
setOptionsTitle() {
|
|
|
|
const optionsCollapse = this.optionsSetup;
|
|
|
|
const optionsCollapse = this.optionsSetup;
|
|
|
@ -392,7 +390,9 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
setOptionPer(val) {
|
|
|
|
//圆环0-100%颜色
|
|
|
|
|
|
|
|
/*setOptionPerData(val) {
|
|
|
|
|
|
|
|
const optionsSetup = this.optionsSetup;
|
|
|
|
const data = this.options.series[6]['data'];
|
|
|
|
const data = this.options.series[6]['data'];
|
|
|
|
data.forEach((ev, index) => {
|
|
|
|
data.forEach((ev, index) => {
|
|
|
|
if (index == 0) {
|
|
|
|
if (index == 0) {
|
|
|
@ -403,11 +403,11 @@ export default {
|
|
|
|
colorStops: [
|
|
|
|
colorStops: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
offset: 0,
|
|
|
|
offset: 0,
|
|
|
|
color: '#4FADFD', // 0% 处的颜色
|
|
|
|
color: optionsSetup.colorStart, // 0% 处的颜色
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
offset: 1,
|
|
|
|
offset: 1,
|
|
|
|
color: '#28E8FA', // 100% 处的颜色
|
|
|
|
color: optionsSetup.colorEnd, // 100% 处的颜色
|
|
|
|
},
|
|
|
|
},
|
|
|
|
]
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -422,15 +422,28 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
const itemStyle = {
|
|
|
|
const itemStyle = {
|
|
|
|
normal: {
|
|
|
|
/!*normal: {
|
|
|
|
color: '#173164',
|
|
|
|
color: '#173164',
|
|
|
|
},
|
|
|
|
},*!/
|
|
|
|
};
|
|
|
|
};
|
|
|
|
data['label'] = label;
|
|
|
|
data['label'] = label;
|
|
|
|
data['itemStyle'] = itemStyle;
|
|
|
|
data['itemStyle'] = itemStyle;
|
|
|
|
}else{};
|
|
|
|
} else {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
;
|
|
|
|
})
|
|
|
|
})
|
|
|
|
console.log(data)
|
|
|
|
},*/
|
|
|
|
|
|
|
|
setOptionLine() {
|
|
|
|
|
|
|
|
const optionsSetup = this.optionsSetup;
|
|
|
|
|
|
|
|
const line = this.options.series[7]['splitLine'];
|
|
|
|
|
|
|
|
const num = this.options.series[7];
|
|
|
|
|
|
|
|
num.splitNumber = optionsSetup.lineNumber;
|
|
|
|
|
|
|
|
line.length = optionsSetup.lineLength;
|
|
|
|
|
|
|
|
const lineStyle = {
|
|
|
|
|
|
|
|
width: optionsSetup.lineWidth,
|
|
|
|
|
|
|
|
color: optionsSetup.lineColor,
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
line['lineStyle'] = lineStyle
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 数据解析
|
|
|
|
// 数据解析
|
|
|
|
setOptionsData() {
|
|
|
|
setOptionsData() {
|
|
|
@ -445,7 +458,7 @@ export default {
|
|
|
|
staticDataFn(val) {
|
|
|
|
staticDataFn(val) {
|
|
|
|
const title = this.options.title;
|
|
|
|
const title = this.options.title;
|
|
|
|
title.text = '{nums|' + val + '}{percent|%}';
|
|
|
|
title.text = '{nums|' + val + '}{percent|%}';
|
|
|
|
this.setOptionPer(val)
|
|
|
|
//this.setOptionPerData(val)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
dynamicDataFn(val, refreshTime) {
|
|
|
|
dynamicDataFn(val, refreshTime) {
|
|
|
|
if (!val) return;
|
|
|
|
if (!val) return;
|
|
|
@ -461,8 +474,9 @@ export default {
|
|
|
|
getEchartData(val) {
|
|
|
|
getEchartData(val) {
|
|
|
|
const data = this.queryEchartsData(val);
|
|
|
|
const data = this.queryEchartsData(val);
|
|
|
|
data.then(res => {
|
|
|
|
data.then(res => {
|
|
|
|
this.styleColor.text = res[0].value
|
|
|
|
this.options.title.text = '{nums|' + res[0].value + '}{percent|%}'
|
|
|
|
this.$forceUpdate();
|
|
|
|
//this.$forceUpdate();
|
|
|
|
|
|
|
|
console.log(res[0].value)
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|