@jnrs/lingshu-smart 2.2.34 → 2.2.35

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/AGENTS.md +4 -1
  2. package/README.md +1 -0
  3. package/dist/components/debug/DataLogPanel.vue.d.ts +44 -0
  4. package/dist/components/debug/DebugPanel.vue.d.ts +60 -1
  5. package/dist/components/debug/ScriptRunner/ConfigPanel.vue.d.ts +14 -11
  6. package/dist/components/debug/ScriptRunner/StepsPanel.vue.d.ts +8 -0
  7. package/dist/components/debug/ScriptRunner/script.d.ts +29 -1
  8. package/dist/components/debug/WsProxy/ConfigEditor.vue.d.ts +18 -0
  9. package/dist/components/debug/WsProxy/ConnPanel.vue.d.ts +24 -0
  10. package/dist/components/debug/WsProxy/WsProxyPage.vue.d.ts +14 -0
  11. package/dist/components/debug/WsProxy/broadcast.d.ts +31 -0
  12. package/dist/components/debug/WsProxy/index.vue.d.ts +39 -0
  13. package/dist/components/debug/WsProxy/proxy.d.ts +159 -0
  14. package/dist/components/editor/ControlBar/CaseTitleEdit.vue.d.ts +87 -87
  15. package/dist/components/index.d.ts +3 -1
  16. package/dist/components/index.js +14041 -11421
  17. package/dist/controller/AppController.d.ts +2 -0
  18. package/dist/lingshu-smart/wsProxyConfig.json +495 -0
  19. package/dist/locales/index.js +2 -2
  20. package/dist/playground/ViewPageDemo.vue.d.ts +58 -0
  21. package/dist/stores/useDebugStore.d.ts +375 -2
  22. package/dist/types/components/config.types.d.ts +1 -0
  23. package/dist/types/components/operating.types.d.ts +1 -0
  24. package/dist/types/models/operating.types.d.ts +14 -1
  25. package/dist/ui/abstract/ModelAbs.d.ts +10 -0
  26. package/dist/ui/components/StationSlot.d.ts +5 -1
  27. package/dist/ui/components/StationSlotGroup.d.ts +5 -0
  28. package/dist/ui/models/CleaningMachine.d.ts +2 -0
  29. package/dist/ui/models/DoubleJointRobot.d.ts +2 -0
  30. package/dist/ui/models/LoadingStation.d.ts +2 -0
  31. package/dist/ui/models/MachineTool.d.ts +2 -0
  32. package/dist/ui/models/MarkingMachine.d.ts +2 -0
  33. package/dist/ui/models/ResourceStore.d.ts +2 -0
  34. package/dist/ui/models/Rgv.d.ts +2 -0
  35. package/dist/ui/models/SingleJointRobot.d.ts +2 -0
  36. package/package.json +2 -2
  37. package/dist/components/debug/ScriptRunner/LogPanel.vue.d.ts +0 -19
  38. /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,126 @@ 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
