@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
@@ -14,6 +14,9 @@ export declare const useDebugStore: import('pinia').StoreDefinition<"@jnrs/lings
14
14
  scriptSteps: import('vue').WritableComputedRef<ScriptStep[], ScriptStep[]>;
15
15
  setScriptSteps: (list: ScriptStep[]) => void;
16
16
  scriptLooping: import('vue').WritableComputedRef<boolean, boolean>;
17
+ scriptCaseId: import('vue').ComputedRef<string>;
18
+ scriptCaseName: import('vue').ComputedRef<string>;
19
+ ensureScriptCase: () => import('../components/debug/ScriptRunner/script').ScriptCaseData;
17
20
  activeCaseId: import('vue').WritableComputedRef<string, string>;
18
21
  setWsProxyActiveCaseId: (caseId: string) => void;
19
22
  wsProxyManualModified: import('vue').WritableComputedRef<boolean, boolean>;
@@ -42,6 +45,9 @@ export declare const useDebugStore: import('pinia').StoreDefinition<"@jnrs/lings
42
45
  scriptSteps: import('vue').WritableComputedRef<ScriptStep[], ScriptStep[]>;
43
46
  setScriptSteps: (list: ScriptStep[]) => void;
44
47
  scriptLooping: import('vue').WritableComputedRef<boolean, boolean>;
48
+ scriptCaseId: import('vue').ComputedRef<string>;
49
+ scriptCaseName: import('vue').ComputedRef<string>;
50
+ ensureScriptCase: () => import('../components/debug/ScriptRunner/script').ScriptCaseData;
45
51
  activeCaseId: import('vue').WritableComputedRef<string, string>;
46
52
  setWsProxyActiveCaseId: (caseId: string) => void;
47
53
  wsProxyManualModified: import('vue').WritableComputedRef<boolean, boolean>;
@@ -58,7 +64,7 @@ export declare const useDebugStore: import('pinia').StoreDefinition<"@jnrs/lings
58
64
  toggleTheme: () => void;
59
65
  showDebugPanel: () => void;
60
66
  hideDebugPanel: () => void;
61
- }, "logLevel" | "shadowsEnabled" | "animationsEnabled" | "fpsMode" | "interactionsDisabled" | "locale" | "theme" | "wsProxyManualModified" | "perfStatsCollapsed" | "scriptLooping" | "scriptSteps" | "activeCaseId">, Pick<{
67
+ }, "logLevel" | "shadowsEnabled" | "animationsEnabled" | "fpsMode" | "interactionsDisabled" | "locale" | "theme" | "wsProxyManualModified" | "perfStatsCollapsed" | "scriptSteps" | "scriptLooping" | "scriptCaseId" | "scriptCaseName" | "activeCaseId">, Pick<{
62
68
  logLevel: import('vue').WritableComputedRef<LogLevel, LogLevel>;
63
69
  shadowsEnabled: import('vue').WritableComputedRef<boolean, boolean>;
64
70
  animationsEnabled: import('vue').WritableComputedRef<boolean, boolean>;
@@ -70,6 +76,9 @@ export declare const useDebugStore: import('pinia').StoreDefinition<"@jnrs/lings
70
76
  scriptSteps: import('vue').WritableComputedRef<ScriptStep[], ScriptStep[]>;
71
77
  setScriptSteps: (list: ScriptStep[]) => void;
72
78
  scriptLooping: import('vue').WritableComputedRef<boolean, boolean>;
79
+ scriptCaseId: import('vue').ComputedRef<string>;
80
+ scriptCaseName: import('vue').ComputedRef<string>;
81
+ ensureScriptCase: () => import('../components/debug/ScriptRunner/script').ScriptCaseData;
73
82
  activeCaseId: import('vue').WritableComputedRef<string, string>;
74
83
  setWsProxyActiveCaseId: (caseId: string) => void;
75
84
  wsProxyManualModified: import('vue').WritableComputedRef<boolean, boolean>;
@@ -86,4 +95,4 @@ export declare const useDebugStore: import('pinia').StoreDefinition<"@jnrs/lings
86
95
  toggleTheme: () => void;
87
96
  showDebugPanel: () => void;
88
97
  hideDebugPanel: () => void;
89
- }, "setScriptSteps" | "setWsProxyActiveCaseId" | "setWsProxyManualModified" | "setPerfStatsCollapsed" | "setLogLevel" | "setShadowsEnabled" | "setAnimationsEnabled" | "setFpsMode" | "setInteractionsDisabled" | "setLocale" | "setTheme" | "toggleTheme" | "showDebugPanel" | "hideDebugPanel">>;
98
+ }, "ensureScriptCase" | "setScriptSteps" | "setWsProxyActiveCaseId" | "setWsProxyManualModified" | "setPerfStatsCollapsed" | "setLogLevel" | "setShadowsEnabled" | "setAnimationsEnabled" | "setFpsMode" | "setInteractionsDisabled" | "setLocale" | "setTheme" | "toggleTheme" | "showDebugPanel" | "hideDebugPanel">>;
@@ -11,7 +11,7 @@ export declare const useEditorStore: import('pinia').StoreDefinition<"@jnrs/ling
11
11
  updateScene: import('@jnrs/shared/lodash').DebouncedFunc<() => void>;
