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. 12
      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

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

@ -51,8 +51,8 @@ export default {
return this.scale
}
},
watch:{
headerHeight(){
watch: {
headerHeight() {
}
},
methods: {
@ -101,10 +101,10 @@ export default {
mounted() {
this.initScale();
// window.addEventListener(
// "resize",
// _.debounce(this.initScale.bind(this), 360)
// );
window.addEventListener(
"resize",
_.debounce(this.initScale.bind(this), 360)
);
},
};
</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 = {
legend: {
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: [
{
indicator: [
{ text: "Indicator1" },
{ text: "Indicator2" },
{ text: "Indicator3" },
{ name: "交通特征",max: 10 },
{ name: "拥挤度" ,max: 10},
{ name: "饱和度",max: 10 },
],
center: ["50%", "55%"],
radius: 70,
@ -16,7 +24,9 @@ let options = {
splitNumber: 4,
shape: "circle",
axisName: {
formatter: "{value}",
formatter: function (value) {
return value + ' '+ (radarData[value] / 10 * 100) + "%";
},
color: "#428BD4",
},
splitArea: {
@ -45,8 +55,8 @@ let options = {
},
data: [
{
value: [1, 5, 1],
name: "Data B",
value: [9,8,5],
name: "月指标",
areaStyle: {
color: {
type: "linear",
@ -56,12 +66,12 @@ let options = {
y2: 1,
colorStops: [
{
offset: 0.1,
offset: 0,
color: "#DC6A00", // 0% 处的颜色
},
{
offset: 0.5,
color: "#5D887C", // 100% 处的颜色
color: "#5D887C", // 50% 处的颜色
},
{
offset: 1,

Loading…
Cancel
Save