@xtctwins/tctwins-industry-engine 0.1.3 → 0.1.4

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 (41) hide show
  1. package/README.md +198 -196
  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-C7l6-OOY.mjs → AnnotationTool-B-tSv3tj.mjs} +3 -3
  6. package/dist/{CameraViewTool-D_EQ41Z1.mjs → CameraViewTool-BCeW5YQi.mjs} +2 -2
  7. package/dist/CommentTool-BiNZ0gP0.mjs +1573 -0
  8. package/dist/{HiddenTool-CIeAjgxq.mjs → HiddenTool-CQgqgQOI.mjs} +2 -2
  9. package/dist/Industry_Viewer_Lib.es.js +1 -1
  10. package/dist/Industry_Viewer_Lib.umd.js +107 -107
  11. package/dist/{InspectorTool-CZod-iTj.mjs → InspectorTool-DdeeIiy6.mjs} +4 -4
  12. package/dist/{MeasureTool-D4LogF0O.mjs → MeasureTool-BWxDlOrg.mjs} +7 -7
  13. package/dist/{MouseTool-zmgqeZnH.mjs → MouseTool-BaWo19sf.mjs} +1 -1
  14. package/dist/{NavigateTool-CS2EopuR.mjs → NavigateTool-P2CQZ5uL.mjs} +1 -1
  15. package/dist/{OperateTool-CG2aVzKk.mjs → OperateTool-CL4Z9vC6.mjs} +28 -31
  16. package/dist/{RoamTool-BFL8VDlB.mjs → RoamTool-D50ZahpY.mjs} +14 -14
  17. package/dist/{ScreenShotTool-Dz5RLoqN.mjs → ScreenShotTool-DX4tJ4c7.mjs} +2 -2
  18. package/dist/{SectionTool-IkA1bJ2y.mjs → SectionTool-CHOZY2Ae.mjs} +4 -4
  19. package/dist/{SettingTool-DCIDMjRW.mjs → SettingTool-DYHEMpSZ.mjs} +3 -3
  20. package/dist/{StructureTree-BT4rCLqe.mjs → StructureTree-ln-gqr_v.mjs} +4 -4
  21. package/dist/{alert-LKnose49.mjs → alert-BlGVPNN7.mjs} +13 -13
  22. package/dist/{index-BDeMc4ft.mjs → index-DCtqSY0Q.mjs} +11663 -11666
  23. package/dist/index.html +17 -0
  24. package/dist/{panel.vue_vue_type_style_index_0_lang-CCRmuixj.mjs → panel.vue_vue_type_style_index_0_lang-vbG2ciOc.mjs} +1 -1
  25. package/dist/style.css +1 -1
  26. package/dist/{tallPanel-D4xjdoyB.mjs → tallPanel-C5ESC0HW.mjs} +6 -6
  27. package/package.json +85 -85
  28. package/types/components/BimViewerComponents/CommentTool.vue.d.ts +27 -0
  29. package/types/components/BimViewerComponents/MobileCommentsTool/filter.vue.d.ts +14 -14
  30. package/types/components/BimViewerComponents/MobileCommentsTool/list.vue.d.ts +14 -14
  31. package/types/components/BimViewerComponents/PCCommentTool/pcdraw.vue.d.ts +3 -1
  32. package/types/components/BimViewerComponents/StructureTree.vue.d.ts +184 -184
  33. package/types/components/BimxViewerComp.vue.d.ts +25 -0
  34. package/types/components/MobileBCFComponents/MobileBCFDisplayList.vue.d.ts +14 -14
  35. package/types/components/MobileBCFComponents/MobileBCFFilter.vue.d.ts +14 -14
  36. package/types/components/utilsComponents/tallPanel.vue.d.ts +1 -1
  37. package/types/components/utilsComponents/tallPanel_noPos.vue.d.ts +1 -1
  38. package/types/pages/BimxViewerEntry.vue.d.ts +71 -0
  39. package/types/pages/IndustryViewerEntry.vue.d.ts +6 -1
  40. package/types/store/initConfigs.d.ts +1 -1
  41. package/dist/CommentTool-p6Un2NpR.mjs +0 -1528