12
12
  addLayer: (layer: ILayer) => void;
13
13
  addLayerAtPosition: (layer: ILayer, worldX: number, worldY: number) => void;
14
- selectLayer: (uuid?: string) => void;
14
+ selectLayer: (id?: string) => void;
15
15
  updateLayer: (layer: ILayer) => void;
16
16
  renderLayers: import('@jnrs/shared/lodash').DebouncedFunc<() => void>;
17
17
  }, never>, Pick<{
@@ -26,7 +26,7 @@ export declare const useEditorStore: import('pinia').StoreDefinition<"@jnrs/ling
26
26
  updateScene: import('@jnrs/shared/lodash').DebouncedFunc<() => void>;
27
27
  addLayer: (layer: ILayer) => void;
28
28
  addLayerAtPosition: (layer: ILayer, worldX: number, worldY: number) => void;
29
- selectLayer: (uuid?: string) => void;
29
+ selectLayer: (id?: string) => void;
30
30
  updateLayer: (layer: ILayer) => void;
31
31
  renderLayers: import('@jnrs/shared/lodash').DebouncedFunc<() => void>;
32
32
  }, "scene" | "layers" | "currentCase" | "currentLayer">, Pick<{
@@ -41,7 +41,7 @@ export declare const useEditorStore: import('pinia').StoreDefinition<"@jnrs/ling
41
41
  updateScene: import('@jnrs/shared/lodash').DebouncedFunc<() => void>;
42
42
  addLayer: (layer: ILayer) => void;
43
43
  addLayerAtPosition: (layer: ILayer, worldX: number, worldY: number) => void;
44
- selectLayer: (uuid?: string) => void;
44
+ selectLayer: (id?: string) => void;
45
45
  updateLayer: (layer: ILayer) => void;
46
46
  renderLayers: import('@jnrs/shared/lodash').DebouncedFunc<() => void>;
47
47
  }, "initContainer" | "resizeContainer" | "destroyContainer" | "initEditor" | "updateScene" | "addLayer" | "addLayerAtPosition" | "selectLayer" | "updateLayer" | "renderLayers">>;
