@jnrs/lingshu-smart 2.2.34 → 2.2.36

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 (46) hide show
  1. package/AGENTS.md +34 -10
  2. package/README.md +8 -7
  3. package/dist/components/debug/DataLogPanel.vue.d.ts +44 -0
  4. package/dist/components/debug/ScriptRunner/ConfigPanel.vue.d.ts +14 -11
  5. package/dist/components/debug/ScriptRunner/StepsPanel.vue.d.ts +8 -0
  6. package/dist/components/debug/ScriptRunner/script.d.ts +29 -1
  7. package/dist/components/debug/WsProxy/ConfigEditor.vue.d.ts +18 -0
  8. package/dist/components/debug/WsProxy/ConnPanel.vue.d.ts +33 -0
  9. package/dist/components/debug/WsProxy/index.vue.d.ts +36 -0
  10. package/dist/components/debug/WsProxy/proxy.d.ts +171 -0
  11. package/dist/components/editor/OptionCard/Equipment/models/Pallet.vue.d.ts +2 -0
  12. package/dist/components/editor/OptionCard/Equipment/stationSlot/StationSlotGroupDialog.vue.d.ts +4 -0
  13. package/dist/components/editor/OptionCard/Equipment/stationSlot/StationSlotGroupLayers.vue.d.ts +2 -0
  14. package/dist/components/index.d.ts +2 -1
  15. package/dist/components/index.js +14396 -11457
  16. package/dist/components/preview/index.vue.d.ts +296 -0
  17. package/dist/controller/AppController.d.ts +2 -0
  18. package/dist/index.js +94 -86
  19. package/dist/lingshu-smart/wsProxyConfig.json +525 -0
  20. package/dist/locales/index.js +2 -2
  21. package/dist/playground/ViewPageDemo.vue.d.ts +646 -0
  22. package/dist/stores/useAppStore.d.ts +888 -0
  23. package/dist/stores/useDataStore.d.ts +888 -0
  24. package/dist/stores/useDebugStore.d.ts +393 -2
  25. package/dist/types/components/config.types.d.ts +6 -0
  26. package/dist/types/components/operating.types.d.ts +1 -0
  27. package/dist/types/enums.d.ts +2 -1
  28. package/dist/types/guards.d.ts +7 -1
  29. package/dist/types/models/config.types.d.ts +25 -1
  30. package/dist/types/models/operating.types.d.ts +27 -1
  31. package/dist/ui/abstract/ModelAbs.d.ts +10 -0
  32. package/dist/ui/components/StationSlot.d.ts +5 -1
  33. package/dist/ui/components/StationSlotGroup.d.ts +5 -0
  34. package/dist/ui/models/CleaningMachine.d.ts +2 -0
  35. package/dist/ui/models/DoubleJointRobot.d.ts +2 -0
  36. package/dist/ui/models/LoadingStation.d.ts +2 -0
  37. package/dist/ui/models/MachineTool.d.ts +2 -0
  38. package/dist/ui/models/MarkingMachine.d.ts +2 -0
  39. package/dist/ui/models/Pallet.d.ts +16 -0
  40. package/dist/ui/models/ResourceStore.d.ts +2 -0
  41. package/dist/ui/models/Rgv.d.ts +2 -0
  42. package/dist/ui/models/ShuttleStation.d.ts +17 -4
  43. package/dist/ui/models/SingleJointRobot.d.ts +2 -0
  44. package/package.json +2 -2
  45. package/dist/components/debug/ScriptRunner/LogPanel.vue.d.ts +0 -19
  46. /package/dist/{json → lingshu-smart}/cases.json +0 -0
@@ -1,5 +1,6 @@
1
1
  import { LogLevel } from '../utils/logger';
2
2
  import { ScriptStep } from '../components/debug/ScriptRunner/script';
3
+ import { WsProxyConfig } from '../components/debug/WsProxy/proxy';
3
4
  /** FPS 模式:自动或固定帧率 */
4
5
  export type FpsMode = 'auto' | 30 | 60 | 120;
5
6
  /** 语言类型 */
@@ -20,6 +21,12 @@ export declare const useDebugStore: import('pinia').StoreDefinition<"@jnrs/lings
20
21
  delay: number;
21
22
  enabled: boolean;
22
23
  params: Record<string, any>;
