@jnrs/lingshu-smart 2.2.33 → 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.
- package/AGENTS.md +60 -4
- package/README.md +141 -0
- package/dist/components/debug/DataLogPanel.vue.d.ts +44 -0
- package/dist/components/debug/DebugPanel.vue.d.ts +61 -0
- package/dist/components/debug/PerformanceStats.vue.d.ts +42 -0
- package/dist/components/debug/ScriptRunner/ConfigPanel.vue.d.ts +39 -0
- package/dist/components/debug/ScriptRunner/StepsPanel.vue.d.ts +50 -0
- package/dist/components/debug/ScriptRunner/index.vue.d.ts +16 -0
- package/dist/components/debug/ScriptRunner/script.d.ts +100 -0
- package/dist/components/debug/WsProxy/ConfigEditor.vue.d.ts +18 -0
- package/dist/components/debug/WsProxy/ConnPanel.vue.d.ts +24 -0
- package/dist/components/debug/WsProxy/WsProxyPage.vue.d.ts +14 -0
- package/dist/components/debug/WsProxy/broadcast.d.ts +31 -0
- package/dist/components/debug/WsProxy/index.vue.d.ts +39 -0
- package/dist/components/debug/WsProxy/proxy.d.ts +159 -0
- package/dist/components/editor/ControlBar/CaseTitleEdit.vue.d.ts +100 -100
- package/dist/components/editor/DrawingBoard.vue.d.ts +3 -1
- package/dist/components/editor/OptionCard/Equipment/models/PartConfig.vue.d.ts +2 -0
- package/dist/components/editor/index.vue.d.ts +3 -1
- package/dist/components/index.d.ts +5 -1
- package/dist/components/index.js +31930 -2056
- package/dist/components/preview/index.vue.d.ts +1859 -3
- package/dist/composables/useDebugEasterEgg.d.ts +2 -0
- package/dist/controller/AppController.d.ts +11 -0
- package/dist/controller/EditorController.d.ts +1 -1
- package/dist/index.js +153 -17
- package/dist/lingshu-smart/wsProxyConfig.json +495 -0
- package/dist/locales/en.d.ts +45 -0
- package/dist/locales/i18next.d.ts +102 -1
- package/dist/locales/index.js +94 -4
- package/dist/locales/zhCn.d.ts +45 -0
- package/dist/playground/ViewPageDemo.vue.d.ts +3802 -6
- package/dist/stores/index.d.ts +1 -0
- package/dist/stores/useAppStore.d.ts +5565 -3
- package/dist/stores/useDataStore.d.ts +5565 -3
- package/dist/stores/useDebugStore.d.ts +485 -0
- package/dist/stores/useEditorStore.d.ts +5 -2
- package/dist/types/app.types.d.ts +3 -0
- package/dist/types/components/config.types.d.ts +1 -0
- package/dist/types/components/operating.types.d.ts +1 -0
- package/dist/types/enums.d.ts +1 -0
- package/dist/types/guards.d.ts +1 -0
- package/dist/types/models/config.types.d.ts +9 -1
- package/dist/types/models/operating.types.d.ts +21 -1
- package/dist/ui/abstract/BaseAbs.d.ts +23 -0
- package/dist/ui/abstract/ComponentAbs.d.ts +3 -15
- package/dist/ui/abstract/ModelAbs.d.ts +17 -17
- package/dist/ui/components/Light.d.ts +5 -0
- package/dist/ui/components/StationSlot.d.ts +7 -2
- package/dist/ui/components/StationSlotGroup.d.ts +5 -0
- package/dist/ui/models/CleaningMachine.d.ts +2 -0
- package/dist/ui/models/DoubleJointRobot.d.ts +2 -0
- package/dist/ui/models/LoadingStation.d.ts +2 -0
- package/dist/ui/models/MachineTool.d.ts +2 -0
- package/dist/ui/models/MarkingMachine.d.ts +2 -0
- package/dist/ui/models/ResourceStore.d.ts +7 -0
- package/dist/ui/models/Rgv.d.ts +2 -0
- package/dist/ui/models/ShuttleStation.d.ts +21 -0
- package/dist/ui/models/SingleJointRobot.d.ts +2 -0
- package/dist/utils/debug-flags.d.ts +9 -0
- package/dist/utils/formatOperating.d.ts +7 -0
- package/dist/utils/index.d.ts +19 -15
- package/dist/utils/logger.d.ts +22 -0
- package/dist/utils/performance-stats.d.ts +38 -0
- package/package.json +5 -3
- package/dist/index-g6O0IWAC.js +0 -24879
- package/dist/playground/mockWebSocketData.d.ts +0 -23
- /package/dist/{json → lingshu-smart}/cases.json +0 -0
|
@@ -0,0 +1,485 @@
|
|
|
1
|
+
import { LogLevel } from '../utils/logger';
|
|
2
|
+
import { ScriptStep } from '../components/debug/ScriptRunner/script';
|
|
3
|
+
import { WsProxyConfig } from '../components/debug/WsProxy/proxy';
|
|
4
|
+
/** FPS 模式:自动或固定帧率 */
|
|
5
|
+
export type FpsMode = 'auto' | 30 | 60 | 120;
|
|
6
|
+
/** 语言类型 */
|
|
7
|
+
export type Locale = 'zhCn' | 'en';
|
|
8
|
+
export declare const useDebugStore: import('pinia').StoreDefinition<"@jnrs/lingshu-smart/debug", Pick<{
|
|
9
|
+
logLevel: import('vue').Ref<LogLevel, LogLevel>;
|
|
10
|
+
shadowsEnabled: import('vue').Ref<boolean, boolean>;
|
|
11
|
+
animationsEnabled: import('vue').Ref<boolean, boolean>;
|
|
12
|
+
fpsMode: import('vue').Ref<FpsMode, FpsMode>;
|
|
13
|
+
interactionsDisabled: import('vue').Ref<boolean, boolean>;
|
|
14
|
+
locale: import('vue').Ref<Locale, Locale>;
|
|
15
|
+
theme: import('vue').Ref<"light" | "dark", "light" | "dark">;
|
|
16
|
+
debugPanelVisible: import('vue').Ref<boolean, boolean>;
|
|
17
|
+
scriptSteps: import('vue').Ref<{
|
|
18
|
+
uid: string;
|
|
19
|
+
deviceType: string;
|
|
20
|
+
deviceId: string;
|
|
21
|
+
delay: number;
|
|
22
|
+
enabled: boolean;
|
|
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;
|
|
30
|
+
}[], ScriptStep[] | {
|
|
31
|
+
uid: string;
|
|
32
|
+
deviceType: string;
|
|
33
|
+
deviceId: string;
|
|
34
|
+
delay: number;
|
|
35
|
+
enabled: boolean;
|
|
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;
|
|
43
|
+
}[]>;
|
|
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;
|
|
157
|
+
setLogLevel: (level: LogLevel) => void;
|
|
158
|
+
setShadowsEnabled: (enabled: boolean) => void;
|
|
159
|
+
setAnimationsEnabled: (enabled: boolean) => void;
|
|
160
|
+
setFpsMode: (mode: FpsMode) => void;
|
|
161
|
+
setInteractionsDisabled: (disabled: boolean) => void;
|
|
162
|
+
setLocale: (l: Locale) => void;
|
|
163
|
+
setTheme: (t: "dark" | "light") => void;
|
|
164
|
+
toggleTheme: () => void;
|
|
165
|
+
showDebugPanel: () => void;
|
|
166
|
+
hideDebugPanel: () => void;
|
|
167
|
+
}, "locale" | "logLevel" | "shadowsEnabled" | "animationsEnabled" | "fpsMode" | "interactionsDisabled" | "theme" | "wsProxyManualModified" | "debugPanelVisible" | "scriptSteps" | "wsProxyConfig">, Pick<{
|
|
168
|
+
logLevel: import('vue').Ref<LogLevel, LogLevel>;
|
|
169
|
+
shadowsEnabled: import('vue').Ref<boolean, boolean>;
|
|
170
|
+
animationsEnabled: import('vue').Ref<boolean, boolean>;
|
|
171
|
+
fpsMode: import('vue').Ref<FpsMode, FpsMode>;
|
|
172
|
+
interactionsDisabled: import('vue').Ref<boolean, boolean>;
|
|
173
|
+
locale: import('vue').Ref<Locale, Locale>;
|
|
174
|
+
theme: import('vue').Ref<"light" | "dark", "light" | "dark">;
|
|
175
|
+
debugPanelVisible: import('vue').Ref<boolean, boolean>;
|
|
176
|
+
scriptSteps: import('vue').Ref<{
|
|
177
|
+
uid: string;
|
|
178
|
+
deviceType: string;
|
|
179
|
+
deviceId: string;
|
|
180
|
+
delay: number;
|
|
181
|
+
enabled: boolean;
|
|
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;
|
|
189
|
+
}[], ScriptStep[] | {
|
|
190
|
+
uid: string;
|
|
191
|
+
deviceType: string;
|
|
192
|
+
deviceId: string;
|
|
193
|
+
delay: number;
|
|
194
|
+
enabled: boolean;
|
|
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;
|
|
202
|
+
}[]>;
|
|
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;
|
|
316
|
+
setLogLevel: (level: LogLevel) => void;
|
|
317
|
+
setShadowsEnabled: (enabled: boolean) => void;
|
|
318
|
+
setAnimationsEnabled: (enabled: boolean) => void;
|
|
319
|
+
setFpsMode: (mode: FpsMode) => void;
|
|
320
|
+
setInteractionsDisabled: (disabled: boolean) => void;
|
|
321
|
+
setLocale: (l: Locale) => void;
|
|
322
|
+
setTheme: (t: "dark" | "light") => void;
|
|
323
|
+
toggleTheme: () => void;
|
|
324
|
+
showDebugPanel: () => void;
|
|
325
|
+
hideDebugPanel: () => void;
|
|
326
|
+
}, never>, Pick<{
|
|
327
|
+
logLevel: import('vue').Ref<LogLevel, LogLevel>;
|
|
328
|
+
shadowsEnabled: import('vue').Ref<boolean, boolean>;
|
|
329
|
+
animationsEnabled: import('vue').Ref<boolean, boolean>;
|
|
330
|
+
fpsMode: import('vue').Ref<FpsMode, FpsMode>;
|
|
331
|
+
interactionsDisabled: import('vue').Ref<boolean, boolean>;
|
|
332
|
+
locale: import('vue').Ref<Locale, Locale>;
|
|
333
|
+
theme: import('vue').Ref<"light" | "dark", "light" | "dark">;
|
|
334
|
+
debugPanelVisible: import('vue').Ref<boolean, boolean>;
|
|
335
|
+
scriptSteps: import('vue').Ref<{
|
|
336
|
+
uid: string;
|
|
337
|
+
deviceType: string;
|
|
338
|
+
deviceId: string;
|
|
339
|
+
delay: number;
|
|
340
|
+
enabled: boolean;
|
|
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;
|
|
348
|
+
}[], ScriptStep[] | {
|
|
349
|
+
uid: string;
|
|
350
|
+
deviceType: string;
|
|
351
|
+
deviceId: string;
|
|
352
|
+
delay: number;
|
|
353
|
+
enabled: boolean;
|
|
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;
|
|
361
|
+
}[]>;
|
|
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;
|
|
475
|
+
setLogLevel: (level: LogLevel) => void;
|
|
476
|
+
setShadowsEnabled: (enabled: boolean) => void;
|
|
477
|
+
setAnimationsEnabled: (enabled: boolean) => void;
|
|
478
|
+
setFpsMode: (mode: FpsMode) => void;
|
|
479
|
+
setInteractionsDisabled: (disabled: boolean) => void;
|
|
480
|
+
setLocale: (l: Locale) => void;
|
|
481
|
+
setTheme: (t: "dark" | "light") => void;
|
|
482
|
+
toggleTheme: () => void;
|
|
483
|
+
showDebugPanel: () => void;
|
|
484
|
+
hideDebugPanel: () => void;
|
|
485
|
+
}, "setScriptSteps" | "setWsProxyConfig" | "setWsProxyManualModified" | "setLogLevel" | "setShadowsEnabled" | "setAnimationsEnabled" | "setFpsMode" | "setInteractionsDisabled" | "setLocale" | "setTheme" | "toggleTheme" | "showDebugPanel" | "hideDebugPanel">>;
|
|
@@ -10,6 +10,7 @@ export declare const useEditorStore: import('pinia').StoreDefinition<"@jnrs/ling
|
|
|
10
10
|
initEditor: () => void;
|
|
11
11
|
updateScene: import('@jnrs/shared/lodash').DebouncedFunc<() => void>;
|
|
12
12
|
addLayer: (layer: ILayer) => void;
|
|
13
|
+
addLayerAtPosition: (layer: ILayer, worldX: number, worldY: number) => void;
|
|
13
14
|
selectLayer: (uuid?: string) => void;
|
|
14
15
|
updateLayer: (layer: ILayer) => void;
|
|
15
16
|
renderLayers: import('@jnrs/shared/lodash').DebouncedFunc<() => void>;
|
|
@@ -24,10 +25,11 @@ export declare const useEditorStore: import('pinia').StoreDefinition<"@jnrs/ling
|
|
|
24
25
|
initEditor: () => void;
|
|
25
26
|
updateScene: import('@jnrs/shared/lodash').DebouncedFunc<() => void>;
|
|
26
27
|
addLayer: (layer: ILayer) => void;
|
|
28
|
+
addLayerAtPosition: (layer: ILayer, worldX: number, worldY: number) => void;
|
|
27
29
|
selectLayer: (uuid?: string) => void;
|
|
28
30
|
updateLayer: (layer: ILayer) => void;
|
|
29
31
|
renderLayers: import('@jnrs/shared/lodash').DebouncedFunc<() => void>;
|
|
30
|
-
}, "
|
|
32
|
+
}, "scene" | "layers" | "currentCase" | "currentLayer">, Pick<{
|
|
31
33
|
currentCase: import('vue').ComputedRef<ICase | null>;
|
|
32
34
|
scene: import('vue').ComputedRef<IScene | null>;
|
|
33
35
|
layers: import('vue').ComputedRef<ILayer[]>;
|
|
@@ -38,7 +40,8 @@ export declare const useEditorStore: import('pinia').StoreDefinition<"@jnrs/ling
|
|
|
38
40
|
initEditor: () => void;
|
|
39
41
|
updateScene: import('@jnrs/shared/lodash').DebouncedFunc<() => void>;
|
|
40
42
|
addLayer: (layer: ILayer) => void;
|
|
43
|
+
addLayerAtPosition: (layer: ILayer, worldX: number, worldY: number) => void;
|
|
41
44
|
selectLayer: (uuid?: string) => void;
|
|
42
45
|
updateLayer: (layer: ILayer) => void;
|
|
43
46
|
renderLayers: import('@jnrs/shared/lodash').DebouncedFunc<() => void>;
|
|
44
|
-
}, "initContainer" | "resizeContainer" | "destroyContainer" | "initEditor" | "updateScene" | "addLayer" | "selectLayer" | "updateLayer" | "renderLayers">>;
|
|
47
|
+
}, "initContainer" | "resizeContainer" | "destroyContainer" | "initEditor" | "updateScene" | "addLayer" | "addLayerAtPosition" | "selectLayer" | "updateLayer" | "renderLayers">>;
|
|
@@ -8,6 +8,7 @@ export interface IScene {
|
|
|
8
8
|
runtime_width?: number;
|
|
9
9
|
runtime_height?: number;
|
|
10
10
|
zoomType: 'fit' | number;
|
|
11
|
+
fillVisible?: boolean;
|
|
11
12
|
fill?: {
|
|
12
13
|
type: 'solid' | 'linear' | 'radial' | 'image';
|
|
13
14
|
color: string;
|
|
@@ -21,6 +22,8 @@ export interface IScene {
|
|
|
21
22
|
to?: string;
|
|
22
23
|
};
|
|
23
24
|
texture?: string;
|
|
25
|
+
textureSize?: number;
|
|
26
|
+
textureOpacity?: number;
|
|
24
27
|
}
|
|
25
28
|
/**
|
|
26
29
|
* 方案
|
|
@@ -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;
|
package/dist/types/enums.d.ts
CHANGED
package/dist/types/guards.d.ts
CHANGED
|
@@ -9,3 +9,4 @@ export declare function isStationSlotGroupBoth(layer: ILayer | null): layer is E
|
|
|
9
9
|
}>;
|
|
10
10
|
export declare function hasFixtureChange(layer: ILayer | null): layer is import('./index').ISingleJointRobotConfig | import('./index').IDoubleJointRobotConfig;
|
|
11
11
|
export declare function isRail(layer: ILayer | null): layer is import('./index').IRailConfig;
|
|
12
|
+
export declare function isShuttleStation(layer: ILayer | null): layer is import('./index').IShuttleStationConfig;
|
|
@@ -8,6 +8,8 @@ export interface IModel extends IBaseConfig, IEventState {
|
|
|
8
8
|
uuid: string;
|
|
9
9
|
equipmentName: string;
|
|
10
10
|
nameplate?: string;
|
|
11
|
+
lightEnabled?: boolean;
|
|
12
|
+
nameplateEnabled?: boolean;
|
|
11
13
|
model?: string;
|
|
12
14
|
manufacturer?: string;
|
|
13
15
|
group?: string;
|
|
@@ -41,6 +43,12 @@ export interface ILoadingStationConfig extends IModel {
|
|
|
41
43
|
stationContainerDirection?: 'horizontal' | 'vertical';
|
|
42
44
|
stationSlotGroup?: IStationSlotGroupConfig;
|
|
43
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* 接驳站
|
|
48
|
+
*/
|
|
49
|
+
export interface IShuttleStationConfig extends IModel {
|
|
50
|
+
className: EnumModel.SHUTTLE_STATION;
|
|
51
|
+
}
|
|
44
52
|
/**
|
|
45
53
|
* 打标机
|
|
46
54
|
*/
|
|
@@ -109,4 +117,4 @@ export interface IResourceStoreConfig extends IModel {
|
|
|
109
117
|
/**
|
|
110
118
|
* 设备层联合类型
|
|
111
119
|
*/
|
|
112
|
-
export type ILayer = IMachineToolConfig | ILoadingStationConfig | IMarkingMachineConfig | ICleaningMachineConfig | ISingleJointRobotConfig | IDoubleJointRobotConfig | IRGVConfig | IRailConfig | IResourceStoreConfig;
|
|
120
|
+
export type ILayer = IMachineToolConfig | ILoadingStationConfig | IShuttleStationConfig | IMarkingMachineConfig | ICleaningMachineConfig | ISingleJointRobotConfig | IDoubleJointRobotConfig | IRGVConfig | IRailConfig | IResourceStoreConfig;
|
|
@@ -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
|
*/
|
|
@@ -30,6 +43,13 @@ export interface ILoadingStationOperating extends IModelOperating {
|
|
|
30
43
|
entrance?: IEntranceOperating;
|
|
31
44
|
stationRotatable?: boolean;
|
|
32
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* 接驳站运转状态
|
|
48
|
+
*/
|
|
49
|
+
export interface IShuttleStationOperating extends IModelOperating {
|
|
50
|
+
className: EnumModel.SHUTTLE_STATION;
|
|
51
|
+
light?: Omit<ILightOperating, 'rotating'>;
|
|
52
|
+
}
|
|
33
53
|
/**
|
|
34
54
|
* 打标机站点状态
|
|
35
55
|
*/
|
|
@@ -110,4 +130,4 @@ export interface IResourceStoreOperating extends IModelOperating {
|
|
|
110
130
|
/**
|
|
111
131
|
* 设备层运转状态的联合类型
|
|
112
132
|
*/
|
|
113
|
-
export type ILayerOperating = IMachineToolOperating | ILoadingStationOperating | IMarkingMachineOperating | ICleaningMachineOperating | ISingleJointRobotOperating | IDoubleJointRobotOperating | IRGVOperating | IRailOperating | IResourceStoreOperating;
|
|
133
|
+
export type ILayerOperating = IMachineToolOperating | ILoadingStationOperating | IShuttleStationOperating | IMarkingMachineOperating | ICleaningMachineOperating | ISingleJointRobotOperating | IDoubleJointRobotOperating | IRGVOperating | IRailOperating | IResourceStoreOperating | IGlobalResourceOperating;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { UI } from 'leafer';
|
|
2
|
+
import { Logger } from '../../utils/logger';
|
|
3
|
+
export declare abstract class BaseAbs<T extends Record<string, any> = Record<string, any>> {
|
|
4
|
+
_ui: UI | null;
|
|
5
|
+
private _config;
|
|
6
|
+
private _initialized;
|
|
7
|
+
/** 实例级 logger,tag 为 className,用于 operating 日志输出 */
|
|
8
|
+
protected logger: Logger;
|
|
9
|
+
constructor(options: T);
|
|
10
|
+
get ui(): UI;
|
|
11
|
+
get config(): T;
|
|
12
|
+
protected get width_05(): number;
|
|
13
|
+
protected get width_02(): number;
|
|
14
|
+
protected get width_08(): number;
|
|
15
|
+
protected get height_05(): number;
|
|
16
|
+
protected get height_02(): number;
|
|
17
|
+
protected get height_08(): number;
|
|
18
|
+
protected abstract createUi(): UI;
|
|
19
|
+
init(): this;
|
|
20
|
+
destroyUI(): void;
|
|
21
|
+
destroy(): void;
|
|
22
|
+
get initialized(): boolean;
|
|
23
|
+
}
|