@@ -29,7 +29,7 @@ export interface IScene {
29
29
  * 方案
30
30
  */
31
31
  export interface ICase {
32
- uuid: string;
32
+ id: string;
33
33
  isActive: boolean;
34
34
  title: string;
35
35
  scene: IScene;
@@ -31,6 +31,8 @@ export interface IStationSlotConfig extends IBaseConfig, IInteractiveState {
31
31
  showShadow?: boolean;
32
32
  showText?: boolean;
33
33
  inFlow?: boolean;
34
+ /** 工位可放置的资源数量上限(默认 5):超出上限时按放置顺序移除最早的资源(保留最近 N 个,先进先出淘汰) */
35
+ maxResources?: number;
34
36
  /** 当前工位放置的资源摘要(运行时注入:资源增删时由 StationSlot 同步回写,不参与持久化) */
35
37
  resources?: ISlotResourceSnapshot[];
36
38
  /** 最近一次 operating 接收到的原始数据(运行时注入,供点击回调 data 读取) */
@@ -60,6 +62,20 @@ export interface IStationSlotGroupConfig extends Omit<IBaseConfig, 'width' | 'he
60
62
  flowOptions: IFlowConfig;
61
63
  hideBounds?: boolean;
62
64
  }
65
+ /**
66
+ * 工位层配置(通用:一层=一个工位组)
67
+ * 统一「工位配置(层级)」数据模型:各类设备均以 stationSlotGroups 数组承载工位层。
68
+ */
69
+ export interface IStationSlotLayerConfig {
70
+ /** 层索引(从 1 开始) */
71
+ index: number;
72
+ /** 工位组配置 */
73
+ stationSlotGroup: IStationSlotGroupConfig;
74
+ /** 层状态灯颜色(默认 '#666' 灰色,运行时由 layerLightColor 驱动) */
75
+ lightColor?: string;
76
+ /** 是否显示层状态灯(默认 true) */
77
+ lightEnabled?: boolean;
78
+ }
63
79
  /**
64
80
  * 资源
65
81
  */
@@ -1,19 +1,20 @@
1
1
  import { IRowData } from '../base.types';
2
2
  import { EnumResourceType } from '../enums';
3
3
  /**
4
- * 资源操作
5
- * handleType: 'add' | 'remove'
4
+ * 资源操作(对齐 socket-operating-api.md 资源模型字段)
5
+ * handle_type: 'add' | 'remove'
6
6
  */
7
7
  export interface IResourceOperating {
8
- resourceType: EnumResourceType;
9
- resourceId?: string;
8
+ resource_type: EnumResourceType;
9
+ resource_id?: string;
10
10
  name?: string;
11
- color?: string;
12
- index: number;
13
- /** 层索引(1-based):多层设备(接驳站/料道等)用于定位资源所在层;缺省时按工位序号在所有层中匹配 */
14
- layer?: number;
15
- handleType: 'add' | 'remove';
16
- rawData: IRowData;
11
+ resource_color?: string;
12
+ /** 设备工位序号:资源在工位槽中的索引(1-based) */
13
+ device_station: number;
14
+ /** 设备层索引(1-based):多层设备(接驳站/料道等)用于定位资源所在层;缺省时按工位序号在所有层中匹配 */
15
+ device_layer?: number;
16
+ handle_type: 'add' | 'remove';
17
+ raw_data: IRowData;
17
18
  }
18
19
  /**
19
20
  * 状态灯操作(字段缺失即跳过,保持当前状态)
@@ -28,10 +29,18 @@ export interface ILightOperating {
28
29
  */
29
30
  export interface IProgressOperating {
30
31
  percent?: number;
31
- textContent?: string;
32
+ text?: string;
33
+ }
34
+ /**
35
+ * 出入口通道操作(协议层 passage,字段缺失即跳过,保持当前状态)
36
+ */
37
+ export interface IPassageOperating {
38
+ in?: boolean;
39
+ out?: boolean;
32
40
  }
33
41
  /**
34
- * 出入口操作(字段缺失即跳过,保持当前状态)
42
+ * 出入口组件内部操作(isIn / isOut)
43
+ * 内部渲染组件 Entrance 的入参,与协议层 passage 语义一致,由设备模型将 passage 转换后传入
35
44
  */
36
45
  export interface IEntranceOperating {
37
46
  isIn?: boolean;
@@ -40,4 +49,4 @@ export interface IEntranceOperating {
40
49
  /**
41
50
  * 子组件运转状态的联合类型
42
51
  */
43
- export type IComponentOperating = IResourceOperating | ILightOperating | IProgressOperating | IEntranceOperating;
52
+ export type IComponentOperating = IResourceOperating | ILightOperating | IProgressOperating | IPassageOperating | IEntranceOperating;
@@ -25,12 +25,32 @@ export declare enum EnumModel {
25
25
  PALLET = "Pallet",
26
26
  RESOURCE_OPERATION_WINDOW = "ResourceOperationWindow"
27
27
  }
28
+ export declare enum EnumDeviceType {
29
+ MACHINE_TOOL = "machine_tool",
30
+ LOADING_STATION = "loading_station",
31
+ SHUTTLE_STATION = "shuttle_station",
32
+ MATERIAL_TRACK = "material_track",
33
+ MARKING_MACHINE = "marking_machine",
34
+ CLEANING_MACHINE = "cleaning_machine",
35
+ SINGLE_JOINT_ROBOT = "single_joint_robot",
36
+ DOUBLE_JOINT_ROBOT = "double_joint_robot",
37
+ RGV = "rgv",
38
+ RESOURCE_STORE = "resource_store",
39
+ PALLET = "pallet",
40
+ RESOURCE_OPERATION_WINDOW = "resource_operation_window"
41
+ }
28
42
  export declare enum EnumComponent {
29
43
  STATION_SLOT = "StationSlot",
30
44
  RESOURCE = "Resource"
31
45
  }
32
46
  export declare enum EnumResourceType {
33
- PALLET = "Pallet",
34
- TOOL = "Tool"
47
+ WORKPIECE = "workpiece",
48
+ TOOL = "tool",
49
+ AUXILIARY = "auxiliary"
50
+ }
51
+ export declare enum EnumPalletType {
52
+ WORKPIECE_PALLET = "workpiece_pallet",
53
+ TOOL_PALLET = "tool_pallet",
54
+ AUXILIARY_PALLET = "auxiliary_pallet"
35
55
  }
36
56
  export type EnumInteractiveUi = EnumModel | EnumComponent;
@@ -12,6 +12,7 @@ export declare function isStationSlotGroupBoth(layer: ILayer | null): layer is E
12
12
  export declare function hasStationSlotLayers(layer: ILayer | null): layer is Extract<ILayer, {
13
13
  stationSlotGroups?: any[];
14
14
  }>;
15
+ export declare function isResourceStore(layer: ILayer | null): layer is import('./index').IResourceStoreConfig;
15
16
  export declare function hasFixtureChange(layer: ILayer | null): layer is import('./index').ISingleJointRobotConfig | import('./index').IDoubleJointRobotConfig;
16
17
  export declare function isRail(layer: ILayer | null): layer is import('./index').IRailConfig;
17
18
  export declare function isShuttleStation(layer: ILayer | null): layer is import('./index').IShuttleStationConfig;
@@ -7,6 +7,7 @@ export * from './models/config.types';
7
7
  export * from './models/operating.types';
8
8
  export * from './components/config.types';
9
9
  export * from './components/operating.types';
10
+ export * from './socket.types';
10
11
  export * from './guards';
11
12
  /**
12
13
  * 可交互设备类型
@@ -1,12 +1,12 @@
1
1
  import { EnumModel, EnumTag, EnumResourceType } from '../enums';
2
2
  import { IRowData, IBaseConfig, IEventState } from '../base.types';
3
- import { IStationSlotGroupConfig, IFlowConfig } from '../components/config.types';
3
+ import { IStationSlotGroupConfig, IFlowConfig, IStationSlotLayerConfig } from '../components/config.types';
4
4
  import { ILayerOperating } from './operating.types';
5
5
  /**
6
6
  * 设备模型基类
7
7
  */
8
8
  export interface IModel extends IBaseConfig, IEventState {
9
- uuid: string;
9
+ id: string;
10
10
  equipmentName: string;
11
11
  nameplate?: string;
12
12
  lightEnabled?: boolean;
@@ -38,6 +38,7 @@ export interface IMachineToolConfig extends IModel {
38
38
  className: EnumModel.MACHINE_TOOL;
39
39
  stationContainerDirection?: 'horizontal' | 'vertical';
40
40
  stationSlotGroup?: IStationSlotGroupConfig;
41
+ stationSlotGroups?: IStationSlotLayerConfig[];
41
42
  }
42
43
  /**
43
44
  * 装载站
@@ -46,6 +47,7 @@ export interface ILoadingStationConfig extends IModel {
46
47
  className: EnumModel.LOADING_STATION;
47
48
  stationContainerDirection?: 'horizontal' | 'vertical';
48
49
  stationSlotGroup?: IStationSlotGroupConfig;
50
+ stationSlotGroups?: IStationSlotLayerConfig[];
49
51
  }
50
52
  /**
51
53
  * 接驳站工位层配置
@@ -91,6 +93,7 @@ export interface IMaterialTrackConfig extends IModel {
91
93
  export interface IMarkingMachineConfig extends IModel {
92
94
  className: EnumModel.MARKING_MACHINE;
93
95
  stationSlotGroup?: IStationSlotGroupConfig;
96
+ stationSlotGroups?: IStationSlotLayerConfig[];
94
97
  }
95
98
  /**
96
99
  * 清洗机
@@ -98,30 +101,37 @@ export interface IMarkingMachineConfig extends IModel {
98
101
  export interface ICleaningMachineConfig extends IModel {
99
102
  className: EnumModel.CLEANING_MACHINE;
100
103
  stationSlotGroup?: IStationSlotGroupConfig;
104
+ stationSlotGroups?: IStationSlotLayerConfig[];
101
105
  }
102
106
  /**
103
107
  * 单关节机器人
104
108
  */
105
109
  export interface ISingleJointRobotConfig extends IModel {
106
110
  className: EnumModel.SINGLE_JOINT_ROBOT;
107
- currentFixture: EnumResourceType;
111
+ currentFixture: EnumResourceType | 'none';
112
+ /** 夹具绑定工位层(多对多):fixture → 绑定的层 index 列表;未绑定的夹具显示全部层。仅影响画布显隐与资源层索引,不影响协议消息 */
113
+ fixtureLayerBindings?: Partial<Record<EnumResourceType, number[]>>;
108
114
  linkRailId?: string;
109
115
  linkTrailerId?: string;
110
116
  flowOptions?: IFlowConfig;
111
117
  stationSlotGroupPallet?: IStationSlotGroupConfig;
112
118
  stationSlotGroupTool?: IStationSlotGroupConfig;
119
+ stationSlotGroups?: IStationSlotLayerConfig[];
113
120
  }
114
121
  /**
115
122
  * 双关节机器人
116
123
  */
117
124
  export interface IDoubleJointRobotConfig extends IModel {
118
125
  className: EnumModel.DOUBLE_JOINT_ROBOT;
119
- currentFixture: EnumResourceType;
126
+ currentFixture: EnumResourceType | 'none';
127
+ /** 夹具绑定工位层(多对多):fixture → 绑定的层 index 列表;未绑定的夹具显示全部层。仅影响画布显隐与资源层索引,不影响协议消息 */
128
+ fixtureLayerBindings?: Partial<Record<EnumResourceType, number[]>>;
120
129
  linkRailId?: string;
121
130
  linkTrailerId?: string;
122
131
  flowOptions?: IFlowConfig;
123
132
  stationSlotGroupPallet?: IStationSlotGroupConfig;
124
133
  stationSlotGroupTool?: IStationSlotGroupConfig;
134
+ stationSlotGroups?: IStationSlotLayerConfig[];
125
135
  }
126
136
  /**
127
137
  * RGV
@@ -132,6 +142,7 @@ export interface IRGVConfig extends IModel {
132
142
  flowOptions?: IFlowConfig;
133
143
  stationSlotGroupPallet?: IStationSlotGroupConfig;
134
144
  stationSlotGroupTool?: IStationSlotGroupConfig;
145
+ stationSlotGroups?: IStationSlotLayerConfig[];
135
146
  }
136
147
  /**
137
148
  * 轨道
@@ -146,9 +157,13 @@ export interface IRailConfig extends IModel {
146
157
  */
147
158
  export interface IResourceStoreConfig extends IModel {
148
159
  className: EnumModel.RESOURCE_STORE;
160
+ /** 外层容器布局配置:Flow 对所有工位层整体排布(方向 flow / 换行 flowWrap / 间距 gap / 容器宽高) */
149
161
  flowOptions?: IFlowConfig;
162
+ /** 是否隐藏外层容器边界(默认 true 隐藏;false 时显示容器轮廓) */
163
+ hideBounds?: boolean;
150
164
  stationSlotGroupPallet?: IStationSlotGroupConfig;
151
165
  stationSlotGroupTool?: IStationSlotGroupConfig;
166
+ stationSlotGroups?: IStationSlotLayerConfig[];
152
167
  }
153
168
  /**
154
169
  * 通用托盘工位层配置
@@ -176,6 +191,8 @@ export interface IPalletConfig extends IModel {
176
191
  /** 兼容旧配置:刀具工位组(无 stationSlotGroups 时迁移为第 2 层) */
177
192
  stationSlotGroupTool?: IStationSlotGroupConfig;
178
193
  linkEquipId?: string;
194
+ /** 扩展工位宿主设备 ID(业务 rawData.id):绑定后本托盘工位并入宿主设备的工位编号空间(合并编号),资源寻址宿主越界时顺延落到本托盘;与宿主共用 device_id 时资源增删寻址逻辑合并(视觉上仍独立) */
195
+ extendHostId?: string;
179
196
  }
180
197
  /**
181
198
  * 资源操作窗口(独立设备)
@@ -188,8 +205,9 @@ export interface IResourceOperationWindowConfig extends IModel {
188
205
  backgroundColor?: string;
189
206
  /** 环状矩形边框厚度(默认 10) */
190
207
  ringThickness?: number;
191
- /** 单一工位组配置(框内托盘,槽位 resourceType 可为 Pallet / Tool */
208
+ /** 兼容旧配置:单一工位组配置(框内托盘,槽位 resourceType 可为 Pallet / Tool;无 stationSlotGroups 时迁移为第 1 层) */
192
209
  stationSlotGroup?: IStationSlotGroupConfig;
210
+ stationSlotGroups?: IStationSlotLayerConfig[];
193
211
  }
194
212
  /**
195
213
  * 设备层联合类型
@@ -1,8 +1,21 @@
1
1
  import { EnumModel, EnumResourceType } from '../enums';
2
2
  import { IRowData } from '../base.types';
3
- import { ILightOperating, IProgressOperating, IEntranceOperating, IResourceOperating } from '../components/operating.types';
3
+ import { ILightOperating, IProgressOperating, IPassageOperating, IResourceOperating } from '../components/operating.types';
4
4
  /** 操作类型:model 画布模型操作;resource 全局资源操作;resetAll 全部复位操作 */
5
5
  export type EnumOperatingType = 'model' | 'resource' | 'resetAll';
6
+ /**
7
+ * 设备空间状态(内部 operating 表示:位移字段为画布像素值,角度字段为度;均直接赋值)
8
+ * 协议层(socket position,比例值)经代理器/分发器换算后写入本对象
9
+ */
10
+ export interface IPositionOperating {
11
+ x?: number;
12
+ y?: number;
13
+ z?: number;
14
+ j1?: number;
15
+ j2?: number;
16
+ fork_xy?: number;
17
+ fork_z?: number;
18
+ }
6
19
  /**
7
20
  * 设备运转基类(业务字段均为「缺失即跳过」语义:未携带的字段不设置,保持模型当前状态)
8
21
  */
@@ -10,9 +23,11 @@ export interface IModelOperating {
10
23
  operatingType?: 'model';
11
24
  id: string;
12
25
  className: EnumModel;
13
- /** 工位序号:同 id 多实例(同设备多工位 UI)时的目标实例消歧;缺省时回退 resource.index */
14
- stationIndex?: number;
15
- rawData: IRowData;
26
+ /** 设备工位序号:同 id 多实例(同设备多工位 UI)时的目标实例消歧;缺省时回退 resource.device_station */
27
+ device_station?: number;
28
+ /** 设备状态(协议 device_state 状态码;画布默认不做任何处理,由使用方按需在代理器自行配置映射) */
29
+ device_state?: number;
30
+ raw_data: IRowData;
16
31
  resource?: IResourceOperating;
17
32
  }
18
33
  /**
@@ -23,14 +38,14 @@ export interface IGlobalResourceOperating {
23
38
  handleType: 'batchRemove';
24
39
  resourceType?: EnumResourceType;
25
40
  resourceIds: string[];
26
- rawData: IRowData;
41
+ raw_data: IRowData;
27
42
  }
28
43
  /**
29
44
  * 全部复位操作(不绑定具体设备,画布所有模型按初始配置重建,与「一键复位画布」一致)
30
45
  */
31
46
  export interface IResetAllOperating {
32
47
  operatingType: 'resetAll';
33
- rawData?: IRowData;
48
+ raw_data?: IRowData;
34
49
  }
35
50
  /**
36
51
  * 机床运转状态
@@ -39,10 +54,11 @@ export interface IMachineToolOperating extends IModelOperating {
39
54
  className: EnumModel.MACHINE_TOOL;
40
55
  light?: ILightOperating;
41
56
  progress?: IProgressOperating;
42
- entrance?: IEntranceOperating;
43
- stationRotatable?: boolean;
57
+ passage?: IPassageOperating;
58
+ /** 工位旋转增量(度):叠加在机床配置的工位容器方向角之上 */
59
+ station_rotation?: number;
44
60
  /** 是否工作中:为 true 时工位容器玻璃背景呼吸闪动(默认 false) */
45
- isWorking?: boolean;
61
+ is_working?: boolean;
46
62
  }
47
63
  /**
48
64
  * 装载站运转状态
@@ -51,8 +67,7 @@ export interface ILoadingStationOperating extends IModelOperating {
51
67
  className: EnumModel.LOADING_STATION;
52
68
  light?: Omit<ILightOperating, 'rotating'>;
53
69
  progress?: IProgressOperating;
54
- entrance?: IEntranceOperating;
55
- stationRotatable?: boolean;
70
+ passage?: IPassageOperating;
56
71
  }
57
72
  /**
58
73
  * 接驳站运转状态
@@ -60,21 +75,15 @@ export interface ILoadingStationOperating extends IModelOperating {
60
75
  export interface IShuttleStationOperating extends IModelOperating {
61
76
  className: EnumModel.SHUTTLE_STATION;
62
77
  light?: Omit<ILightOperating, 'rotating'>;
63
- /**
64
- * 各层工位组状态灯颜色,键为层索引(1-based),值为颜色字符串(由消息侧完成状态码→颜色转换)
65
- * 如 { 1: '#FF4444', 2: '#00FF7F' }
66
- */
67
- layerLightColor?: Record<number, string>;
68
- /**
69
- * 各层工位组状态灯闪烁,键为层索引(1-based),值为是否闪烁(配合 layerLightColor 状态灯使用)
70
- * 如 { 1: false, 2: true, 3: true }
71
- */
72
- layerLightBlinking?: Record<number, boolean>;
73
- /**
74
- * 各层工位组显示状态,键为层索引(1-based),值为是否可见(通过工位组 visible 属性显隐)
75
- * 如 { 1: true, 2: false, 3: true }
76
- */
77
- layerVisible?: Record<number, boolean>;
78
+ /** 各层工位组状态灯颜色,键为层索引(1-based),值为颜色字符串或字典值
79
+ * 如 { 1: '#FF4444', 2: '#00FF7F' } */
80
+ layer_light_colors?: Record<number, string>;
81
+ /** 各层工位组状态灯闪烁,键为层索引(1-based)
82
+ * 如 { 1: false, 2: true, 3: true } */
83
+ layer_light_blinking?: Record<number, boolean>;
84
+ /** 各层工位组显示状态,键为层索引(1-based),值为是否可见
85
+ * 如 { 1: true, 2: false, 3: true } */
86
+ layer_visible?: Record<number, boolean>;
78
87
  }
79
88
  /**
80
89
  * 料道运转状态
@@ -82,8 +91,8 @@ export interface IShuttleStationOperating extends IModelOperating {
82
91
  export interface IMaterialTrackOperating extends IModelOperating {
83
92
  className: EnumModel.MATERIAL_TRACK;
84
93
  light?: Omit<ILightOperating, 'rotating'>;
85
- /** 各层工位组显示状态,键为层索引(1-based),值为是否可见(通过工位组 visible 属性显隐) */
86
- layerVisible?: Record<number, boolean>;
94
+ /** 各层工位组显示状态,键为层索引(1-based),值为是否可见 */
95
+ layer_visible?: Record<number, boolean>;
87
96
  }
