agentworkshop 0.7.17 → 0.7.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/{BJem8_v5.js → BOJaHO5V.js} +4 -4
  3. package/.output/public/_nuxt/B_C3GLsD.js +1 -0
  4. package/.output/public/_nuxt/_id_.IbmpkhH4.css +1 -0
  5. package/.output/public/_nuxt/builds/latest.json +1 -1
  6. package/.output/public/_nuxt/builds/meta/7894c281-50fb-4f00-849f-32749ec2431c.json +1 -0
  7. package/.output/public/_nuxt/{entry.BNApuuEW.css → entry.DRUzDwmX.css} +1 -1
  8. package/.output/server/chunks/_/nitro.mjs +626 -571
  9. package/.output/server/chunks/build/{_id_-DvJZ5Qis.mjs → _id_-Bs-euJPu.mjs} +178 -131
  10. package/.output/server/chunks/build/_id_-Bs-euJPu.mjs.map +1 -0
  11. package/.output/server/chunks/routes/renderer.mjs +1 -1
  12. package/.output/server/chunks/virtual/entry.mjs +9 -1
  13. package/.output/server/chunks/virtual/precomputed.mjs +1 -1
  14. package/.output/server/package.json +1 -1
  15. package/app/pages/dcw/[id].vue +56 -6
  16. package/i18n/locales/en.ts +4 -0
  17. package/i18n/locales/zh-CN.ts +4 -0
  18. package/package.json +148 -148
  19. package/scripts/_dbg-live-line-e2e.mjs +279 -0
  20. package/scripts/_dbg-mqtt-publisher.mjs +17 -0
  21. package/scripts/_dbg-pg-tcp-probe.cjs +27 -0
  22. package/scripts/_dbg-recipe-stale-e2e.mjs +135 -0
  23. package/server/data/daqs.json +611 -86
  24. package/server/data/dcw-lines.json +28 -28
  25. package/server/data/dcw-products.json +28 -7
  26. package/server/data/dcw-recipes.json +109 -14
  27. package/server/data/dcw-rollback.json +1389 -9
  28. package/server/data/dcw-runs.json +625 -365
  29. package/server/data/dcw-writes.json +576 -0
  30. package/server/data/dcws.json +819 -316
  31. package/server/data/line-runs.json +54 -14
  32. package/server/services/workshop/agents/industrial-tools.ts +52 -18
  33. package/server/services/workshop/dcw/dcw-controller.ts +11 -1
  34. package/server/services/workshop/dcw/dcw-recipe.repo.ts +21 -6
  35. package/.output/public/_nuxt/DtM4RX5T.js +0 -1
  36. package/.output/public/_nuxt/_id_.pF-B9O6u.css +0 -1
  37. package/.output/public/_nuxt/builds/meta/6a0a88de-639e-4e7b-b7c1-7f4034e04787.json +0 -1
  38. package/.output/server/chunks/build/_id_-DvJZ5Qis.mjs.map +0 -1
@@ -7,7 +7,7 @@
7
7
  "productId": "pd-6348a595",
8
8
  "productName": "0.8mm 光学膜",
9
9
  "startedAt": "2026-09-03T11:18:01.213Z",
10
- "taggedSamples": 51246
10
+ "taggedSamples": 56251
11
11
  },
12
12
  {
13
13
  "lineId": "ln-9a60a0cd",
@@ -17,7 +17,7 @@
17
17
  "productId": "pd-e712875d",
18
18
  "productName": "闭环验证产品",
19
19
  "startedAt": "2026-09-03T16:03:27.304Z",
20
- "taggedSamples": 179
20
+ "taggedSamples": 635
21
21
  },
22
22
  {
23
23
  "lineId": "ln-b33a3105",
@@ -27,7 +27,7 @@
27
27
  "productId": "pd-16eecb35",
28
28
  "productName": "闭环验证产品",
29
29
  "startedAt": "2026-09-03T16:39:22.962Z",
30
- "taggedSamples": 179
30
+ "taggedSamples": 635
31
31
  },
32
32
  {
33
33
  "lineId": "ln-1aedc305",
@@ -37,7 +37,7 @@
37
37
  "productId": "pd-9c755781",
38
38
  "productName": "闭环验证产品",
39
39
  "startedAt": "2026-09-03T16:44:33.199Z",
40
- "taggedSamples": 179
40
+ "taggedSamples": 635
41
41
  },
42
42
  {
43
43
  "lineId": "ln-758658dc",
@@ -47,7 +47,7 @@
47
47
  "productId": "pd-835aed90",
48
48
  "productName": "闭环验证产品",
49
49
  "startedAt": "2026-09-03T17:12:52.205Z",
50
- "taggedSamples": 179
50
+ "taggedSamples": 635
51
51
  },
52
52
  {
53
53
  "lineId": "ln-1b318320",
@@ -57,7 +57,7 @@
57
57
  "productId": "pd-db432902",
58
58
  "productName": "探针产品",
59
59
  "startedAt": "2026-09-04T05:08:10.103Z",
60
- "taggedSamples": 18085
60
+ "taggedSamples": 20359
61
61
  },
62
62
  {
63
63
  "lineId": "ln-6a34fbc7",
@@ -67,7 +67,7 @@
67
67
  "productId": "pd-10cfc2b3",
68
68
  "productName": "全协议产品-mtnynfph",
69
69
  "startedAt": "2026-09-05T05:47:26.453Z",
70
- "taggedSamples": 53067
70
+ "taggedSamples": 66191
71
71
  },
72
72
  {
73
73
  "lineId": "ln-419463e0",
@@ -77,7 +77,7 @@
77
77
  "productId": "pd-b9b15b64",
78
78
  "productName": "全协议产品-mtnzg090",
79
79
  "startedAt": "2026-09-05T06:09:36.931Z",
80
- "taggedSamples": 53034
80
+ "taggedSamples": 66143
81
81
  },
82
82
  {
83
83
  "lineId": "ln-3548f325",
@@ -87,7 +87,7 @@
87
87
  "productId": "pd-fd822802",
88
88
  "productName": "runp3-prod",
89
89
  "startedAt": "2026-09-05T07:23:51.972Z",
90
- "taggedSamples": 4762
90
+ "taggedSamples": 6941
91
91
  },
92
92
  {
93
93
  "lineId": "ln-c3a7ba01",
@@ -107,7 +107,7 @@
107
107
  "productId": "pd-d547a376",
108
108
  "productName": "pp-prod",
109
109
  "startedAt": "2026-09-05T09:47:55.526Z",
110
- "taggedSamples": 6231
110
+ "taggedSamples": 8070
111
111
  },
112
112
  {
113
113
  "lineId": "ln-1acc1a0c",
@@ -117,7 +117,7 @@
117
117
  "productId": "pd-3adf854f",
118
118
  "productName": "lx8-prod",
119
119
  "startedAt": "2026-09-06T02:22:23.209+08:00",
120
- "taggedSamples": 5025
120
+ "taggedSamples": 7300
121
121
  },
122
122
  {
123
123
  "lineId": "ln-917490c1",
@@ -127,7 +127,7 @@
127
127
  "productId": "pd-75752beb",
128
128
  "productName": "lx8-prod",
129
129
  "startedAt": "2026-09-06T02:24:50.582+08:00",
130
- "taggedSamples": 4884
130
+ "taggedSamples": 7159
131
131
  },
132
132
  {
133
133
  "lineId": "ln-24dedf82",
@@ -137,7 +137,7 @@
137
137
  "productId": "pd-f0436841",
138
138
  "productName": "模拟器产品-mtpsdote",
139
139
  "startedAt": "2026-09-06T20:27:23.270+08:00",
140
- "taggedSamples": 2687
140
+ "taggedSamples": 11785
141
141
  },
142
142
  {
143
143
  "lineId": "ln-9d5f8b3d",
@@ -147,7 +147,7 @@
147
147
  "productId": "pd-8f6910a4",
148
148
  "productName": "模拟器产品-mtpt1b1w",
149
149
  "startedAt": "2026-09-06T20:45:45.440+08:00",
150
- "taggedSamples": 3567
150
+ "taggedSamples": 12665
151
151
  },
152
152
  {
153
153
  "lineId": "ln-62776cae",
@@ -157,6 +157,46 @@
157
157
  "productId": "pd-e2b76cd7",
158
158
  "productName": "模拟器产品-mtptla26",
159
159
  "startedAt": "2026-09-06T21:01:14.334+08:00",
160
+ "taggedSamples": 9098
161
+ },
162
+ {
163
+ "lineId": "ln-34c7c3c4",
164
+ "runId": "rr-68ca9ad9",
165
+ "recipeId": "rc-3eb637cf",
166
+ "recipeName": "模拟器配方-mtpy8ms3",
167
+ "productId": "pd-e883e141",
168
+ "productName": "模拟器产品-mtpy8ms3",
169
+ "startedAt": "2026-09-06T23:11:26.035+08:00",
170
+ "taggedSamples": 11366
171
+ },
172
+ {
173
+ "lineId": "ln-b6fb7977",
174
+ "runId": "rr-42cac5c5",
175
+ "recipeId": "rc-fb374716",
176
+ "recipeName": "工艺A-lvm7y4",
177
+ "productId": "pd-15eb1047",
178
+ "productName": "模拟产品-lvm7y4",
179
+ "startedAt": "2026-09-07T00:25:33.715+08:00",
160
180
  "taggedSamples": 0
181
+ },
182
+ {
183
+ "lineId": "ln-0990d7ef",
184
+ "runId": "rr-ce45245a",
185
+ "recipeId": "rc-a1663470",
186
+ "recipeName": "工艺A-lvcdpk",
187
+ "productId": "pd-c07fe4fd",
188
+ "productName": "模拟产品-lvcdpk",
189
+ "startedAt": "2026-09-07T00:33:08.964+08:00",
190
+ "taggedSamples": 0
191
+ },
192
+ {
193
+ "lineId": "ln-7d9b5608",
194
+ "runId": "rr-c7d1eb16",
195
+ "recipeId": "rc-3be1e647",
196
+ "recipeName": "工艺A-lv3ros",
197
+ "productId": "pd-616de77a",
198
+ "productName": "模拟产品-lv3ros",
199
+ "startedAt": "2026-09-07T00:43:16.369+08:00",
200
+ "taggedSamples": 1127
161
201
  }
162
202
  ]