+ wsUrl?: string | undefined;
49
+ payloadKey?: string | undefined;
50
+ sourceTypeField?: string | undefined;
51
+ heartbeatInterval?: number | undefined;
52
+ rules: {
53
+ sourceType?: string | undefined;
54
+ className: string;
55
+ equipmentName?: string | undefined;
56
+ enabled: boolean;
57
+ operate: "single" | "resource" | "global";
58
+ mappings: {
59
+ target: string;
60
+ source?: string | undefined;
61
+ constant?: boolean | number | string | undefined;
62
+ valueMap?: Record<string, boolean | number | string> | undefined;
63
+ defaultValue?: boolean | number | string | undefined;
64
+ enabled?: boolean | undefined;
65
+ transform?: "percentToPixel" | "runtimeToPixel" | "dictLabel" | "dictColor" | "condition" | undefined;
66
+ transformType?: "width" | "height" | undefined;
67
+ transformPrecision?: number | undefined;
68
+ dictName?: string | undefined;
69
+ conditions?: {
70
+ operator: "eq" | "ne" | "gt" | "lt" | "gte" | "lte" | "includes" | "in";
71
+ operand: string;
72
+ value: string | number | boolean;
73
+ }[] | undefined;
74
+ }[];
75
+ resourceFields?: {
76
+ add?: {
77
+ className: string;
78
+ id: string;
79
+ resourceType: string;
80
+ resourceId?: string | undefined;
81
+ index: string;
82
+ name?: string | undefined;
83
+ color?: string | undefined;
84
+ } | undefined;
85
+ remove?: {
86
+ className: string;
87
+ id: string;
88
+ resourceType: string;
89
+ resourceId?: string | undefined;
90
+ index: string;
91
+ name?: string | undefined;
92
+ color?: string | undefined;
93
+ } | undefined;
94
+ } | undefined;
95
+ globalFields?: {
96
+ resourceIds: string;
97
+ } | undefined;
98
+ }[];
99
+ }, WsProxyConfig | {
100
+ name: string;
101
+ version: number;
102
+ wsUrl?: string | undefined;
103
+ payloadKey?: string | undefined;
104
+ sourceTypeField?: string | undefined;
105
+ heartbeatInterval?: number | undefined;
106
+ rules: {
107
+ sourceType?: string | undefined;
108
+ className: string;
109
+ equipmentName?: string | undefined;
110
+ enabled: boolean;
111
+ operate: "single" | "resource" | "global";
112
+ mappings: {
113
+ target: string;
114
+ source?: string | undefined;
115
+ constant?: boolean | number | string | undefined;
116
+ valueMap?: Record<string, boolean | number | string> | undefined;
117
+ defaultValue?: boolean | number | string | undefined;
118
+ enabled?: boolean | undefined;
119
+ transform?: "percentToPixel" | "runtimeToPixel" | "dictLabel" | "dictColor" | "condition" | undefined;
120
+ transformType?: "width" | "height" | undefined;
121
+ transformPrecision?: number | undefined;
122
+ dictName?: string | undefined;
123
+ conditions?: {
124
+ operator: "eq" | "ne" | "gt" | "lt" | "gte" | "lte" | "includes" | "in";
125
+ operand: string;
126
+ value: string | number | boolean;
127
+ }[] | undefined;
128
+ }[];
129
+ resourceFields?: {
130
+ add?: {
131
+ className: string;
132
+ id: string;
133
+ resourceType: string;
134
+ resourceId?: string | undefined;
135
+ index: string;
136
+ name?: string | undefined;
137
+ color?: string | undefined;
138
+ } | undefined;
139
+ remove?: {
140
+ className: string;
141
+ id: string;
142
+ resourceType: string;
143
+ resourceId?: string | undefined;
144
+ index: string;
145
+ name?: string | undefined;
146
+ color?: string | undefined;
147
+ } | undefined;
148
+ } | undefined;
149
+ globalFields?: {
150
+ resourceIds: string;
151
+ } | undefined;
152
+ }[];
153
+ }>;
154
+ setWsProxyConfig: (cfg: WsProxyConfig) => void;
155
+ wsProxyManualModified: import('vue').Ref<boolean, boolean>;
156
+ setWsProxyManualModified: (modified: boolean) => void;
32
157
  setLogLevel: (level: LogLevel) => void;
33
158
  setShadowsEnabled: (enabled: boolean) => void;
34
159
  setAnimationsEnabled: (enabled: boolean) => void;
@@ -39,7 +164,7 @@ export declare const useDebugStore: import('pinia').StoreDefinition<"@jnrs/lings
39
164
  toggleTheme: () => void;
40
165
  showDebugPanel: () => void;
41
166
  hideDebugPanel: () => void;
