@xtctwins/tctwins-industry-engine 0.0.12 → 0.1.0

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 (105) hide show
  1. package/README.md +196 -3
  2. package/dist/01.xtc +0 -0
  3. package/dist/02.xtc +0 -0
  4. package/dist/03.xtc +0 -0
  5. package/dist/AnnotationTool-DfcSXn-d.mjs +166 -0
  6. package/dist/CameraViewTool-C91GKumm.mjs +164 -0
  7. package/dist/CommentTool-CR1yMDYP.mjs +1528 -0
  8. package/dist/HiddenTool-iCXaAMtS.mjs +56 -0
  9. package/dist/Industry_Viewer_Lib.es.js +10 -5
  10. package/dist/Industry_Viewer_Lib.umd.js +264 -237
  11. package/dist/InspectorTool-MyLTC7qp.mjs +679 -0
  12. package/dist/MeasureTool-BpomWCXl.mjs +593 -0
  13. package/dist/MouseTool-COWvA8Jk.mjs +84 -0
  14. package/dist/NavigateTool-DeMrrYoS.mjs +51 -0
  15. package/dist/OperateTool-DSZCJVkD.mjs +185 -0
  16. package/dist/RoamTool-0E0ls2Cx.mjs +287 -0
  17. package/dist/ScreenShotTool-viitj9zy.mjs +429 -0
  18. package/dist/SectionTool-Bz1c26fa.mjs +241 -0
  19. package/dist/SettingTool-BlsqUNQM.mjs +1745 -0
  20. package/dist/StructureTree-Dke0hMRC.mjs +1685 -0
  21. package/dist/alert-CgfjcpRo.mjs +52 -0
  22. package/dist/index-COQ8NdId.mjs +138714 -0
  23. package/dist/index.html +17 -0
  24. package/dist/{panel.vue_vue_type_style_index_0_lang-CCuIP-Pp.mjs → panel.vue_vue_type_style_index_0_lang-B-dNXuRK.mjs} +3 -3
  25. package/dist/style.css +3 -1
  26. package/dist/{tallPanel-CqKqC6yK.mjs → tallPanel-B-5hSZt6.mjs} +24 -24
  27. package/dist/timer-DoTiGoWP.mjs +30 -0
  28. package/package.json +85 -66
  29. package/types/App.vue.d.ts +3 -1
  30. package/types/components/BCFComponents/BCFAddPanel.vue.d.ts +1 -1
  31. package/types/components/BCFComponents/BCFDetailPanel.vue.d.ts +1 -1
  32. package/types/components/BCFComponents/BCFFilter.vue.d.ts +2 -2
  33. package/types/components/BCFComponents/commentInput.vue.d.ts +1 -1
  34. package/types/components/BCFComponents/commentsView.vue.d.ts +6 -6
  35. package/types/components/BCFComponents/imageView.vue.d.ts +1 -1
  36. package/types/components/BimViewerComponents/AnnotationTool.vue.d.ts +1 -1
  37. package/types/components/BimViewerComponents/CameraViewTool.vue.d.ts +12 -0
  38. package/types/components/BimViewerComponents/CommentTool.vue.d.ts +34 -1
  39. package/types/components/BimViewerComponents/MobileCommentsTool/add.vue.d.ts +14 -0
  40. package/types/components/BimViewerComponents/MobileCommentsTool/detail.vue.d.ts +11 -0
  41. package/types/components/BimViewerComponents/MobileCommentsTool/draw.vue.d.ts +17 -0
  42. package/types/components/BimViewerComponents/MobileCommentsTool/filter.vue.d.ts +275 -0
  43. package/types/components/BimViewerComponents/MobileCommentsTool/list.vue.d.ts +297 -0
  44. package/types/components/BimViewerComponents/MobileCommentsTool/zoomIn.vue.d.ts +9 -0
  45. package/types/components/BimViewerComponents/OperateTool.vue.d.ts +12 -0
  46. package/types/components/BimViewerComponents/PCCommentTool/pcdraw.vue.d.ts +14 -0
  47. package/types/components/BimViewerComponents/SectionModeBar.vue.d.ts +2 -0
  48. package/types/components/BimViewerComponents/StructureTree.vue.d.ts +8035 -419
  49. package/types/components/{industryViewer.vue.d.ts → BimxViewerComp.vue.d.ts} +7 -0
  50. package/types/components/IndustryViewerComp.vue.d.ts +25 -0
  51. package/types/components/MobileBCFComponents/MobileBCFAdd.vue.d.ts +1 -1
  52. package/types/components/MobileBCFComponents/MobileBCFDetail.vue.d.ts +1 -1
  53. package/types/components/MobileBCFComponents/MobileBCFDisplayList.vue.d.ts +100 -308
  54. package/types/components/MobileBCFComponents/MobileBCFFilter.vue.d.ts +100 -308
  55. package/types/components/MobileBCFComponents/MobileBCFTool.vue.d.ts +2 -0
  56. package/types/components/MobileBCFComponents/MobileCommentInput.vue.d.ts +4 -4
  57. package/types/components/utilsComponents/alert.vue.d.ts +9 -0
  58. package/types/components/utilsComponents/prompt.vue.d.ts +8 -0
  59. package/types/components/utilsComponents/rectangleButton.vue.d.ts +1 -1
  60. package/types/i18n/index.d.ts +1767 -0
  61. package/types/i18n/locales/en-US.d.ts +439 -0
  62. package/types/i18n/locales/zh-CN.d.ts +439 -0
  63. package/types/i18n/types.d.ts +144 -0
  64. package/types/index.d.ts +8 -5
  65. package/types/pages/{viewerEntry.vue.d.ts → BimxViewerEntry.vue.d.ts} +20 -8
  66. package/types/pages/IndustryViewerEntry.vue.d.ts +71 -0
  67. package/types/services/request/api.d.ts +3 -0
  68. package/types/services/request/index.d.ts +14 -0
  69. package/types/services/request/types.d.ts +12 -0
  70. package/types/store/bcfReflect.d.ts +8 -7
  71. package/types/store/const.d.ts +32 -3
  72. package/types/store/initConfigs.d.ts +3 -3
  73. package/types/store/localeStore.d.ts +12 -0
  74. package/types/store/propertyReflect.d.ts +1 -1
  75. package/types/store/toolbars.d.ts +596 -75
  76. package/types/store/userInfoStore.d.ts +32 -0
  77. package/types/tests/bcf.d.ts +8 -0
  78. package/types/utils/OSSHelper.d.ts +3 -0
  79. package/types/utils/eventBus.d.ts +23 -5
  80. package/types/utils/roles.d.ts +1 -1
  81. package/types/utils/splitType.d.ts +1 -0
  82. package/types/viewerManager/initial/viewerInitial.d.ts +14 -1
  83. package/types/viewerManager/load/loadModel.d.ts +137 -1
  84. package/types/viewerManager/sectionManager.d.ts +524 -0
  85. package/types/viewerManager/viewerManager.d.ts +19 -1
  86. package/dist/AnnotationTool-f7CrC7Dr.mjs +0 -131
  87. package/dist/BCFTool-CdN6SGDL.mjs +0 -25118
  88. package/dist/CommentTool-Cfht7mQS.mjs +0 -168
  89. package/dist/InspectorTool-M_oBYVQA.mjs +0 -674
  90. package/dist/MeasureTool-CxWeQFgY.mjs +0 -167
  91. package/dist/MouseTool-BHbi-fg3.mjs +0 -84
  92. package/dist/NavigateTool-BdUVi4Be.mjs +0 -52
  93. package/dist/RoamTool-Uuxa-94w.mjs +0 -212
  94. package/dist/ScreenShotTool-CZUm8l2Z.mjs +0 -445
  95. package/dist/SectionTool-DZToybAI.mjs +0 -217
  96. package/dist/SettingTool-CYM0qsUs.mjs +0 -770
  97. package/dist/StructureTree-DeXxENMk.mjs +0 -1824
  98. package/dist/XRayTool-Bug-FcKJ.mjs +0 -57
  99. package/dist/alert-DGyQ9rEq.mjs +0 -46
  100. package/dist/const-DeViLYl5.mjs +0 -266
  101. package/dist/el-checkbox-ClYe-8uK.mjs +0 -544
  102. package/dist/el-input-number-Df5HOHuh.mjs +0 -1028
  103. package/dist/index-BNrMlQLr.mjs +0 -101871
  104. /package/types/components/BimViewerComponents/{mobileToolbar.vue.d.ts → AppToolbar.vue.d.ts} +0 -0
  105. /package/types/components/BimViewerComponents/{XRayTool.vue.d.ts → HiddenTool.vue.d.ts} +0 -0
