From 74ad820dfb59ff1d316a7bf8566013cb7a296178 Mon Sep 17 00:00:00 2001 From: wangyu <823267011@qq.com> Date: Fri, 26 Jun 2026 14:38:17 +0800 Subject: [PATCH] =?UTF-8?q?feat(material):=20=E9=85=B8=E6=B4=97/=E6=BC=82?= =?UTF-8?q?=E6=B4=97=E5=AE=9E=E6=97=B6=E6=95=B0=E6=8D=AE=E5=90=88=E5=B9=B6?= =?UTF-8?q?=E4=B8=BA=E5=9D=87=E5=80=BC=EF=BC=88=E5=8E=BB=E6=8E=89=201-5=20?= =?UTF-8?q?=E7=BC=96=E5=8F=B7=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.7 --- frontend/src/views/Material.vue | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/frontend/src/views/Material.vue b/frontend/src/views/Material.vue index 9904e5f..0ec4dc7 100644 --- a/frontend/src/views/Material.vue +++ b/frontend/src/views/Material.vue @@ -493,14 +493,13 @@ export default { push('r_t', '收卷机 收卷张力', fix(this.recoiler.tension, 1), 'kN') - this.acid.forEach((a, i) => { - push(`at${i}`, `酸洗${i+1}# 槽/罐温度(公用)`, fix(a.temp, 1), '°C') - push(`al${i}`, `酸洗${i+1}# 罐液位`, fix(a.level, 2), 'm') - push(`ac${i}`, `酸洗${i+1}# 槽浓度`, fix(a.conc, 1), 'g/L') - push(`ae${i}`, `酸洗${i+1}# 槽电导率`, fix(a.cond, 1), 'mS/cm') - push(`atc${i}`,`酸洗${i+1}# 罐浓度`, fix(a.tank_conc, 1), 'g/L') - push(`ate${i}`,`酸洗${i+1}# 罐电导率`, fix(a.tank_cond, 1), 'mS/cm') - }) + const avg = (arr, k) => arr.reduce((s, x) => s + x[k], 0) / arr.length + push('at', '酸洗 槽温度均值', fix(avg(this.acid, 'temp'), 1), '°C') + push('al', '酸洗 罐液位均值', fix(avg(this.acid, 'level'), 2), 'm') + push('ac', '酸洗 槽浓度均值', fix(avg(this.acid, 'conc'), 1), 'g/L') + push('ae', '酸洗 槽电导率均值',fix(avg(this.acid, 'cond'), 1), 'mS/cm') + push('atc','酸洗 罐浓度均值', fix(avg(this.acid, 'tank_conc'), 1), 'g/L') + push('ate','酸洗 罐电导率均值',fix(avg(this.acid, 'tank_cond'), 1), 'mS/cm') push('amp', '酸雾塔 PH', fix(this.acid_mist.ph, 2), '') push('ams', '酸雾塔 变频器频率', fix(this.acid_mist.vfd_speed, 1), 'Hz') push('amc', '酸雾塔 变频器电流', fix(this.acid_mist.vfd_current,1),'A') @@ -508,15 +507,13 @@ export default { push('act', '酸侧冷凝水罐 温度', fix(this.acid_cond.temp, 1), '°C') push('acc', '酸侧冷凝水罐 电导率', fix(this.acid_cond.cond, 1), 'μS/cm') - this.rinse.forEach((r, i) => { - const t = this.rinse_tank_temp[i] - push(`rt${i}`, `漂洗${i+1}# 槽/罐温度(公用)`, fix(t, 1), '°C') - push(`rl${i}`, `漂洗${i+1}# 罐液位`, fix(r.level, 2), 'm') - push(`rc${i}`, `漂洗${i+1}# 槽浓度`, fix(r.conc, 2), 'g/L') - push(`re${i}`, `漂洗${i+1}# 槽电导率`, fix(r.cond, 2), 'μS/cm') - push(`rtc${i}`,`漂洗${i+1}# 罐浓度`, fix(r.tank_conc, 2), 'g/L') - push(`rte${i}`,`漂洗${i+1}# 罐电导率`, fix(r.tank_cond, 2), 'μS/cm') - }) + const rtAvg = this.rinse_tank_temp.reduce((s, x) => s + x, 0) / this.rinse_tank_temp.length + push('rt', '漂洗 槽温度均值', fix(rtAvg, 1), '°C') + push('rl', '漂洗 罐液位均值', fix(avg(this.rinse, 'level'), 2), 'm') + push('rc', '漂洗 槽浓度均值', fix(avg(this.rinse, 'conc'), 2), 'g/L') + push('re', '漂洗 槽电导率均值',fix(avg(this.rinse, 'cond'), 2), 'μS/cm') + push('rtc','漂洗 罐浓度均值', fix(avg(this.rinse, 'tank_conc'), 2), 'g/L') + push('rte','漂洗 罐电导率均值',fix(avg(this.rinse, 'tank_cond'), 2), 'μS/cm') push('rmp', '漂洗酸雾塔 PH', fix(this.rinse_mist.ph, 2), '') push('rms', '漂洗酸雾塔 变频器频率', fix(this.rinse_mist.vfd_speed, 1), 'Hz') push('rmc', '漂洗酸雾塔 变频器电流', fix(this.rinse_mist.vfd_current,1),'A')