24
+ code: number;
25
+ msg: string;
26
+ payloadKey: "data" | "payload";
27
+ msgType: string;
28
+ customData?: string | undefined;
29
+ typeOverride?: string | undefined;
23
30
  }[], ScriptStep[] | {
24
31
  uid: string;
25
32
  deviceType: string;
@@ -27,8 +34,132 @@ export declare const useDebugStore: import('pinia').StoreDefinition<"@jnrs/lings
27
34
  delay: number;
28
35
  enabled: boolean;
29
36
  params: Record<string, any>;
37
+ code: number;
38
+ msg: string;
39
+ payloadKey: "data" | "payload";
40
+ msgType: string;
41
+ customData?: string | undefined;
42
+ typeOverride?: string | undefined;
30
43
  }[]>;
31
44
  setScriptSteps: (list: ScriptStep[]) => void;
45
+ wsProxyConfig: import('vue').Ref<{
46
+ name: string;
47
+ version: number;
48
+ dataSource?: import('../components/debug/WsProxy/proxy').WsProxyDataSource | undefined;
49
+ wsUrl?: string | undefined;
50
+ requestMode?: import('../components/debug/WsProxy/proxy').WsProxyRequestMode | undefined;
51
+ autoConnect?: boolean | undefined;
52
+ payloadKey?: string | undefined;
53
+ sourceTypeField?: string | undefined;
54
+ heartbeatInterval?: number | undefined;
55
+ rules: {
56
+ sourceType?: string | undefined;
57
+ className: string;
58
+ equipmentName?: string | undefined;
59
+ enabled: boolean;
60
+ operate: "single" | "resource" | "global";
61
+ mappings: {
62
+ target: string;
63
+ source?: string | undefined;
64
+ constant?: boolean | number | string | undefined;
65
+ valueMap?: Record<string, boolean | number | string> | undefined;
66
+ defaultValue?: (boolean | number | string | Record<string, unknown>) | undefined;
67
+ enabled?: boolean | undefined;
68
+ transform?: "percentToPixel" | "runtimeToPixel" | "dictLabel" | "dictColor" | "dictColorMap" | "condition" | undefined;
69
+ transformType?: "width" | "height" | undefined;
70
+ transformPrecision?: number | undefined;
71
+ dictName?: string | undefined;
72
+ conditions?: {
73
+ operator: "eq" | "ne" | "gt" | "lt" | "gte" | "lte" | "includes" | "in";
74
+ operand: string;
75
+ value: string | number | boolean;
76
+ }[] | undefined;
77
+ }[];
78
+ resourceFields?: {
79
+ add?: {
80
+ className: string;
81
+ id: string;
82
+ resourceType: string;
83
+ resourceId?: string | undefined;
84
+ index: string;
85
+ name?: string | undefined;
86
+ color?: string | undefined;
87
+ } | undefined;
88
+ remove?: {
89
+ className: string;
90
+ id: string;
91
+ resourceType: string;
92
+ resourceId?: string | undefined;
93
+ index: string;
94
+ name?: string | undefined;
95
+ color?: string | undefined;
96
+ } | undefined;
97
+ } | undefined;
98
+ globalFields?: {
99
+ resourceIds: string;
100
+ } | undefined;
101
+ }[];
102
+ }, WsProxyConfig | {
103
+ name: string;
104
+ version: number;
105
+ dataSource?: import('../components/debug/WsProxy/proxy').WsProxyDataSource | undefined;
106
+ wsUrl?: string | undefined;
107
+ requestMode?: import('../components/debug/WsProxy/proxy').WsProxyRequestMode | undefined;
108
+ autoConnect?: boolean | undefined;
109
+ payloadKey?: string | undefined;
110
+ sourceTypeField?: string | undefined;
111
+ heartbeatInterval?: number | undefined;
112
+ rules: {
113
+ sourceType?: string | undefined;
114
+ className: string;
115
+ equipmentName?: string | undefined;
116
+ enabled: boolean;
117
+ operate: "single" | "resource" | "global";
118
+ mappings: {
119
+ target: string;
120
+ source?: string | undefined;
121
+ constant?: boolean | number | string | undefined;
122
+ valueMap?: Record<string, boolean | number | string> | undefined;
123
+ defaultValue?: (boolean | number | string | Record<string, unknown>) | undefined;
124
+ enabled?: boolean | undefined;
125
+ transform?: "percentToPixel" | "runtimeToPixel" | "dictLabel" | "dictColor" | "dictColorMap" | "condition" | undefined;
126
+ transformType?: "width" | "height" | undefined;
127
+ transformPrecision?: number | undefined;
128
+ dictName?: string | undefined;
129
+ conditions?: {
130
+ operator: "eq" | "ne" | "gt" | "lt" | "gte" | "lte" | "includes" | "in";
131
+ operand: string;
132
+ value: string | number | boolean;
133
+ }[] | undefined;
134
+ }[];
135
+ resourceFields?: {
136
+ add?: {
137
+ className: string;
138
+ id: string;
139
+ resourceType: string;
140
+ resourceId?: string | undefined;
141
+ index: string;
142
+ name?: string | undefined;
143
+ color?: string | undefined;
144
+ } | undefined;
145
+ remove?: {
146
+ className: string;
147
+ id: string;
148
+ resourceType: string;
149
+ resourceId?: string | undefined;
150
+ index: string;
151
+ name?: string | undefined;
152
+ color?: string | undefined;
153
+ } | undefined;
154
+ } | undefined;
155
+ globalFields?: {
156
+ resourceIds: string;
157
+ } | undefined;
158
+ }[];
159
+ }>;
160
+ setWsProxyConfig: (cfg: WsProxyConfig) => void;
161
+ wsProxyManualModified: import('vue').Ref<boolean, boolean>;
162
+ setWsProxyManualModified: (modified: boolean) => void;
32
163
  setLogLevel: (level: LogLevel) => void;
