@jnrs/lingshu-smart 2.2.47 → 3.0.0

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 (64) hide show
  1. package/AGENTS.md +281 -348
  2. package/dist/components/debug/DataLogPanel.vue.d.ts +13 -2
  3. package/dist/components/debug/PerformanceStats.vue.d.ts +1 -1
  4. package/dist/components/debug/ScriptRunner/ConfigPanel.vue.d.ts +1 -1
  5. package/dist/components/debug/ScriptRunner/StepsPanel.vue.d.ts +4 -2
  6. package/dist/components/debug/ScriptRunner/index.vue.d.ts +11 -0
  7. package/dist/components/debug/ScriptRunner/script.d.ts +131 -41
  8. package/dist/components/debug/ScriptRunner/scriptFile.d.ts +92 -0
  9. package/dist/components/debug/WsProxy/index.vue.d.ts +10 -8
  10. package/dist/components/debug/WsProxy/proxy.d.ts +114 -53
  11. package/dist/components/editor/ControlBar/CaseManger.vue.d.ts +18 -2
  12. package/dist/components/editor/ControlBar/CaseTitleEdit.vue.d.ts +2 -2
  13. package/dist/components/editor/ControlBar/PersistDialog.vue.d.ts +9 -0
  14. package/dist/components/index.js +8287 -6169
  15. package/dist/components/preview/index.vue.d.ts +6308 -4098
  16. package/dist/controller/AppController.d.ts +65 -3
  17. package/dist/controller/SocketDispatcher.d.ts +59 -0
  18. package/dist/fullscreen-BA3oea8O.js +53 -0
  19. package/dist/index-C6Liz-8o.js +1238 -0
  20. package/dist/index.js +36 -27
  21. package/dist/lingshu-smart/cases.json +5882 -14843
  22. package/dist/lingshu-smart/mockSocket.json +263 -0
  23. package/dist/lingshu-smart/wsProxyConfig.json +327 -725
  24. package/dist/playground/ViewPageDemo.vue.d.ts +13336 -8894
  25. package/dist/stores/index.js +1 -1
  26. package/dist/stores/useAppStore.d.ts +18952 -12321
  27. package/dist/stores/useDataStore.d.ts +19714 -12469
  28. package/dist/stores/useDebugStore.d.ts +11 -2
  29. package/dist/stores/useEditorStore.d.ts +3 -3
  30. package/dist/types/app.types.d.ts +1 -1
  31. package/dist/types/components/config.types.d.ts +16 -0
  32. package/dist/types/components/operating.types.d.ts +22 -13
  33. package/dist/types/enums.d.ts +22 -2
  34. package/dist/types/guards.d.ts +1 -0
  35. package/dist/types/index.d.ts +1 -0
  36. package/dist/types/models/config.types.d.ts +23 -5
  37. package/dist/types/models/operating.types.d.ts +57 -57
  38. package/dist/types/socket.types.d.ts +275 -0
  39. package/dist/ui/abstract/ModelAbs.d.ts +37 -2
  40. package/dist/ui/components/Resource.d.ts +0 -1
  41. package/dist/ui/components/StationSlot.d.ts +8 -2
  42. package/dist/ui/components/StationSlotGroup.d.ts +26 -1
  43. package/dist/ui/models/DoubleJointRobot.d.ts +14 -4
  44. package/dist/ui/models/MachineTool.d.ts +6 -1
  45. package/dist/ui/models/MaterialTrack.d.ts +14 -2
  46. package/dist/ui/models/Pallet.d.ts +20 -5
  47. package/dist/ui/models/ResourceOperationWindow.d.ts +0 -1
  48. package/dist/ui/models/ResourceStore.d.ts +7 -5
  49. package/dist/ui/models/Rgv.d.ts +4 -2
  50. package/dist/ui/models/ShuttleStation.d.ts +14 -2
  51. package/dist/ui/models/SingleJointRobot.d.ts +14 -4
  52. package/dist/ui/utils/resolveStationSlotLayers.d.ts +20 -0
  53. package/dist/ui/utils/resolveTypeStyle.d.ts +13 -0
  54. package/dist/useAppStore-DASwAOBy.js +7223 -0
  55. package/dist/utils/fullscreen.d.ts +9 -0
  56. package/dist/utils/index.d.ts +1 -0
  57. package/dist/vite.d.ts +15 -0
  58. package/dist/vite.js +39 -0
  59. package/package.json +6 -2
  60. package/dist/components/editor/OptionCard/Equipment/stationSlot/StationSlotGroupBoth.vue.d.ts +0 -2
  61. package/dist/guards-Bi8oNtaY.js +0 -35
  62. package/dist/index-Dsgrnpn0.js +0 -1186
  63. package/dist/useAppStore-CevWqcmT.js +0 -6147
  64. /package/dist/components/editor/OptionCard/Equipment/{stationSlot/StationSlotGroup.vue.d.ts → models/ResourceStore.vue.d.ts} +0 -0