42
- }, "locale" | "logLevel" | "shadowsEnabled" | "animationsEnabled" | "fpsMode" | "interactionsDisabled" | "theme" | "debugPanelVisible" | "scriptSteps">, Pick<{
167
+ }, "locale" | "logLevel" | "shadowsEnabled" | "animationsEnabled" | "fpsMode" | "interactionsDisabled" | "theme" | "wsProxyManualModified" | "debugPanelVisible" | "scriptSteps" | "wsProxyConfig">, Pick<{
43
168
  logLevel: import('vue').Ref<LogLevel, LogLevel>;
44
169
  shadowsEnabled: import('vue').Ref<boolean, boolean>;
45
170
  animationsEnabled: import('vue').Ref<boolean, boolean>;
@@ -55,6 +180,12 @@ export declare const useDebugStore: import('pinia').StoreDefinition<"@jnrs/lings
55
180
  delay: number;
56
181
  enabled: boolean;
57
182
  params: Record<string, any>;
183
+ code: number;
184
+ msg: string;
185
+ payloadKey: "data" | "payload";
186
+ msgType: string;
187
+ customData?: string | undefined;
188
+ typeOverride?: string | undefined;
58
189
  }[], ScriptStep[] | {
59
190
  uid: string;
60
191
  deviceType: string;
@@ -62,8 +193,126 @@ export declare const useDebugStore: import('pinia').StoreDefinition<"@jnrs/lings
62
193
  delay: number;
63
194
  enabled: boolean;
64
195
  params: Record<string, any>;
196
+ code: number;
197
+ msg: string;
198
+ payloadKey: "data" | "payload";
199
+ msgType: string;
200
+ customData?: string | undefined;
201
+ typeOverride?: string | undefined;
65
202
  }[]>;
66
203
  setScriptSteps: (list: ScriptStep[]) => void;