33
164
  setShadowsEnabled: (enabled: boolean) => void;
34
165
  setAnimationsEnabled: (enabled: boolean) => void;
@@ -39,7 +170,7 @@ export declare const useDebugStore: import('pinia').StoreDefinition<"@jnrs/lings
39
170
  toggleTheme: () => void;
40
171
  showDebugPanel: () => void;
41
172
  hideDebugPanel: () => void;
42
- }, "locale" | "logLevel" | "shadowsEnabled" | "animationsEnabled" | "fpsMode" | "interactionsDisabled" | "theme" | "debugPanelVisible" | "scriptSteps">, Pick<{
173
+ }, "locale" | "logLevel" | "shadowsEnabled" | "animationsEnabled" | "fpsMode" | "interactionsDisabled" | "theme" | "wsProxyManualModified" | "debugPanelVisible" | "scriptSteps" | "wsProxyConfig">, Pick<{
43
174
  logLevel: import('vue').Ref<LogLevel, LogLevel>;
44
175
  shadowsEnabled: import('vue').Ref<boolean, boolean>;
45
176
  animationsEnabled: import('vue').Ref<boolean, boolean>;
@@ -55,6 +186,12 @@ export declare const useDebugStore: import('pinia').StoreDefinition<"@jnrs/lings
55
186
  delay: number;
56
187
  enabled: boolean;
57
188
  params: Record<string, any>;
189
+ code: number;
190
+ msg: string;
191
+ payloadKey: "data" | "payload";
192
+ msgType: string;
193
+ customData?: string | undefined;
194
+ typeOverride?: string | undefined;
58
195
  }[], ScriptStep[] | {
59
196
  uid: string;
60
197
  deviceType: string;
@@ -62,8 +199,132 @@ export declare const useDebugStore: import('pinia').StoreDefinition<"@jnrs/lings
62
199
  delay: number;
63
200
  enabled: boolean;
64
201
  params: Record<string, any>;
202
+ code: number;
203
+ msg: string;
204
+ payloadKey: "data" | "payload";
205
+ msgType: string;
206
+ customData?: string | undefined;
207
+ typeOverride?: string | undefined;
65
208
  }[]>;
66
209
  setScriptSteps: (list: ScriptStep[]) => void;