88
97
  /**
89
98
  * 打标机运转状态
@@ -92,10 +101,10 @@ export interface IMarkingMachineOperating extends IModelOperating {
92
101
  className: EnumModel.MARKING_MACHINE;
93
102
  light?: Omit<ILightOperating, 'rotating'>;
94
103
  progress?: IProgressOperating;
95
- entrance?: IEntranceOperating;
104
+ passage?: IPassageOperating;
96
105
  /** 各激光工位是否打标中,键为工位序号(1-based),值为是否激活
97
- * 如 { 1: true, 2: false }(与 layerVisible 等「序号→状态」字段结构统一) */
98
- laserSites?: Record<number, boolean>;
106
+ * 如 { 1: true, 2: false } */
107
+ marking_sites?: Record<number, boolean>;
99
108
  }
100
109
  /**
101
110
  * 清洗机运转状态
@@ -104,9 +113,9 @@ export interface ICleaningMachineOperating extends IModelOperating {
104
113
  className: EnumModel.CLEANING_MACHINE;
105
114
  light?: Omit<ILightOperating, 'rotating'>;
106
115
  progress?: IProgressOperating;
107
- entrance?: IEntranceOperating;
116
+ passage?: IPassageOperating;
108
117
  /** 是否工作中:为 true 时显示工位容器内的波浪流动效果(默认 false) */
