@jnrs/lingshu-smart 1.0.1 → 2.2.3
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 +34 -8
- package/dist/App.vue.d.ts +2 -0
- package/dist/assets/json/menu.json.d.ts +187 -0
- package/dist/components/editor/ControlBar/CaseMangerButton.vue.d.ts +31 -0
- package/dist/components/editor/ControlBar/CaseTitleEdit.vue.d.ts +412 -0
- package/dist/components/editor/ControlBar/ExportImportDialog.vue.d.ts +4 -0
- package/dist/components/editor/ControlBar/MainButton.vue.d.ts +17 -0
- package/dist/components/editor/ControlBar/StepButton.vue.d.ts +2 -0
- package/dist/components/editor/ControlBar/StepRecordVisualizer.vue.d.ts +9 -0
- package/dist/components/editor/DrawingBoard.vue.d.ts +2 -0
- package/dist/components/editor/MenuCard/Equipments.vue.d.ts +2 -0
- package/dist/components/editor/MenuCard/Layers.vue.d.ts +2 -0
- package/dist/components/editor/MenuCard/index.vue.d.ts +2 -0
- package/dist/components/editor/OptionCard/Equipment/Base.vue.d.ts +2 -0
- package/dist/components/editor/OptionCard/Equipment/Position.vue.d.ts +2 -0
- package/dist/components/editor/OptionCard/Equipment/index.vue.d.ts +2 -0
- package/dist/components/editor/OptionCard/Scene/Background.vue.d.ts +2 -0
- package/dist/components/editor/OptionCard/Scene/index.vue.d.ts +2 -0
- package/dist/components/editor/OptionCard/index.vue.d.ts +2 -0
- package/dist/components/editor/index.vue.d.ts +37 -0
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +24472 -1
- package/dist/composables/useStepRecord.d.ts +11 -0
- package/dist/constants/options.d.ts +9 -0
- package/dist/core/EditorManager.d.ts +33 -0
- package/dist/core/ViewContainer.d.ts +19 -0
- package/dist/favicon.ico +0 -0
- package/dist/index.js +1 -4
- package/dist/json/case.json +70 -0
- package/dist/locales/en.d.ts +0 -9
- package/dist/locales/index.js +8 -26
- package/dist/locales/zhCn.d.ts +0 -9
- package/dist/main.d.ts +0 -0
- package/dist/playground/EditPage.vue.d.ts +2 -0
- package/dist/playground/ViewPage.vue.d.ts +2 -0
- package/dist/stores/index.d.ts +1 -0
- package/dist/stores/useEditorStore.d.ts +14324 -0
- package/dist/types/components.d.ts +8 -0
- package/dist/types/index.d.ts +84 -1
- package/dist/types/model.d.ts +9 -0
- package/dist/ui/components/Light.d.ts +23 -0
- package/dist/ui/components/Progress.d.ts +24 -0
- package/dist/ui/components/Resource.d.ts +26 -0
- package/dist/ui/components/StationSlot.d.ts +36 -0
- package/dist/ui/models/BaseModel.d.ts +32 -0
- package/dist/ui/models/MachineTool.d.ts +12 -0
- package/dist/ui/models/ModelsFactory.d.ts +5 -0
- package/dist/ui/shapes/Glass.d.ts +12 -0
- package/dist/ui/shapes/NamePlate.d.ts +15 -0
- package/dist/ui/shapes/ScrewHole.d.ts +11 -0
- package/dist/ui/shapes/Texture.d.ts +12 -0
- package/dist/utils/index.d.ts +39 -0
- package/dist/utils/type-guards.d.ts +18 -0
- package/package.json +15 -7
package/README.md
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
# @jnrs/lingshu-smart
|
|
2
2
|
|
|
3
3
|
## ✨ 介绍
|
|
4
|
-
|
|
4
|
+
巨能前端 2D 数字孪生库,灵枢智造。
|
|
5
5
|
- 2D 数字孪生编辑器、运行看板
|
|
6
|
-
- 3D 数字孪生编辑器、运行看板
|
|
7
6
|
|
|
8
7
|
## 💻 技术栈
|
|
9
|
-
TypeScript、Vue3 生态、LeaferJs
|
|
8
|
+
TypeScript、Vue3 生态、LeaferJs
|
|
10
9
|
|
|
11
10
|
## 🧩 安装教程
|
|
12
11
|
```shell
|
|
@@ -16,13 +15,40 @@ pnpm add @jnrs/lingshu-smart
|
|
|
16
15
|
## 🔍 使用示例
|
|
17
16
|
```typescript
|
|
18
17
|
import type { *** } from '@jnrs/lingshu-smart'
|
|
18
|
+
import { LingshuSmartEditor } from '@jnrs/lingshu-smart/components'
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
## 📋 API
|
|
22
22
|
|
|
23
|
-
#### @jnrs/lingshu-smart 模块
|
|
24
|
-
|
|
25
|
-
-
|
|
23
|
+
#### @jnrs/lingshu-smart/components 模块
|
|
24
|
+
Vue 组件
|
|
25
|
+
- LingshuSmartEditor 编辑器组件
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
| 属性名 | 描述 | 类型 | 默认值 |
|
|
28
|
+
|--------|------|------|--------|
|
|
29
|
+
| actions | 事件处理 | `CaseActions` | {} |
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
interface CaseActions {
|
|
33
|
+
/**
|
|
34
|
+
* 加载案例列表
|
|
35
|
+
* @returns Promise<ICase[]>
|
|
36
|
+
*/
|
|
37
|
+
loadCases?: (id?: string) => Promise<ICase[]>
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* 保存方案列表
|
|
41
|
+
*/
|
|
42
|
+
saveCases?: (cases?: ICase[]) => void
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* 跳转到预览页面
|
|
46
|
+
*/
|
|
47
|
+
goPreview?: (currentCase?: ICase) => void
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* 退出当前页面
|
|
51
|
+
*/
|
|
52
|
+
goExit?: () => void
|
|
53
|
+
}
|
|
54
|
+
```
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
declare const _default: [
|
|
2
|
+
{
|
|
3
|
+
"title": "搬运设备",
|
|
4
|
+
"tag": "Mobile",
|
|
5
|
+
"children": [
|
|
6
|
+
{
|
|
7
|
+
"className": "SingleBot",
|
|
8
|
+
"equipmentName": "单爪机器人",
|
|
9
|
+
"nameplate": "单爪机器人",
|
|
10
|
+
"tags": ["Mobile", "Bot"],
|
|
11
|
+
"currentFixture": "pallet",
|
|
12
|
+
"linkRailId": "",
|
|
13
|
+
"linkTrailerId": ""
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"id": 96228,
|
|
17
|
+
"equipmentName": "双爪机器人",
|
|
18
|
+
"nameplate": "双爪机器人",
|
|
19
|
+
"type": ""
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"id": 96229,
|
|
23
|
+
"equipmentName": "RGV",
|
|
24
|
+
"nameplate": "RGV",
|
|
25
|
+
"type": ""
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"title": "机床",
|
|
31
|
+
"tag": "MachineTool",
|
|
32
|
+
"children": [
|
|
33
|
+
{
|
|
34
|
+
"className": "MachineTool",
|
|
35
|
+
"equipmentName": "机床",
|
|
36
|
+
"nameplate": "机床",
|
|
37
|
+
"tags": ["MachineTool"],
|
|
38
|
+
"width": 220,
|
|
39
|
+
"height": 240,
|
|
40
|
+
"siteCount": 2
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"title": "清洗机",
|
|
46
|
+
"tag": "CleaningMachine",
|
|
47
|
+
"children": [
|
|
48
|
+
{
|
|
49
|
+
"id": 96231,
|
|
50
|
+
"equipmentName": "清洗机",
|
|
51
|
+
"nameplate": "清洗机",
|
|
52
|
+
"type": "CleaningMachine",
|
|
53
|
+
"palletSiteCount": 2,
|
|
54
|
+
"x": 0.8,
|
|
55
|
+
"y": 0.8
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"title": "装载站",
|
|
61
|
+
"tag": "LoadingStation",
|
|
62
|
+
"children": [
|
|
63
|
+
{
|
|
64
|
+
"id": 96232,
|
|
65
|
+
"equipmentName": "装载站",
|
|
66
|
+
"nameplate": "装载站",
|
|
67
|
+
"type": "LoadingStation",
|
|
68
|
+
"x": 0.6,
|
|
69
|
+
"y": 0.8
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"title": "库",
|
|
75
|
+
"tag": "Store",
|
|
76
|
+
"children": [
|
|
77
|
+
{
|
|
78
|
+
"id": 96233,
|
|
79
|
+
"equipmentName": "托盘库",
|
|
80
|
+
"nameplate": "托盘",
|
|
81
|
+
"tags": ["Store"],
|
|
82
|
+
"type": "PalletStore",
|
|
83
|
+
"x": 0.5,
|
|
84
|
+
"y": 0.2,
|
|
85
|
+
"count": 6,
|
|
86
|
+
"oneDirectionMaxNumber": 3,
|
|
87
|
+
"siteFlowType": "x",
|
|
88
|
+
"size": 50,
|
|
89
|
+
"zIndex": 1,
|
|
90
|
+
"siteTextMap": ""
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"id": 962331,
|
|
94
|
+
"equipmentName": "刀具库",
|
|
95
|
+
"nameplate": "刀位",
|
|
96
|
+
"tags": ["Store"],
|
|
97
|
+
"type": "CutterStore",
|
|
98
|
+
"x": 0.5,
|
|
99
|
+
"y": 0.2,
|
|
100
|
+
"count": 6,
|
|
101
|
+
"oneDirectionMaxNumber": 3,
|
|
102
|
+
"siteFlowType": "x",
|
|
103
|
+
"size": 50,
|
|
104
|
+
"zIndex": 1,
|
|
105
|
+
"siteTextMap": ""
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"id": 96233110,
|
|
109
|
+
"equipmentName": "缓存码头",
|
|
110
|
+
"nameplate": "",
|
|
111
|
+
"type": "DockStore",
|
|
112
|
+
"x": 0.5,
|
|
113
|
+
"y": 0.2,
|
|
114
|
+
"activeStore": "PalletStore",
|
|
115
|
+
"palletStoreData": {
|
|
116
|
+
"equipmentName": "托盘库",
|
|
117
|
+
"nameplate": "托盘",
|
|
118
|
+
"tags": ["Store"],
|
|
119
|
+
"type": "PalletStore",
|
|
120
|
+
"count": 6,
|
|
121
|
+
"oneDirectionMaxNumber": 3,
|
|
122
|
+
"siteFlowType": "x",
|
|
123
|
+
"size": 50
|
|
124
|
+
},
|
|
125
|
+
"cutterStoreData": {
|
|
126
|
+
"equipmentName": "刀具库",
|
|
127
|
+
"nameplate": "刀位",
|
|
128
|
+
"tags": ["Store"],
|
|
129
|
+
"type": "CutterStore",
|
|
130
|
+
"count": 6,
|
|
131
|
+
"oneDirectionMaxNumber": 3,
|
|
132
|
+
"siteFlowType": "x",
|
|
133
|
+
"size": 50
|
|
134
|
+
},
|
|
135
|
+
"zIndex": 1
|
|
136
|
+
}
|
|
137
|
+
]
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"title": "其他",
|
|
141
|
+
"tag": "Other",
|
|
142
|
+
"children": [
|
|
143
|
+
{
|
|
144
|
+
"id": 96234,
|
|
145
|
+
"equipmentName": "地轨",
|
|
146
|
+
"nameplate": "地轨",
|
|
147
|
+
"type": "Rail",
|
|
148
|
+
"linkEquipIdArray": [],
|
|
149
|
+
"x": 0.5,
|
|
150
|
+
"y": 0.5,
|
|
151
|
+
"width": 0.95,
|
|
152
|
+
"chainDirection": "left"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"id": 96226001,
|
|
156
|
+
"equipmentName": "随行拖",
|
|
157
|
+
"nameplate": "随行拖",
|
|
158
|
+
"type": "Trailer",
|
|
159
|
+
"x": 0.5,
|
|
160
|
+
"y": 0.5,
|
|
161
|
+
"offset": 55,
|
|
162
|
+
"zIndex": 1,
|
|
163
|
+
"linkEquipId": "",
|
|
164
|
+
"siteFlowType": "x",
|
|
165
|
+
"direction": "right",
|
|
166
|
+
"palletSite": {
|
|
167
|
+
"count": 2,
|
|
168
|
+
"oneDirectionMaxNumber": 4,
|
|
169
|
+
"siteFlowType": "x",
|
|
170
|
+
"siteFlowWrap": true,
|
|
171
|
+
"size": 30,
|
|
172
|
+
"siteTextMap": ""
|
|
173
|
+
},
|
|
174
|
+
"cutterSite": {
|
|
175
|
+
"count": 2,
|
|
176
|
+
"oneDirectionMaxNumber": 4,
|
|
177
|
+
"siteFlowType": "x",
|
|
178
|
+
"siteFlowWrap": true,
|
|
179
|
+
"size": 20
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
]
|
|
183
|
+
}
|
|
184
|
+
]
|
|
185
|
+
;
|
|
186
|
+
|
|
187
|
+
export default _default;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ICase } from '../../../types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/**
|
|
4
|
+
* 加载方案列表
|
|
5
|
+
* @param id
|
|
6
|
+
* @returns Promise<ICase[]>
|
|
7
|
+
*/
|
|
8
|
+
loadCases?: (id?: string) => Promise<ICase[]>;
|
|
9
|
+
/**
|
|
10
|
+
* 保存方案列表
|
|
11
|
+
*/
|
|
12
|
+
saveCases?: (cases?: ICase[]) => void;
|
|
13
|
+
};
|
|
14
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
15
|
+
loadCases: (id?: string) => Promise<ICase[]>;
|
|
16
|
+
saveCases: (cases?: ICase[]) => void;
|
|
17
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
18
|
+
exportImportDialogRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {
|
|
19
|
+
showVisible: () => void;
|
|
20
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
21
|
+
P: {};
|
|
22
|
+
B: {};
|
|
23
|
+
D: {};
|
|
24
|
+
C: {};
|
|
25
|
+
M: {};
|
|
26
|
+
Defaults: {};
|
|
27
|
+
}, Readonly<{}> & Readonly<{}>, {
|
|
28
|
+
showVisible: () => void;
|
|
29
|
+
}, {}, {}, {}, {}> | null;
|
|
30
|
+
}, any>;
|
|
31
|
+
export default _default;
|