From 374971c828aa09a79cc5ba13cf2984ce13b410a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=B2=E4=B9=88=E4=BA=86?= Date: Tue, 27 Feb 2024 14:47:45 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=90=E8=A1=8C=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/echarts/MyEchart.vue | 4 +- .../monitoringPoint/online/index.vue | 2 +- .../online/runningCondition/index.vue | 42 ++++++++++++------- 3 files changed, 29 insertions(+), 19 deletions(-) diff --git a/src/components/echarts/MyEchart.vue b/src/components/echarts/MyEchart.vue index 466cfc79..09f65006 100644 --- a/src/components/echarts/MyEchart.vue +++ b/src/components/echarts/MyEchart.vue @@ -109,14 +109,14 @@ const handlerBar = (options: any) => { item.itemStyle = Object.assign( { color: (params: any) => { - console.log(params) if (params.value == 0 || params.value == 3.14159) { return '#ccc' } else { return color[params.seriesIndex] } } - } + }, + item.itemStyle ) } }) diff --git a/src/views/pms/voltageSags/monitoringPoint/online/index.vue b/src/views/pms/voltageSags/monitoringPoint/online/index.vue index d2f04e32..90f92f50 100644 --- a/src/views/pms/voltageSags/monitoringPoint/online/index.vue +++ b/src/views/pms/voltageSags/monitoringPoint/online/index.vue @@ -32,7 +32,7 @@ defineOptions({ }) const monitoringPoint = useMonitoringPoint() const height = mainHeight(82) -const activeName = ref('3') +const activeName = ref('1') watch( () => router.currentRoute.value.query.lineId, (newLineId, oldLineId) => { diff --git a/src/views/pms/voltageSags/monitoringPoint/online/runningCondition/index.vue b/src/views/pms/voltageSags/monitoringPoint/online/runningCondition/index.vue index 49bb894b..763a8918 100644 --- a/src/views/pms/voltageSags/monitoringPoint/online/runningCondition/index.vue +++ b/src/views/pms/voltageSags/monitoringPoint/online/runningCondition/index.vue @@ -9,6 +9,15 @@
+
+ + {{ 'X<60%' }} + + {{ '60%≤X<90%' }} + + {{ 'X≥90 %' }} +
@@ -21,6 +30,7 @@ import MyEchart from '@/components/echarts/MyEchart.vue' import { useMonitoringPoint } from '@/views/pms/voltageSags/monitoringPoint/online/store' import { getComFlagInfoData, getRunOnlineRateData } from '@/api/device-boot/communicate' import { gradeColor } from '@/components/echarts/color' + const datePickerRef = ref() const loading = ref(true) const monitoringPoint = useMonitoringPoint() @@ -73,10 +83,6 @@ const initFirst = () => { fontWeight: 'normal' } }, - // legend: { - // data: ["在线率"], - // left: "5%", - // }, tooltip: { trigger: 'axis', axisPointer: { @@ -98,9 +104,9 @@ const initFirst = () => { tips += '时间:' + year + '-' + params[0].name + '
' for (let i = 0; i < params.length; i++) { if (params[i].value == 3.14159) { - tips += params[i].seriesName + ':暂无数据
' + tips += '在线率' + ':暂无数据
' } else { - tips += params[i].seriesName + ':' + params[i].value + '%
' + tips += '在线率' + ':' + params[i].value + '%
' } } return tips @@ -145,14 +151,21 @@ const initFirst = () => { ], series: [ { - name: '在线率', - zlevel: -99, type: 'bar', data: handle, - label: { - normal: { - show: false, - position: 'top' + itemStyle: { + color: (params: any) => { + if (params.value == 3.14159) { + return '#ccc' + } else { + if (params.value < 60) { + return gradeColor[2] + } else if (params.value < 90) { + return gradeColor[1] + } else { + return gradeColor[0] + } + } } }, markLine: { @@ -240,10 +253,6 @@ const initSecond = () => { return res } }, - legend: { - data: ['运行状态'], - left: '5%' - }, dataZoom: [ { type: 'inside', @@ -305,6 +314,7 @@ onMounted(() => {