@jnrs/lingshu-smart 2.2.4 → 2.2.5
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/README.md +4 -4
- package/dist/assets/data/editor_default.d.ts +9 -0
- package/dist/assets/data/editor_preset.d.ts +2 -0
- package/dist/components/editor/ControlBar/{CaseMangerButton.vue.d.ts → CaseManger.vue.d.ts} +3 -6
- package/dist/components/editor/ControlBar/CaseTitleEdit.vue.d.ts +26 -26
- package/dist/components/editor/ControlBar/MainButton.vue.d.ts +3 -6
- package/dist/components/editor/ControlBar/StepRecordVisualizer.vue.d.ts +3 -2
- package/dist/components/editor/OptionCard/Equipment/Interaction.vue.d.ts +2 -0
- package/dist/components/editor/OptionCard/Equipment/StationSlotGroup.vue.d.ts +2 -0
- package/dist/components/editor/index.vue.d.ts +5 -5
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +9852 -8884
- package/dist/components/preview/index.vue.d.ts +37 -0
- package/dist/composables/useStepRecord.d.ts +17 -3
- package/dist/constants/options.d.ts +2 -2
- package/dist/{core/ViewContainer.d.ts → controller/AppController.d.ts} +10 -6
- package/dist/{core/EditorManager.d.ts → controller/EditorController.d.ts} +8 -7
- package/dist/index.d.ts +1 -1
- package/dist/json/cases.json +219 -0
- package/dist/playground/ViewPageDemo.vue.d.ts +28 -0
- package/dist/stores/index.d.ts +3 -1
- package/dist/stores/useAppStore.d.ts +20 -0
- package/dist/stores/useDataStore.d.ts +29 -0
- package/dist/stores/useEditorStore.d.ts +15 -14295
- package/dist/types/app.types.d.ts +57 -0
- package/dist/types/base.types.d.ts +38 -0
- package/dist/types/components/config.types.d.ts +68 -0
- package/dist/types/components/operating.types.d.ts +40 -0
- package/dist/types/enums.d.ts +34 -0
- package/dist/types/guards.d.ts +2 -0
- package/dist/types/index.d.ts +15 -84
- package/dist/types/models/config.types.d.ts +45 -0
- package/dist/types/models/operating.types.d.ts +34 -0
- package/dist/ui/abstract/ComponentAbs.d.ts +18 -0
- package/dist/ui/abstract/ModelAbs.d.ts +24 -0
- package/dist/ui/components/Entrance.d.ts +50 -0
- package/dist/ui/components/Light.d.ts +6 -21
- package/dist/ui/components/Progress.d.ts +6 -22
- package/dist/ui/components/Resource.d.ts +6 -24
- package/dist/ui/components/StationSlot.d.ts +25 -31
- package/dist/ui/components/StationSlotGroup.d.ts +23 -0
- package/dist/ui/factories/createGlass.d.ts +12 -0
- package/dist/ui/factories/createModel.d.ts +3 -0
- package/dist/ui/factories/createShadow.d.ts +9 -0
- package/dist/ui/factories/createText.d.ts +20 -0
- package/dist/ui/models/MachineTool.d.ts +13 -8
- package/dist/ui/utils/attr.d.ts +9 -0
- package/dist/utils/index.d.ts +14 -18
- package/package.json +2 -2
- package/dist/assets/json/menu.json.d.ts +0 -187
- package/dist/json/case.json +0 -70
- package/dist/types/components.d.ts +0 -8
- package/dist/types/model.d.ts +0 -9
- package/dist/ui/models/BaseModel.d.ts +0 -32
- package/dist/ui/models/ModelsFactory.d.ts +0 -5
- package/dist/ui/shapes/Glass.d.ts +0 -12
- /package/dist/{playground/ViewPage.vue.d.ts → components/editor/OptionCard/Equipment/DataSets.vue.d.ts} +0 -0
- /package/dist/playground/{EditPage.vue.d.ts → EditPageDemo.vue.d.ts} +0 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { ILayer, InteractiveUi, EnumTag } from './index';
|
|
2
|
+
/**
|
|
3
|
+
* 场景
|
|
4
|
+
*/
|
|
5
|
+
export interface IScene {
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
zoomType: 'fit' | number;
|
|
9
|
+
fill?: {
|
|
10
|
+
type: 'solid' | 'linear' | 'radial' | 'image';
|
|
11
|
+
color: string;
|
|
12
|
+
opacity: number;
|
|
13
|
+
stops: {
|
|
14
|
+
offset: number;
|
|
15
|
+
color: string;
|
|
16
|
+
}[];
|
|
17
|
+
url?: string;
|
|
18
|
+
from?: string;
|
|
19
|
+
to?: string;
|
|
20
|
+
};
|
|
21
|
+
texture?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* 方案
|
|
25
|
+
*/
|
|
26
|
+
export interface ICase {
|
|
27
|
+
uuid: string;
|
|
28
|
+
isActive: boolean;
|
|
29
|
+
title: string;
|
|
30
|
+
scene: IScene;
|
|
31
|
+
layers: ILayer[];
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* 设备菜单
|
|
35
|
+
*/
|
|
36
|
+
export interface IEquipmentsMenu {
|
|
37
|
+
title: string;
|
|
38
|
+
tag: EnumTag;
|
|
39
|
+
children: ILayer[];
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* 事件处理
|
|
43
|
+
*/
|
|
44
|
+
export interface IEventHandler {
|
|
45
|
+
onTap?: (layer: ILayer, data: InteractiveUi) => void;
|
|
46
|
+
onMenuTap?: (layer: ILayer, data: InteractiveUi) => void;
|
|
47
|
+
onDragEnd?: (layer: ILayer, data: InteractiveUi) => void;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* 容器
|
|
51
|
+
*/
|
|
52
|
+
export interface IContainer {
|
|
53
|
+
appDomId?: string | HTMLElement;
|
|
54
|
+
autoStart?: boolean;
|
|
55
|
+
appEditable?: boolean;
|
|
56
|
+
actions?: IEventHandler;
|
|
57
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { EnumInteractiveUi } from './enums';
|
|
2
|
+
/**
|
|
3
|
+
* 原始业务数据
|
|
4
|
+
*/
|
|
5
|
+
export type IRowData = {
|
|
6
|
+
id: string;
|
|
7
|
+
} & Record<string, unknown>;
|
|
8
|
+
/**
|
|
9
|
+
* 交互状态
|
|
10
|
+
*/
|
|
11
|
+
export interface IInteractiveState {
|
|
12
|
+
hittable?: boolean;
|
|
13
|
+
hitSelf?: boolean;
|
|
14
|
+
visible?: boolean;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* 事件状态
|
|
18
|
+
*/
|
|
19
|
+
export interface IEventState extends IInteractiveState {
|
|
20
|
+
clickable?: boolean;
|
|
21
|
+
menuClickable?: boolean;
|
|
22
|
+
draggable?: boolean;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* 基础接口,所有组件和设备的配置项都应至少包含以下属性
|
|
26
|
+
* @property {EnumInteractiveUi} [className] - 组件或设备的类型标识,用于区分不同类型的组件或设备
|
|
27
|
+
* @property {number} width - 组件或设备的宽度
|
|
28
|
+
* @property {number} height - 组件或设备的高度
|
|
29
|
+
* @property {number} [x] - 组件或设备的 X 坐标
|
|
30
|
+
* @property {number} [y] - 组件或设备的 Y 坐标
|
|
31
|
+
*/
|
|
32
|
+
export interface IBaseConfig {
|
|
33
|
+
className?: EnumInteractiveUi;
|
|
34
|
+
width: number;
|
|
35
|
+
height: number;
|
|
36
|
+
x?: number;
|
|
37
|
+
y?: number;
|
|
38
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { IRowData, IBaseConfig, IInteractiveState } from '../base.types';
|
|
2
|
+
import { EnumResourceType, EnumComponent } from '../enums';
|
|
3
|
+
/**
|
|
4
|
+
* 工位
|
|
5
|
+
*/
|
|
6
|
+
export interface IStationSlotConfig extends IBaseConfig, IInteractiveState {
|
|
7
|
+
className?: EnumComponent.STATION_SLOT;
|
|
8
|
+
resourceType: EnumResourceType;
|
|
9
|
+
index: number;
|
|
10
|
+
name?: string;
|
|
11
|
+
rotation?: number;
|
|
12
|
+
parentRotation?: number;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* 布局选项
|
|
17
|
+
*/
|
|
18
|
+
export interface IFlowConfig {
|
|
19
|
+
flow: 'x' | 'y' | 'x-reverse' | 'y-reverse';
|
|
20
|
+
flowWrap: boolean | 'reverse';
|
|
21
|
+
oneDirectionMaxQuantity: number;
|
|
22
|
+
gap: number;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* 工位组
|
|
26
|
+
*/
|
|
27
|
+
export interface IStationSlotGroupConfig extends IBaseConfig {
|
|
28
|
+
parentRotation?: number;
|
|
29
|
+
stationSlots: IStationSlotConfig[];
|
|
30
|
+
flowOptions: IFlowConfig;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* 资源
|
|
34
|
+
*/
|
|
35
|
+
export interface IResourceConfig extends IBaseConfig, IInteractiveState {
|
|
36
|
+
className?: EnumComponent.RESOURCE;
|
|
37
|
+
resourceType: EnumResourceType;
|
|
38
|
+
name?: string;
|
|
39
|
+
color?: string;
|
|
40
|
+
rawData: IRowData;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* 状态灯
|
|
44
|
+
*/
|
|
45
|
+
export interface ILightConfig extends IBaseConfig {
|
|
46
|
+
midColor?: string;
|
|
47
|
+
strokeColor?: string;
|
|
48
|
+
strokeWidth?: number;
|
|
49
|
+
isRingShape?: boolean;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* 进度条
|
|
53
|
+
*/
|
|
54
|
+
export interface IProgressConfig extends IBaseConfig {
|
|
55
|
+
progress: number;
|
|
56
|
+
fill?: string;
|
|
57
|
+
textContent?: string;
|
|
58
|
+
textShow?: boolean;
|
|
59
|
+
textPosition?: 'left' | 'center' | 'right';
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* 出入口
|
|
63
|
+
*/
|
|
64
|
+
export interface IEntranceConfig extends IBaseConfig {
|
|
65
|
+
isIn: boolean;
|
|
66
|
+
isOut: boolean;
|
|
67
|
+
}
|
|
68
|
+
export type IComponent = IStationSlotConfig | IResourceConfig | IStationSlotGroupConfig | IProgressConfig | ILightConfig | IEntranceConfig;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { IRowData } from '../base.types';
|
|
2
|
+
import { EnumResourceType } from '../enums';
|
|
3
|
+
/**
|
|
4
|
+
* 资源操作
|
|
5
|
+
* handleType: 'add' | 'remove'
|
|
6
|
+
*/
|
|
7
|
+
export interface IResourceOperating {
|
|
8
|
+
resourceType: EnumResourceType;
|
|
9
|
+
name?: string;
|
|
10
|
+
color?: string;
|
|
11
|
+
index: number;
|
|
12
|
+
handleType: 'add' | 'remove';
|
|
13
|
+
rawData: IRowData;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* 状态灯操作
|
|
17
|
+
*/
|
|
18
|
+
export interface ILightOperating {
|
|
19
|
+
color: string;
|
|
20
|
+
blinking?: boolean;
|
|
21
|
+
rotating?: boolean;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* 进度条操作
|
|
25
|
+
*/
|
|
26
|
+
export interface IProgressOperating {
|
|
27
|
+
percent: number;
|
|
28
|
+
textContent: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* 出入口操作
|
|
32
|
+
*/
|
|
33
|
+
export interface IEntranceOperating {
|
|
34
|
+
isIn: boolean;
|
|
35
|
+
isOut: boolean;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* 子组件运转状态的联合类型
|
|
39
|
+
*/
|
|
40
|
+
export type IComponentOperating = IResourceOperating | ILightOperating | IProgressOperating | IEntranceOperating;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export declare enum EnumStepType {
|
|
2
|
+
UNDO = "Undo",
|
|
3
|
+
REDO = "Redo"
|
|
4
|
+
}
|
|
5
|
+
export declare enum EnumTag {
|
|
6
|
+
TRANSPORT = "\u642C\u8FD0\u8BBE\u5907",
|
|
7
|
+
MACHINE = "\u673A\u5E8A",
|
|
8
|
+
CLEANING = "\u6E05\u6D17\u673A",
|
|
9
|
+
STATION = "\u88C5\u8F7D\u7AD9",
|
|
10
|
+
STORAGE = "\u5E93",
|
|
11
|
+
OTHER = "\u5176\u4ED6"
|
|
12
|
+
}
|
|
13
|
+
export declare enum EnumModel {
|
|
14
|
+
SINGLE_GRIPPER_ROBOT = "SingleGripperRobot",
|
|
15
|
+
DOUBLE_GRIPPER_ROBOT = "DoubleGripperRobot",
|
|
16
|
+
RGV = "Rgv",
|
|
17
|
+
MACHINE_TOOL = "MachineTool",
|
|
18
|
+
CLEANING_MACHINE = "CleaningMachine",
|
|
19
|
+
LOADING_STATION = "LoadingStation",
|
|
20
|
+
PALLET_STORAGE = "PalletStorage",
|
|
21
|
+
TOOL_STORAGE = "ToolStorage",
|
|
22
|
+
BUFFER_DOCK = "BufferDock",
|
|
23
|
+
GROUND_RAIL = "GroundRail",
|
|
24
|
+
FOLLOWING_TUGGER = "FollowingTugger"
|
|
25
|
+
}
|
|
26
|
+
export declare enum EnumComponent {
|
|
27
|
+
STATION_SLOT = "StationSlot",
|
|
28
|
+
RESOURCE = "Resource"
|
|
29
|
+
}
|
|
30
|
+
export declare enum EnumResourceType {
|
|
31
|
+
PALLET = "Pallet",
|
|
32
|
+
TOOL = "Tool"
|
|
33
|
+
}
|
|
34
|
+
export type EnumInteractiveUi = EnumModel | EnumComponent;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,84 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
*
|
|
5
|
-
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
rotation?: number;
|
|
17
|
-
scale?: number;
|
|
18
|
-
cornerRadius?: number;
|
|
19
|
-
fill?: IFill;
|
|
20
|
-
stroke?: IStroke;
|
|
21
|
-
innerShadow?: IShadowEffect | IShadowEffect[];
|
|
22
|
-
shadow?: IShadowEffect | IShadowEffect[];
|
|
23
|
-
visible?: boolean;
|
|
24
|
-
editable?: boolean;
|
|
25
|
-
clickable?: boolean;
|
|
26
|
-
draggable?: boolean;
|
|
27
|
-
data?: IBaseModel;
|
|
28
|
-
children?: IBaseModel[];
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* 图层
|
|
32
|
-
*/
|
|
33
|
-
export interface ILayer extends IBaseModel {
|
|
34
|
-
selected?: boolean;
|
|
35
|
-
tags?: string[];
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* 场景
|
|
39
|
-
*/
|
|
40
|
-
export interface IScene {
|
|
41
|
-
width: number;
|
|
42
|
-
height: number;
|
|
43
|
-
zoomType: 'fit' | number;
|
|
44
|
-
fill?: {
|
|
45
|
-
type: 'solid' | 'linear' | 'radial' | 'image';
|
|
46
|
-
color: string;
|
|
47
|
-
opacity: number;
|
|
48
|
-
stops: {
|
|
49
|
-
offset: number;
|
|
50
|
-
color: string;
|
|
51
|
-
}[];
|
|
52
|
-
url?: string;
|
|
53
|
-
from?: string;
|
|
54
|
-
to?: string;
|
|
55
|
-
};
|
|
56
|
-
stroke?: IStroke;
|
|
57
|
-
texture?: string;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* 方案
|
|
61
|
-
*/
|
|
62
|
-
export interface ICase {
|
|
63
|
-
id: string;
|
|
64
|
-
isActive: boolean;
|
|
65
|
-
title: string;
|
|
66
|
-
layers: ILayer[];
|
|
67
|
-
scene: IScene;
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* 设备菜单
|
|
71
|
-
*/
|
|
72
|
-
export interface IEquipmentsMenu {
|
|
73
|
-
title: string;
|
|
74
|
-
tag: string;
|
|
75
|
-
children: Partial<IBaseModel>[];
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* 容器
|
|
79
|
-
*/
|
|
80
|
-
export interface IContainer {
|
|
81
|
-
appDomId?: string | HTMLElement;
|
|
82
|
-
autoStart?: boolean;
|
|
83
|
-
editable?: boolean;
|
|
84
|
-
}
|
|
1
|
+
import { ILayer } from './models/config.types';
|
|
2
|
+
import { IStationSlotConfig, IResourceConfig } from './components/config.types';
|
|
3
|
+
export * from './enums';
|
|
4
|
+
export * from './app.types';
|
|
5
|
+
export * from './base.types';
|
|
6
|
+
export * from './models/config.types';
|
|
7
|
+
export * from './models/operating.types';
|
|
8
|
+
export * from './components/config.types';
|
|
9
|
+
export * from './components/operating.types';
|
|
10
|
+
export * from './guards';
|
|
11
|
+
/**
|
|
12
|
+
* 可交互设备类型
|
|
13
|
+
* @description 可交互UI类型:设备模型(ILayer)、工位槽(IStationSlot)、资源(IResource)
|
|
14
|
+
*/
|
|
15
|
+
export type InteractiveUi = ILayer | IStationSlotConfig | IResourceConfig;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { EnumModel, EnumTag } from '../enums';
|
|
2
|
+
import { IRowData, IBaseConfig, IEventState } from '../base.types';
|
|
3
|
+
import { IStationSlotGroupConfig } from '../components/config.types';
|
|
4
|
+
/**
|
|
5
|
+
* 设备模型基类
|
|
6
|
+
*/
|
|
7
|
+
export interface IModel extends IBaseConfig, IEventState {
|
|
8
|
+
uuid: string;
|
|
9
|
+
equipmentName: string;
|
|
10
|
+
nameplate?: string;
|
|
11
|
+
model?: string;
|
|
12
|
+
manufacturer?: string;
|
|
13
|
+
group?: string;
|
|
14
|
+
tags?: EnumTag[];
|
|
15
|
+
x: number;
|
|
16
|
+
y: number;
|
|
17
|
+
percentX: number;
|
|
18
|
+
percentY: number;
|
|
19
|
+
zIndex: number;
|
|
20
|
+
rotation: number;
|
|
21
|
+
scale: number;
|
|
22
|
+
rawData: IRowData;
|
|
23
|
+
editable: boolean;
|
|
24
|
+
selected: boolean;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* 机床
|
|
28
|
+
*/
|
|
29
|
+
export interface IMachineToolConfig extends IModel {
|
|
30
|
+
className: EnumModel.MACHINE_TOOL;
|
|
31
|
+
stationSlotGroup?: IStationSlotGroupConfig;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* 单手夹爪机器人
|
|
35
|
+
*/
|
|
36
|
+
export interface ISingleGripperRobotConfig extends IModel {
|
|
37
|
+
className: EnumModel.SINGLE_GRIPPER_ROBOT;
|
|
38
|
+
currentFixture: 'pallet' | 'cutter';
|
|
39
|
+
linkRailId?: string;
|
|
40
|
+
linkTrailerId?: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* 设备层联合类型
|
|
44
|
+
*/
|
|
45
|
+
export type ILayer = IMachineToolConfig | ISingleGripperRobotConfig;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { EnumModel } from '../enums';
|
|
2
|
+
import { IRowData } from '../base.types';
|
|
3
|
+
import { ILightOperating, IProgressOperating, IEntranceOperating, IResourceOperating } from '../components/operating.types';
|
|
4
|
+
/**
|
|
5
|
+
* 设备运转基类
|
|
6
|
+
*/
|
|
7
|
+
export interface IModelOperating {
|
|
8
|
+
id: string;
|
|
9
|
+
className: EnumModel;
|
|
10
|
+
rawData: IRowData;
|
|
11
|
+
resource?: IResourceOperating;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* 机床运转状态
|
|
15
|
+
*/
|
|
16
|
+
export interface IMachineToolOperating extends IModelOperating {
|
|
17
|
+
className: EnumModel.MACHINE_TOOL;
|
|
18
|
+
light?: ILightOperating;
|
|
19
|
+
progress?: IProgressOperating;
|
|
20
|
+
entrance?: IEntranceOperating;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* 单手夹爪机器人运转状态
|
|
24
|
+
*/
|
|
25
|
+
export interface ISingleGripperRobotOperating extends IModelOperating {
|
|
26
|
+
className: EnumModel.SINGLE_GRIPPER_ROBOT;
|
|
27
|
+
light: ILightOperating;
|
|
28
|
+
x: number;
|
|
29
|
+
y: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* 设备层运转状态的联合类型
|
|
33
|
+
*/
|
|
34
|
+
export type ILayerOperating = IMachineToolOperating | ISingleGripperRobotOperating;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { IComponent, IComponentOperating } from '../../types';
|
|
2
|
+
import { UI } from 'leafer';
|
|
3
|
+
export declare abstract class ComponentAbs<T extends IComponent = IComponent> {
|
|
4
|
+
_ui: UI | null;
|
|
5
|
+
private _config;
|
|
6
|
+
private _initialized;
|
|
7
|
+
constructor(options: T);
|
|
8
|
+
get ui(): UI<import('leafer').IUIInputData>;
|
|
9
|
+
get config(): T;
|
|
10
|
+
protected get width_05(): number;
|
|
11
|
+
protected get height_05(): number;
|
|
12
|
+
protected abstract createUi(): UI;
|
|
13
|
+
protected operating(data: IComponentOperating): void;
|
|
14
|
+
init(): this;
|
|
15
|
+
handleOperation: (data: IComponentOperating) => void;
|
|
16
|
+
destroyUI(): void;
|
|
17
|
+
destroy(): void;
|
|
18
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ILayer, IEventHandler, ILayerOperating } from '../../types';
|
|
2
|
+
import { UI } from 'leafer';
|
|
3
|
+
export declare abstract class ModelAbs<T extends ILayer = ILayer> {
|
|
4
|
+
_ui: UI | null;
|
|
5
|
+
private _config;
|
|
6
|
+
private eventHandler;
|
|
7
|
+
private _initialized;
|
|
8
|
+
constructor(options: T);
|
|
9
|
+
get ui(): UI<import('leafer').IUIInputData>;
|
|
10
|
+
get config(): T;
|
|
11
|
+
protected get width_05(): number;
|
|
12
|
+
protected get height_05(): number;
|
|
13
|
+
protected abstract createUi(): UI;
|
|
14
|
+
protected abstract operating(data: ILayerOperating): void;
|
|
15
|
+
init(): this;
|
|
16
|
+
handleOperation: (data: ILayerOperating) => void;
|
|
17
|
+
private shouldHandleInteraction;
|
|
18
|
+
private tapCallback;
|
|
19
|
+
private menuTapCallback;
|
|
20
|
+
private dragCallback;
|
|
21
|
+
setEventHandler(handler: IEventHandler): void;
|
|
22
|
+
destroyUI(): void;
|
|
23
|
+
destroy(): void;
|
|
24
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Box } from 'leafer';
|
|
2
|
+
import { IEntranceConfig, IEntranceOperating } from '../../types';
|
|
3
|
+
import { ComponentAbs } from '../abstract/ComponentAbs';
|
|
4
|
+
export declare class Entrance extends ComponentAbs<IEntranceConfig> {
|
|
5
|
+
constructor(options: IEntranceConfig);
|
|
6
|
+
get ChannelSize(): number;
|
|
7
|
+
protected createUi(): Box;
|
|
8
|
+
renderChannel(className: string, text: string, x: number): {
|
|
9
|
+
className: string;
|
|
10
|
+
tag: string;
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
around: string;
|
|
14
|
+
visible: boolean;
|
|
15
|
+
children: ({
|
|
16
|
+
tag: string;
|
|
17
|
+
points: number[];
|
|
18
|
+
animation: {
|
|
19
|
+
keyframes: ({
|
|
20
|
+
fill: string;
|
|
21
|
+
scaleY?: undefined;
|
|
22
|
+
} | {
|
|
23
|
+
fill: string;
|
|
24
|
+
scaleY: number;
|
|
25
|
+
})[];
|
|
26
|
+
duration: number;
|
|
27
|
+
swing: boolean;
|
|
28
|
+
};
|
|
29
|
+
text?: undefined;
|
|
30
|
+
fill?: undefined;
|
|
31
|
+
fontSize?: undefined;
|
|
32
|
+
fontWeight?: undefined;
|
|
33
|
+
textAlign?: undefined;
|
|
34
|
+
y?: undefined;
|
|
35
|
+
width?: undefined;
|
|
36
|
+
} | {
|
|
37
|
+
tag: string;
|
|
38
|
+
text: string;
|
|
39
|
+
fill: string;
|
|
40
|
+
fontSize: number;
|
|
41
|
+
fontWeight: string;
|
|
42
|
+
textAlign: string;
|
|
43
|
+
y: number;
|
|
44
|
+
width: number;
|
|
45
|
+
points?: undefined;
|
|
46
|
+
animation?: undefined;
|
|
47
|
+
})[];
|
|
48
|
+
};
|
|
49
|
+
operating(val: IEntranceOperating): void;
|
|
50
|
+
}
|
|
@@ -1,23 +1,8 @@
|
|
|
1
|
+
import { ILightConfig, ILightOperating } from '../../types';
|
|
1
2
|
import { Box } from 'leafer';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
midColor?: string;
|
|
8
|
-
strokeColor?: string;
|
|
9
|
-
strokeWidth?: number;
|
|
10
|
-
isRingShape?: boolean;
|
|
3
|
+
import { ComponentAbs } from '../abstract/ComponentAbs';
|
|
4
|
+
export declare class Light extends ComponentAbs<ILightConfig> {
|
|
5
|
+
constructor(options: ILightConfig);
|
|
6
|
+
protected createUi(): Box;
|
|
7
|
+
operating(val: ILightOperating): void;
|
|
11
8
|
}
|
|
12
|
-
interface ILightTurnOnValue {
|
|
13
|
-
color: string;
|
|
14
|
-
rotation?: boolean;
|
|
15
|
-
blink?: boolean;
|
|
16
|
-
}
|
|
17
|
-
export declare class Light {
|
|
18
|
-
readonly ui: Box;
|
|
19
|
-
config: Required<ILightConfig>;
|
|
20
|
-
constructor(options?: ILightConfig);
|
|
21
|
-
setLightTurnOn(val: ILightTurnOnValue): void;
|
|
22
|
-
}
|
|
23
|
-
export {};
|
|
@@ -1,24 +1,8 @@
|
|
|
1
1
|
import { Box } from 'leafer';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
progress?: number;
|
|
9
|
-
textContent?: string;
|
|
10
|
-
textShow?: boolean;
|
|
11
|
-
textPosition?: TextPosition;
|
|
2
|
+
import { IProgressConfig, IProgressOperating } from '../../types';
|
|
3
|
+
import { ComponentAbs } from '../abstract/ComponentAbs';
|
|
4
|
+
export declare class Progress extends ComponentAbs<IProgressConfig> {
|
|
5
|
+
constructor(options: IProgressConfig);
|
|
6
|
+
protected createUi(): Box;
|
|
7
|
+
operating(val: IProgressOperating): void;
|
|
12
8
|
}
|
|
13
|
-
interface IProgressSetValue {
|
|
14
|
-
percent: number;
|
|
15
|
-
textContent: string;
|
|
16
|
-
}
|
|
17
|
-
type TextPosition = 'left' | 'center' | 'right';
|
|
18
|
-
export declare class Progress {
|
|
19
|
-
readonly ui: Box;
|
|
20
|
-
config: Required<IProgressConfig>;
|
|
21
|
-
constructor(options?: IProgressConfig);
|
|
22
|
-
set(val: IProgressSetValue): void;
|
|
23
|
-
}
|
|
24
|
-
export {};
|
|
@@ -1,26 +1,8 @@
|
|
|
1
1
|
import { Box } from 'leafer';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
targetCode?: string;
|
|
9
|
-
targetState?: string;
|
|
10
|
-
color?: string;
|
|
11
|
-
data?: any;
|
|
12
|
-
clickable?: boolean;
|
|
13
|
-
draggable?: boolean;
|
|
14
|
-
showLog?: boolean;
|
|
15
|
-
resourceType?: StationResourceType;
|
|
16
|
-
}
|
|
17
|
-
export declare class Resource {
|
|
18
|
-
readonly ui: Box;
|
|
19
|
-
readonly data: any;
|
|
20
|
-
config: Required<IResourceConfig>;
|
|
21
|
-
constructor(options?: IResourceConfig);
|
|
22
|
-
get autoCornerRadius(): number;
|
|
23
|
-
private setupClickableBehavior;
|
|
24
|
-
private setupLogging;
|
|
25
|
-
destroy(): void;
|
|
2
|
+
import { IResourceConfig } from '../../types';
|
|
3
|
+
import { ComponentAbs } from '../abstract/ComponentAbs';
|
|
4
|
+
export declare class Resource extends ComponentAbs<IResourceConfig> {
|
|
5
|
+
constructor(options: IResourceConfig);
|
|
6
|
+
protected createUi(): Box;
|
|
7
|
+
private get autoCornerRadius();
|
|
26
8
|
}
|
|
@@ -1,36 +1,30 @@
|
|
|
1
|
+
import { IStationSlotConfig, IResourceOperating } from '../../types';
|
|
1
2
|
import { Box } from 'leafer';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
equipmentId?: string;
|
|
5
|
-
stationType?: StationResourceType;
|
|
6
|
-
siteIndex?: number;
|
|
7
|
-
clickable?: boolean;
|
|
8
|
-
}
|
|
9
|
-
export interface IStationSlotConfig {
|
|
10
|
-
x?: number;
|
|
11
|
-
y?: number;
|
|
12
|
-
width?: number;
|
|
13
|
-
height?: number;
|
|
14
|
-
fill?: string;
|
|
15
|
-
showSiteText?: boolean;
|
|
16
|
-
siteIndex?: number;
|
|
17
|
-
rotation?: number;
|
|
18
|
-
data?: IStationData;
|
|
19
|
-
clickable?: boolean;
|
|
20
|
-
showLog?: boolean;
|
|
21
|
-
stationType?: StationResourceType;
|
|
22
|
-
}
|
|
23
|
-
export declare class StationSlot {
|
|
24
|
-
readonly ui: Box;
|
|
25
|
-
private config;
|
|
3
|
+
import { ComponentAbs } from '../abstract/ComponentAbs';
|
|
4
|
+
export declare class StationSlot extends ComponentAbs<IStationSlotConfig> {
|
|
26
5
|
private children;
|
|
27
|
-
constructor(options
|
|
28
|
-
|
|
29
|
-
private
|
|
6
|
+
constructor(options: IStationSlotConfig);
|
|
7
|
+
protected createUi(): Box;
|
|
8
|
+
private get autoFixRotation();
|
|
9
|
+
private get autoCornerRadius();
|
|
30
10
|
private setupClickableArea;
|
|
31
|
-
|
|
32
|
-
|
|
11
|
+
/**
|
|
12
|
+
* 添加托盘
|
|
13
|
+
* @param d
|
|
14
|
+
*/
|
|
15
|
+
addPallet(d: IResourceOperating): void;
|
|
16
|
+
/**
|
|
17
|
+
* 移除托盘
|
|
18
|
+
* @param d
|
|
19
|
+
*/
|
|
20
|
+
removeAllPallet(d?: IResourceOperating): void;
|
|
21
|
+
/**
|
|
22
|
+
* 设置工位是否正在使用
|
|
23
|
+
* @param flag
|
|
24
|
+
*/
|
|
33
25
|
setSiteWorking(flag: boolean): void;
|
|
34
|
-
|
|
26
|
+
/**
|
|
27
|
+
* 销毁
|
|
28
|
+
*/
|
|
29
|
+
destroyUI(): void;
|
|
35
30
|
}
|
|
36
|
-
export {};
|