@@ -1,445 +0,0 @@
1
- import { _ as _e } from "./panel.vue_vue_type_style_index_0_lang-CCuIP-Pp.mjs";
2
- import { j as K, L as W, d as X, b as P, M as G, U as L, P as H, l as Y, a as Se, Q as he, R as ke, _ as U, u as x, S as Re, t as q, W as Ve, X as Ee, Y as Ce, x as Ie, n as Be, Z as we, $ as Q, w as Pe, z as $e, C as ze } from "./index-BNrMlQLr.mjs";
3
- import { ref as E, inject as Ne, computed as h, defineComponent as $, createElementBlock as C, openBlock as V, normalizeClass as R, unref as e, createElementVNode as _, withDirectives as Z, withModifiers as B, isRef as J, vModelRadio as ee, renderSlot as T, createTextVNode as w, toDisplayString as D, nextTick as oe, normalizeStyle as Ge, onMounted as ae, provide as Le, reactive as Ue, toRefs as xe, watch as le, Fragment as te, renderList as ne, createBlock as se, resolveDynamicComponent as Te, mergeProps as De, withCtx as z, createVNode as I, createCommentVNode as Ae } from "vue";
4
- import { a as N } from "./const-DeViLYl5.mjs";
5
- const re = P({
6
- modelValue: {
7
- type: [String, Number, Boolean],
8
- default: void 0
9
- },
10
- size: H,
11
- disabled: {
12
- type: Boolean,
13
- default: void 0
14
- },
15
- label: {
16
- type: [String, Number, Boolean],
17
- default: void 0
18
- },
19
- value: {
20
- type: [String, Number, Boolean],
21
- default: void 0
22
- },
23
- name: {
24
- type: String,
25
- default: void 0
26
- }
27
- }), Fe = P({
28
- ...re,
29
- border: Boolean
30
- }), ie = {
31
- [L]: (r) => K(r) || W(r) || X(r),
32
- [G]: (r) => K(r) || W(r) || X(r)
33
- }, de = Symbol("radioGroupKey"), ue = (r, k) => {
34
- const l = E(), i = Ne(de, void 0), a = h(() => !!i), b = h(() => Y(r.value) ? r.label : r.value), p = h({
35
- get() {
36
- return a.value ? i.modelValue : r.modelValue;
37
- },
38
- set(v) {
39
- a.value ? i.changeEvent(v) : k && k(L, v), l.value.checked = r.modelValue === b.value;
40
- }
41
- }), d = Se(h(() => i == null ? void 0 : i.size)), u = he(h(() => i == null ? void 0 : i.disabled)), y = E(!1), m = h(() => u.value || a.value && p.value !== b.value ? -1 : 0);
42
- return ke(
43
- {
44
- from: "label act as value",
45
- replacement: "value",
46
- version: "3.0.0",
47
- scope: "el-radio",
48
- ref: "https://element-plus.org/en-US/component/radio.html"
49
- },
50
- h(() => a.value && Y(r.value))
51
- ), {
52
- radioRef: l,
53
- isGroup: a,
54
- radioGroup: i,
55
- focus: y,
56
- size: d,
57
- disabled: u,
58
- tabIndex: m,
59
- modelValue: p,
60
- actualValue: b
61
- };
62
- }, Me = ["value", "name", "disabled", "checked"], je = $({
63
- name: "ElRadio",
64
- __name: "radio",
65
- props: Fe,
66
- emits: ie,
67
- setup(r, { emit: k }) {
68
- const l = r, i = k, a = x("radio"), { radioRef: b, radioGroup: p, focus: d, size: u, disabled: y, modelValue: m, actualValue: v } = ue(l, i);
69
- function f() {
70
- oe(() => i(G, m.value));
71
- }
72
- return (t, o) => {
73
- var n;
74
- return V(), C(
75
- "label",
76
- {
77
- class: R([
78
- e(a).b(),
79
- e(a).is("disabled", e(y)),
80
- e(a).is("focus", e(d)),
81
- e(a).is("bordered", t.border),
82
- e(a).is("checked", e(m) === e(v)),
83
- e(a).m(e(u))
84
- ])
85
- },
86
- [
87
- _(
88
- "span",
89
- {
90
- class: R([
91
- e(a).e("input"),
92
- e(a).is("disabled", e(y)),
93
- e(a).is("checked", e(m) === e(v))
94
- ])
95
- },
96
- [
97
- Z(_("input", {
98
- ref_key: "radioRef",
99
- ref: b,
100
- "onUpdate:modelValue": o[0] || (o[0] = (s) => J(m) ? m.value = s : null),
101
- class: R(e(a).e("original")),
102
- value: e(v),
103
- name: t.name || ((n = e(p)) == null ? void 0 : n.name),
104
- disabled: e(y),
105
- checked: e(m) === e(v),
106
- type: "radio",
107
- onFocus: o[1] || (o[1] = (s) => d.value = !0),
108
- onBlur: o[2] || (o[2] = (s) => d.value = !1),
109
- onChange: f,
110
- onClick: o[3] || (o[3] = B(() => {
111
- }, ["stop"]))
112
- }, null, 42, Me), [
113
- [ee, e(m)]
114
- ]),
115
- _(
116
- "span",
117
- {
118
- class: R(e(a).e("inner"))
119
- },
120
- null,
121
- 2
122
- )
123
- ],
124
- 2
125
- ),
126
- _(
127
- "span",
128
- {
129
- class: R(e(a).e("label")),
130
- onKeydown: o[4] || (o[4] = B(() => {
131
- }, ["stop"]))
132
- },
133
- [
134
- T(t.$slots, "default", {}, () => [
135
- w(
136
- D(t.label),
137
- 1
138
- )
139
- ])
140
- ],
141
- 34
142
- )
143
- ],
144
- 2
145
- );
146
- };
147
- }
148
- });
149
- var ce = /* @__PURE__ */ U(je, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/radio/src/radio.vue"]]);
150
- const Oe = P({
151
- ...re
152
- }), Ke = ["value", "name", "disabled"], We = $({
153
- name: "ElRadioButton",
154
- __name: "radio-button",
155
- props: Oe,
156
- setup(r) {
157
- const k = r, l = x("radio"), { radioRef: i, focus: a, size: b, disabled: p, modelValue: d, radioGroup: u, actualValue: y } = ue(k), m = h(() => ({
158
- backgroundColor: (u == null ? void 0 : u.fill) || "",
159
- borderColor: (u == null ? void 0 : u.fill) || "",
160
- boxShadow: u != null && u.fill ? `-1px 0 0 0 ${u.fill}` : "",
161
- color: (u == null ? void 0 : u.textColor) || ""
162
- }));
163
- return (v, f) => {
164
- var t;
165
- return V(), C(
166
- "label",
167
- {
168
- class: R([
169
- e(l).b("button"),
170
- e(l).is("active", e(d) === e(y)),
171
- e(l).is("disabled", e(p)),
172
- e(l).is("focus", e(a)),
173
- e(l).bm("button", e(b))
174
- ])
175
- },
176
- [
177
- Z(_("input", {
178
- ref_key: "radioRef",
179
- ref: i,
180
- "onUpdate:modelValue": f[0] || (f[0] = (o) => J(d) ? d.value = o : null),
181
- class: R(e(l).be("button", "original-radio")),
182
- value: e(y),
183
- type: "radio",
184
- name: v.name || ((t = e(u)) == null ? void 0 : t.name),
185
- disabled: e(p),
186
- onFocus: f[1] || (f[1] = (o) => a.value = !0),
187
- onBlur: f[2] || (f[2] = (o) => a.value = !1),
188
- onClick: f[3] || (f[3] = B(() => {
189
- }, ["stop"]))
190
- }, null, 42, Ke), [
191
- [ee, e(d)]
192
- ]),
193
- _(
194
- "span",
195
- {
196
- class: R(e(l).be("button", "inner")),
197
- style: Ge(e(d) === e(y) ? m.value : {}),
198
- onKeydown: f[4] || (f[4] = B(() => {
199
- }, ["stop"]))
200
- },
201
- [
202
- T(v.$slots, "default", {}, () => [
203
- w(
204
- D(v.label),
205
- 1
206
- )
207
- ])
208
- ],
209
- 38
210
- )
211
- ],
212
- 2
213
- );
214
- };
215
- }
216
- });
217
- var A = /* @__PURE__ */ U(We, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/radio/src/radio-button.vue"]]);
218
- const Xe = P({
219
- id: {
220
- type: String,
221
- default: void 0
222
- },
223
- size: H,
224
- disabled: {
225
- type: Boolean,
226
- default: void 0
227
- },
228
- modelValue: {
229
- type: [String, Number, Boolean],
230
- default: void 0
231
- },
232
- fill: {
233
- type: String,
234
- default: ""
235
- },
236
- textColor: {
237
- type: String,
238
- default: ""
239
- },
240
- name: {
241
- type: String,
242
- default: void 0
243
- },
244
- validateEvent: {
245
- type: Boolean,
246
- default: !0
247
- },
248
- options: {
249
- type: q(Array)
250
- },
251
- props: {
252
- type: q(Object),
253
- default: () => pe
254
- },
255
- type: {
256
- type: String,
257
- values: ["radio", "button"],
258
- default: "radio"
259
- },
260
- ...Re(["ariaLabel"])
261
- }), Ye = ie, pe = {
262
- label: "label",
263
- value: "value",
264
- disabled: "disabled"
265
- }, qe = ["id", "aria-label", "aria-labelledby"], He = $({
266
- name: "ElRadioGroup",
267
- __name: "radio-group",
268
- props: Xe,
269
- emits: Ye,
270
- setup(r, { emit: k }) {
271
- const l = r, i = k, a = x("radio"), b = Ve(), p = E(), { formItem: d } = Ee(), { inputId: u, isLabeledByFormItem: y } = Ce(l, {
272
- formItemContext: d
273
- }), m = (n) => {
274
- i(L, n), oe(() => i(G, n));
275
- };
276
- ae(() => {
277
- const n = p.value.querySelectorAll("[type=radio]"), s = n[0];
278
- !Array.from(n).some((g) => g.checked) && s && (s.tabIndex = 0);
279
- });
280
- const v = h(() => l.name || b.value), f = h(() => ({
281
- ...pe,
282
- ...l.props
283
- })), t = (n) => {
284
- const { label: s, value: g, disabled: S } = f.value, c = {
285
- label: n[s],
286
- value: n[g],
287
- disabled: n[S]
288
- };
289
- return { ...we(n, [s, g, S]), ...c };
290
- }, o = h(
291
- () => l.type === "button" ? A : ce
292
- );
293
- return Le(
294
- de,
295
- Ue({
296
- ...xe(l),
297
- changeEvent: m,
298
- name: v
299
- })
300
- ), le(
301
- () => l.modelValue,
302
- (n, s) => {
303
- l.validateEvent && !Ie(n, s) && (d == null || d.validate("change").catch((g) => Be(g)));
304
- }
305
- ), (n, s) => (V(), C("div", {
306
- id: e(u),
307
- ref_key: "radioGroupRef",
308
- ref: p,
309
- class: R(e(a).b("group")),
310
- role: "radiogroup",
311
- "aria-label": e(y) ? void 0 : n.ariaLabel || "radio-group",
312
- "aria-labelledby": e(y) ? e(d).labelId : void 0
313
- }, [
314
- T(n.$slots, "default", {}, () => [
315
- (V(!0), C(
316
- te,
317
- null,
318
- ne(n.options, (g, S) => (V(), se(
319
- Te(o.value),
320
- De({ key: S }, { ref_for: !0 }, t(g)),
321
- null,
322
- 16
323
- ))),
324
- 128
325
- ))
326
- ])
327
- ], 10, qe));
328
- }
329
- });
330
- var me = /* @__PURE__ */ U(He, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/radio/src/radio-group.vue"]]);
331
- const Qe = Pe(ce, {
332
- RadioButton: A,
333
- RadioGroup: me
334
- }), Ze = Q(me);
335
- Q(A);
336
- const Je = { class: "wrapper" }, eo = { class: "screen_thumbnail" }, oo = ["src"], ao = { class: "validity-period" }, lo = {
337
- key: 0,
338
- class: "custom"
339
- }, io = /* @__PURE__ */ $({
340
- __name: "ScreenShotTool",
341
- props: ["componentId"],
342
- emits: ["closePanel"],
343
- setup(r, { emit: k }) {
344
- const l = $e(), i = r, a = E(0), b = E(), p = E(), d = E(), u = k;
345
- ae(() => {
346
- b.value = 1280, p.value = 720, l.setReadyById(i.componentId);
347
- }), le(
348
- () => l.isToolActive(i.componentId),
349
- (t) => {
350
- t && v(220, 124, !1);
351
- }
352
- );
353
- const y = (t) => {
354
- a.value = t, t !== 3 && (b.value = N[t].width, p.value = N[t].height);
355
- }, m = () => {
356
- u("closePanel");
357
- }, v = (t, o, n) => {
358
- const s = document.getElementById("myCanvas"), g = document.createElement("a");
359
- g.download = "screenshot.png";
360
- const S = document.createElement("canvas"), c = S.getContext("2d");
361
- if (s && c) {
362
- S.width = t, S.height = o;
363
- const ve = t / s.width, fe = o / s.height, F = Math.max(ve, fe), M = s.width * F, j = s.height * F, be = (t - M) / 2, ge = (o - j) / 2;
364
- c.clearRect(0, 0, t, o), c.fillStyle = "transparent", c.fillRect(0, 0, t, o), c.drawImage(s, 0, 0, s.width, s.height, be, ge, M, j), n ? S.toBlob(function(ye) {
365
- const O = URL.createObjectURL(ye);
366
- g.href = O, g.click(), URL.revokeObjectURL(O);
367
- }) : d.value = S.toDataURL("image/png");
368
- }
369
- }, f = () => {
370
- v(b.value, p.value, !0);
371
- };
372
- return (t, o) => {
373
- const n = Qe, s = Ze, g = ze, S = _e;
374
- return V(), se(S, {
375
- class: "screen_container",
376
- width: 240,
377
- panelTitle: "截图",
378
- "click-handle": m
379
- }, {
380
- default: z(() => [
381
- _("div", Je, [
382
- _("div", eo, [
383
- _("img", {
384
- class: "thumbnail_img",
385
- src: d.value,
386
- alt: ""
387
- }, null, 8, oo)
388
- ]),
389
- I(s, {
390
- modelValue: a.value,
391
- "onUpdate:modelValue": o[0] || (o[0] = (c) => a.value = c),
392
- onChange: y
393
- }, {
394
- default: z(() => [
395
- _("div", ao, [
396
- (V(!0), C(te, null, ne(e(N), (c) => (V(), C("div", {
397
- key: c.id,
398
- class: "period_box"
399
- }, [
400
- I(n, {
401
- label: c.id
402
- }, {
403
- default: z(() => [
404
- w(D(c.name), 1)
405
- ]),
406
- _: 2
407
- }, 1032, ["label"])
408
- ]))), 128))
409
- ])
410
- ]),
411
- _: 1
412
- }, 8, ["modelValue"]),
413
- a.value === 3 ? (V(), C("div", lo, [
414
- I(g, {
415
- modelValue: b.value,
416
- "onUpdate:modelValue": o[1] || (o[1] = (c) => b.value = c),
417
- placeholder: "请输入长度"
418
- }, null, 8, ["modelValue"]),
419
- o[3] || (o[3] = w(" x ", -1)),
420
- I(g, {
421
- modelValue: p.value,
422
- "onUpdate:modelValue": o[2] || (o[2] = (c) => p.value = c),
423
- placeholder: "请输入宽度"
424
- }, null, 8, ["modelValue"])
425
- ])) : Ae("", !0),
426
- _("div", { class: "footer" }, [
427
- _("div", {
428
- class: "btn1",
429
- onClick: m
430
- }, " 取消 "),
431
- _("div", {
432
- class: "btn2",
433
- onClick: f
434
- }, " 保存 ")
435
- ])
436
- ])
437
- ]),
438
- _: 1
439
- });
440
- };
441
- }
442
- });
443
- export {
444
- io as default
445
- };
@@ -1,217 +0,0 @@
1
- import { _ as W } from "./alert-DGyQ9rEq.mjs";
2
- import { z as X, T as B, A as b, B as E, F as Y, D as Z, O as m, G as q } from "./index-BNrMlQLr.mjs";
3
- import { E as H } from "./el-input-number-Df5HOHuh.mjs";
4
- import { defineComponent as J, ref as s, onMounted as K, watch as Q, onBeforeUnmount as ee, createElementBlock as l, openBlock as c, Fragment as oe, createElementVNode as o, withDirectives as te, createVNode as v, withCtx as ie, unref as r, toDisplayString as h, vShow as ne } from "vue";
5
- const se = { class: "mobile_section_panel" }, le = { class: "slicing-title-box" }, ce = { class: "slicing-title-icon" }, re = { class: "slicing-content-box" }, ae = { class: "slicing-select-box" }, de = { class: "select-item" }, ue = { class: "select-item-left" }, me = ["src"], ve = ["src"], _e = { class: "select-item-center" }, we = { class: "item-center-top" }, pe = { class: "item-center-bottom" }, ge = { class: "select-item" }, be = { class: "select-item-left" }, fe = ["src"], ke = ["src"], he = { class: "select-item-center" }, ye = { class: "item-center-top" }, Ve = { class: "item-center-bottom" }, Te = { class: "select-item" }, xe = { class: "select-item-left" }, Ce = ["src"], Pe = ["src"], Se = { class: "select-item-center" }, ze = { class: "item-center-top" }, Be = { class: "item-center-bottom" }, Ee = /* @__PURE__ */ J({
6
- __name: "SectionTool",
7
- props: ["componentId"],
8
- emits: ["closePanel"],
9
- setup(L, { emit: $ }) {
10
- const y = X(), V = L, T = s(0);
11
- K(() => {
12
- y.setReadyById(V.componentId), B.currentTheme == "blue" ? T.value = 240 : B.currentTheme == "light-gray" && (T.value = 202), document.addEventListener("click", x);
13
- });
14
- const x = (t) => {
15
- P.value && t.target.id != "controlOperatePanel" && D(!1);
16
- }, C = s(!0);
17
- s(!1);
18
- const p = s(), I = s(), P = s(!1), D = (t) => {
19
- P.value = t;
20
- };
21
- let _, g;
22
- const M = $;
23
- Q(
24
- () => y.isToolActive(V.componentId),
25
- (t) => {
26
- b("isMobile") && (t ? (w(a.value.direction), document.addEventListener("touchmove", z)) : document.removeEventListener("touchmove", z));
27
- }
28
- );
29
- let f = !1;
30
- const S = () => {
31
- _ = window.bimViewer.sectionTool, g = window.bimViewer.eventTrigger, b("isMobile") || g.on("createSection", (t) => {
32
- R(), p.value = Object.keys(N()).map((e) => ({
33
- id: e,
34
- isLook: !0,
35
- directionLeft: !0
36
- })), F(t.id, !0), I.value = t.id, U(t.id);
37
- }), b("isMobile") && (g.on("touchPlaneStart", () => {
38
- f = !0;
39
- }), g.on("touchPlaneEnd", () => {
40
- f = !1;
41
- }));
42
- };
43
- E.on("BimViewer", S), ee(() => {
44
- E.off("BimViewer", S), document.removeEventListener("click", x);
45
- });
46
- const z = () => {
47
- f && O();
48
- }, i = s({
49
- x: 0,
50
- y: 0,
51
- z: 0
52
- }), a = s({
53
- direction: "x"
54
- }), d = (t) => {
55
- w(t);
56
- }, w = (t) => {
57
- switch (a.value.direction = t, t) {
58
- case "x":
59
- window.bimViewer.sectionTool.sectionDirection = 0, window.bimViewer.sectionTool.setControlPos(100 - i.value.x);
60
- break;
61
- case "y":
62
- window.bimViewer.sectionTool.sectionDirection = 1, window.bimViewer.sectionTool.setControlPos(i.value.y);
63
- break;
64
- case "z":
65
- window.bimViewer.sectionTool.sectionDirection = 2, window.bimViewer.sectionTool.setControlPos(100 - i.value.z);
66
- break;
67
- }
68
- }, O = () => {
69
- switch (a.value.direction) {
70
- case "x":
71
- i.value.x = 100 - window.bimViewer.sectionTool.getControlPos();
72
- break;
73
- case "y":
74
- i.value.y = window.bimViewer.sectionTool.getControlPos();
75
- break;
76
- case "z":
77
- i.value.z = 100 - window.bimViewer.sectionTool.getControlPos();
78
- break;
79
- }
80
- }, A = () => {
81
- _.setActive(!1), M("closePanel");
82
- }, U = (t) => {
83
- _.showSectionPlane(t);
84
- }, F = (t, e) => {
85
- for (let u = 0; u < p.value.length; u++)
86
- t == p.value[u].id && (p.value[u].isLook = e);
87
- }, N = () => _.getSectionPlanes(), R = () => {
88
- _.hideControl();
89
- };
90
- return (t, e) => {
91
- const u = Y, k = H, j = Z, G = W;
92
- return c(), l(oe, null, [
93
- o("div", se, [
94
- o("div", le, [
95
- e[12] || (e[12] = o("div", { class: "slicing-title" }, "剖切", -1)),
96
- o("div", ce, [
97
- v(u, {
98
- width: 0.4,
99
- "size-type": "rem",
100
- "click-handle": A
101
- })
102
- ])
103
- ]),
104
- o("div", re, [
105
- v(j, null, {
106
- default: ie(() => [
107
- o("div", ae, [
108
- o("div", de, [
109
- o("div", ue, [
110
- a.value.direction === "x" ? (c(), l("img", {
111
- key: 0,
112
- src: r(m) + "/bim-viewer/section_look_icon.png",
113
- alt: "",
114
- onClick: e[0] || (e[0] = (n) => d("x"))
115
- }, null, 8, me)) : (c(), l("img", {
116
- key: 1,
117
- src: r(m) + "/bim-viewer/section_unlook_icon.png",
118
- alt: "",
119
- onClick: e[1] || (e[1] = (n) => d("x"))
120
- }, null, 8, ve))
121
- ]),
122
- o("div", _e, [
123
- o("div", we, [
124
- e[13] || (e[13] = o("div", null, "X轴", -1)),
125
- o("div", null, h(i.value.x) + " %", 1)
126
- ]),
127
- o("div", pe, [
128
- v(k, {
129
- modelValue: i.value.x,
130
- "onUpdate:modelValue": e[2] || (e[2] = (n) => i.value.x = n),
131
- size: "large",
132
- "show-tooltip": !1,
133
- onInput: e[3] || (e[3] = (n) => w("x"))
134
- }, null, 8, ["modelValue"])
135
- ])
136
- ])
137
- ]),
138
- o("div", ge, [
139
- o("div", be, [
140
- a.value.direction === "y" ? (c(), l("img", {
141
- key: 0,
142
- src: r(m) + "/bim-viewer/section_look_icon.png",
143
- alt: "",
144
- onClick: e[4] || (e[4] = (n) => d("y"))
145
- }, null, 8, fe)) : (c(), l("img", {
146
- key: 1,
147
- src: r(m) + "/bim-viewer/section_unlook_icon.png",
148
- alt: "",
149
- onClick: e[5] || (e[5] = (n) => d("y"))
150
- }, null, 8, ke))
151
- ]),
152
- o("div", he, [
153
- o("div", ye, [
154
- e[14] || (e[14] = o("div", null, "Y轴", -1)),
155
- o("div", null, h(i.value.y) + " %", 1)
156
- ]),
157
- o("div", Ve, [
158
- v(k, {
159
- modelValue: i.value.y,
160
- "onUpdate:modelValue": e[6] || (e[6] = (n) => i.value.y = n),
161
- size: "large",
162
- "show-tooltip": !1,
163
- onInput: e[7] || (e[7] = (n) => w("y"))
164
- }, null, 8, ["modelValue"])
165
- ])
166
- ])
167
- ]),
168
- o("div", Te, [
169
- o("div", xe, [
170
- a.value.direction === "z" ? (c(), l("img", {
171
- key: 0,
172
- src: r(m) + "/bim-viewer/section_look_icon.png",
173
- alt: "",
174
- onClick: e[8] || (e[8] = (n) => d("z"))
175
- }, null, 8, Ce)) : (c(), l("img", {
176
- key: 1,
177
- src: r(m) + "/bim-viewer/section_unlook_icon.png",
178
- alt: "",
179
- onClick: e[9] || (e[9] = (n) => d("z"))
180
- }, null, 8, Pe))
181
- ]),
182
- o("div", Se, [
183
- o("div", ze, [
184
- e[15] || (e[15] = o("div", null, "Z轴", -1)),
185
- o("div", null, h(i.value.z) + " %", 1)
186
- ]),
187
- o("div", Be, [
188
- v(k, {
189
- modelValue: i.value.z,
190
- "onUpdate:modelValue": e[10] || (e[10] = (n) => i.value.z = n),
191
- size: "large",
192
- "show-tooltip": !1,
193
- onInput: e[11] || (e[11] = (n) => w("z"))
194
- }, null, 8, ["modelValue"])
195
- ])
196
- ])
197
- ])
198
- ])
199
- ]),
200
- _: 1
201
- })
202
- ])
203
- ]),
204
- te(v(G, {
205
- "click-handle": () => {
206
- C.value = !1;
207
- }
208
- }, null, 8, ["click-handle"]), [
209
- [ne, C.value && !r(b)("isMobile")]
210
- ])
211
- ], 64);
212
- };
213
- }
214
- }), Me = /* @__PURE__ */ q(Ee, [["__scopeId", "data-v-3cbfe8c9"]]);
215
- export {
216
- Me as default
217
- };