210
+ wsProxyConfig: import('vue').Ref<{
211
+ name: string;
212
+ version: number;
213
+ dataSource?: import('../components/debug/WsProxy/proxy').WsProxyDataSource | undefined;
214
+ wsUrl?: string | undefined;
215
+ requestMode?: import('../components/debug/WsProxy/proxy').WsProxyRequestMode | undefined;
216
+ autoConnect?: boolean | undefined;
217
+ payloadKey?: string | undefined;
218
+ sourceTypeField?: string | undefined;
219
+ heartbeatInterval?: number | undefined;
220
+ rules: {
221
+ sourceType?: string | undefined;
222
+ className: string;
223
+ equipmentName?: string | undefined;
224
+ enabled: boolean;
225
+ operate: "single" | "resource" | "global";
226
+ mappings: {
227
+ target: string;
228
+ source?: string | undefined;
229
+ constant?: boolean | number | string | undefined;
230
+ valueMap?: Record<string, boolean | number | string> | undefined;
231
+ defaultValue?: (boolean | number | string | Record<string, unknown>) | undefined;
232
+ enabled?: boolean | undefined;
233
+ transform?: "percentToPixel" | "runtimeToPixel" | "dictLabel" | "dictColor" | "dictColorMap" | "condition" | undefined;
234
+ transformType?: "width" | "height" | undefined;
235
+ transformPrecision?: number | undefined;
236
+ dictName?: string | undefined;
237
+ conditions?: {
238
+ operator: "eq" | "ne" | "gt" | "lt" | "gte" | "lte" | "includes" | "in";
239
+ operand: string;
240
+ value: string | number | boolean;
241
+ }[] | undefined;
242
+ }[];
243
+ resourceFields?: {
244
+ add?: {
245
+ className: string;
246
+ id: string;
247
+ resourceType: string;
248
+ resourceId?: string | undefined;
249
+ index: string;
250
+ name?: string | undefined;
251
+ color?: string | undefined;
252
+ } | undefined;
253
+ remove?: {
254
+ className: string;
255
+ id: string;
256
+ resourceType: string;
257
+ resourceId?: string | undefined;
258
+ index: string;
259
+ name?: string | undefined;
260
+ color?: string | undefined;
261
+ } | undefined;
262
+ } | undefined;
263
+ globalFields?: {
264
+ resourceIds: string;
265
+ } | undefined;
266
+ }[];
267
+ }, WsProxyConfig | {
268
+ name: string;
269
+ version: number;
270
+ dataSource?: import('../components/debug/WsProxy/proxy').WsProxyDataSource | undefined;
271
+ wsUrl?: string | undefined;
272
+ requestMode?: import('../components/debug/WsProxy/proxy').WsProxyRequestMode | undefined;
273
+ autoConnect?: boolean | undefined;
274
+ payloadKey?: string | undefined;
275
+ sourceTypeField?: string | undefined;
276
+ heartbeatInterval?: number | undefined;
277
+ rules: {
278
+ sourceType?: string | undefined;
279
+ className: string;
280
+ equipmentName?: string | undefined;
281
+ enabled: boolean;
282
+ operate: "single" | "resource" | "global";
283
+ mappings: {
284
+ target: string;
285
+ source?: string | undefined;
286
+ constant?: boolean | number | string | undefined;
287
+ valueMap?: Record<string, boolean | number | string> | undefined;
288
+ defaultValue?: (boolean | number | string | Record<string, unknown>) | undefined;
289
+ enabled?: boolean | undefined;
290
+ transform?: "percentToPixel" | "runtimeToPixel" | "dictLabel" | "dictColor" | "dictColorMap" | "condition" | undefined;
291
+ transformType?: "width" | "height" | undefined;
292
+ transformPrecision?: number | undefined;
293
+ dictName?: string | undefined;
294
+ conditions?: {
295
+ operator: "eq" | "ne" | "gt" | "lt" | "gte" | "lte" | "includes" | "in";
296
+ operand: string;
297
+ value: string | number | boolean;
298
+ }[] | undefined;
299
+ }[];
300
+ resourceFields?: {
301
+ add?: {
302
+ className: string;
303
+ id: string;
304
+ resourceType: string;
305
+ resourceId?: string | undefined;
306
+ index: string;
307
+ name?: string | undefined;
308
+ color?: string | undefined;
309
+ } | undefined;
310
+ remove?: {
311
+ className: string;
312
+ id: string;
313
+ resourceType: string;
314
+ resourceId?: string | undefined;
315
+ index: string;
316
+ name?: string | undefined;
317
+ color?: string | undefined;
318
+ } | undefined;
319
+ } | undefined;
320
+ globalFields?: {
321
+ resourceIds: string;
322
+ } | undefined;
323
+ }[];
324
+ }>;
325
+ setWsProxyConfig: (cfg: WsProxyConfig) => void;
326
+ wsProxyManualModified: import('vue').Ref<boolean, boolean>;
327
+ setWsProxyManualModified: (modified: boolean) => void;
67
328
  setLogLevel: (level: LogLevel) => void;
68
329
  setShadowsEnabled: (enabled: boolean) => void;
69
330
  setAnimationsEnabled: (enabled: boolean) => void;
@@ -90,6 +351,12 @@ export declare const useDebugStore: import('pinia').StoreDefinition<"@jnrs/lings
90
351
  delay: number;
91
352
  enabled: boolean;
92
353
  params: Record<string, any>;
