From 91b0ca9fb8ae3e48517dcccc6a5b96eb1100a8c9 Mon Sep 17 00:00:00 2001 From: zhaohy <1695786511@qq.com> Date: Tue, 3 Sep 2024 17:21:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E6=94=B9=E5=8D=95=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/view/alarmManagement/energyAlarm/look.vue | 10 ++++++++-- .../src/view/alarmManagement/equipmentAlarm/look.vue | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/hx-ai-intelligent/src/view/alarmManagement/energyAlarm/look.vue b/hx-ai-intelligent/src/view/alarmManagement/energyAlarm/look.vue index 9030fba..7506745 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/energyAlarm/look.vue +++ b/hx-ai-intelligent/src/view/alarmManagement/energyAlarm/look.vue @@ -133,7 +133,13 @@ type: 'shadow', }, formatter: function (params: any) { - let res = params[0].marker + ' ' + params[0].seriesName + ' : ' + params[0].data; + let res = + params[0].marker + + ' ' + + params[0].seriesName + + ' : ' + + params[0].data + + data.unit; return res; }, }, @@ -321,7 +327,7 @@ position: 'top', top: '10', formatter: function (value: any) { - return Number(energyAlarm[value.dataIndex]) + 'V'; + return Number(energyAlarm[value.dataIndex]) + data.unit; }, }, areaStyle: { diff --git a/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/look.vue b/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/look.vue index ec0de07..d8aba25 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/look.vue +++ b/hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/look.vue @@ -134,7 +134,7 @@ }, formatter: function (params: any) { let res = - params[0].marker + ' ' + params[0].seriesName + ' : ' + params[0].data + 'V'; + params[0].marker + ' ' + params[0].seriesName + ' : ' + params[0].data + data.unit; return res; }, }, @@ -210,7 +210,7 @@ axisLabel: { show: true, // 显示 formatter: function (value: any) { - return value + ' V'; // 在刻度值后加上单位 + return value + ' ' + data.unit; // 在刻度值后加上单位 }, }, },