@jnrs/lingshu-smart 2.2.38 → 2.2.40
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.
- package/AGENTS.md +27 -25
- package/README.md +10 -10
- package/dist/components/debug/ScriptRunner/StressPanel.vue.d.ts +63 -0
- package/dist/components/debug/WsProxy/ConfigEditor.vue.d.ts +5 -3
- package/dist/components/debug/WsProxy/ConnPanel.vue.d.ts +10 -0
- package/dist/components/debug/WsProxy/MappingGrid.vue.d.ts +2 -0
- package/dist/components/debug/WsProxy/index.vue.d.ts +33 -4
- package/dist/components/debug/WsProxy/proxy.d.ts +65 -19
- package/dist/components/editor/ControlBar/CaseTitleEdit.vue.d.ts +16 -16
- package/dist/components/editor/OptionCard/Equipment/stationSlot/StationSlotGroupDialog.vue.d.ts +1 -1
- package/dist/components/index.js +5610 -4080
- package/dist/components/preview/index.vue.d.ts +439 -30
- package/dist/controller/AppController.d.ts +12 -0
- package/dist/index-DKL_kTJG.js +11441 -0
- package/dist/index.js +42 -38
- package/dist/lingshu-smart/cases.json +12818 -211
- package/dist/lingshu-smart/wsProxyConfig.json +1026 -520
- package/dist/locales/en.d.ts +2 -0
- package/dist/locales/i18next.d.ts +4 -0
- package/dist/locales/index.js +12 -8
- package/dist/locales/zhCn.d.ts +2 -0
- package/dist/playground/ViewPageDemo.vue.d.ts +1025 -159
- package/dist/stores/index.js +1 -1
- package/dist/stores/useAppStore.d.ts +1491 -264
- package/dist/stores/useDataStore.d.ts +2143 -262
- package/dist/stores/useDebugStore.d.ts +38 -557
- package/dist/types/components/config.types.d.ts +3 -1
- package/dist/types/enums.d.ts +3 -1
- package/dist/types/models/config.types.d.ts +34 -2
- package/dist/types/models/operating.types.d.ts +36 -4
- package/dist/ui/abstract/ModelAbs.d.ts +6 -0
- package/dist/ui/components/StationSlot.d.ts +15 -0
- package/dist/ui/components/StationSlotGroup.d.ts +6 -0
- package/dist/ui/models/MaterialTrack.d.ts +29 -0
- package/dist/ui/models/ResourceOperationWindow.d.ts +39 -0
- package/dist/ui/models/ShuttleStation.d.ts +3 -3
- package/dist/useAppStore-DlxnXCZs.js +15737 -0
- package/dist/utils/caseCompact.d.ts +17 -0
- package/dist/utils/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/index-YxSpi9Af.js +0 -131
- package/dist/useAppStore-CIFewItb.js +0 -26105
- /package/dist/components/debug/{DebugPanel.vue.d.ts → GlobalSetting.vue.d.ts} +0 -0
|
@@ -51,7 +51,7 @@ export interface IShuttleStationLayerConfig {
|
|
|
51
51
|
index: number;
|
|
52
52
|
/** 工位组配置(托盘或刀具) */
|
|
53
53
|
stationSlotGroup: IStationSlotGroupConfig;
|
|
54
|
-
/** 层状态灯颜色(默认 '#666' 灰色,运行时由
|
|
54
|
+
/** 层状态灯颜色(默认 '#666' 灰色,运行时由 layerLightColor 驱动) */
|
|
55
55
|
lightColor?: string;
|
|
56
56
|
/** 是否显示层状态灯(默认 true) */
|
|
57
57
|
lightEnabled?: boolean;
|
|
@@ -64,6 +64,23 @@ export interface IShuttleStationConfig extends IModel {
|
|
|
64
64
|
/** 多工位层配置数组(一层=一个工位组,可托盘或刀具) */
|
|
65
65
|
stationSlotGroups?: IShuttleStationLayerConfig[];
|
|
66
66
|
}
|
|
67
|
+
/**
|
|
68
|
+
* 料道工位层配置
|
|
69
|
+
*/
|
|
70
|
+
export interface IMaterialTrackLayerConfig {
|
|
71
|
+
/** 层索引(从 1 开始) */
|
|
72
|
+
index: number;
|
|
73
|
+
/** 工位组配置(托盘或刀具) */
|
|
74
|
+
stationSlotGroup: IStationSlotGroupConfig;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* 料道
|
|
78
|
+
*/
|
|
79
|
+
export interface IMaterialTrackConfig extends IModel {
|
|
80
|
+
className: EnumModel.MATERIAL_TRACK;
|
|
81
|
+
/** 多工位层配置数组(一层=一个工位组) */
|
|
82
|
+
stationSlotGroups?: IMaterialTrackLayerConfig[];
|
|
83
|
+
}
|
|
67
84
|
/**
|
|
68
85
|
* 打标机
|
|
69
86
|
*/
|
|
@@ -141,8 +158,23 @@ export interface IPalletConfig extends IModel {
|
|
|
141
158
|
flowOptions?: IFlowConfig;
|
|
142
159
|
stationSlotGroupPallet?: IStationSlotGroupConfig;
|
|
143
160
|
stationSlotGroupTool?: IStationSlotGroupConfig;
|
|
161
|
+
linkEquipId?: string;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* 资源操作窗口(独立设备)
|
|
165
|
+
* 参考托盘/料道:窗口框造型,框内为单个工位组(其中的托盘可 Pallet 或 Tool);
|
|
166
|
+
* 部件可有状态灯与铭牌;operating 支持 light / resource / stationStatus(按工位序号改色)。
|
|
167
|
+
*/
|
|
168
|
+
export interface IResourceOperationWindowConfig extends IModel {
|
|
169
|
+
className: EnumModel.RESOURCE_OPERATION_WINDOW;
|
|
170
|
+
/** 主体背景色(默认 '#5BC5A1') */
|
|
171
|
+
backgroundColor?: string;
|
|
172
|
+
/** 环状矩形边框厚度(默认 10) */
|
|
173
|
+
ringThickness?: number;
|
|
174
|
+
/** 单一工位组配置(框内托盘,槽位 resourceType 可为 Pallet / Tool) */
|
|
175
|
+
stationSlotGroup?: IStationSlotGroupConfig;
|
|
144
176
|
}
|
|
145
177
|
/**
|
|
146
178
|
* 设备层联合类型
|
|
147
179
|
*/
|
|
148
|
-
export type ILayer = IMachineToolConfig | ILoadingStationConfig | IShuttleStationConfig | IMarkingMachineConfig | ICleaningMachineConfig | ISingleJointRobotConfig | IDoubleJointRobotConfig | IRGVConfig | IRailConfig | IResourceStoreConfig | IPalletConfig;
|
|
180
|
+
export type ILayer = IMachineToolConfig | ILoadingStationConfig | IShuttleStationConfig | IMaterialTrackConfig | IMarkingMachineConfig | ICleaningMachineConfig | ISingleJointRobotConfig | IDoubleJointRobotConfig | IRGVConfig | IRailConfig | IResourceStoreConfig | IPalletConfig | IResourceOperationWindowConfig;
|
|
@@ -49,10 +49,30 @@ export interface ILoadingStationOperating extends IModelOperating {
|
|
|
49
49
|
export interface IShuttleStationOperating extends IModelOperating {
|
|
50
50
|
className: EnumModel.SHUTTLE_STATION;
|
|
51
51
|
light?: Omit<ILightOperating, 'rotating'>;
|
|
52
|
-
/**
|
|
53
|
-
* 代理器 dictColorMap 转换后值为颜色字符串;未转换时值为状态数字码
|
|
52
|
+
/** 各层工位组状态灯颜色,键为层索引(1-based),值为状态码或颜色字符串
|
|
53
|
+
* 代理器 dictColorMap / objDict 转换后值为颜色字符串;未转换时值为状态数字码
|
|
54
|
+
* 如 { 1: 'red', 2: 100, 3: 'green' }
|
|
54
55
|
*/
|
|
55
|
-
|
|
56
|
+
layerLightColor?: Record<number, number | string>;
|
|
57
|
+
/**
|
|
58
|
+
* 各层工位组状态灯闪烁,键为层索引(1-based),值为是否闪烁(配合 layerLightColor 状态灯使用)
|
|
59
|
+
* 如 { 1: false, 2: true, 3: true }
|
|
60
|
+
*/
|
|
61
|
+
layerLightBlinking?: Record<number, boolean>;
|
|
62
|
+
/**
|
|
63
|
+
* 各层工位组显示状态,键为层索引(1-based),值为是否可见(通过工位组 visible 属性显隐)
|
|
64
|
+
* 如 { 1: true, 2: false, 3: true }
|
|
65
|
+
*/
|
|
66
|
+
layerVisible?: Record<number, boolean>;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* 料道运转状态
|
|
70
|
+
*/
|
|
71
|
+
export interface IMaterialTrackOperating extends IModelOperating {
|
|
72
|
+
className: EnumModel.MATERIAL_TRACK;
|
|
73
|
+
light?: Omit<ILightOperating, 'rotating'>;
|
|
74
|
+
/** 各层工位组显示状态,键为层索引(1-based),值为是否可见(通过工位组 visible 属性显隐) */
|
|
75
|
+
layerVisible?: Record<number, boolean>;
|
|
56
76
|
}
|
|
57
77
|
/**
|
|
58
78
|
* 打标机站点状态
|
|
@@ -141,7 +161,19 @@ export interface IPalletOperating extends IModelOperating {
|
|
|
141
161
|
y?: number;
|
|
142
162
|
resource?: IResourceOperating;
|
|
143
163
|
}
|
|
164
|
+
/**
|
|
165
|
+
* 资源操作窗口运转状态
|
|
166
|
+
*/
|
|
167
|
+
export interface IResourceOperationWindowOperating extends IModelOperating {
|
|
168
|
+
className: EnumModel.RESOURCE_OPERATION_WINDOW;
|
|
169
|
+
light?: Omit<ILightOperating, 'rotating'>;
|
|
170
|
+
resource?: IResourceOperating;
|
|
171
|
+
/** 各工位状态(颜色),键为工位序号 index(1-based),值为状态码或颜色字符串
|
|
172
|
+
* 代理器转换后值为颜色字符串;未转换时值为状态数字码(内部映射为颜色)
|
|
173
|
+
* 如 { 1: 'red', 2: 100, 3: '#66DC7A' } */
|
|
174
|
+
stationStatus?: Record<number, number | string>;
|
|
175
|
+
}
|
|
144
176
|
/**
|
|
145
177
|
* 设备层运转状态的联合类型
|
|
146
178
|
*/
|
|
147
|
-
export type ILayerOperating = IMachineToolOperating | ILoadingStationOperating | IShuttleStationOperating | IMarkingMachineOperating | ICleaningMachineOperating | ISingleJointRobotOperating | IDoubleJointRobotOperating | IRGVOperating | IRailOperating | IResourceStoreOperating | IPalletOperating | IGlobalResourceOperating;
|
|
179
|
+
export type ILayerOperating = IMachineToolOperating | ILoadingStationOperating | IShuttleStationOperating | IMaterialTrackOperating | IMarkingMachineOperating | ICleaningMachineOperating | ISingleJointRobotOperating | IDoubleJointRobotOperating | IRGVOperating | IRailOperating | IResourceStoreOperating | IPalletOperating | IResourceOperationWindowOperating | IGlobalResourceOperating;
|
|
@@ -25,4 +25,10 @@ export declare abstract class ModelAbs<T extends ILayer = ILayer> extends BaseAb
|
|
|
25
25
|
*/
|
|
26
26
|
removeResourceById(resourceId: string): boolean;
|
|
27
27
|
destroyUI(): void;
|
|
28
|
+
/**
|
|
29
|
+
* 复位:销毁当前 UI 并按初始配置重建(编辑器设置值优先,未设置的字段取模型类默认值)
|
|
30
|
+
* 所有经 operating 修改的内容(位置/关节/灯/进度/资源等)随重建回到初始状态;
|
|
31
|
+
* 调用方(AppController)负责将新 UI 重新挂载到场景树原位置并重新注册交互事件
|
|
32
|
+
*/
|
|
33
|
+
resetUI(): void;
|
|
28
34
|
}
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import { IStationSlotConfig, IResourceOperating } from '../../types';
|
|
2
2
|
import { Box } from 'leafer';
|
|
3
3
|
import { ComponentAbs } from '../abstract/ComponentAbs';
|
|
4
|
+
/**
|
|
5
|
+
* 工位槽位默认配置(唯一默认值来源,供三处共用,避免多处不同步导致数据漂移):
|
|
6
|
+
* 1. StationSlot 构造器合并回退
|
|
7
|
+
* 2. 编辑器 StationSlotGroupDialog 的 withSlotDefaults 旧数据补齐
|
|
8
|
+
* 3. 方案持久化压缩层(默认值剥离/合并,规划中)从此导入
|
|
9
|
+
* 注意 showShadow 取渲染回退值 true(而非 Dialog 创建默认 false):
|
|
10
|
+
* 缺失该字段的历史数据一直按 true 渲染,默认表必须与渲染行为一致,否则解压合并后视觉漂移
|
|
11
|
+
*/
|
|
12
|
+
export declare const DEFAULT_SLOT: IStationSlotConfig;
|
|
4
13
|
export declare class StationSlot extends ComponentAbs<IStationSlotConfig> {
|
|
5
14
|
private children;
|
|
6
15
|
private pendingDestroy;
|
|
@@ -28,6 +37,12 @@ export declare class StationSlot extends ComponentAbs<IStationSlotConfig> {
|
|
|
28
37
|
*/
|
|
29
38
|
setSiteWorking(flag: boolean): void;
|
|
30
39
|
toggleVisible(visible: boolean | 0): void;
|
|
40
|
+
/**
|
|
41
|
+
* 设置工位填充颜色:传值 color 则填充为该颜色;未传值(undefined / 空)时恢复为默认背景色
|
|
42
|
+
* 供「资源操作窗口」等按工位序号动态改色的设备使用
|
|
43
|
+
* @param color 目标颜色(如 '#66DC7A');缺省时使用工位配置背景色(默认 DEFAULT_BACKGROUND)
|
|
44
|
+
*/
|
|
45
|
+
setSiteWorkingColor(color?: string): void;
|
|
31
46
|
/**
|
|
32
47
|
* 销毁
|
|
33
48
|
*/
|
|
@@ -26,4 +26,10 @@ export declare class StationSlotGroup extends ComponentAbs<IStationSlotGroupConf
|
|
|
26
26
|
* @returns 是否至少移除了一个资源
|
|
27
27
|
*/
|
|
28
28
|
removeResourceById(resourceId: string): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* 按工位序号修改工位填充颜色(未传 color 时恢复默认背景色)
|
|
31
|
+
* @param index 工位序号(IStationSlotConfig.index)
|
|
32
|
+
* @param color 目标颜色;缺省时使用工位默认背景色
|
|
33
|
+
*/
|
|
34
|
+
setSiteWorkingColor(index: number, color?: string): void;
|
|
29
35
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { IMaterialTrackConfig, IMaterialTrackOperating } from '../../types';
|
|
2
|
+
import { Box } from 'leafer';
|
|
3
|
+
import { ModelAbs } from '../abstract/ModelAbs';
|
|
4
|
+
/**
|
|
5
|
+
* 料道(MaterialTrack)
|
|
6
|
+
* 参考接驳站的 U 型多层结构,主体为淡蓝色;
|
|
7
|
+
* 与接驳站的差异:
|
|
8
|
+
* 1. 无底座和轮子(主体即完整几何);
|
|
9
|
+
* 2. 无层状态灯(工位组无状态灯配置);
|
|
10
|
+
* 3. operating 支持 layerVisible 按层索引显隐工位组。
|
|
11
|
+
*/
|
|
12
|
+
export declare class MaterialTrack extends ModelAbs<IMaterialTrackConfig> {
|
|
13
|
+
private static readonly WALL_THICKNESS;
|
|
14
|
+
private static readonly BASE_HEIGHT;
|
|
15
|
+
private static readonly LIGHT_Y_OFFSET;
|
|
16
|
+
private static readonly NAME_PLATE_Y_OFFSET;
|
|
17
|
+
private static readonly LAYER_GAP;
|
|
18
|
+
/** 主体填充色(淡蓝色) */
|
|
19
|
+
private static readonly BODY_FILL;
|
|
20
|
+
/** 内腔填充色(深蓝,衬托工位) */
|
|
21
|
+
private static readonly CAVITY_FILL;
|
|
22
|
+
private light;
|
|
23
|
+
private layerGroups;
|
|
24
|
+
private buildUPath;
|
|
25
|
+
private buildOutlinePath;
|
|
26
|
+
private buildLayers;
|
|
27
|
+
protected createUi(): Box;
|
|
28
|
+
protected operating(data: IMaterialTrackOperating): void;
|
|
29
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { IResourceOperationWindowConfig, IResourceOperationWindowOperating } from '../../types';
|
|
2
|
+
import { Box } from 'leafer';
|
|
3
|
+
import { ModelAbs } from '../abstract/ModelAbs';
|
|
4
|
+
import { StationSlotGroup } from '../components/StationSlotGroup';
|
|
5
|
+
/**
|
|
6
|
+
* 资源操作窗口(ResourceOperationWindow)
|
|
7
|
+
* 参考托盘 / 料道:窗口框造型(外壁 + 内腔),框内为单个工位组(其中的托盘可 Pallet 或 Tool);
|
|
8
|
+
* 部件可选状态灯与铭牌。
|
|
9
|
+
* operating 支持:
|
|
10
|
+
* - light:主体状态灯
|
|
11
|
+
* - resource:向框内工位组添加 / 移除托盘资源
|
|
12
|
+
* - stationStatus:按工位序号 index 修改工位颜色(值可为颜色字符串或状态码)
|
|
13
|
+
*/
|
|
14
|
+
export declare class ResourceOperationWindow extends ModelAbs<IResourceOperationWindowConfig> {
|
|
15
|
+
private static readonly DEFAULT_RING_THICKNESS;
|
|
16
|
+
private static readonly LIGHT_Y_OFFSET;
|
|
17
|
+
private static readonly NAME_PLATE_Y_OFFSET;
|
|
18
|
+
private static readonly LIGHT_CORNER_RADIUS;
|
|
19
|
+
/** 环状矩形外壁填充色 */
|
|
20
|
+
private static readonly BODY_FILL;
|
|
21
|
+
/** 内腔填充色(衬托框内托盘) */
|
|
22
|
+
private static readonly CAVITY_FILL;
|
|
23
|
+
private light;
|
|
24
|
+
private stationSlotGroup;
|
|
25
|
+
/** 环厚(取配置,缺省默认 10) */
|
|
26
|
+
private ringThickness;
|
|
27
|
+
private buildFramePath;
|
|
28
|
+
private buildOutlinePath;
|
|
29
|
+
protected createUi(): Box;
|
|
30
|
+
protected operating(data: IResourceOperationWindowOperating): void;
|
|
31
|
+
private applyStationStatus;
|
|
32
|
+
private resolveColor;
|
|
33
|
+
private statusToColor;
|
|
34
|
+
/**
|
|
35
|
+
* 判断本窗口是否包含指定工位号
|
|
36
|
+
*/
|
|
37
|
+
containsStationIndex(index: number): boolean;
|
|
38
|
+
protected collectStationSlotGroups(): StationSlotGroup[];
|
|
39
|
+
}
|
|
@@ -4,7 +4,7 @@ import { ModelAbs } from '../abstract/ModelAbs';
|
|
|
4
4
|
/**
|
|
5
5
|
* 接驳站(ShuttleStation)
|
|
6
6
|
* 整体为 U 型结构,支持多层工位组配置(每层 = 一个工位组容器);
|
|
7
|
-
* 每层独立拥有状态灯,通过
|
|
7
|
+
* 每层独立拥有状态灯,通过 layerLightColor 字典数据驱动颜色;
|
|
8
8
|
* 主体底部有 #EA9734 底座 + 两端半露轮子。
|
|
9
9
|
*/
|
|
10
10
|
export declare class ShuttleStation extends ModelAbs<IShuttleStationConfig> {
|
|
@@ -21,14 +21,14 @@ export declare class ShuttleStation extends ModelAbs<IShuttleStationConfig> {
|
|
|
21
21
|
private light;
|
|
22
22
|
private layerLights;
|
|
23
23
|
private layerGroups;
|
|
24
|
-
private
|
|
24
|
+
private lastLayerLightColor;
|
|
25
25
|
private buildUPath;
|
|
26
26
|
private buildOutlinePath;
|
|
27
27
|
private buildLayers;
|
|
28
28
|
private buildBaseAndWheels;
|
|
29
29
|
protected createUi(): Box;
|
|
30
30
|
protected operating(data: IShuttleStationOperating): void;
|
|
31
|
-
private
|
|
31
|
+
private applyLayerLightColor;
|
|
32
32
|
private resolveStatusColor;
|
|
33
33
|
private statusToColor;
|
|
34
34
|
}
|