354
+ code: number;
355
+ msg: string;
356
+ payloadKey: "data" | "payload";
357
+ msgType: string;
358
+ customData?: string | undefined;
359
+ typeOverride?: string | undefined;
93
360
  }[], ScriptStep[] | {
94
361
  uid: string;
95
362
  deviceType: string;
@@ -97,8 +364,132 @@ export declare const useDebugStore: import('pinia').StoreDefinition<"@jnrs/lings
97
364
  delay: number;
98
365
  enabled: boolean;
99
366
  params: Record<string, any>;
367
+ code: number;
368
+ msg: string;
369
+ payloadKey: "data" | "payload";
370
+ msgType: string;
371
+ customData?: string | undefined;
372
+ typeOverride?: string | undefined;
100
373
  }[]>;
101
374
  setScriptSteps: (list: ScriptStep[]) => void;
375
+ wsProxyConfig: import('vue').Ref<{
376
+ name: string;
377
+ version: number;
378
+ dataSource?: import('../components/debug/WsProxy/proxy').WsProxyDataSource | undefined;
379
+ wsUrl?: string | undefined;
380
+ requestMode?: import('../components/debug/WsProxy/proxy').WsProxyRequestMode | undefined;
381
+ autoConnect?: boolean | undefined;
382
+ payloadKey?: string | undefined;
383
+ sourceTypeField?: string | undefined;
384
+ heartbeatInterval?: number | undefined;
385
+ rules: {
386
+ sourceType?: string | undefined;
387
+ className: string;
388
+ equipmentName?: string | undefined;
389
+ enabled: boolean;
390
+ operate: "single" | "resource" | "global";
391
+ mappings: {
392
+ target: string;
393
+ source?: string | undefined;
394
+ constant?: boolean | number | string | undefined;
395
+ valueMap?: Record<string, boolean | number | string> | undefined;
396
+ defaultValue?: (boolean | number | string | Record<string, unknown>) | undefined;
397
+ enabled?: boolean | undefined;
398
+ transform?: "percentToPixel" | "runtimeToPixel" | "dictLabel" | "dictColor" | "dictColorMap" | "condition" | undefined;
399
+ transformType?: "width" | "height" | undefined;
400
+ transformPrecision?: number | undefined;
401
+ dictName?: string | undefined;
402
+ conditions?: {
403
+ operator: "eq" | "ne" | "gt" | "lt" | "gte" | "lte" | "includes" | "in";
404
+ operand: string;
405
+ value: string | number | boolean;
406
+ }[] | undefined;
407
+ }[];
408
+ resourceFields?: {
409
+ add?: {
410
+ className: string;
411
+ id: string;
412
+ resourceType: string;
413
+ resourceId?: string | undefined;
414
+ index: string;
415
+ name?: string | undefined;
416
+ color?: string | undefined;
417
+ } | undefined;
418
+ remove?: {
419
+ className: string;
420
+ id: string;
421
+ resourceType: string;
422
+ resourceId?: string | undefined;
423
+ index: string;
424
+ name?: string | undefined;
425
+ color?: string | undefined;
426
+ } | undefined;
427
+ } | undefined;
428
+ globalFields?: {
429
+ resourceIds: string;
430
+ } | undefined;
431
+ }[];
432
+ }, WsProxyConfig | {
433
+ name: string;
434
+ version: number;
435
+ dataSource?: import('../components/debug/WsProxy/proxy').WsProxyDataSource | undefined;
436
+ wsUrl?: string | undefined;
437
+ requestMode?: import('../components/debug/WsProxy/proxy').WsProxyRequestMode | undefined;
438
+ autoConnect?: boolean | undefined;
439
+ payloadKey?: string | undefined;
440
+ sourceTypeField?: string | undefined;
441
+ heartbeatInterval?: number | undefined;
442
+ rules: {
443
+ sourceType?: string | undefined;
444
+ className: string;
445
+ equipmentName?: string | undefined;
446
+ enabled: boolean;
447
+ operate: "single" | "resource" | "global";
448
+ mappings: {
449
+ target: string;
450
+ source?: string | undefined;
451
+ constant?: boolean | number | string | undefined;
452
+ valueMap?: Record<string, boolean | number | string> | undefined;
453
+ defaultValue?: (boolean | number | string | Record<string, unknown>) | undefined;
454
+ enabled?: boolean | undefined;
455
+ transform?: "percentToPixel" | "runtimeToPixel" | "dictLabel" | "dictColor" | "dictColorMap" | "condition" | undefined;
456
+ transformType?: "width" | "height" | undefined;
457
+ transformPrecision?: number | undefined;
458
+ dictName?: string | undefined;
459
+ conditions?: {
460
+ operator: "eq" | "ne" | "gt" | "lt" | "gte" | "lte" | "includes" | "in";
461
+ operand: string;
462
+ value: string | number | boolean;
463
+ }[] | undefined;
464
+ }[];
465
+ resourceFields?: {
466
+ add?: {
467
+ className: string;
468
+ id: string;
469
+ resourceType: string;
470
+ resourceId?: string | undefined;
471
+ index: string;
472
+ name?: string | undefined;
473
+ color?: string | undefined;
474
+ } | undefined;
475
+ remove?: {
476
+ className: string;
477
+ id: string;
478
+ resourceType: string;
479
+ resourceId?: string | undefined;
480
+ index: string;
481
+ name?: string | undefined;
482
+ color?: string | undefined;
483
+ } | undefined;
484
+ } | undefined;
485
+ globalFields?: {
486
+ resourceIds: string;
487
+ } | undefined;
488
+ }[];
489
+ }>;
490
+ setWsProxyConfig: (cfg: WsProxyConfig) => void;
491
+ wsProxyManualModified: import('vue').Ref<boolean, boolean>;
492
+ setWsProxyManualModified: (modified: boolean) => void;
102
493
  setLogLevel: (level: LogLevel) => void;
