Browse Source

Merge branch 'develop' of http://39.106.31.193:9211/mengff/jihe-hs into develop

wangqin
zhangzhang 9 months ago
parent
commit
1c091361b8
  1. 8
      ruoyi-ui/src/views/JiHeExpressway/components/Adaptation.vue
  2. 28
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficSituation/components/IndicatorAnalysis/components/trafficIndicators/assets/chartsRadar.js

8
ruoyi-ui/src/views/JiHeExpressway/components/Adaptation.vue

@ -101,10 +101,10 @@ export default {
mounted() { mounted() {
this.initScale(); this.initScale();
// window.addEventListener( window.addEventListener(
// "resize", "resize",
// _.debounce(this.initScale.bind(this), 360) _.debounce(this.initScale.bind(this), 360)
// ); );
}, },
}; };
</script> </script>

28
ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficSituation/components/IndicatorAnalysis/components/trafficIndicators/assets/chartsRadar.js

@ -1,14 +1,22 @@
import * as echarts from "echarts"; window.radarData = {'交通特征':9,'拥挤度':8,'饱和度':5,}
let options = { let options = {
legend: { legend: {
show: false, show: false,
}, },
tooltip: {
trigger: "item",
formatter: function (params, ticket, callback) {
let data = params.data;
return `交通特征: ${data.value[0]}<br>拥挤度: ${data.value[1]}<br>饱和度: ${data.value[2]}`;
},
},
radar: [ radar: [
{ {
indicator: [ indicator: [
{ text: "Indicator1" }, { name: "交通特征",max: 10 },
{ text: "Indicator2" }, { name: "拥挤度" ,max: 10},
{ text: "Indicator3" }, { name: "饱和度",max: 10 },
], ],
center: ["50%", "55%"], center: ["50%", "55%"],
radius: 70, radius: 70,
@ -16,7 +24,9 @@ let options = {
splitNumber: 4, splitNumber: 4,
shape: "circle", shape: "circle",
axisName: { axisName: {
formatter: "{value}", formatter: function (value) {
return value + ' '+ (radarData[value] / 10 * 100) + "%";
},
color: "#428BD4", color: "#428BD4",
}, },
splitArea: { splitArea: {
@ -45,8 +55,8 @@ let options = {
}, },
data: [ data: [
{ {
value: [1, 5, 1], value: [9,8,5],
name: "Data B", name: "月指标",
areaStyle: { areaStyle: {
color: { color: {
type: "linear", type: "linear",
@ -56,12 +66,12 @@ let options = {
y2: 1, y2: 1,
colorStops: [ colorStops: [
{ {
offset: 0.1, offset: 0,
color: "#DC6A00", // 0% 处的颜色 color: "#DC6A00", // 0% 处的颜色
}, },
{ {
offset: 0.5, offset: 0.5,
color: "#5D887C", // 100% 处的颜色 color: "#5D887C", // 50% 处的颜色
}, },
{ {
offset: 1, offset: 1,

Loading…
Cancel
Save