204
+ wsProxyConfig: import('vue').Ref<{
205
+ name: string;
206
+ version: number;
207
+ wsUrl?: string | undefined;
208
+ payloadKey?: string | undefined;
209
+ sourceTypeField?: string | undefined;
210
+ heartbeatInterval?: number | undefined;
211
+ rules: {
212
+ sourceType?: string | undefined;
213
+ className: string;
214
+ equipmentName?: string | undefined;
215
+ enabled: boolean;
216
+ operate: "single" | "resource" | "global";
217
+ mappings: {
218
+ target: string;
219
+ source?: string | undefined;
220
+ constant?: boolean | number | string | undefined;
221
+ valueMap?: Record<string, boolean | number | string> | undefined;
222
+ defaultValue?: boolean | number | string | undefined;
223
+ enabled?: boolean | undefined;
224
+ transform?: "percentToPixel" | "runtimeToPixel" | "dictLabel" | "dictColor" | "condition" | undefined;
225
+ transformType?: "width" | "height" | undefined;
226
+ transformPrecision?: number | undefined;
227
+ dictName?: string | undefined;
228
+ conditions?: {
229
+ operator: "eq" | "ne" | "gt" | "lt" | "gte" | "lte" | "includes" | "in";
230
+ operand: string;
231
+ value: string | number | boolean;
232
+ }[] | undefined;
233
+ }[];
234
+ resourceFields?: {
235
+ add?: {
236
+ className: string;
237
+ id: string;
238
+ resourceType: string;
239
+ resourceId?: string | undefined;
240
+ index: string;
241
+ name?: string | undefined;
242
+ color?: string | undefined;
243
+ } | undefined;
244
+ remove?: {
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
+ } | undefined;
254
+ globalFields?: {
255
+ resourceIds: string;
256
+ } | undefined;
257
+ }[];
258
+ }, WsProxyConfig | {
259
+ name: string;
260
+ version: number;
261
+ wsUrl?: string | undefined;
262
+ payloadKey?: string | undefined;
263
+ sourceTypeField?: string | undefined;
264
+ heartbeatInterval?: number | undefined;
265
+ rules: {
266
+ sourceType?: string | undefined;
267
+ className: string;
268
+ equipmentName?: string | undefined;
269
+ enabled: boolean;
270
+ operate: "single" | "resource" | "global";
271
+ mappings: {
272
+ target: string;
273
+ source?: string | undefined;
274
+ constant?: boolean | number | string | undefined;
275
+ valueMap?: Record<string, boolean | number | string> | undefined;
276
+ defaultValue?: boolean | number | string | undefined;
277
+ enabled?: boolean | undefined;
278
+ transform?: "percentToPixel" | "runtimeToPixel" | "dictLabel" | "dictColor" | "condition" | undefined;
279
+ transformType?: "width" | "height" | undefined;
280
+ transformPrecision?: number | undefined;
281
+ dictName?: string | undefined;
282
+ conditions?: {
283
+ operator: "eq" | "ne" | "gt" | "lt" | "gte" | "lte" | "includes" | "in";
284
+ operand: string;
285
+ value: string | number | boolean;
286
+ }[] | undefined;
287
+ }[];
288
+ resourceFields?: {
289
+ add?: {
290
+ className: string;
291
+ id: string;
292
+ resourceType: string;
293
+ resourceId?: string | undefined;
294
+ index: string;
295
+ name?: string | undefined;
296
+ color?: string | undefined;
297
+ } | undefined;
298
+ remove?: {
299
+ className: string;
300
+ id: string;
301
+ resourceType: string;
302
+ resourceId?: string | undefined;
303
+ index: string;
304
+ name?: string | undefined;
305
+ color?: string | undefined;
306
+ } | undefined;
307
+ } | undefined;
308
+ globalFields?: {
309
+ resourceIds: string;
310
+ } | undefined;
311
+ }[];
312
+ }>;
313
+ setWsProxyConfig: (cfg: WsProxyConfig) => void;
314
+ wsProxyManualModified: import('vue').Ref<boolean, boolean>;
315
+ setWsProxyManualModified: (modified: boolean) => void;
67
316
  setLogLevel: (level: LogLevel) => void;
68
317
  setShadowsEnabled: (enabled: boolean) => void;
69
318
  setAnimationsEnabled: (enabled: boolean) => void;
@@ -90,6 +339,12 @@ export declare const useDebugStore: import('pinia').StoreDefinition<"@jnrs/lings
90
339
  delay: number;
91
340
  enabled: boolean;
92
341
  params: Record<string, any>;
342
+ code: number;
343
+ msg: string;
344
+ payloadKey: "data" | "payload";
345
+ msgType: string;
346
+ customData?: string | undefined;
347
+ typeOverride?: string | undefined;
93
348
  }[], ScriptStep[] | {
94
349
  uid: string;
95
350
  deviceType: string;
@@ -97,8 +352,126 @@ export declare const useDebugStore: import('pinia').StoreDefinition<"@jnrs/lings
97
352
  delay: number;
98
353
  enabled: boolean;
99
354
  params: Record<string, any>;
355
+ code: number;
356
+ msg: string;
357
+ payloadKey: "data" | "payload";
358
+ msgType: string;
359
+ customData?: string | undefined;
360
+ typeOverride?: string | undefined;
100
361
  }[]>;
101
362
  setScriptSteps: (list: ScriptStep[]) => void;
