@jnrs/lingshu-smart 2.2.8 → 2.2.10

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.
Files changed (176) hide show
  1. package/dist/App.vue.d.ts +1 -2
  2. package/dist/assets/data/editor_default_setting.d.ts +1 -8
  3. package/dist/assets/data/editor_preset_menu.d.ts +1 -8
  4. package/dist/components/editor/ControlBar/CaseManger.vue.d.ts +15 -3
  5. package/dist/components/editor/ControlBar/CaseTitleEdit.vue.d.ts +411 -2
  6. package/dist/components/editor/ControlBar/ExportImportDialog.vue.d.ts +2 -3
  7. package/dist/components/editor/ControlBar/MainButton.vue.d.ts +2 -3
  8. package/dist/components/editor/ControlBar/StepButton.vue.d.ts +1 -2
  9. package/dist/components/editor/ControlBar/StepRecordVisualizer.vue.d.ts +1 -2
  10. package/dist/components/editor/DrawingBoard.vue.d.ts +1 -2
  11. package/dist/components/editor/MenuCard/Equipments.vue.d.ts +1 -2
  12. package/dist/components/editor/MenuCard/Layers.vue.d.ts +1 -2
  13. package/dist/components/editor/MenuCard/index.vue.d.ts +1 -2
  14. package/dist/components/editor/OptionCard/Equipment/Base.vue.d.ts +1 -2
  15. package/dist/components/editor/OptionCard/Equipment/DataSets.vue.d.ts +1 -2
  16. package/dist/components/editor/OptionCard/Equipment/Interaction.vue.d.ts +1 -2
  17. package/dist/components/editor/OptionCard/Equipment/Position.vue.d.ts +1 -2
  18. package/dist/components/editor/OptionCard/Equipment/StationSlotGroup.vue.d.ts +1 -2
  19. package/dist/components/editor/OptionCard/Equipment/index.vue.d.ts +1 -2
  20. package/dist/components/editor/OptionCard/Equipment/models/MachineTool.vue.d.ts +1 -2
  21. package/dist/components/editor/OptionCard/Equipment/models/Rail.vue.d.ts +1 -2
  22. package/dist/components/editor/OptionCard/Equipment/models/SingleJointRobot.vue.d.ts +2 -0
  23. package/dist/components/editor/OptionCard/Scene/Background.vue.d.ts +1 -2
  24. package/dist/components/editor/OptionCard/Scene/index.vue.d.ts +1 -2
  25. package/dist/components/editor/OptionCard/index.vue.d.ts +1 -2
  26. package/dist/components/editor/index.vue.d.ts +13 -4
  27. package/dist/components/index.d.ts +2 -2
  28. package/dist/components/index.js +27281 -4
  29. package/dist/components/preview/index.vue.d.ts +5 -6
  30. package/dist/composables/useStepRecord.d.ts +4 -12
  31. package/dist/constants/options.d.ts +1 -8
  32. package/dist/controller/AppController.d.ts +3 -10
  33. package/dist/controller/EditorController.d.ts +2 -9
  34. package/dist/index.js +1 -1
  35. package/dist/json/cases.json +577 -20
  36. package/dist/locales/i18next.d.ts +1 -1
  37. package/dist/locales/index.d.ts +2 -2
  38. package/dist/locales/index.js +13 -3
  39. package/dist/main.d.ts +0 -3
  40. package/dist/playground/EditPageDemo.vue.d.ts +1 -2
  41. package/dist/playground/ViewPageDemo.vue.d.ts +27 -2
  42. package/dist/stores/useAppStore.d.ts +5 -12
  43. package/dist/stores/useDataStore.d.ts +11 -18
  44. package/dist/stores/useEditorStore.d.ts +20 -27
  45. package/dist/types/app.types.d.ts +1 -1
  46. package/dist/types/base.types.d.ts +1 -1
  47. package/dist/types/components/config.types.d.ts +1 -1
  48. package/dist/types/components/operating.types.d.ts +1 -1
  49. package/dist/types/enums.d.ts +1 -1
  50. package/dist/types/guards.d.ts +5 -12
  51. package/dist/types/index.d.ts +2 -2
  52. package/dist/types/models/config.types.d.ts +49 -47
  53. package/dist/types/models/operating.types.d.ts +53 -53
  54. package/dist/ui/abstract/ComponentAbs.d.ts +2 -9
  55. package/dist/ui/abstract/ModelAbs.d.ts +2 -10
  56. package/dist/ui/components/Entrance.d.ts +1 -8
  57. package/dist/ui/components/Light.d.ts +1 -8
  58. package/dist/ui/components/Progress.d.ts +1 -8
  59. package/dist/ui/components/Resource.d.ts +1 -8
  60. package/dist/ui/components/StationSlot.d.ts +1 -23
  61. package/dist/ui/components/StationSlotGroup.d.ts +1 -8
  62. package/dist/ui/factories/createGlass.d.ts +0 -6
  63. package/dist/ui/factories/createModel.d.ts +2 -9
  64. package/dist/ui/factories/createShadow.d.ts +1 -9
  65. package/dist/ui/factories/createText.d.ts +0 -7
  66. package/dist/ui/models/CleaningMachine.d.ts +1 -1
  67. package/dist/ui/models/DoubleJointRobot.d.ts +19 -20
  68. package/dist/ui/models/LoadingStation.d.ts +1 -1
  69. package/dist/ui/models/MachineTool.d.ts +1 -1
  70. package/dist/ui/models/MarkingMachine.d.ts +1 -1
  71. package/dist/ui/models/Rail.d.ts +1 -1
  72. package/dist/ui/models/ResourceStore.d.ts +1 -1
  73. package/dist/ui/models/SingleJointRobot.d.ts +3 -3
  74. package/dist/ui/shapes/NamePlate.d.ts +0 -7
  75. package/dist/ui/shapes/ScrewHole.d.ts +0 -7
  76. package/dist/ui/shapes/Texture.d.ts +1 -8
  77. package/dist/ui/utils/attr.d.ts +2 -9
  78. package/dist/utils/type-guards.d.ts +1 -1
  79. package/package.json +3 -3
  80. package/dist/App.vue.js +0 -30
  81. package/dist/assets/data/editor_default.d.ts +0 -16
  82. package/dist/assets/data/editor_default.js +0 -59
  83. package/dist/assets/data/editor_default_setting.js +0 -58
  84. package/dist/assets/data/editor_preset.d.ts +0 -9
  85. package/dist/assets/data/editor_preset.js +0 -51
  86. package/dist/assets/data/editor_preset_menu.js +0 -290
  87. package/dist/components/editor/ControlBar/CaseManger.vue.js +0 -465
  88. package/dist/components/editor/ControlBar/CaseTitleEdit.vue.js +0 -108
  89. package/dist/components/editor/ControlBar/ExportImportDialog.vue.js +0 -280
  90. package/dist/components/editor/ControlBar/MainButton.vue.js +0 -183
  91. package/dist/components/editor/ControlBar/StepButton.vue.js +0 -147
  92. package/dist/components/editor/ControlBar/StepRecordVisualizer.vue.js +0 -98
  93. package/dist/components/editor/DrawingBoard.vue.js +0 -31
  94. package/dist/components/editor/MenuCard/Equipments.vue.js +0 -129
  95. package/dist/components/editor/MenuCard/Layers.vue.js +0 -201
  96. package/dist/components/editor/MenuCard/index.vue.js +0 -84
  97. package/dist/components/editor/OptionCard/Equipment/Base.vue.js +0 -96
  98. package/dist/components/editor/OptionCard/Equipment/Binds.vue.d.ts +0 -3
  99. package/dist/components/editor/OptionCard/Equipment/Binds.vue.js +0 -443
  100. package/dist/components/editor/OptionCard/Equipment/Bot.vue.d.ts +0 -3
  101. package/dist/components/editor/OptionCard/Equipment/Bot.vue.js +0 -81
  102. package/dist/components/editor/OptionCard/Equipment/DataSets.vue.js +0 -304
  103. package/dist/components/editor/OptionCard/Equipment/DockStore.vue.d.ts +0 -3
  104. package/dist/components/editor/OptionCard/Equipment/DockStore.vue.js +0 -597
  105. package/dist/components/editor/OptionCard/Equipment/Interaction.vue.js +0 -287
  106. package/dist/components/editor/OptionCard/Equipment/Position.backup.vue.d.ts +0 -3
  107. package/dist/components/editor/OptionCard/Equipment/Position.backup.vue.js +0 -440
  108. package/dist/components/editor/OptionCard/Equipment/Position.vue.js +0 -436
  109. package/dist/components/editor/OptionCard/Equipment/StationSlotGroup.vue.js +0 -1131
  110. package/dist/components/editor/OptionCard/Equipment/Store.vue.d.ts +0 -3
  111. package/dist/components/editor/OptionCard/Equipment/Store.vue.js +0 -453
  112. package/dist/components/editor/OptionCard/Equipment/Trailer.vue.d.ts +0 -3
  113. package/dist/components/editor/OptionCard/Equipment/Trailer.vue.js +0 -1109
  114. package/dist/components/editor/OptionCard/Equipment/index.vue.js +0 -100
  115. package/dist/components/editor/OptionCard/Equipment/models/MachineTool.vue.js +0 -99
  116. package/dist/components/editor/OptionCard/Equipment/models/Rail.vue.js +0 -225
  117. package/dist/components/editor/OptionCard/Equipment/models/SingleGripperRobot.vue.d.ts +0 -3
  118. package/dist/components/editor/OptionCard/Equipment/models/SingleGripperRobot.vue.js +0 -99
  119. package/dist/components/editor/OptionCard/Scene/Background.vue.js +0 -543
  120. package/dist/components/editor/OptionCard/Scene/index.vue.js +0 -200
  121. package/dist/components/editor/OptionCard/index.vue.js +0 -73
  122. package/dist/components/editor/index.vue.js +0 -156
  123. package/dist/components/preview/index.vue.js +0 -104
  124. package/dist/composables/useStepRecord.js +0 -135
  125. package/dist/constants/options.js +0 -55
  126. package/dist/controller/AppController.js +0 -168
  127. package/dist/controller/EditorController.js +0 -173
  128. package/dist/locales/en.js +0 -5
  129. package/dist/locales/i18next.js +0 -6
  130. package/dist/locales/zhCn.js +0 -5
  131. package/dist/main.js +0 -13
  132. package/dist/playground/EditPageDemo.vue.js +0 -57
  133. package/dist/playground/ViewPageDemo.vue.js +0 -277
  134. package/dist/stores/index.js +0 -3
  135. package/dist/stores/useAppStore.js +0 -78
  136. package/dist/stores/useDataStore.js +0 -116
  137. package/dist/stores/useEditorStore.js +0 -263
  138. package/dist/types/app.types.js +0 -2
  139. package/dist/types/base.types.js +0 -1
  140. package/dist/types/components/config.types.js +0 -1
  141. package/dist/types/components/operating.types.js +0 -1
  142. package/dist/types/enums.js +0 -46
  143. package/dist/types/guards.js +0 -28
  144. package/dist/types/index.js +0 -8
  145. package/dist/types/models/config.types.js +0 -1
  146. package/dist/types/models/operating.types.js +0 -1
  147. package/dist/ui/abstract/ComponentAbs.js +0 -64
  148. package/dist/ui/abstract/ModelAbs.js +0 -119
  149. package/dist/ui/components/Entrance.js +0 -83
  150. package/dist/ui/components/Light.js +0 -167
  151. package/dist/ui/components/Progress.js +0 -84
  152. package/dist/ui/components/Resource.js +0 -70
  153. package/dist/ui/components/StationSlot.js +0 -207
  154. package/dist/ui/components/StationSlotGroup.js +0 -110
  155. package/dist/ui/factories/createGlass.js +0 -51
  156. package/dist/ui/factories/createModel.js +0 -35
  157. package/dist/ui/factories/createShadow.js +0 -52
  158. package/dist/ui/factories/createText.js +0 -46
  159. package/dist/ui/models/CleaningMachine.js +0 -141
  160. package/dist/ui/models/DoubleJointRobot.js +0 -545
  161. package/dist/ui/models/LoadingStation.js +0 -167
  162. package/dist/ui/models/MachineTool.js +0 -184
  163. package/dist/ui/models/MarkingMachine.js +0 -148
  164. package/dist/ui/models/Rail.js +0 -117
  165. package/dist/ui/models/ResourceStore.js +0 -101
  166. package/dist/ui/models/SingleBot.d.ts +0 -20
  167. package/dist/ui/models/SingleBot.js +0 -202
  168. package/dist/ui/models/SingleGripperRobot.d.ts +0 -19
  169. package/dist/ui/models/SingleGripperRobot.js +0 -272
  170. package/dist/ui/models/SingleJointRobot.js +0 -346
  171. package/dist/ui/shapes/NamePlate.js +0 -85
  172. package/dist/ui/shapes/ScrewHole.js +0 -57
  173. package/dist/ui/shapes/Texture.js +0 -51
  174. package/dist/ui/utils/attr.js +0 -50
  175. package/dist/utils/index.js +0 -92
  176. package/dist/utils/type-guards.js +0 -105
