|
|
@ -141,6 +141,7 @@ import { getV2PatrolStatisticChart, getRunProjectList } from "@/api/dike"; |
|
|
|
import { |
|
|
|
initCommonBarLineOptions, |
|
|
|
initCommonPieRingOptions, |
|
|
|
initCommonAngleAxisOptions, |
|
|
|
} from "@/utils/echartsUtils"; |
|
|
|
|
|
|
|
export default { |
|
|
@ -579,13 +580,50 @@ export default { |
|
|
|
this.yhCompareRefPieInstance = echarts.init( |
|
|
|
this.$refs.yhCompareRefPie |
|
|
|
); |
|
|
|
this.yhCompareRefPieInstance.setOption( |
|
|
|
initCommonPieRingOptions({ |
|
|
|
data: res.data || {}, |
|
|
|
colors: ["#0099DF", "#81B84A"], |
|
|
|
seriesOptions: {}, |
|
|
|
}) |
|
|
|
); |
|
|
|
let options = initCommonAngleAxisOptions({ |
|
|
|
data: res.data || {}, |
|
|
|
colors: [ |
|
|
|
{ |
|
|
|
type: "linear", |
|
|
|
x: 0, |
|
|
|
y: 0, |
|
|
|
x2: 0, |
|
|
|
y2: 1, |
|
|
|
colorStops: [ |
|
|
|
{ |
|
|
|
offset: 0, |
|
|
|
color: "rgba(54, 163, 217, 1)", // 0% 处的颜色 |
|
|
|
}, |
|
|
|
{ |
|
|
|
offset: 1, |
|
|
|
color: "rgba(54, 163, 217, 0.1)", // 100% 处的颜色 |
|
|
|
}, |
|
|
|
], |
|
|
|
global: false, // 缺省为 false |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: "linear", |
|
|
|
x: 0, |
|
|
|
y: 0, |
|
|
|
x2: 0, |
|
|
|
y2: 1, |
|
|
|
colorStops: [ |
|
|
|
{ |
|
|
|
offset: 0, |
|
|
|
color: "rgba(129, 184, 74, 1)", // 0% 处的颜色 |
|
|
|
}, |
|
|
|
{ |
|
|
|
offset: 1, |
|
|
|
color: "rgba(129, 184, 74, 0.1)", // 100% 处的颜色 |
|
|
|
}, |
|
|
|
], |
|
|
|
global: false, // 缺省为 false |
|
|
|
}, |
|
|
|
], |
|
|
|
seriesOptions: {}, |
|
|
|
}); |
|
|
|
console.log("options >>>>> ", options); |
|
|
|
this.yhCompareRefPieInstance.setOption(options); |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|