@@ -1,1528 +0,0 @@
1
- import { defineComponent as ne, ref as o, openBlock as n, createElementBlock as c, createElementVNode as e, unref as s, toDisplayString as a, withModifiers as Z, Fragment as G, renderList as q, createCommentVNode as A, createVNode as V, withCtx as ce, toRefs as Be, onMounted as me, watch as re, normalizeStyle as ee, createTextVNode as de, createBlock as oe, computed as ge, withDirectives as we, vShow as Ie, onBeforeUnmount as be, normalizeClass as ue } from "vue";
2
- import { P, M as ie, a5 as ke, F as ae, K as pe, a6 as xe, a7 as Te, a8 as De, a9 as Se, aa as fe, ab as ve, ac as _e, H as j, J as Ce, ad as ye, a4 as Me, ae as ze, af as Ee, ag as Oe, Z as Re, $ as Ne, I as K, G as $e, ah as Le, ai as Fe, aj as Ue, ak as Ae } from "./index-BDeMc4ft.mjs";
3
- import { T as He } from "./timer-DoTiGoWP.mjs";
4
- const We = { class: "prompt_wrapper" }, Ye = { class: "prompt_box" }, Je = ["src"], Ze = { class: "text" }, Ge = /* @__PURE__ */ ne({
5
- __name: "prompt",
6
- props: ["text", "type"],
7
- setup(W) {
8
- const Y = W, U = o(Y.type), h = o(Y.text);
9
- return (p, v) => (n(), c("div", We, [
10
- e("div", Ye, [
11
- e("img", {
12
- src: `${s(P)}/bim-viewer/prompt-${U.value}.svg`
13
- }, null, 8, Je),
14
- e("div", Ze, a(h.value), 1)
15
- ])
16
- ]));
17
- }
18
- }), Ke = /* @__PURE__ */ ie(Ge, [["__scopeId", "data-v-c9f53f5c"]]), Ve = {
19
- key: 0,
20
- class: "mobile-cmt-filter-container"
21
- }, Xe = {
22
- key: 0,
23
- class: "search-container"
24
- }, je = { class: "search-header" }, qe = { class: "title" }, Qe = ["src"], et = { class: "search-body" }, tt = { class: "search-list" }, st = { class: "item-left" }, ot = { class: "title" }, lt = { class: "item-right" }, nt = { class: "item-value" }, it = { class: "item-img" }, at = ["src"], ct = { class: "item-left" }, rt = { class: "title" }, ut = { class: "item-right" }, dt = { class: "item-value" }, mt = { class: "item-img" }, vt = ["src"], _t = { class: "item-left" }, pt = { class: "title" }, ht = { class: "item-right" }, gt = { class: "item-value" }, ft = { class: "item-img" }, bt = ["src"], kt = { class: "item-left" }, Ct = { class: "title" }, $t = { class: "item-right" }, yt = { class: "item-value" }, wt = { class: "item-img" }, It = ["src"], xt = { class: "item-left" }, Tt = { class: "title" }, Dt = { class: "item-right" }, St = { class: "item-tags" }, Lt = { class: "item-img" }, Pt = ["src"], Bt = { class: "search-footer" }, Mt = { class: "search-btn-group" }, zt = {
25
- key: 1,
26
- class: "filter-container"
27
- }, Et = { class: "filter-header" }, Ot = { class: "title" }, Rt = ["src"], Nt = { class: "filter-body" }, Ft = {
28
- key: 0,
29
- class: "filter-list"
30
- }, Ut = ["onClick"], At = { class: "item-left" }, Ht = { class: "title" }, Wt = { class: "item-right" }, Yt = {
31
- key: 0,
32
- class: "check-selected"
33
- }, Jt = ["src"], Zt = {
34
- key: 1,
35
- class: "check-select"
36
- }, Gt = {
37
- key: 1,
38
- class: "filter-list"
39
- }, Kt = ["onClick"], Vt = { class: "item-left" }, Xt = { class: "title" }, jt = { class: "item-right" }, qt = {
40
- key: 0,
41
- class: "check-selected"
42
- }, Qt = ["src"], es = {
43
- key: 1,
44
- class: "check-select"
45
- }, ts = {
46
- key: 2,
47
- class: "filter-list"
48
- }, ss = ["onClick"], os = { class: "item-left" }, ls = { class: "title" }, ns = { class: "item-right" }, is = {
49
- key: 0,
50
- class: "check-selected"
51
- }, as = ["src"], cs = {
52
- key: 1,
53
- class: "check-select"
54
- }, rs = { class: "filter-footer" }, us = /* @__PURE__ */ ne({
55
- __name: "filter",
56
- setup(W, { expose: Y }) {
57
- const U = ke(), h = ae(), p = o(!1), v = o(!0), y = o(!1), w = o(U.staffList), i = o({
58
- cmt_priority: "",
59
- cmt_status: "",
60
- cmt_createDate: "",
61
- cmt_authorId: {
62
- key: "",
63
- value: ""
64
- },
65
- cmt_tag: []
66
- }), O = o({
67
- confirm: (t) => {
68
- }
69
- }), E = o(), D = o(""), M = o(""), u = o(""), k = o([]), I = (t) => {
70
- switch (D.value = t, t) {
71
- case "priority":
72
- M.value = h("mobileComments.filter.priority"), k.value = Se, u.value = i.value.cmt_priority, v.value = !1, y.value = !0;
73
- break;
74
- case "status":
75
- M.value = h("mobileComments.filter.status"), k.value = De, u.value = i.value.cmt_status, v.value = !1, y.value = !0;
76
- break;
77
- case "createDate":
78
- E.value.handleOpen();
79
- break;
80
- case "authorId":
81
- M.value = h("mobileComments.filter.author"), k.value = w.value, u.value = i.value.cmt_authorId, v.value = !1, y.value = !0;
82
- break;
83
- case "tag":
84
- M.value = h("mobileComments.filter.tag"), k.value = Te, u.value = i.value.cmt_tag, v.value = !1, y.value = !0;
85
- break;
86
- }
87
- }, C = (t) => {
88
- D.value === "tag" ? u.value.includes(t) ? u.value = u.value.filter((l) => l !== t) : u.value.push(t) : D.value === "authorId" ? u.value.key === t.userId ? u.value = { key: "", value: "" } : u.value = { key: t.userId, value: t.userName } : u.value !== t ? u.value = t : u.value = "";
89
- }, z = () => {
90
- switch (D.value) {
91
- case "priority":
92
- i.value.cmt_priority = u.value;
93
- break;
94
- case "status":
95
- i.value.cmt_status = u.value;
96
- break;
97
- case "createDate":
98
- i.value.cmt_createDate = u.value;
99
- break;
100
- case "authorId":
101
- i.value.cmt_authorId = u.value;
102
- break;
103
- case "tag":
104
- i.value.cmt_tag = u.value;
105
- break;
106
- }
107
- T();
108
- }, T = () => {
109
- y.value = !1, v.value = !0;
110
- }, S = (t) => {
111
- E.value.handleClose(), i.value.cmt_createDate = t, v.value = !0;
112
- }, b = () => {
113
- E.value.handleClose(), v.value = !0;
114
- }, g = () => {
115
- H(), O.value.confirm(i.value);
116
- }, R = () => {
117
- i.value = {
118
- cmt_priority: "",
119
- cmt_status: "",
120
- cmt_createDate: "",
121
- cmt_authorId: {
122
- key: "",
123
- value: ""
124
- },
125
- cmt_tag: []
126
- }, g();
127
- }, N = (t) => {
128
- O.value = t, p.value = !0;
129
- }, H = () => {
130
- p.value = !1;
131
- };
132
- return Y({
133
- open: N,
134
- close: H,
135
- refresh: () => {
136
- i.value = {
137
- cmt_priority: "",
138
- cmt_status: "",
139
- cmt_createDate: "",
140
- cmt_authorId: {
141
- key: "",
142
- value: ""
143
- },
144
- cmt_tag: []
145
- };
146
- }
147
- }), (t, l) => {
148
- const x = pe, B = xe;
149
- return p.value ? (n(), c("div", Ve, [
150
- v.value ? (n(), c("div", Xe, [
151
- e("div", je, [
152
- e("div", qe, a(s(h)("mobileComments.filter.title")), 1),
153
- e("div", {
154
- class: "close-box",
155
- onClick: Z(H, ["stop"])
156
- }, [
157
- e("img", {
158
- class: "close-img",
159
- src: `${s(P)}/bim-viewer/close_black.png`,
160
- alt: ""
161
- }, null, 8, Qe)
162
- ])
163
- ]),
164
- e("div", et, [
165
- e("div", tt, [
166
- e("div", {
167
- class: "search-item",
168
- onClick: l[0] || (l[0] = Z((_) => I("priority"), ["stop"]))
169
- }, [
170
- e("div", st, [
171
- e("div", ot, a(s(h)("bcf.priority")), 1)
172
- ]),
173
- e("div", lt, [
174
- e("div", nt, a(i.value.cmt_priority), 1),
175
- e("div", it, [
176
- e("img", {
177
- class: "img",
178
- src: `${s(P)}/bim-viewer/bcf-images/back-right-gray.png`,
179
- alt: ""
180
- }, null, 8, at)
181
- ])
182
- ])
183
- ]),
184
- e("div", {
185
- class: "search-item",
186
- onClick: l[1] || (l[1] = Z((_) => I("status"), ["stop"]))
187
- }, [
188
- e("div", ct, [
189
- e("div", rt, a(s(h)("bcf.status")), 1)
190
- ]),
191
- e("div", ut, [
192
- e("div", dt, a(i.value.cmt_status), 1),
193
- e("div", mt, [
194
- e("img", {
195
- class: "img",
196
- src: `${s(P)}/bim-viewer/bcf-images/back-right-gray.png`,
197
- alt: ""
198
- }, null, 8, vt)
199
- ])
200
- ])
201
- ]),
202
- e("div", {
203
- class: "search-item",
204
- onClick: l[2] || (l[2] = Z((_) => I("createDate"), ["stop"]))
205
- }, [
206
- e("div", _t, [
207
- e("div", pt, a(s(h)("bcf.createDate")), 1)
208
- ]),
209
- e("div", ht, [
210
- e("div", gt, a(i.value.cmt_createDate), 1),
211
- e("div", ft, [
212
- e("img", {
213
- class: "img",
214
- src: `${s(P)}/bim-viewer/bcf-images/back-right-gray.png`,
215
- alt: ""
216
- }, null, 8, bt)
217
- ])
218
- ])
219
- ]),
220
- e("div", {
221
- class: "search-item",
222
- onClick: l[3] || (l[3] = Z((_) => I("authorId"), ["stop"]))
223
- }, [
224
- e("div", kt, [
225
- e("div", Ct, a(s(h)("bcf.creator")), 1)
226
- ]),
227
- e("div", $t, [
228
- e("div", yt, a(i.value.cmt_authorId.value), 1),
229
- e("div", wt, [
230
- e("img", {
231
- class: "img",
232
- src: `${s(P)}/bim-viewer/bcf-images/back-right-gray.png`,
233
- alt: ""
234
- }, null, 8, It)
235
- ])
236
- ])
237
- ]),
238
- e("div", {
239
- class: "search-item",
240
- onClick: l[4] || (l[4] = Z((_) => I("tag"), ["stop"]))
241
- }, [
242
- e("div", xt, [
243
- e("div", Tt, a(s(h)("bcf.labels")), 1)
244
- ]),
245
- e("div", Dt, [
246
- e("div", St, [
247
- (n(!0), c(G, null, q(i.value.cmt_tag, (_, d) => (n(), c("div", {
248
- key: d,
249
- class: "tag"
250
- }, a(_), 1))), 128))
251
- ]),
252
- e("div", Lt, [
253
- e("img", {
254
- class: "img",
255
- src: `${s(P)}/bim-viewer/bcf-images/back-right-gray.png`,
256
- alt: ""
257
- }, null, 8, Pt)
258
- ])
259
- ])
260
- ])
261
- ])
262
- ]),
263
- e("div", Bt, [
264
- e("div", Mt, [
265
- e("div", {
266
- class: "search-btn btn-cancel",
267
- onClick: Z(R, ["stop"])
268
- }, a(s(h)("common.reset")), 1),
269
- e("div", {
270
- class: "search-btn btn-submit",
271
- onClick: Z(g, ["stop"])
272
- }, a(s(h)("common.search")), 1)
273
- ])
274
- ])
275
- ])) : A("", !0),
276
- y.value ? (n(), c("div", zt, [
277
- e("div", Et, [
278
- e("div", Ot, a(M.value), 1),
279
- e("div", {
280
- class: "close-box",
281
- onClick: T
282
- }, [
283
- e("img", {
284
- class: "close-img",
285
- src: `${s(P)}/bim-viewer/close_black.png`,
286
- alt: ""
287
- }, null, 8, Rt)
288
- ])
289
- ]),
290
- e("div", Nt, [
291
- V(x, null, {
292
- default: ce(() => [
293
- D.value === "authorId" ? (n(), c("div", Ft, [
294
- (n(!0), c(G, null, q(k.value, (_, d) => (n(), c("div", {
295
- key: d,
296
- class: "filter-item",
297
- onClick: Z(($) => C(_), ["stop"])
298
- }, [
299
- e("div", At, [
300
- e("div", Ht, a(_.userName) + "(" + a(_.mobile) + ")", 1)
301
- ]),
302
- e("div", Wt, [
303
- _.userId === u.value.key ? (n(), c("div", Yt, [
304
- e("img", {
305
- class: "select-img",
306
- src: `${s(P)}/bim-viewer/check-selected.png`,
307
- alt: ""
308
- }, null, 8, Jt)
309
- ])) : (n(), c("div", Zt))
310
- ])
311
- ], 8, Ut))), 128))
312
- ])) : D.value === "tag" ? (n(), c("div", Gt, [
313
- (n(!0), c(G, null, q(k.value, (_, d) => (n(), c("div", {
314
- key: d,
315
- class: "filter-item",
316
- onClick: Z(($) => C(_), ["stop"])
317
- }, [
318
- e("div", Vt, [
319
- e("div", Xt, a(_), 1)
320
- ]),
321
- e("div", jt, [
322
- u.value.includes(_) ? (n(), c("div", qt, [
323
- e("img", {
324
- class: "select-img",
325
- src: `${s(P)}/bim-viewer/check-selected.png`,
326
- alt: ""
327
- }, null, 8, Qt)
328
- ])) : (n(), c("div", es))
329
- ])
330
- ], 8, Kt))), 128))
331
- ])) : (n(), c("div", ts, [
332
- (n(!0), c(G, null, q(k.value, (_, d) => (n(), c("div", {
333
- key: d,
334
- class: "filter-item",
335
- onClick: Z(($) => C(_), ["stop"])
336
- }, [
337
- e("div", os, [
338
- e("div", ls, a(_), 1)
339
- ]),
340
- e("div", ns, [
341
- _ === u.value ? (n(), c("div", is, [
342
- e("img", {
343
- class: "select-img",
344
- src: `${s(P)}/bim-viewer/check-selected.png`,
345
- alt: ""
346
- }, null, 8, as)
347
- ])) : (n(), c("div", cs))
348
- ])
349
- ], 8, ss))), 128))
350
- ]))
351
- ]),
352
- _: 1
353
- })
354
- ]),
355
- e("div", rs, [
356
- e("div", {
357
- class: "filter-btn",
358
- onClick: Z(z, ["stop"])
359
- }, a(s(h)("common.confirm")), 1)
360
- ])
361
- ])) : A("", !0),
362
- V(B, {
363
- ref_key: "cmtCreateDateRef",
364
- ref: E,
365
- modelValue: i.value.cmt_createDate,
366
- "onUpdate:modelValue": l[5] || (l[5] = (_) => i.value.cmt_createDate = _),
367
- "popper-class": "mobile_cmt_create_date",
368
- type: "date",
369
- placeholder: "Pick a day",
370
- style: {
371
- width: "100%",
372
- display: "none"
373
- },
374
- format: "YYYY/MM/DD",
375
- "value-format": "YYYY-MM-DD",
376
- onBlur: b,
377
- onChange: S
378
- }, null, 8, ["modelValue"])
379
- ])) : A("", !0);
380
- };
381
- }
382
- }), ds = /* @__PURE__ */ ie(us, [["__scopeId", "data-v-b3047543"]]), ms = { class: "mobile_CMT_search" }, vs = { class: "search_icon" }, _s = ["src"], ps = { class: "mobile_CMT_table_list" }, hs = { class: "table_list_title" }, gs = { class: "sort_buttons" }, fs = ["src"], bs = ["src"], ks = ["src"], Cs = { class: "sort_total" }, $s = ["src"], ys = ["src"], ws = {
383
- key: 0,
384
- class: "table_list_content"
385
- }, Is = { class: "table_list" }, xs = ["onClick"], Ts = { class: "CMT_img" }, Ds = { class: "CMT_info" }, Ss = { class: "CMT_info1" }, Ls = { class: "title" }, Ps = { class: "CMT_info2" }, Bs = { class: "username" }, Ms = {
386
- key: 1,
387
- class: "empty_wrapper"
388
- }, zs = /* @__PURE__ */ ne({
389
- __name: "list",
390
- props: {
391
- instruction: {},
392
- CMTList: {}
393
- },
394
- emits: ["checkCmtDetail"],
395
- setup(W, { emit: Y }) {
396
- const U = Y, h = ke(), p = W, { CMTList: v } = Be(p), y = ae(), w = o([]), i = o(), O = {
397
- indexSort: ["default", "down", "up"],
398
- titleSort: ["default", "down", "up"],
399
- timeSort: ["default", "down", "up"]
400
- }, E = o(), D = o();
401
- me(() => {
402
- v.value && (w.value = v.value.slice().sort((t, l) => l.index - t.index), i.value = v.value.slice().sort((t, l) => l.index - t.index));
403
- }), re(
404
- () => p,
405
- (t) => {
406
- t && t.CMTList && (w.value = t.CMTList.slice().sort((l, x) => x.index - l.index), H());
407
- },
408
- { deep: !0 }
409
- );
410
- const M = o(!0), u = o(""), k = o(0), I = o(0), C = o(0), z = o(!0);
411
- re(
412
- () => D.value,
413
- (t) => {
414
- var l;
415
- t && (t != null && t.cmt_priority || t != null && t.cmt_status || t != null && t.cmt_createDate || (l = t == null ? void 0 : t.cmt_authorId) != null && l.key || t != null && t.cmt_tag && (t == null ? void 0 : t.cmt_tag.length) > 0) ? M.value = !0 : M.value = !1;
416
- },
417
- { deep: !0, immediate: !0 }
418
- );
419
- const T = () => {
420
- i.value = v.value.slice().sort((t, l) => l.index - t.index), w.value = v.value.slice().sort((t, l) => l.index - t.index), z.value = !0;
421
- }, S = () => {
422
- u.value == "" ? T() : w.value = i.value.filter((t) => t.title.includes(u.value));
423
- }, b = (t) => {
424
- if (t > 2 && (k.value = 0), t == 1) {
425
- let l = i.value.slice().sort((x, B) => B.index - x.index);
426
- w.value = l, z.value = !1;
427
- } else if (t == 2) {
428
- let l = i.value.slice().sort((x, B) => x.index - B.index);
429
- w.value = l;
430
- } else
431
- T();
432
- I.value = 0, C.value = 0;
433
- }, g = (t) => {
434
- if (t > 2 && (I.value = 0), t == 1) {
435
- let l = i.value.slice().sort((x, B) => B.title.localeCompare(x.title));
436
- w.value = l;
437
- } else if (t == 2) {
438
- let l = i.value.slice().sort((x, B) => x.title.localeCompare(B.title));
439
- w.value = l;
440
- } else
441
- T();
442
- k.value = 0, C.value = 0;
443
- }, R = (t) => {
444
- if (t > 2 && (C.value = 0), t == 1) {
445
- let l = i.value.slice().sort((x, B) => {
446
- const _ = new Date(x.createDate), d = new Date(B.createDate);
447
- return _ < d ? 1 : -1;
448
- });
449
- w.value = l;
450
- } else if (t == 2) {
451
- let l = i.value.slice().sort((x, B) => {
452
- const _ = new Date(x.createDate), d = new Date(B.createDate);
453
- return _ > d ? 1 : -1;
454
- });
455
- w.value = l;
456
- } else
457
- T();
458
- k.value = 0, I.value = 0;
459
- }, N = () => {
460
- E.value.open({
461
- confirm: (t) => {
462
- D.value = t, H();
463
- }
464
- });
465
- }, H = () => {
466
- var l, x, B;
467
- let t = D.value;
468
- if (!t && !(t != null && t.cmt_priority) && !(t != null && t.cmt_status) && !(t != null && t.cmt_createDate) && !((l = t == null ? void 0 : t.cmt_authorId) != null && l.key) && (!(t != null && t.cmt_tag) || (t == null ? void 0 : t.cmt_tag.length) == 0))
469
- T(), i.value = JSON.parse(JSON.stringify(v.value)).slice(), k.value + I.value + C.value != 0 && (k.value != 0 && b(k.value), I.value != 0 && g(I.value), C.value != 0 && R(C.value));
470
- else {
471
- let _ = JSON.parse(JSON.stringify(v.value)).slice();
472
- t.cmt_priority && (_ = _.filter((d) => d.priority && fe(d.priority) == t.cmt_priority), console.log(_.filter((d) => d.priority && fe(d.priority) == t.cmt_priority))), (x = t.cmt_authorId) != null && x.key && (_ = _.filter((d) => {
473
- var $, f, m;
474
- return typeof d.author == "string" ? ve.getStaffId(d.author) == (($ = t.cmt_authorId) == null ? void 0 : $.key) || ve.getStaffName((f = t.cmt_authorId) == null ? void 0 : f.key) == d.author : d.author == ((m = t.cmt_authorId) == null ? void 0 : m.key);
475
- })), t.cmt_status && (_ = _.filter((d) => d.status == t.cmt_status)), t.cmt_createDate && (_ = _.filter((d) => _e(d.createDate) == t.cmt_createDate)), (B = t.CMT_asignToId) != null && B.key && (_ = _.filter((d) => {
476
- var $, f, m;
477
- return typeof d.assignedTo == "string" ? ve.getStaffId(d.assignedTo) == (($ = t.CMT_asignToId) == null ? void 0 : $.key) || ve.getStaffName((f = t.CMT_asignToId) == null ? void 0 : f.key) == d.assignedTo : d.assignedTo == ((m = t.CMT_asignToId) == null ? void 0 : m.key);
478
- })), t.cmt_tag && t.cmt_tag.length > 0 && (_ = _.filter((d) => !!(d.tags && d.tags.find(($) => {
479
- var f;
480
- return (f = t.cmt_tag) == null ? void 0 : f.includes($);
481
- })))), i.value = _, k.value + I.value + C.value != 0 ? (k.value != 0 && b(k.value), I.value != 0 && g(I.value), C.value != 0 && R(C.value)) : w.value = i.value.slice().sort((d, $) => $.index - d.index);
482
- }
483
- }, Q = (t) => {
484
- U("checkCmtDetail", t);
485
- };
486
- return (t, l) => {
487
- const x = Ce, B = pe, _ = Me, d = ds;
488
- return n(), c("div", {
489
- class: "cmt_wrapper",
490
- style: ee({ top: `${(s(j)("topHeight") + 52) / 50}rem` })
491
- }, [
492
- e("div", ms, [
493
- e("div", vs, [
494
- e("img", {
495
- src: s(P) + "/bim-viewer/search.png",
496
- alt: ""
497
- }, null, 8, _s)
498
- ]),
499
- V(x, {
500
- modelValue: u.value,
501
- "onUpdate:modelValue": l[0] || (l[0] = ($) => u.value = $),
502
- placeholder: s(y)("common.placeholder_search"),
503
- onInput: S,
504
- onChange: S
505
- }, null, 8, ["modelValue", "placeholder"])
506
- ]),
507
- e("div", ps, [
508
- e("div", hs, [
509
- e("div", gs, [
510
- e("div", {
511
- class: "sort_button",
512
- onClick: l[1] || (l[1] = ($) => b(k.value += 1))
513
- }, [
514
- e("span", null, a(s(y)("bcf.index")), 1),
515
- e("img", {
516
- class: "order_icon",
517
- src: `${s(P)}/bim-viewer/bcf-images/order-${O.indexSort[k.value]}.png`,
518
- alt: ""
519
- }, null, 8, fs)
520
- ]),
521
- e("div", {
522
- class: "sort_button",
523
- onClick: l[2] || (l[2] = ($) => g(I.value += 1))
524
- }, [
525
- e("span", null, a(s(y)("bcf.title")), 1),
526
- e("img", {
527
- class: "order_icon",
528
- src: `${s(P)}/bim-viewer/bcf-images/order-${O.titleSort[I.value]}.png`,
529
- alt: ""
530
- }, null, 8, bs)
531
- ]),
532
- e("div", {
533
- class: "sort_button",
534
- onClick: l[3] || (l[3] = ($) => R(C.value += 1))
535
- }, [
536
- e("span", null, a(s(y)("bcf.time")), 1),
537
- e("img", {
538
- class: "order_icon",
539
- src: `${s(P)}/bim-viewer/bcf-images/order-${O.timeSort[C.value]}.png`,
540
- alt: ""
541
- }, null, 8, ks)
542
- ])
543
- ]),
544
- e("div", Cs, [
545
- e("div", {
546
- class: "sort_button",
547
- onClick: Z(N, ["stop"])
548
- }, [
549
- M.value ? (n(), c("img", {
550
- key: 1,
551
- class: "order_filter_icon",
552
- src: `${s(P)}/bim-viewer/bcf-images/order-active-mobile.png`,
553
- alt: ""
554
- }, null, 8, ys)) : (n(), c("img", {
555
- key: 0,
556
- class: "order_filter_icon",
557
- src: `${s(P)}/bim-viewer/bcf-images/order-default-mobile.png`,
558
- alt: ""
559
- }, null, 8, $s)),
560
- e("span", null, a(s(y)("mobileComments.filter.title")), 1)
561
- ])
562
- ])
563
- ]),
564
- w.value && w.value.length > 0 ? (n(), c("div", ws, [
565
- V(B, null, {
566
- default: ce(() => [
567
- e("div", Is, [
568
- (n(!0), c(G, null, q(w.value, ($, f) => (n(), c("div", {
569
- key: f,
570
- class: "CMT_card",
571
- onClick: Z((m) => Q($._id), ["stop"])
572
- }, [
573
- e("div", Ts, [
574
- e("div", {
575
- style: ee({
576
- width: "100%",
577
- height: "100%",
578
- backgroundImage: `url(
579
- data:image/png;base64,${$.imgData ? $.imgData : ""}
580
- )`,
581
- backgroundSize: "cover",
582
- backgroundPosition: "center",
583
- borderRadius: "0.12rem"
584
- })
585
- }, null, 4)
586
- ]),
587
- e("div", Ds, [
588
- e("div", Ss, [
589
- e("span", {
590
- style: ee({ color: $.priority ? s(ye)($.priority) : s(ye)("low") }),
591
- class: "index"
592
- }, " #" + a($.index), 5),
593
- e("span", Ls, a($.title), 1)
594
- ]),
595
- e("div", Ps, [
596
- e("span", Bs, a(typeof $.author == "string" && $.author != "" ? $.author : s(h).getStuffName($.userId)), 1),
597
- e("span", null, a($.createDate ? s(_e)($.createDate) : ""), 1)
598
- ])
599
- ])
600
- ], 8, xs))), 128))
601
- ])
602
- ]),
603
- _: 1
604
- })
605
- ])) : (n(), c("div", Ms, [
606
- V(_, {
607
- title: s(y)("mobileComments.empty"),
608
- type: "model"
609
- }, null, 8, ["title"])
610
- ]))
611
- ]),
612
- V(d, {
613
- ref_key: "CMTFilterRef",
614
- ref: E
615
- }, null, 512)
616
- ], 4);
617
- };
618
- }
619
- }), Es = /* @__PURE__ */ ie(zs, [["__scopeId", "data-v-00de9faf"]]), Os = ["src"], Rs = /* @__PURE__ */ ne({
620
- __name: "zoomIn",
621
- props: {
622
- imgContent: {}
623
- },
624
- emits: ["closeImg"],
625
- setup(W, { emit: Y }) {
626
- const U = Y, p = o(W.imgContent), v = ae(), y = () => {
627
- U("closeImg");
628
- };
629
- return (w, i) => (n(), c("div", {
630
- class: "image_zoomin_wrapper",
631
- onClick: y
632
- }, [
633
- e("div", {
634
- class: "back_btn",
635
- onClick: y
636
- }, a(s(v)("common.back")), 1),
637
- e("div", {
638
- class: "img_wrapper",
639
- onClick: y
640
- }, [
641
- e("img", { src: p.value }, null, 8, Os)
642
- ])
643
- ]));
644
- }
645
- }), Pe = /* @__PURE__ */ ie(Rs, [["__scopeId", "data-v-a7fc494b"]]), Ns = { class: "content_scrollbar" }, Fs = { class: "cmt_detail_content" }, Us = { class: "cmt_id_time" }, As = { class: "snpshot_wrapper" }, Hs = { class: "snapshot_container" }, Ws = ["src"], Ys = ["src"], Js = ["src"], Zs = { class: "cmt_content" }, Gs = { class: "content" }, Ks = { class: "select_item" }, Vs = { class: "item_title" }, Xs = { class: "select_wrapper" }, js = { class: "select_item" }, qs = { class: "item_title" }, Qs = { class: "select_item" }, eo = { class: "item_title" }, to = { class: "select_wrapper" }, so = { class: "select_item" }, oo = { class: "item_title" }, lo = {
646
- key: 0,
647
- class: "tag_list"
648
- }, no = { class: "tag_span" }, io = {
649
- key: 1,
650
- class: "select_wrapper"
651
- }, ao = { class: "select_item_descript" }, co = { class: "item_title" }, ro = { class: "descript" }, uo = { class: "bottom_buttons" }, mo = { class: "btns" }, vo = /* @__PURE__ */ ne({
652
- __name: "detail",
653
- props: {
654
- cmtContent: {}
655
- },
656
- emits: ["delete", "back"],
657
- setup(W, { emit: Y }) {
658
- const U = Y, h = W, p = o(h.cmtContent), v = o(""), y = o(!1), w = () => {
659
- y.value = !0;
660
- }, i = o(), O = o(), E = o(), D = o(), M = o(), u = o(), k = o(), I = o(), C = ae();
661
- me(() => {
662
- const S = /* @__PURE__ */ new Date();
663
- let b = S.getDate(), g = S.getFullYear(), R = S.getMonth();
664
- v.value = `${g}-${R + 1}-${b}`, p.value || console.log("no cmtContent!"), z();
665
- }), re(
666
- () => h.cmtContent,
667
- (S) => {
668
- S && (p.value = JSON.parse(JSON.stringify(S)), z());
669
- }
670
- );
671
- const z = () => {
672
- i.value = p.value.index, O.value = p.value.title, E.value = p.value.priority ? fe(p.value.priority) : "", D.value = p.value.status ? p.value.status : "", M.value = p.value.deadline ? _e(p.value.deadline) : "", u.value = p.value.description ? p.value.description : "", k.value = p.value.tags ? p.value.tags : [], I.value = p.value.imgData;
673
- }, T = () => {
674
- U("delete", p.value.guid);
675
- };
676
- return (S, b) => {
677
- const g = pe, R = Pe;
678
- return n(), c(G, null, [
679
- e("div", {
680
- class: "cmt_detail_wrapper",
681
- style: ee({ top: `${(s(j)("topHeight") + 52) / 50}rem` })
682
- }, [
683
- e("div", Ns, [
684
- V(g, null, {
685
- default: ce(() => [
686
- e("div", Fs, [
687
- e("div", Us, [
688
- e("div", {
689
- style: ee({ backgroundColor: s(ze)(p.value && p.value.priority ? p.value.priority : "low"), color: "#fff" })
690
- }, a(i.value), 5),
691
- e("div", null, [
692
- de(a(p.value && p.value.createDate && s(_e)(p.value.createDate)) + " ", 1),
693
- e("span", null, a(s(C)("common.created")), 1)
694
- ])
695
- ]),
696
- e("div", As, [
697
- e("div", Hs, [
698
- e("img", {
699
- class: "cmt_img",
700
- src: `data:image/png;base64,${I.value}`
701
- }, null, 8, Ws),
702
- D.value ? (n(), c("div", {
703
- key: 0,
704
- class: "stage",
705
- style: ee({ backgroundColor: s(Ee)(D.value) })
706
- }, [
707
- e("img", {
708
- src: s(P) + "/bim-viewer/bcf-images/bulb.png"
709
- }, null, 8, Ys),
710
- e("span", null, a(D.value), 1)
711
- ], 4)) : A("", !0),
712
- e("div", {
713
- class: "zoomIn",
714
- onClick: w
715
- }, [
716
- e("img", {
717
- src: s(P) + "/bim-viewer/annotations/zoomin.svg"
718
- }, null, 8, Js),
719
- de(" " + a(s(C)("common.view")), 1)
720
- ])
721
- ])
722
- ]),
723
- e("div", Zs, [
724
- e("div", Gs, [
725
- e("div", Ks, [
726
- e("span", Vs, a(s(C)("bcf.status")), 1),
727
- b[2] || (b[2] = e("span", null, ":", -1)),
728
- e("div", Xs, a(D.value), 1)
729
- ]),
730
- e("div", js, [
731
- e("span", qs, a(s(C)("bcf.priority")), 1),
732
- b[3] || (b[3] = e("span", null, ":", -1)),
733
- e("div", {
734
- class: "select_wrapper",
735
- style: ee({ color: s(Oe)(E.value) })
736
- }, a(E.value), 5)
737
- ]),
738
- e("div", Qs, [
739
- e("span", eo, a(s(C)("bcf.dueDate")), 1),
740
- b[4] || (b[4] = e("span", null, ":", -1)),
741
- e("div", to, a(M.value), 1)
742
- ]),
743
- e("div", so, [
744
- e("span", oo, a(s(C)("bcf.labels")), 1),
745
- b[5] || (b[5] = e("span", null, ":", -1)),
746
- k.value && k.value.length > 0 ? (n(), c("div", lo, [
747
- (n(!0), c(G, null, q(k.value, (N, H) => (n(), c("div", {
748
- key: H,
749
- class: "tag"
750
- }, [
751
- e("span", no, a(N), 1)
752
- ]))), 128))
753
- ])) : (n(), c("div", io))
754
- ]),
755
- e("div", ao, [
756
- e("span", co, a(s(C)("bcf.description")), 1),
757
- b[6] || (b[6] = e("span", null, ":", -1)),
758
- e("div", ro, a(u.value), 1)
759
- ])
760
- ])
761
- ])
762
- ])
763
- ]),
764
- _: 1
765
- })
766
- ]),
767
- e("div", uo, [
768
- b[7] || (b[7] = e("div", { class: "split" }, null, -1)),
769
- e("div", mo, [
770
- e("div", {
771
- class: "backModel",
772
- onClick: b[0] || (b[0] = (N) => U("back"))
773
- }, a(s(C)("mobileComments.backToModel")), 1),
774
- s(j)("editPrivilege") == 0 ? (n(), c("div", {
775
- key: 0,
776
- class: "delete",
777
- onClick: T
778
- }, a(s(C)("mobileComments.deleteComment")), 1)) : A("", !0)
779
- ])
780
- ])
781
- ], 4),
782
- y.value ? (n(), oe(R, {
783
- key: 0,
784
- "img-content": `data:image/png;base64,${I.value}`,
785
- onCloseImg: b[1] || (b[1] = () => {
786
- y.value = !1;
787
- })
788
- }, null, 8, ["img-content"])) : A("", !0)
789
- ], 64);
790
- };
791
- }
792
- }), _o = /* @__PURE__ */ ie(vo, [["__scopeId", "data-v-12f2d235"]]), po = { class: "image" }, ho = { class: "fill" }, go = { class: "screenshot" }, fo = ["src"], bo = ["src"], ko = ["src"], Co = { class: "content" }, $o = { class: "select_item" }, yo = { class: "select_wrapper" }, wo = { class: "select_item" }, Io = { class: "select_wrapper" }, xo = { class: "select_item" }, To = { class: "select_wrapper" }, Do = { class: "select_item" }, So = { class: "select_wrapper" }, Lo = { class: "select_item" }, Po = { class: "select_wrapper" }, Bo = { class: "select_item" }, Mo = { class: "select_wrapper" }, zo = { class: "bottom" }, Eo = /* @__PURE__ */ ne({
793
- __name: "add",
794
- props: {
795
- imageData: {},
796
- userId: {}
797
- },
798
- emits: ["cancel", "emitHandler", "createNew"],
799
- setup(W, { emit: Y }) {
800
- const U = Y, h = W, p = o(h.imageData), v = ae(), y = o(!1), w = o(""), i = o(""), O = o(""), E = o(""), D = o(), M = o(""), u = o([]), k = ge(() => Se()), I = ge(() => De()), C = ge(() => Te());
801
- me(() => {
802
- const b = /* @__PURE__ */ new Date();
803
- let g = b.getDate(), R = b.getFullYear(), N = b.getMonth();
804
- w.value = `${R}-${N + 1}-${g}`;
805
- });
806
- const z = () => {
807
- U("cancel");
808
- }, T = () => {
809
- y.value = !0;
810
- }, S = () => {
811
- i.value === "" ? K.emit("prompt", { type: "warn", text: v("bcf.messages.pleaseInputTitle") }) : U("createNew", {
812
- author: h.userId,
813
- title: i.value,
814
- priority: O.value,
815
- status: E.value,
816
- deadline: D.value,
817
- createDate: (/* @__PURE__ */ new Date()).toISOString(),
818
- description: M.value,
819
- imgData: p.value,
820
- tags: u.value
821
- });
822
- };
823
- return (b, g) => {
824
- const R = Ce, N = Ne, H = Re, Q = xe, t = Pe;
825
- return n(), c(G, null, [
826
- e("div", {
827
- class: "comment_add",
828
- style: ee({ top: `${(s(j)("topHeight") + 52) / 50}rem` })
829
- }, [
830
- e("div", po, [
831
- e("div", ho, [
832
- e("div", go, [
833
- e("img", {
834
- src: `data:image/png;base64,${p.value}`
835
- }, null, 8, fo)
836
- ]),
837
- e("div", {
838
- class: "del",
839
- onClick: z
840
- }, [
841
- e("img", {
842
- src: s(P) + "/bim-viewer/delete-white.svg"
843
- }, null, 8, bo),
844
- de(" " + a(s(v)("common.edit")), 1)
845
- ]),
846
- e("div", {
847
- class: "zoomIn",
848
- onClick: T
849
- }, [
850
- e("img", {
851
- src: s(P) + "/bim-viewer/annotations/zoomin.svg"
852
- }, null, 8, ko),
853
- de(" " + a(s(v)("common.view")), 1)
854
- ])
855
- ])
856
- ]),
857
- e("div", Co, [
858
- e("div", $o, [
859
- e("div", null, [
860
- de(a(s(v)("common.title")) + " ", 1),
861
- g[7] || (g[7] = e("span", { style: { color: "#f54d4d" } }, "*", -1))
862
- ]),
863
- e("div", yo, [
864
- V(R, {
865
- modelValue: i.value,
866
- "onUpdate:modelValue": g[0] || (g[0] = (l) => i.value = l),
867
- placeholder: s(v)("common.placeholder_input")
868
- }, null, 8, ["modelValue", "placeholder"])
869
- ])
870
- ]),
871
- e("div", wo, [
872
- e("span", null, a(s(v)("bcf.priority")), 1),
873
- e("div", Io, [
874
- V(H, {
875
- modelValue: O.value,
876
- "onUpdate:modelValue": g[1] || (g[1] = (l) => O.value = l),
877
- clearable: "",
878
- placeholder: s(v)("common.placeholder_select")
879
- }, {
880
- default: ce(() => [
881
- (n(!0), c(G, null, q(k.value, (l, x) => (n(), oe(N, {
882
- key: x,
883
- value: l
884
- }, null, 8, ["value"]))), 128))
885
- ]),
886
- _: 1
887
- }, 8, ["modelValue", "placeholder"])
888
- ])
889
- ]),
890
- e("div", xo, [
891
- e("span", null, a(s(v)("bcf.status")), 1),
892
- e("div", To, [
893
- V(H, {
894
- modelValue: E.value,
895
- "onUpdate:modelValue": g[2] || (g[2] = (l) => E.value = l),
896
- clearable: "",
897
- placeholder: s(v)("common.placeholder_select")
898
- }, {
899
- default: ce(() => [
900
- (n(!0), c(G, null, q(I.value, (l, x) => (n(), oe(N, {
901
- key: x,
902
- value: l
903
- }, null, 8, ["value"]))), 128))
904
- ]),
905
- _: 1
906
- }, 8, ["modelValue", "placeholder"])
907
- ])
908
- ]),
909
- e("div", Do, [
910
- e("span", null, a(s(v)("bcf.dueDate")), 1),
911
- e("div", So, [
912
- we(V(Q, {
913
- modelValue: D.value,
914
- "onUpdate:modelValue": g[3] || (g[3] = (l) => D.value = l),
915
- type: "datetime",
916
- placeholder: s(v)("common.placeholder_date"),
917
- editable: !1
918
- }, null, 8, ["modelValue", "placeholder"]), [
919
- [Ie, !1]
920
- ])
921
- ])
922
- ]),
923
- e("div", Lo, [
924
- e("span", null, a(s(v)("bcf.description")), 1),
925
- e("div", Po, [
926
- V(R, {
927
- modelValue: M.value,
928
- "onUpdate:modelValue": g[4] || (g[4] = (l) => M.value = l),
929
- type: "textarea",
930
- placeholder: s(v)("common.placeholder_input")
931
- }, null, 8, ["modelValue", "placeholder"])
932
- ])
933
- ]),
934
- e("div", Bo, [
935
- e("span", null, a(s(v)("bcf.labels")), 1),
936
- e("div", Mo, [
937
- V(H, {
938
- modelValue: u.value,
939
- "onUpdate:modelValue": g[5] || (g[5] = (l) => u.value = l),
940
- multiple: "",
941
- placeholder: s(v)("common.placeholder_select")
942
- }, {
943
- default: ce(() => [
944
- (n(!0), c(G, null, q(C.value, (l, x) => (n(), oe(N, {
945
- key: x,
946
- value: l
947
- }, null, 8, ["value"]))), 128))
948
- ]),
949
- _: 1
950
- }, 8, ["modelValue", "placeholder"])
951
- ])
952
- ])
953
- ]),
954
- e("div", zo, [
955
- g[8] || (g[8] = e("div", { class: "line" }, null, -1)),
956
- e("div", {
957
- class: "create",
958
- onClick: S
959
- }, a(s(v)("bcf.createNow")), 1)
960
- ])
961
- ], 4),
962
- y.value ? (n(), oe(t, {
963
- key: 0,
964
- "img-content": `data:image/png;base64,${p.value}`,
965
- onCloseImg: g[6] || (g[6] = () => {
966
- y.value = !1;
967
- })
968
- }, null, 8, ["img-content"])) : A("", !0)
969
- ], 64);
970
- };
971
- }
972
- }), Oo = /* @__PURE__ */ ie(Eo, [["__scopeId", "data-v-8b9d476b"]]), Ro = { class: "mobile_comments_toolbar" }, No = { class: "enter" }, Fo = { class: "comment_toolbar" }, Uo = { class: "comment-list" }, Ao = ["onClick"], Ho = { class: "comment-icon" }, Wo = ["src"], Yo = { class: "comment-name" }, Jo = { class: "comment-icon" }, Zo = ["src"], Go = {
973
- class: "comment-name",
974
- style: { color: "#df1c1c" }
975
- }, Ko = { class: "buttons" }, Vo = {
976
- key: 0,
977
- class: "comment_create_text_box"
978
- }, Xo = { class: "label-text-edit" }, jo = { class: "text-edit-head" }, qo = ["src"], Qo = { class: "text-edit-title" }, el = { class: "text-edit-body" }, tl = { class: "text-edit-input" }, sl = /* @__PURE__ */ ne({
979
- __name: "draw",
980
- props: ["componentId"],
981
- emits: ["emitHandler", "cancel", "confirm"],
982
- setup(W, { expose: Y, emit: U }) {
983
- const h = ae(), p = $e(), v = W;
984
- me(() => {
985
- p.setReadyById(v.componentId);
986
- });
987
- let y, w;
988
- const i = o(0), O = o(1), E = o(1), D = o(), M = o(!1), u = o(!1), k = o(!1), I = o(!1), C = o(""), z = o(), T = o({
989
- show: !1,
990
- // 是否显示
991
- title: h("mobileComments.notice.title"),
992
- // 弹窗标题
993
- content: "",
994
- // 弹窗内容
995
- submitName: h("common.confirm"),
996
- // 弹窗按钮
997
- confirm: () => {
998
- console.log("点击了确认"), T.value.show = !1;
999
- },
1000
- close: () => {
1001
- console.log("点击了关闭"), T.value.show = !1;
1002
- }
1003
- }), S = () => {
1004
- y = window.bimViewer.commentTool, w = window.bimViewer.eventTrigger, d(""), w.on("createNew", () => {
1005
- i.value = 0, d("");
1006
- }), w.on("newState", () => {
1007
- M.value = !0, u.value = !1;
1008
- }), w.on("noPreviousState", () => {
1009
- M.value = !1;
1010
- }), w.on("noNewState", () => {
1011
- u.value = !1;
1012
- }), w.on("choseTarget", (f) => {
1013
- k.value = !0, i.value = 0, d("");
1014
- });
1015
- };
1016
- K.on("BimViewer", S), be(() => {
1017
- K.off("BimViewer", S);
1018
- });
1019
- const b = U, g = () => {
1020
- i.value = 1, d("path"), setTimeout(() => {
1021
- var f;
1022
- (f = document.getElementById("svgImage")) == null || f.addEventListener("touchstart", N);
1023
- }, 200);
1024
- }, R = () => {
1025
- var f;
1026
- (f = document.getElementById("svgImage")) == null || f.removeEventListener("touchstart", N);
1027
- }, N = (f) => {
1028
- f.target.tagName == "image" && (i.value === 5 ? (C.value = "", z.value = f, I.value = !0) : k.value = !1);
1029
- }, H = () => {
1030
- C.value ? (y.clickCreateText(z.value, C.value), I.value = !1) : Q(h("mobileComments.pleaseInputContent"));
1031
- }, Q = (f, m) => {
1032
- T.value = {
1033
- show: !0,
1034
- // 是否显示
1035
- title: h("common.info"),
1036
- // 弹窗标题
1037
- content: f,
1038
- // 弹窗内容
1039
- submitName: h("common.confirm"),
1040
- // 弹窗按钮
1041
- confirm: () => {
1042
- console.log("点击了确认"), T.value.show = !1;
1043
- },
1044
- close: () => {
1045
- console.log("点击了关闭"), T.value.show = !1;
1046
- }
1047
- };
1048
- }, t = (f) => {
1049
- i.value === f.id && (i.value = 0), O.value = 1, E.value = 1, D.value = f.buttontype, i.value = f.id, d(f.buttontype);
1050
- }, l = o(), x = new He(0.1), B = () => {
1051
- y.saveComments();
1052
- const f = document.getElementById("svgImage");
1053
- if (f) {
1054
- const m = new XMLSerializer().serializeToString(f), F = document.createElement("canvas"), le = F.getContext("2d"), J = window.devicePixelRatio || 1, r = new Image();
1055
- r.onload = function() {
1056
- F.width = f.clientWidth * J, F.height = f.clientHeight * J, le && (le.scale(J, J), le.drawImage(r, 0, 0)), l.value = F.toDataURL("image/png").split(",")[1], te();
1057
- function te() {
1058
- l.value ? b("confirm", l.value) : x.start(() => {
1059
- te();
1060
- });
1061
- }
1062
- }, r.src = `data:image/svg+xml;charset=utf-8,${encodeURIComponent(m)}`;
1063
- }
1064
- }, _ = () => {
1065
- window.bimViewer.commentTool.deleteCurrentComments(), k.value = !1;
1066
- }, d = (f) => {
1067
- y.setCurrentMode(f);
1068
- }, $ = () => {
1069
- b("cancel");
1070
- };
1071
- return Y({ handleOpen: g, handleClose: R }), (f, m) => {
1072
- const F = pe, le = Ce;
1073
- return n(), c(G, null, [
1074
- e("div", Ro, [
1075
- e("div", No, [
1076
- e("div", Fo, [
1077
- V(F, null, {
1078
- default: ce(() => [
1079
- e("div", Uo, [
1080
- (n(!0), c(G, null, q(s(Le), (J, r) => (n(), c("div", {
1081
- key: r,
1082
- class: ue(["comment-item", {
1083
- "comment-item-active": i.value === J.id
1084
- }]),
1085
- onClick: (te) => t(J)
1086
- }, [
1087
- e("div", Ho, [
1088
- e("img", {
1089
- src: s(P) + `/industry-viewer/comment-bar/${i.value === J.id ? J.svgActive : J.svg}.svg`
1090
- }, null, 8, Wo),
1091
- e("div", Yo, a(s(h)(J.label)), 1)
1092
- ])
1093
- ], 10, Ao))), 128)),
1094
- k.value ? (n(), c("div", {
1095
- key: 0,
1096
- class: "comment-item",
1097
- onClick: _
1098
- }, [
1099
- e("div", Jo, [
1100
- e("img", {
1101
- src: s(P) + "/industry-viewer/delete.svg"
1102
- }, null, 8, Zo),
1103
- e("div", Go, a(s(h)("common.delete")), 1)
1104
- ])
1105
- ])) : A("", !0)
1106
- ])
1107
- ]),
1108
- _: 1
1109
- })
1110
- ]),
1111
- e("div", Ko, [
1112
- e("div", {
1113
- class: "cancel",
1114
- onClick: $
1115
- }, a(s(h)("common.cancel")), 1),
1116
- e("div", {
1117
- class: "add",
1118
- onClick: B
1119
- }, a(s(h)("bcf.addComment")), 1)
1120
- ])
1121
- ])
1122
- ]),
1123
- I.value ? (n(), c("div", Vo, [
1124
- e("div", Xo, [
1125
- e("div", jo, [
1126
- e("img", {
1127
- class: "text-edit-back",
1128
- src: s(P) + "/bim-viewer/back_gray.svg",
1129
- onClick: m[0] || (m[0] = (J) => I.value = !1)
1130
- }, null, 8, qo),
1131
- e("div", Qo, a(s(h)("mobileComments.createText")), 1),
1132
- e("div", {
1133
- class: "text-edit-finish",
1134
- onClick: H
1135
- }, a(s(h)("common.done")), 1)
1136
- ]),
1137
- e("div", el, [
1138
- e("div", tl, [
1139
- V(le, {
1140
- modelValue: C.value,
1141
- "onUpdate:modelValue": m[1] || (m[1] = (J) => C.value = J),
1142
- type: "textarea",
1143
- placeholder: s(h)("common.placeholder_input"),
1144
- autosize: { minRows: 2 }
1145
- }, null, 8, ["modelValue", "placeholder"])
1146
- ])
1147
- ])
1148
- ])
1149
- ])) : A("", !0)
1150
- ], 64);
1151
- };
1152
- }
1153
- }), ol = /* @__PURE__ */ ie(sl, [["__scopeId", "data-v-d2391911"]]), ll = {
1154
- id: "comments_toolbar",
1155
- class: "comments_toolbar"
1156
- }, nl = { class: "comments_toolbar_wrapper" }, il = { class: "comments_toolbar_content" }, al = { class: "comments_toolbar_group" }, cl = ["onClick"], rl = ["src"], ul = {
1157
- key: 0,
1158
- class: "edit-tips"
1159
- }, dl = { class: "edit_tips_content" }, ml = {
1160
- key: 0,
1161
- class: "tips-weight"
1162
- }, vl = ["onClick"], _l = {
1163
- key: 1,
1164
- class: "tips-weight"
1165
- }, pl = ["onClick"], hl = { class: "tips-color" }, gl = ["onClick"], fl = { class: "comments_toolbar_group" }, bl = ["src"], kl = ["src"], Cl = /* @__PURE__ */ ne({
1166
- __name: "pcdraw",
1167
- props: ["componentId", "instruction"],
1168
- emits: ["closePanel", "emitHandler"],
1169
- setup(W, { emit: Y }) {
1170
- const U = ae(), h = $e(), p = W, v = Y, y = (r) => {
1171
- v("emitHandler", r);
1172
- };
1173
- let w, i, O;
1174
- const E = o(!1), D = o(!1), M = () => {
1175
- w = window.bimViewer, i = window.bimViewer.commentTool, O = window.bimViewer.eventTrigger, S(""), O.on("createNew", () => {
1176
- u.value = 0, S("");
1177
- }), O.on("newState", () => {
1178
- E.value = !0, D.value = !1;
1179
- }), O.on("noPreviousState", () => {
1180
- E.value = !1;
1181
- }), O.on("noNewState", () => {
1182
- D.value = !1;
1183
- }), O.on("choseTarget", (r) => {
1184
- u.value = 0, S("");
1185
- });
1186
- };
1187
- K.on("BimViewer", M), be(() => {
1188
- K.off("BimViewer", M);
1189
- }), re(
1190
- () => h.isToolActive(p.componentId),
1191
- (r) => {
1192
- r && (u.value = 1, S("path"));
1193
- }
1194
- );
1195
- const u = o(0), k = o(1), I = o(1), C = o(1), z = o(Le), T = o(), S = (r) => {
1196
- i.setCurrentMode(r);
1197
- }, b = (r) => {
1198
- u.value === r.id && (u.value = 0), k.value = 1, I.value = 1, T.value = r.buttontype, u.value = r.id, S(r.buttontype);
1199
- }, g = () => {
1200
- i.saveComments();
1201
- const r = document.getElementById("svgImage");
1202
- if (r) {
1203
- const te = new XMLSerializer().serializeToString(r), X = document.createElement("canvas"), L = X.getContext("2d"), se = window.devicePixelRatio || 1, he = new Image();
1204
- he.onload = function() {
1205
- X.width = r.clientWidth * se, X.height = r.clientHeight * se, L && (L.scale(se, se), L.drawImage(he, 0, 0)), y({
1206
- isTool: !0,
1207
- event_target: "CommentTool",
1208
- event_name: "saveComment",
1209
- content: {
1210
- img_data: X.toDataURL("image/png").split(",")[1]
1211
- }
1212
- });
1213
- }, he.src = `data:image/svg+xml;charset=utf-8,${encodeURIComponent(te)}`;
1214
- }
1215
- }, R = () => {
1216
- y({
1217
- isTool: !1,
1218
- event_target: "ToolBar",
1219
- event_name: "clickTool",
1220
- content: {
1221
- toolId: p.componentId,
1222
- toolKey: h.getKeyById(p.componentId),
1223
- status: !1
1224
- }
1225
- }), w.SetCommentsToolActive(!1), v("closePanel");
1226
- }, N = (r) => {
1227
- k.value = r.id, T.value === "path" ? d(r.size) : T.value === "arrow" ? m(r.size) : T.value === "rect" ? f(r.size) : T.value === "ellipse" && $(r.size);
1228
- }, H = (r) => {
1229
- I.value = r.id, T.value === "path" ? t(r.color) : T.value === "arrow" ? B(r.color) : T.value === "rect" ? x(r.color) : T.value === "ellipse" ? l(r.color) : T.value === "text" && _(r.color);
1230
- }, Q = (r) => {
1231
- C.value = r.id, F(r.fontSize);
1232
- }, t = (r) => {
1233
- i.pathColor = r;
1234
- }, l = (r) => {
1235
- i.ellipseColor = r;
1236
- }, x = (r) => {
1237
- i.rectColor = r;
1238
- }, B = (r) => {
1239
- i.arrowColor = r;
1240
- }, _ = (r) => {
1241
- i.textColor = r;
1242
- }, d = (r) => {
1243
- i.pathStrokeWidth = r;
1244
- }, $ = (r) => {
1245
- i.ellipseStrokeWidth = r;
1246
- }, f = (r) => {
1247
- i.rectStrokeWidth = r;
1248
- }, m = (r) => {
1249
- i.arrowSize = r;
1250
- }, F = (r) => {
1251
- i.textFontSize = r;
1252
- }, le = () => {
1253
- i.ReDo(() => {
1254
- }), E.value = !0;
1255
- }, J = () => {
1256
- i.UnDo(() => {
1257
- }), D.value = !0;
1258
- };
1259
- return (r, te) => (n(), c("div", ll, [
1260
- e("div", nl, [
1261
- e("div", il, [
1262
- e("div", al, [
1263
- (n(!0), c(G, null, q(z.value, (X) => (n(), c("div", {
1264
- key: X.id,
1265
- class: ue(["comments_tool_btn", { comments_tool_btn_active: u.value === X.id }]),
1266
- onClick: (L) => b(X)
1267
- }, [
1268
- e("img", {
1269
- src: s(P) + `/bim-viewer/comments/${u.value === X.id ? X.imgActive : X.img}.svg`
1270
- }, null, 8, rl),
1271
- u.value === X.id ? (n(), c("div", ul, [
1272
- e("div", dl, [
1273
- X.buttontype === "text" ? (n(), c("div", ml, [
1274
- (n(!0), c(G, null, q(s(Fe), (L) => (n(), c("div", {
1275
- key: L.id,
1276
- class: ue(["text1", { text2: C.value === L.id }]),
1277
- style: ee({ "font-size": L.id === 0 ? "18px" : L.id === 1 ? "16px" : "12px" }),
1278
- onClick: (se) => Q(L)
1279
- }, a(s(U)(L.name)), 15, vl))), 128))
1280
- ])) : (n(), c("div", _l, [
1281
- (n(!0), c(G, null, q(s(Ue), (L) => (n(), c("div", {
1282
- key: L.id,
1283
- class: ue(["weight", { choose_weight: k.value === L.id }]),
1284
- style: ee({
1285
- width: L.id === 0 ? "6px" : L.id === 1 ? "14px" : "20px",
1286
- height: L.id === 0 ? "6px" : L.id === 1 ? "14px" : "20px"
1287
- }),
1288
- onClick: Z((se) => N(L), ["stop"])
1289
- }, null, 14, pl))), 128))
1290
- ])),
1291
- e("div", hl, [
1292
- (n(!0), c(G, null, q(s(Ae), (L) => (n(), c("div", {
1293
- key: L.id,
1294
- class: ue(["color-item", { choose_color: I.value === L.id }]),
1295
- style: ee({
1296
- background: L.color,
1297
- border: L.id === 5 ? "1px solid #CBCFD9" : "",
1298
- width: (L.id === 5, "18px"),
1299
- height: (L.id === 5, "18px")
1300
- }),
1301
- onClick: Z((se) => H(L), ["stop"])
1302
- }, null, 14, gl))), 128))
1303
- ])
1304
- ])
1305
- ])) : A("", !0)
1306
- ], 10, cl))), 128))
1307
- ]),
1308
- te[0] || (te[0] = e("div", { class: "splitLine" }, null, -1)),
1309
- e("div", fl, [
1310
- e("div", {
1311
- class: "comments_tool_btn",
1312
- onClick: J
1313
- }, [
1314
- e("img", {
1315
- src: s(P) + `/bim-viewer/annotations/${E.value ? "left-revoke-active" : "left-revoke"}.png`
1316
- }, null, 8, bl)
1317
- ]),
1318
- e("div", {
1319
- class: "comments_tool_btn",
1320
- onClick: le
1321
- }, [
1322
- e("img", {
1323
- src: s(P) + `/bim-viewer/annotations/${D.value ? "right-revoke-active" : "right-revoke"}.png`
1324
- }, null, 8, kl)
1325
- ])
1326
- ]),
1327
- te[1] || (te[1] = e("div", { class: "splitLine" }, null, -1)),
1328
- e("div", { class: "comments_toolbar_group" }, [
1329
- e("div", {
1330
- class: "comments_cancel",
1331
- onClick: R
1332
- }, " 取消 "),
1333
- e("div", {
1334
- class: "comments_save",
1335
- onClick: g
1336
- }, " 保存 ")
1337
- ])
1338
- ])
1339
- ])
1340
- ]));
1341
- }
1342
- }), $l = /* @__PURE__ */ ie(Cl, [["__scopeId", "data-v-8518aacc"]]), yl = { key: 2 }, wl = { class: "top" }, Il = { class: "top_bar" }, xl = ["src"], Tl = {
1343
- key: 0,
1344
- class: "title_2"
1345
- }, Dl = { class: "more" }, Sl = ["src"], Ll = {
1346
- key: 3,
1347
- class: "loading_shelter"
1348
- }, Pl = /* @__PURE__ */ ne({
1349
- __name: "CommentTool",
1350
- props: ["componentId", "instruction"],
1351
- emits: ["closePanel", "emitHandler"],
1352
- setup(W, { emit: Y }) {
1353
- const U = $e(), h = ke(), p = ae(), v = W, y = (m) => {
1354
- C.value = m;
1355
- }, w = o(!1), i = o(""), O = o(""), E = o(!1), D = (m) => {
1356
- i.value = m.type, O.value = m.text, E.value = !0, setTimeout(() => {
1357
- E.value = !1;
1358
- }, 1500);
1359
- };
1360
- K.on("cmtLoading", y), K.on("prompt", D), me(() => {
1361
- U.setReadyById(v.componentId);
1362
- }), be(() => {
1363
- K.off("cmtLoading", y), K.off("prompt", D);
1364
- });
1365
- const M = Y, u = (m) => {
1366
- M("emitHandler", m);
1367
- }, k = o();
1368
- re(
1369
- () => U.isToolActive(v.componentId),
1370
- (m) => {
1371
- j("isMobile") && (j("editPrivilege") == 0 ? m ? k.value.handleOpen() : (k.value.handleClose(), K.emit("hideToolbar", !1), Q()) : j("editPrivilege") == 1 && (m ? B() : (K.emit("hideToolbar", !1), Q())));
1372
- }
1373
- );
1374
- const I = o(!1);
1375
- re(
1376
- () => v.instruction,
1377
- (m) => {
1378
- m && (m.instruct_name == "updateCmtList" && (T.value = m.content.cmtList, (m.content.msg && m.content.msg.show || z.value == 2) && B(!1)), m.instruct_name == "checkCmtDetail" && m.content.cmtDetail && (N.value = m.content.cmtDetail, S.value = N.value.title, x(N.value.guid, !1)), m.instruct_name == "newComment" && m.content.code == 200 && (I.value = !0, D({ type: "success", text: p("mobileComments.createSuccess") }), setTimeout(() => {
1379
- x(m.content.guid);
1380
- }, 200)), K.emit("cmtLoading", !1));
1381
- },
1382
- { deep: !0 }
1383
- );
1384
- const C = o(!1), z = o(0), T = o([]), S = o(p("mobileComments.newComment")), b = o(!1), g = o(!1), R = o(!1), N = o(), H = o(""), Q = () => {
1385
- z.value = 0, b.value = !1, R.value = !1, g.value = !1, S.value = p("mobileComments.newComment");
1386
- }, t = (m) => {
1387
- H.value = m, z.value = 1, g.value = !0;
1388
- }, l = (m) => {
1389
- K.emit("cmtLoading", !0), u({
1390
- isTool: !0,
1391
- event_name: "newComment",
1392
- event_target: "CommentTool",
1393
- content: { ...m }
1394
- });
1395
- }, x = (m, F = !0) => {
1396
- F ? (K.emit("cmtLoading", !0), u({
1397
- isTool: !0,
1398
- event_target: "CommentTool",
1399
- event_name: "checkCmtDetail",
1400
- content: { id: m }
1401
- })) : R.value = !0, g.value = !1, z.value = 2;
1402
- }, B = (m = !0) => {
1403
- m && (K.emit("cmtLoading", !0), u({
1404
- isTool: !0,
1405
- event_name: "refreshCmtList",
1406
- event_target: "CommentTool",
1407
- content: {}
1408
- })), z.value = 3, S.value = "批注列表", b.value = !0, R.value = !1;
1409
- }, _ = (m) => {
1410
- u({
1411
- isTool: !0,
1412
- event_target: "CommentTool",
1413
- event_name: "deleteComment",
1414
- content: { id: m }
1415
- });
1416
- }, d = () => {
1417
- switch (z.value) {
1418
- case 0:
1419
- f();
1420
- break;
1421
- case 1:
1422
- Q();
1423
- break;
1424
- case 2:
1425
- R.value = !1, S.value = "批注列表", z.value = 3, I.value ? B() : b.value = !0;
1426
- break;
1427
- case 3:
1428
- j("editPrivilege") == 0 && (b.value = !1, Q()), j("editPrivilege") == 1 && f();
1429
- break;
1430
- }
1431
- }, $ = () => {
1432
- z.value == 2 && x(N.value.guid), z.value == 3 && B();
1433
- }, f = () => {
1434
- K.emit("hideToolbar", !1), M("closePanel");
1435
- };
1436
- return (m, F) => {
1437
- const le = $l, J = ol, r = Oo, te = _o, X = Es, L = Ke;
1438
- return n(), c("div", {
1439
- class: "comment_component",
1440
- onPointerdown: F[4] || (F[4] = (se) => w.value = !1)
1441
- }, [
1442
- e("div", {
1443
- id: "comments_panel",
1444
- class: "comments_panel",
1445
- style: ee({ background: s(j)("backgroundColor") })
1446
- }, null, 4),
1447
- s(j)("isMobile") ? A("", !0) : (n(), oe(le, {
1448
- key: 0,
1449
- "component-id": W.componentId,
1450
- onEmitHandler: u,
1451
- onClosePanel: F[0] || (F[0] = (se) => M("closePanel"))
1452
- }, null, 8, ["component-id"])),
1453
- s(j)("isMobile") ? (n(), oe(J, {
1454
- key: 1,
1455
- ref_key: "drawRef",
1456
- ref: k,
1457
- "component-id": W.componentId,
1458
- onCancel: d,
1459
- onConfirm: t
1460
- }, null, 8, ["component-id"])) : A("", !0),
1461
- s(j)("isMobile") ? (n(), c("div", yl, [
1462
- g.value ? (n(), oe(r, {
1463
- key: 0,
1464
- "image-data": H.value,
1465
- "user-id": s(h).getUserId,
1466
- onCreateNew: l,
1467
- onCancel: F[1] || (F[1] = (se) => g.value = !1),
1468
- onEmitHandler: u
1469
- }, null, 8, ["image-data", "user-id"])) : A("", !0),
1470
- R.value ? (n(), oe(te, {
1471
- key: 1,
1472
- "cmt-content": N.value,
1473
- onDelete: _,
1474
- onBack: f
1475
- }, null, 8, ["cmt-content"])) : A("", !0),
1476
- we(V(X, {
1477
- "-c-m-t-list": T.value,
1478
- instruction: v.instruction,
1479
- onCheckCmtDetail: x,
1480
- onBack: d
1481
- }, null, 8, ["-c-m-t-list", "instruction"]), [
1482
- [Ie, b.value]
1483
- ]),
1484
- e("div", wl, [
1485
- e("div", {
1486
- class: "top_height",
1487
- style: ee({ width: "100%", height: `${s(j)("topHeight") / 50}rem` })
1488
- }, null, 4),
1489
- e("div", Il, [
1490
- e("img", {
1491
- class: "back",
1492
- onClick: d,
1493
- src: s(P) + "/bim-viewer/bcf-images/back.png"
1494
- }, null, 8, xl),
1495
- e("div", {
1496
- class: "title",
1497
- onClick: F[2] || (F[2] = Z((se) => w.value = !w.value, ["stop"]))
1498
- }, a(S.value), 1),
1499
- w.value ? (n(), c("span", Tl, a(S.value), 1)) : A("", !0),
1500
- e("div", Dl, [
1501
- z.value == 0 ? (n(), c("div", {
1502
- key: 0,
1503
- class: "history",
1504
- onClick: F[3] || (F[3] = (se) => B())
1505
- }, a(s(p)("mobileComments.list")), 1)) : A("", !0),
1506
- z.value == 2 || z.value == 3 ? (n(), c("img", {
1507
- key: 1,
1508
- class: "refresh",
1509
- onClick: $,
1510
- src: s(P) + "/bim-viewer/bcf-images/refresh.png"
1511
- }, null, 8, Sl)) : A("", !0)
1512
- ])
1513
- ])
1514
- ])
1515
- ])) : A("", !0),
1516
- C.value ? (n(), c("div", Ll)) : A("", !0),
1517
- E.value ? (n(), oe(L, {
1518
- key: 4,
1519
- type: i.value,
1520
- text: O.value
1521
- }, null, 8, ["type", "text"])) : A("", !0)
1522
- ], 32);
1523
- };
1524
- }
1525
- }), El = /* @__PURE__ */ ie(Pl, [["__scopeId", "data-v-905be4d3"]]);
1526
- export {
1527
- El as default
1528
- };