103
494
  setShadowsEnabled: (enabled: boolean) => void;
104
495
  setAnimationsEnabled: (enabled: boolean) => void;
@@ -109,4 +500,4 @@ export declare const useDebugStore: import('pinia').StoreDefinition<"@jnrs/lings
109
500
  toggleTheme: () => void;
110
501
  showDebugPanel: () => void;
111
502
  hideDebugPanel: () => void;
112
- }, "setScriptSteps" | "setLogLevel" | "setShadowsEnabled" | "setAnimationsEnabled" | "setFpsMode" | "setInteractionsDisabled" | "setLocale" | "setTheme" | "toggleTheme" | "showDebugPanel" | "hideDebugPanel">>;
503
+ }, "setScriptSteps" | "setWsProxyConfig" | "setWsProxyManualModified" | "setLogLevel" | "setShadowsEnabled" | "setAnimationsEnabled" | "setFpsMode" | "setInteractionsDisabled" | "setLocale" | "setTheme" | "toggleTheme" | "showDebugPanel" | "hideDebugPanel">>;
@@ -15,6 +15,10 @@ export interface IStationSlotConfig extends IBaseConfig, IInteractiveState {
15
15
  origin?: IOriginAround;
16
16
  around?: IOriginAround;
17
17
  hideBounds?: boolean;
18
+ background?: string;
19
+ stroke?: string;
20
+ strokeWidth?: number;
21
+ textColor?: string;
18
22
  }
19
23
  /**
20
24
  * 布局选项
@@ -38,6 +42,7 @@ export interface IStationSlotGroupConfig extends Omit<IBaseConfig, 'width' | 'he
38
42
  around?: IOriginAround;
39
43
  stationSlots: IStationSlotConfig[];
40
44
  flowOptions: IFlowConfig;
45
+ hideBounds?: boolean;
41
46
  }
42
47
  /**
43
48
  * 资源
@@ -45,6 +50,7 @@ export interface IStationSlotGroupConfig extends Omit<IBaseConfig, 'width' | 'he
45
50
  export interface IResourceConfig extends IBaseConfig, IInteractiveState {
46
51
  className?: EnumComponent.RESOURCE;
47
52
  resourceType: EnumResourceType;
53
+ resourceId?: string;
48
54
  name?: string;
49
55
  color?: string;
50
56
  rawData: IRowData;
@@ -6,6 +6,7 @@ import { EnumResourceType } from '../enums';
6
6
  */