@@ -106,6 +106,10 @@ export async function toolDcwControl(agentId: string, args: { node_id?: string,
106
106
  repo.removeAgentNode(agentId, nodeId, 'dcw')
107
107
  return { text: `数控节点 ${nodeId} 已不存在(可能被删除),原绑定已自动清理,请重新绑定。`, isError: true }
108
108
  }
109
+ // 停用/解绑守卫:停用节点拒绝下发(与手动/配方同源语义,给出恢复路径)
110
+ if (!node.enabled) {
111
+ return { text: `节点「${node.name}」已停用(控制已暂停),无法下发。请先让用户在产线/数采界面恢复该节点的控制,或改派其他节点。`, isError: true }
112
+ }
109
113
  // 停线守卫:产线未开跑时手动写允许(调试),但提示当前无配方窗口约束
110
114
  const tpl = findDcwTemplate(node.templateKey)
111
115
 
@@ -517,6 +521,15 @@ function agentOpsScope(agentId: string): { lineIds: string[], nodeIds: Set<strin
517
521
  return { lineIds: [...lineIds], nodeIds }
518
522
  }
519
523
 
524
+ /** 配方参数的节点失效态(数据一致性展示/Agent 提示共用):null=正常 */
525
+ function nodeRefStatus(nodeId: string, lineId: string): { code: 'deleted' | 'disabled' | 'unbound', label: string } | null {
526
+ const node = getDcwController().byId(nodeId)
527
+ if (!node) return { code: 'deleted', label: '已删除' }
528
+ if (!node.enabled) return { code: 'disabled', label: '已停用' }
529
+ if (node.lineId !== lineId) return { code: 'unbound', label: '已取消绑定' }
530
+ return null
531
+ }
532
+
520
533
  const OPS_ACTOR_LABEL: Record<string, string> = { agent: 'Agent', user: '用户', system: '系统' }
521
534
 
522
535
  function fmtAuditAt(iso: string): string {
@@ -664,9 +677,11 @@ export async function toolLineContext(agentId: string, args: { line_id?: string
664
677
  for (const p of recipe.params) {
665
678
  const node = getDcwController().byId(p.nodeId)
666
679
  const mine = myDcw.some(n => n!.id === p.nodeId)
680
+ const stale = nodeRefStatus(p.nodeId, recipe.lineId)
681
+ const staleTag = stale ? ` [${stale.label},参数不下发]` : ''
667
682
  const cur = node?.value != null ? node.value : '?'
668
683
  const win = p.min != null || p.max != null ? `(窗口 ${p.min ?? '-∞'}~${p.max ?? '+∞'})` : ''
669
- parts.push(` · ${node?.name ?? p.nodeId} = ${p.value}${node?.unit ?? ''}${win} | PLC 当前 ${cur}${node?.unit ?? ''}${mine ? ' [我负责]' : ''}`)
684
+ parts.push(` · ${node?.name ?? p.nodeId} = ${p.value}${node?.unit ?? ''}${win} | PLC 当前 ${cur}${node?.unit ?? ''}${mine ? ' [我负责]' : ''}${staleTag}`)
670
685
  }
671
686
  const good = recipe.lastGoodRunId ? getDcwRecipeRepo().runById(recipe.lastGoodRunId) : undefined
672
687
  parts.push(` 已知良好批次:${good ? `${good.id.slice(0, 8)}(${good.startedAt.slice(0, 19).replace('T', ' ')})` : '未标记'};当前参数版本 v${recipe.version ?? 1}`)
@@ -684,7 +699,9 @@ export async function toolLineContext(agentId: string, args: { line_id?: string
684
699
  const pp = r.params.map((p) => {
685
700
  const node = getDcwController().byId(p.nodeId)
686
701
  const cur = node?.value != null ? node.value : '?'
687
- return `${node?.name ?? p.nodeId}=${p.value}${node?.unit ?? ''}(PLC 当前 ${cur})`
702
+ const stale = nodeRefStatus(p.nodeId, r.lineId)
703
+ const tag = stale ? `[${stale.label},参数不下发]` : ''
704
+ return `${node?.name ?? p.nodeId}=${p.value}${node?.unit ?? ''}(PLC 当前 ${cur})${tag}`
688
705
  }).join(', ')
689
706
  parts.push(` · 配方「${r.name}」(${r.id}) v${r.version ?? 1} · 产品「${product?.name ?? r.productId}」: ${pp}${r.lastGoodRunId ? ` [良好批次 ${r.lastGoodRunId.slice(0, 8)}]` : ''}`)
690
707
  }
@@ -716,11 +733,15 @@ export async function toolRecipeVersions(agentId: string, args: { recipe_id?: st
716
733
  const prev = shown[i - 1]
717
734
  let diff = '初始版本'
718
735
  if (prev) {
736
+ const nodeName = (id: string): string => {
737
+ const n = getDcwController().byId(id)
738
+ return n ? n.name : `${id}(已删除)`
739
+ }
719
740
  const changed = v.params
720
741
  .map(p => ({ p, old: prev.params.find(x => x.nodeId === p.nodeId) }))
721
742
  .filter(({ p, old }) => !old || old.value !== p.value)
722
- .map(({ p, old }) => `${getDcwController().byId(p.nodeId)?.name ?? p.nodeId} ${old?.value ?? '新增'}→${p.value}`)
723
- const removed = prev.params.filter(o => !v.params.some(x => x.nodeId === o.nodeId)).map(o => `${o.nodeId} 移除`)
743
+ .map(({ p, old }) => `${nodeName(p.nodeId)} ${old?.value ?? '新增'}→${p.value}`)
744
+ const removed = prev.params.filter(o => !v.params.some(x => x.nodeId === o.nodeId)).map(o => `${nodeName(o.nodeId)} 移除`)
724
745
  const all = [...changed, ...removed]
725
746
  diff = all.length > 0 ? `变更:${all.join(';')}` : '参数未变'
726
747
  }
@@ -752,23 +773,35 @@ export async function toolRecipeUpdate(agentId: string, args: {
752
773
  for (const p of list) {
753
774
  const nodeId = String(p.node_id).trim()
754
775
  const node = getDcwController().byId(nodeId)
755
- if (!node) return { text: `节点 ${nodeId} 不存在。`, isError: true }
756
- if (node.lineId !== recipe.lineId) return { text: `节点「${node.name}」不属于配方「${recipe.name}」所在产线,不可混入。`, isError: true }
776
+ if (!node) return { text: `节点 ${nodeId} 已删除,不能作为配方参数保存。请改用仍在线的节点。`, isError: true }
777
+ if (node.lineId !== recipe.lineId) return { text: `节点「${node.name}」已取消绑定(不在配方「${recipe.name}」所在产线),不可混入。`, isError: true }
778
+ if (!node.enabled) return { text: `节点「${node.name}」已停用,参数保存被拒。请先让用户恢复节点控制,或保存到其他节点。`, isError: true }
757
779
  if (!repo.find(agentId, nodeId, 'dcw')) {
758
780
  return { text: `无权修改节点「${node.name}」的配方参数(仅可改自己绑定 dcw 的节点)。`, isError: true }
759
781
  }
760
782
  }
761
- // 部分合并:只更新提供的节点,其余参数保持不变
762
- const merged = recipe.params.map((p) => {
763
- const patch = list.find(x => String(x.node_id).trim() === p.nodeId)
764
- if (!patch) return { nodeId: p.nodeId, templateRef: p.templateRef, value: p.value, min: p.min, max: p.max }
765
- const out: { nodeId: string, templateRef?: string, value: number, min?: number, max?: number } = { nodeId: p.nodeId, templateRef: p.templateRef, value: Number(patch.value) }
766
- if (p.min != null) out.min = p.min
767
- if (patch.min != null && Number.isFinite(Number(patch.min))) out.min = Number(patch.min)
768
- if (p.max != null) out.max = p.max
769
- if (patch.max != null && Number.isFinite(Number(patch.max))) out.max = Number(patch.max)
770
- return out
771
- })
783
+ // 部分合并:只更新提供的节点,其余参数保持不变;
784
+ // 基线中的失效参数(节点已删除/已解绑/已改挂)自动剪除并如实告知 —— 否则整次保存会被归一化拒绝
785
+ const dropped: string[] = []
786
+ const merged = recipe.params
787
+ .filter((p) => {
788
+ const node = getDcwController().byId(p.nodeId)
789
+ if (!node || node.lineId !== recipe.lineId) {
790
+ dropped.push(node?.name ?? p.nodeId)
791
+ return false
792
+ }
793
+ return true
794
+ })
795
+ .map((p) => {
796
+ const patch = list.find(x => String(x.node_id).trim() === p.nodeId)
797
+ if (!patch) return { nodeId: p.nodeId, templateRef: p.templateRef, value: p.value, min: p.min, max: p.max }
798
+ const out: { nodeId: string, templateRef?: string, value: number, min?: number, max?: number } = { nodeId: p.nodeId, templateRef: p.templateRef, value: Number(patch.value) }
799
+ if (p.min != null) out.min = p.min
800
+ if (patch.min != null && Number.isFinite(Number(patch.min))) out.min = Number(patch.min)
801
+ if (p.max != null) out.max = p.max
802
+ if (patch.max != null && Number.isFinite(Number(patch.max))) out.max = Number(patch.max)
803
+ return out
804
+ })
772
805
  const extra = list.filter(p => !recipe.params.some(x => x.nodeId === String(p.node_id).trim()))
773
806
  for (const p of extra) merged.push({ nodeId: String(p.node_id).trim(), value: Number(p.value) })
774
807
  try {
@@ -783,8 +816,9 @@ export async function toolRecipeUpdate(agentId: string, args: {
783
816
  const before = recipe.params.find(x => x.nodeId === String(p.node_id).trim())?.value
784
817
  return `${node?.name ?? p.node_id} ${before ?? '?'}→${Number(p.value)}`
785
818
  }).join(';')
819
+ const droppedNote = dropped.length > 0 ? `\n注意:已自动剔除失效参数(${dropped.join('、')}:节点已删除或改挂其他产线),这些参数不再属于本配方。` : ''
786
820
  return {
787
- text: `已保存为 v${updated.version ?? 1}:「${updated.name}」参数 ${changedNodes};原因:${reason}。\n注意:配方定义已更新,运行中批次仍按开跑时冻结的参数生产,新参数从下次开跑/一键下发生效;要把新值写入运行中的 PLC,用 dcw_control 逐节点下发(走安全联锁)。回退用 recipe_rollback。`,
821
+ text: `已保存为 v${updated.version ?? 1}:「${updated.name}」参数 ${changedNodes};原因:${reason}。${droppedNote}\n注意:配方定义已更新,运行中批次仍按开跑时冻结的参数生产,新参数从下次开跑/一键下发生效;要把新值写入运行中的 PLC,用 dcw_control 逐节点下发(走安全联锁)。回退用 recipe_rollback。`,
788
822
  }
789
823
  }
790
824
  catch (err) {
@@ -630,7 +630,17 @@ class DcwController {
630
630
  for (const param of recipe.params) {
631
631
  const node = param.nodeId ? this.repo.byId(param.nodeId) : undefined
632
632
  if (!node) {
633
- results.push({ templateRef: param.templateRef ?? param.nodeId, nodeId: null, ok: false, message: `目标控制节点不存在(${param.nodeId}),参数未下发`, value: param.value })
633
+ results.push({ templateRef: param.templateRef ?? param.nodeId, nodeId: null, ok: false, message: `已跳过:节点 ${param.nodeId} 已删除,参数未下发`, value: param.value })
634
+ continue
635
+ }
636
+ // 停用/解绑守卫:节点已停用或已不在配方所属产线(被解绑/改挂)→ 不下发,
637
+ // 明确记因(run.results 可见),其余参数照常
638
+ if (!node.enabled) {
639
+ results.push({ templateRef: node.templateRef, nodeId: node.id, ok: false, message: `已跳过:节点「${node.name}」已停用,参数未下发`, value: param.value })
640
+ continue
641
+ }
642
+ if (node.lineId !== recipe.lineId) {
643
+ results.push({ templateRef: node.templateRef, nodeId: node.id, ok: false, message: `已跳过:节点「${node.name}」已取消绑定(${node.lineId ? '已改挂其他产线' : '已从产线移除'}),参数未下发`, value: param.value })
634
644
  continue
635
645
  }
636
646
  try {
@@ -228,18 +228,20 @@ class DcwRecipeRepo {
228
228
  /**
229
229
  * 回退配方参数到指定历史版本(或已知良好批次快照),生成新版本(非破坏,历史完整保留)。
230
230
  * target: { version: N } = 回到 vN 的参数;{ toLastGood: true } = 回到 lastGood 批次的参数冻结。
231
+ * 失效参数剪枝:目标快照里已删除/已改挂其他产线的节点参数先剔除(否则归一化整体失败),
232
+ * 剔除动作如实记录进版本描述。
231
233
  */
232
234
  revertToVersion(id: string, target: { version?: number, toLastGood?: boolean }, meta: RecipeUpdateMeta): RecipeView {
233
235
  const r = this.byId(id)
234
236
  if (!r) throw new AppError(404, ErrorCodes.NOT_FOUND, `Recipe 不存在: ${id}`)
235
- let snapshot: RecipeParam[] | undefined
237
+ let snapshot: RecipeParam[]
236
238
  let desc: string
237
239
  if (target.toLastGood) {
238
240
  const run = r.lastGoodRunId ? this.runById(r.lastGoodRunId) : undefined
239
241
  if (!run?.paramsSnapshot?.length) {
240
242
  throw new AppError(409, ErrorCodes.CONFLICT, `配方「${r.name}」无可回退的良好批次(先标记 lastGood 或指定 version)`)
241
243
  }
242
- snapshot = normParams(run.paramsSnapshot, r.lineId)
244
+ snapshot = run.paramsSnapshot
243
245
  desc = `回退到已知良好批次 ${run.id.slice(0, 8)} 的参数冻结`
244
246
  }
245
247
  else {
@@ -256,10 +258,23 @@ class DcwRecipeRepo {
256
258
  if (JSON.stringify(snapshot) === JSON.stringify(r.params)) {
257
259
  throw new AppError(409, ErrorCodes.CONFLICT, `目标版本参数与当前 v${r.version ?? 1} 完全一致,无需回退`)
258
260
  }
259
- const out = this.update(id, {
260
- params: snapshot.map(p => ({ nodeId: p.nodeId, templateRef: p.templateRef, value: p.value, min: p.min, max: p.max })),
261
- }, { ...meta, description: `${meta.description ? `${meta.description};` : ''}${desc}` })
262
- return out
261
+ // 失效参数剪枝:已删除节点、已解绑/已改挂其他产线的节点参数剔除(不自动收编,尊重显式解绑)
262
+ const stale = snapshot.filter((p) => {
263
+ const node = getDcwNodeRepo().byId(p.nodeId)
264
+ return !node || node.lineId !== r.lineId
265
+ })
266
+ const usable = snapshot.filter(p => !stale.some(s => s.nodeId === p.nodeId))
267
+ if (usable.length === 0) {
268
+ throw new AppError(409, ErrorCodes.CONFLICT, '目标版本的全部参数节点均已删除或解绑,无可恢复内容')
269
+ }
270
+ let fullDesc = `${meta.description ? `${meta.description};` : ''}${desc}`
271
+ if (stale.length > 0) {
272
+ const names = stale.map(s => getDcwNodeRepo().byId(s.nodeId)?.name ?? s.nodeId).join('、')
273
+ fullDesc += `;已剔除失效参数(${names}:节点已删除或解绑)`
274
+ }
275
+ return this.update(id, {
276
+ params: usable.map(p => ({ nodeId: p.nodeId, templateRef: p.templateRef, value: p.value, min: p.min, max: p.max })),
277
+ }, { ...meta, description: fullDesc })
263
278
  }
264
279
 
265
280
  /** 参数版本历史(旧→新;含当前版尾部) */
@@ -1 +0,0 @@
1
- import{H as e,U as t,W as n,q as r}from"./rqZ-1SoP.js";import{B as i,C as a,G as o,H as s,Ht as c,St as l,Ut as ee,Wt as u,a as d,b as f,f as p,ft as m,g as h,h as g,mt as _,nt as te,p as v,rt as y,t as b,x as ne}from"./BSCpFtzG.js";import{a as re}from"./vJ4FPb-_.js";import{t as ie}from"./D8CqF0yy.js";import{n as ae}from"./BeIfu4N3.js";import{t as oe}from"./C9f8QMp12.js";import{t as x}from"./G0qIw7Gq2.js";import{n as se,t as ce}from"./DAR70Lf5.js";import{t as le}from"./DBXhDLgl.js";import{t as ue}from"./BWC4HQHQ.js";var de={key:0,class:`page`},fe={class:`banner bad`},pe={key:1,class:`page`},me={class:`aw-page-head`},he={class:`aw-kicker`},ge={class:`sub`},_e={class:`badges mono`},ve={class:`badge`},ye={class:`badge`},be={class:`badge`},xe={class:`aw-tile ctrl-card`},Se={class:`ctrl-left`},Ce=[`title`],we={class:`ctrl-right`},Te={class:`ctrl-metrics mono`},Ee=[`title`],De=[`title`],Oe=[`title`],ke={key:1,class:`aw-tile adopt-card`},Ae={class:`adopt-title`},je={class:`adopt-list`},Me=[`onClick`],Ne=[`onClick`],Pe={class:`aw-tile line-card`},Fe={class:`line-status`},Ie={class:`line-info`},Le={key:0,class:`mono dim`},Re={key:1,class:`dim`},ze={class:`line-ctl`},Be={class:`ctl-sel`},Ve={value:``},He=[`value`],Ue={class:`ctl-sel`},We=[`disabled`],Ge={value:``},Ke=[`value`,`disabled`],qe=[`disabled`,`title`],Je=[`disabled`],Ye={key:0,class:`banner bad`,style:{"margin-top":`10px`}},Xe={key:1,class:`banner good`,style:{"margin-top":`10px`}},Ze={class:`modal`},Qe={class:`m-title`},$e={class:`dim mono`},et={class:`dim tpl-hint`},tt={class:`tpl-chips`},nt=[`title`],rt={class:`mono`},it={class:`sec-label`},at={class:`f-grid tpl-form`},ot={class:`f`},st=[`placeholder`],ct={class:`f`},lt=[`placeholder`],ut={class:`f`},dt={class:`f`},ft={class:`f`},pt=[`placeholder`],mt={class:`f`},ht=[`placeholder`],gt={class:`f`},_t={class:`f`},vt=[`value`],yt={class:`f`},bt=[`placeholder`],xt={key:0,class:`banner good`,style:{"margin-top":`10px`}},St={key:1,class:`m-err`},Ct={class:`m-actions`},wt=[`disabled`],Tt={class:`modal`},Et={class:`m-title`},Dt={class:`seg-row`},Ot={class:`f-grid`},kt={class:`f`},At=[`value`],jt={class:`f`},Mt=[`placeholder`],Nt={class:`f`},Pt=[`placeholder`],Ft={class:`f`},It=[`placeholder`],Lt={class:`f-grid cal-form`},Rt={class:`f`},zt={value:`none`},Bt={class:`f`},Vt={style:{display:`flex`,gap:`6px`}},Ht=[`disabled`],Ut=[`disabled`],Wt={class:`f-grid`},Gt={class:`f`},Kt=[`value`],qt={key:0,class:`f-grid driver-form`},Jt={key:0,style:{color:`var(--tone-danger-dot)`,"font-style":`normal`}},Yt=[`onUpdate:modelValue`],Xt=[`value`],Zt=[`onUpdate:modelValue`,`type`,`placeholder`],Qt={key:2,class:`hint`},$t={class:`test-row`},en=[`disabled`],tn={class:`f`},nn=[`placeholder`],rn={key:1,class:`m-err`},an={class:`m-actions`},on=[`disabled`],sn={class:`aw-tile table-card`},cn={class:`nodes-table`},ln={class:`right`},un={class:`mono dim`},dn={class:`mono ch`},fn=[`disabled`,`title`,`onClick`],pn={key:0,class:`st-pill paused`},mn={class:`mono val`},hn={key:0,class:`dim`},gn={class:`mono val`},_n=[`title`],vn={key:0,class:`dim`},yn=[`disabled`,`title`,`onClick`],bn={class:`write-row`},xn=[`onUpdate:modelValue`,`placeholder`,`min`,`max`,`step`,`disabled`,`title`],Sn=[`disabled`,`title`,`onClick`],Cn={class:`mono dim`},wn={class:`mono`},Tn=[`title`],En={class:`right`},Dn=[`onClick`],On={key:0},kn={colspan:`9`},An={class:`pane-empty`,style:{"min-height":`120px`}},jn={class:`pe-sub`},Mn={class:`aw-tile recipe-card`},Nn={class:`recipe-hd`},Pn={class:`panel-tag mono`},Fn={class:`recipe-sub`},In={key:0,class:`product-row`},Ln=[`title`,`onClick`],Rn=[`title`,`onClick`],zn={key:1,class:`dim`,style:{margin:`6px 0 12px`,"font-size":`12px`}},Bn={class:`recipe-grid`},Vn={class:`recipe-name`},Hn=[`title`],Un={class:`dim`},Wn={class:`mono dim`},Gn={key:0,class:`dim desc`},Kn={class:`recipe-params mono`},qn=[`title`],Jn={class:`recipe-actions`},Yn=[`onClick`],Xn=[`onClick`],Zn=[`onClick`],Qn={key:0,class:`mono`},$n=[`onClick`],er={key:0,class:`pane-empty`,style:{"grid-column":`1 / -1`}},tr={key:2,class:`banner good`},nr=[`disabled`],rr={key:3,class:`runs`},ir={class:`sec-label`},ar={class:`nodes-table`},or={class:`right`},sr={class:`mono`},cr={class:`mono dim`},lr={class:`right`},ur=[`disabled`,`onClick`],dr=[`onClick`],fr={class:`modal`},pr={class:`m-title`},mr={class:`sec-label`},hr={class:`nodes-table`},gr={class:`mono dim`},_r={class:`mono`},vr={class:`mono`},yr={class:`mono dim`},br={class:`mono dim`},xr={key:0},Sr={colspan:`6`,class:`dim`,style:{"text-align":`center`,padding:`12px`}},Cr={class:`sec-label`},wr={class:`nodes-table`},Tr={class:`mono`},Er={class:`mono dim`},Dr={class:`mono dim`},Or={key:0},kr={colspan:`6`,class:`dim`,style:{"text-align":`center`,padding:`12px`}},Ar={class:`m-actions`},jr={class:`modal`},Mr={class:`m-title`},Nr={class:`f-grid`},Pr={class:`f`},Fr=[`value`],Ir={class:`f`},Lr=[`placeholder`],Rr={class:`f`},zr=[`placeholder`],Br={class:`sec-label`},Vr={class:`f`},Hr=[`onUpdate:modelValue`],Ur=[`value`],Wr={class:`f`},Gr=[`onUpdate:modelValue`],Kr={class:`f`},qr=[`onUpdate:modelValue`,`placeholder`],Jr={class:`f`},Yr=[`onUpdate:modelValue`,`placeholder`],Xr=[`onClick`],Zr={class:`sec-label`},Qr={class:`f`},$r=[`onUpdate:modelValue`],ei=[`value`],ti={class:`f`},ni=[`onUpdate:modelValue`],ri={class:`f`},ii=[`onUpdate:modelValue`],ai=[`onClick`],oi=[`disabled`,`title`],si={key:0,class:`m-err`},ci={class:`m-actions`},li=[`disabled`],ui={class:`modal`,style:{"max-width":`760px`}},di={class:`modal-head`},fi={key:0,class:`dim`,style:{"margin-left":`8px`,"font-size":`12px`}},pi={key:0,class:`banner good`,style:{margin:`6px 0`}},mi={key:1,class:`dim`},hi={key:2,class:`pane-empty`},gi={class:`ver-head`},_i={class:`mono ver-v`},vi={class:`mono dim`},yi={class:`ver-actor`},bi=[`onClick`],xi={key:0,class:`ver-desc`},Si={class:`ver-diff mono`},Ci={class:`aw-tile query-card`},wi={class:`sec-label`},Ti={class:`q-grid`},Ei={class:`f`},Di={value:``},Oi=[`value`],ki={class:`f`},Ai=[`disabled`],ji={value:``},Mi=[`value`],Ni={class:`f`},Pi={value:``},Fi=[`value`],Ii={class:`f`},Li={value:``},Ri=[`value`],zi={class:`f`},Bi={class:`f`},Vi={class:`f q-actions`},Hi=[`disabled`],Ui={key:0,class:`banner bad`,style:{"margin-top":`8px`}},Wi={key:1,class:`q-result`},Gi={class:`nodes-table`},Ki={class:`mono dim`},qi={class:`mono`},Ji={class:`mono`},Yi={class:`mono`},Xi={class:`mono dim`},Zi={key:6,class:`aw-tile table-card`},Qi={class:`sec-label`},$i={class:`nodes-table`},ea={class:`mono dim`},ta={class:`mono`},na={class:`mono dim`},ra={class:`dim`},ia={class:`modal`},aa={class:`m-title`},oa={class:`f-grid`},sa={class:`f`},ca=[`placeholder`],la={class:`f`},ua=[`placeholder`],da={key:0,class:`m-err`},fa={class:`m-actions`},pa=[`disabled`],ma={key:8,class:`err`},ha={class:`aw-tile ledger-card`},ga={class:`ledger-head`},_a={value:``},va=[`value`],ya={class:`ledger-tri`},ba={class:`tri-cell`},xa={class:`mono`},Sa={class:`tri-cell`},Ca={class:`mono`},wa={class:`tri-cell`},Ta={class:`mono`},Ea={class:`ledger-cols`},Da={class:`ledger-col`},Oa={class:`sec-t`},ka={class:`ledger-list mono`},Aa={class:`ledger-col`},ja={class:`sec-t`},Ma={class:`ledger-list`},Na={class:`mono`},Pa=b(a({__name:`[id]`,setup(a){let{t:b}=ae(),Pa=re(),S=ce(),Fa=le(),Ia=ue();Fa.load();let C=p(()=>String(Pa.params.id??``)),La=p(()=>S.lines.find(e=>e.id===C.value)),w=p(()=>S.lineStateOf(C.value));S.load();let Ra=S.ensureWsFeed();i(()=>Ra());let za=e=>e?Ia.twins.find(t=>t.id===e)?.name??e:b(`dcwDetail.k3own4q121`),Ba={idle:b(`dcwDetail.k3zgkk122`),writing:b(`dcwDetail.k3l3h80123`),ok:`已 ACK`,error:b(`dcwDetail.k40reu124`),offline:b(`dcwDetail.k44c2n125`)};function Va(e){let t=e??``;return S.templates.find(e=>e.key===(t.startsWith(`dcw-`)?t.slice(4):t))?.ch??t}function Ha(e){return S.nodeById(e)?.min}function Ua(e){return S.nodeById(e)?.max}let T=p(()=>Fa.nodes.filter(e=>e.lineId===C.value)),E=_(``),D=_(null),Wa=_(!1);async function Ga(){if(E.value){Wa.value=!0;try{D.value=await S.fetchLedger(E.value)}finally{Wa.value=!1}}}async function Ka(){E.value&&(await S.rollbackNode(E.value),await Ga())}function qa(e){return Fa.nodeById(e)?.name??e}let O=p(()=>S.nodes.filter(e=>e.lineId===C.value)),k=p(()=>S.products.filter(e=>e.lineId===C.value)),Ja=p(()=>S.recipes.filter(e=>e.lineId===C.value)),Ya=p(()=>S.runs.filter(e=>e.lineId===C.value)),Xa=p(()=>{let e=new Set(O.value.map(e=>e.id));return S.history.filter(t=>e.has(t.nodeId))}),Za=p(()=>S.nodes.filter(e=>!e.lineId)),Qa=p(()=>S.products.filter(e=>!e.lineId));async function $a(e){await S.patchNode(e,{lineId:C.value});let t=S.nodeById(e);t&&(t.lineId=C.value)}async function eo(e){await S.updateProduct(e,{lineId:C.value}),await S.load()}let A=m({}),to=_(``),j=_(``),no=_(``);async function ro(e,t){to.value=e,j.value=``,no.value=``;try{let n=await S.write(e,t);n.ok?(no.value=b(`dcwDetail.k1alcbyu182`,{p0:S.nodeById(e)?.name??e,p1:n.message}),A[e]=``):j.value=b(`dcwDetail.kl1e9x9183`,{p0:S.nodeById(e)?.name??e,p1:n.message})}catch(e){j.value=x(e)}finally{to.value=``}}let io=_(``);async function ao(e){io.value=e,j.value=``;try{await S.readNode(e)}catch(e){j.value=x(e)}finally{io.value=``}}let oo=_(``);async function so(e,t){oo.value=e,j.value=``;try{await S.patchNode(e,{enabled:t});let n=S.nodeById(e);n&&(n.enabled=t,t?n.state===`offline`&&(n.state=`idle`):n.state=`offline`)}catch(e){j.value=x(e)}finally{oo.value=``}}let M=_(!1),N=_(`mock`),co=_(S.templates[0]?.key??``),P=_(`mock`),lo=_(``),uo=_(null),fo=_(null),F=_({}),I=m({kind:`none`,scale:1,offset:0}),po=_(``),mo=_(!1),L=_(null),ho=_(!1),go=_(``),_o=p(()=>se.find(e=>e.kind===P.value)),vo=p(()=>_o.value?.configFields??[]);function yo(){let e={};for(let t of vo.value)t.default!==void 0&&(e[t.key]=t.default);F.value=e,L.value=null}yo();async function bo(){mo.value=!0,L.value=null;try{L.value=await S.testDriver(P.value,F.value)}catch(e){L.value={ok:!1,message:x(e)}}finally{mo.value=!1}}async function xo(){ho.value=!0,go.value=``;try{for(let e of vo.value)if(e.required&&(F.value[e.key]===void 0||F.value[e.key]===``))throw Error(b(`dcwDetail.k8x1un1184`,{p0:e.label}));let e=I.kind===`linear`?{kind:`linear`,scale:Number(I.scale),offset:Number(I.offset)}:void 0;await S.createFromTemplate(`dcw-${co.value}`,{name:lo.value.trim()||void 0,driver:P.value,driverConfig:{...F.value},transform:e,holdIntervalMs:uo.value,readIntervalMs:fo.value,lineId:C.value,semantics:po.value.trim()||void 0}),M.value=!1,lo.value=``,po.value=``}catch(e){go.value=x(e)}finally{ho.value=!1}}let So=_(!1),Co=_(!1),wo=_(``),To=_(``);function Eo(){So.value=!0,wo.value=``,To.value=``}let R=m({name:``,ch:``,code:``,unit:``,min:``,max:``,decimals:1,icon:`gateway`,semantics:``}),Do=[{key:`thermo`,label:b(`dcwDetail.k422b8126`)},{key:`pressure`,label:b(`dcwDetail.k3x6ff127`)},{key:`tension`,label:b(`dcwDetail.k3z9xc128`)},{key:`encoder`,label:b(`dcwDetail.kjb3vhs129`)},{key:`camera`,label:b(`dcwDetail.k47atw130`)},{key:`gateway`,label:b(`dcwDetail.k48c07131`)}];async function Oo(){Co.value=!0,wo.value=``,To.value=``;try{if(!R.name.trim())throw Error(b(`dcwDetail.k6ugbw2132`));if(R.unit.trim()===``)throw Error(b(`dcwDetail.kx3pg59133`));if(R.min===``||R.max===``)throw Error(b(`dcwDetail.k13awowo134`));let e=await S.createTemplate({name:R.name.trim(),ch:R.ch.trim()||R.name.trim(),code:R.code.trim()||`CUSTOM`,unit:R.unit.trim(),min:Number(R.min),max:Number(R.max),decimals:Number(R.decimals)||0,icon:R.icon,semantics:R.semantics.trim()||void 0});co.value=e.key,To.value=b(`dcwDetail.ky4e1tr185`,{p0:e.name}),R.name=``,R.ch=``,R.code=``,R.unit=``,R.min=``,R.max=``,R.semantics=``}catch(e){wo.value=x(e)}finally{Co.value=!1}}let z=_(``),B=_(``),V=_(!1),H=_(``),U=_(``),ko=p(()=>Ja.value.filter(e=>e.productId===z.value));async function Ao(){V.value=!0,H.value=``,U.value=``;try{if(!B.value)throw Error(b(`dcwDetail.k1b6qe0r135`));await S.startLine(C.value,B.value),H.value=b(`dcwDetail.k17jteb9186`,{p0:w.value.productName,p1:w.value.recipeName,p2:w.value.runId})}catch(e){U.value=x(e)}finally{V.value=!1}}async function jo(){V.value=!0,H.value=``,U.value=``;try{let e=`${w.value.productName??``} · ${w.value.recipeName??``}`;await S.stopLine(C.value),H.value=b(`dcwDetail.kzl49pd187`,{p0:e})}catch(e){U.value=x(e)}finally{V.value=!1}}let Mo=_(!1),No=_(!1),Po=_(``),W=m({name:``,description:``}),G=_(``);async function Fo(){No.value=!0,Po.value=``;try{let e=await S.createProduct({name:W.name.trim(),description:W.description.trim(),lineId:C.value});z.value=e.id,G.value=e.id,Mo.value=!1,W.name=``,W.description=``}catch(e){Po.value=x(e)}finally{No.value=!1}}let Io=p(()=>G.value?Ja.value.filter(e=>e.productId===G.value):Ja.value),Lo=e=>S.products.find(t=>t.id===e)?.name??e,Ro=_(!1),K=_(null),zo=_([]),Bo=_(!1),q=_(``);async function Vo(e){K.value=S.recipes.find(t=>t.id===e)??null,Ro.value=!0,q.value=``,Bo.value=!0;try{zo.value=await S.recipeVersions(e)}catch(e){q.value=x(e)}finally{Bo.value=!1}}let Ho=e=>e===`agent`?`Agent`:b(e===`system`?`dcwDetail.srcSystem`:`dcwDetail.srcUser`);function Uo(e,t){if(t===0)return b(`dcwDetail.histInit`);let n=zo.value[t-1],r=e.params.map(e=>({p:e,old:n.params.find(t=>t.nodeId===e.nodeId)})).filter(({p:e,old:t})=>!t||t.value!==e.value).map(({p:e,old:t})=>`${S.nodes.find(t=>t.id===e.nodeId)?.name??e.nodeId}: ${t?.value??b(`dcwDetail.histAdded`)} → ${e.value}`);return r.length>0?r.join(`;`):b(`dcwDetail.histNoChange`)}async function Wo(e){if(K.value){q.value=``;try{let t=await S.revertRecipe(K.value.id,{version:e,reason:b(`dcwDetail.revertReasonUi`)});q.value=b(`dcwDetail.revertOk`,{p0:t.version??0}),zo.value=await S.recipeVersions(K.value.id)}catch(e){q.value=x(e)}}}let J=m({productId:``,recipeId:``,paramKey:``,nodeId:``,lastMin:30,bucketMs:15e3}),Go=_(null),Ko=_(!1),qo=_(``);async function Jo(){Ko.value=!0,qo.value=``,Go.value=null;try{Go.value=await S.queryLine({lineId:C.value,productId:J.productId||void 0,recipeId:J.recipeId||void 0,paramKey:J.paramKey||void 0,nodeId:J.nodeId||void 0,fromMs:Date.now()-J.lastMin*6e4,toMs:Date.now(),bucketMs:J.bucketMs>0?J.bucketMs:void 0,limit:2e3}),Go.value.channels.length===0&&(qo.value=b(`dcwDetail.kszv5sq136`))}catch(e){qo.value=x(e)}finally{Ko.value=!1}}let Yo=p(()=>S.templates.map(e=>e.key)),Y=_(!1),Xo=_(null),Zo=_(!1),X=_(``),Z=m({productId:``,name:``,description:``,params:[],daqWindows:[]}),Q=_(null),$=_(null),Qo=_(!1);function $o(){Xo.value=null,X.value=``,Z.productId=G.value||z.value||k.value[0]?.id||``,Z.name=``,Z.description=``,Z.params=[{nodeId:O.value[0]?.id??``,value:``,min:``,max:``}],Z.daqWindows=[],Y.value=!0}function es(e){let t=S.recipes.find(t=>t.id===e);t&&(Xo.value=e,X.value=``,Z.productId=t.productId,Z.name=t.name,Z.description=t.description,Z.params=t.params.map(e=>({nodeId:e.nodeId,value:e.value,min:e.min??``,max:e.max??``})),Z.daqWindows=(t.daqWindows??[]).map(e=>({nodeId:e.nodeId,min:e.min??``,max:e.max??``})),Y.value=!0)}async function ts(){Zo.value=!0,X.value=``;try{let e={productId:Z.productId,name:Z.name.trim(),description:Z.description.trim(),params:Z.params.filter(e=>e.nodeId&&e.value!==``&&Number.isFinite(Number(e.value))).map(e=>({nodeId:e.nodeId,value:Number(e.value),...e.min!==``&&Number.isFinite(Number(e.min))?{min:Number(e.min)}:{},...e.max!==``&&Number.isFinite(Number(e.max))?{max:Number(e.max)}:{}})),daqWindows:Z.daqWindows.filter(e=>e.nodeId&&(e.min!==``||e.max!==``)).map(e=>({nodeId:e.nodeId,...e.min!==``&&Number.isFinite(Number(e.min))?{min:Number(e.min)}:{},...e.max!==``&&Number.isFinite(Number(e.max))?{max:Number(e.max)}:{}}))};Xo.value?await S.updateRecipe(Xo.value,e):await S.createRecipe(e),Y.value=!1}catch(e){X.value=x(e)}finally{Zo.value=!1}}async function ns(e){Q.value=null,j.value=``;try{let t=await S.applyRecipe(e),n=t.results.filter(e=>e.ok).length;Q.value={runId:t.id,ok:n,total:t.results.length},n<t.results.length&&(j.value=b(`dcwDetail.ks7szkt188`,{p0:t.results.filter(e=>!e.ok).map(e=>e.message).join(`;`)}))}catch(e){j.value=x(e)}}async function rs(e){Qo.value=!0;try{let t=await S.runData(e);$.value={runId:e,data:t}}catch(e){j.value=x(e)}finally{Qo.value=!1}}function is(e){let t=e?.value??e?.avg;return t==null?`--`:String(Math.round(t*1e3)/1e3)}return(i,a)=>{let p=ie,m=oe;return l(S).loaded&&!La.value?(s(),h(`div`,de,[v(`p`,fe,u(i.$t(`dcwDetail.k19337yp018`)),1),ne(p,{class:`pill-btn`,to:`/dcw`},{default:te(()=>[f(u(i.$t(`dcwDetail.kllwu1c019`)),1)]),_:1})])):(s(),h(`div`,pe,[v(`div`,me,[v(`div`,null,[v(`p`,he,[v(`span`,{class:`line-chip`,style:ee({background:La.value?.color??`#3aa0ff`})},null,4),f(`AGENTWORKSHOP / LINE / `+u(La.value?.name??C.value),1)]),v(`h1`,null,u(La.value?.name??i.$t(`dcwDetail.k1b2snna151`))+` · `+u(i.$t(`dcwDetail.k1l0iow1137`)),1),v(`p`,ge,u(La.value?.description||i.$t(`dcwDetail.kzcbfki152`)),1)]),v(`div`,_e,[v(`span`,ve,u(i.$t(`dcwDetail.k45uio082`))+` `+u(O.value.length),1),v(`span`,ye,u(i.$t(`dcwDetail.k3waz1025`))+` `+u(k.value.length),1),v(`span`,be,u(i.$t(`dcwDetail.k48grv027`))+` `+u(Ja.value.length),1)])]),v(`section`,xe,[v(`div`,Se,[v(`button`,{class:c([`aw-pill`,{running:l(S).controller.running}]),title:i.$t(`dcwDetail.k1snap154`),onClick:a[0]||=e=>l(S).startStop(l(S).controller.running?`pause`:`resume`)},[v(`span`,{class:c(l(S).controller.running?`i-tabler-player-pause`:`i-tabler-player-play`)},null,2),f(` `+u(l(S).controller.running?i.$t(`dcwDetail.kplrsg153`):i.$t(`dcwDetail.knxgni9169`)),1)],10,Ce)]),v(`div`,we,[v(`span`,Te,[v(`span`,null,u(i.$t(`dcwDetail.k45uio082`))+` `+u(l(S).controller.nodesOnline)+`/`+u(l(S).controller.nodesTotal),1),a[55]||=v(`span`,{class:`sep`},`·`,-1),v(`span`,{title:i.$t(`dcwDetail.kd3ygmn001`)},u(i.$t(`dcwDetail.k3wtib138`))+` `+u(l(S).controller.writesTotal),9,Ee),a[56]||=v(`span`,{class:`sep`},`·`,-1),v(`span`,{class:c({warn:l(S).controller.writesFailed>0}),title:i.$t(`dcwDetail.kd3znl0002`)},u(i.$t(`dcwDetail.k3yit7139`))+` `+u(l(S).controller.writesFailed),11,De)]),v(`button`,{class:`aw-pill outline`,title:i.$t(`dcwDetail.kc4ixly003`),onClick:Eo},[a[57]||=v(`span`,{class:`i-tabler-template`},null,-1),f(` `+u(i.$t(`dcwDetail.k1972dx9020`)),1)],8,Oe),v(`button`,{class:`aw-pill add-btn`,onClick:a[1]||=e=>M.value=!0},[a[58]||=v(`span`,{class:`i-tabler-plus`},null,-1),f(` `+u(i.$t(`dcwDetail.k1976uns021`)),1)])])]),j.value||no.value?(s(),h(`p`,{key:0,class:c([`banner`,j.value?`bad`:`good`])},u(j.value||no.value),3)):g(``,!0),Za.value.length||Qa.value.length?(s(),h(`section`,ke,[v(`b`,Ae,u(i.$t(`dcwDetail.kaebkky022`)),1),v(`div`,je,[(s(!0),h(d,null,o(Za.value,e=>(s(),h(`span`,{key:e.id,class:`adopt-chip`},[f(u(e.name)+` `,1),v(`button`,{class:`mini-btn`,onClick:t=>$a(e.id)},u(i.$t(`dcwDetail.kyjp9fg023`)),9,Me)]))),128)),(s(!0),h(d,null,o(Qa.value,e=>(s(),h(`span`,{key:e.id,class:`adopt-chip`},[f(u(e.name)+`(`+u(i.$t(`dcwDetail.k3km252140`)),1),v(`button`,{class:`mini-btn`,onClick:t=>eo(e.id)},u(i.$t(`dcwDetail.kyjp9fg023`)),9,Ne)]))),128))])])):g(``,!0),v(`section`,Pe,[v(`div`,Fe,[v(`span`,{class:c([`line-dot`,{on:w.value.active}])},null,2),v(`div`,Ie,[v(`b`,null,u(w.value.active?i.$t(`dcwDetail.k1pxrhx0154`):i.$t(`dcwDetail.k1b2hxmx170`)),1),w.value.active?(s(),h(`small`,Le,u(w.value.productName)+` · `+u(w.value.recipeName)+` · `+u(i.$t(`dcwDetail.k400lb075`))+` `+u(w.value.runId)+` · `+u(i.$t(`dcwDetail.k3zkt2166`))+` `+u(w.value.startedAt?.slice(11,19))+` `+u(i.$t(`dcwDetail.k69vag8168`))+` `+u(w.value.taggedSamples)+` `+u(i.$t(`dcwDetail.k4118o085`)),1)):(s(),h(`small`,Re,u(i.$t(`dcwDetail.k19pof14024`)),1))])]),v(`div`,ze,[v(`label`,Be,[v(`span`,null,u(i.$t(`dcwDetail.k3waz1025`)),1),y(v(`select`,{"onUpdate:modelValue":a[2]||=e=>z.value=e,class:`inp`,onChange:a[3]||=e=>B.value=``},[v(`option`,Ve,u(i.$t(`dcwDetail.kuisodh026`)),1),(s(!0),h(d,null,o(k.value,e=>(s(),h(`option`,{key:e.id,value:e.id},u(e.name),9,He))),128))],544),[[t,z.value]])]),v(`label`,Ue,[v(`span`,null,u(i.$t(`dcwDetail.k48grv027`)),1),y(v(`select`,{"onUpdate:modelValue":a[4]||=e=>B.value=e,class:`inp`,disabled:!z.value},[v(`option`,Ge,u(i.$t(`dcwDetail.kutxzsz028`)),1),(s(!0),h(d,null,o(ko.value,e=>(s(),h(`option`,{key:e.id,value:e.id,disabled:e.params.length===0},u(e.name)+u(e.params.length===0?i.$t(`dcwDetail.k1hicmch155`):i.$t(`dcwDetail.k1lzfi4g180`,{p0:e.params.length})),9,Ke))),128))],8,We),[[t,B.value]])]),w.value.active?(s(),h(`button`,{key:1,class:`pill-btn stop`,disabled:V.value,onClick:jo},u(i.$t(`dcwDetail.k1xyhd2y030`)),9,Je)):(s(),h(`button`,{key:0,class:`pill-btn`,disabled:V.value||!B.value,title:B.value?`下发配方参数并开始打标数据采集`:`开跑前必须先设定配方`,onClick:Ao},u(i.$t(`dcwDetail.kfb8vml029`)),9,qe))]),U.value?(s(),h(`p`,Ye,u(U.value),1)):g(``,!0),H.value?(s(),h(`p`,Xe,u(H.value),1)):g(``,!0)]),So.value?(s(),h(`div`,{key:2,class:`modal-mask`,onClick:a[15]||=r(e=>So.value=!1,[`self`])},[v(`div`,Ze,[v(`h3`,Qe,[f(u(i.$t(`dcwDetail.k1x4vam0031`))+` `,1),v(`small`,$e,u(i.$t(`dcwDetail.k3x23c141`))+` `+u(l(S).templates.filter(e=>e.builtin).length)+` · `+u(i.$t(`dcwDetail.k3t616a142`))+` `+u(l(S).templates.filter(e=>!e.builtin).length),1)]),v(`p`,et,u(i.$t(`dcwDetail.ke1iyud032`)),1),v(`div`,tt,[(s(!0),h(d,null,o(l(S).templates,e=>(s(),h(`span`,{key:e.key,class:`tpl-chip`,title:`${e.code} · ${e.min}~${e.max} ${e.unit}${e.semantics?` · ${e.semantics}`:``}`},[f(u(e.name)+` `,1),v(`small`,rt,u(e.min)+`~`+u(e.max)+u(e.unit),1),v(`em`,{class:c([`tpl-tag`,{builtin:e.builtin}])},u(e.builtin?i.$t(`dcwDetail.k3x23c141`):i.$t(`dcwDetail.k3t616a142`)),3)],8,nt))),128))]),v(`p`,it,u(i.$t(`dcwDetail.k169eb4s033`)),1),v(`div`,at,[v(`label`,ot,[v(`span`,null,[f(u(i.$t(`dcwDetail.k1f55q76034`)),1),a[59]||=v(`em`,null,`*`,-1)]),y(v(`input`,{"onUpdate:modelValue":a[5]||=e=>R.name=e,class:`inp`,placeholder:i.$t(`dcwDetail.k1tooi3o004`)},null,8,st),[[n,R.name]])]),v(`label`,ct,[v(`span`,null,u(i.$t(`dcwDetail.k1bqk219035`)),1),y(v(`input`,{"onUpdate:modelValue":a[6]||=e=>R.ch=e,class:`inp`,placeholder:i.$t(`dcwDetail.k698qz0005`)},null,8,lt),[[n,R.ch]])]),v(`label`,ut,[v(`span`,null,u(i.$t(`dcwDetail.k1ayxrqb036`)),1),y(v(`input`,{"onUpdate:modelValue":a[7]||=e=>R.code=e,class:`inp`,placeholder:`如 MOTOR · I`},null,512),[[n,R.code]])]),v(`label`,dt,[v(`span`,null,[f(u(i.$t(`dcwDetail.k3x4ef037`)),1),a[60]||=v(`em`,null,`*`,-1)]),y(v(`input`,{"onUpdate:modelValue":a[8]||=e=>R.unit=e,class:`inp`,placeholder:`如 A`},null,512),[[n,R.unit]])]),v(`label`,ft,[v(`span`,null,[f(u(i.$t(`dcwDetail.k1l9jv5m038`)),1),a[61]||=v(`em`,null,`*`,-1)]),y(v(`input`,{"onUpdate:modelValue":a[9]||=e=>R.min=e,type:`number`,class:`inp`,placeholder:i.$t(`dcwDetail.kxz9174006`)},null,8,pt),[[n,R.min,void 0,{number:!0}]])]),v(`label`,mt,[v(`span`,null,[f(u(i.$t(`dcwDetail.k1l9jv4p039`)),1),a[62]||=v(`em`,null,`*`,-1)]),y(v(`input`,{"onUpdate:modelValue":a[10]||=e=>R.max=e,type:`number`,class:`inp`,placeholder:i.$t(`dcwDetail.kxz9167007`)},null,8,ht),[[n,R.max,void 0,{number:!0}]])]),v(`label`,gt,[v(`span`,null,u(i.$t(`dcwDetail.k3mxmcx040`)),1),y(v(`input`,{"onUpdate:modelValue":a[11]||=e=>R.decimals=e,type:`number`,min:`0`,max:`4`,class:`inp`},null,512),[[n,R.decimals,void 0,{number:!0}]])]),v(`label`,_t,[v(`span`,null,u(i.$t(`dcwDetail.k3xx56041`)),1),y(v(`select`,{"onUpdate:modelValue":a[12]||=e=>R.icon=e,class:`inp`},[(s(),h(d,null,o(Do,e=>v(`option`,{key:e.key,value:e.key},u(e.label),9,vt)),64))],512),[[t,R.icon]])])]),v(`label`,yt,[v(`span`,null,u(i.$t(`dcwDetail.knjmyfr042`)),1),y(v(`textarea`,{"onUpdate:modelValue":a[13]||=e=>R.semantics=e,class:`inp`,rows:`2`,placeholder:i.$t(`dcwDetail.k1qdnfzc008`)},null,8,bt),[[n,R.semantics]])]),To.value?(s(),h(`p`,xt,u(To.value),1)):g(``,!0),wo.value?(s(),h(`p`,St,u(wo.value),1)):g(``,!0),v(`div`,Ct,[v(`button`,{class:`aw-pill outline`,onClick:a[14]||=e=>So.value=!1},u(i.$t(`dcwDetail.k3x62t043`)),1),v(`button`,{class:`pill-btn`,disabled:Co.value||!R.name.trim()||R.unit.trim()===``||R.min===``||R.max===``,onClick:Oo},u(Co.value?i.$t(`dcwDetail.k1bg4759156`):i.$t(`dcwDetail.k1bg9nga171`)),9,wt)])])])):g(``,!0),M.value?(s(),h(`div`,{key:3,class:`modal-mask`,onClick:a[28]||=r(e=>M.value=!1,[`self`])},[v(`div`,Tt,[v(`h3`,Et,u(i.$t(`dcwDetail.k1976uns021`)),1),v(`div`,Dt,[v(`button`,{class:c([`seg`,{on:N.value===`mock`}]),onClick:a[16]||=e=>N.value=`mock`},` Mock 模拟 PLC `,2),v(`button`,{class:c([`seg`,{on:N.value===`real`}]),onClick:a[17]||=e=>N.value=`real`},u(i.$t(`dcwDetail.kyj8fen044`)),3)]),v(`div`,Ot,[v(`label`,kt,[v(`span`,null,u(i.$t(`dcwDetail.k1ejzwqp045`)),1),y(v(`select`,{"onUpdate:modelValue":a[18]||=e=>co.value=e,class:`inp`},[(s(!0),h(d,null,o(l(S).templates,e=>(s(),h(`option`,{key:e.key,value:e.key},u(e.name)+` · `+u(e.ch)+`(`+u(e.min)+`~`+u(e.max)+` `+u(e.unit)+`)`+u(e.builtin?``:i.$t(`dcwDetail.kr45rk9157`)),9,At))),128))],512),[[t,co.value]])]),v(`label`,jt,[v(`span`,null,u(i.$t(`dcwDetail.k1ce2k1y046`)),1),y(v(`input`,{"onUpdate:modelValue":a[19]||=e=>lo.value=e,class:`inp`,placeholder:i.$t(`dcwDetail.kgpxzy3009`)},null,8,Mt),[[n,lo.value]])]),v(`label`,Nt,[v(`span`,null,u(i.$t(`dcwDetail.k1vyb8im047`)),1),y(v(`input`,{"onUpdate:modelValue":a[20]||=e=>uo.value=e,type:`number`,min:`0`,max:`3600000`,step:`500`,class:`inp`,placeholder:i.$t(`dcwDetail.kb1srz0010`)},null,8,Pt),[[n,uo.value,void 0,{number:!0}]])]),v(`label`,Ft,[v(`span`,null,u(i.$t(`dcwDetail.k9r7d4e016`)),1),y(v(`input`,{"onUpdate:modelValue":a[21]||=e=>fo.value=e,type:`number`,min:`0`,max:`3600000`,step:`500`,class:`inp`,placeholder:i.$t(`dcwDetail.k9r7d4e017`)},null,8,It),[[n,fo.value,void 0,{number:!0}]])])]),v(`div`,Lt,[v(`label`,Rt,[v(`span`,null,u(i.$t(`dcwDetail.kiune1f048`)),1),y(v(`select`,{"onUpdate:modelValue":a[22]||=e=>I.kind=e,class:`inp`},[v(`option`,zt,u(i.$t(`dcwDetail.kkzy0k049`)),1),a[63]||=v(`option`,{value:`linear`},` 线性标定:PLC值 = (物理值 - offset) / scale `,-1)],512),[[t,I.kind]])]),v(`label`,Bt,[a[64]||=v(`span`,null,`scale / offset`,-1),v(`div`,Vt,[y(v(`input`,{"onUpdate:modelValue":a[23]||=e=>I.scale=e,type:`number`,step:`0.1`,class:`inp`,disabled:I.kind!==`linear`,title:`decoder 斜率(≠0):物理值 = scale × PLC值 + offset;下发时自动取逆`},null,8,Ht),[[n,I.scale,void 0,{number:!0}]]),y(v(`input`,{"onUpdate:modelValue":a[24]||=e=>I.offset=e,type:`number`,step:`0.1`,class:`inp`,disabled:I.kind!==`linear`,title:`decoder 截距`},null,8,Ut),[[n,I.offset,void 0,{number:!0}]])])])]),N.value===`real`?(s(),h(d,{key:0},[v(`div`,Wt,[v(`label`,Gt,[v(`span`,null,u(i.$t(`dcwDetail.k1kt87rx050`)),1),y(v(`select`,{"onUpdate:modelValue":a[25]||=e=>P.value=e,class:`inp`},[(s(!0),h(d,null,o(l(se).filter(e=>e.status!==`builtin`),e=>(s(),h(`option`,{key:e.kind,value:e.kind},u(e.label),9,Kt))),128))],512),[[t,P.value]])])]),vo.value.length?(s(),h(`div`,qt,[(s(!0),h(d,null,o(vo.value,n=>(s(),h(`label`,{key:n.key,class:`f`},[v(`span`,null,[f(u(n.label),1),n.required?(s(),h(`em`,Jt,`*`)):g(``,!0)]),n.type===`select`?y((s(),h(`select`,{key:0,"onUpdate:modelValue":e=>F.value[n.key]=e,class:`inp`},[(s(!0),h(d,null,o(n.options,e=>(s(),h(`option`,{key:e.value,value:e.value},u(e.label),9,Xt))),128))],8,Yt)),[[t,F.value[n.key]]]):y((s(),h(`input`,{key:1,"onUpdate:modelValue":e=>F.value[n.key]=e,type:n.type===`number`?`number`:`text`,placeholder:n.placeholder,class:`inp`},null,8,Zt)),[[e,F.value[n.key]]]),n.hint?(s(),h(`small`,Qt,u(n.hint),1)):g(``,!0)]))),128))])):g(``,!0),v(`div`,$t,[v(`button`,{class:`pill-btn outline`,disabled:mo.value,onClick:bo},u(mo.value?i.$t(`dcwDetail.k1fsh720158`):i.$t(`dcwDetail.k1fstglk172`)),9,en),L.value?(s(),h(`span`,{key:0,class:c([`test-result`,L.value.ok?`good`:`bad`])},u(L.value.ok?`✓`:`✗`)+` `+u(L.value.message),3)):g(``,!0)])],64)):g(``,!0),v(`label`,tn,[v(`span`,null,u(i.$t(`dcwDetail.k1hgizn7051`)),1),y(v(`textarea`,{"onUpdate:modelValue":a[26]||=e=>po.value=e,class:`inp`,rows:`2`,placeholder:i.$t(`dcwDetail.k12bnyt9011`)},null,8,nn),[[n,po.value]])]),go.value?(s(),h(`p`,rn,u(go.value),1)):g(``,!0),v(`div`,an,[v(`button`,{class:`aw-pill outline`,onClick:a[27]||=e=>M.value=!1},u(i.$t(`dcwDetail.k3xdnn052`)),1),v(`button`,{class:`aw-pill`,disabled:ho.value,onClick:xo},u(ho.value?i.$t(`dcwDetail.k1bg4759156`):i.$t(`dcwDetail.k1bge46t173`)),9,on)])])])):g(``,!0),ne(m,{spinning:!l(S).loaded&&!l(S).error},{default:te(()=>[v(`section`,sn,[v(`table`,cn,[v(`thead`,null,[v(`tr`,null,[v(`th`,null,u(i.$t(`dcwDetail.k1e2dtkt053`)),1),v(`th`,null,u(i.$t(`dcwDetail.k403cy054`)),1),v(`th`,null,u(i.$t(`dcwDetail.k42w8s055`)),1),v(`th`,null,u(i.$t(`dcwDetail.k1deqh0d056`)),1),v(`th`,null,u(i.$t(`dcwDetail.k9r7d4e018`)),1),v(`th`,null,u(i.$t(`dcwDetail.k1k79ec9057`)),1),v(`th`,null,u(i.$t(`dcwDetail.k1dexou6058`)),1),v(`th`,null,u(i.$t(`dcwDetail.k1b1nnaa059`)),1),v(`th`,null,u(i.$t(`dcwDetail.k1i8rtqt060`)),1),v(`th`,ln,u(i.$t(`dcwDetail.k40aa6061`)),1)])]),v(`tbody`,null,[(s(!0),h(d,null,o(O.value,e=>(s(),h(`tr`,{key:e.id,class:c({"node-paused":!e.enabled})},[v(`td`,null,[v(`span`,un,u(e.id.slice(0,8)),1),v(`b`,null,u(e.name),1),v(`small`,dn,u(Va(e.templateRef)),1)]),v(`td`,null,[v(`button`,{class:c([`ctrl-toggle`,{on:e.enabled}]),disabled:oo.value===e.id,title:e.enabled?`暂停该节点控制:下发将被拒绝`:`开启该节点控制:恢复可下发`,onClick:t=>so(e.id,!e.enabled)},[a[65]||=v(`span`,{class:`ct-dot`},null,-1),f(` `+u(e.enabled?i.$t(`dcwDetail.k3o3ib3159`):i.$t(`dcwDetail.k3n93ed062`)),1)],10,fn)]),v(`td`,null,[e.enabled?(s(),h(`span`,{key:1,class:c([`st-pill`,e.state])},u(Ba[e.state]??e.state),3)):(s(),h(`span`,pn,u(i.$t(`dcwDetail.k3n93ed062`)),1))]),v(`td`,mn,[f(u(e.value==null?`--`:e.value.toFixed(e.decimals))+` `,1),v(`small`,null,u(e.unit),1),e.lastAckAt?(s(),h(`small`,hn,` · `+u(e.lastAckAt.slice(11,19)),1)):g(``,!0)]),v(`td`,gn,[v(`span`,{title:e.lastReadError??i.$t(`dcwDetail.k9r7d4e019`),class:c({"read-stale":e.lastReadError})},u(e.readValue==null?`--`:e.readValue.toFixed(e.decimals)),11,_n),v(`small`,null,u(e.unit),1),e.lastReadAt?(s(),h(`small`,vn,` · `+u(e.lastReadAt.slice(11,19)),1)):g(``,!0),v(`button`,{class:`mini-btn read-btn`,disabled:io.value===e.id,title:i.$t(`dcwDetail.k9r7d4e020`),onClick:t=>ao(e.id)},u(io.value===e.id?`···`:i.$t(`dcwDetail.k9r7d4e021`)),9,yn)]),v(`td`,null,[v(`div`,bn,[y(v(`input`,{"onUpdate:modelValue":t=>A[e.id]=t,type:`number`,class:`inp write-inp mono`,placeholder:`${e.min}~${e.max}`,min:e.min,max:e.max,step:10**-e.decimals,disabled:!e.enabled,title:e.enabled?``:`当前节点暂停:开启控制后方可设定`},null,8,xn),[[n,A[e.id],void 0,{number:!0}]]),v(`button`,{class:`mini-btn write-btn`,disabled:!e.enabled||to.value===e.id||A[e.id]==null||A[e.id]===``,title:e.enabled?`下发设定值`:`当前节点暂停:开启控制后方可设定`,onClick:t=>ro(e.id,Number(A[e.id]))},u(to.value===e.id?i.$t(`dcwDetail.k3l3h80123`):i.$t(`dcwDetail.k3w6td174`)),9,Sn)])]),v(`td`,Cn,u(e.min)+` ~ `+u(e.max)+` `+u(e.unit),1),v(`td`,wn,[f(u(e.holdIntervalMs==null?i.$t(`dcwDetail.k3zul4160`):`${e.holdIntervalMs}ms`)+` `,1),v(`small`,{class:`dim`,title:i.$t(`dcwDetail.k9r7d4e016`)},`· `+u(e.readIntervalMs===0?i.$t(`dcwDetail.k9r7d4e022`):e.readIntervalMs==null?i.$t(`dcwDetail.k9r7d4e023`):`${e.readIntervalMs}ms`),9,Tn)]),v(`td`,null,u(za(e.deviceBindingId)),1),v(`td`,En,[v(`button`,{class:`mini-btn danger`,onClick:t=>l(S).removeNode(e.id)},u(i.$t(`dcwDetail.k3xakp063`)),9,Dn)])],2))),128)),l(S).loaded&&O.value.length===0?(s(),h(`tr`,On,[v(`td`,kn,[v(`div`,An,[v(`p`,jn,u(i.$t(`dcwDetail.k1wtecyw064`)),1)])])])):g(``,!0)])])])]),_:1},8,[`spinning`]),v(`section`,Mn,[v(`div`,Nn,[v(`h3`,null,u(i.$t(`dcwDetail.k1j8w3hd065`)),1),v(`span`,Pn,u(k.value.length)+` `+u(i.$t(`dcwDetail.k1av3wgs143`))+` `+u(Io.value.length)+` `+u(i.$t(`dcwDetail.k48grv027`)),1),v(`button`,{class:`pill-btn`,style:{"margin-left":`auto`},onClick:$o},u(i.$t(`dcwDetail.k1akm6dc066`)),1),v(`button`,{class:`mini-btn`,onClick:a[29]||=e=>Mo.value=!0},u(i.$t(`dcwDetail.k1aka0ki067`)),1)]),v(`p`,Fn,u(i.$t(`dcwDetail.k6bl2q8068`)),1),k.value.length?(s(),h(`div`,In,[v(`button`,{class:c([`prod-chip`,{on:G.value===``}]),onClick:a[30]||=e=>G.value=``},u(i.$t(`dcwDetail.k3x4t1069`)),3),(s(!0),h(d,null,o(k.value,e=>(s(),h(`button`,{key:e.id,class:c([`prod-chip`,{on:G.value===e.id}]),title:e.description,onClick:t=>G.value=e.id},[f(u(e.name)+` `,1),v(`span`,{class:`prod-del`,title:i.$t(`dcwDetail.k1bpfjgx012`),onClick:r(t=>l(S).removeProduct(e.id),[`stop`])},`×`,8,Rn)],10,Ln))),128))])):(s(),h(`p`,zn,u(i.$t(`dcwDetail.knov3zg070`)),1)),v(`div`,Bn,[(s(!0),h(d,null,o(Io.value,e=>(s(),h(`div`,{key:e.id,class:`recipe-item`},[v(`div`,Vn,[v(`b`,null,u(e.name),1),e.version?(s(),h(`span`,{key:0,class:`param-chip mono`,title:l(b)(`dcwDetail.histTitle`)},`v`+u(e.version),9,Hn)):g(``,!0),v(`small`,Un,u(Lo(e.productId)),1),v(`small`,Wn,u(e.id),1)]),e.description?(s(),h(`p`,Gn,u(e.description),1)):g(``,!0),v(`div`,Kn,[(s(!0),h(d,null,o(e.params,(e,t)=>(s(),h(`span`,{key:t,class:`param-chip`},u(l(S).templates.find(t=>t.key===(e.templateRef??``).replace(`dcw-`,``))?.ch??e.templateRef)+` = `+u(e.value),1))),128)),(s(!0),h(d,null,o(e.daqWindows,(e,t)=>(s(),h(`span`,{key:`w-${t}`,class:`param-chip daqwin`,title:i.$t(`dcwDetail.k1l11api013`)},` ◎ `+u(qa(e.nodeId))+` ∈ [`+u(e.min??`-∞`)+`, `+u(e.max??`+∞`)+`] `,9,qn))),128))]),v(`div`,Jn,[v(`button`,{class:`pill-btn`,onClick:t=>ns(e.id)},u(i.$t(`dcwDetail.k1497qvr071`)),9,Yn),v(`button`,{class:`mini-btn`,onClick:t=>es(e.id)},u(i.$t(`dcwDetail.k45eb0072`)),9,Xn),v(`button`,{class:`mini-btn`,onClick:t=>Vo(e.id)},[f(u(l(b)(`dcwDetail.histBtn`)),1),e.version?(s(),h(`span`,Qn,`·v`+u(e.version),1)):g(``,!0)],8,Zn),v(`button`,{class:`mini-btn danger`,onClick:t=>l(S).removeRecipe(e.id)},u(i.$t(`dcwDetail.k3xakp063`)),9,$n)])]))),128)),Io.value.length===0?(s(),h(`div`,er,u(i.$t(`dcwDetail.keko1xy073`)),1)):g(``,!0)]),Q.value?(s(),h(`div`,tr,[f(u(i.$t(`dcwDetail.k1l3hrvp144`))+` `+u(Q.value.runId)+` `+u(i.$t(`dcwDetail.k1g3lh2v167`))+u(Q.value.ok)+`/`+u(Q.value.total)+` `+u(i.$t(`dcwDetail.k1bqci06149`))+` `,1),v(`button`,{class:`mini-btn`,style:{"margin-left":`10px`},disabled:Qo.value,onClick:a[31]||=e=>rs(Q.value.runId)},u(Qo.value?i.$t(`dcwDetail.k1br0ij9161`):i.$t(`dcwDetail.kxwei5175`)),9,nr)])):g(``,!0),Ya.value.length?(s(),h(`div`,rr,[v(`p`,ir,u(i.$t(`dcwDetail.k1rjer8d074`)),1),v(`table`,ar,[v(`thead`,null,[v(`tr`,null,[v(`th`,null,u(i.$t(`dcwDetail.k400lb075`)),1),v(`th`,null,u(i.$t(`dcwDetail.k48grv027`)),1),v(`th`,null,u(i.$t(`dcwDetail.k4497j076`)),1),v(`th`,null,u(i.$t(`dcwDetail.k1bqhtmu077`)),1),v(`th`,or,u(i.$t(`dcwDetail.k40aa6061`)),1)])]),v(`tbody`,null,[(s(!0),h(d,null,o([...Ya.value].reverse().slice(0,8),e=>(s(),h(`tr`,{key:e.id},[v(`td`,sr,u(e.id),1),v(`td`,null,u(e.recipeName),1),v(`td`,cr,u(e.startedAt.slice(5,19))+` ~ `+u(e.endedAt?e.endedAt.slice(5,19):i.$t(`dcwDetail.k3vpfg9162`)),1),v(`td`,null,[v(`span`,{class:c([`st-pill`,e.results.every(e=>e.ok)?`ok`:`warn`])},u(e.results.filter(e=>e.ok).length)+`/`+u(e.results.length),3)]),v(`td`,lr,[v(`button`,{class:`mini-btn`,disabled:Qo.value,onClick:t=>rs(e.id)},u(i.$t(`dcwDetail.k1dzwrdp078`)),9,ur),e.endedAt?g(``,!0):(s(),h(`button`,{key:0,class:`mini-btn`,onClick:t=>l(S).closeRun(e.id)},u(i.$t(`dcwDetail.k1blr7y7079`)),9,dr))])]))),128))])])])):g(``,!0),$.value?(s(),h(`div`,{key:4,class:`modal-mask`,onClick:a[33]||=r(e=>$.value=null,[`self`])},[v(`div`,fr,[v(`h3`,pr,u(i.$t(`dcwDetail.k11lq94k145`))+` `+u($.value.data.run.recipeName)+`(`+u($.value.runId)+`) `,1),v(`p`,mr,u(i.$t(`dcwDetail.k1me41w8080`)),1),v(`table`,hr,[v(`thead`,null,[v(`tr`,null,[v(`th`,null,u(i.$t(`dcwDetail.k48hde081`)),1),v(`th`,null,u(i.$t(`dcwDetail.k45uio082`)),1),v(`th`,null,u(i.$t(`dcwDetail.k40t11083`)),1),v(`th`,null,u(i.$t(`dcwDetail.k3xuaw084`)),1),a[66]||=v(`th`,null,`min ~ max`,-1),v(`th`,null,u(i.$t(`dcwDetail.k4118o085`)),1)])]),v(`tbody`,null,[(s(!0),h(d,null,o($.value.data.daq,e=>(s(),h(`tr`,{key:e.nodeId},[v(`td`,null,[f(u(e.ch),1),v(`small`,gr,u(e.unit),1)]),v(`td`,null,u(e.nodeName),1),v(`td`,_r,u(e.latest),1),v(`td`,vr,u(e.avg),1),v(`td`,yr,u(e.min)+` ~ `+u(e.max),1),v(`td`,br,u(e.cnt),1)]))),128)),$.value.data.daq.length===0?(s(),h(`tr`,xr,[v(`td`,Sr,u(i.$t(`dcwDetail.kd457ry086`)),1)])):g(``,!0)])]),v(`p`,Cr,u(i.$t(`dcwDetail.k12b7cxs087`)),1),v(`table`,wr,[v(`thead`,null,[v(`tr`,null,[v(`th`,null,u(i.$t(`dcwDetail.k3xbjr088`)),1),v(`th`,null,u(i.$t(`dcwDetail.k45uio082`)),1),v(`th`,null,u(i.$t(`dcwDetail.k3ncbsh089`)),1),v(`th`,null,u(i.$t(`dcwDetail.k3lh3mz090`)),1),v(`th`,null,u(i.$t(`dcwDetail.k454pg091`)),1),v(`th`,null,u(i.$t(`dcwDetail.k40ieu092`)),1)])]),v(`tbody`,null,[(s(!0),h(d,null,o($.value.data.writes,(e,t)=>(s(),h(`tr`,{key:t},[v(`td`,null,u(e.param),1),v(`td`,null,u(e.nodeName),1),v(`td`,Tr,u(e.eng),1),v(`td`,Er,u(e.raw),1),v(`td`,null,[v(`span`,{class:c([`st-pill`,e.ok?`ok`:`alarm`])},u(e.ok?`ACK`:i.$t(`dcwDetail.k3yit7139`)),3)]),v(`td`,Dr,u(e.at.slice(5,19)),1)]))),128)),$.value.data.writes.length===0?(s(),h(`tr`,Or,[v(`td`,kr,u(i.$t(`dcwDetail.knzcp8i093`)),1)])):g(``,!0)])]),v(`div`,Ar,[v(`button`,{class:`aw-pill outline`,onClick:a[32]||=e=>$.value=null},u(i.$t(`dcwDetail.k3x62t043`)),1)])])])):g(``,!0)]),Y.value?(s(),h(`div`,{key:4,class:`modal-mask`,onClick:a[40]||=r(e=>Y.value=!1,[`self`])},[v(`div`,jr,[v(`h3`,Mr,u(Xo.value?i.$t(`dcwDetail.k1iiwk0i163`):i.$t(`dcwDetail.k1efq0r9176`)),1),v(`div`,Nr,[v(`label`,Pr,[v(`span`,null,[f(u(i.$t(`dcwDetail.k1dw4fzf094`)),1),a[67]||=v(`em`,null,`*`,-1)]),y(v(`select`,{"onUpdate:modelValue":a[34]||=e=>Z.productId=e,class:`inp`},[(s(!0),h(d,null,o(k.value,e=>(s(),h(`option`,{key:e.id,value:e.id},u(e.name),9,Fr))),128))],512),[[t,Z.productId]])]),v(`label`,Ir,[v(`span`,null,[f(u(i.$t(`dcwDetail.k1l3f8so095`)),1),a[68]||=v(`em`,null,`*`,-1)]),y(v(`input`,{"onUpdate:modelValue":a[35]||=e=>Z.name=e,class:`inp`,placeholder:i.$t(`dcwDetail.k12c11vm014`)},null,8,Lr),[[n,Z.name]])]),v(`label`,Rr,[v(`span`,null,u(i.$t(`dcwDetail.k40gkk096`)),1),y(v(`input`,{"onUpdate:modelValue":a[36]||=e=>Z.description=e,class:`inp`,placeholder:i.$t(`dcwDetail.k1hxx8hy015`)},null,8,zr),[[n,Z.description]])])]),v(`p`,Br,u(i.$t(`dcwDetail.ka1kfgh097`)),1),(s(!0),h(d,null,o(Z.params,(e,r)=>(s(),h(`div`,{key:r,class:`param-row`},[v(`label`,Vr,[v(`span`,null,u(i.$t(`dcwDetail.k1e2dtkt053`)),1),y(v(`select`,{"onUpdate:modelValue":t=>e.nodeId=t,class:`inp`},[(s(!0),h(d,null,o(O.value,e=>(s(),h(`option`,{key:e.id,value:e.id},u(e.name)+`(`+u(Va(e.templateRef))+` · `+u(e.min)+`~`+u(e.max)+` `+u(e.unit)+`) `,9,Ur))),128))],8,Hr),[[t,e.nodeId]])]),v(`label`,Wr,[v(`span`,null,[f(u(i.$t(`dcwDetail.k3renp2098`)),1),a[69]||=v(`em`,null,`*`,-1)]),y(v(`input`,{"onUpdate:modelValue":t=>e.value=t,type:`number`,class:`inp`,step:.1},null,8,Gr),[[n,e.value,void 0,{number:!0}]])]),v(`label`,Kr,[v(`span`,null,u(i.$t(`dcwDetail.k134rw3b146`))+u(Ha(e.nodeId)??`-`)+`)`,1),y(v(`input`,{"onUpdate:modelValue":t=>e.min=t,type:`number`,class:`inp`,step:.1,placeholder:i.$t(`dcwDetail.k5vew9z016`)},null,8,qr),[[n,e.min,void 0,{number:!0}]])]),v(`label`,Jr,[v(`span`,null,u(i.$t(`dcwDetail.khrv911147`))+u(Ua(e.nodeId)??`-`)+`)`,1),y(v(`input`,{"onUpdate:modelValue":t=>e.max=t,type:`number`,class:`inp`,step:.1,placeholder:i.$t(`dcwDetail.kzoh5pr017`)},null,8,Yr),[[n,e.max,void 0,{number:!0}]])]),v(`button`,{class:`mini-btn danger param-del`,onClick:e=>Z.params.splice(r,1)},u(i.$t(`dcwDetail.k44idg099`)),9,Xr)]))),128)),v(`button`,{class:`mini-btn`,onClick:a[37]||=e=>Z.params.push({nodeId:O.value[0]?.id??``,value:``,min:``,max:``})},u(i.$t(`dcwDetail.k1broh7h100`)),1),v(`p`,Zr,u(i.$t(`dcwDetail.k1h5gues101`)),1),(s(!0),h(d,null,o(Z.daqWindows,(e,r)=>(s(),h(`div`,{key:`dw-${r}`,class:`param-row`},[v(`label`,Qr,[v(`span`,null,u(i.$t(`dcwDetail.k1empnnb102`)),1),y(v(`select`,{"onUpdate:modelValue":t=>e.nodeId=t,class:`inp`},[(s(!0),h(d,null,o(T.value,e=>(s(),h(`option`,{key:e.id,value:e.id},u(e.name)+`(`+u(e.min)+`~`+u(e.max)+` `+u(e.unit)+`) `,9,ei))),128))],8,$r),[[t,e.nodeId]])]),v(`label`,ti,[v(`span`,null,u(i.$t(`dcwDetail.kqm08ap103`)),1),y(v(`input`,{"onUpdate:modelValue":t=>e.min=t,type:`number`,class:`inp`,step:.1},null,8,ni),[[n,e.min,void 0,{number:!0}]])]),v(`label`,ri,[v(`span`,null,u(i.$t(`dcwDetail.kpypf8g104`)),1),y(v(`input`,{"onUpdate:modelValue":t=>e.max=t,type:`number`,class:`inp`,step:.1},null,8,ii),[[n,e.max,void 0,{number:!0}]])]),v(`button`,{class:`mini-btn danger param-del`,onClick:e=>Z.daqWindows.splice(r,1)},u(i.$t(`dcwDetail.k44idg099`)),9,ai)]))),128)),v(`button`,{class:`mini-btn`,disabled:T.value.length===0,title:T.value.length===0?`本产线暂无数采节点`:``,onClick:a[38]||=e=>Z.daqWindows.push({nodeId:T.value[0]?.id??``,min:``,max:``})},u(i.$t(`dcwDetail.kv1de1p105`)),9,oi),X.value?(s(),h(`p`,si,u(X.value),1)):g(``,!0),v(`div`,ci,[v(`button`,{class:`aw-pill outline`,onClick:a[39]||=e=>Y.value=!1},u(i.$t(`dcwDetail.k3xdnn052`)),1),v(`button`,{class:`pill-btn`,disabled:Zo.value,onClick:ts},u(Zo.value?i.$t(`dcwDetail.k1b38d59164`):i.$t(`dcwDetail.k1b3kwg0177`)),9,li)])])])):g(``,!0),Ro.value?(s(),h(`div`,{key:5,class:`modal-mask`,onClick:a[42]||=r(e=>Ro.value=!1,[`self`])},[v(`div`,ui,[v(`div`,di,[v(`h3`,null,[f(u(l(b)(`dcwDetail.histTitle`)),1),K.value?(s(),h(`span`,fi,u(K.value.name)+` · v`+u(K.value.version),1)):g(``,!0)]),v(`button`,{class:`mini-btn`,onClick:a[41]||=e=>Ro.value=!1},` ✕ `)]),q.value?(s(),h(`p`,pi,u(q.value),1)):g(``,!0),Bo.value?(s(),h(`p`,mi,u(l(b)(`dcwDetail.histLoading`)),1)):zo.value.length===0?(s(),h(`div`,hi,u(l(b)(`dcwDetail.histEmpty`)),1)):(s(!0),h(d,{key:3},o(zo.value,(e,t)=>(s(),h(`div`,{key:e.version,class:c([`ver-row`,{cur:e.current}])},[v(`div`,gi,[v(`span`,_i,`v`+u(e.version),1),v(`span`,{class:c([`ver-src`,e.by??(e.current?`cur`:``)])},u(e.current?l(b)(`dcwDetail.histCurrent`):Ho(e.by)),3),v(`span`,vi,u(e.at.slice(0,19).replace(`T`,` `)),1),v(`span`,yi,u(e.actorName||`—`),1),e.current?g(``,!0):(s(),h(`button`,{key:0,class:`mini-btn`,onClick:t=>Wo(e.version)},u(l(b)(`dcwDetail.revertTo`)),9,bi))]),e.description?(s(),h(`p`,xi,u(e.description),1)):g(``,!0),v(`p`,Si,u(Uo(e,t)),1)],2))),128))])])):g(``,!0),v(`section`,Ci,[v(`p`,wi,u(i.$t(`dcwDetail.k1us3jse106`)),1),v(`div`,Ti,[v(`label`,Ei,[v(`span`,null,u(i.$t(`dcwDetail.k3waz1025`)),1),y(v(`select`,{"onUpdate:modelValue":a[43]||=e=>J.productId=e,class:`inp`,onChange:a[44]||=e=>J.recipeId=``},[v(`option`,Di,u(i.$t(`dcwDetail.k1bkl1jx107`)),1),(s(!0),h(d,null,o(k.value,e=>(s(),h(`option`,{key:e.id,value:e.id},u(e.name),9,Oi))),128))],544),[[t,J.productId]])]),v(`label`,ki,[v(`span`,null,u(i.$t(`dcwDetail.k48grv027`)),1),y(v(`select`,{"onUpdate:modelValue":a[45]||=e=>J.recipeId=e,class:`inp`,disabled:!J.productId},[v(`option`,ji,u(i.$t(`dcwDetail.k1bkx7cr108`)),1),(s(!0),h(d,null,o(Io.value,e=>(s(),h(`option`,{key:e.id,value:e.id},u(e.name),9,Mi))),128))],8,Ai),[[t,J.recipeId]])]),v(`label`,Ni,[v(`span`,null,u(i.$t(`dcwDetail.k1demcae109`)),1),y(v(`select`,{"onUpdate:modelValue":a[46]||=e=>J.paramKey=e,class:`inp`},[v(`option`,Pi,u(i.$t(`dcwDetail.k1bkx7ya110`)),1),(s(!0),h(d,null,o(Yo.value,e=>(s(),h(`option`,{key:e,value:e},u(e),9,Fi))),128))],512),[[t,J.paramKey]])]),v(`label`,Ii,[v(`span`,null,u(i.$t(`dcwDetail.k45uio082`)),1),y(v(`select`,{"onUpdate:modelValue":a[47]||=e=>J.nodeId=e,class:`inp`},[v(`option`,Li,u(i.$t(`dcwDetail.k1bkul3k111`)),1),(s(!0),h(d,null,o(T.value,e=>(s(),h(`option`,{key:e.id,value:e.id},u(e.name),9,Ri))),128))],512),[[t,J.nodeId]])]),v(`label`,zi,[v(`span`,null,u(i.$t(`dcwDetail.kx2ojn0112`)),1),y(v(`input`,{"onUpdate:modelValue":a[48]||=e=>J.lastMin=e,type:`number`,min:`1`,max:`10080`,class:`inp`},null,512),[[n,J.lastMin,void 0,{number:!0}]])]),v(`label`,Bi,[v(`span`,null,u(i.$t(`dcwDetail.kjvnvn4113`)),1),y(v(`input`,{"onUpdate:modelValue":a[49]||=e=>J.bucketMs=e,type:`number`,min:`1000`,step:`500`,class:`inp`},null,512),[[n,J.bucketMs,void 0,{number:!0}]])]),v(`div`,Vi,[v(`button`,{class:`pill-btn`,disabled:Ko.value,onClick:Jo},u(Ko.value?i.$t(`dcwDetail.k1eyx09r165`):i.$t(`dcwDetail.k416ek178`)),9,Hi)])]),qo.value?(s(),h(`p`,Ui,u(qo.value),1)):g(``,!0),Go.value?(s(),h(`div`,Wi,[v(`table`,Gi,[v(`thead`,null,[v(`tr`,null,[v(`th`,null,u(i.$t(`dcwDetail.k48hde081`)),1),v(`th`,null,u(i.$t(`dcwDetail.k45uio082`)),1),v(`th`,null,u(i.$t(`dcwDetail.k42kcu114`)),1),v(`th`,null,u(i.$t(`dcwDetail.k49ujb115`)),1),v(`th`,null,u(i.$t(`dcwDetail.k40pvw116`)),1),v(`th`,null,u(i.$t(`dcwDetail.k3xho3117`)),1)])]),v(`tbody`,null,[(s(!0),h(d,null,o(Go.value.channels,e=>(s(),h(`tr`,{key:e.nodeId},[v(`td`,null,[f(u(e.ch),1),v(`small`,Ki,u(e.unit),1)]),v(`td`,null,u(e.nodeName),1),v(`td`,qi,u(e.points.length),1),v(`td`,Ji,u(is(e.points[0])),1),v(`td`,Yi,u(is(e.points[e.points.length-1])),1),v(`td`,Xi,u(new Date(e.points[0]?.at??0).toLocaleTimeString())+` ~ `+u(new Date(e.points[e.points.length-1]?.at??0).toLocaleTimeString()),1)]))),128))])])])):g(``,!0)]),Xa.value.length?(s(),h(`section`,Zi,[v(`p`,Qi,u(i.$t(`dcwDetail.kw7ym9b148`))+` `+u(Xa.value.length)+` `+u(i.$t(`dcwDetail.k40bfz150`)),1),v(`table`,$i,[v(`tbody`,null,[(s(!0),h(d,null,o(Xa.value.slice(0,12),e=>(s(),h(`tr`,{key:e.id},[v(`td`,ea,u(e.at.slice(5,19)),1),v(`td`,null,u(e.param),1),v(`td`,null,u(e.nodeName),1),v(`td`,ta,u(e.eng),1),v(`td`,na,` raw `+u(e.raw??`-`),1),v(`td`,null,[v(`span`,{class:c([`st-pill`,e.ok?`ok`:`alarm`])},u(e.ok?`ACK`:i.$t(`dcwDetail.k3yit7139`)),3)]),v(`td`,ra,u(e.recipeRunId?i.$t(`dcwDetail.k6vgks7181`,{p0:e.recipeRunId}):`手动`),1)]))),128))])])])):g(``,!0),Mo.value?(s(),h(`div`,{key:7,class:`modal-mask`,onClick:a[53]||=r(e=>Mo.value=!1,[`self`])},[v(`div`,ia,[v(`h3`,aa,u(i.$t(`dcwDetail.k1efduyf118`)),1),v(`div`,oa,[v(`label`,sa,[v(`span`,null,[f(u(i.$t(`dcwDetail.k1avjrl6119`)),1),a[70]||=v(`em`,null,`*`,-1)]),y(v(`input`,{"onUpdate:modelValue":a[50]||=e=>W.name=e,class:`inp`,placeholder:i.$t(`dcwDetail.k12c11vm014`)},null,8,ca),[[n,W.name]])]),v(`label`,la,[v(`span`,null,u(i.$t(`dcwDetail.k40gkk096`)),1),y(v(`input`,{"onUpdate:modelValue":a[51]||=e=>W.description=e,class:`inp`,placeholder:i.$t(`dcwDetail.k1hxx8hy015`)},null,8,ua),[[n,W.description]])])]),Po.value?(s(),h(`p`,da,u(Po.value),1)):g(``,!0),v(`div`,fa,[v(`button`,{class:`aw-pill outline`,onClick:a[52]||=e=>Mo.value=!1},u(i.$t(`dcwDetail.k3xdnn052`)),1),v(`button`,{class:`pill-btn`,disabled:No.value,onClick:Fo},u(No.value?i.$t(`dcwDetail.k1bg4759156`):i.$t(`dcwDetail.k1bg4kn6179`)),9,pa)])])])):g(``,!0),l(S).error?(s(),h(`p`,ma,[f(u(l(S).error)+`(`,1),ne(p,{to:`/workshop`},{default:te(()=>[f(u(i.$t(`dcwDetail.k1bhhheq120`)),1)]),_:1}),a[71]||=f(`) `,-1)])):g(``,!0),v(`section`,ha,[v(`div`,ga,[v(`b`,null,u(i.$t(`dcwDetail.k1ledgt001`)),1),y(v(`select`,{"onUpdate:modelValue":a[54]||=e=>E.value=e,class:`inp`,onChange:Ga},[v(`option`,_a,u(i.$t(`dcwDetail.k1ledgs001`)),1),(s(!0),h(d,null,o(O.value,e=>(s(),h(`option`,{key:e.id,value:e.id},u(e.name),9,va))),128))],544),[[t,E.value]])]),D.value?(s(),h(d,{key:0},[v(`div`,ya,[v(`div`,ba,[v(`small`,null,u(i.$t(`dcwDetail.k1ledgv001`)),1),v(`b`,xa,u(D.value.current??`--`),1)]),v(`div`,Sa,[v(`small`,null,u(i.$t(`dcwDetail.k1ledgv002`)),1),v(`b`,Ca,u(D.value.recipeTarget??`--`),1)]),v(`div`,wa,[v(`small`,null,u(i.$t(`dcwDetail.k1ledgv003`)),1),v(`b`,Ta,u(D.value.lastGood??`--`),1)]),v(`button`,{class:`mini-btn`,onClick:Ga},u(i.$t(`dcwDetail.k1ledga001`)),1),v(`button`,{class:`mini-btn danger`,onClick:Ka},u(i.$t(`dcwDetail.k1ledga002`)),1)]),v(`div`,Ea,[v(`div`,Da,[v(`small`,Oa,u(i.$t(`dcwDetail.k1ledgh001`)),1),v(`ul`,ka,[(s(!0),h(d,null,o(D.value.journal,e=>(s(),h(`li`,{key:e.id},u(e.at.slice(5,16).replace(`T`,` `))+` [`+u(e.source)+`] `+u(e.prevValue??`?`)+` → `+u(e.newValue),1))),128))])]),v(`div`,Aa,[v(`small`,ja,u(i.$t(`dcwDetail.k1ledgr001`)),1),v(`ul`,Ma,[(s(!0),h(d,null,o(D.value.records,e=>(s(),h(`li`,{key:e.id,class:`ledger-rec`},[v(`span`,{class:c([`rec-st`,e.status])},u(e.status),3),v(`span`,Na,u(e.params[0]?.from??`?`)+` → `+u(e.params[0]?.to),1),v(`small`,null,u(e.judge?`${e.judge.verdict}(${e.judge.by})`:e.status===`open`?`open`:e.closedBy??``),1)]))),128))])])])],64)):g(``,!0)])]))}}}),[[`__scopeId`,`data-v-51b1ce74`]]);export{Pa as default};
@@ -1 +0,0 @@
1
- .line-chip[data-v-51b1ce74]{vertical-align:-1px;border-radius:3px;width:10px;height:10px;margin-right:8px;display:inline-block;box-shadow:0 0 10px}.param-chip.daqwin[data-v-51b1ce74]{color:#41c8f4;border-color:#41c8f466}.adopt-card[data-v-51b1ce74]{flex-wrap:wrap;align-items:flex-start;gap:12px;display:flex}.adopt-title[data-v-51b1ce74]{color:var(--aw-dim,#8fa0b5);flex:none;padding-top:4px;font-size:12px}.adopt-list[data-v-51b1ce74]{flex-wrap:wrap;gap:8px;display:flex}.adopt-chip[data-v-51b1ce74]{color:#e8eef8;background:#0d1420b3;border:1px solid #3c506e80;border-radius:8px;align-items:center;gap:6px;padding:4px 8px;font-size:11px;display:inline-flex}.page[data-v-51b1ce74]{padding:4px}h1[data-v-51b1ce74]{letter-spacing:-.015em;margin:2px 0 4px;font-size:30px;font-weight:400}.ledger-card[data-v-51b1ce74]{margin-bottom:14px;padding:14px 18px}.ledger-head[data-v-51b1ce74]{align-items:center;gap:12px;display:flex}.ledger-head b[data-v-51b1ce74]{font-size:13.5px}.ledger-tri[data-v-51b1ce74]{align-items:center;gap:12px;margin-top:12px;display:flex}.tri-cell[data-v-51b1ce74]{background:var(--paper-deep);border:1px solid var(--line-strong);border-radius:var(--radius-chip);flex-direction:column;flex:none;gap:2px;padding:8px 16px;display:flex}.tri-cell small[data-v-51b1ce74]{color:var(--ink-faint);font-size:10px}.tri-cell b[data-v-51b1ce74]{color:var(--ink);font-size:17px}.ledger-cols[data-v-51b1ce74]{grid-template-columns:1fr 1fr;gap:16px;margin-top:12px;display:grid}.sec-t[data-v-51b1ce74]{letter-spacing:.14em;color:var(--ink-faint);margin-bottom:6px;font-size:10px;font-weight:700;display:block}.ledger-list[data-v-51b1ce74]{max-height:200px;color:var(--ink-soft);flex-direction:column;gap:3px;margin:0;padding:0;font-size:11px;list-style:none;display:flex;overflow:auto}.ledger-rec[data-v-51b1ce74]{align-items:center;gap:8px;display:flex}.rec-st[data-v-51b1ce74]{font-family:var(--font-mono);color:var(--ink-faint);border:1px solid var(--line-strong);border-radius:4px;flex:none;padding:0 6px;font-size:9px}.rec-st.open[data-v-51b1ce74]{color:var(--tone-warning-dot);border-color:var(--tone-warning-dot)}.rec-st.judged[data-v-51b1ce74]{color:var(--tone-warning-dot);border-color:var(--tone-warning-dot);opacity:.85}.rec-st.judged-keep[data-v-51b1ce74],.rec-st.rolled-back[data-v-51b1ce74]{color:var(--tone-success-dot);border-color:var(--tone-success-dot)}.sub[data-v-51b1ce74]{opacity:.6;margin:0;font-size:12.5px}.mono[data-v-51b1ce74]{font-family:var(--font-mono);font-variant-numeric:tabular-nums}.dim[data-v-51b1ce74]{opacity:.55}.badges[data-v-51b1ce74]{gap:8px;display:flex}.badge[data-v-51b1ce74]{letter-spacing:.05em;color:var(--ink-soft);border:1px solid var(--line-strong);border-radius:var(--radius-chip);padding:3px 10px;font-size:11px}.ctrl-card[data-v-51b1ce74]{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:16px;margin-bottom:14px;padding:14px 18px;display:flex}.ctrl-left[data-v-51b1ce74]{align-items:center;gap:14px;display:flex}.aw-pill.running[data-v-51b1ce74]{background:var(--accent)}.ctrl-right[data-v-51b1ce74]{align-items:center;gap:12px;display:flex}.ctrl-metrics[data-v-51b1ce74]{color:var(--ink-soft);align-items:center;gap:8px;font-size:11.5px;display:flex}.ctrl-metrics .sep[data-v-51b1ce74]{opacity:.4}.ctrl-metrics .warn[data-v-51b1ce74]{color:var(--tone-warning-dot)}.add-btn[data-v-51b1ce74]{padding:8px 16px;font-size:13px}.banner[data-v-51b1ce74]{border-radius:var(--radius-chip);margin:0 0 12px;padding:9px 14px;font-size:12.5px}.banner.bad[data-v-51b1ce74]{color:var(--tone-danger-dot);background:var(--tone-danger-bg);border:1px solid color-mix(in srgb, var(--tone-danger-dot) 40%, transparent)}.banner.good[data-v-51b1ce74]{color:var(--tone-success-dot);background:var(--tone-success-bg);border:1px solid color-mix(in srgb, var(--tone-success-dot) 40%, transparent)}.table-card[data-v-51b1ce74]{margin-bottom:14px;overflow-x:auto}.nodes-table[data-v-51b1ce74]{border-collapse:collapse;width:100%;font-size:12.5px}.nodes-table td[data-v-51b1ce74],.nodes-table th[data-v-51b1ce74]{text-align:left;border-bottom:1px solid var(--divider-hair);padding:9px 12px}.nodes-table th[data-v-51b1ce74]{letter-spacing:.06em;text-transform:uppercase;color:var(--ink-faint);border-bottom:1px solid var(--line-strong);font-size:11px;font-weight:600}.nodes-table td b[data-v-51b1ce74]{margin-left:8px}.ch[data-v-51b1ce74]{color:var(--ink-faint);margin-top:2px;font-size:10px;display:block}.right[data-v-51b1ce74]{text-align:right}.val[data-v-51b1ce74]{font-size:13px}.val small[data-v-51b1ce74]{color:var(--ink-faint);margin-left:3px}.read-stale[data-v-51b1ce74]{color:var(--tone-danger-dot,#e05a5a);text-underline-offset:3px;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.read-btn[data-v-51b1ce74]{margin-left:8px}.st-pill[data-v-51b1ce74]{font-family:var(--font-mono);letter-spacing:.04em;border-radius:var(--radius-pill);padding:2px 9px;font-size:10.5px;display:inline-block}.st-pill.ok[data-v-51b1ce74]{color:var(--tone-success-dot);background:var(--tone-success-bg)}.st-pill.writing[data-v-51b1ce74]{color:var(--ink);background:var(--hover-tint)}.st-pill.alarm[data-v-51b1ce74],.st-pill.error[data-v-51b1ce74]{color:var(--tone-danger-dot);background:var(--tone-danger-bg)}.st-pill.warn[data-v-51b1ce74]{color:var(--tone-warning-dot);background:var(--tone-warning-bg)}.st-pill.idle[data-v-51b1ce74],.st-pill.offline[data-v-51b1ce74]{color:var(--tone-neutral-dot);background:var(--tone-neutral-bg)}.st-pill.paused[data-v-51b1ce74]{color:var(--tone-warning-dot);background:var(--tone-warning-bg)}.ctrl-toggle[data-v-51b1ce74]{cursor:pointer;color:var(--ink-faint);background:var(--paper-deep);border:1px solid var(--line-strong);border-radius:var(--radius-pill);align-items:center;gap:6px;padding:3px 10px;font-size:11.5px;display:inline-flex}.ctrl-toggle .ct-dot[data-v-51b1ce74]{background:var(--tone-neutral-dot);border-radius:50%;width:7px;height:7px}.ctrl-toggle.on[data-v-51b1ce74]{color:var(--tone-success-dot);border-color:color-mix(in srgb, var(--tone-success-dot) 45%, transparent)}.ctrl-toggle.on .ct-dot[data-v-51b1ce74]{background:var(--tone-success-dot);box-shadow:0 0 6px var(--tone-success-dot)}.ctrl-toggle[data-v-51b1ce74]:disabled{opacity:.55;cursor:wait}.node-paused td[data-v-51b1ce74]{opacity:.6}.node-paused .write-row[data-v-51b1ce74]{opacity:.5}.tpl-hint[data-v-51b1ce74]{margin:0 0 10px;font-size:12px}.tpl-chips[data-v-51b1ce74]{flex-wrap:wrap;gap:6px;margin-bottom:4px;display:flex}.tpl-chip[data-v-51b1ce74]{color:var(--ink-soft);background:var(--paper-deep);border:1px solid var(--line);border-radius:var(--radius-chip);align-items:center;gap:6px;padding:3px 9px;font-size:11.5px;display:inline-flex}.tpl-chip small[data-v-51b1ce74]{color:var(--ink-faint)}.tpl-tag[data-v-51b1ce74]{color:var(--accent);border:1px solid color-mix(in srgb, var(--accent) 40%, transparent);border-radius:var(--radius-pill);padding:1px 6px;font-size:10px;font-style:normal}.tpl-tag.builtin[data-v-51b1ce74]{color:var(--ink-faint);border-color:var(--line-strong)}.write-row[data-v-51b1ce74]{align-items:center;gap:6px;display:flex}.write-inp[data-v-51b1ce74]{width:92px;padding:4px 8px}.write-btn[data-v-51b1ce74]{padding:5px 12px}.mini-btn[data-v-51b1ce74]{cursor:pointer;color:var(--ink-soft);background:var(--paper-deep);border:1px solid var(--line-strong);border-radius:var(--radius-chip);margin-right:4px;padding:4px 10px;font-size:11.5px}.mini-btn.danger[data-v-51b1ce74]{color:var(--tone-danger-dot)}.mini-btn[data-v-51b1ce74]:hover{border-color:var(--accent);color:var(--accent)}.inp[data-v-51b1ce74]{color:var(--ink);background:var(--paper-deep);border:1px solid var(--line-strong);border-radius:var(--radius-chip);padding:5px 9px;font-size:12.5px}.line-card[data-v-51b1ce74]{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:16px;margin-bottom:14px;padding:14px 18px;display:flex}.line-status[data-v-51b1ce74]{align-items:center;gap:12px;min-width:260px;display:flex}.line-dot[data-v-51b1ce74]{background:var(--tone-neutral-dot);width:12px;height:12px;box-shadow:0 0 0 4px color-mix(in srgb, var(--tone-neutral-dot) 20%, transparent);border-radius:50%}.line-dot.on[data-v-51b1ce74]{background:var(--tone-success-dot);box-shadow:0 0 0 4px color-mix(in srgb, var(--tone-success-dot) 22%, transparent);animation:1.6s infinite linePulse-51b1ce74}@keyframes linePulse-51b1ce74{0%,to{box-shadow:0 0 0 3px color-mix(in srgb, var(--tone-success-dot) 25%, transparent)}50%{box-shadow:0 0 0 7px color-mix(in srgb, var(--tone-success-dot) 8%, transparent)}}.line-info b[data-v-51b1ce74]{font-size:14px}.line-info small[data-v-51b1ce74]{margin-top:2px;font-size:11px;display:block}.line-ctl[data-v-51b1ce74]{align-items:flex-end;gap:10px;display:flex}.ctl-sel[data-v-51b1ce74]{color:var(--ink-faint);flex-direction:column;gap:4px;font-size:11px;display:flex}.ctl-sel .inp[data-v-51b1ce74]{min-width:150px}.pill-btn.stop[data-v-51b1ce74]{background:var(--tone-danger-dot);border-color:var(--tone-danger-dot)}.product-row[data-v-51b1ce74]{flex-wrap:wrap;gap:8px;margin:0 0 12px;display:flex}.prod-chip[data-v-51b1ce74]{cursor:pointer;color:var(--ink-soft);background:var(--paper-deep);border:1px solid var(--line-strong);border-radius:var(--radius-pill);align-items:center;gap:6px;padding:4px 12px;font-size:12px;display:inline-flex}.prod-chip.on[data-v-51b1ce74]{color:var(--on-accent);background:var(--accent);border-color:var(--accent)}.prod-del[data-v-51b1ce74]{color:var(--tone-danger-dot);font-weight:700}.query-card[data-v-51b1ce74]{margin-bottom:14px;padding:14px 18px}.q-grid[data-v-51b1ce74]{grid-template-columns:repeat(6,1fr);align-items:end;gap:10px;display:grid}.q-grid .f[data-v-51b1ce74]{color:var(--ink-faint);font-size:11px}.q-actions[data-v-51b1ce74]{justify-content:flex-end}.q-result[data-v-51b1ce74]{margin-top:12px;overflow-x:auto}.cal-form[data-v-51b1ce74]{grid-template-columns:2fr 1fr;align-items:end}.recipe-card[data-v-51b1ce74]{margin-bottom:14px;padding:16px 18px}.recipe-hd[data-v-51b1ce74]{align-items:center;gap:10px;margin-bottom:6px;display:flex}.recipe-hd h3[data-v-51b1ce74]{margin:0;font-size:16px}.panel-tag[data-v-51b1ce74]{color:var(--ink-soft);border:1px solid var(--line-strong);border-radius:var(--radius-chip);padding:2px 8px;font-size:11px}.recipe-sub[data-v-51b1ce74]{color:var(--ink-faint);margin:0 0 14px;font-size:12px}.recipe-grid[data-v-51b1ce74]{grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:12px;display:grid}.recipe-item[data-v-51b1ce74]{background:var(--paper-deep);border:1px solid var(--line);border-radius:var(--radius-chip);padding:12px 14px}.recipe-name b[data-v-51b1ce74]{font-size:13.5px}.recipe-name small[data-v-51b1ce74]{margin-left:8px}.desc[data-v-51b1ce74]{margin:4px 0;font-size:12px}.recipe-params[data-v-51b1ce74]{flex-wrap:wrap;gap:6px;margin:8px 0;display:flex}.param-chip[data-v-51b1ce74]{color:var(--accent);background:color-mix(in srgb, var(--accent) 8%, transparent);border:1px solid color-mix(in srgb, var(--accent) 30%, transparent);border-radius:var(--radius-chip);padding:2px 8px;font-size:11px}.recipe-actions[data-v-51b1ce74]{align-items:center;gap:6px;margin-top:8px;display:flex}.ver-row[data-v-51b1ce74]{border:1px solid var(--divider-hair);border-radius:10px;margin-bottom:8px;padding:10px 12px}.ver-row.cur[data-v-51b1ce74]{background:color-mix(in srgb, var(--accent) 6%, transparent);border-color:color-mix(in srgb, var(--accent) 30%, transparent)}.ver-head[data-v-51b1ce74]{align-items:center;gap:10px;display:flex}.ver-v[data-v-51b1ce74]{font-size:13px;font-weight:700}.ver-src[data-v-51b1ce74]{border:1px solid var(--line-strong);border-radius:var(--radius-pill);padding:1px 8px;font-size:10.5px}.ver-src.agent[data-v-51b1ce74]{color:var(--accent);border-color:color-mix(in srgb, var(--accent) 50%, transparent)}.ver-src.user[data-v-51b1ce74]{color:var(--ink-soft)}.ver-src.system[data-v-51b1ce74]{color:var(--ink-faint)}.ver-src.cur[data-v-51b1ce74]{color:var(--accent);background:color-mix(in srgb, var(--accent) 10%, transparent);border-color:#0000}.ver-actor[data-v-51b1ce74]{font-family:var(--font-mono);color:var(--ink-soft);font-size:12px}.ver-desc[data-v-51b1ce74]{color:var(--ink);margin:6px 0 0;font-size:12px}.ver-diff[data-v-51b1ce74]{color:var(--ink-faint);margin:4px 0 0;font-size:11px}.sec-label[data-v-51b1ce74]{letter-spacing:.06em;text-transform:uppercase;color:var(--ink-faint);margin:14px 0 6px;font-size:11px;font-weight:600}.runs[data-v-51b1ce74]{margin-top:6px}.pill-btn[data-v-51b1ce74]{cursor:pointer;color:var(--paper-raised);background:var(--accent);border:1px solid var(--accent);border-radius:var(--radius-pill);padding:6px 14px;font-size:12.5px}.pill-btn.outline[data-v-51b1ce74]{color:var(--ink);background:var(--paper-raised);border-color:var(--line-strong)}.pill-btn[data-v-51b1ce74]:disabled{opacity:.5;cursor:default}.modal-mask[data-v-51b1ce74]{z-index:50;background:var(--scrim);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.modal[data-v-51b1ce74]{background:var(--surface-glass-strong);width:680px;max-width:94vw;max-height:88vh;-webkit-backdrop-filter:var(--aurora-blur);border:1px solid var(--glass-line);border-radius:var(--radius-panel);box-shadow:var(--glass-edge), var(--shadow-float);padding:22px 24px;overflow-y:auto}.m-title[data-v-51b1ce74]{margin:0 0 14px;font-size:17px}.seg-row[data-v-51b1ce74]{gap:8px;margin-bottom:14px;display:flex}.seg[data-v-51b1ce74]{cursor:pointer;color:var(--ink-faint);background:var(--paper-deep);border:1px solid var(--line);border-radius:var(--radius-chip);flex:1;padding:8px 0;font-size:13px}.seg.on[data-v-51b1ce74]{color:var(--on-accent);background:var(--accent);border-color:var(--accent);font-weight:600}.f-grid[data-v-51b1ce74]{grid-template-columns:1fr 1fr;gap:10px;margin-bottom:10px;display:grid}.driver-form[data-v-51b1ce74]{grid-template-columns:repeat(3,1fr)}.param-row[data-v-51b1ce74]{grid-template-columns:2fr 1fr 1fr 1fr auto;align-items:end;gap:8px;margin-bottom:8px;display:grid}.param-row .f[data-v-51b1ce74]{flex:1}.param-del[data-v-51b1ce74]{margin-bottom:2px}.f[data-v-51b1ce74]{color:var(--ink-faint);flex-direction:column;gap:4px;font-size:11.5px;display:flex}.f em[data-v-51b1ce74]{margin-left:3px;font-style:normal}.hint[data-v-51b1ce74]{color:var(--ink-fainter);font-size:10px}.test-row[data-v-51b1ce74]{align-items:center;gap:10px;margin:6px 0 4px;display:flex}.test-result[data-v-51b1ce74]{font-family:var(--font-mono);font-size:11px}.test-result.good[data-v-51b1ce74]{color:var(--tone-success-dot)}.test-result.bad[data-v-51b1ce74]{color:var(--tone-danger-dot)}.m-err[data-v-51b1ce74]{color:var(--tone-danger-dot);margin:8px 0 0;font-size:12px}.m-actions[data-v-51b1ce74]{justify-content:flex-end;gap:10px;margin-top:16px;display:flex}.aw-pill.outline[data-v-51b1ce74]{color:var(--ink);background:var(--paper-raised);border-color:var(--line-strong)}.err[data-v-51b1ce74]{color:var(--tone-danger-dot);margin-top:14px;font-size:13px}@media (prefers-reduced-motion:no-preference){.nodes-table tbody tr[data-v-51b1ce74]:hover{background:var(--hover-tint)}}
@@ -1 +0,0 @@
1
- {"id":"6a0a88de-639e-4e7b-b7c1-7f4034e04787","timestamp":1788706745133,"prerendered":[]}