109
- isWorking?: boolean;
118
+ is_working?: boolean;
110
119
  }
111
120
  /**
112
121
  * 单关节机器人运转状态
@@ -114,10 +123,10 @@ export interface ICleaningMachineOperating extends IModelOperating {
114
123
  export interface ISingleJointRobotOperating extends IModelOperating {
115
124
  className: EnumModel.SINGLE_JOINT_ROBOT;
116
125
  light?: ILightOperating;
117
- x?: number;
118
- y?: number;
119
- j1?: number;
120
- currentFixture?: EnumResourceType;
126
+ /** 空间状态(位移 + 关节,见 IPositionOperating) */
127
+ position?: IPositionOperating;
128
+ /** 当前夹持资源类型(none = 空夹具) */
129
+ current_fixture?: EnumResourceType | 'none';
121
130
  }
122
131
  /**
123
132
  * 双关节机器人运转状态
@@ -125,11 +134,10 @@ export interface ISingleJointRobotOperating extends IModelOperating {
125
134
  export interface IDoubleJointRobotOperating extends IModelOperating {
126
135
  className: EnumModel.DOUBLE_JOINT_ROBOT;
127
136
  light?: ILightOperating;
128
- x?: number;
129
- y?: number;
130
- j1?: number;
131
- j2?: number;
132
- currentFixture?: EnumResourceType;
137
+ /** 空间状态(位移 + j1/j2 关节,见 IPositionOperating) */
138
+ position?: IPositionOperating;
139
+ /** 当前夹持资源类型(none = 空夹具) */
140
+ current_fixture?: EnumResourceType | 'none';
133
141
  }