363
+ wsProxyConfig: import('vue').Ref<{
364
+ name: string;
365
+ version: number;
366
+ wsUrl?: string | undefined;
367
+ payloadKey?: string | undefined;
368
+ sourceTypeField?: string | undefined;
369
+ heartbeatInterval?: number | undefined;
370
+ rules: {
371
+ sourceType?: string | undefined;
372
+ className: string;
373
+ equipmentName?: string | undefined;
374
+ enabled: boolean;
375
+ operate: "single" | "resource" | "global";
376
+ mappings: {
377
+ target: string;
378
+ source?: string | undefined;
379
+ constant?: boolean | number | string | undefined;
380
+ valueMap?: Record<string, boolean | number | string> | undefined;
381
+ defaultValue?: boolean | number | string | undefined;
382
+ enabled?: boolean | undefined;
383
+ transform?: "percentToPixel" | "runtimeToPixel" | "dictLabel" | "dictColor" | "condition" | undefined;
384
+ transformType?: "width" | "height" | undefined;
385
+ transformPrecision?: number | undefined;
386
+ dictName?: string | undefined;
387
+ conditions?: {
388
+ operator: "eq" | "ne" | "gt" | "lt" | "gte" | "lte" | "includes" | "in";
389
+ operand: string;
390
+ value: string | number | boolean;
391
+ }[] | undefined;
392
+ }[];
393
+ resourceFields?: {
394
+ add?: {
395
+ className: string;
396
+ id: string;
397
+ resourceType: string;
398
+ resourceId?: string | undefined;
399
+ index: string;
400
+ name?: string | undefined;
401
+ color?: string | undefined;
402
+ } | undefined;
403
+ remove?: {
404
+ className: string;
405
+ id: string;
406
+ resourceType: string;
407
+ resourceId?: string | undefined;
408
+ index: string;
409
+ name?: string | undefined;
410
+ color?: string | undefined;
411
+ } | undefined;
412
+ } | undefined;
413
+ globalFields?: {
414
+ resourceIds: string;
415
+ } | undefined;
416
+ }[];
417
+ }, WsProxyConfig | {
418
+ name: string;
419
+ version: number;
420
+ wsUrl?: string | undefined;
421
+ payloadKey?: string | undefined;
422
+ sourceTypeField?: string | undefined;
423
+ heartbeatInterval?: number | undefined;
424
+ rules: {
425
+ sourceType?: string | undefined;
426
+ className: string;
427
+ equipmentName?: string | undefined;
428
+ enabled: boolean;
429
+ operate: "single" | "resource" | "global";
430
+ mappings: {
431
+ target: string;
432
+ source?: string | undefined;
433
+ constant?: boolean | number | string | undefined;
434
+ valueMap?: Record<string, boolean | number | string> | undefined;
435
+ defaultValue?: boolean | number | string | undefined;
436
+ enabled?: boolean | undefined;
437
+ transform?: "percentToPixel" | "runtimeToPixel" | "dictLabel" | "dictColor" | "condition" | undefined;
438
+ transformType?: "width" | "height" | undefined;
439
+ transformPrecision?: number | undefined;
440
+ dictName?: string | undefined;
441
+ conditions?: {
442
+ operator: "eq" | "ne" | "gt" | "lt" | "gte" | "lte" | "includes" | "in";
443
+ operand: string;
444
+ value: string | number | boolean;
445
+ }[] | undefined;
446
+ }[];
447
+ resourceFields?: {
448
+ add?: {
449
+ className: string;
450
+ id: string;
451
+ resourceType: string;
452
+ resourceId?: string | undefined;
453
+ index: string;
454
+ name?: string | undefined;
455
+ color?: string | undefined;
456
+ } | undefined;
457
+ remove?: {
458
+ className: string;
459
+ id: string;
460
+ resourceType: string;
461
+ resourceId?: string | undefined;
462
+ index: string;
463
+ name?: string | undefined;
464
+ color?: string | undefined;
465
+ } | undefined;
466
+ } | undefined;
467
+ globalFields?: {
468
+ resourceIds: string;
469
+ } | undefined;
470
+ }[];
471
+ }>;
472
+ setWsProxyConfig: (cfg: WsProxyConfig) => void;
473
+ wsProxyManualModified: import('vue').Ref<boolean, boolean>;
474
+ setWsProxyManualModified: (modified: boolean) => void;
102
475
  setLogLevel: (level: LogLevel) => void;
103
476
  setShadowsEnabled: (enabled: boolean) => void;
104
477
  setAnimationsEnabled: (enabled: boolean) => void;
@@ -109,4 +482,4 @@ export declare const useDebugStore: import('pinia').StoreDefinition<"@jnrs/lings
109
482
  toggleTheme: () => void;
110
483
  showDebugPanel: () => void;
111
484
  hideDebugPanel: () => void;
