fix(material): 总图焊缝(带头)与线速度跟随实际在产卷进度,不再自走动画

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-29 16:48:34 +08:00
parent 18d78d986c
commit ba8a2fd69a

View File

@@ -654,14 +654,15 @@ export default {
}, },
tick() { tick() {
this.now = Date.now() this.now = Date.now()
this.weld.position = (this.weld.position + 0.012) % 1 // 焊缝(带头)位置与线速度跟随实际在产卷进度(带头 = run_length / 2000
// 新一卷开始时滚动卷号 const pp = this.producingPlan
if (this.weld.position < 0.012) { if (pp) {
this.prev_coil_no = this.current.coil_no this.weld.position = Math.max(0, Math.min(1, this.prodLength / 2000))
const n = parseInt(this.current.coil_no || '26053552', 10) + 1 this.current.speed = pp.run_speed || 0
this.current.coil_no = String(n) } 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) } const wig = (o, key, amp) => { o[key] = rnd(o[key], amp) }
wig(this.uncoiler, 'tension', 0.4); wig(this.uncoiler, 'speed', 2) wig(this.uncoiler, 'tension', 0.4); wig(this.uncoiler, 'speed', 2)