134
142
  /**
135
143
  * RGV运转状态
@@ -137,10 +145,8 @@ export interface IDoubleJointRobotOperating extends IModelOperating {
137
145
  export interface IRGVOperating extends IModelOperating {
138
146
  className: EnumModel.RGV;
139
147
  light?: ILightOperating;
140
- x?: number;
141
- j1?: number;
142
- forkXY?: number;
143
- forkZ?: number;
148
+ /** 空间状态(沿轨道位移 + 车体角度 + 货叉,见 IPositionOperating) */
149
+ position?: IPositionOperating;
144
150
  }
145
151
  /**
146
152
  * 轨道运转状态(已移除:拖链定位由画布内部联动驱动——设备移动时逐帧跟随,
@@ -152,25 +158,21 @@ export interface IRGVOperating extends IModelOperating {
152
158
  export interface IResourceStoreOperating extends IModelOperating {
153
159
  className: EnumModel.RESOURCE_STORE;
154
160
  light?: ILightOperating;
155
- x?: number;
161
+ /** 空间状态(沿轨道位移,见 IPositionOperating) */
162
+ position?: IPositionOperating;
156
163
  resource?: IResourceOperating;
157
- /** 各工位背景颜色,键为工位序号 index(1-based),值为颜色字符串(由消息侧完成状态码→颜色转换)
158
- * 如 { 1: '#FF4444', 2: '#00FF7F' } */
159
- stationColor?: Record<number, string>;
160
164
  }