112
- }, "setScriptSteps" | "setLogLevel" | "setShadowsEnabled" | "setAnimationsEnabled" | "setFpsMode" | "setInteractionsDisabled" | "setLocale" | "setTheme" | "toggleTheme" | "showDebugPanel" | "hideDebugPanel">>;
485
+ }, "setScriptSteps" | "setWsProxyConfig" | "setWsProxyManualModified" | "setLogLevel" | "setShadowsEnabled" | "setAnimationsEnabled" | "setFpsMode" | "setInteractionsDisabled" | "setLocale" | "setTheme" | "toggleTheme" | "showDebugPanel" | "hideDebugPanel">>;
@@ -45,6 +45,7 @@ export interface IStationSlotGroupConfig extends Omit<IBaseConfig, 'width' | 'he
45
45
  export interface IResourceConfig extends IBaseConfig, IInteractiveState {
46
46
  className?: EnumComponent.RESOURCE;
47
47
  resourceType: EnumResourceType;
48
+ resourceId?: string;
48
49
  name?: string;
49
50
  color?: string;
50
51
  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;
@@ -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
  */
@@ -117,4 +130,4 @@ export interface IResourceStoreOperating extends IModelOperating {
117
130
  /**
118
131
  * 设备层运转状态的联合类型
119
132
  */
120
- export type ILayerOperating = IMachineToolOperating | ILoadingStationOperating | IShuttleStationOperating | IMarkingMachineOperating | ICleaningMachineOperating | ISingleJointRobotOperating | IDoubleJointRobotOperating | IRGVOperating | IRailOperating | IResourceStoreOperating;
133
+ export type ILayerOperating = IMachineToolOperating | ILoadingStationOperating | IShuttleStationOperating | IMarkingMachineOperating | ICleaningMachineOperating | ISingleJointRobotOperating | IDoubleJointRobotOperating | IRGVOperating | IRailOperating | IResourceStoreOperating | 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
  }
@@ -1,6 +1,7 @@
1
1
  import { ICleaningMachineConfig, ICleaningMachineOperating } from '../../types';
2
2
  import { Box } from 'leafer';
3
3
  import { ModelAbs } from '../abstract/ModelAbs';
4
+ import { StationSlotGroup } from '../components/StationSlotGroup';
4
5
  /**
5
6
  * 清洗机
6
7
  */
@@ -11,4 +12,5 @@ export declare class CleaningMachine extends ModelAbs<ICleaningMachineConfig> {
11
12
  private stationSlotGroup;
12
13
  protected createUi(): Box;
13
14
  protected operating(data: ICleaningMachineOperating): void;
15
+ protected collectStationSlotGroups(): StationSlotGroup[];
14
16
  }
@@ -1,6 +1,7 @@
1
1
  import { IDoubleJointRobotConfig, IDoubleJointRobotOperating, EnumResourceType } from '../../types';
2
2
  import { Box } from 'leafer';
3
3
  import { ModelAbs } from '../abstract/ModelAbs';
4
+ import { StationSlotGroup } from '../components/StationSlotGroup';
4
5
  /**
5
6
  * 双关节机器人(DoubleJointRobot)
6
7
  */
@@ -17,6 +18,7 @@ export declare class DoubleJointRobot extends ModelAbs<IDoubleJointRobotConfig>
17
18
  set currentFixture(type: EnumResourceType);
18
19
  protected createUi(): Box;
19
20
  protected operating(data: IDoubleJointRobotOperating): void;
21
+ protected collectStationSlotGroups(): StationSlotGroup[];
20
22
  private handleRotateR1;
21
23
  private handleRotateR2;
22
24
  private moveX;
@@ -1,6 +1,7 @@
1
1
  import { ILoadingStationConfig, ILoadingStationOperating } from '../../types';
2
2
  import { Box } from 'leafer';
3
3
  import { ModelAbs } from '../abstract/ModelAbs';
4
+ import { StationSlotGroup } from '../components/StationSlotGroup';
4
5
  /**
5
6
  * 装载站(LoadingStation)
6
7
  */
@@ -13,4 +14,5 @@ export declare class LoadingStation extends ModelAbs<ILoadingStationConfig> {
13
14
  private stationSlotGroup;
14
15
  protected createUi(): Box;
15
16
  protected operating(data: ILoadingStationOperating): void;
17
+ protected collectStationSlotGroups(): StationSlotGroup[];
16
18
  }
@@ -1,6 +1,7 @@
1
1
  import { IMachineToolConfig, IMachineToolOperating } from '../../types';
2
2
  import { Box } from 'leafer';
3
3
  import { ModelAbs } from '../abstract/ModelAbs';
4
+ import { StationSlotGroup } from '../components/StationSlotGroup';
4
5
  /**
5
6
  * 机床
6
7
  */
@@ -15,5 +16,6 @@ export declare class MachineTool extends ModelAbs<IMachineToolConfig> {
15
16
  private animating;
16
17
  protected createUi(): Box;
17
18
  protected operating(data: IMachineToolOperating): void;
19
+ protected collectStationSlotGroups(): StationSlotGroup[];
18
20
  private rotateStationContainerWithAnimation;
19
21
  }
@@ -1,6 +1,7 @@
1
1
  import { IMarkingMachineConfig, IMarkingMachineOperating } from '../../types';
2
2
  import { Box } from 'leafer';
3
3
  import { ModelAbs } from '../abstract/ModelAbs';
4
+ import { StationSlotGroup } from '../components/StationSlotGroup';
4
5
  /**
5
6
  * 打标机
6
7
  */
@@ -11,6 +12,7 @@ export declare class MarkingMachine extends ModelAbs<IMarkingMachineConfig> {
11
12
  private stationSlotGroup;
12
13
  protected createUi(): Box;
13
14
  protected operating(data: IMarkingMachineOperating): void;
15
+ protected collectStationSlotGroups(): StationSlotGroup[];
14
16
  private renderLaser;
15
17
  private setLaserWorking;
16
18
  }
@@ -1,6 +1,7 @@
1
1
  import { IResourceStoreConfig, IResourceStoreOperating } from '../../types';
2
2
  import { Box } from 'leafer';
3
3
  import { ModelAbs } from '../abstract/ModelAbs';
4
+ import { StationSlotGroup } from '../components/StationSlotGroup';
4
5
  /**
5
6
  * 资源库
6
7
  */
@@ -17,4 +18,5 @@ export declare class ResourceStore extends ModelAbs<IResourceStoreConfig> {
17
18
  containsStationIndex(index: number): boolean;
18
19
  private moveX;
19
20
  protected operating(data: IResourceStoreOperating): void;
21
+ protected collectStationSlotGroups(): StationSlotGroup[];
20
22
  }
@@ -1,6 +1,7 @@
1
1
  import { IRGVConfig, IRGVOperating } from '../../types';
2
2
  import { Box } from 'leafer';
3
3
  import { ModelAbs } from '../abstract/ModelAbs';
4
+ import { StationSlotGroup } from '../components/StationSlotGroup';
4
5
  /**
5
6
  * RGV(轨道导引车)
6
7
  */
@@ -15,6 +16,7 @@ export declare class Rgv extends ModelAbs<IRGVConfig> {
15
16
  private stationSlotGroupTool;
16
17
  protected createUi(): Box;
17
18
  protected operating(data: IRGVOperating): void;
19
+ protected collectStationSlotGroups(): StationSlotGroup[];
18
20
  private handleRotate;
19
21
  private moveX;
20
22
  /**
@@ -1,6 +1,7 @@
1
1
  import { ISingleJointRobotConfig, ISingleJointRobotOperating, EnumResourceType } from '../../types';
2
2
  import { Box } from 'leafer';
3
3
  import { ModelAbs } from '../abstract/ModelAbs';
4
+ import { StationSlotGroup } from '../components/StationSlotGroup';
4
5
  /**
5
6
  * 单关节机器人
6
7
  */
@@ -17,6 +18,7 @@ export declare class SingleJointRobot extends ModelAbs<ISingleJointRobotConfig>
17
18
  set currentFixture(type: EnumResourceType);
18
19
  protected createUi(): Box;
19
20
  protected operating(data: ISingleJointRobotOperating): void;
21
+ protected collectStationSlotGroups(): StationSlotGroup[];
20
22
  private handleRotate;
21
23
  private moveX;
22
24
  private switchFork;