ss-component-new 1.1.523 → 1.1.524

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.
@@ -0,0 +1,1173 @@
1
+ import { resolveComponent as w, createBlock as S, openBlock as r, withCtx as o, createVNode as t, createElementVNode as h, toDisplayString as oe, ref as c, onMounted as vt, watch as O, createElementBlock as M, Fragment as Be, renderList as De, createCommentVNode as N, normalizeStyle as yt, defineComponent as We, computed as Re, resolveDirective as Qe, withDirectives as Te, unref as a, createTextVNode as X, renderSlot as ve, vShow as Se, resolveDynamicComponent as Ye } from "vue";
2
+ import { m as je, a as Ve, b as Ne } from "./index-CIIEhoPK.js";
3
+ import Ze from "./index-DEe2zsga.js";
4
+ import { _ as Ct, o as et, c as tt, a as at, b as ot, d as nt, s as ae, g as lt, e as it, f as st, h as rt, i as wt, j as Bt } from "./index.vue_vue_type_style_index_0_scoped_b9caa997_lang-hmqNLVAu.js";
5
+ import { _ as ye } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
+ import { p as J, s as H, u as $e, e as ut, c as Ae, d as we, g as kt } from "./menu-C2j1i_cN.js";
7
+ import { u as ct } from "./crypto-CMXGCdQv.js";
8
+ import { S as ge } from "./index-BHtNKL1L.js";
9
+ import { u as Me } from "./threeModel.vue_vue_type_style_index_0_scoped_4a248817_lang-D9glQKd6.js";
10
+ import { u as Ue, a as Ft, l as dt, g as bt, b as Rt } from "./index-C2cfRaP7.js";
11
+ import { _ as mt, a as Tt, s as St } from "./index-CaZmDQQH.js";
12
+ import { _ as pt } from "./index.vue_vue_type_script_setup_true_lang-Bk3kThxx.js";
13
+ import He from "./threeModel-CkbHdhYr.js";
14
+ import { u as At } from "./index-Dt0W4n11.js";
15
+ import { d as Je } from "./index-CL2WV4Ur.js";
16
+ import "vue-router";
17
+ import { a as $t } from "./array-Ba5TFfWm.js";
18
+ import { c as Mt, b as Pt } from "./index.vue_vue_type_style_index_0_scoped_ed9fe0f5_lang-B1zL6TmK.js";
19
+ function xt(b, Z, e, B, A, L) {
20
+ const l = w("svg-icon"), U = w("ssMenu");
21
+ return r(), S(U, {
22
+ mode: b.mode,
23
+ menuList: b.renderMenuList,
24
+ onClickMenu: b.clickMenu,
25
+ onOpenMenu: b.openMenu,
26
+ onCloseMenu: b.closeMenu
27
+ }, {
28
+ title: o(({ menu: V }) => [
29
+ t(l, {
30
+ name: V.icon ?? "Fold",
31
+ style: { width: "clamp(16px, 1.25rem, 20px)", height: "clamp(16px, 1.25rem, 20px)", "margin-right": "8px" }
32
+ }, null, 8, ["name"]),
33
+ h("span", null, oe(V.title ?? ""), 1)
34
+ ]),
35
+ _: 1
36
+ }, 8, ["mode", "menuList", "onClickMenu", "onOpenMenu", "onCloseMenu"]);
37
+ }
38
+ const ht = /* @__PURE__ */ ye(Ct, [["render", xt], ["__scopeId", "data-v-5c2d7ed2"]]), Dt = { class: "bread-content" }, jt = ["onClick"], Vt = {
39
+ key: 0,
40
+ class: "split-title"
41
+ }, Nt = {
42
+ __name: "index",
43
+ props: {
44
+ breadArray: {
45
+ type: Array,
46
+ default: () => []
47
+ }
48
+ },
49
+ emits: ["click"],
50
+ setup(b, { emit: Z }) {
51
+ const e = b, B = c([]), A = Z;
52
+ vt(() => {
53
+ B.value = e == null ? void 0 : e.breadArray;
54
+ }), O(
55
+ () => e == null ? void 0 : e.breadArray,
56
+ () => {
57
+ B.value = e == null ? void 0 : e.breadArray;
58
+ },
59
+ { deep: !0, immediate: !0 }
60
+ );
61
+ const L = (l) => {
62
+ A("click", l);
63
+ };
64
+ return (l, U) => (r(), M("div", Dt, [
65
+ (r(!0), M(Be, null, De(B.value, (V, D) => {
66
+ var K;
67
+ return r(), M("div", {
68
+ key: D,
69
+ class: "bread-item"
70
+ }, [
71
+ h("div", {
72
+ class: "bread-title",
73
+ onClick: (ce) => L(V),
74
+ style: yt({ opacity: ((K = B.value) == null ? void 0 : K.length) - 1 === D ? "0.7" : "1" })
75
+ }, oe(V.value), 13, jt),
76
+ D !== B.value.length - 1 && Array.isArray(B.value) ? (r(), M("div", Vt, oe("/"))) : N("", !0)
77
+ ]);
78
+ }), 128))
79
+ ]));
80
+ }
81
+ }, ft = /* @__PURE__ */ ye(Nt, [["__scopeId", "data-v-ded7e2bd"]]), Ut = { class: "structure-buttons" }, Et = { class: "structure-paths" }, It = { class: "client-header-user" }, Ot = { class: "model-select" }, Lt = { class: "model-show" }, Kt = { class: "model-fill" }, zt = { class: "client-header-menu" }, Gt = { class: "client-header-user" }, Xt = { class: "drop-menu" }, qt = { class: "client-main-operate" }, Ht = {
82
+ key: 0,
83
+ class: "item-view-group"
84
+ }, Jt = /* @__PURE__ */ We({
85
+ __name: "index2",
86
+ props: {
87
+ windowConfig: {
88
+ type: Object,
89
+ default: () => {
90
+ }
91
+ },
92
+ showButton: {
93
+ type: Boolean,
94
+ default: !0
95
+ }
96
+ },
97
+ setup(b) {
98
+ const Z = Ue(J), { selectTitle: e } = H(Z), B = ct(), { loginUserInfo: A } = H(B), L = Me(J), { isEdit: l, routeToChildPath: U } = H(L), V = $e(J), { importLoading: D, activeTopMenuPath: K, activeAsideMenu: ce } = H(V), g = c(""), E = Re(() => ce.value.isRouter), I = () => {
99
+ sessionStorage.clear(), window.location.reload();
100
+ }, W = () => {
101
+ V.setActiveMenuPath(U.value), L.setRouteToChildPath("");
102
+ };
103
+ return (ee, f) => {
104
+ const v = w("el-button"), Q = w("el-avatar"), fe = w("el-header"), ie = w("el-container"), ne = w("el-icon"), ke = w("el-input"), de = w("ss-button"), p = w("el-aside"), P = w("router-view"), R = w("el-main"), $ = Qe("loading");
105
+ return r(), M(Be, null, [
106
+ Te(t(ie, { class: "client-container" }, {
107
+ default: o(() => [
108
+ t(fe, { class: "client-structure-header" }, {
109
+ default: o(() => {
110
+ var k;
111
+ return [
112
+ h("div", Ut, [
113
+ t(v, {
114
+ id: "transparentBgButton",
115
+ onClick: a(et)
116
+ }, {
117
+ default: o(() => f[2] || (f[2] = [
118
+ X(" 返回页面 ")
119
+ ])),
120
+ _: 1,
121
+ __: [2]
122
+ }, 8, ["onClick"]),
123
+ t(v, {
124
+ id: "transparentBgButton",
125
+ onClick: f[0] || (f[0] = (n) => {
126
+ var z, q;
127
+ return a(tt)((q = (z = a(e)) == null ? void 0 : z.map((me) => me.value)) == null ? void 0 : q.join("/"));
128
+ })
129
+ }, {
130
+ icon: o(() => [
131
+ t(ge, { name: "Store" })
132
+ ]),
133
+ default: o(() => [
134
+ f[3] || (f[3] = X(" 保存页面 "))
135
+ ]),
136
+ _: 1,
137
+ __: [3]
138
+ })
139
+ ]),
140
+ h("div", Et, [
141
+ (r(), S(ft, {
142
+ key: a(e),
143
+ breadArray: a(e),
144
+ onClick: a(at)
145
+ }, null, 8, ["breadArray", "onClick"]))
146
+ ]),
147
+ h("div", It, [
148
+ ve(ee.$slots, "default", {}, void 0, !0),
149
+ t(Q, {
150
+ size: 35,
151
+ src: (k = a(A)) == null ? void 0 : k.avatarUrl
152
+ }, {
153
+ default: o(() => {
154
+ var n;
155
+ return [
156
+ X(oe(((n = a(A)) == null ? void 0 : n.account) ?? "未知"), 1)
157
+ ];
158
+ }),
159
+ _: 1
160
+ }, 8, ["src"])
161
+ ])
162
+ ];
163
+ }),
164
+ _: 3
165
+ }),
166
+ a(l) === "edit" ? (r(), S(ie, {
167
+ key: 0,
168
+ class: "model-operate",
169
+ style: { "margin-top": "10px", height: "0px" }
170
+ }, {
171
+ default: o(() => [
172
+ h("div", Ot, [
173
+ t(je)
174
+ ]),
175
+ h("div", Lt, [
176
+ t(Ve)
177
+ ]),
178
+ h("div", Kt, [
179
+ t(Ne)
180
+ ])
181
+ ]),
182
+ _: 1
183
+ })) : N("", !0)
184
+ ]),
185
+ _: 3
186
+ }, 512), [
187
+ [Se, a(l) === "edit"]
188
+ ]),
189
+ Te((r(), S(ie, {
190
+ class: "client-container",
191
+ "element-loading-text": "正在加载页面数据..."
192
+ }, {
193
+ default: o(() => [
194
+ t(fe, { class: "client-header" }, {
195
+ default: o(() => [
196
+ f[6] || (f[6] = h("div", { class: "client-header-logo" }, " ISIP ", -1)),
197
+ h("div", zt, [
198
+ t(ht, { mode: "horizontal" })
199
+ ]),
200
+ h("div", Gt, [
201
+ t(ke, {
202
+ modelValue: g.value,
203
+ "onUpdate:modelValue": f[1] || (f[1] = (k) => g.value = k),
204
+ clearable: "",
205
+ placeholder: "搜索",
206
+ style: { width: "130px" }
207
+ }, {
208
+ prefix: o(() => [
209
+ t(ne, { class: "el-input__icon" }, {
210
+ default: o(() => [
211
+ t(a(ut))
212
+ ]),
213
+ _: 1
214
+ })
215
+ ]),
216
+ _: 1
217
+ }, 8, ["modelValue"]),
218
+ b.showButton ? (r(), S(v, {
219
+ key: 0,
220
+ id: "transparentBgButton",
221
+ onClick: a(ot)
222
+ }, {
223
+ icon: o(() => [
224
+ t(ge, { name: "App" })
225
+ ]),
226
+ default: o(() => [
227
+ f[4] || (f[4] = X(" 生成APP "))
228
+ ]),
229
+ _: 1,
230
+ __: [4]
231
+ }, 8, ["onClick"])) : N("", !0),
232
+ b.showButton && a(l) === "view" ? (r(), S(v, {
233
+ key: 1,
234
+ id: "transparentBgButton",
235
+ onClick: a(nt)
236
+ }, {
237
+ icon: o(() => [
238
+ t(ge, { name: "write" })
239
+ ]),
240
+ default: o(() => [
241
+ f[5] || (f[5] = X(" 修改布局 "))
242
+ ]),
243
+ _: 1,
244
+ __: [5]
245
+ }, 8, ["onClick"])) : N("", !0),
246
+ ve(ee.$slots, "default", {}, void 0, !0),
247
+ t(mt, null, {
248
+ dropTitle: o(() => {
249
+ var k;
250
+ return [
251
+ t(pt, {
252
+ size: "35",
253
+ avatarUrl: (k = a(A)) == null ? void 0 : k.avatarUrl,
254
+ showCropper: !1,
255
+ banClick: !0
256
+ }, {
257
+ avatarDefault: o(() => {
258
+ var n;
259
+ return [
260
+ X(oe(((n = a(A)) == null ? void 0 : n.account) ?? "未知"), 1)
261
+ ];
262
+ }),
263
+ _: 1
264
+ }, 8, ["avatarUrl"])
265
+ ];
266
+ }),
267
+ dropMenu: o(() => [
268
+ h("div", Xt, [
269
+ t(de, {
270
+ emptyColor: !0,
271
+ class: "menu-button",
272
+ onClickTrigger: I,
273
+ modelValue: "退出登录",
274
+ buttonType: ""
275
+ })
276
+ ])
277
+ ]),
278
+ _: 1
279
+ })
280
+ ])
281
+ ]),
282
+ _: 3,
283
+ __: [6]
284
+ }),
285
+ t(ie, { class: "client-body" }, {
286
+ default: o(() => [
287
+ t(R, { class: "client-main" }, {
288
+ default: o(() => {
289
+ var k;
290
+ return [
291
+ t(p, { class: "client-aside" }, {
292
+ default: o(() => [
293
+ t(Ze, { mode: "vertical" })
294
+ ]),
295
+ _: 1
296
+ }),
297
+ h("div", qt, [
298
+ E.value ? (r(), S(P, { key: 0 })) : N("", !0),
299
+ a(U) !== "" ? (r(), S(de, {
300
+ key: 1,
301
+ class: "calculator-content back-content",
302
+ onClickTrigger: W,
303
+ modelValue: "返回"
304
+ })) : N("", !0),
305
+ E.value ? N("", !0) : (r(!0), M(Be, { key: 2 }, De((k = a(Ae)(a(ae))) == null ? void 0 : k.filter((n) => n.comp !== "FormTop"), (n, z) => {
306
+ var q;
307
+ return r(), M("div", {
308
+ class: "item-view-content",
309
+ key: z
310
+ }, [
311
+ ((q = n == null ? void 0 : n.comp) == null ? void 0 : q.toUpperCase()) !== "TABLE" && n.name ? (r(), M("div", Ht, oe(n.name), 1)) : N("", !0),
312
+ (r(), S(Ye(a(lt)(n.comp)), {
313
+ compName: n.name,
314
+ itemData: n == null ? void 0 : n.compData,
315
+ childItemData: n == null ? void 0 : n.itemChildData,
316
+ key: (n == null ? void 0 : n.id) ?? z,
317
+ onChange: a(rt),
318
+ index: (n == null ? void 0 : n.id) ?? z,
319
+ onContentChange: a(st),
320
+ onPageChange: a(it)
321
+ }, null, 40, ["compName", "itemData", "childItemData", "onChange", "index", "onContentChange", "onPageChange"]))
322
+ ]);
323
+ }), 128))
324
+ ])
325
+ ];
326
+ }),
327
+ _: 1
328
+ })
329
+ ]),
330
+ _: 1
331
+ })
332
+ ]),
333
+ _: 3
334
+ })), [
335
+ [Se, a(l) === "view"],
336
+ [$, a(D)]
337
+ ])
338
+ ], 64);
339
+ };
340
+ }
341
+ }), Wt = /* @__PURE__ */ ye(Jt, [["__scopeId", "data-v-1c30d678"]]), Pe = [
342
+ {
343
+ key: "FitCurve_Eleven",
344
+ value: "http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35326658522693",
345
+ resources: "http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35326658522693",
346
+ download: "http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35326658522693/outputResources"
347
+ },
348
+ {
349
+ key: "MakeShape",
350
+ value: "http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35018179530309",
351
+ resources: "http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35018179530309",
352
+ download: "http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35018179530309/outputResources"
353
+ },
354
+ {
355
+ key: "FillEmpty",
356
+ value: "http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35018289382469",
357
+ resources: "http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35018289382469",
358
+ download: "http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35018289382469/outputResources"
359
+ },
360
+ {
361
+ key: "ToolPathFakeFast",
362
+ value: "http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35484063607109",
363
+ resources: "http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35484063607109",
364
+ download: "http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35484063607109/outputResources"
365
+ },
366
+ {
367
+ key: "FiveAxisCalculator",
368
+ value: "http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35237389477957",
369
+ resources: "http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35237389477957",
370
+ download: "http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35237389477957/outputResources"
371
+ },
372
+ {
373
+ key: "DetectionAlgorithm",
374
+ value: "http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35459977498949",
375
+ resources: "http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35459977498949",
376
+ download: "http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35459977498949/outputResources"
377
+ },
378
+ {
379
+ key: "FeatureSelectionAlgorithm_FFS",
380
+ value: "http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35277984187973",
381
+ resources: "http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35277984187973",
382
+ download: "http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35277984187973/outputResources"
383
+ },
384
+ {
385
+ key: "AIParameterOptimization",
386
+ value: "http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35788169784389",
387
+ resources: "http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35788169784389"
388
+ }
389
+ ], xe = [
390
+ {
391
+ key: "型线生成",
392
+ value: "http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35326658522693/outputResources/sampling_points_20.cpt"
393
+ },
394
+ {
395
+ key: "曲面生成",
396
+ value: "http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35018179530309/outputResources/output.obj"
397
+ },
398
+ {
399
+ key: "叶片生成",
400
+ value: "http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35018289382469/outputResources/output_TwoSections_completed.obj"
401
+ },
402
+ {
403
+ key: "轨迹规划",
404
+ value: "http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35484063607109/outputResources/complete_data.txt"
405
+ },
406
+ {
407
+ key: "加工规划",
408
+ value: "http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35237389477957/outputResources/NC_BC.NC"
409
+ },
410
+ {
411
+ key: "产品检测",
412
+ value: "http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35459977498949/outputResources/source.pcd,http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35459977498949/outputResources/target.pcd"
413
+ },
414
+ {
415
+ key: "参数筛选训练方法",
416
+ value: "http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35277984187973/outputResources/fitness_iteration.png"
417
+ }
418
+ // {
419
+ // key: "参数筛选推理",
420
+ // value: "http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35277984187973/outputResources/fitness_iteration.png"
421
+ // }
422
+ ], Qt = { class: "structure-buttons" }, Yt = { class: "structure-paths" }, Zt = { class: "client-header-user" }, ea = { class: "model-select" }, ta = { class: "model-show" }, aa = { class: "model-fill" }, oa = { class: "client-header-menu" }, na = { class: "client-header-user" }, la = { class: "drop-menu" }, ia = { class: "client-main-operate" }, sa = {
423
+ key: 0,
424
+ class: "item-view-group"
425
+ }, ra = /* @__PURE__ */ We({
426
+ __name: "index2",
427
+ props: {
428
+ windowConfig: {
429
+ type: Object,
430
+ default: () => {
431
+ }
432
+ },
433
+ showButton: {
434
+ type: Boolean,
435
+ default: !0
436
+ }
437
+ },
438
+ emits: ["showChild", "buildContent"],
439
+ setup(b, { emit: Z }) {
440
+ const e = Ue(J), B = c(!1);
441
+ c(0), c(!1);
442
+ const { selectTitle: A } = H(e), L = c(!1), l = c(!1), U = c(0);
443
+ c(!1);
444
+ const V = Ft(J), D = c(!1), { tableShowThree: K } = H(V), ce = ct(), { loginUserInfo: g } = H(ce);
445
+ c(null);
446
+ const E = Me(J), { isEdit: I } = H(E), W = $e(J), ee = At(J), { objUrl: f, blobUrls: v } = H(ee), Q = c(null);
447
+ c(!1);
448
+ const fe = c(!0);
449
+ c(!1);
450
+ const { importLoading: ie, activeMenuPath: ne, activeTopMenuPath: ke, platName: de, activeAsideMenu: p } = H(W), P = c(!1), R = c(!1), $ = c(!1), k = Z;
451
+ O(() => ne.value, async (i) => {
452
+ i && ($.value = !0), i === "弯管仿真加工管理/仿真动画生成" ? P.value = !0 : P.value = !1, i === "弯管仿真加工管理/程序输出" ? R.value = !0 : R.value = !1, xe != null && xe.find((u) => {
453
+ var F;
454
+ return (u == null ? void 0 : u.key) === ((F = i == null ? void 0 : i.split("/")) == null ? void 0 : F[(i == null ? void 0 : i.split("/").length) - 1]);
455
+ }) ? D.value = !0 : D.value = !1;
456
+ }, { immediate: !0 });
457
+ const n = (i) => {
458
+ if ((i == null ? void 0 : i.type) === "table") {
459
+ let u = Object.values(i == null ? void 0 : i.row), F = u == null ? void 0 : u.find((y) => typeof y == "string" && ((y == null ? void 0 : y.includes(".urdf")) || (y == null ? void 0 : y.includes(".obj"))));
460
+ F && k("showChild", {
461
+ url: F,
462
+ row: i == null ? void 0 : i.row
463
+ });
464
+ }
465
+ }, z = () => {
466
+ sessionStorage.clear(), window.location.reload(), U.value++;
467
+ }, q = async (i) => {
468
+ var y, _, C, s, G, Y, d;
469
+ const u = (y = i == null ? void 0 : i.split("/")) == null ? void 0 : y[0], F = await kt({
470
+ key: {
471
+ type: "mainEquip",
472
+ systemKey: sessionStorage.getItem("systemKey"),
473
+ pageKey: u
474
+ }
475
+ });
476
+ return ((_ = F == null ? void 0 : F.data) == null ? void 0 : _.type) === "success" ? ((d = (Y = (G = (s = (C = F == null ? void 0 : F.data) == null ? void 0 : C.result) == null ? void 0 : s[0]) == null ? void 0 : G.value) == null ? void 0 : Y.tableData) == null ? void 0 : d.隐藏三维显示) !== !0 : !0;
477
+ };
478
+ O(
479
+ () => ae.value,
480
+ () => {
481
+ var i, u, F, y, _;
482
+ if (((i = ae.value) == null ? void 0 : i.length) === 2 && ((u = ae.value) != null && u.find((C) => (C == null ? void 0 : C.name) === "输入")) && ((F = ae.value) != null && F.find((C) => (C == null ? void 0 : C.name) === "输出"))) {
483
+ const C = (y = ae.value) == null ? void 0 : y.find((s) => (s == null ? void 0 : s.name) === "输出");
484
+ l.value = ((_ = C == null ? void 0 : C.comp) == null ? void 0 : _.toUpperCase()) === "FORM", L.value = !0;
485
+ } else
486
+ L.value = !1, l.value = !1;
487
+ },
488
+ { deep: !0, immediate: !0 }
489
+ ), O(
490
+ () => ne.value,
491
+ async () => {
492
+ ne.value && (fe.value = await q(ne.value));
493
+ },
494
+ { deep: !0, immediate: !0 }
495
+ ), O(
496
+ () => [f.value, Q.value],
497
+ () => {
498
+ var i;
499
+ ((i = f.value) == null ? void 0 : i.length) > 0 && Q.value && Q.value.addModelsFromUrls(f.value);
500
+ },
501
+ { immediate: !0, deep: !0 }
502
+ ), O(
503
+ () => v == null ? void 0 : v.value,
504
+ async () => {
505
+ var i, u, F, y;
506
+ if (v != null && v.value && ((i = v == null ? void 0 : v.value) == null ? void 0 : i.length) > 0 && !D.value && !((u = ae.value) != null && u.find((_) => (_ == null ? void 0 : _.name) === "输入") && ((F = ae.value) != null && F.find((_) => (_ == null ? void 0 : _.name) === "输出")))) {
507
+ let _ = [];
508
+ const C = await ((y = Ae(v == null ? void 0 : v.value)) == null ? void 0 : y.map(async (s) => {
509
+ var se, Fe, j, m, le, re, be, Ee, Ie, Oe;
510
+ let G, Y, d;
511
+ s != null && s.blob.includes("undefined") ? d = (Fe = (se = s == null ? void 0 : s.blob) == null ? void 0 : se.split("undefined,")) == null ? void 0 : Fe[1] : d = s == null ? void 0 : s.blob;
512
+ let te = d == null ? void 0 : d.split(",");
513
+ if ((te == null ? void 0 : te.length) > 1) {
514
+ let he = await (te == null ? void 0 : te.map(async (x) => {
515
+ var ue, Le, Ke, ze, Ge, Xe;
516
+ G = await we.get(x, {
517
+ responseType: "blob",
518
+ headers: {
519
+ "Content-Type": "application/json"
520
+ }
521
+ });
522
+ let _e = [];
523
+ if (((ue = s == null ? void 0 : s.mtlBlobs) == null ? void 0 : ue.length) > 0) {
524
+ let _t = await ((Le = s == null ? void 0 : s.mtlBlobs) == null ? void 0 : Le.map(async (gt) => {
525
+ let qe = await we.get(gt, {
526
+ responseType: "blob",
527
+ headers: {
528
+ "Content-Type": "application/json"
529
+ }
530
+ });
531
+ return _e.push(new Blob([qe.data], {
532
+ type: "application/octet-stream;charset=UTF-8"
533
+ })), qe;
534
+ }));
535
+ await Promise.all(_t);
536
+ }
537
+ return ((ze = x == null ? void 0 : x.split(".")) == null ? void 0 : ze[((Ke = x == null ? void 0 : x.split(".")) == null ? void 0 : Ke.length) - 1]) !== "undefined" && _.push({
538
+ suffix: "." + ((Xe = x == null ? void 0 : x.split(".")) == null ? void 0 : Xe[((Ge = x == null ? void 0 : x.split(".")) == null ? void 0 : Ge.length) - 1]),
539
+ blob: new Blob([G.data], {
540
+ type: "application/octet-stream;charset=UTF-8"
541
+ }),
542
+ mtlBlobs: _e
543
+ }), G;
544
+ }));
545
+ await Promise.all(he);
546
+ } else if (!(d != null && d.includes("https://")) && !(d != null && d.includes("http://"))) {
547
+ G = await Je({
548
+ url: d
549
+ });
550
+ let he = [];
551
+ if (((j = s == null ? void 0 : s.mtlBlobs) == null ? void 0 : j.length) > 0) {
552
+ let x = await ((m = s == null ? void 0 : s.mtlBlobs) == null ? void 0 : m.map(async (_e) => {
553
+ let ue = await Je({
554
+ url: _e
555
+ });
556
+ return he.push(new Blob([ue.data], {
557
+ type: "application/octet-stream;charset=UTF-8"
558
+ })), ue;
559
+ }));
560
+ await Promise.all(x);
561
+ }
562
+ Y = {
563
+ suffix: "." + ((re = d == null ? void 0 : d.split(".")) == null ? void 0 : re[((le = d == null ? void 0 : d.split(".")) == null ? void 0 : le.length) - 1]),
564
+ blob: new Blob([G.data], {
565
+ type: "application/octet-stream;charset=UTF-8"
566
+ }),
567
+ mtlBlobs: he
568
+ };
569
+ } else {
570
+ G = await we.get(d, {
571
+ responseType: "blob",
572
+ headers: {
573
+ "Content-Type": "application/json"
574
+ }
575
+ });
576
+ let he = [];
577
+ if (((be = s == null ? void 0 : s.mtlBlobs) == null ? void 0 : be.length) > 0) {
578
+ let x = await ((Ee = s == null ? void 0 : s.mtlBlobs) == null ? void 0 : Ee.map(async (_e) => {
579
+ let ue = await we.get(_e, {
580
+ responseType: "blob",
581
+ headers: {
582
+ "Content-Type": "application/json"
583
+ }
584
+ });
585
+ return he.push(new Blob([ue.data], {
586
+ type: "application/octet-stream;charset=UTF-8"
587
+ })), ue;
588
+ }));
589
+ await Promise.all(x);
590
+ }
591
+ Y = {
592
+ suffix: "." + ((Oe = d == null ? void 0 : d.split(".")) == null ? void 0 : Oe[((Ie = d == null ? void 0 : d.split(".")) == null ? void 0 : Ie.length) - 1]),
593
+ blob: new Blob([G.data], {
594
+ type: "application/octet-stream;charset=UTF-8"
595
+ }),
596
+ mtlBlobs: he
597
+ };
598
+ }
599
+ Y && _.push(Y);
600
+ }));
601
+ await Promise.all(C), (_ == null ? void 0 : _.length) !== 0 && (B.value = !0, Q.value.loadModelByDefaultPath(_));
602
+ }
603
+ },
604
+ { immediate: !0, deep: !0 }
605
+ ), O(
606
+ () => K.value,
607
+ async () => {
608
+ var u, F, y, _;
609
+ if (K.value !== "" && K.value) {
610
+ let C = (u = ne.value) == null ? void 0 : u.split("/"), s = C[(C == null ? void 0 : C.length) - 2];
611
+ const Y = (((F = Pe == null ? void 0 : Pe.find((se) => (se == null ? void 0 : se.key) === s)) == null ? void 0 : F.download) ?? "") + "/" + K.value, d = sessionStorage.getItem("magicToken") === "" ? "123456" : sessionStorage.getItem("magicToken"), te = await we.post(Y, null, {
612
+ responseType: "blob",
613
+ // 必须设置
614
+ headers: {
615
+ Authorization: d,
616
+ baseURL: "http://139.196.154.85:20025",
617
+ "Content-Type": "application/json"
618
+ }
619
+ });
620
+ var i = new Blob([te.data], {
621
+ type: "application/octet-stream;charset=UTF-8"
622
+ });
623
+ "" + ((_ = (y = K.value) == null ? void 0 : y.split(".")) == null ? void 0 : _[1]);
624
+ }
625
+ },
626
+ { deep: !0, immediate: !0 }
627
+ );
628
+ const me = c("");
629
+ c("open"), c("open"), c(!1), Re(() => ae.value);
630
+ const Ce = Re(() => p.value.isRouter), pe = c(!1), T = () => {
631
+ pe.value = !0, setTimeout(() => {
632
+ Q.value.loadModelByDefaultPath([{ suffix: ".urdf" }]);
633
+ }, 1e3);
634
+ };
635
+ return (i, u) => {
636
+ const F = w("el-dialog"), y = w("el-button"), _ = w("el-avatar"), C = w("el-header"), s = w("el-container"), G = w("el-icon"), Y = w("el-input"), d = w("el-aside"), te = w("router-view"), se = w("el-main"), Fe = Qe("loading");
637
+ return r(), M(Be, null, [
638
+ t(F, {
639
+ modelValue: pe.value,
640
+ "onUpdate:modelValue": u[0] || (u[0] = (j) => pe.value = j),
641
+ style: { height: "700px", width: "1800px" }
642
+ }, {
643
+ default: o(() => [
644
+ t(He, {
645
+ ref_key: "threeModelRef",
646
+ ref: Q
647
+ }, null, 512)
648
+ ]),
649
+ _: 1
650
+ }, 8, ["modelValue"]),
651
+ Te(t(s, { class: "client-container" }, {
652
+ default: o(() => [
653
+ t(C, { class: "client-structure-header" }, {
654
+ default: o(() => {
655
+ var j;
656
+ return [
657
+ h("div", Qt, [
658
+ t(y, {
659
+ id: "transparentBgButton",
660
+ onClick: a(et)
661
+ }, {
662
+ default: o(() => u[4] || (u[4] = [
663
+ X(" 返回页面 ")
664
+ ])),
665
+ _: 1,
666
+ __: [4]
667
+ }, 8, ["onClick"]),
668
+ t(y, {
669
+ id: "transparentBgButton",
670
+ onClick: u[1] || (u[1] = (m) => {
671
+ var le, re;
672
+ return a(tt)((re = (le = a(A)) == null ? void 0 : le.map((be) => be.value)) == null ? void 0 : re.join("/"));
673
+ })
674
+ }, {
675
+ icon: o(() => [
676
+ t(ge, { name: "Store" })
677
+ ]),
678
+ default: o(() => [
679
+ u[5] || (u[5] = X(" 保存页面 "))
680
+ ]),
681
+ _: 1,
682
+ __: [5]
683
+ })
684
+ ]),
685
+ h("div", Yt, [
686
+ t(ft, {
687
+ breadArray: a(A),
688
+ onClick: a(at)
689
+ }, null, 8, ["breadArray", "onClick"])
690
+ ]),
691
+ h("div", Zt, [
692
+ ve(i.$slots, "default", {}, void 0, !0),
693
+ t(_, {
694
+ size: 35,
695
+ src: (j = a(g)) == null ? void 0 : j.avatarUrl
696
+ }, {
697
+ default: o(() => {
698
+ var m;
699
+ return [
700
+ X(oe(((m = a(g)) == null ? void 0 : m.account) ?? "未知"), 1)
701
+ ];
702
+ }),
703
+ _: 1
704
+ }, 8, ["src"])
705
+ ])
706
+ ];
707
+ }),
708
+ _: 3
709
+ }),
710
+ a(I) === "edit" ? (r(), S(s, {
711
+ key: 0,
712
+ class: "model-operate",
713
+ style: { "margin-top": "10px", height: "0px" }
714
+ }, {
715
+ default: o(() => [
716
+ h("div", ea, [
717
+ t(je)
718
+ ]),
719
+ h("div", ta, [
720
+ t(Ve)
721
+ ]),
722
+ h("div", aa, [
723
+ t(Ne)
724
+ ])
725
+ ]),
726
+ _: 1
727
+ })) : N("", !0)
728
+ ]),
729
+ _: 3
730
+ }, 512), [
731
+ [Se, a(I) === "edit"]
732
+ ]),
733
+ Te((r(), S(s, {
734
+ class: "client-container",
735
+ "element-loading-text": "正在加载页面数据..."
736
+ }, {
737
+ default: o(() => [
738
+ t(C, { class: "client-header" }, {
739
+ default: o(() => [
740
+ h("div", {
741
+ class: "client-header-logo",
742
+ onClick: T
743
+ }, oe(a(de) === "" ? "CPMPIP" : a(de)), 1),
744
+ h("div", oa, [
745
+ t(ht, { mode: "horizontal" })
746
+ ]),
747
+ h("div", na, [
748
+ t(Y, {
749
+ modelValue: me.value,
750
+ "onUpdate:modelValue": u[2] || (u[2] = (j) => me.value = j),
751
+ clearable: "",
752
+ placeholder: "搜索",
753
+ style: { width: "130px" }
754
+ }, {
755
+ prefix: o(() => [
756
+ t(G, { class: "el-input__icon" }, {
757
+ default: o(() => [
758
+ t(a(ut))
759
+ ]),
760
+ _: 1
761
+ })
762
+ ]),
763
+ _: 1
764
+ }, 8, ["modelValue"]),
765
+ b.showButton ? (r(), S(y, {
766
+ key: 0,
767
+ id: "transparentBgButton",
768
+ onClick: a(ot)
769
+ }, {
770
+ icon: o(() => [
771
+ t(ge, { name: "App" })
772
+ ]),
773
+ default: o(() => [
774
+ u[6] || (u[6] = X(" 生成APP "))
775
+ ]),
776
+ _: 1,
777
+ __: [6]
778
+ }, 8, ["onClick"])) : N("", !0),
779
+ b.showButton && a(I) === "view" ? (r(), S(y, {
780
+ key: 1,
781
+ id: "transparentBgButton",
782
+ onClick: a(nt)
783
+ }, {
784
+ icon: o(() => [
785
+ t(ge, { name: "write" })
786
+ ]),
787
+ default: o(() => [
788
+ u[7] || (u[7] = X(" 修改布局 "))
789
+ ]),
790
+ _: 1,
791
+ __: [7]
792
+ }, 8, ["onClick"])) : N("", !0),
793
+ ve(i.$slots, "default", {}, void 0, !0),
794
+ (r(), S(mt, { key: U.value }, {
795
+ dropTitle: o(() => {
796
+ var j;
797
+ return [
798
+ t(pt, {
799
+ size: "35",
800
+ avatarUrl: (j = a(g)) == null ? void 0 : j.avatarUrl,
801
+ showCropper: !1,
802
+ banClick: !0
803
+ }, {
804
+ avatarDefault: o(() => {
805
+ var m;
806
+ return [
807
+ X(oe(((m = a(g)) == null ? void 0 : m.account) ?? "未知"), 1)
808
+ ];
809
+ }),
810
+ _: 1
811
+ }, 8, ["avatarUrl"])
812
+ ];
813
+ }),
814
+ dropMenu: o(() => [
815
+ h("div", la, [
816
+ t(Tt, {
817
+ emptyColor: !0,
818
+ class: "menu-button",
819
+ onClickTrigger: z,
820
+ modelValue: "退出登录",
821
+ buttonType: ""
822
+ })
823
+ ])
824
+ ]),
825
+ _: 1
826
+ }))
827
+ ])
828
+ ]),
829
+ _: 3
830
+ }),
831
+ t(s, { class: "client-body" }, {
832
+ default: o(() => [
833
+ t(se, { class: "client-main" }, {
834
+ default: o(() => {
835
+ var j;
836
+ return [
837
+ t(d, { class: "client-aside" }, {
838
+ default: o(() => [
839
+ t(Ze, { mode: "vertical" })
840
+ ]),
841
+ _: 1
842
+ }),
843
+ h("div", ia, [
844
+ Ce.value ? (r(), S(te, { key: 0 })) : (r(!0), M(Be, { key: 1 }, De((j = a(Ae)(a(ae))) == null ? void 0 : j.filter((m) => m.comp !== "FormTop"), (m, le) => {
845
+ var re;
846
+ return r(), M("div", {
847
+ class: "item-view-content",
848
+ key: le
849
+ }, [
850
+ ((re = m == null ? void 0 : m.comp) == null ? void 0 : re.toUpperCase()) !== "TABLE" && m.name ? (r(), M("div", sa, oe(m.name), 1)) : N("", !0),
851
+ (r(), S(Ye(a(lt)(m.comp)), {
852
+ compName: m.name,
853
+ itemData: m == null ? void 0 : m.compData,
854
+ childItemData: m == null ? void 0 : m.itemChildData,
855
+ key: (m == null ? void 0 : m.id) ?? le,
856
+ onChange: a(rt),
857
+ index: (m == null ? void 0 : m.id) ?? le,
858
+ onContentChange: a(st),
859
+ onPageChange: a(it),
860
+ onRowClick: n
861
+ }, null, 40, ["compName", "itemData", "childItemData", "onChange", "index", "onContentChange", "onPageChange"]))
862
+ ]);
863
+ }), 128))
864
+ ])
865
+ ];
866
+ }),
867
+ _: 1
868
+ })
869
+ ]),
870
+ _: 1
871
+ })
872
+ ]),
873
+ _: 3
874
+ })), [
875
+ [Se, a(I) === "view"],
876
+ [Fe, a(ie)]
877
+ ]),
878
+ h("div", null, [
879
+ t(St, {
880
+ visible: B.value,
881
+ onBeforeDestroy: u[3] || (u[3] = (j) => B.value = !1),
882
+ style: { height: "700px", width: "1000px" }
883
+ }, {
884
+ default: o(() => [
885
+ t(He, {
886
+ ref_key: "threeModelRef",
887
+ ref: Q
888
+ }, null, 512)
889
+ ]),
890
+ _: 1
891
+ }, 8, ["visible"])
892
+ ])
893
+ ], 64);
894
+ };
895
+ }
896
+ }), ua = /* @__PURE__ */ ye(ra, [["__scopeId", "data-v-3108f109"]]), ca = { class: "system-wrap" }, da = {
897
+ __name: "index",
898
+ props: {
899
+ windowConfig: {
900
+ type: Object,
901
+ default: () => {
902
+ }
903
+ },
904
+ platform: {
905
+ type: String,
906
+ default: "browser"
907
+ },
908
+ showButton: {
909
+ type: Boolean,
910
+ default: !0
911
+ },
912
+ content: String,
913
+ jsonContents: Array
914
+ },
915
+ emits: ["buildContent", "showChild"],
916
+ setup(b, { emit: Z }) {
917
+ const e = Me(J), B = Ue(J), A = $e();
918
+ c(!1);
919
+ const L = c(!0), l = b, U = Z, V = (g) => {
920
+ U("showChild", g);
921
+ }, D = Re(() => {
922
+ switch (l == null ? void 0 : l.platform) {
923
+ case "browser":
924
+ return Pt;
925
+ case "client":
926
+ return Mt;
927
+ }
928
+ }), K = (g) => {
929
+ const E = document.documentElement;
930
+ g == null || g.forEach((I) => {
931
+ E.style.setProperty(I.name, I.value);
932
+ });
933
+ };
934
+ O(() => l.platform, (g, E) => {
935
+ g && K(D.value);
936
+ }, { immediate: !0 });
937
+ const ce = () => {
938
+ U("buildContent");
939
+ };
940
+ return O(
941
+ () => [l == null ? void 0 : l.content, l == null ? void 0 : l.jsonContents],
942
+ async () => {
943
+ var I, W, ee, f;
944
+ if (((I = l == null ? void 0 : l.jsonContents) == null ? void 0 : I.length) > 0) {
945
+ e.setOriginalData(l == null ? void 0 : l.jsonContents);
946
+ return;
947
+ }
948
+ if (!(l != null && l.content) || ((W = l == null ? void 0 : l.content) == null ? void 0 : W.length) === 0) return;
949
+ L.value = !0, A.setImportLoading(!0);
950
+ let g = [], E = [];
951
+ B.setSelectTitle([]), B.setSelectIndex(""), B.setSelectMenu(""), (f = (ee = l == null ? void 0 : l.content) == null ? void 0 : ee.filter((v) => v !== "")) == null || f.forEach((v) => {
952
+ E.push(wt(v));
953
+ }), g = E == null ? void 0 : E[0], await Bt(g), await dt(), e.setOriginalData(g), A.setImportLoading(!1);
954
+ },
955
+ { deep: !0, immediate: !0 }
956
+ ), (g, E) => (r(), M("div", ca, [
957
+ b.platform === "browser" ? (r(), S(Wt, {
958
+ key: 0,
959
+ showButton: b.showButton
960
+ }, {
961
+ default: o(() => [
962
+ ve(g.$slots, "default", {}, void 0, !0)
963
+ ]),
964
+ _: 3
965
+ }, 8, ["showButton"])) : (r(), S(ua, {
966
+ key: 1,
967
+ windowConfig: b.windowConfig,
968
+ showButton: b.showButton,
969
+ onBuildContent: ce,
970
+ onShowChild: V
971
+ }, {
972
+ default: o(() => [
973
+ ve(g.$slots, "default", {}, void 0, !0)
974
+ ]),
975
+ _: 3
976
+ }, 8, ["windowConfig", "showButton"]))
977
+ ]));
978
+ }
979
+ }, ma = /* @__PURE__ */ ye(da, [["__scopeId", "data-v-5e89b0de"]]), pa = { class: "add-model-content" }, ha = {
980
+ key: 0,
981
+ class: "model-operate"
982
+ }, fa = { class: "model-select" }, _a = { class: "model-fill" }, ga = {
983
+ key: 1,
984
+ class: "model-view"
985
+ }, va = {
986
+ __name: "index",
987
+ props: {
988
+ mode: {
989
+ type: String,
990
+ default: "view"
991
+ },
992
+ content: {
993
+ type: String,
994
+ default: ""
995
+ },
996
+ jsonContents: {
997
+ type: Array,
998
+ default: () => []
999
+ },
1000
+ showButton: {
1001
+ type: Boolean,
1002
+ default: !0
1003
+ },
1004
+ pathContent: {
1005
+ type: String,
1006
+ default: ""
1007
+ },
1008
+ pageKey: {
1009
+ type: String,
1010
+ default: ""
1011
+ }
1012
+ },
1013
+ emits: ["change", "contentChange", "buildContent", "openThreeBuild", "threeData"],
1014
+ setup(b, { emit: Z }) {
1015
+ const e = b, B = Z, A = c([]), L = c(0), l = c([]), U = c([]), V = c(0), D = Me(J), K = $e(J), { itemData: ce, originalData: g } = H(D), { activeMenuPath: E, platform: I } = H(K), W = c(null), ee = c(0), f = c([]);
1016
+ c("");
1017
+ const v = c(0), Q = () => {
1018
+ B("buildContent");
1019
+ };
1020
+ O(
1021
+ () => e == null ? void 0 : e.pageKey,
1022
+ async () => {
1023
+ if ((e == null ? void 0 : e.pageKey) !== "") {
1024
+ let p = [];
1025
+ const P = await bt(e == null ? void 0 : e.pageKey, sessionStorage.getItem("systemKey"), "", e == null ? void 0 : e.pageKey);
1026
+ P == null || P.forEach((R) => {
1027
+ var $, k, n, z, q, me;
1028
+ if ((R == null ? void 0 : R.comp) === "Table") {
1029
+ let Ce = (n = (k = ($ = R == null ? void 0 : R.compData) == null ? void 0 : $.find((T) => (T == null ? void 0 : T.key) === "header")) == null ? void 0 : k.contents) == null ? void 0 : n.map((T) => T == null ? void 0 : T.label), pe = (me = (q = (z = R == null ? void 0 : R.compData) == null ? void 0 : z.find((T) => (T == null ? void 0 : T.key) === "tableContents")) == null ? void 0 : q.contents) == null ? void 0 : me.map((T) => (T = T == null ? void 0 : T.filter((i) => !(i != null && i.id)), T));
1030
+ pe == null || pe.forEach((T) => {
1031
+ p.push(Rt(T, Ce == null ? void 0 : Ce.filter((i) => i !== "操作")));
1032
+ });
1033
+ }
1034
+ }), B("threeData", p);
1035
+ }
1036
+ },
1037
+ { deep: !0, immediate: !0 }
1038
+ );
1039
+ const fe = (p) => {
1040
+ B("openThreeBuild", p);
1041
+ };
1042
+ O(
1043
+ () => e == null ? void 0 : e.pathContent,
1044
+ () => {
1045
+ (e == null ? void 0 : e.pathContent) !== "" && D.setSystemPath(e == null ? void 0 : e.pathContent);
1046
+ },
1047
+ {
1048
+ deep: !0,
1049
+ immediate: !0
1050
+ }
1051
+ );
1052
+ const ie = (p) => {
1053
+ B("contentChange", p);
1054
+ }, ne = (p) => {
1055
+ var R;
1056
+ const P = (R = Ae(p == null ? void 0 : p.wholeValue)) == null ? void 0 : R.map(($) => {
1057
+ var k;
1058
+ return ($ == null ? void 0 : $.comp) === "Form" && ($.compData = (k = $.compData) == null ? void 0 : k.map((n) => ((n == null ? void 0 : n.key) === "formContent" && (n.contents = $t(n == null ? void 0 : n.contents)), n))), $;
1059
+ });
1060
+ B("change", {
1061
+ originalContents: g.value,
1062
+ currentContents: p == null ? void 0 : p.wholeValue,
1063
+ editContent: p == null ? void 0 : p.editValue,
1064
+ arrayToContents: P
1065
+ });
1066
+ };
1067
+ O(
1068
+ () => l.value,
1069
+ () => {
1070
+ v.value === l.value.length && l.value.length !== 0 && (A.value = l.value);
1071
+ },
1072
+ { deep: !0, immediate: !0 }
1073
+ );
1074
+ const ke = () => {
1075
+ W.value !== null && W.value.click();
1076
+ }, de = async (p) => {
1077
+ const P = p.target.files;
1078
+ if (!P) return;
1079
+ new FileReader(), A.value = [], l.value = [], v.value = P.length;
1080
+ const R = Array.from(P).map(async ($) => await new Promise((k) => {
1081
+ const n = new FileReader();
1082
+ n.onload = (z) => {
1083
+ try {
1084
+ l.value.push(z.target.result), ee.value++;
1085
+ } catch (q) {
1086
+ console.error("解析失败:", q);
1087
+ return;
1088
+ }
1089
+ }, n.onerror = () => k(`读取 ${$.name} 失败`), n.readAsText($), p.target.value = "", W.value = null, L.value++;
1090
+ }));
1091
+ await Promise.all(R);
1092
+ };
1093
+ return O(
1094
+ () => [e == null ? void 0 : e.content, e == null ? void 0 : e.jsonContents],
1095
+ async () => {
1096
+ await dt(), A.value = e.content, U.value = e == null ? void 0 : e.jsonContents;
1097
+ },
1098
+ { deep: !0, immediate: !0 }
1099
+ ), O(
1100
+ () => ee.value,
1101
+ () => {
1102
+ var p;
1103
+ ((p = f.value) == null ? void 0 : p.length) !== 0 && (D.setOriginalData(f.value), D.setItemData(f.value));
1104
+ },
1105
+ { deep: !0, immediate: !0 }
1106
+ ), (p, P) => {
1107
+ const R = w("svg-icon"), $ = w("el-button");
1108
+ return r(), M("div", pa, [
1109
+ (e == null ? void 0 : e.mode) === "edit" ? (r(), M("div", ha, [
1110
+ h("div", fa, [
1111
+ t(je)
1112
+ ]),
1113
+ (r(), M("div", {
1114
+ class: "model-show",
1115
+ key: V.value
1116
+ }, [
1117
+ t(Ve)
1118
+ ])),
1119
+ h("div", _a, [
1120
+ t(Ne)
1121
+ ])
1122
+ ])) : N("", !0),
1123
+ (e == null ? void 0 : e.mode) === "view" ? (r(), M("div", ga, [
1124
+ (r(), S(ma, {
1125
+ showButton: b.showButton,
1126
+ platform: a(I),
1127
+ content: A.value,
1128
+ onChange: ne,
1129
+ jsonContents: U.value,
1130
+ onContentChange: ie,
1131
+ onBuildContent: Q,
1132
+ key: V.value,
1133
+ onShowChild: fe
1134
+ }, {
1135
+ default: o(() => {
1136
+ var k;
1137
+ return [
1138
+ ((k = e == null ? void 0 : e.jsonContents) == null ? void 0 : k.length) === 0 && (e != null && e.showButton) ? (r(), S($, {
1139
+ key: 0,
1140
+ id: "transparentBgButton",
1141
+ onClick: ke
1142
+ }, {
1143
+ icon: o(() => [
1144
+ t(R, { name: "import" })
1145
+ ]),
1146
+ default: o(() => [
1147
+ (r(), M("input", {
1148
+ type: "file",
1149
+ key: L.value,
1150
+ ref_key: "fileInput",
1151
+ ref: W,
1152
+ accept: ".txt, .inm, .iml, .imd",
1153
+ onChange: de,
1154
+ style: { display: "none" },
1155
+ multiple: ""
1156
+ }, null, 32)),
1157
+ P[0] || (P[0] = X(" 导入模型 "))
1158
+ ]),
1159
+ _: 1,
1160
+ __: [0]
1161
+ })) : N("", !0)
1162
+ ];
1163
+ }),
1164
+ _: 1
1165
+ }, 8, ["showButton", "platform", "content", "jsonContents"]))
1166
+ ])) : N("", !0)
1167
+ ]);
1168
+ };
1169
+ }
1170
+ }, Na = /* @__PURE__ */ ye(va, [["__scopeId", "data-v-b9caa997"]]);
1171
+ export {
1172
+ Na as default
1173
+ };