From ba8a2fd69a5a0971a2be1c06d9f22719b7ec085c Mon Sep 17 00:00:00 2001 From: wangyu <823267011@qq.com> Date: Mon, 29 Jun 2026 16:48:34 +0800 Subject: [PATCH] =?UTF-8?q?fix(material):=20=E6=80=BB=E5=9B=BE=E7=84=8A?= =?UTF-8?q?=E7=BC=9D(=E5=B8=A6=E5=A4=B4)=E4=B8=8E=E7=BA=BF=E9=80=9F?= =?UTF-8?q?=E5=BA=A6=E8=B7=9F=E9=9A=8F=E5=AE=9E=E9=99=85=E5=9C=A8=E4=BA=A7?= =?UTF-8?q?=E5=8D=B7=E8=BF=9B=E5=BA=A6=EF=BC=8C=E4=B8=8D=E5=86=8D=E8=87=AA?= =?UTF-8?q?=E8=B5=B0=E5=8A=A8=E7=94=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 --- frontend/src/views/Material.vue | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/frontend/src/views/Material.vue b/frontend/src/views/Material.vue index d026fa2..5b9a9a5 100644 --- a/frontend/src/views/Material.vue +++ b/frontend/src/views/Material.vue @@ -654,14 +654,15 @@ export default { }, tick() { this.now = Date.now() - this.weld.position = (this.weld.position + 0.012) % 1 - // 新一卷开始时滚动卷号 - if (this.weld.position < 0.012) { - this.prev_coil_no = this.current.coil_no - const n = parseInt(this.current.coil_no || '26053552', 10) + 1 - this.current.coil_no = String(n) + // 焊缝(带头)位置与线速度跟随实际在产卷进度(带头 = run_length / 2000) + const pp = this.producingPlan + if (pp) { + this.weld.position = Math.max(0, Math.min(1, this.prodLength / 2000)) + this.current.speed = pp.run_speed || 0 + } else { + this.weld.position = 0 + this.current.speed = 0 } - this.current.speed = Math.max(0, rnd(this.current.speed, 4)) const wig = (o, key, amp) => { o[key] = rnd(o[key], amp) } wig(this.uncoiler, 'tension', 0.4); wig(this.uncoiler, 'speed', 2)