7
7
  export interface IResourceOperating {
8
8
  resourceType: EnumResourceType;
9
+ resourceId?: string;
9
10
  name?: string;
10
11
  color?: string;
11
12
  index: number;
@@ -20,7 +20,8 @@ export declare enum EnumModel {
20
20
  LOADING_STATION = "LoadingStation",
21
21
  SHUTTLE_STATION = "ShuttleStation",
22
22
  RAIL = "Rail",
23
- RESOURCE_STORE = "ResourceStore"
23
+ RESOURCE_STORE = "ResourceStore",
24
+ PALLET = "Pallet"
24
25
  }
25
26
  export declare enum EnumComponent {
26
27
  STATION_SLOT = "StationSlot",
@@ -1,4 +1,4 @@
1
- import { ILayer } from './index';
1
+ import { ILayer, EnumModel } from './index';
2
2
  export declare function isMachineTool(layer: ILayer | null): layer is import('./index').IMachineToolConfig;
3
3
  export declare function hasStationSlotGroup(layer: ILayer | null): layer is Extract<ILayer, {
4
4
  stationSlotGroup?: any;
@@ -7,6 +7,12 @@ export declare function isStationSlotGroupBoth(layer: ILayer | null): layer is E
7
7
  stationSlotGroupPallet?: any;
8
8
  stationSlotGroupTool?: any;
9
9
  }>;
10
+ export declare function hasStationSlotLayers(layer: ILayer | null): layer is Extract<ILayer, {
11
+ stationSlotGroups?: any[];
12
+ }>;
10
13
  export declare function hasFixtureChange(layer: ILayer | null): layer is import('./index').ISingleJointRobotConfig | import('./index').IDoubleJointRobotConfig;
11
14
  export declare function isRail(layer: ILayer | null): layer is import('./index').IRailConfig;
12
15
  export declare function isShuttleStation(layer: ILayer | null): layer is import('./index').IShuttleStationConfig;
16
+ export declare function isPallet(layer: ILayer | null): layer is Extract<ILayer, {
17
+ className: EnumModel.PALLET;
18
+ }>;
@@ -43,11 +43,26 @@ export interface ILoadingStationConfig extends IModel {
43
43
  stationContainerDirection?: 'horizontal' | 'vertical';
44
44
  stationSlotGroup?: IStationSlotGroupConfig;
45
45
  }
46
+ /**
47
+ * 接驳站工位层配置
48
+ */
49
+ export interface IShuttleStationLayerConfig {
50
+ /** 层索引(从 1 开始) */
51
+ index: number;
52
+ /** 工位组配置(托盘或刀具) */
53
+ stationSlotGroup: IStationSlotGroupConfig;
54
+ /** 层状态灯颜色(默认 '#666' 灰色,运行时由 layerStatus 驱动) */
55
+ lightColor?: string;
56
+ /** 是否显示层状态灯(默认 true) */
57
+ lightEnabled?: boolean;
58
+ }
46
59
  /**
47
60
  * 接驳站
48
61
  */
49
62
  export interface IShuttleStationConfig extends IModel {
50
63
  className: EnumModel.SHUTTLE_STATION;
64
+ /** 多工位层配置数组(一层=一个工位组,可托盘或刀具) */
65
+ stationSlotGroups?: IShuttleStationLayerConfig[];
51
66
  }
52
67
  /**
53
68
  * 打标机
@@ -114,7 +129,16 @@ export interface IResourceStoreConfig extends IModel {
114
129
  stationSlotGroupPallet?: IStationSlotGroupConfig;
115
130
  stationSlotGroupTool?: IStationSlotGroupConfig;
116
131
  }
132
+ /**
133
+ * 托盘(独立设备)
134
+ * 参考 ResourceStore:带铭牌、状态灯;主体背景色可配置(默认 #3C3C3C)
135
+ */
136
+ export interface IPalletConfig extends IModel {
137
+ className: EnumModel.PALLET;
138
+ /** 主体背景色(默认 '#3C3C3C') */
139
+ backgroundColor?: string;
140
+ }
117
141
  /**
118
142
  * 设备层联合类型
119
143
  */
120
- export type ILayer = IMachineToolConfig | ILoadingStationConfig | IShuttleStationConfig | IMarkingMachineConfig | ICleaningMachineConfig | ISingleJointRobotConfig | IDoubleJointRobotConfig | IRGVConfig | IRailConfig | IResourceStoreConfig;
144
+ export type ILayer = IMachineToolConfig | ILoadingStationConfig | IShuttleStationConfig | IMarkingMachineConfig | ICleaningMachineConfig | ISingleJointRobotConfig | IDoubleJointRobotConfig | IRGVConfig | IRailConfig | IResourceStoreConfig | IPalletConfig;
@@ -1,15 +1,28 @@
1
1
  import { EnumModel, EnumResourceType } from '../enums';
2
2
  import { IRowData } from '../base.types';
3
3
  import { ILightOperating, IProgressOperating, IEntranceOperating, IResourceOperating } from '../components/operating.types';
4
+ /** 操作类型:model 画布模型操作;resource 全局资源操作 */
5
+ export type EnumOperatingType = 'model' | 'resource';
4
6
  /**
5
7
  * 设备运转基类
6
8
  */
7
9
  export interface IModelOperating {
10
+ operatingType?: 'model';
8
11
  id: string;
9
12
  className: EnumModel;
10
13
  rawData: IRowData;
11
14
  resource?: IResourceOperating;
12
15
  }
16
+ /**
17
+ * 全局资源操作(不绑定具体设备,直接操作画布上的 Resource 图形)
18
+ */
19
+ export interface IGlobalResourceOperating {
20
+ operatingType: 'resource';
21
+ handleType: 'batchRemove';
22
+ resourceType?: EnumResourceType;
23
+ resourceIds: string[];
24
+ rawData: IRowData;
25
+ }
13
26
  /**
14
27
  * 机床运转状态
15
28
  */
@@ -36,6 +49,10 @@ export interface ILoadingStationOperating extends IModelOperating {
36
49
  export interface IShuttleStationOperating extends IModelOperating {
37
50
  className: EnumModel.SHUTTLE_STATION;
38
51
  light?: Omit<ILightOperating, 'rotating'>;
52
+ /** 各层工位组运行状态,键为层索引(1-based),值为状态码或颜色字符串
53
+ * 代理器 dictColorMap 转换后值为颜色字符串;未转换时值为状态数字码
54
+ */
55
+ layerStatus?: Record<number, number | string>;
39
56
  }
40
57
  /**
41
58
  * 打标机站点状态
@@ -114,7 +131,16 @@ export interface IResourceStoreOperating extends IModelOperating {
114
131
  x?: number;
115
132
  resource?: IResourceOperating;
116
133
  }
134
+ /**
135
+ * 托盘运转状态
136
+ */
137
+ export interface IPalletOperating extends IModelOperating {
138
+ className: EnumModel.PALLET;
139
+ light?: ILightOperating;
140
+ x?: number;
141
+ y?: number;
142
+ }
117
143
  /**
118
144
  * 设备层运转状态的联合类型
119
145
  */
120
- export type ILayerOperating = IMachineToolOperating | ILoadingStationOperating | IShuttleStationOperating | IMarkingMachineOperating | ICleaningMachineOperating | ISingleJointRobotOperating | IDoubleJointRobotOperating | IRGVOperating | IRailOperating | IResourceStoreOperating;
146
+ export type ILayerOperating = IMachineToolOperating | ILoadingStationOperating | IShuttleStationOperating | IMarkingMachineOperating | ICleaningMachineOperating | ISingleJointRobotOperating | IDoubleJointRobotOperating | IRGVOperating | IRailOperating | IResourceStoreOperating | IPalletOperating | IGlobalResourceOperating;
@@ -1,4 +1,5 @@
1
1
  import { ILayer, IEventHandler, ILayerOperating } from '../../types';
2
+ import { StationSlotGroup } from '../components/StationSlotGroup';
2
3
  import { BaseAbs } from './BaseAbs';
3
4
  export declare abstract class ModelAbs<T extends ILayer = ILayer> extends BaseAbs<T> {
4
5
  private eventHandler;
@@ -14,5 +15,14 @@ export declare abstract class ModelAbs<T extends ILayer = ILayer> extends BaseAb
14
15
  * 默认返回 false,由支持工位号的子类(如 ResourceStore)覆盖
15
16
  */
16
17
  containsStationIndex(_index: number): boolean;
18
+ /**
19
+ * 收集模型下所有工位槽组实例(子类覆盖;默认无)
20
+ */
21
+ protected collectStationSlotGroups(): StationSlotGroup[];
22
+ /**
23
+ * 按 resourceId 移除模型下匹配的资源(供全局批量移除调用)
24
+ * @returns 是否至少移除了一个资源
25
+ */
26
+ removeResourceById(resourceId: string): boolean;
17
27
  destroyUI(): void;
18
28
  }
@@ -15,9 +15,13 @@ export declare class StationSlot extends ComponentAbs<IStationSlotConfig> {
15
15
  addPallet(d: IResourceOperating): void;
16
16
  /**
17
17
  * 移除托盘:先播放退场动画,动画结束后再销毁资源对象
18
- * @param d
19
18
  */
20
19
  removeAllPallet(d?: IResourceOperating): void;
20
+ /**
21
+ * 按 resourceId 精确移除指定资源(同槽可含多个资源时使用)
22
+ * 仅移除匹配的资源,不影响同槽内其他资源;动画逻辑与 removeAllPallet 一致
23
+ */
24
+ removePalletById(resourceId: string): boolean;
21
25
  /**
22
26
  * 设置工位是否正在使用
23
27
  * @param flag
@@ -21,4 +21,9 @@ export declare class StationSlotGroup extends ComponentAbs<IStationSlotGroupConf
21
21
  * 操作方法:处理资源新增/移除
22
22
  */
23
23
  operating(val: IResourceOperating): void;
24
+ /**
25
+ * 按 resourceId 遍历所有工位槽,精确移除匹配的资源
26
+ * @returns 是否至少移除了一个资源
27
+ */
28
+ removeResourceById(resourceId: string): boolean;
24
29
  }