From 8c4a0512c4d7aeef845c60e745dd8f77a4248dbd Mon Sep 17 00:00:00 2001 From: wangyu <823267011@qq.com> Date: Fri, 26 Jun 2026 14:26:57 +0800 Subject: [PATCH] =?UTF-8?q?revert(material):=20=E7=89=A9=E6=96=99=E8=B7=9F?= =?UTF-8?q?=E8=B8=AA=E9=A1=B5=E6=81=A2=E5=A4=8D=E5=88=B0=209cf422e=20?= =?UTF-8?q?=E5=B8=83=E5=B1=80=EF=BC=8C=E4=BB=85=E4=BF=9D=E7=95=99=E6=AE=B5?= =?UTF-8?q?=E4=BD=8D=E5=8C=BA=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 回退所有 Tab / 扁平化 / 瓦片网格重构(45abd35..ea39d92)。 保留两项: - SVG 总图顶部段位色带(5 段不同色) - 物料跟踪表新增「段」列 Co-Authored-By: Claude Opus 4.7 --- frontend/src/views/Material.vue | 375 +++++++++++--------------------- 1 file changed, 129 insertions(+), 246 deletions(-) diff --git a/frontend/src/views/Material.vue b/frontend/src/views/Material.vue index 38280b5..c2cb055 100644 --- a/frontend/src/views/Material.vue +++ b/frontend/src/views/Material.vue @@ -32,34 +32,69 @@ + +
+
+ 在线计划(入口队列) + 在线 {{ onlinePlans.length }} / 生产中 {{ producingPlan ? 1 : 0 }} + 点击「移动」把队列卷推到入口并开始生产 +
+
+
+ 生产中 + 冷卷号{{ producingPlan.cold_coil_no || producingPlan.plan_no }} + 钢种{{ producingPlan.steel_grade || '—' }} + 规格{{ fmt(producingPlan.product_thickness) }}×{{ fmt(producingPlan.product_width, 0) }} + 分卷{{ producingPlan.split_count || 1 }} +
+ + + + + + + + + + + + + +
冷卷号钢种厚度宽度分卷下达时间操作
{{ p.cold_coil_no || p.plan_no }}{{ p.steel_grade || '—' }}{{ fmt(p.product_thickness) }}{{ fmt(p.product_width, 0) }}{{ p.split_count || 1 }}{{ fmtTime(p.plan_date) }} + +
+
暂无在线计划
+
+
+
推拉酸洗线 - 物料跟踪总图
- - + + - - - + + {{ s.name }} - + - {{ eq.label }} + {{ eq.label }} - - + + - + - + @@ -225,7 +260,7 @@ - + 焊缝位置 {{ (weld.position * 100).toFixed(1) }}% @@ -240,80 +275,60 @@
- -
-
- 入口段·在线计划 - 生产中 {{ producingPlan.cold_coil_no || producingPlan.plan_no }} - 无在线生产 - {{ onlinePlans.length }} 卷待入 -
-
-
- 在线 - {{ p.cold_coil_no || p.plan_no }} - {{ p.steel_grade || '—' }} - {{ fmt(p.product_thickness) }}×{{ fmt(p.product_width, 0) }} - 分{{ p.split_count || 1 }} - + +
+
+
物料跟踪表 共 {{ equipments.length }} 台设备
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
#设备状态当前钢卷辊缝 (mm)速度张力/温度
{{ i + 1 }}{{ eq.section }}{{ eq.label }} + 加工中 + 已过 + 待入 + {{ rowOf(eq, i).coil }}{{ rowOf(eq, i).gap }}{{ rowOf(eq, i).speed }}{{ rowOf(eq, i).aux }}
+
+
+
+ +
+
实时数据 {{ rtItems.length }} 项
+
+
+
+ {{ it.label }} + {{ it.val }} + {{ it.unit }} +
+
-
暂无队列
- - -
-
-
{{ t.section }}
-
{{ t.label }}
-
{{ t.val }}{{ t.unit }}
-
-
- - -
-
- 物料跟踪表 - {{ equipments.length }} 台设备 · 焊缝 {{ (weld.position*100).toFixed(1) }}% -
-
- - - - - - - - - - - - - - - - - - - - - - - - - -
#设备状态当前钢卷辊缝速度辅助
{{ i + 1 }} - {{ eq.section }} - {{ eq.label }} - 加工中 - 已过 - 待入 - {{ rowOf(eq, i).coil }}{{ rowOf(eq, i).gap }}{{ rowOf(eq, i).speed }}{{ rowOf(eq, i).aux }}
-
-
- -
@@ -413,92 +428,6 @@ export default { } }, computed: { - allTiles() { - const f = (v, n=1) => Number(v).toFixed(n) - const c = (s) => SECTION_COLORS[s] || '#9aa8b6' - const out = [] - const push = (section, label, val, unit) => out.push({ - k: section + ':' + label, section, color: c(section), label, val, unit, - }) - // 入口段 - push('入口段', '开卷张力', f(this.uncoiler.tension, 1), 'kN') - push('入口段', '工艺段速度', f(this.current.speed, 1), 'm/min') - push('入口段', '开卷机速度', f(this.uncoiler.speed, 1), 'm/min') - push('入口段', '开卷机卷径', f(this.uncoiler.diameter, 0),'mm') - push('入口段', '开卷机电流', f(this.uncoiler.current, 0), 'A') - push('入口段', '开卷机扭矩', f(this.uncoiler.torque, 2), 'kN·m') - push('入口段', '矫直机速度', f(this.straightener.speed, 1), 'm/min') - push('入口段', '矫直机辊缝', f(this.straightener.gap, 2), 'mm') - push('入口段', '矫直机电流', f(this.straightener.current, 0),'A') - push('入口段', '矫直机扭矩', f(this.straightener.torque, 2), 'kN·m') - push('入口段', '1#夹送辊速度', f(this.br1.speed, 1), 'm/min') - push('入口段', '1#夹送辊辊缝', f(this.br1.gap, 2), 'mm') - // 酸洗段:5 槽 - this.acid.forEach((a, i) => { - const t = (i+1) + '#酸槽 ' - push('酸洗段', t + '温度', f(a.temp, 1), '°C') - push('酸洗段', t + '浓度', f(a.conc, 1), 'g/L') - push('酸洗段', t + '液位', f(a.level, 2), 'm') - push('酸洗段', t + '电导率', f(a.cond, 1), 'mS/cm') - }) - push('酸洗段', '酸雾塔 PH', f(this.acid_mist.ph, 2), '') - push('酸洗段', '酸雾变频频率', f(this.acid_mist.vfd_speed, 1), 'Hz') - push('酸洗段', '酸雾变频电流', f(this.acid_mist.vfd_current, 1), 'A') - push('酸洗段', '冷凝罐液位', f(this.acid_cond.level, 2), 'm') - push('酸洗段', '冷凝罐温度', f(this.acid_cond.temp, 1), '°C') - push('酸洗段', '冷凝电导率', f(this.acid_cond.cond, 1), 'μS/cm') - // 清洗段:5 级 - this.rinse.forEach((r, i) => { - const t = (i+1) + '#漂洗 ' - push('清洗段', t + '温度', f(this.rinse_tank_temp[i], 1), '°C') - push('清洗段', t + '浓度', f(r.conc, 2), 'g/L') - push('清洗段', t + '液位', f(r.level, 2), 'm') - push('清洗段', t + '电导率', f(r.cond, 2), 'μS/cm') - }) - push('清洗段', '漂洗雾塔 PH', f(this.rinse_mist.ph, 2), '') - push('清洗段', '雾塔变频频率', f(this.rinse_mist.vfd_speed, 1), 'Hz') - push('清洗段', '雾塔变频电流', f(this.rinse_mist.vfd_current, 1), 'A') - push('清洗段', '冷凝液位', f(this.rinse_cond.level, 2), 'm') - push('清洗段', '冷凝温度', f(this.rinse_cond.temp, 1), '°C') - push('清洗段', '冷凝电导率', f(this.rinse_cond.cond, 2), 'μS/cm') - // 烘干段 - push('烘干段', '烘干1段', f(this.dryer.t1, 0), '°C') - push('烘干段', '烘干2段', f(this.dryer.t2, 0), '°C') - push('烘干段', '烘干3段', f(this.dryer.t3, 0), '°C') - // 出口段 - this.tension_vfd.forEach((v, i) => { - const t = '三辊VFD-' + (i+1) + ' ' - push('出口段', t + '速度', f(v.speed, 1), 'm/min') - push('出口段', t + '电流', f(v.current, 0), 'A') - push('出口段', t + '扭矩', f(v.torque, 2), 'kN·m') - }) - push('出口段', '平整辊缝', f(this.leveler.gap, 2), 'mm') - push('出口段', '平整轧制力', f(this.leveler.force, 0), 'kN') - push('出口段', '平整延伸率', f(this.leveler.elongation, 2), '%') - push('出口段', '收卷张力', f(this.recoiler.tension, 1), 'kN') - push('出口段', '收卷直径', f(this.recoiler.diameter, 0), 'mm') - push('出口段', '收卷速度', f(this.recoiler.speed, 1), 'm/min') - return out - }, - entryItems() { - const f = (v, n=1) => Number(v).toFixed(n) - return [ - { k:'u_t', label:'开卷机张力', val: f(this.uncoiler.tension, 1), unit:'kN' }, - { k:'p_s', label:'工艺段速度', val: f(this.current.speed, 1), unit:'m/min' }, - { k:'u_s', label:'开卷机速度', val: f(this.uncoiler.speed, 1), unit:'m/min' }, - { k:'u_d', label:'开卷机卷径', val: f(this.uncoiler.diameter, 0),unit:'mm' }, - { k:'u_c', label:'开卷机电流', val: f(this.uncoiler.current, 0), unit:'A' }, - { k:'u_q', label:'开卷机扭矩', val: f(this.uncoiler.torque, 2), unit:'kN·m' }, - { k:'st_s',label:'九辊矫直机 速度', val: f(this.straightener.speed, 1), unit:'m/min' }, - { k:'st_g',label:'九辊矫直机 辊缝', val: f(this.straightener.gap, 2), unit:'mm' }, - { k:'st_c',label:'九辊矫直机 电流', val: f(this.straightener.current, 0),unit:'A' }, - { k:'st_q',label:'九辊矫直机 扭矩', val: f(this.straightener.torque, 2), unit:'kN·m' }, - { k:'b1s', label:'1号夹送辊 速度', val: f(this.br1.speed, 1), unit:'m/min' }, - { k:'b1g', label:'1号夹送辊 辊缝', val: f(this.br1.gap, 2), unit:'mm' }, - { k:'b1c', label:'1号夹送辊 电流', val: f(this.br1.current, 0), unit:'A' }, - { k:'b1q', label:'1号夹送辊 扭矩', val: f(this.br1.torque, 2), unit:'kN·m' }, - ] - }, onlinePlans() { return this.plans.filter(p => p.status === 'online') }, producingPlan() { return this.plans.find(p => p.status === 'producing') || null }, equipments() { @@ -509,20 +438,18 @@ export default { }, sections() { const eqs = this.equipments + if (!eqs.length) return [] const groups = [] let cur = null eqs.forEach((e, i) => { if (!cur || cur.name !== e.section) { if (cur) groups.push(cur) cur = { name: e.section, color: SECTION_COLORS[e.section] || '#9aa8b6', - startIdx: i, endIdx: i, x0: e.x, x1: e.x } - } else { - cur.endIdx = i - cur.x1 = e.x - } + x0: e.x, x1: e.x } + } else { cur.x1 = e.x } }) if (cur) groups.push(cur) - const half = (eqs[1].x - eqs[0].x) / 2 + const half = eqs.length > 1 ? (eqs[1].x - eqs[0].x) / 2 : 30 return groups.map(g => ({ ...g, bandX: g.x0 - half + 4, @@ -567,7 +494,7 @@ 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(`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') @@ -583,7 +510,7 @@ export default { this.rinse.forEach((r, i) => { const t = this.rinse_tank_temp[i] - push(`rt${i}`, `漂洗${i+1}# 槽温度`, fix(t, 1), '°C') + 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') @@ -610,7 +537,6 @@ export default { }, methods: { fmt(v, n = 2) { return v != null && v !== '' ? Number(v).toFixed(n) : '—' }, - fix(v, n = 1) { return Number(v).toFixed(n) }, sectionColor(s) { return SECTION_COLORS[s] || '#9aa8b6' }, fmtTime(t) { return t ? t.slice(0, 16).replace('T', ' ') : '—' }, async loadPlans() { @@ -754,12 +680,7 @@ export default {