@@ -1,178 +1,35 @@
1
1
  [
2
2
  {
3
- "caseId": "e213398c-217a-40f3-9ee0-3aea08e46a5a",
4
- "caseName": "测试运行",
3
+ "caseId": "358611430854885377",
4
+ "caseName": "测试所有设备51d9",
5
5
  "fileUrl": "public/lingshu-smart/wsProxyConfig.json",
6
- "version": "1.0.0",
7
- "dataSource": "builtin",
6
+ "version": "sss",
7
+ "dataSource": "external",
8
8
  "wsUrl": "",
9
+ "carryToken": true,
9
10
  "requestMode": "direct",
10
11
  "autoConnect": true,
11
- "payloadKey": "data",
12
- "sourceTypeField": "type",
13
- "heartbeatInterval": 0,
14
- "modelMap": {},
12
+ "payloadKey": "payload",
13
+ "sourceTypeField": "envelope.type",
14
+ "heartbeatInterval": 30,
15
+ "autoReconnect": true,
16
+ "modelMap": {
17
+ "rgv": "Rgv"
18
+ },
15
19
  "rules": [
16
20
  {
17
- "sourceType": "SingleJointRobot",
18
- "className": "SingleJointRobot",
19
- "equipmentName": "单关节机器人",
20
- "enabled": true,
21
- "operate": "single",
22
- "mappings": [
23
- {
24
- "target": "id",
25
- "source": "id",
26
- "defaultValue": ""
27
- },
28
- {
29
- "target": "light.color",
30
- "source": "lightColor"
31
- },
32
- {
33
- "target": "light.rotating",
34
- "source": "lightRotating"
35
- },
36
- {
37
- "target": "light.blinking",
38
- "source": "lightBlinking"
39
- },
40
- {
41
- "target": "light.color",
42
- "source": "light.color"
43
- },
44
- {
45
- "target": "light.rotating",
46
- "source": "light.rotating"
47
- },
48
- {
49
- "target": "light.blinking",
50
- "source": "light.blinking"
51
- },
52
- {
53
- "target": "x",
54
- "source": "x",
55
- "transform": "percentToPixel",
56
- "transformType": "width",
57
- "transformPrecision": 2
58
- },
59
- {
60
- "target": "y",
61
- "source": "y",
62
- "transform": "percentToPixel",
63
- "transformType": "height",
64
- "transformPrecision": 2
65
- },
66
- {
67
- "target": "j1",
68
- "source": "j1"
69
- },
70
- {
71
- "target": "currentFixture",
72
- "source": "currentFixture"
73
- }
74
- ]
75
- },
76
- {
77
- "className": "Resource",
78
- "enabled": true,
79
- "operate": "resource",
80
- "mappings": [],
81
- "resourceMappings": {
82
- "add": [
83
- {
84
- "target": "className",
85
- "source": "addType"
86
- },
87
- {
88
- "target": "id",
89
- "source": "addId"
90
- },
91
- {
92
- "target": "resource.resourceType",
93
- "source": "resourceType"
94
- },
95
- {
96
- "target": "resource.resourceId",
97
- "source": "resourceId"
98
- },
99
- {
100
- "target": "resource.name",
101
- "source": "name"
102
- },
103
- {
104
- "target": "resource.color",
105
- "source": "displayColor"
106
- },
107
- {
108
- "target": "resource.index",
109
- "source": "addSiteNumber"
110
- }
111
- ],
112
- "remove": [
113
- {
114
- "target": "className",
115
- "source": "removeType"
116
- },
117
- {
118
- "target": "id",
119
- "source": "removeId"
120
- },
121
- {
122
- "target": "resource.resourceType",
123
- "source": "resourceType"
124
- },
125
- {
126
- "target": "resource.resourceId",
127
- "source": "resourceId"
128
- },
129
- {
130
- "target": "resource.index",
131
- "source": "removeSiteNumber"
132
- }
133
- ]
134
- }
135
- },
136
- {
137
- "className": "BatchRemove",
138
- "enabled": true,
139
- "operate": "global",
140
- "mappings": [],
141
- "globalFields": {
142
- "resourceIds": "data"
143
- }
144
- },
145
- {
146
- "sourceType": "resetAll",
147
- "className": "ResetAll",
148
- "enabled": true,
149
- "operate": "resetAll",
150
- "mappings": []
151
- },
152
- {
153
- "sourceType": "DoubleJointRobot",
21
+ "sourceType": "device_command",
22
+ "deviceType": "double_joint_robot",
154
23
  "className": "DoubleJointRobot",
155
24
  "equipmentName": "双关节机器人",
156
25
  "enabled": true,
157
26
  "operate": "single",
158
27
  "mappings": [
159
28
  {
160
- "target": "id",
161
- "source": "id",
29
+ "target": "device_id",
30
+ "source": "device_id",
162
31
  "defaultValue": ""
163
32
  },
164
- {
165
- "target": "light.color",
166
- "source": "lightColor"
167
- },
168
- {
169
- "target": "light.rotating",
170
- "source": "lightRotating"
171
- },
172
- {
173
- "target": "light.blinking",
174
- "source": "lightBlinking"
175
- },
176
33
  {
177
34
  "target": "light.color",
178
35
  "source": "light.color"
@@ -186,57 +43,44 @@
186
43
  "source": "light.blinking"
187
44
  },
188
45
  {
189
- "target": "x",
190
- "source": "x",
191
- "transform": "percentToPixel",
192
- "transformType": "width",
193
- "transformPrecision": 2
46
+ "target": "position.x",
47
+ "source": "position.x"
48
+ },
49
+ {
50
+ "target": "position.y",
51
+ "source": "position.y"
194
52
  },
195
53
  {
196
- "target": "y",
197
- "source": "y",
198
- "transform": "percentToPixel",
199
- "transformType": "height",
200
- "transformPrecision": 2
54
+ "target": "position.j1",
55
+ "source": "position.j1"
201
56
  },
202
57
  {
203
- "target": "j1",
204
- "source": "j1"
58
+ "target": "position.j2",
59
+ "source": "position.j2"
205
60
  },
206
61
  {
207
- "target": "j2",
208
- "source": "j2"
62
+ "target": "current_fixture",
63
+ "source": "current_fixture"
209
64
  },
210
65
  {
211
- "target": "currentFixture",
212
- "source": "currentFixture"
66
+ "target": "device_state",
67
+ "source": "device_state"
213
68
  }
214
69
  ]
215
70
  },
216
71
  {
217
- "sourceType": "MachineTool",
218
- "className": "MachineTool",
219
- "equipmentName": "机床",
72
+ "sourceType": "device_command",
73
+ "deviceType": "rgv",
74
+ "className": "Rgv",
75
+ "equipmentName": "RGV",
220
76
  "enabled": true,
221
77
  "operate": "single",
222
78
  "mappings": [
223
79
  {
224
- "target": "id",
225
- "source": "id",
80
+ "target": "device_id",
81
+ "source": "device_id",
226
82
  "defaultValue": ""
227
83
  },
228
- {
229
- "target": "light.color",
230
- "source": "lightColor"
231
- },
232
- {
233
- "target": "light.rotating",
234
- "source": "lightRotating"
235
- },
236
- {
237
- "target": "light.blinking",
238
- "source": "lightBlinking"
239
- },
240
84
  {
241
85
  "target": "light.color",
242
86
  "source": "light.color"
@@ -250,55 +94,40 @@
250
94
  "source": "light.blinking"
251
95
  },
252
96
  {
253
- "target": "progress.percent",
254
- "source": "percent",
255
- "defaultValue": 0
97
+ "target": "position.x",
98
+ "source": "position.x"
256
99
  },
257
100
  {
258
- "target": "progress.textContent",
259
- "source": "statusText"
101
+ "target": "position.j1",
102
+ "source": "position.j1"
260
103
  },
261
104
  {
262
- "target": "entrance.isIn",
263
- "source": "isIn",
264
- "defaultValue": false
105
+ "target": "position.fork_xy",
106
+ "source": "position.fork_xy"
265
107
  },
266
108
  {
267
- "target": "entrance.isOut",
268
- "source": "isOut",
269
- "defaultValue": false
109
+ "target": "position.fork_z",
110
+ "source": "position.fork_z"
270
111
  },
271
112
  {
272
- "target": "stationRotatable",
273
- "source": "stationRotatable",
274
- "defaultValue": false
113
+ "target": "device_state",
114
+ "source": "device_state"
275
115
  }
276
116
  ]
277
117
  },
278
118
  {
279
- "sourceType": "ResourceStore",
119
+ "sourceType": "device_command",
120
+ "deviceType": "resource_store",
280
121
  "className": "ResourceStore",
281
122
  "equipmentName": "资源库",
282
123
  "enabled": true,
283
124
  "operate": "single",
284
125
  "mappings": [
285
126
  {
286
- "target": "id",
287
- "source": "id",
127
+ "target": "device_id",
128
+ "source": "device_id",
288
129
  "defaultValue": ""
289
130
  },
290
- {
291
- "target": "light.color",
292
- "source": "lightColor"
293
- },
294
- {
295
- "target": "light.rotating",
296
- "source": "lightRotating"
297
- },
298
- {
299
- "target": "light.blinking",
300
- "source": "lightBlinking"
301
- },
302
131
  {
303
132
  "target": "light.color",
304
133
  "source": "light.color"
@@ -312,99 +141,94 @@
312
141
  "source": "light.blinking"
313
142
  },
314
143
  {
315
- "target": "x",
316
- "source": "x",
317
- "transform": "percentToPixel",
318
- "transformType": "width",
319
- "transformPrecision": 2
144
+ "target": "position.x",
145
+ "source": "position.x"
320
146
  },
321
147
  {
322
- "target": "stationColor",
323
- "source": "stationColor",
324
- "defaultValue": {}
148
+ "target": "device_state",
149
+ "source": "device_state"
325
150
  }
326
151
  ]
327
152
  },
328
153
  {
329
- "sourceType": "Rgv",
330
- "className": "Rgv",
331
- "equipmentName": "RGV",
154
+ "sourceType": "device_command",
155
+ "deviceType": "machine_tool",
156
+ "className": "MachineTool",
157
+ "equipmentName": "机床",
332
158
  "enabled": true,
333
159
  "operate": "single",
334
160
  "mappings": [
335
161
  {
336
- "target": "id",
337
- "source": "id",
162
+ "target": "device_id",
163
+ "source": "device_id",
338
164
  "defaultValue": ""
339
165
  },
340
166
  {
341
167
  "target": "light.color",
342
- "source": "lightColor"
168
+ "source": "light.color"
343
169
  },
344
170
  {
345
171
  "target": "light.rotating",
346
- "source": "lightRotating"
172
+ "source": "light.rotating"
347
173
  },
348
174
  {
349
175
  "target": "light.blinking",
350
- "source": "lightBlinking"
176
+ "source": "light.blinking"
351
177
  },
352
178
  {
353
- "target": "light.color",
354
- "source": "light.color"
179
+ "target": "progress.percent",
180
+ "source": "progress.percent",
181
+ "defaultValue": 0
355
182
  },
356
183
  {
357
- "target": "light.rotating",
358
- "source": "light.rotating"
184
+ "target": "progress.text",
185
+ "source": "progress.text"
359
186
  },
360
187
  {
361
- "target": "light.blinking",
362
- "source": "light.blinking"
188
+ "target": "passage.in",
189
+ "source": "passage.in",
190
+ "defaultValue": false
363
191
  },
364
192
  {
365
- "target": "x",
366
- "source": "x",
367
- "transform": "percentToPixel",
368
- "transformType": "width",
369
- "transformPrecision": 2
193
+ "target": "passage.out",
194
+ "source": "passage.out",
195
+ "defaultValue": false
370
196
  },
371
197
  {
372
- "target": "j1",
373
- "source": "j1"
198
+ "target": "station_rotation",
199
+ "source": "station_rotation"
374
200
  },
375
201
  {
376
- "target": "forkXY",
377
- "source": "forkXY"
202
+ "target": "is_working",
203
+ "source": "is_working",
204
+ "defaultValue": false
378
205
  },
379
206
  {
380
- "target": "forkZ",
381
- "source": "forkZ"
207
+ "target": "device_state",
208
+ "source": "device_state"
382
209
  }
383
210
  ]
384
211
  },
385
212
  {
386
- "sourceType": "CleaningMachine",
213
+ "sourceType": "device_command",
214
+ "deviceType": "cleaning_machine",
387
215
  "className": "CleaningMachine",
388
216
  "equipmentName": "清洗机",
389
217
  "enabled": true,
390
218
  "operate": "single",
391
219
  "mappings": [
392
220
  {
393
- "target": "id",
394
- "source": "id",
221
+ "target": "device_id",
222
+ "source": "device_id",
395
223
  "defaultValue": ""
396
224
  },
397
225
  {
398
226
  "target": "light.color",
399
- "source": "lightColor"
400
- },
401
- {
402
- "target": "light.blinking",
403
- "source": "lightBlinking"
227
+ "source": "light.color"
404
228
  },
405
229
  {
406
- "target": "light.color",
407
- "source": "light.color"
230
+ "target": "light.rotating",
231
+ "source": "light.rotating"
408
232
  },
409
233
  {
410
234
  "target": "light.blinking",
@@ -412,45 +236,47 @@
412
236
  },
413
237
  {
414
238
  "target": "progress.percent",
415
- "source": "percent",
239
+ "source": "progress.percent",
416
240
  "defaultValue": 0
417
241
  },
418
242
  {
419
- "target": "progress.textContent",
420
- "source": "statusText"
243
+ "target": "progress.text",
244
+ "source": "progress.text"
245
+ },
246
+ {
247
+ "target": "passage.in",
248
+ "source": "passage.in",
249
+ "defaultValue": false
421
250
  },
422
251
  {
423
- "target": "entrance.isIn",
424
- "source": "isIn",
252
+ "target": "passage.out",
253
+ "source": "passage.out",
425
254
  "defaultValue": false
426
255
  },
427
256
  {
428
- "target": "entrance.isOut",
429
- "source": "isOut",
257
+ "target": "is_working",
258
+ "source": "is_working",
430
259
  "defaultValue": false
260
+ },
261
+ {
262
+ "target": "device_state",
263
+ "source": "device_state"
431
264
  }
432
265
  ]
433
266
  },
434
267
  {
435
- "sourceType": "MarkingMachine",
436
- "className": "MarkingMachine",
437
- "equipmentName": "打标机",
268
+ "sourceType": "device_command",
269
+ "deviceType": "resource_operation_window",
270
+ "className": "ResourceOperationWindow",
271
+ "equipmentName": "资源操作窗口",
438
272
  "enabled": true,
439
273
  "operate": "single",
440
274
  "mappings": [
441
275
  {
442
- "target": "id",
443
- "source": "id",
276
+ "target": "device_id",
277
+ "source": "device_id",
444
278
  "defaultValue": ""
445
279
  },
446
- {
447
- "target": "light.color",
448
- "source": "lightColor"
449
- },
450
- {
451
- "target": "light.blinking",
452
- "source": "lightBlinking"
453
- },
454
280
  {
455
281
  "target": "light.color",
456
282
  "source": "light.color"
@@ -460,53 +286,31 @@
460
286
  "source": "light.blinking"
461
287
  },
462
288
  {
463
- "target": "progress.percent",
464
- "source": "percent",
465
- "defaultValue": 0
466
- },
467
- {
468
- "target": "progress.textContent",
469
- "source": "statusText"
470
- },
471
- {
472
- "target": "entrance.isIn",
473
- "source": "isIn",
474
- "defaultValue": false
475
- },
476
- {
477
- "target": "entrance.isOut",
478
- "source": "isOut",
479
- "defaultValue": false
480
- },
481
- {
482
- "target": "laserSites",
483
- "source": "laserSites"
289
+ "target": "device_state",
290
+ "source": "device_state"
484
291
  }
485
292
  ]
486
293
  },
487
294
  {
488
- "sourceType": "LoadingStation",
489
- "className": "LoadingStation",
490
- "equipmentName": "装载站",
295
+ "sourceType": "device_command",
296
+ "deviceType": "marking_machine",
297
+ "className": "MarkingMachine",
298
+ "equipmentName": "打标机",
491
299
  "enabled": true,
492
300
  "operate": "single",
493
301
  "mappings": [
494
302
  {
495
- "target": "id",
496
- "source": "id",
303
+ "target": "device_id",
304
+ "source": "device_id",
497
305
  "defaultValue": ""
498
306
  },
499
307
  {
500
308
  "target": "light.color",
501
- "source": "lightColor"
502
- },
503
- {
504
- "target": "light.blinking",
505
- "source": "lightBlinking"
309
+ "source": "light.color"
506
310
  },
507
311
  {
508
- "target": "light.color",
509
- "source": "light.color"
312
+ "target": "light.rotating",
313
+ "source": "light.rotating"
510
314
  },
511
315
  {
512
316
  "target": "light.blinking",
@@ -514,50 +318,46 @@
514
318
  },
515
319
  {
516
320
  "target": "progress.percent",
517
- "source": "percent",
321
+ "source": "progress.percent",
518
322
  "defaultValue": 0
519
323
  },
520
324
  {
521
- "target": "progress.textContent",
522
- "source": "statusText"
325
+ "target": "progress.text",
326
+ "source": "progress.text"
523
327
  },
524
328
  {
525
- "target": "entrance.isIn",
526
- "source": "isIn",
329
+ "target": "passage.in",
330
+ "source": "passage.in",
527
331
  "defaultValue": false
528
332
  },
529
333
  {
530
- "target": "entrance.isOut",
531
- "source": "isOut",
334
+ "target": "passage.out",
335
+ "source": "passage.out",
532
336
  "defaultValue": false
533
337
  },
534
338
  {
535
- "target": "stationRotatable",
536
- "source": "stationRotatable",
537
- "defaultValue": false
339
+ "target": "marking_sites",
340
+ "source": "marking_sites"
341
+ },
342
+ {
343
+ "target": "device_state",
344
+ "source": "device_state"
538
345
  }
539
346
  ]
540
347
  },
541
348
  {
542
- "sourceType": "ShuttleStation",
349
+ "sourceType": "device_command",
350
+ "deviceType": "shuttle_station",
543
351
  "className": "ShuttleStation",
544
352
  "equipmentName": "接驳站",
545
353
  "enabled": true,
546
354
  "operate": "single",
547
355
  "mappings": [
548
356
  {
549
- "target": "id",
550
- "source": "id",
357
+ "target": "device_id",
358
+ "source": "device_id",
551
359
  "defaultValue": ""
552
360
  },
553
- {
554
- "target": "light.color",
555
- "source": "lightColor"
556
- },
557
- {
558
- "target": "light.blinking",
559
- "source": "lightBlinking"
560
- },
561
361
  {
562
362
  "target": "light.color",
563
363
  "source": "light.color"
@@ -567,385 +367,148 @@
567
367
  "source": "light.blinking"
568
368
  },
569
369
  {
570
- "target": "layerVisible",
571
- "source": "layerStatus",
572
- "transform": "objDict",
573
- "transformTargetType": "boolean",
574
- "valueMap": {
575
- "0": false,
576
- "1": true,
577
- "false": false,
578
- "true": true
579
- },
370
+ "target": "layer_visible",
371
+ "source": "layer_visible",
580
372
  "defaultValue": {}
581
373
  },
582
374
  {
583
- "target": "layerLightColor",
584
- "source": "layerStationStatus",
585
- "transform": "objDict",
586
- "dictName": "shuttleLayerStatus",
375
+ "target": "layer_light_colors",
376
+ "source": "layer_light_colors",
587
377
  "defaultValue": {}
588
378
  },
589
379
  {
590
- "target": "layerLightBlinking",
591
- "source": "layerStationStatus",
592
- "transform": "objDict",
593
- "transformTargetType": "boolean",
594
- "valueMap": {
595
- "1": false,
596
- "2": true,
597
- "99": true
598
- },
380
+ "target": "layer_light_blinking",
381
+ "source": "layer_light_blinking",
599
382
  "defaultValue": {}
383
+ },
384
+ {
385
+ "target": "device_state",
386
+ "source": "device_state"
600
387
  }
601
388
  ]
602
- }
603
- ]
604
- },
605
- {
606
- "caseId": "07940f5e-93fd-40c5-85f7-56b4d3fe838b",
607
- "caseName": "中央刀具库(丝路厂区)",
608
- "fileUrl": "public/lingshu-smart/wsProxyConfig.json",
609
- "version": "0904",
610
- "dataSource": "builtin",
611
- "wsUrl": "/ws/monitor?page=ctsMonitor",
612
- "carryToken": true,
613
- "requestMode": "proxy",
614
- "autoConnect": true,
615
- "payloadKey": "data",
616
- "sourceTypeField": "type",
617
- "heartbeatInterval": 0,
618
- "modelMap": {
619
- "0": "SingleJointRobot",
620
- "1": "Pallet",
621
- "2": "ShuttleStation",
622
- "4": "ResourceStore",
623
- "5": "ResourceOperationWindow",
624
- "8": "MaterialTrack"
625
- },
626
- "rules": [
389
+ },
627
390
  {
628
- "sourceType": "4",
629
- "className": "ShuttleStation",
630
- "equipmentName": "接驳站",
391
+ "sourceType": "device_command",
392
+ "deviceType": "material_track",
393
+ "className": "MaterialTrack",
394
+ "equipmentName": "料道",
631
395
  "enabled": true,
632
396
  "operate": "single",
633
397
  "mappings": [
634
398
  {
635
- "target": "id",
636
- "source": "deviceId",
399
+ "target": "device_id",
400
+ "source": "device_id",
637
401
  "defaultValue": ""
638
402
  },
639
403
  {
640
404
  "target": "light.color",
641
- "source": "displayColor",
642
- "defaultValue": "#424242"
405
+ "source": "light.color"
643
406
  },
644
407
  {
645
408
  "target": "light.blinking",
646
- "source": "status",
647
- "valueMap": {
648
- "2": true
649
- },
650
- "defaultValue": false
409
+ "source": "light.blinking"
651
410
  },
652
411
  {
653
- "target": "layerVisible",
654
- "source": "layerStationStatus",
655
- "transform": "objDict",
656
- "transformTargetType": "boolean",
657
- "valueMap": {
658
- "0": "false",
659
- "1": "true"
660
- },
661
- "defaultValue": {},
662
- "dictName": ""
663
- },
664
- {
665
- "target": "layerLightColor",
666
- "source": "layerStatus",
667
- "transform": "objDict",
668
- "dictName": "dockingStationStatus",
669
- "defaultValue": {},
670
- "valueMap": {},
671
- "transformTargetType": "string"
672
- },
673
- {
674
- "target": "layerLightBlinking",
675
- "source": "layerStatus",
676
- "transform": "objDict",
677
- "transformTargetType": "boolean",
678
- "valueMap": {
679
- "1": "false",
680
- "2": "true",
681
- "99": "false"
682
- },
412
+ "target": "layer_visible",
413
+ "source": "layer_visible",
683
414
  "defaultValue": {}
415
+ },
416
+ {
417
+ "target": "device_state",
418
+ "source": "device_state"
684
419
  }
685
420
  ]
686
421
  },
687
422
  {
688
- "sourceType": "1",
689
- "className": "SingleJointRobot",
690
- "equipmentName": "单关节机器人",
423
+ "sourceType": "device_command",
424
+ "deviceType": "loading_station",
425
+ "className": "LoadingStation",
426
+ "equipmentName": "装载站",
691
427
  "enabled": true,
692
428
  "operate": "single",
693
429
  "mappings": [
694
430
  {
695
- "target": "id",
696
- "source": "id",
431
+ "target": "device_id",
432
+ "source": "device_id",
697
433
  "defaultValue": ""
698
434
  },
699
435
  {
700
436
  "target": "light.color",
701
- "source": "status",
702
- "defaultValue": "#424242",
703
- "transform": "dictColor",
704
- "dictName": "robotStatus"
437
+ "source": "light.color"
705
438
  },
706
439
  {
707
440
  "target": "light.rotating",
708
- "source": "",
709
- "valueMap": {
710
- "1": true
711
- },
712
- "defaultValue": false
441
+ "source": "light.rotating"
713
442
  },
714
443
  {
715
444
  "target": "light.blinking",
716
- "source": "status",
717
- "valueMap": {
718
- "2": true
719
- },
720
- "defaultValue": false,
721
- "transform": "condition",
722
- "dictName": "",
723
- "conditions": [
724
- {
725
- "operator": "eq",
726
- "operand": "98",
727
- "value": "true"
728
- },
729
- {
730
- "operator": "eq",
731
- "operand": "11",
732
- "value": "true"
733
- },
734
- {
735
- "operator": "eq",
736
- "operand": "12",
737
- "value": "true"
738
- }
739
- ]
740
- },
741
- {
742
- "target": "x",
743
- "source": "x",
744
- "transform": "constant",
745
- "constant": "500",
746
- "transformType": "width",
747
- "transformPrecision": 2
748
- },
749
- {
750
- "target": "y",
751
- "source": ""
752
- },
753
- {
754
- "target": "j1",
755
- "source": "j1"
756
- },
757
- {
758
- "target": "currentFixture",
759
- "source": "clawHasPallet",
760
- "transform": "condition",
761
- "conditions": [
762
- {
763
- "operator": "eq",
764
- "operand": "true",
765
- "value": "Pallet"
766
- },
767
- {
768
- "operator": "eq",
769
- "operand": "false",
770
- "value": "Tool"
771
- }
772
- ]
773
- }
774
- ]
775
- },
776
- {
777
- "sourceType": "",
778
- "className": "ResourceStore",
779
- "equipmentName": "资源库",
780
- "enabled": true,
781
- "operate": "single",
782
- "mappings": [
783
- {
784
- "target": "id",
785
- "source": "deviceId",
786
- "defaultValue": ""
445
+ "source": "light.blinking"
787
446
  },
788
447
  {
789
- "target": "light.color",
790
- "source": "status",
791
- "defaultValue": "#424242"
448
+ "target": "progress.percent",
449
+ "source": "progress.percent",
450
+ "defaultValue": 0
792
451
  },
793
452
  {
794
- "target": "light.rotating",
795
- "source": "status",
796
- "valueMap": {
797
- "1": true
798
- },
799
- "defaultValue": false
453
+ "target": "progress.text",
454
+ "source": "progress.text"
800
455
  },
801
456
  {
802
- "target": "light.blinking",
803
- "source": "status",
804
- "valueMap": {
805
- "2": true
806
- },
457
+ "target": "passage.in",
458
+ "source": "passage.in",
807
459
  "defaultValue": false
808
460
  },
809
461
  {
810
- "target": "x",
811
- "source": ""
462
+ "target": "passage.out",
463
+ "source": "passage.out",
464
+ "defaultValue": false
812
465
  },
813
466
  {
814
- "target": "stationColor",
815
- "source": "stationColor",
816
- "defaultValue": {}
467
+ "target": "device_state",
468
+ "source": "device_state"
817
469
  }
818
470
  ]
819
471
  },
820
472
  {
821
- "sourceType": "",
473
+ "sourceType": "device_command",
474
+ "deviceType": "pallet",
822
475
  "className": "Pallet",
823
476
  "equipmentName": "托盘",
824
477
  "enabled": true,
825
478
  "operate": "single",
826
479
  "mappings": [
827
480
  {
828
- "target": "id",
829
- "source": "deviceId",
481
+ "target": "device_id",
482
+ "source": "device_id",
830
483
  "defaultValue": ""
831
484
  },
832
485
  {
833
486
  "target": "light.color",
834
- "source": "status",
835
- "defaultValue": "#424242",
836
- "transform": "dictColor",
837
- "dictName": "toolChangeWindowStatus"
487
+ "source": "light.color"
838
488
  },
839
489
  {
840
490
  "target": "light.rotating",
841
- "source": "",
842
- "valueMap": {
843
- "1": true
844
- },
845
- "defaultValue": false
491
+ "source": "light.rotating"
846
492
  },
847
493
  {
848
494
  "target": "light.blinking",
849
- "source": "",
850
- "valueMap": {
851
- "2": true
852
- },
853
- "defaultValue": false
854
- },
855
- {
856
- "target": "x",
857
- "source": ""
858
- },
859
- {
860
- "target": "y",
861
- "source": ""
862
- },
863
- {
864
- "target": "stationColor",
865
- "source": "stationColor",
866
- "defaultValue": {}
867
- }
868
- ]
869
- },
870
- {
871
- "sourceType": "8",
872
- "className": "MaterialTrack",
873
- "equipmentName": "料道",
874
- "enabled": true,
875
- "operate": "single",
876
- "mappings": [
877
- {
878
- "target": "id",
879
- "source": "deviceId",
880
- "defaultValue": ""
495
+ "source": "light.blinking"
881
496
  },
882
497
  {
883
- "target": "light.color",
884
- "source": "status",
885
- "defaultValue": "#424242",
886
- "transform": "dictColor",
887
- "dictName": "palletLaneStatus"
498
+ "target": "position.x",
499
+ "source": "position.x"
888
500
  },
889
501
  {
890
- "target": "light.blinking",
891
- "source": "status",
892
- "valueMap": {},
893
- "defaultValue": false,
894
- "transform": "condition",
895
- "dictName": "",
896
- "transformTargetType": "string",
897
- "conditions": [
898
- {
899
- "operator": "eq",
900
- "operand": "1",
901
- "value": "false"
902
- },
903
- {
904
- "operator": "eq",
905
- "operand": "2",
906
- "value": "true"
907
- },
908
- {
909
- "operator": "eq",
910
- "operand": "99",
911
- "value": "false"
912
- }
913
- ]
914
- },
915
- {
916
- "target": "layerVisible",
917
- "source": "",
918
- "defaultValue": {}
919
- }
920
- ]
921
- },
922
- {
923
- "sourceType": "Rail",
924
- "className": "Rail",
925
- "equipmentName": "轨道",
926
- "enabled": false,
927
- "operate": "single",
928
- "mappings": [
929
- {
930
- "target": "id",
931
- "source": "id",
932
- "defaultValue": ""
933
- },
934
- {
935
- "target": "x",
936
- "source": "x",
937
- "transform": "percentToPixel",
938
- "transformType": "width",
939
- "transformPrecision": 2
502
+ "target": "position.y",
503
+ "source": "position.y"
940
504
  },
941
505
  {
942
- "target": "botId",
943
- "source": "botId"
506
+ "target": "device_state",
507
+ "source": "device_state"
944
508
  }
945
509
  ]
946
510
  },
947
511
  {
948
- "sourceType": "2",
949
512
  "className": "Resource",
950
513
  "enabled": true,
951
514
  "operate": "resource",
@@ -953,128 +516,167 @@
953
516
  "resourceMappings": {
954
517
  "add": [
955
518
  {
956
- "target": "className",
957
- "source": "deviceType",
958
- "transform": "modelMap"
519
+ "target": "resource_id",
520
+ "source": "resource_id"
521
+ },
522
+ {
523
+ "target": "resource_type",
524
+ "source": "resource_type"
959
525
  },
960
526
  {
961
- "target": "id",
962
- "source": "deviceId"
527
+ "target": "resource_name",
528
+ "source": "resource_name"
963
529
  },
964
530
  {
965
- "target": "resource.resourceType",
966
- "source": "",
967
- "transform": "constant",
968
- "conditions": [
969
- {
970
- "operator": "eq",
971
- "operand": "1",
972
- "value": "Tool"
973
- }
974
- ],
975
- "constant": "Tool"
531
+ "target": "resource_color",
532
+ "source": "resource_color"
976
533
  },
977
534
  {
978
- "target": "resource.resourceId",
979
- "source": "id"
535
+ "target": "to.device_type",
536
+ "source": "to.device_type"
980
537
  },
981
538
  {
982
- "target": "resource.name",
983
- "source": "",
984
- "transform": "constant",
985
- "constant": "A"
539
+ "target": "to.device_id",
540
+ "source": "to.device_id"
986
541
  },
987
542
  {
988
- "target": "resource.color",
989
- "source": "status",
990
- "transform": "condition",
991
- "conditions": [
992
- {
993
- "operator": "eq",
994
- "operand": "1",
995
- "value": "#f30"
996
- }
997
- ]
543
+ "target": "to.device_layer",
544
+ "source": "to.device_layer"
998
545
  },
999
546
  {
1000
- "target": "resource.index",
1001
- "source": "station"
547
+ "target": "to.device_station",
548
+ "source": "to.device_station"
1002
549
  }
1003
550
  ],
1004
- "remove": [
551
+ "batch_add": [
552
+ {
553
+ "target": "resource_id",
554
+ "source": "resource_id"
555
+ },
556
+ {
557
+ "target": "resource_type",
558
+ "source": "resource_type"
559
+ },
560
+ {
561
+ "target": "resource_name",
562
+ "source": "resource_name"
563
+ },
564
+ {
565
+ "target": "resource_color",
566
+ "source": "resource_color"
567
+ },
568
+ {
569
+ "target": "to.device_type",
570
+ "source": "to.device_type"
571
+ },
572
+ {
573
+ "target": "to.device_id",
574
+ "source": "to.device_id"
575
+ },
576
+ {
577
+ "target": "to.device_layer",
578
+ "source": "to.device_layer"
579
+ },
580
+ {
581
+ "target": "to.device_station",
582
+ "source": "to.device_station"
583
+ }
584
+ ],
585
+ "transfer": [
586
+ {
587
+ "target": "resource_id",
588
+ "source": "resource_id"
589
+ },
590
+ {
591
+ "target": "resource_type",
592
+ "source": "resource_type"
593
+ },
1005
594
  {
1006
- "target": "className",
1007
- "source": "o_deviceType",
1008
- "transform": "modelMap"
595
+ "target": "resource_name",
596
+ "source": "resource_name"
1009
597
  },
1010
598
  {
1011
- "target": "id",
1012
- "source": "o_deviceId"
599
+ "target": "resource_color",
600
+ "source": "resource_color"
1013
601
  },
1014
602
  {
1015
- "target": "resource.resourceType",
1016
- "source": "",
1017
- "transform": "constant",
1018
- "constant": "Tool"
603
+ "target": "from.device_type",
604
+ "source": "from.device_type"
1019
605
  },
1020
606
  {
1021
- "target": "resource.resourceId",
1022
- "source": "id"
607
+ "target": "from.device_id",
608
+ "source": "from.device_id"
1023
609
  },
1024
610
  {
1025
- "target": "resource.index",
1026
- "source": "o_station"
611
+ "target": "from.device_layer",
612
+ "source": "from.device_layer"
613
+ },
614
+ {
615
+ "target": "from.device_station",
616
+ "source": "from.device_station"
617
+ },
618
+ {
619
+ "target": "to.device_type",
620
+ "source": "to.device_type"
621
+ },
622
+ {
623
+ "target": "to.device_id",
624
+ "source": "to.device_id"
625
+ },
626
+ {
627
+ "target": "to.device_layer",
628
+ "source": "to.device_layer"
629
+ },
630
+ {
631
+ "target": "to.device_station",
632
+ "source": "to.device_station"
633
+ }
634
+ ],
635
+ "remove": [
636
+ {
637
+ "target": "resource_id",
638
+ "source": "resource_id"
639
+ },
640
+ {
641
+ "target": "resource_type",
642
+ "source": "resource_type"
643
+ }
644
+ ],
645
+ "batch_remove": [
646
+ {
647
+ "target": "resource_ids",
648
+ "source": "resource_ids"
649
+ },
650
+ {
651
+ "target": "resource_type",
652
+ "source": "resource_type"
1027
653
  }
1028
654
  ]
1029
- }
655
+ },
656
+ "resourceFields": {
657
+ "operationField": "data.operation",
658
+ "batchAddItems": "data.resources"
659
+ },
660
+ "sourceType": "resource_command"
1030
661
  },
1031
662
  {
1032
- "sourceType": "3",
1033
- "className": "BatchRemove",
663
+ "className": "RuntimeStatus",
664
+ "equipmentName": "全局运行状态推送",
665
+ "sourceType": "runtime_status_push",
1034
666
  "enabled": true,
1035
- "operate": "global",
1036
- "mappings": [],
1037
- "globalFields": {
1038
- "resourceIds": "data"
1039
- }
667
+ "operate": "statusPush",
668
+ "mappings": [
669
+ { "target": "currentTask", "source": "current_task" },
670
+ { "target": "device_stats", "source": "device_stats" },
671
+ { "target": "deviceOnline", "source": "device_stats.online" }
672
+ ]
1040
673
  },
1041
674
  {
1042
- "sourceType": "5",
1043
- "className": "ResourceOperationWindow",
1044
- "equipmentName": "资源操作窗口",
675
+ "className": "ResetAll",
676
+ "sourceType": "scene_reset",
1045
677
  "enabled": true,
1046
- "operate": "single",
1047
- "mappings": [
1048
- {
1049
- "target": "id",
1050
- "source": "deviceId",
1051
- "defaultValue": ""
1052
- },
1053
- {
1054
- "target": "light.color",
1055
- "source": "status",
1056
- "defaultValue": "#424242",
1057
- "transform": "dictColor",
1058
- "dictName": "dockingStationLayerStatus"
1059
- },
1060
- {
1061
- "target": "light.blinking",
1062
- "source": "",
1063
- "valueMap": {
1064
- "2": true
1065
- },
1066
- "defaultValue": false
1067
- },
1068
- {
1069
- "target": "stationColor",
1070
- "source": "stationStatus",
1071
- "defaultValue": {},
1072
- "transform": "objDict",
1073
- "dictName": "toolChangeWindowStationStatus",
1074
- "valueMap": {},
1075
- "transformTargetType": "string"
1076
- }
1077
- ]
678
+ "operate": "resetAll",
679
+ "mappings": []
1078
680
  }
1079
681
  ]
1080
682
  }