diff --git a/src/views/commandScreen/commandCenter/centerBottom.vue b/src/views/commandScreen/commandCenter/centerBottom.vue index d5dcb5f9..f04875b5 100644 --- a/src/views/commandScreen/commandCenter/centerBottom.vue +++ b/src/views/commandScreen/commandCenter/centerBottom.vue @@ -300,7 +300,7 @@ function getMessEchart() { itemHeight: 8, itemWidth: 8, icon: "rect", - data: dataList.map((item: any) => item.name), + data: dataList && dataList.map((item: any) => item.name), formatter: function (params: any) { let val = ""; if (params.length > 4) { diff --git a/src/views/commandScreen/commandCenter/centerTop.vue b/src/views/commandScreen/commandCenter/centerTop.vue index 27caf5f7..4b73d847 100644 --- a/src/views/commandScreen/commandCenter/centerTop.vue +++ b/src/views/commandScreen/commandCenter/centerTop.vue @@ -5,37 +5,37 @@ -
- 安全隐患治理 +
+ 安全隐患治理
-
- 危大工程 +
+ 危大工程
- - + -
- 安全教育 +
+ 安全教育
-
- 风险管理 +
+ 风险管理
-
- AI警报 +
+ AI警报
@@ -55,23 +55,26 @@ {{ statScore.radio > 0 ? "↑" : "↓" }}
-
+
{{ statScore.total }}
- 安全评分 -
优秀
+ 安全评分 +
优秀
- 安全评分 + 安全评分
一般
- 安全评分 + 安全评分
@@ -113,7 +116,7 @@ import { ref, onMounted, watch } from "vue"; import { GlobalStore } from "@/stores"; import { ElMessage } from "element-plus"; import * as echarts from "echarts"; -import 'echarts-liquidfill'; +import "echarts-liquidfill"; import { editProjectInfo, eidtProjectShowConfig, queryBySnData } from "@/api/modules/projectOverview"; import { getStatsDirectorateBigScreenApi, getStatScoreApi } from "@/api/modules/agjtCommandApi"; @@ -149,397 +152,396 @@ watch( ); //绘画安全隐患治理水波图 -function drawAqWater(){ +function drawAqWater() { type EChartsOption = echarts.EChartsOption; var chartDom = document.getElementById("waterAq")!; var myChart = echarts.init(chartDom); var option: EChartsOption; - // 配置项 - option = { + // 配置项 + option = { series: [ - { - type: "liquidFill", //设置图表类型 - // data: [0.6], // 设置水位,值为0到1之间 - data:[0.001,0.001,0.001,0.001,0.001], //设置水位,可以写多个值,用来设置多个水位 - // data: [ - // 0.2, - // { - // value: 0.3, // 图形数据写法二 - // direction: "left", // 水波运动方向 - // itemStyle: { - // color: "blue", // 水波颜色 - // opacity: 0.8, // 透明度 - // }, - // emphasis: { - // itemStyle: { - // color: "lightblue", // 鼠标移入时的水波颜色 - // opacity: 1, // 鼠标移入时的透明度 - // }, - // }, - // }, - // ], - waveAnimation:true,//是否开启水波动画, - amplitude: 15, // 设置振幅,值越大波形越尖 - waveLength:150,//水波的长度,值越大水波越长 - shape: "circle", //设置形状,可选为'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow' - direction: "right", //设置方向,可选为'left', 'right', 'top', 'bottom', - radius: "60%", // 设置图的大小 默认为50% - // color:['#1E90FF','#191970','#000080','#6495ED','#0000FF'] ,// 设置颜色,可以设置多个值,用来设置多个水位 - color:['#156ACF'] ,// 设置颜色,可以设置多个值,用来设置多个水位 - center:['50%','50%'],//中心点的位置1E90FF - // animationEasing:'linear', - animationEasing:'easeOut', - outline: { - borderDistance: 4, // 外边框距离 - itemStyle: { - borderWidth: 2, // 外边框宽度 - borderColor: "#156ACF", // 外边框颜色 - }, - }, - // // 水波样式 - // itemStyle:{ - // opacity:0.5, // 透明度 - // color:'red', // 统一配置水波的颜色 - // shadowBlur:10, // 水波阴影大小 - // shadowColor:'red', // 阴影颜色 - // shadowOffsetX:10, // 阴影水平偏移量 - // shadowOffsetY:10, // 阴影竖直偏移量 - // }, - backgroundStyle: { - color: "rgba(0,0,0,0)", // 背景色 - }, - label: { - normal: { - formatter: function(){ - return statScore.value.hiddenDangerScore + "分" + { + type: "liquidFill", //设置图表类型 + // data: [0.6], // 设置水位,值为0到1之间 + data: [0.001, 0.001, 0.001, 0.001, 0.001], //设置水位,可以写多个值,用来设置多个水位 + // data: [ + // 0.2, + // { + // value: 0.3, // 图形数据写法二 + // direction: "left", // 水波运动方向 + // itemStyle: { + // color: "blue", // 水波颜色 + // opacity: 0.8, // 透明度 + // }, + // emphasis: { + // itemStyle: { + // color: "lightblue", // 鼠标移入时的水波颜色 + // opacity: 1, // 鼠标移入时的透明度 + // }, + // }, + // }, + // ], + waveAnimation: true, //是否开启水波动画, + amplitude: 15, // 设置振幅,值越大波形越尖 + waveLength: 150, //水波的长度,值越大水波越长 + shape: "circle", //设置形状,可选为'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow' + direction: "right", //设置方向,可选为'left', 'right', 'top', 'bottom', + radius: "60%", // 设置图的大小 默认为50% + // color:['#1E90FF','#191970','#000080','#6495ED','#0000FF'] ,// 设置颜色,可以设置多个值,用来设置多个水位 + color: ["#156ACF"], // 设置颜色,可以设置多个值,用来设置多个水位 + center: ["50%", "50%"], //中心点的位置1E90FF + // animationEasing:'linear', + animationEasing: "easeOut", + outline: { + borderDistance: 4, // 外边框距离 + itemStyle: { + borderWidth: 2, // 外边框宽度 + borderColor: "#156ACF" // 外边框颜色 + } }, - textStyle: { - // color: "#6495ED", //蓝色 - color: "#fff", - insideColor: "#fff", - fontSize: 16, - - }, - }, - }, - }, - ], - }; - // 使用配置项设置图表 - myChart.setOption(option); + // // 水波样式 + // itemStyle:{ + // opacity:0.5, // 透明度 + // color:'red', // 统一配置水波的颜色 + // shadowBlur:10, // 水波阴影大小 + // shadowColor:'red', // 阴影颜色 + // shadowOffsetX:10, // 阴影水平偏移量 + // shadowOffsetY:10, // 阴影竖直偏移量 + // }, + backgroundStyle: { + color: "rgba(0,0,0,0)" // 背景色 + }, + label: { + normal: { + formatter: function () { + return statScore.value.hiddenDangerScore + "分"; + }, + textStyle: { + // color: "#6495ED", //蓝色 + color: "#fff", + insideColor: "#fff", + fontSize: 16 + } + } + } + } + ] + }; + // 使用配置项设置图表 + myChart.setOption(option); } //绘画危大工程水波图 -function drawWdWater(){ +function drawWdWater() { type EChartsOption = echarts.EChartsOption; var chartDom = document.getElementById("waterWd")!; var myChart = echarts.init(chartDom); var option: EChartsOption; - // 配置项 - option = { + // 配置项 + option = { series: [ - { - type: "liquidFill", //设置图表类型 - // data: [0.6], // 设置水位,值为0到1之间 - data:[0.001,0.001,0.001,0.001,0.001], //设置水位,可以写多个值,用来设置多个水位 - // data: [ - // 0.2, - // { - // value: 0.3, // 图形数据写法二 - // direction: "left", // 水波运动方向 - // itemStyle: { - // color: "blue", // 水波颜色 - // opacity: 0.8, // 透明度 - // }, - // emphasis: { - // itemStyle: { - // color: "lightblue", // 鼠标移入时的水波颜色 - // opacity: 1, // 鼠标移入时的透明度 - // }, - // }, - // }, - // ], - waveAnimation:true,//是否开启水波动画, - amplitude: 15, // 设置振幅,值越大波形越尖 - waveLength:150,//水波的长度,值越大水波越长 - shape: "circle", //设置形状,可选为'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow' - direction: "right", //设置方向,可选为'left', 'right', 'top', 'bottom', - radius: "60%", // 设置图的大小 默认为50% - // color:['#1E90FF','#191970','#000080','#6495ED','#0000FF'] ,// 设置颜色,可以设置多个值,用来设置多个水位 - color:['#156ACF'] ,// 设置颜色,可以设置多个值,用来设置多个水位 - center:['50%','50%'],//中心点的位置1E90FF - // animationEasing:'linear', - animationEasing:'easeOut', - outline: { - borderDistance: 4, // 外边框距离 - itemStyle: { - borderWidth: 2, // 外边框宽度 - borderColor: "#156ACF", // 外边框颜色 - }, - }, - // // 水波样式 - // itemStyle:{ - // opacity:0.5, // 透明度 - // color:'red', // 统一配置水波的颜色 - // shadowBlur:10, // 水波阴影大小 - // shadowColor:'red', // 阴影颜色 - // shadowOffsetX:10, // 阴影水平偏移量 - // shadowOffsetY:10, // 阴影竖直偏移量 - // }, - backgroundStyle: { - color: "rgba(0,0,0,0)", // 背景色 - }, - label: { - normal: { - formatter: function(){ - return statScore.value.dangerEngScore + "分" + { + type: "liquidFill", //设置图表类型 + // data: [0.6], // 设置水位,值为0到1之间 + data: [0.001, 0.001, 0.001, 0.001, 0.001], //设置水位,可以写多个值,用来设置多个水位 + // data: [ + // 0.2, + // { + // value: 0.3, // 图形数据写法二 + // direction: "left", // 水波运动方向 + // itemStyle: { + // color: "blue", // 水波颜色 + // opacity: 0.8, // 透明度 + // }, + // emphasis: { + // itemStyle: { + // color: "lightblue", // 鼠标移入时的水波颜色 + // opacity: 1, // 鼠标移入时的透明度 + // }, + // }, + // }, + // ], + waveAnimation: true, //是否开启水波动画, + amplitude: 15, // 设置振幅,值越大波形越尖 + waveLength: 150, //水波的长度,值越大水波越长 + shape: "circle", //设置形状,可选为'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow' + direction: "right", //设置方向,可选为'left', 'right', 'top', 'bottom', + radius: "60%", // 设置图的大小 默认为50% + // color:['#1E90FF','#191970','#000080','#6495ED','#0000FF'] ,// 设置颜色,可以设置多个值,用来设置多个水位 + color: ["#156ACF"], // 设置颜色,可以设置多个值,用来设置多个水位 + center: ["50%", "50%"], //中心点的位置1E90FF + // animationEasing:'linear', + animationEasing: "easeOut", + outline: { + borderDistance: 4, // 外边框距离 + itemStyle: { + borderWidth: 2, // 外边框宽度 + borderColor: "#156ACF" // 外边框颜色 + } }, - textStyle: { - color: "#fff", - insideColor: "#fff", - fontSize: 16, - }, - }, - }, - }, - ], - }; - // 使用配置项设置图表 - myChart.setOption(option); + // // 水波样式 + // itemStyle:{ + // opacity:0.5, // 透明度 + // color:'red', // 统一配置水波的颜色 + // shadowBlur:10, // 水波阴影大小 + // shadowColor:'red', // 阴影颜色 + // shadowOffsetX:10, // 阴影水平偏移量 + // shadowOffsetY:10, // 阴影竖直偏移量 + // }, + backgroundStyle: { + color: "rgba(0,0,0,0)" // 背景色 + }, + label: { + normal: { + formatter: function () { + return statScore.value.dangerEngScore + "分"; + }, + textStyle: { + color: "#fff", + insideColor: "#fff", + fontSize: 16 + } + } + } + } + ] + }; + // 使用配置项设置图表 + myChart.setOption(option); } //绘画安全隐患治理水波图 -function drawJyWater(){ +function drawJyWater() { type EChartsOption = echarts.EChartsOption; var chartDom = document.getElementById("waterJy")!; var myChart = echarts.init(chartDom); var option: EChartsOption; - // 配置项 - option = { + // 配置项 + option = { series: [ - { - type: "liquidFill", //设置图表类型 - // data: [0.6], // 设置水位,值为0到1之间 - data:[0.001,0.001,0.001,0.001,0.001], //设置水位,可以写多个值,用来设置多个水位 - // data: [ - // 0.2, - // { - // value: 0.3, // 图形数据写法二 - // direction: "left", // 水波运动方向 - // itemStyle: { - // color: "blue", // 水波颜色 - // opacity: 0.8, // 透明度 - // }, - // emphasis: { - // itemStyle: { - // color: "lightblue", // 鼠标移入时的水波颜色 - // opacity: 1, // 鼠标移入时的透明度 - // }, - // }, - // }, - // ], - waveAnimation:true,//是否开启水波动画, - amplitude: 15, // 设置振幅,值越大波形越尖 - waveLength:150,//水波的长度,值越大水波越长 - shape: "circle", //设置形状,可选为'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow' - direction: "right", //设置方向,可选为'left', 'right', 'top', 'bottom', - radius: "60%", // 设置图的大小 默认为50% - // color:['#1E90FF','#191970','#000080','#6495ED','#0000FF'] ,// 设置颜色,可以设置多个值,用来设置多个水位 - color:['#156ACF'] ,// 设置颜色,可以设置多个值,用来设置多个水位 - center:['50%','50%'],//中心点的位置1E90FF - // animationEasing:'linear', - animationEasing:'easeOut', - outline: { - borderDistance: 4, // 外边框距离 - itemStyle: { - borderWidth: 2, // 外边框宽度 - borderColor: "#156ACF", // 外边框颜色 - }, - }, - // // 水波样式 - // itemStyle:{ - // opacity:0.5, // 透明度 - // color:'red', // 统一配置水波的颜色 - // shadowBlur:10, // 水波阴影大小 - // shadowColor:'red', // 阴影颜色 - // shadowOffsetX:10, // 阴影水平偏移量 - // shadowOffsetY:10, // 阴影竖直偏移量 - // }, - backgroundStyle: { - color: "rgba(0,0,0,0)", // 背景色 - }, - label: { - normal: { - formatter: function(){ - // return statScore.value + "分" - return "25分" + { + type: "liquidFill", //设置图表类型 + // data: [0.6], // 设置水位,值为0到1之间 + data: [0.001, 0.001, 0.001, 0.001, 0.001], //设置水位,可以写多个值,用来设置多个水位 + // data: [ + // 0.2, + // { + // value: 0.3, // 图形数据写法二 + // direction: "left", // 水波运动方向 + // itemStyle: { + // color: "blue", // 水波颜色 + // opacity: 0.8, // 透明度 + // }, + // emphasis: { + // itemStyle: { + // color: "lightblue", // 鼠标移入时的水波颜色 + // opacity: 1, // 鼠标移入时的透明度 + // }, + // }, + // }, + // ], + waveAnimation: true, //是否开启水波动画, + amplitude: 15, // 设置振幅,值越大波形越尖 + waveLength: 150, //水波的长度,值越大水波越长 + shape: "circle", //设置形状,可选为'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow' + direction: "right", //设置方向,可选为'left', 'right', 'top', 'bottom', + radius: "60%", // 设置图的大小 默认为50% + // color:['#1E90FF','#191970','#000080','#6495ED','#0000FF'] ,// 设置颜色,可以设置多个值,用来设置多个水位 + color: ["#156ACF"], // 设置颜色,可以设置多个值,用来设置多个水位 + center: ["50%", "50%"], //中心点的位置1E90FF + // animationEasing:'linear', + animationEasing: "easeOut", + outline: { + borderDistance: 4, // 外边框距离 + itemStyle: { + borderWidth: 2, // 外边框宽度 + borderColor: "#156ACF" // 外边框颜色 + } }, - textStyle: { - color: "#fff", - insideColor: "#fff", - fontSize: 16, - }, - }, - }, - }, - ], - }; - // 使用配置项设置图表 - myChart.setOption(option); + // // 水波样式 + // itemStyle:{ + // opacity:0.5, // 透明度 + // color:'red', // 统一配置水波的颜色 + // shadowBlur:10, // 水波阴影大小 + // shadowColor:'red', // 阴影颜色 + // shadowOffsetX:10, // 阴影水平偏移量 + // shadowOffsetY:10, // 阴影竖直偏移量 + // }, + backgroundStyle: { + color: "rgba(0,0,0,0)" // 背景色 + }, + label: { + normal: { + formatter: function () { + // return statScore.value + "分" + return "25分"; + }, + textStyle: { + color: "#fff", + insideColor: "#fff", + fontSize: 16 + } + } + } + } + ] + }; + // 使用配置项设置图表 + myChart.setOption(option); } //绘画安全隐患治理水波图 -function drawFxWater(){ +function drawFxWater() { type EChartsOption = echarts.EChartsOption; var chartDom = document.getElementById("waterFx")!; var myChart = echarts.init(chartDom); var option: EChartsOption; - // 配置项 - option = { + // 配置项 + option = { series: [ - { - type: "liquidFill", //设置图表类型 - // data: [0.6], // 设置水位,值为0到1之间 - data:[0.001,0.001,0.001,0.001,0.001], //设置水位,可以写多个值,用来设置多个水位 - // data: [ - // 0.2, - // { - // value: 0.3, // 图形数据写法二 - // direction: "left", // 水波运动方向 - // itemStyle: { - // color: "blue", // 水波颜色 - // opacity: 0.8, // 透明度 - // }, - // emphasis: { - // itemStyle: { - // color: "lightblue", // 鼠标移入时的水波颜色 - // opacity: 1, // 鼠标移入时的透明度 - // }, - // }, - // }, - // ], - waveAnimation:true,//是否开启水波动画, - amplitude: 15, // 设置振幅,值越大波形越尖 - waveLength:150,//水波的长度,值越大水波越长 - shape: "circle", //设置形状,可选为'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow' - direction: "right", //设置方向,可选为'left', 'right', 'top', 'bottom', - radius: "60%", // 设置图的大小 默认为50% - // color:['#1E90FF','#191970','#000080','#6495ED','#0000FF'] ,// 设置颜色,可以设置多个值,用来设置多个水位 - color:['#156ACF'] ,// 设置颜色,可以设置多个值,用来设置多个水位 - center:['50%','50%'],//中心点的位置1E90FF - // animationEasing:'linear', - animationEasing:'easeOut', - outline: { - borderDistance: 4, // 外边框距离 - itemStyle: { - borderWidth: 2, // 外边框宽度 - borderColor: "#156ACF", // 外边框颜色 - }, - }, - // // 水波样式 - // itemStyle:{ - // opacity:0.5, // 透明度 - // color:'red', // 统一配置水波的颜色 - // shadowBlur:10, // 水波阴影大小 - // shadowColor:'red', // 阴影颜色 - // shadowOffsetX:10, // 阴影水平偏移量 - // shadowOffsetY:10, // 阴影竖直偏移量 - // }, - backgroundStyle: { - color: "rgba(0,0,0,0)", // 背景色 - }, - label: { - normal: { - formatter: function(){ - return statScore.value.riskScore + "分" + { + type: "liquidFill", //设置图表类型 + // data: [0.6], // 设置水位,值为0到1之间 + data: [0.001, 0.001, 0.001, 0.001, 0.001], //设置水位,可以写多个值,用来设置多个水位 + // data: [ + // 0.2, + // { + // value: 0.3, // 图形数据写法二 + // direction: "left", // 水波运动方向 + // itemStyle: { + // color: "blue", // 水波颜色 + // opacity: 0.8, // 透明度 + // }, + // emphasis: { + // itemStyle: { + // color: "lightblue", // 鼠标移入时的水波颜色 + // opacity: 1, // 鼠标移入时的透明度 + // }, + // }, + // }, + // ], + waveAnimation: true, //是否开启水波动画, + amplitude: 15, // 设置振幅,值越大波形越尖 + waveLength: 150, //水波的长度,值越大水波越长 + shape: "circle", //设置形状,可选为'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow' + direction: "right", //设置方向,可选为'left', 'right', 'top', 'bottom', + radius: "60%", // 设置图的大小 默认为50% + // color:['#1E90FF','#191970','#000080','#6495ED','#0000FF'] ,// 设置颜色,可以设置多个值,用来设置多个水位 + color: ["#156ACF"], // 设置颜色,可以设置多个值,用来设置多个水位 + center: ["50%", "50%"], //中心点的位置1E90FF + // animationEasing:'linear', + animationEasing: "easeOut", + outline: { + borderDistance: 4, // 外边框距离 + itemStyle: { + borderWidth: 2, // 外边框宽度 + borderColor: "#156ACF" // 外边框颜色 + } }, - textStyle: { - color: "#fff", - insideColor: "#fff", - fontSize: 16, - }, - }, - }, - }, - ], - }; - // 使用配置项设置图表 - myChart.setOption(option); + // // 水波样式 + // itemStyle:{ + // opacity:0.5, // 透明度 + // color:'red', // 统一配置水波的颜色 + // shadowBlur:10, // 水波阴影大小 + // shadowColor:'red', // 阴影颜色 + // shadowOffsetX:10, // 阴影水平偏移量 + // shadowOffsetY:10, // 阴影竖直偏移量 + // }, + backgroundStyle: { + color: "rgba(0,0,0,0)" // 背景色 + }, + label: { + normal: { + formatter: function () { + return statScore.value.riskScore + "分"; + }, + textStyle: { + color: "#fff", + insideColor: "#fff", + fontSize: 16 + } + } + } + } + ] + }; + // 使用配置项设置图表 + myChart.setOption(option); } //绘画安全隐患治理水波图 -function drawZnWater(){ +function drawZnWater() { type EChartsOption = echarts.EChartsOption; var chartDom = document.getElementById("waterZn")!; var myChart = echarts.init(chartDom); var option: EChartsOption; - // 配置项 - option = { + // 配置项 + option = { series: [ - { - type: "liquidFill", //设置图表类型 - // data: [0.6], // 设置水位,值为0到1之间 - data:[0.001,0.001,0.001,0.001,0.001], //设置水位,可以写多个值,用来设置多个水位 - // data: [ - // 0.2, - // { - // value: 0.3, // 图形数据写法二 - // direction: "left", // 水波运动方向 - // itemStyle: { - // color: "blue", // 水波颜色 - // opacity: 0.8, // 透明度 - // }, - // emphasis: { - // itemStyle: { - // color: "lightblue", // 鼠标移入时的水波颜色 - // opacity: 1, // 鼠标移入时的透明度 - // }, - // }, - // }, - // ], - waveAnimation:true,//是否开启水波动画, - amplitude: 15, // 设置振幅,值越大波形越尖 - waveLength:150,//水波的长度,值越大水波越长 - shape: "circle", //设置形状,可选为'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow' - direction: "right", //设置方向,可选为'left', 'right', 'top', 'bottom', - radius: "60%", // 设置图的大小 默认为50% - // color:['#1E90FF','#191970','#000080','#6495ED','#0000FF'] ,// 设置颜色,可以设置多个值,用来设置多个水位 - color:['#156ACF'] ,// 设置颜色,可以设置多个值,用来设置多个水位 - center:['50%','50%'],//中心点的位置1E90FF - // animationEasing:'linear', - animationEasing:'easeOut', - outline: { - borderDistance: 4, // 外边框距离 - itemStyle: { - borderWidth: 2, // 外边框宽度 - borderColor: "#156ACF", // 外边框颜色 - }, - }, - // // 水波样式 - // itemStyle:{ - // opacity:0.5, // 透明度 - // color:'red', // 统一配置水波的颜色 - // shadowBlur:10, // 水波阴影大小 - // shadowColor:'red', // 阴影颜色 - // shadowOffsetX:10, // 阴影水平偏移量 - // shadowOffsetY:10, // 阴影竖直偏移量 - // }, - backgroundStyle: { - color: "rgba(0,0,0,0)", // 背景色 - }, - label: { - normal: { - formatter: function(){ - return statScore.value.aiScore + "分" + { + type: "liquidFill", //设置图表类型 + // data: [0.6], // 设置水位,值为0到1之间 + data: [0.001, 0.001, 0.001, 0.001, 0.001], //设置水位,可以写多个值,用来设置多个水位 + // data: [ + // 0.2, + // { + // value: 0.3, // 图形数据写法二 + // direction: "left", // 水波运动方向 + // itemStyle: { + // color: "blue", // 水波颜色 + // opacity: 0.8, // 透明度 + // }, + // emphasis: { + // itemStyle: { + // color: "lightblue", // 鼠标移入时的水波颜色 + // opacity: 1, // 鼠标移入时的透明度 + // }, + // }, + // }, + // ], + waveAnimation: true, //是否开启水波动画, + amplitude: 15, // 设置振幅,值越大波形越尖 + waveLength: 150, //水波的长度,值越大水波越长 + shape: "circle", //设置形状,可选为'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow' + direction: "right", //设置方向,可选为'left', 'right', 'top', 'bottom', + radius: "60%", // 设置图的大小 默认为50% + // color:['#1E90FF','#191970','#000080','#6495ED','#0000FF'] ,// 设置颜色,可以设置多个值,用来设置多个水位 + color: ["#156ACF"], // 设置颜色,可以设置多个值,用来设置多个水位 + center: ["50%", "50%"], //中心点的位置1E90FF + // animationEasing:'linear', + animationEasing: "easeOut", + outline: { + borderDistance: 4, // 外边框距离 + itemStyle: { + borderWidth: 2, // 外边框宽度 + borderColor: "#156ACF" // 外边框颜色 + } }, - textStyle: { - color: "#fff", - insideColor: "#fff", - fontSize: 16, - }, - }, - }, - }, - ], - }; - // 使用配置项设置图表 - myChart.setOption(option); + // // 水波样式 + // itemStyle:{ + // opacity:0.5, // 透明度 + // color:'red', // 统一配置水波的颜色 + // shadowBlur:10, // 水波阴影大小 + // shadowColor:'red', // 阴影颜色 + // shadowOffsetX:10, // 阴影水平偏移量 + // shadowOffsetY:10, // 阴影竖直偏移量 + // }, + backgroundStyle: { + color: "rgba(0,0,0,0)" // 背景色 + }, + label: { + normal: { + formatter: function () { + return statScore.value.aiScore + "分"; + }, + textStyle: { + color: "#fff", + insideColor: "#fff", + fontSize: 16 + } + } + } + } + ] + }; + // 使用配置项设置图表 + myChart.setOption(option); } //效果图 @@ -607,11 +609,11 @@ const getStatScore = async (showLoading: boolean) => { const res = await getStatScoreApi({ projectSn: store.sn }, showLoading); statScore.value = res.result; - drawAqWater() - drawWdWater() - drawJyWater() - drawFxWater() - drawZnWater() + drawAqWater(); + drawWdWater(); + drawJyWater(); + drawFxWater(); + drawZnWater(); }; function boxStyle(item: any) { @@ -703,12 +705,24 @@ onMounted(async () => {