@@ -1,200 +0,0 @@
1
- import { storeToRefs } from 'pinia';
2
- import { ElIcon, vLoading, ElInputNumber, ElSelect, ElOption } from 'element-plus';
3
- import { WarnTriangleFilled } from '@element-plus/icons-vue';
4
- import { useEditorStore } from '@/stores';
5
- import Background from './Background.vue';
6
- const editorStore = useEditorStore();
7
- const { scene } = storeToRefs(editorStore);
8
- debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
9
- const __VLS_ctx = {
10
- ...{},
11
- ...{},
12
- };
13
- let __VLS_components;
14
- let __VLS_directives;
15
- __VLS_asFunctionalElement(__VLS_intrinsics.div, __VLS_intrinsics.div)({
16
- ...{ class: "formContainer" },
17
- });
18
- if (__VLS_ctx.scene) {
19
- // @ts-ignore
20
- [scene,];
21
- __VLS_asFunctionalElement(__VLS_intrinsics.div, __VLS_intrinsics.div)({
22
- ...{ class: "form_group" },
23
- });
24
- __VLS_asFunctionalElement(__VLS_intrinsics.div, __VLS_intrinsics.div)({
25
- ...{ class: "form_group_title" },
26
- });
27
- __VLS_asFunctionalElement(__VLS_intrinsics.div, __VLS_intrinsics.div)({
28
- ...{ class: "keyVal" },
29
- });
30
- __VLS_asFunctionalElement(__VLS_intrinsics.div, __VLS_intrinsics.div)({
31
- ...{ class: "key" },
32
- });
33
- __VLS_asFunctionalElement(__VLS_intrinsics.span, __VLS_intrinsics.span)({
34
- ...{ class: "unit" },
35
- });
36
- __VLS_asFunctionalElement(__VLS_intrinsics.div, __VLS_intrinsics.div)({
37
- ...{ class: "val" },
38
- });
39
- const __VLS_0 = {}.ElInputNumber;
40
- /** @type {[typeof __VLS_components.ElInputNumber, typeof __VLS_components.elInputNumber, ]} */ ;
41
- // @ts-ignore
42
- ElInputNumber;
43
- // @ts-ignore
44
- const __VLS_1 = __VLS_asFunctionalComponent(__VLS_0, new __VLS_0({
45
- modelValue: (__VLS_ctx.scene.width),
46
- step: (1),
47
- precision: (0),
48
- min: (500),
49
- max: (10000),
50
- size: "default",
51
- ...{ style: "width: 100%" },
52
- }));
53
- const __VLS_2 = __VLS_1({
54
- modelValue: (__VLS_ctx.scene.width),
55
- step: (1),
56
- precision: (0),
57
- min: (500),
58
- max: (10000),
59
- size: "default",
60
- ...{ style: "width: 100%" },
61
- }, ...__VLS_functionalComponentArgsRest(__VLS_1));
62
- // @ts-ignore
63
- [scene,];
64
- __VLS_asFunctionalElement(__VLS_intrinsics.div, __VLS_intrinsics.div)({
65
- ...{ class: "keyVal" },
66
- });
67
- __VLS_asFunctionalElement(__VLS_intrinsics.div, __VLS_intrinsics.div)({
68
- ...{ class: "key" },
69
- });
70
- __VLS_asFunctionalElement(__VLS_intrinsics.span, __VLS_intrinsics.span)({
71
- ...{ class: "unit" },
72
- });
73
- __VLS_asFunctionalElement(__VLS_intrinsics.div, __VLS_intrinsics.div)({
74
- ...{ class: "val" },
75
- });
76
- const __VLS_6 = {}.ElInputNumber;
77
- /** @type {[typeof __VLS_components.ElInputNumber, typeof __VLS_components.elInputNumber, ]} */ ;
78
- // @ts-ignore
79
- ElInputNumber;
80
- // @ts-ignore
81
- const __VLS_7 = __VLS_asFunctionalComponent(__VLS_6, new __VLS_6({
82
- modelValue: (__VLS_ctx.scene.height),
83
- step: (1),
84
- precision: (0),
85
- min: (500),
86
- max: (10000),
87
- size: "default",
88
- ...{ style: "width: 100%" },
89
- }));
90
- const __VLS_8 = __VLS_7({
91
- modelValue: (__VLS_ctx.scene.height),
92
- step: (1),
93
- precision: (0),
94
- min: (500),
95
- max: (10000),
96
- size: "default",
97
- ...{ style: "width: 100%" },
98
- }, ...__VLS_functionalComponentArgsRest(__VLS_7));
99
- // @ts-ignore
100
- [scene,];
101
- __VLS_asFunctionalElement(__VLS_intrinsics.div, __VLS_intrinsics.div)({
102
- ...{ class: "keyVal" },
103
- });
104
- __VLS_asFunctionalElement(__VLS_intrinsics.div, __VLS_intrinsics.div)({
105
- ...{ class: "key" },
106
- });
107
- __VLS_asFunctionalElement(__VLS_intrinsics.br)({});
108
- __VLS_asFunctionalElement(__VLS_intrinsics.div, __VLS_intrinsics.div)({
109
- ...{ class: "val" },
110
- });
111
- const __VLS_12 = {}.ElSelect;
112
- /** @type {[typeof __VLS_components.ElSelect, typeof __VLS_components.elSelect, typeof __VLS_components.ElSelect, typeof __VLS_components.elSelect, ]} */ ;
113
- // @ts-ignore
114
- ElSelect;
115
- // @ts-ignore
116
- const __VLS_13 = __VLS_asFunctionalComponent(__VLS_12, new __VLS_12({
117
- modelValue: (__VLS_ctx.scene.zoomType),
118
- }));
119
- const __VLS_14 = __VLS_13({
120
- modelValue: (__VLS_ctx.scene.zoomType),
121
- }, ...__VLS_functionalComponentArgsRest(__VLS_13));
122
- const { default: __VLS_17 } = __VLS_15.slots;
123
- // @ts-ignore
124
- [scene,];
125
- const __VLS_18 = {}.ElOption;
126
- /** @type {[typeof __VLS_components.ElOption, typeof __VLS_components.elOption, ]} */ ;
127
- // @ts-ignore
128
- ElOption;
129
- // @ts-ignore
130
- const __VLS_19 = __VLS_asFunctionalComponent(__VLS_18, new __VLS_18({
131
- label: "自适应",
132
- value: "fit",
133
- }));
134
- const __VLS_20 = __VLS_19({
135
- label: "自适应",
136
- value: "fit",
137
- }, ...__VLS_functionalComponentArgsRest(__VLS_19));
138
- const __VLS_24 = {}.ElOption;
139
- /** @type {[typeof __VLS_components.ElOption, typeof __VLS_components.elOption, ]} */ ;
140
- // @ts-ignore
141
- ElOption;
142
- // @ts-ignore
143
- const __VLS_25 = __VLS_asFunctionalComponent(__VLS_24, new __VLS_24({
144
- label: "固定比例",
145
- value: (1),
146
- }));
147
- const __VLS_26 = __VLS_25({
148
- label: "固定比例",
149
- value: (1),
150
- }, ...__VLS_functionalComponentArgsRest(__VLS_25));
151
- var __VLS_15;
152
- /** @type {[typeof Background, ]} */ ;
153
- // @ts-ignore
154
- const __VLS_30 = __VLS_asFunctionalComponent(Background, new Background({}));
155
- const __VLS_31 = __VLS_30({}, ...__VLS_functionalComponentArgsRest(__VLS_30));
156
- }
157
- else {
158
- __VLS_asFunctionalElement(__VLS_intrinsics.div, __VLS_intrinsics.div)({
159
- ...{ class: "noData" },
160
- });
161
- const __VLS_35 = {}.ElIcon;
162
- /** @type {[typeof __VLS_components.ElIcon, typeof __VLS_components.elIcon, typeof __VLS_components.ElIcon, typeof __VLS_components.elIcon, ]} */ ;
163
- // @ts-ignore
164
- ElIcon;
165
- // @ts-ignore
166
- const __VLS_36 = __VLS_asFunctionalComponent(__VLS_35, new __VLS_35({
167
- ...{ class: "noData_icon" },
168
- }));
169
- const __VLS_37 = __VLS_36({
170
- ...{ class: "noData_icon" },
171
- }, ...__VLS_functionalComponentArgsRest(__VLS_36));
172
- const { default: __VLS_40 } = __VLS_38.slots;
173
- const __VLS_41 = {}.WarnTriangleFilled;
174
- /** @type {[typeof __VLS_components.WarnTriangleFilled, ]} */ ;
175
- // @ts-ignore
176
- WarnTriangleFilled;
177
- // @ts-ignore
178
- const __VLS_42 = __VLS_asFunctionalComponent(__VLS_41, new __VLS_41({}));
179
- const __VLS_43 = __VLS_42({}, ...__VLS_functionalComponentArgsRest(__VLS_42));
180
- var __VLS_38;
181
- __VLS_asFunctionalElement(__VLS_intrinsics.p, __VLS_intrinsics.p)({});
182
- }
183
- /** @type {__VLS_StyleScopedClasses['formContainer']} */ ;
184
- /** @type {__VLS_StyleScopedClasses['form_group']} */ ;
185
- /** @type {__VLS_StyleScopedClasses['form_group_title']} */ ;
186
- /** @type {__VLS_StyleScopedClasses['keyVal']} */ ;
187
- /** @type {__VLS_StyleScopedClasses['key']} */ ;
188
- /** @type {__VLS_StyleScopedClasses['unit']} */ ;
189
- /** @type {__VLS_StyleScopedClasses['val']} */ ;
190
- /** @type {__VLS_StyleScopedClasses['keyVal']} */ ;
191
- /** @type {__VLS_StyleScopedClasses['key']} */ ;
192
- /** @type {__VLS_StyleScopedClasses['unit']} */ ;
193
- /** @type {__VLS_StyleScopedClasses['val']} */ ;
194
- /** @type {__VLS_StyleScopedClasses['keyVal']} */ ;
195
- /** @type {__VLS_StyleScopedClasses['key']} */ ;
196
- /** @type {__VLS_StyleScopedClasses['val']} */ ;
197
- /** @type {__VLS_StyleScopedClasses['noData']} */ ;
198
- /** @type {__VLS_StyleScopedClasses['noData_icon']} */ ;
199
- const __VLS_export = (await import('vue')).defineComponent({});
200
- export default {};
@@ -1,73 +0,0 @@
1
- import { ref, watch } from 'vue';
2
- import { storeToRefs } from 'pinia';
3
- import Scene from './Scene/index.vue';
4
- import Equipment from './Equipment/index.vue';
5
- import { useEditorStore } from '@/stores';
6
- const { currentLayer } = storeToRefs(useEditorStore());
7
- const activeTab = ref(0);
8
- watch(currentLayer, (nv) => {
9
- if (nv) {
10
- activeTab.value = 1;
11
- }
12
- }, { immediate: true });
13
- debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
14
- const __VLS_ctx = {
15
- ...{},
16
- ...{},
17
- };
18
- let __VLS_components;
19
- let __VLS_directives;
20
- __VLS_asFunctionalElement(__VLS_intrinsics.div, __VLS_intrinsics.div)({
21
- ...{ class: "editParamsForm" },
22
- });
23
- __VLS_asFunctionalElement(__VLS_intrinsics.div, __VLS_intrinsics.div)({
24
- ...{ class: "tab" },
25
- });
26
- __VLS_asFunctionalElement(__VLS_intrinsics.div, __VLS_intrinsics.div)({
27
- ...{ onClick: (...[$event]) => {
28
- __VLS_ctx.activeTab = 0;
29
- // @ts-ignore
30
- [activeTab,];
31
- } },
32
- ...{ class: "tab_item" },
33
- ...{ class: ({ tab_item_active: __VLS_ctx.activeTab === 0 }) },
34
- });
35
- // @ts-ignore
36
- [activeTab,];
37
- __VLS_asFunctionalElement(__VLS_intrinsics.div, __VLS_intrinsics.div)({
38
- ...{ onClick: (...[$event]) => {
39
- __VLS_ctx.activeTab = 1;
40
- // @ts-ignore
41
- [activeTab,];
42
- } },
43
- ...{ class: "tab_item" },
44
- ...{ class: ({ tab_item_active: __VLS_ctx.activeTab === 1 }) },
45
- });
46
- // @ts-ignore
47
- [activeTab,];
48
- __VLS_asFunctionalElement(__VLS_intrinsics.div, __VLS_intrinsics.div)({
49
- ...{ class: "container" },
50
- });
51
- /** @type {[typeof Scene, ]} */ ;
52
- // @ts-ignore
53
- const __VLS_0 = __VLS_asFunctionalComponent(Scene, new Scene({}));
54
- const __VLS_1 = __VLS_0({}, ...__VLS_functionalComponentArgsRest(__VLS_0));
55
- __VLS_asFunctionalDirective(__VLS_directives.vShow)(null, { ...__VLS_directiveBindingRestFields, value: (__VLS_ctx.activeTab === 0) }, null, null);
56
- // @ts-ignore
57
- [activeTab,];
58
- /** @type {[typeof Equipment, ]} */ ;
59
- // @ts-ignore
60
- const __VLS_5 = __VLS_asFunctionalComponent(Equipment, new Equipment({}));
61
- const __VLS_6 = __VLS_5({}, ...__VLS_functionalComponentArgsRest(__VLS_5));
62
- __VLS_asFunctionalDirective(__VLS_directives.vShow)(null, { ...__VLS_directiveBindingRestFields, value: (__VLS_ctx.activeTab === 1) }, null, null);
63
- // @ts-ignore
64
- [activeTab,];
65
- /** @type {__VLS_StyleScopedClasses['editParamsForm']} */ ;
66
- /** @type {__VLS_StyleScopedClasses['tab']} */ ;
67
- /** @type {__VLS_StyleScopedClasses['tab_item']} */ ;
68
- /** @type {__VLS_StyleScopedClasses['tab_item_active']} */ ;
69
- /** @type {__VLS_StyleScopedClasses['tab_item']} */ ;
70
- /** @type {__VLS_StyleScopedClasses['tab_item_active']} */ ;
71
- /** @type {__VLS_StyleScopedClasses['container']} */ ;
72
- const __VLS_export = (await import('vue')).defineComponent({});
73
- export default {};
@@ -1,156 +0,0 @@
1
- import { vLoading } from 'element-plus';
2
- import { storeToRefs } from 'pinia';
3
- import { useDataStore } from '@/stores';
4
- import MenuCard from './MenuCard/index.vue';
5
- import OptionCard from './OptionCard/index.vue';
6
- import DrawingBoard from './DrawingBoard.vue';
7
- import CaseTitleEdit from './ControlBar/CaseTitleEdit.vue';
8
- import CaseManger from './ControlBar/CaseManger.vue';
9
- import StepButton from './ControlBar/StepButton.vue';
10
- import MainButton from './ControlBar/MainButton.vue';
11
- const props = withDefaults(defineProps(), {
12
- actions: () => ({})
13
- });
14
- const sharedStore = useDataStore();
15
- const { casesLoading } = storeToRefs(sharedStore);
16
- debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
17
- const __VLS_defaults = {
18
- actions: () => ({})
19
- };
20
- const __VLS_ctx = {
21
- ...{},
22
- ...{},
23
- ...{},
24
- ...{},
25
- };
26
- let __VLS_components;
27
- let __VLS_directives;
28
- /** @type {__VLS_StyleScopedClasses['main_left']} */ ;
29
- /** @type {__VLS_StyleScopedClasses['main_right']} */ ;
30
- /** @type {__VLS_StyleScopedClasses['main_left']} */ ;
31
- /** @type {__VLS_StyleScopedClasses['main_right']} */ ;
32
- /** @type {__VLS_StyleScopedClasses['control_bar']} */ ;
33
- __VLS_asFunctionalElement(__VLS_intrinsics.div, __VLS_intrinsics.div)({
34
- ...{ class: "main" },
35
- ref: "visualRef",
36
- 'element-loading-background': "rgba(0, 0, 0, 0.5)",
37
- 'element-loading-text': "方案加载中",
38
- });
39
- __VLS_asFunctionalDirective(__VLS_directives.vLoading)(null, { ...__VLS_directiveBindingRestFields, value: (__VLS_ctx.casesLoading) }, null, null);
40
- /** @type {typeof __VLS_ctx.visualRef} */ ;
41
- // @ts-ignore
42
- [vLoading, casesLoading, visualRef,];
43
- __VLS_asFunctionalElement(__VLS_intrinsics.div, __VLS_intrinsics.div)({
44
- ...{ class: "main_left" },
45
- });
46
- __VLS_asFunctionalElement(__VLS_intrinsics.div, __VLS_intrinsics.div)({
47
- ...{ class: "main_logo" },
48
- });
49
- __VLS_asFunctionalElement(__VLS_intrinsics.div, __VLS_intrinsics.div)({
50
- ...{ class: "main_logo_title" },
51
- });
52
- __VLS_asFunctionalElement(__VLS_intrinsics.span, __VLS_intrinsics.span)({
53
- ...{ class: "main_logo_icon" },
54
- });
55
- __VLS_asFunctionalElement(__VLS_intrinsics.span, __VLS_intrinsics.span)({});
56
- __VLS_asFunctionalElement(__VLS_intrinsics.span, __VLS_intrinsics.span)({});
57
- __VLS_asFunctionalElement(__VLS_intrinsics.div, __VLS_intrinsics.div)({});
58
- __VLS_asFunctionalElement(__VLS_intrinsics.span, __VLS_intrinsics.span)({
59
- ...{ class: "main_logo_title_text" },
60
- });
61
- __VLS_asFunctionalElement(__VLS_intrinsics.i, __VLS_intrinsics.i)({
62
- ...{ class: "main_logo_title_version" },
63
- });
64
- __VLS_asFunctionalElement(__VLS_intrinsics.div, __VLS_intrinsics.div)({
65
- ...{ class: "main_logo_intro" },
66
- });
67
- __VLS_asFunctionalElement(__VLS_intrinsics.p, __VLS_intrinsics.p)({});
68
- __VLS_asFunctionalElement(__VLS_intrinsics.p, __VLS_intrinsics.p)({});
69
- /** @type {[typeof MenuCard, ]} */ ;
70
- // @ts-ignore
71
- const __VLS_0 = __VLS_asFunctionalComponent(MenuCard, new MenuCard({}));
72
- const __VLS_1 = __VLS_0({}, ...__VLS_functionalComponentArgsRest(__VLS_0));
73
- __VLS_asFunctionalElement(__VLS_intrinsics.div, __VLS_intrinsics.div)({
74
- ...{ class: "main_mid" },
75
- });
76
- __VLS_asFunctionalElement(__VLS_intrinsics.div, __VLS_intrinsics.div)({
77
- ...{ class: "control_bar" },
78
- });
79
- __VLS_asFunctionalElement(__VLS_intrinsics.div, __VLS_intrinsics.div)({
80
- ...{ class: "control_bar_left" },
81
- });
82
- /** @type {[typeof CaseTitleEdit, ]} */ ;
83
- // @ts-ignore
84
- const __VLS_5 = __VLS_asFunctionalComponent(CaseTitleEdit, new CaseTitleEdit({}));
85
- const __VLS_6 = __VLS_5({}, ...__VLS_functionalComponentArgsRest(__VLS_5));
86
- __VLS_asFunctionalElement(__VLS_intrinsics.div, __VLS_intrinsics.div)({
87
- ...{ class: "control_bar_right" },
88
- });
89
- /** @type {[typeof CaseManger, ]} */ ;
90
- // @ts-ignore
91
- const __VLS_10 = __VLS_asFunctionalComponent(CaseManger, new CaseManger({
92
- loadCases: (props.actions.loadCases),
93
- saveCases: (props.actions.saveCases),
94
- }));
95
- const __VLS_11 = __VLS_10({
96
- loadCases: (props.actions.loadCases),
97
- saveCases: (props.actions.saveCases),
98
- }, ...__VLS_functionalComponentArgsRest(__VLS_10));
99
- /** @type {[typeof StepButton, ]} */ ;
100
- // @ts-ignore
101
- const __VLS_15 = __VLS_asFunctionalComponent(StepButton, new StepButton({}));
102
- const __VLS_16 = __VLS_15({}, ...__VLS_functionalComponentArgsRest(__VLS_15));
103
- /** @type {[typeof MainButton, ]} */ ;
104
- // @ts-ignore
105
- const __VLS_20 = __VLS_asFunctionalComponent(MainButton, new MainButton({
106
- handlePreview: (props.actions.handlePreview),
107
- handleExit: (props.actions.handleExit),
108
- }));
109
- const __VLS_21 = __VLS_20({
110
- handlePreview: (props.actions.handlePreview),
111
- handleExit: (props.actions.handleExit),
112
- }, ...__VLS_functionalComponentArgsRest(__VLS_20));
113
- __VLS_asFunctionalElement(__VLS_intrinsics.div, __VLS_intrinsics.div)({
114
- ...{ class: "main_mid_content" },
115
- });
116
- /** @type {[typeof DrawingBoard, ]} */ ;
117
- // @ts-ignore
118
- const __VLS_25 = __VLS_asFunctionalComponent(DrawingBoard, new DrawingBoard({
119
- ref: "drawingBoardRef",
120
- }));
121
- const __VLS_26 = __VLS_25({
122
- ref: "drawingBoardRef",
123
- }, ...__VLS_functionalComponentArgsRest(__VLS_25));
124
- /** @type {typeof __VLS_ctx.drawingBoardRef} */ ;
125
- var __VLS_29 = {};
126
- // @ts-ignore
127
- [drawingBoardRef,];
128
- var __VLS_27;
129
- __VLS_asFunctionalElement(__VLS_intrinsics.div, __VLS_intrinsics.div)({
130
- ...{ class: "main_right" },
131
- });
132
- /** @type {[typeof OptionCard, ]} */ ;
133
- // @ts-ignore
134
- const __VLS_32 = __VLS_asFunctionalComponent(OptionCard, new OptionCard({}));
135
- const __VLS_33 = __VLS_32({}, ...__VLS_functionalComponentArgsRest(__VLS_32));
136
- /** @type {__VLS_StyleScopedClasses['main']} */ ;
137
- /** @type {__VLS_StyleScopedClasses['main_left']} */ ;
138
- /** @type {__VLS_StyleScopedClasses['main_logo']} */ ;
139
- /** @type {__VLS_StyleScopedClasses['main_logo_title']} */ ;
140
- /** @type {__VLS_StyleScopedClasses['main_logo_icon']} */ ;
141
- /** @type {__VLS_StyleScopedClasses['main_logo_title_text']} */ ;
142
- /** @type {__VLS_StyleScopedClasses['main_logo_title_version']} */ ;
143
- /** @type {__VLS_StyleScopedClasses['main_logo_intro']} */ ;
144
- /** @type {__VLS_StyleScopedClasses['main_mid']} */ ;
145
- /** @type {__VLS_StyleScopedClasses['control_bar']} */ ;
146
- /** @type {__VLS_StyleScopedClasses['control_bar_left']} */ ;
147
- /** @type {__VLS_StyleScopedClasses['control_bar_right']} */ ;
148
- /** @type {__VLS_StyleScopedClasses['main_mid_content']} */ ;
149
- /** @type {__VLS_StyleScopedClasses['main_right']} */ ;
150
- // @ts-ignore
151
- var __VLS_30 = __VLS_29;
152
- const __VLS_export = (await import('vue')).defineComponent({
153
- __typeProps: {},
154
- props: {},
155
- });
156
- export default {};
@@ -1,104 +0,0 @@
1
- import { vLoading } from 'element-plus';
2
- import { onMounted, onUnmounted, watch } from 'vue';
3
- import { storeToRefs } from 'pinia';
4
- import { debounce } from '@jnrs/shared/lodash';
5
- import { useDataStore, useAppStore } from '@/stores';
6
- const sharedStore = useDataStore();
7
- const previewStore = useAppStore();
8
- const { casesLoading, cases } = storeToRefs(sharedStore);
9
- const { updateCases } = sharedStore;
10
- const { currentCase } = storeToRefs(previewStore);
11
- const { initContainer, resizeContainer, destroyContainer, operating } = previewStore;
12
- const props = withDefaults(defineProps(), {
13
- actions: () => ({})
14
- });
15
- // 加载 cases 数据
16
- const handleLoadCases = async () => {
17
- if (!props.actions.loadCases) {
18
- console.warn('加载 cases 数据失败,请先配置 loadCases 方法');
19
- return false;
20
- }
21
- casesLoading.value = true;
22
- try {
23
- const res = await props.actions.loadCases();
24
- updateCases(res);
25
- }
26
- catch (error) {
27
- console.error('loadCases:', error);
28
- }
29
- finally {
30
- casesLoading.value = false;
31
- }
32
- };
33
- // 重置窗口大小
34
- const resize = debounce(() => {
35
- resizeContainer();
36
- }, 500);
37
- watch(() => props.caseUuid, async (caseUuid) => {
38
- if (caseUuid) {
39
- // 先获取 sharedStore 内的方案列表数据,没有的话就进行获取
40
- if (!cases.value || cases.value.length === 0) {
41
- await handleLoadCases();
42
- }
43
- initContainer({
44
- appDomId: 'lingshu-smart-previewApp',
45
- appEditable: false,
46
- actions: {
47
- onTap: props.actions.onTap,
48
- onMenuTap: props.actions.onMenuTap,
49
- onDragEnd: props.actions.onDragEnd
50
- }
51
- }, caseUuid);
52
- }
53
- }, { immediate: false });
54
- onMounted(async () => {
55
- window.addEventListener('resize', resize);
56
- });
57
- onUnmounted(() => {
58
- destroyContainer();
59
- window.removeEventListener('resize', resize);
60
- });
61
- const __VLS_exposed = {
62
- currentCase,
63
- operating
64
- };
65
- defineExpose(__VLS_exposed);
66
- debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
67
- const __VLS_defaults = {
68
- actions: () => ({})
69
- };
70
- const __VLS_ctx = {
71
- ...{},
72
- ...{},
73
- ...{},
74
- ...{},
75
- };
76
- let __VLS_components;
77
- let __VLS_directives;
78
- __VLS_asFunctionalElement(__VLS_intrinsics.div, __VLS_intrinsics.div)({
79
- ...{ class: "lingshu-smart" },
80
- 'element-loading-background': "rgba(0, 0, 0, 0.5)",
81
- 'element-loading-text': "方案加载中",
82
- });
83
- __VLS_asFunctionalDirective(__VLS_directives.vLoading)(null, { ...__VLS_directiveBindingRestFields, value: (__VLS_ctx.casesLoading) }, null, null);
84
- // @ts-ignore
85
- [vLoading, casesLoading,];
86
- __VLS_asFunctionalElement(__VLS_intrinsics.canvas, __VLS_intrinsics.canvas)({
87
- id: "lingshu-smart-previewApp",
88
- });
89
- if (!__VLS_ctx.currentCase) {
90
- // @ts-ignore
91
- [currentCase,];
92
- __VLS_asFunctionalElement(__VLS_intrinsics.div, __VLS_intrinsics.div)({
93
- ...{ class: "preset" },
94
- });
95
- __VLS_asFunctionalElement(__VLS_intrinsics.i, __VLS_intrinsics.i)({});
96
- }
97
- /** @type {__VLS_StyleScopedClasses['lingshu-smart']} */ ;
98
- /** @type {__VLS_StyleScopedClasses['preset']} */ ;
99
- const __VLS_export = (await import('vue')).defineComponent({
100
- setup: () => (__VLS_exposed),
101
- __typeProps: {},
102
- props: {},
103
- });
104
- export default {};
@@ -1,135 +0,0 @@
1
- /**
2
- * @Author : TanRui
3
- * @WeChat : Tan578853789
4
- * @File : useStepRecord.ts
5
- * @Date : 2026/03/05
6
- * @Desc. : 编辑操作记录 Hook (撤销/重做 + 跳转任意历史点)
7
- * TODO: 未来可迁移至 IndexedDB 以支持持久化
8
- */
9
- import { EnumStepType } from '@/types';
10
- import { storeToRefs } from 'pinia';
11
- import { ref, computed, watch, nextTick } from 'vue';
12
- import { debounce, cloneDeep } from '@jnrs/shared/lodash';
13
- import objectHash from 'object-hash';
14
- import { useDataStore } from '@/stores';
15
- const MAX_OPERATION_RECORD_LENGTH = 10;
16
- export function useStepRecord() {
17
- const sharedStore = useDataStore();
18
- const { cases } = storeToRefs(sharedStore);
19
- const { updateCases } = sharedStore;
20
- const operationRecord = ref([]);
21
- const currentOperationRecordIndex = ref(-1);
22
- const isRecordingLocked = ref(false);
23
- const operationRecordStatus = computed(() => {
24
- const len = operationRecord.value.length;
25
- return {
26
- canUndo: currentOperationRecordIndex.value > 0,
27
- canRedo: currentOperationRecordIndex.value < len - 1,
28
- totalSteps: len,
29
- currentIndex: currentOperationRecordIndex.value
30
- };
31
- });
32
- const recordOperation = debounce((caseData, hash) => {
33
- if (!caseData || !hash)
34
- return;
35
- const caseDataString = JSON.stringify(caseData);
36
- const currentLen = operationRecord.value.length;
37
- if (currentOperationRecordIndex.value === currentLen - 1) {
38
- if (currentLen >= MAX_OPERATION_RECORD_LENGTH) {
39
- operationRecord.value.shift();
40
- // 如果移除了最旧项,索引需同步调整(但此时在末尾,不影响)
41
- }
42
- if (currentLen > 0 && operationRecord.value[currentLen - 1]?.hash === hash) {
43
- return;
44
- }
45
- operationRecord.value.push({ hash, data: caseDataString });
46
- currentOperationRecordIndex.value = operationRecord.value.length - 1;
47
- }
48
- else {
49
- // 在历史中间操作:截断后续
50
- operationRecord.value.splice(currentOperationRecordIndex.value + 1);
51
- operationRecord.value.push({ hash, data: caseDataString });
52
- currentOperationRecordIndex.value = operationRecord.value.length - 1;
53
- }
54
- }, 300);
55
- const applyStateFromIndex = (index) => {
56
- const record = operationRecord.value[index];
57
- try {
58
- const caseData = JSON.parse(record.data);
59
- updateCases(caseData);
60
- }
61
- catch (e) {
62
- console.error('Failed to parse step record', e);
63
- }
64
- };
65
- const handleOperationRecordChange = (type) => {
66
- const { canUndo, canRedo } = operationRecordStatus.value;
67
- if (type === EnumStepType.UNDO && !canUndo)
68
- return;
69
- if (type === EnumStepType.REDO && !canRedo)
70
- return;
71
- isRecordingLocked.value = true;
72
- if (type === EnumStepType.UNDO) {
73
- currentOperationRecordIndex.value -= 1;
74
- }
75
- else if (type === EnumStepType.REDO) {
76
- currentOperationRecordIndex.value += 1;
77
- }
78
- applyStateFromIndex(currentOperationRecordIndex.value);
79
- nextTick(() => {
80
- isRecordingLocked.value = false;
81
- });
82
- };
83
- /**
84
- * 跳转到任意历史步骤(不修改历史记录,仅切换状态)
85
- * @param index 目标历史索引(0-based)
86
- */
87
- const jumpToStep = (index) => {
88
- const len = operationRecord.value.length;
89
- if (len === 0 || index < 0 || index >= len) {
90
- return;
91
- }
92
- // 加锁,防止触发 watch 记录
93
- isRecordingLocked.value = true;
94
- currentOperationRecordIndex.value = index;
95
- applyStateFromIndex(index);
96
- nextTick(() => {
97
- isRecordingLocked.value = false;
98
- });
99
- };
100
- const resetFlags = (data) => {
101
- if (!Array.isArray(data))
102
- return;
103
- data.forEach((item) => {
104
- if (item && typeof item === 'object') {
105
- if (Array.isArray(item.layers)) {
106
- item.layers.forEach((layer) => {
107
- if (layer && typeof layer === 'object') {
108
- layer.selected = false;
109
- }
110
- });
111
- }
112
- }
113
- });
114
- };
115
- watch(cases, (nv) => {
116
- if (isRecordingLocked.value || !nv)
117
- return;
118
- const nvClone = cloneDeep(nv);
119
- resetFlags(nvClone);
120
- const casesNvHash = objectHash(nvClone);
121
- const currentRecord = currentOperationRecordIndex.value >= 0 ? operationRecord.value[currentOperationRecordIndex.value] : null;
122
- if (currentRecord && currentRecord.hash === casesNvHash) {
123
- return;
124
- }
125
- recordOperation(nvClone, casesNvHash);
126
- }, { deep: true, immediate: true });
127
- return {
128
- MAX_OPERATION_RECORD_LENGTH,
129
- operationRecord,
130
- currentOperationRecordIndex,
131
- operationRecordStatus,
132
- handleOperationRecordChange,
133
- jumpToStep
134
- };
135
- }