161
165
  /**
162
166
  * 通用托盘运转状态
163
- * resource 支持多层工位组:通过 resource.layer(1-based)定位到指定层;
167
+ * resource 支持多层工位组:通过 resource.device_layer(1-based)定位到指定层;
164
168
  * 未传入 layer 时默认识别为第一层。
165
169
  */
166
170
  export interface IPalletOperating extends IModelOperating {
167
171
  className: EnumModel.PALLET;
168
172
  light?: ILightOperating;
169
- x?: number;
170
- y?: number;
173
+ /** 空间状态(沿 X/Y 轴位移,见 IPositionOperating) */
174
+ position?: IPositionOperating;
171
175
  resource?: IResourceOperating;
172
- /** 各工位背景颜色,键为工位序号 index(1-based),值为颜色字符串(由消息侧完成状态码→颜色转换) */
173
- stationColor?: Record<number, string>;
174
176
  }
175
177
  /**
176
178
  * 资源操作窗口运转状态
@@ -179,8 +181,6 @@ export interface IResourceOperationWindowOperating extends IModelOperating {
179
181
  className: EnumModel.RESOURCE_OPERATION_WINDOW;
180
182
  light?: Omit<ILightOperating, 'rotating'>;
181
183
  resource?: IResourceOperating;
182
- /** 各工位背景颜色,键为工位序号 index(1-based),值为颜色字符串(由消息侧完成状态码→颜色转换) */
183
- stationColor?: Record<number, string>;
184
184
  }
185
185
  /**
186
186
  * 设备层运转状态的联合类型