@jnrs/lingshu-smart 2.2.8 → 2.2.9
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/dist/App.vue.d.ts +1 -2
- package/dist/assets/data/editor_default_setting.d.ts +1 -8
- package/dist/assets/data/editor_preset_menu.d.ts +1 -8
- package/dist/components/editor/ControlBar/CaseManger.vue.d.ts +15 -3
- package/dist/components/editor/ControlBar/CaseTitleEdit.vue.d.ts +411 -2
- package/dist/components/editor/ControlBar/ExportImportDialog.vue.d.ts +2 -3
- package/dist/components/editor/ControlBar/MainButton.vue.d.ts +2 -3
- package/dist/components/editor/ControlBar/StepButton.vue.d.ts +1 -2
- package/dist/components/editor/ControlBar/StepRecordVisualizer.vue.d.ts +1 -2
- package/dist/components/editor/DrawingBoard.vue.d.ts +1 -2
- package/dist/components/editor/MenuCard/Equipments.vue.d.ts +1 -2
- package/dist/components/editor/MenuCard/Layers.vue.d.ts +1 -2
- package/dist/components/editor/MenuCard/index.vue.d.ts +1 -2
- package/dist/components/editor/OptionCard/Equipment/Base.vue.d.ts +1 -2
- package/dist/components/editor/OptionCard/Equipment/DataSets.vue.d.ts +1 -2
- package/dist/components/editor/OptionCard/Equipment/Interaction.vue.d.ts +1 -2
- package/dist/components/editor/OptionCard/Equipment/Position.vue.d.ts +1 -2
- package/dist/components/editor/OptionCard/Equipment/StationSlotGroup.vue.d.ts +1 -2
- package/dist/components/editor/OptionCard/Equipment/index.vue.d.ts +1 -2
- package/dist/components/editor/OptionCard/Equipment/models/MachineTool.vue.d.ts +1 -2
- package/dist/components/editor/OptionCard/Equipment/models/Rail.vue.d.ts +1 -2
- package/dist/components/editor/OptionCard/Equipment/models/SingleJointRobot.vue.d.ts +2 -0
- package/dist/components/editor/OptionCard/Scene/Background.vue.d.ts +1 -2
- package/dist/components/editor/OptionCard/Scene/index.vue.d.ts +1 -2
- package/dist/components/editor/OptionCard/index.vue.d.ts +1 -2
- package/dist/components/editor/index.vue.d.ts +13 -4
- package/dist/components/index.d.ts +2 -2
- package/dist/components/index.js +27281 -4
- package/dist/components/preview/index.vue.d.ts +5 -6
- package/dist/composables/useStepRecord.d.ts +4 -12
- package/dist/constants/options.d.ts +1 -8
- package/dist/controller/AppController.d.ts +3 -10
- package/dist/controller/EditorController.d.ts +2 -9
- package/dist/index.js +1 -1
- package/dist/json/cases.json +577 -20
- package/dist/locales/i18next.d.ts +1 -1
- package/dist/locales/index.d.ts +2 -2
- package/dist/locales/index.js +13 -3
- package/dist/main.d.ts +0 -3
- package/dist/playground/EditPageDemo.vue.d.ts +1 -2
- package/dist/playground/ViewPageDemo.vue.d.ts +27 -2
- package/dist/stores/useAppStore.d.ts +5 -12
- package/dist/stores/useDataStore.d.ts +11 -18
- package/dist/stores/useEditorStore.d.ts +20 -27
- package/dist/types/app.types.d.ts +1 -1
- package/dist/types/base.types.d.ts +1 -1
- package/dist/types/components/config.types.d.ts +1 -1
- package/dist/types/components/operating.types.d.ts +1 -1
- package/dist/types/enums.d.ts +1 -1
- package/dist/types/guards.d.ts +5 -12
- package/dist/types/index.d.ts +2 -2
- package/dist/types/models/config.types.d.ts +49 -47
- package/dist/types/models/operating.types.d.ts +53 -53
- package/dist/ui/abstract/ComponentAbs.d.ts +2 -9
- package/dist/ui/abstract/ModelAbs.d.ts +2 -10
- package/dist/ui/components/Entrance.d.ts +1 -8
- package/dist/ui/components/Light.d.ts +1 -8
- package/dist/ui/components/Progress.d.ts +1 -8
- package/dist/ui/components/Resource.d.ts +1 -8
- package/dist/ui/components/StationSlot.d.ts +1 -23
- package/dist/ui/components/StationSlotGroup.d.ts +1 -8
- package/dist/ui/factories/createGlass.d.ts +0 -6
- package/dist/ui/factories/createModel.d.ts +2 -9
- package/dist/ui/factories/createShadow.d.ts +1 -9
- package/dist/ui/factories/createText.d.ts +0 -7
- package/dist/ui/models/CleaningMachine.d.ts +1 -1
- package/dist/ui/models/DoubleJointRobot.d.ts +19 -20
- package/dist/ui/models/LoadingStation.d.ts +1 -1
- package/dist/ui/models/MachineTool.d.ts +1 -1
- package/dist/ui/models/MarkingMachine.d.ts +1 -1
- package/dist/ui/models/Rail.d.ts +1 -1
- package/dist/ui/models/ResourceStore.d.ts +1 -1
- package/dist/ui/models/SingleJointRobot.d.ts +3 -3
- package/dist/ui/shapes/NamePlate.d.ts +0 -7
- package/dist/ui/shapes/ScrewHole.d.ts +0 -7
- package/dist/ui/shapes/Texture.d.ts +1 -8
- package/dist/ui/utils/attr.d.ts +2 -9
- package/dist/utils/type-guards.d.ts +1 -1
- package/package.json +3 -3
- package/dist/App.vue.js +0 -30
- package/dist/assets/data/editor_default.d.ts +0 -16
- package/dist/assets/data/editor_default.js +0 -59
- package/dist/assets/data/editor_default_setting.js +0 -58
- package/dist/assets/data/editor_preset.d.ts +0 -9
- package/dist/assets/data/editor_preset.js +0 -51
- package/dist/assets/data/editor_preset_menu.js +0 -290
- package/dist/components/editor/ControlBar/CaseManger.vue.js +0 -465
- package/dist/components/editor/ControlBar/CaseTitleEdit.vue.js +0 -108
- package/dist/components/editor/ControlBar/ExportImportDialog.vue.js +0 -280
- package/dist/components/editor/ControlBar/MainButton.vue.js +0 -183
- package/dist/components/editor/ControlBar/StepButton.vue.js +0 -147
- package/dist/components/editor/ControlBar/StepRecordVisualizer.vue.js +0 -98
- package/dist/components/editor/DrawingBoard.vue.js +0 -31
- package/dist/components/editor/MenuCard/Equipments.vue.js +0 -129
- package/dist/components/editor/MenuCard/Layers.vue.js +0 -201
- package/dist/components/editor/MenuCard/index.vue.js +0 -84
- package/dist/components/editor/OptionCard/Equipment/Base.vue.js +0 -96
- package/dist/components/editor/OptionCard/Equipment/Binds.vue.d.ts +0 -3
- package/dist/components/editor/OptionCard/Equipment/Binds.vue.js +0 -443
- package/dist/components/editor/OptionCard/Equipment/Bot.vue.d.ts +0 -3
- package/dist/components/editor/OptionCard/Equipment/Bot.vue.js +0 -81
- package/dist/components/editor/OptionCard/Equipment/DataSets.vue.js +0 -304
- package/dist/components/editor/OptionCard/Equipment/DockStore.vue.d.ts +0 -3
- package/dist/components/editor/OptionCard/Equipment/DockStore.vue.js +0 -597
- package/dist/components/editor/OptionCard/Equipment/Interaction.vue.js +0 -287
- package/dist/components/editor/OptionCard/Equipment/Position.backup.vue.d.ts +0 -3
- package/dist/components/editor/OptionCard/Equipment/Position.backup.vue.js +0 -440
- package/dist/components/editor/OptionCard/Equipment/Position.vue.js +0 -436
- package/dist/components/editor/OptionCard/Equipment/StationSlotGroup.vue.js +0 -1131
- package/dist/components/editor/OptionCard/Equipment/Store.vue.d.ts +0 -3
- package/dist/components/editor/OptionCard/Equipment/Store.vue.js +0 -453
- package/dist/components/editor/OptionCard/Equipment/Trailer.vue.d.ts +0 -3
- package/dist/components/editor/OptionCard/Equipment/Trailer.vue.js +0 -1109
- package/dist/components/editor/OptionCard/Equipment/index.vue.js +0 -100
- package/dist/components/editor/OptionCard/Equipment/models/MachineTool.vue.js +0 -99
- package/dist/components/editor/OptionCard/Equipment/models/Rail.vue.js +0 -225
- package/dist/components/editor/OptionCard/Equipment/models/SingleGripperRobot.vue.d.ts +0 -3
- package/dist/components/editor/OptionCard/Equipment/models/SingleGripperRobot.vue.js +0 -99
- package/dist/components/editor/OptionCard/Scene/Background.vue.js +0 -543
- package/dist/components/editor/OptionCard/Scene/index.vue.js +0 -200
- package/dist/components/editor/OptionCard/index.vue.js +0 -73
- package/dist/components/editor/index.vue.js +0 -156
- package/dist/components/preview/index.vue.js +0 -104
- package/dist/composables/useStepRecord.js +0 -135
- package/dist/constants/options.js +0 -55
- package/dist/controller/AppController.js +0 -168
- package/dist/controller/EditorController.js +0 -173
- package/dist/locales/en.js +0 -5
- package/dist/locales/i18next.js +0 -6
- package/dist/locales/zhCn.js +0 -5
- package/dist/main.js +0 -13
- package/dist/playground/EditPageDemo.vue.js +0 -57
- package/dist/playground/ViewPageDemo.vue.js +0 -277
- package/dist/stores/index.js +0 -3
- package/dist/stores/useAppStore.js +0 -78
- package/dist/stores/useDataStore.js +0 -116
- package/dist/stores/useEditorStore.js +0 -263
- package/dist/types/app.types.js +0 -2
- package/dist/types/base.types.js +0 -1
- package/dist/types/components/config.types.js +0 -1
- package/dist/types/components/operating.types.js +0 -1
- package/dist/types/enums.js +0 -46
- package/dist/types/guards.js +0 -28
- package/dist/types/index.js +0 -8
- package/dist/types/models/config.types.js +0 -1
- package/dist/types/models/operating.types.js +0 -1
- package/dist/ui/abstract/ComponentAbs.js +0 -64
- package/dist/ui/abstract/ModelAbs.js +0 -119
- package/dist/ui/components/Entrance.js +0 -83
- package/dist/ui/components/Light.js +0 -167
- package/dist/ui/components/Progress.js +0 -84
- package/dist/ui/components/Resource.js +0 -70
- package/dist/ui/components/StationSlot.js +0 -207
- package/dist/ui/components/StationSlotGroup.js +0 -110
- package/dist/ui/factories/createGlass.js +0 -51
- package/dist/ui/factories/createModel.js +0 -35
- package/dist/ui/factories/createShadow.js +0 -52
- package/dist/ui/factories/createText.js +0 -46
- package/dist/ui/models/CleaningMachine.js +0 -141
- package/dist/ui/models/DoubleJointRobot.js +0 -545
- package/dist/ui/models/LoadingStation.js +0 -167
- package/dist/ui/models/MachineTool.js +0 -184
- package/dist/ui/models/MarkingMachine.js +0 -148
- package/dist/ui/models/Rail.js +0 -117
- package/dist/ui/models/ResourceStore.js +0 -101
- package/dist/ui/models/SingleBot.d.ts +0 -20
- package/dist/ui/models/SingleBot.js +0 -202
- package/dist/ui/models/SingleGripperRobot.d.ts +0 -19
- package/dist/ui/models/SingleGripperRobot.js +0 -272
- package/dist/ui/models/SingleJointRobot.js +0 -346
- package/dist/ui/shapes/NamePlate.js +0 -85
- package/dist/ui/shapes/ScrewHole.js +0 -57
- package/dist/ui/shapes/Texture.js +0 -51
- package/dist/ui/utils/attr.js +0 -50
- package/dist/utils/index.js +0 -92
- package/dist/utils/type-guards.js +0 -105
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @Author : TanRui
|
|
3
|
-
* @WeChat : Tan578853789
|
|
4
|
-
* @File : Progress.ts
|
|
5
|
-
* @Date : 2026/04/09 (updated to match Resource style)
|
|
6
|
-
* @Desc. : 进度条组件,继承自 ComponentAbs,用于统一 UI 管理
|
|
7
|
-
*/
|
|
8
1
|
import { Box } from 'leafer';
|
|
9
|
-
import {
|
|
2
|
+
import { IProgressConfig, IProgressOperating } from '../../types';
|
|
10
3
|
import { ComponentAbs } from '../abstract/ComponentAbs';
|
|
11
4
|
export declare class Progress extends ComponentAbs<IProgressConfig> {
|
|
12
5
|
constructor(options: IProgressConfig);
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @Author : TanRui
|
|
3
|
-
* @WeChat : Tan578853789
|
|
4
|
-
* @File : Resource.ts
|
|
5
|
-
* @Date : 2026/02/12
|
|
6
|
-
* @Desc. : 资源类(托盘、刀具等),用于放置在 StationSlot 内
|
|
7
|
-
*/
|
|
8
1
|
import { Box } from 'leafer';
|
|
9
|
-
import {
|
|
2
|
+
import { IResourceConfig } from '../../types';
|
|
10
3
|
import { ComponentAbs } from '../abstract/ComponentAbs';
|
|
11
4
|
export declare class Resource extends ComponentAbs<IResourceConfig> {
|
|
12
5
|
constructor(options: IResourceConfig);
|
|
@@ -1,26 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* @Author : TanRui
|
|
3
|
-
* @WeChat : Tan578853789
|
|
4
|
-
* @File : StationSlot.ts
|
|
5
|
-
* @Date : 2026/02/12
|
|
6
|
-
*
|
|
7
|
-
* @classdesc
|
|
8
|
-
* 工位槽位(Station Slot)是工位中用于承载资源(Resource)的容器。
|
|
9
|
-
* 它负责管理资源的生命周期,包括添加、移除及状态同步,确保资源与工位之间的强关联和统一控制。
|
|
10
|
-
*
|
|
11
|
-
* @design
|
|
12
|
-
* 当前采用 **方案一:真实添加/移除资源对象**。
|
|
13
|
-
* - 资源在插入时被实际加入场景图(或容器),移除时从场景中销毁或解绑。
|
|
14
|
-
* - 优点:逻辑直观,内存管理明确。
|
|
15
|
-
* - 缺点:频繁创建/销毁可能影响性能(尤其在高频率操作场景)。
|
|
16
|
-
*
|
|
17
|
-
* @future
|
|
18
|
-
* 后续可根据实际性能表现,切换至 **方案二:通过可见性(如 `visible` 属性)模拟添加/移除**。
|
|
19
|
-
* - 资源始终存在于场景中,仅通过状态控制显示/隐藏。
|
|
20
|
-
* - 适用于需要频繁切换但资源复用率高的场景。
|
|
21
|
-
* - 基于方案一、二再添加个对象池机制的混合模式,即优先去资源池读取。
|
|
22
|
-
*/
|
|
23
|
-
import { type IStationSlotConfig, type IResourceOperating } from '@/types';
|
|
1
|
+
import { IStationSlotConfig, IResourceOperating } from '../../types';
|
|
24
2
|
import { Box } from 'leafer';
|
|
25
3
|
import { ComponentAbs } from '../abstract/ComponentAbs';
|
|
26
4
|
export declare class StationSlot extends ComponentAbs<IStationSlotConfig> {
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @Author : TanRui
|
|
3
|
-
* @WeChat : Tan578853789
|
|
4
|
-
* @File : StationSlotGroup.ts
|
|
5
|
-
* @Date : 2026/04/08
|
|
6
|
-
* @Desc. : 工位槽位组容器(类封装,支持动态操作)
|
|
7
|
-
*/
|
|
8
1
|
import { Flow } from 'leafer';
|
|
9
|
-
import
|
|
2
|
+
import { IResourceOperating, IStationSlotGroupConfig } from '../../types';
|
|
10
3
|
import { ComponentAbs } from '../abstract/ComponentAbs';
|
|
11
4
|
/**
|
|
12
5
|
* 工位槽位组容器
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* @WeChat : Tan578853789
|
|
4
|
-
* @File : createModel.ts
|
|
5
|
-
* @Date : 2026/02/13
|
|
6
|
-
* @Desc. : 设备模型工厂函数
|
|
7
|
-
*/
|
|
8
|
-
import { type ILayer } from '@/types';
|
|
9
|
-
import type { ModelAbs } from '../abstract/ModelAbs';
|
|
1
|
+
import { ILayer } from '../../types';
|
|
2
|
+
import { ModelAbs } from '../abstract/ModelAbs';
|
|
10
3
|
export declare function createModel(config: ILayer): ModelAbs;
|
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* @Author : TanRui
|
|
3
|
-
* @WeChat : Tan578853789
|
|
4
|
-
* @File : createShadow.ts
|
|
5
|
-
* @Date : 2026/04/02
|
|
6
|
-
* @Desc. : 创建阴影效果的 Canvas 实例(leaferJs 的原生阴影性能差,官方推荐使用 canvas 实现阴影效果)
|
|
7
|
-
* @Intro. : 该工厂函数用于创建一个带有阴影效果的 Canvas 实例,适用于设备模型的阴影渲染。通过配置阴影的大小、模糊程度和颜色,实现逼真的阴影效果,增强设备模型的视觉层次感和立体感。
|
|
8
|
-
*/
|
|
9
|
-
import { Canvas, type IShadowEffect } from 'leafer';
|
|
1
|
+
import { Canvas, IShadowEffect } from 'leafer';
|
|
10
2
|
export interface IShadow {
|
|
11
3
|
width: number;
|
|
12
4
|
height: number;
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
+
import { IDoubleJointRobotConfig, IDoubleJointRobotOperating } from '../../types';
|
|
2
|
+
import { Box } from 'leafer';
|
|
3
|
+
import { ModelAbs } from '../abstract/ModelAbs';
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
5
|
+
* 双关节机器人(DoubleJointRobot)
|
|
3
6
|
*/
|
|
4
|
-
export declare class DoubleJointRobot extends
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
removeAllCutter(d: any): void;
|
|
20
|
-
forkAnimationIn(): void;
|
|
21
|
-
forkAnimationOut(): void;
|
|
22
|
-
run(d: any): void;
|
|
7
|
+
export declare class DoubleJointRobot extends ModelAbs<IDoubleJointRobotConfig> {
|
|
8
|
+
private static readonly DEFAULT_WIDTH;
|
|
9
|
+
private static readonly DEFAULT_HEIGHT;
|
|
10
|
+
private static readonly DEFAULT_LIGHT_COLOR;
|
|
11
|
+
private light1;
|
|
12
|
+
private light2;
|
|
13
|
+
private defaultLightColor;
|
|
14
|
+
private palletStationSlot;
|
|
15
|
+
private cutterStationSlot;
|
|
16
|
+
protected createUi(): Box;
|
|
17
|
+
protected operating(data: IDoubleJointRobotOperating): void;
|
|
18
|
+
private handleRotateR1;
|
|
19
|
+
private handleRotateR2;
|
|
20
|
+
private moveX;
|
|
21
|
+
private switchFork;
|
|
23
22
|
}
|
package/dist/ui/models/Rail.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ISingleJointRobotConfig, ISingleJointRobotOperating } from '../../types';
|
|
2
2
|
import { Box } from 'leafer';
|
|
3
3
|
import { ModelAbs } from '../abstract/ModelAbs';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* 单关节机器人
|
|
6
6
|
* 基于 ModelAbs 重构,保留 Bot.js 核心运行行为:状态灯、沿 X 移动、手臂旋转、夹具切换。
|
|
7
7
|
*/
|
|
8
8
|
export declare class SingleJointRobot extends ModelAbs<ISingleJointRobotConfig> {
|
|
@@ -15,7 +15,7 @@ export declare class SingleJointRobot extends ModelAbs<ISingleJointRobotConfig>
|
|
|
15
15
|
private palletStationSlot;
|
|
16
16
|
private cutterStationSlot;
|
|
17
17
|
protected createUi(): Box;
|
|
18
|
-
protected operating(data:
|
|
18
|
+
protected operating(data: ISingleJointRobotOperating): void;
|
|
19
19
|
private handleRotate;
|
|
20
20
|
private moveX;
|
|
21
21
|
private switchFork;
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* @Author : TanRui
|
|
3
|
-
* @WeChat : Tan578853789
|
|
4
|
-
* @File : Texture.ts
|
|
5
|
-
* @Date : 2025/05/30
|
|
6
|
-
* @Desc. : 纹理
|
|
7
|
-
*/
|
|
8
|
-
import { Box, type IFill } from 'leafer';
|
|
1
|
+
import { Box, IFill } from 'leafer';
|
|
9
2
|
export type TextureEffect = 'LightGrid' | 'DarkGrid' | 'MatrixGrid' | 'LightDot' | 'DarkDot' | 'WoodFloor' | 'VerticalBar';
|
|
10
3
|
export interface ITextureOptions {
|
|
11
4
|
className?: string;
|
package/dist/ui/utils/attr.d.ts
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* @WeChat : Tan578853789
|
|
4
|
-
* @File : attr.ts
|
|
5
|
-
* @Date : 2026/04/07
|
|
6
|
-
* @Desc. : 修改属性的工具函数
|
|
7
|
-
*/
|
|
8
|
-
import { type UI } from 'leafer';
|
|
9
|
-
import type { IInteractiveState, IEventState } from '@/types';
|
|
1
|
+
import { UI } from 'leafer';
|
|
2
|
+
import { IInteractiveState, IEventState } from '../../types';
|
|
10
3
|
/**
|
|
11
4
|
* 根据交互属性设置鼠标样式和 hover 效果
|
|
12
5
|
* @param target UI 目标对象
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jnrs/lingshu-smart",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.9",
|
|
4
4
|
"description": "LingShu Smart 2D Digital Twin System.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jnrs",
|
|
@@ -66,8 +66,8 @@
|
|
|
66
66
|
},
|
|
67
67
|
"scripts": {
|
|
68
68
|
"dev": "vite",
|
|
69
|
-
"build": "
|
|
69
|
+
"build": "rimraf dist && pnpm type-check && vite build",
|
|
70
70
|
"release": "node ./scripts/release.mjs",
|
|
71
|
-
"type-check": "vue-tsc --
|
|
71
|
+
"type-check": "vue-tsc --noEmit"
|
|
72
72
|
}
|
|
73
73
|
}
|
package/dist/App.vue.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { shallowRef, onMounted } from 'vue';
|
|
2
|
-
import EditPage from './playground/EditPageDemo.vue';
|
|
3
|
-
import ViewPage from './playground/ViewPageDemo.vue';
|
|
4
|
-
const componentPage = shallowRef(null);
|
|
5
|
-
onMounted(() => {
|
|
6
|
-
const VIEW_PATH = '/preview/';
|
|
7
|
-
if (location.pathname.includes(VIEW_PATH)) {
|
|
8
|
-
componentPage.value = ViewPage;
|
|
9
|
-
}
|
|
10
|
-
else {
|
|
11
|
-
componentPage.value = EditPage;
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
|
|
15
|
-
const __VLS_ctx = {
|
|
16
|
-
...{},
|
|
17
|
-
...{},
|
|
18
|
-
};
|
|
19
|
-
let __VLS_components;
|
|
20
|
-
let __VLS_directives;
|
|
21
|
-
const __VLS_0 = ((__VLS_ctx.componentPage));
|
|
22
|
-
// @ts-ignore
|
|
23
|
-
const __VLS_1 = __VLS_asFunctionalComponent(__VLS_0, new __VLS_0({}));
|
|
24
|
-
const __VLS_2 = __VLS_1({}, ...__VLS_functionalComponentArgsRest(__VLS_1));
|
|
25
|
-
var __VLS_5 = {};
|
|
26
|
-
// @ts-ignore
|
|
27
|
-
[componentPage,];
|
|
28
|
-
var __VLS_3;
|
|
29
|
-
const __VLS_export = (await import('vue')).defineComponent({});
|
|
30
|
-
export default {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @Author : TanRui
|
|
3
|
-
* @WeChat : Tan578853789
|
|
4
|
-
* @File : default.ts
|
|
5
|
-
* @Date : 2026/01/21
|
|
6
|
-
* @Desc. : 编辑页面的初始值配置
|
|
7
|
-
*/
|
|
8
|
-
import { type ICase, type IModel } from '@/types';
|
|
9
|
-
/**
|
|
10
|
-
* 新方案默认值
|
|
11
|
-
*/
|
|
12
|
-
export declare const CASE_INIT: ICase;
|
|
13
|
-
/**
|
|
14
|
-
* 新图层默认值
|
|
15
|
-
*/
|
|
16
|
-
export declare const DEFAULT_LAYER: IModel;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @Author : TanRui
|
|
3
|
-
* @WeChat : Tan578853789
|
|
4
|
-
* @File : default.ts
|
|
5
|
-
* @Date : 2026/01/21
|
|
6
|
-
* @Desc. : 编辑页面的初始值配置
|
|
7
|
-
*/
|
|
8
|
-
import {} from '@/types';
|
|
9
|
-
/**
|
|
10
|
-
* 新方案默认值
|
|
11
|
-
*/
|
|
12
|
-
export const CASE_INIT = {
|
|
13
|
-
uuid: '',
|
|
14
|
-
title: '',
|
|
15
|
-
isActive: false,
|
|
16
|
-
layers: [],
|
|
17
|
-
scene: {
|
|
18
|
-
width: 1920,
|
|
19
|
-
height: 1080,
|
|
20
|
-
zoomType: 'fit',
|
|
21
|
-
fill: {
|
|
22
|
-
type: 'solid',
|
|
23
|
-
color: '#000',
|
|
24
|
-
opacity: 1,
|
|
25
|
-
stops: []
|
|
26
|
-
},
|
|
27
|
-
texture: ''
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
/**
|
|
31
|
-
* 新图层默认值
|
|
32
|
-
*/
|
|
33
|
-
export const DEFAULT_LAYER = {
|
|
34
|
-
// 添加的那一刻生成 uuid
|
|
35
|
-
uuid: '',
|
|
36
|
-
rawData: {
|
|
37
|
-
id: ''
|
|
38
|
-
},
|
|
39
|
-
equipmentName: '',
|
|
40
|
-
width: 0,
|
|
41
|
-
height: 0,
|
|
42
|
-
x: 0,
|
|
43
|
-
y: 0,
|
|
44
|
-
percentX: 0,
|
|
45
|
-
percentY: 0,
|
|
46
|
-
rotation: 0,
|
|
47
|
-
scale: 1,
|
|
48
|
-
zIndex: 1,
|
|
49
|
-
// 交互状态
|
|
50
|
-
hittable: true,
|
|
51
|
-
hitSelf: true,
|
|
52
|
-
visible: true,
|
|
53
|
-
clickable: true,
|
|
54
|
-
menuClickable: true,
|
|
55
|
-
draggable: false,
|
|
56
|
-
// 编辑状态
|
|
57
|
-
editable: true,
|
|
58
|
-
selected: false
|
|
59
|
-
};
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @Author : TanRui
|
|
3
|
-
* @WeChat : Tan578853789
|
|
4
|
-
* @File : editor_default_setting.ts
|
|
5
|
-
* @Date : 2026/01/21
|
|
6
|
-
* @Desc. : 编辑页面的初始值配置
|
|
7
|
-
*/
|
|
8
|
-
import {} from '@/types';
|
|
9
|
-
/**
|
|
10
|
-
* 新方案默认值
|
|
11
|
-
*/
|
|
12
|
-
export const CASE_INIT = {
|
|
13
|
-
uuid: '',
|
|
14
|
-
title: '',
|
|
15
|
-
isActive: false,
|
|
16
|
-
layers: [],
|
|
17
|
-
scene: {
|
|
18
|
-
width: 1920,
|
|
19
|
-
height: 1080,
|
|
20
|
-
zoomType: 'fit',
|
|
21
|
-
fill: {
|
|
22
|
-
type: 'solid',
|
|
23
|
-
color: '#000',
|
|
24
|
-
opacity: 1,
|
|
25
|
-
stops: []
|
|
26
|
-
},
|
|
27
|
-
texture: ''
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
/**
|
|
31
|
-
* 新图层默认值
|
|
32
|
-
*/
|
|
33
|
-
export const DEFAULT_LAYER = {
|
|
34
|
-
uuid: '', // 添加的那一刻生成 uuid
|
|
35
|
-
rawData: {
|
|
36
|
-
id: ''
|
|
37
|
-
},
|
|
38
|
-
equipmentName: '',
|
|
39
|
-
width: 0,
|
|
40
|
-
height: 0,
|
|
41
|
-
x: 0,
|
|
42
|
-
y: 0,
|
|
43
|
-
percentX: 0,
|
|
44
|
-
percentY: 0,
|
|
45
|
-
rotation: 0,
|
|
46
|
-
scale: 1,
|
|
47
|
-
zIndex: 1,
|
|
48
|
-
// 交互状态
|
|
49
|
-
hittable: true,
|
|
50
|
-
hitSelf: true,
|
|
51
|
-
visible: true,
|
|
52
|
-
clickable: true,
|
|
53
|
-
menuClickable: true,
|
|
54
|
-
draggable: false,
|
|
55
|
-
// 编辑状态
|
|
56
|
-
editable: true,
|
|
57
|
-
selected: false
|
|
58
|
-
};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @Author : TanRui
|
|
3
|
-
* @WeChat : Tan578853789
|
|
4
|
-
* @File : preset.ts
|
|
5
|
-
* @Date : 2026/04/02
|
|
6
|
-
* @Desc. : 预设数据配置
|
|
7
|
-
*/
|
|
8
|
-
import { EnumTag, EnumModel, EnumResourceType } from '@/types';
|
|
9
|
-
import { DEFAULT_LAYER } from './editor_default';
|
|
10
|
-
export const EQUIPMENTS_MENU = [
|
|
11
|
-
{
|
|
12
|
-
title: '机床',
|
|
13
|
-
tag: EnumTag.MACHINE,
|
|
14
|
-
children: [
|
|
15
|
-
{
|
|
16
|
-
...DEFAULT_LAYER,
|
|
17
|
-
className: EnumModel.MACHINE_TOOL,
|
|
18
|
-
equipmentName: '机床',
|
|
19
|
-
nameplate: '机床',
|
|
20
|
-
tags: [EnumTag.MACHINE],
|
|
21
|
-
width: 220,
|
|
22
|
-
height: 240,
|
|
23
|
-
stationContainerDirection: 'horizontal',
|
|
24
|
-
stationSlotGroup: {
|
|
25
|
-
width: 220,
|
|
26
|
-
height: 70,
|
|
27
|
-
flowOptions: {
|
|
28
|
-
flow: 'x',
|
|
29
|
-
flowWrap: false,
|
|
30
|
-
oneDirectionMaxQuantity: 2,
|
|
31
|
-
gap: 5
|
|
32
|
-
},
|
|
33
|
-
stationSlots: [
|
|
34
|
-
{
|
|
35
|
-
name: '1',
|
|
36
|
-
index: 1,
|
|
37
|
-
resourceType: EnumResourceType.PALLET,
|
|
38
|
-
width: 50,
|
|
39
|
-
height: 50,
|
|
40
|
-
x: 0,
|
|
41
|
-
y: 0,
|
|
42
|
-
rotation: 0,
|
|
43
|
-
disabled: false,
|
|
44
|
-
hittable: true
|
|
45
|
-
}
|
|
46
|
-
]
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
]
|
|
50
|
-
}
|
|
51
|
-
];
|