From 4064a17cf8a22018ea4eb7c54dff4250fc5d9d6f Mon Sep 17 00:00:00 2001 From: zch Date: Mon, 19 May 2025 11:00:53 +0800 Subject: [PATCH] =?UTF-8?q?refactor(ems):=20=E5=81=9C=E6=9C=BA=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E8=B6=85=E8=BF=872=E5=B0=8F=E6=97=B6=E6=94=B9?= =?UTF-8?q?=E6=88=904=E5=B0=8F=E6=97=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将 oneHourMs常量的值从 2小时调整为 4 小时 - 此修改影响电流蒸汽曲线报表的数据处理逻辑 --- src/views/ems/report/currentSteamCurve/index.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/ems/report/currentSteamCurve/index.vue b/src/views/ems/report/currentSteamCurve/index.vue index f7a9fb1..ef2075c 100644 --- a/src/views/ems/report/currentSteamCurve/index.vue +++ b/src/views/ems/report/currentSteamCurve/index.vue @@ -484,7 +484,7 @@ export default { const markPoints = [] const markAreas = [] const powerOutages = [] - const oneHourMs = 2 * 60 * 60 * 1000 // 1小时的毫秒数 + const oneHourMs = 4 * 60 * 60 * 1000 // 4小时的毫秒数 // 遍历并处理数据 for (let i = 0; i < sortedData.length; i++) { @@ -576,7 +576,7 @@ export default { // 进一步过滤掉 NaN 值 const validNumericValues = validValues.filter(v => !isNaN(v)); - const average = validNumericValues.length > 0 ? + const average = validNumericValues.length > 0 ? (validNumericValues.reduce((a, b) => a + b, 0) / validNumericValues.length).toFixed(2) : 0 return {