ss-component-new 1.1.360 → 1.1.362
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{array-ZZeh1t1h.js → array-Dn0j8T-N.js} +2 -2
- package/dist/{array-LHgBaGg_.cjs → array-x_erhUYa.cjs} +1 -1
- package/dist/{cloneDeep-D77rQx41.cjs → cloneDeep-19MFYliY.cjs} +1 -1
- package/dist/{cloneDeep-xWafgmVp.js → cloneDeep-D1OOxhjy.js} +1 -1
- package/dist/icons/svg//345/215/217/344/275/234/345/215/225/344/275/215.svg +1 -0
- package/dist/icons/svg//345/244/247/345/261/217.svg +1 -0
- package/dist/icons/svg//345/256/241/346/211/271/344/270/255/345/277/203.svg +1 -0
- package/dist/icons/svg//346/212/245/345/221/212/344/270/255/345/277/203.svg +1 -0
- package/dist/icons/svg//346/226/207/346/241/243/347/256/241/347/220/206.svg +1 -0
- package/dist/icons/svg//347/237/245/350/257/206/345/272/223.svg +1 -0
- package/dist/icons/svg//347/263/273/347/273/237/347/256/241/347/220/206.svg +1 -0
- package/dist/icons/svg//347/273/217/351/252/214/345/217/215/351/246/210.svg +1 -0
- package/dist/icons/svg//350/200/203/346/240/270.svg +1 -0
- package/dist/icons/svg//350/264/250/351/207/217/350/256/241/345/210/222.svg +1 -0
- package/dist/icons/svg//350/265/204/350/264/250/347/256/241/347/220/206.svg +1 -0
- package/dist/icons/svg//351/241/271/347/233/256/347/256/241/347/220/206.svg +1 -0
- package/dist/{index-qCWKGZAW.cjs → index-1VhfeYhz.cjs} +1 -1
- package/dist/{index-CYXXFtjv.cjs → index-9sT_l_kt.cjs} +1 -1
- package/dist/{index-D4tSnGvW.cjs → index-ARw1D5Pd.cjs} +1 -1
- package/dist/{index-JX1X-ot2.js → index-B0DREC0x.js} +1 -1
- package/dist/index-B8HCEEF7.js +497 -0
- package/dist/{index-CVtzsdYf.cjs → index-BEzWlFaE.cjs} +174 -174
- package/dist/{index-ROl9KgW0.cjs → index-BIxC-4bo.cjs} +1 -1
- package/dist/{index-BnhX8Y7W.js → index-BO0qCF4Y.js} +4 -4
- package/dist/{index-Yp3IhNxQ.js → index-BOk2BmEz.js} +1 -1
- package/dist/{index-CC2_NFdU.js → index-BV8wCrPH.js} +5 -5
- package/dist/{index-6cWzzfDI.cjs → index-BXgCFJDJ.cjs} +1 -1
- package/dist/{index-BJC1T2AD.js → index-BYn9z7wM.js} +6 -6
- package/dist/{index-Pc39bDKn.js → index-B_kOH5b1.js} +8 -8
- package/dist/{index-BjUrV1Fb.cjs → index-Bgsr_bdE.cjs} +1 -1
- package/dist/index-BiGoUvpQ.js +2463 -0
- package/dist/{index-DVTizXRo.cjs → index-BiNV0j6D.cjs} +1 -1
- package/dist/{index-Bi2IywMv.js → index-BoQijqyR.js} +4 -4
- package/dist/{index-BqhTuMnB.js → index-BvNhNEN7.js} +7 -7
- package/dist/{index-CFM_0OMh.cjs → index-C6iZbFFC.cjs} +1 -1
- package/dist/{index-4fzQ_d8D.js → index-C8-2Qtr2.js} +1 -1
- package/dist/{index-B2z4g0c-.js → index-CCfVfC1U.js} +3 -3
- package/dist/{index-COYL8t5B.cjs → index-CDbUBPja.cjs} +1 -1
- package/dist/{index-DMpNtca6.js → index-CEz6Xh1Q.js} +2258 -2240
- package/dist/index-CHTOANqu.cjs +9 -0
- package/dist/{index-Y2OxVWr-.js → index-CLdyEKCK.js} +9 -9
- package/dist/{index-BDv1HVDr.cjs → index-CMzsguT3.cjs} +1 -1
- package/dist/{index-B_oN1nXx.js → index-COjflIUK.js} +3 -3
- package/dist/{index-BTDs7Yfm.js → index-CPnnVPd3.js} +16 -15
- package/dist/index-CSEAs2wJ.cjs +1 -0
- package/dist/index-CTSbHp8u.cjs +1 -0
- package/dist/{index-Cq_T89gc.cjs → index-CacO-gpB.cjs} +1 -1
- package/dist/{index-CMhYbhDx.cjs → index-CfcI0WVv.cjs} +1 -1
- package/dist/{index-CmJ-zN3V.cjs → index-CgBJyDTT.cjs} +1 -1
- package/dist/{index-CE6VSZgb.js → index-Cs7l2bY2.js} +3 -3
- package/dist/{index-Dx7rBNYb.js → index-CvDrkta4.js} +1 -1
- package/dist/{index-DM4vldHo.js → index-Cxf1HY0R.js} +6 -6
- package/dist/index-D0Ba8lxH.cjs +1 -0
- package/dist/{index-8A963mBh.js → index-D1Lk7TtW.js} +1417 -1380
- package/dist/{index-BsMkAmAJ.cjs → index-D6wNeS9g.cjs} +1 -1
- package/dist/{index-BdjAwe-e.js → index-DFkmDkf6.js} +6 -6
- package/dist/{index-jKNX_OOX.js → index-DIP__yaH.js} +109 -109
- package/dist/{index-CLp2pXV9.cjs → index-DRkBXr1s.cjs} +1 -1
- package/dist/{index-CNHxOgGE.cjs → index-DWo62_eQ.cjs} +1 -1
- package/dist/{index-DM1-EAWE.js → index-DX1xQwWA.js} +6 -6
- package/dist/{index-Hbt_Bz7k.cjs → index-DeJT-ww5.cjs} +1 -1
- package/dist/index-Dw5ktOai.cjs +1 -0
- package/dist/{index-PQgmxhQN.js → index-INsmhY3D.js} +4 -4
- package/dist/{index-l7EFQ_9H.js → index-IriAy-oc.js} +32 -32
- package/dist/{index-abNLH1Oh.js → index-MZIUf03P.js} +3 -3
- package/dist/{index-B_4LqjOb.cjs → index-Q2Mk5k6H.cjs} +1 -1
- package/dist/{index-BZzBPKAl.cjs → index-YIflensU.cjs} +1 -1
- package/dist/{index-CSSBb7Z9.cjs → index-ZkMF7HZu.cjs} +1 -1
- package/dist/{index-BKDw9_Wq.js → index-g-BA0tK5.js} +21 -18
- package/dist/index-jFIsD0We.cjs +1 -0
- package/dist/{index.vue_vue_type_script_setup_true_lang-BCZs8vl7.js → index.vue_vue_type_script_setup_true_lang-B9_x2anr.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-CLHQZzPT.cjs → index.vue_vue_type_script_setup_true_lang-DTWcD9th.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_97daf670_lang-DWDI9iJi.cjs → index.vue_vue_type_style_index_0_scoped_14b5611b_lang-CNKG2NqE.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_97daf670_lang-BRqLAoKS.js → index.vue_vue_type_style_index_0_scoped_14b5611b_lang-DyiPnYfw.js} +13 -13
- package/dist/{index.vue_vue_type_style_index_0_scoped_d9b749a8_lang-DUcvEpSv.js → index.vue_vue_type_style_index_0_scoped_3a02a8a3_lang-Ddjlo9lw.js} +60 -44
- package/dist/index.vue_vue_type_style_index_0_scoped_3a02a8a3_lang-DuEejfl0.cjs +1 -0
- package/dist/{login-DOsXdD3r.cjs → login-BYi6EzzQ.cjs} +1 -1
- package/dist/{login-BUABpM2V.js → login-ChSLrgMe.js} +2 -2
- package/dist/{main-Cw5lrr9S.js → main-BO5Agdl5.js} +7 -7
- package/dist/{main-B4LoC5_c.cjs → main-BTDal9Ep.cjs} +1 -1
- package/dist/{menu-BeJTeYpw.cjs → menu-B7sWflZK.cjs} +1 -1
- package/dist/{menu-C--raH72.js → menu-Cq1Uj2sk.js} +1 -1
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +2 -2
- package/dist/ss-component.js +14 -14
- package/dist/ss-component3.cjs +1 -1
- package/dist/ss-component3.js +1 -1
- package/package.json +1 -1
- package/public/icons/svg//345/215/217/344/275/234/345/215/225/344/275/215.svg +1 -0
- package/public/icons/svg//345/244/247/345/261/217.svg +1 -0
- package/public/icons/svg//345/256/241/346/211/271/344/270/255/345/277/203.svg +1 -0
- package/public/icons/svg//346/212/245/345/221/212/344/270/255/345/277/203.svg +1 -0
- package/public/icons/svg//346/226/207/346/241/243/347/256/241/347/220/206.svg +1 -0
- package/public/icons/svg//347/237/245/350/257/206/345/272/223.svg +1 -0
- package/public/icons/svg//347/263/273/347/273/237/347/256/241/347/220/206.svg +1 -0
- package/public/icons/svg//347/273/217/351/252/214/345/217/215/351/246/210.svg +1 -0
- package/public/icons/svg//350/200/203/346/240/270.svg +1 -0
- package/public/icons/svg//350/264/250/351/207/217/350/256/241/345/210/222.svg +1 -0
- package/public/icons/svg//350/265/204/350/264/250/347/256/241/347/220/206.svg +1 -0
- package/public/icons/svg//351/241/271/347/233/256/347/256/241/347/220/206.svg +1 -0
- package/dist/index-BbdlWs3o.cjs +0 -1
- package/dist/index-CdVfaMwz.cjs +0 -9
- package/dist/index-CueAsGRu.js +0 -2385
- package/dist/index-DGxD7hsO.cjs +0 -1
- package/dist/index-DXE-MtNy.cjs +0 -1
- package/dist/index-Djy3YkbX.cjs +0 -1
- package/dist/index-KRcwPuDy.cjs +0 -1
- package/dist/index-TPK137VC.js +0 -498
- package/dist/index.vue_vue_type_style_index_0_scoped_d9b749a8_lang-D9JiH0_e.cjs +0 -1
|
@@ -0,0 +1,2463 @@
|
|
|
1
|
+
import { defineComponent as xt, ref as T, watch as Se, createElementBlock as X, openBlock as C, createVNode as d, withCtx as b, createElementVNode as u, toDisplayString as je, onMounted as Kt, nextTick as ut, onBeforeUnmount as co, createBlock as G, createCommentVNode as de, unref as l, normalizeClass as dt, withDirectives as et, isRef as pt, vModelRadio as mt, resolveComponent as ee, Fragment as St, renderList as Dt, normalizeStyle as ho, resolveDirective as Zt, createTextVNode as Me, renderSlot as nt, resolveDynamicComponent as Xt, computed as uo } from "vue";
|
|
2
|
+
import { m as Rt, a as At, b as Bt } from "./index-B_kOH5b1.js";
|
|
3
|
+
import _t from "./index-g-BA0tK5.js";
|
|
4
|
+
import { _ as po, o as Wt, c as qt, a as Gt, b as Jt, s as Be, g as Qt, d as eo, e as to, f as oo, h as mo, i as fo } from "./index.vue_vue_type_style_index_0_scoped_14b5611b_lang-DyiPnYfw.js";
|
|
5
|
+
import { _ as Ke } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
|
+
import { s as Le, u as yt, b as ge, g as go, E as kt } from "./menu-Cq1Uj2sk.js";
|
|
7
|
+
import { u as ao } from "./login-ChSLrgMe.js";
|
|
8
|
+
import { S as Ne } from "./index-BHtNKL1L.js";
|
|
9
|
+
import { C as _o, V as F, M as at, T as tt, Q as Ot, S as zt, a as ze, R as yo, P as gt, b as wo, c as bo, d as vo, e as Co, W as ko, f as Po, A as To, g as Mo, X as Eo, h as xo, D as Pt, H as So, i as Nt, B as Lt, j as Tt, k as Do, l as Ro, m as Ao, E as Mt, n as Bo, o as Ft, u as wt, p as Lo, I as Ut, q as so } from "./index-CEz6Xh1Q.js";
|
|
10
|
+
import { p as Fe } from "./index-B0DREC0x.js";
|
|
11
|
+
import { s as Fo, _ as st } from "./index-D1Lk7TtW.js";
|
|
12
|
+
import { s as no } from "./index-CLdyEKCK.js";
|
|
13
|
+
import { c as ot } from "./cloneDeep-D1OOxhjy.js";
|
|
14
|
+
import { u as jo } from "./index-DIP__yaH.js";
|
|
15
|
+
import { d as $t } from "./index-BOk2BmEz.js";
|
|
16
|
+
import { i as Oo, e as zo, b as It, c as Vt, a as No } from "./array-Dn0j8T-N.js";
|
|
17
|
+
import { c as Uo, b as $o } from "./index.vue_vue_type_style_index_0_scoped_3a02a8a3_lang-Ddjlo9lw.js";
|
|
18
|
+
const Io = { class: "client-robot-side" }, Vo = /* @__PURE__ */ xt({
|
|
19
|
+
__name: "robotMenu",
|
|
20
|
+
props: {
|
|
21
|
+
model: Object
|
|
22
|
+
},
|
|
23
|
+
setup(a) {
|
|
24
|
+
const e = a, t = T(0), o = T([]), r = (i) => {
|
|
25
|
+
let n = [];
|
|
26
|
+
return Array.isArray(i) && (i == null ? void 0 : i.length) > 0 && (t.value++, i.forEach((h) => {
|
|
27
|
+
h != null && h.isMesh || n.push({
|
|
28
|
+
name: (h == null ? void 0 : h.name) ?? "111",
|
|
29
|
+
show: !0,
|
|
30
|
+
level: t.value,
|
|
31
|
+
isPenultimate: !1,
|
|
32
|
+
type: h == null ? void 0 : h.type,
|
|
33
|
+
id: h == null ? void 0 : h.id,
|
|
34
|
+
limit: (h == null ? void 0 : h.limit) ?? "",
|
|
35
|
+
children: r(h == null ? void 0 : h.children),
|
|
36
|
+
path: h == null ? void 0 : h.name
|
|
37
|
+
});
|
|
38
|
+
})), n;
|
|
39
|
+
}, s = (i) => {
|
|
40
|
+
let n = [];
|
|
41
|
+
return t.value++, n.push({
|
|
42
|
+
name: i == null ? void 0 : i.name,
|
|
43
|
+
show: !0,
|
|
44
|
+
level: t.value,
|
|
45
|
+
isPenultimate: !1,
|
|
46
|
+
type: i == null ? void 0 : i.type,
|
|
47
|
+
id: i == null ? void 0 : i.id,
|
|
48
|
+
limit: (i == null ? void 0 : i.limit) ?? "",
|
|
49
|
+
children: r(i == null ? void 0 : i.children),
|
|
50
|
+
path: i == null ? void 0 : i.name
|
|
51
|
+
}), n;
|
|
52
|
+
};
|
|
53
|
+
return Se(
|
|
54
|
+
() => e == null ? void 0 : e.model,
|
|
55
|
+
() => {
|
|
56
|
+
e != null && e.model && (o.value = s(e == null ? void 0 : e.model));
|
|
57
|
+
},
|
|
58
|
+
{ deep: !0, immediate: !0 }
|
|
59
|
+
), (i, n) => (C(), X("div", Io, [
|
|
60
|
+
d(Fo, { menuList: o.value }, {
|
|
61
|
+
title: b(({ menu: h }) => [
|
|
62
|
+
u("div", null, je(h.name), 1)
|
|
63
|
+
]),
|
|
64
|
+
_: 1
|
|
65
|
+
}, 8, ["menuList"])
|
|
66
|
+
]));
|
|
67
|
+
}
|
|
68
|
+
}), Yo = /* @__PURE__ */ Ke(Vo, [["__scopeId", "data-v-031f5fdd"]]), Yt = { type: "change" }, jt = { type: "start" }, io = { type: "end" }, ft = new yo(), Ht = new gt(), Ho = Math.cos(70 * wo.DEG2RAD), fe = new F(), xe = 2 * Math.PI, H = {
|
|
69
|
+
NONE: -1,
|
|
70
|
+
ROTATE: 0,
|
|
71
|
+
DOLLY: 1,
|
|
72
|
+
PAN: 2,
|
|
73
|
+
TOUCH_ROTATE: 3,
|
|
74
|
+
TOUCH_PAN: 4,
|
|
75
|
+
TOUCH_DOLLY_PAN: 5,
|
|
76
|
+
TOUCH_DOLLY_ROTATE: 6
|
|
77
|
+
}, Et = 1e-6;
|
|
78
|
+
class Ko extends _o {
|
|
79
|
+
/**
|
|
80
|
+
* Constructs a new controls instance.
|
|
81
|
+
*
|
|
82
|
+
* @param {Object3D} object - The object that is managed by the controls.
|
|
83
|
+
* @param {?HTMLDOMElement} domElement - The HTML element used for event listeners.
|
|
84
|
+
*/
|
|
85
|
+
constructor(e, t = null) {
|
|
86
|
+
super(e, t), this.state = H.NONE, this.target = new F(), this.cursor = new F(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.keyRotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: at.ROTATE, MIDDLE: at.DOLLY, RIGHT: at.PAN }, this.touches = { ONE: tt.ROTATE, TWO: tt.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new F(), this._lastQuaternion = new Ot(), this._lastTargetPosition = new F(), this._quat = new Ot().setFromUnitVectors(e.up, new F(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new zt(), this._sphericalDelta = new zt(), this._scale = 1, this._panOffset = new F(), this._rotateStart = new ze(), this._rotateEnd = new ze(), this._rotateDelta = new ze(), this._panStart = new ze(), this._panEnd = new ze(), this._panDelta = new ze(), this._dollyStart = new ze(), this._dollyEnd = new ze(), this._dollyDelta = new ze(), this._dollyDirection = new F(), this._mouse = new ze(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = Xo.bind(this), this._onPointerDown = Zo.bind(this), this._onPointerUp = Wo.bind(this), this._onContextMenu = oa.bind(this), this._onMouseWheel = Jo.bind(this), this._onKeyDown = Qo.bind(this), this._onTouchStart = ea.bind(this), this._onTouchMove = ta.bind(this), this._onMouseDown = qo.bind(this), this._onMouseMove = Go.bind(this), this._interceptControlDown = aa.bind(this), this._interceptControlUp = sa.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
|
|
87
|
+
}
|
|
88
|
+
connect(e) {
|
|
89
|
+
super.connect(e), this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointercancel", this._onPointerUp), this.domElement.addEventListener("contextmenu", this._onContextMenu), this.domElement.addEventListener("wheel", this._onMouseWheel, { passive: !1 }), this.domElement.getRootNode().addEventListener("keydown", this._interceptControlDown, { passive: !0, capture: !0 }), this.domElement.style.touchAction = "none";
|
|
90
|
+
}
|
|
91
|
+
disconnect() {
|
|
92
|
+
this.domElement.removeEventListener("pointerdown", this._onPointerDown), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.domElement.removeEventListener("pointercancel", this._onPointerUp), this.domElement.removeEventListener("wheel", this._onMouseWheel), this.domElement.removeEventListener("contextmenu", this._onContextMenu), this.stopListenToKeyEvents(), this.domElement.getRootNode().removeEventListener("keydown", this._interceptControlDown, { capture: !0 }), this.domElement.style.touchAction = "auto";
|
|
93
|
+
}
|
|
94
|
+
dispose() {
|
|
95
|
+
this.disconnect();
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Get the current vertical rotation, in radians.
|
|
99
|
+
*
|
|
100
|
+
* @return {number} The current vertical rotation, in radians.
|
|
101
|
+
*/
|
|
102
|
+
getPolarAngle() {
|
|
103
|
+
return this._spherical.phi;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Get the current horizontal rotation, in radians.
|
|
107
|
+
*
|
|
108
|
+
* @return {number} The current horizontal rotation, in radians.
|
|
109
|
+
*/
|
|
110
|
+
getAzimuthalAngle() {
|
|
111
|
+
return this._spherical.theta;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Returns the distance from the camera to the target.
|
|
115
|
+
*
|
|
116
|
+
* @return {number} The distance from the camera to the target.
|
|
117
|
+
*/
|
|
118
|
+
getDistance() {
|
|
119
|
+
return this.object.position.distanceTo(this.target);
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Adds key event listeners to the given DOM element.
|
|
123
|
+
* `window` is a recommended argument for using this method.
|
|
124
|
+
*
|
|
125
|
+
* @param {HTMLDOMElement} domElement - The DOM element
|
|
126
|
+
*/
|
|
127
|
+
listenToKeyEvents(e) {
|
|
128
|
+
e.addEventListener("keydown", this._onKeyDown), this._domElementKeyEvents = e;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Removes the key event listener previously defined with `listenToKeyEvents()`.
|
|
132
|
+
*/
|
|
133
|
+
stopListenToKeyEvents() {
|
|
134
|
+
this._domElementKeyEvents !== null && (this._domElementKeyEvents.removeEventListener("keydown", this._onKeyDown), this._domElementKeyEvents = null);
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Save the current state of the controls. This can later be recovered with `reset()`.
|
|
138
|
+
*/
|
|
139
|
+
saveState() {
|
|
140
|
+
this.target0.copy(this.target), this.position0.copy(this.object.position), this.zoom0 = this.object.zoom;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Reset the controls to their state from either the last time the `saveState()`
|
|
144
|
+
* was called, or the initial state.
|
|
145
|
+
*/
|
|
146
|
+
reset() {
|
|
147
|
+
this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(Yt), this.update(), this.state = H.NONE;
|
|
148
|
+
}
|
|
149
|
+
update(e = null) {
|
|
150
|
+
const t = this.object.position;
|
|
151
|
+
fe.copy(t).sub(this.target), fe.applyQuaternion(this._quat), this._spherical.setFromVector3(fe), this.autoRotate && this.state === H.NONE && this._rotateLeft(this._getAutoRotationAngle(e)), this.enableDamping ? (this._spherical.theta += this._sphericalDelta.theta * this.dampingFactor, this._spherical.phi += this._sphericalDelta.phi * this.dampingFactor) : (this._spherical.theta += this._sphericalDelta.theta, this._spherical.phi += this._sphericalDelta.phi);
|
|
152
|
+
let o = this.minAzimuthAngle, r = this.maxAzimuthAngle;
|
|
153
|
+
isFinite(o) && isFinite(r) && (o < -Math.PI ? o += xe : o > Math.PI && (o -= xe), r < -Math.PI ? r += xe : r > Math.PI && (r -= xe), o <= r ? this._spherical.theta = Math.max(o, Math.min(r, this._spherical.theta)) : this._spherical.theta = this._spherical.theta > (o + r) / 2 ? Math.max(o, this._spherical.theta) : Math.min(r, this._spherical.theta)), this._spherical.phi = Math.max(this.minPolarAngle, Math.min(this.maxPolarAngle, this._spherical.phi)), this._spherical.makeSafe(), this.enableDamping === !0 ? this.target.addScaledVector(this._panOffset, this.dampingFactor) : this.target.add(this._panOffset), this.target.sub(this.cursor), this.target.clampLength(this.minTargetRadius, this.maxTargetRadius), this.target.add(this.cursor);
|
|
154
|
+
let s = !1;
|
|
155
|
+
if (this.zoomToCursor && this._performCursorZoom || this.object.isOrthographicCamera)
|
|
156
|
+
this._spherical.radius = this._clampDistance(this._spherical.radius);
|
|
157
|
+
else {
|
|
158
|
+
const i = this._spherical.radius;
|
|
159
|
+
this._spherical.radius = this._clampDistance(this._spherical.radius * this._scale), s = i != this._spherical.radius;
|
|
160
|
+
}
|
|
161
|
+
if (fe.setFromSpherical(this._spherical), fe.applyQuaternion(this._quatInverse), t.copy(this.target).add(fe), this.object.lookAt(this.target), this.enableDamping === !0 ? (this._sphericalDelta.theta *= 1 - this.dampingFactor, this._sphericalDelta.phi *= 1 - this.dampingFactor, this._panOffset.multiplyScalar(1 - this.dampingFactor)) : (this._sphericalDelta.set(0, 0, 0), this._panOffset.set(0, 0, 0)), this.zoomToCursor && this._performCursorZoom) {
|
|
162
|
+
let i = null;
|
|
163
|
+
if (this.object.isPerspectiveCamera) {
|
|
164
|
+
const n = fe.length();
|
|
165
|
+
i = this._clampDistance(n * this._scale);
|
|
166
|
+
const h = n - i;
|
|
167
|
+
this.object.position.addScaledVector(this._dollyDirection, h), this.object.updateMatrixWorld(), s = !!h;
|
|
168
|
+
} else if (this.object.isOrthographicCamera) {
|
|
169
|
+
const n = new F(this._mouse.x, this._mouse.y, 0);
|
|
170
|
+
n.unproject(this.object);
|
|
171
|
+
const h = this.object.zoom;
|
|
172
|
+
this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), this.object.updateProjectionMatrix(), s = h !== this.object.zoom;
|
|
173
|
+
const P = new F(this._mouse.x, this._mouse.y, 0);
|
|
174
|
+
P.unproject(this.object), this.object.position.sub(P).add(n), this.object.updateMatrixWorld(), i = fe.length();
|
|
175
|
+
} else
|
|
176
|
+
console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), this.zoomToCursor = !1;
|
|
177
|
+
i !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(i).add(this.object.position) : (ft.origin.copy(this.object.position), ft.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(ft.direction)) < Ho ? this.object.lookAt(this.target) : (Ht.setFromNormalAndCoplanarPoint(this.object.up, this.target), ft.intersectPlane(Ht, this.target))));
|
|
178
|
+
} else if (this.object.isOrthographicCamera) {
|
|
179
|
+
const i = this.object.zoom;
|
|
180
|
+
this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), i !== this.object.zoom && (this.object.updateProjectionMatrix(), s = !0);
|
|
181
|
+
}
|
|
182
|
+
return this._scale = 1, this._performCursorZoom = !1, s || this._lastPosition.distanceToSquared(this.object.position) > Et || 8 * (1 - this._lastQuaternion.dot(this.object.quaternion)) > Et || this._lastTargetPosition.distanceToSquared(this.target) > Et ? (this.dispatchEvent(Yt), this._lastPosition.copy(this.object.position), this._lastQuaternion.copy(this.object.quaternion), this._lastTargetPosition.copy(this.target), !0) : !1;
|
|
183
|
+
}
|
|
184
|
+
_getAutoRotationAngle(e) {
|
|
185
|
+
return e !== null ? xe / 60 * this.autoRotateSpeed * e : xe / 60 / 60 * this.autoRotateSpeed;
|
|
186
|
+
}
|
|
187
|
+
_getZoomScale(e) {
|
|
188
|
+
const t = Math.abs(e * 0.01);
|
|
189
|
+
return Math.pow(0.95, this.zoomSpeed * t);
|
|
190
|
+
}
|
|
191
|
+
_rotateLeft(e) {
|
|
192
|
+
this._sphericalDelta.theta -= e;
|
|
193
|
+
}
|
|
194
|
+
_rotateUp(e) {
|
|
195
|
+
this._sphericalDelta.phi -= e;
|
|
196
|
+
}
|
|
197
|
+
_panLeft(e, t) {
|
|
198
|
+
fe.setFromMatrixColumn(t, 0), fe.multiplyScalar(-e), this._panOffset.add(fe);
|
|
199
|
+
}
|
|
200
|
+
_panUp(e, t) {
|
|
201
|
+
this.screenSpacePanning === !0 ? fe.setFromMatrixColumn(t, 1) : (fe.setFromMatrixColumn(t, 0), fe.crossVectors(this.object.up, fe)), fe.multiplyScalar(e), this._panOffset.add(fe);
|
|
202
|
+
}
|
|
203
|
+
// deltaX and deltaY are in pixels; right and down are positive
|
|
204
|
+
_pan(e, t) {
|
|
205
|
+
const o = this.domElement;
|
|
206
|
+
if (this.object.isPerspectiveCamera) {
|
|
207
|
+
const r = this.object.position;
|
|
208
|
+
fe.copy(r).sub(this.target);
|
|
209
|
+
let s = fe.length();
|
|
210
|
+
s *= Math.tan(this.object.fov / 2 * Math.PI / 180), this._panLeft(2 * e * s / o.clientHeight, this.object.matrix), this._panUp(2 * t * s / o.clientHeight, this.object.matrix);
|
|
211
|
+
} else this.object.isOrthographicCamera ? (this._panLeft(e * (this.object.right - this.object.left) / this.object.zoom / o.clientWidth, this.object.matrix), this._panUp(t * (this.object.top - this.object.bottom) / this.object.zoom / o.clientHeight, this.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), this.enablePan = !1);
|
|
212
|
+
}
|
|
213
|
+
_dollyOut(e) {
|
|
214
|
+
this.object.isPerspectiveCamera || this.object.isOrthographicCamera ? this._scale /= e : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), this.enableZoom = !1);
|
|
215
|
+
}
|
|
216
|
+
_dollyIn(e) {
|
|
217
|
+
this.object.isPerspectiveCamera || this.object.isOrthographicCamera ? this._scale *= e : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), this.enableZoom = !1);
|
|
218
|
+
}
|
|
219
|
+
_updateZoomParameters(e, t) {
|
|
220
|
+
if (!this.zoomToCursor)
|
|
221
|
+
return;
|
|
222
|
+
this._performCursorZoom = !0;
|
|
223
|
+
const o = this.domElement.getBoundingClientRect(), r = e - o.left, s = t - o.top, i = o.width, n = o.height;
|
|
224
|
+
this._mouse.x = r / i * 2 - 1, this._mouse.y = -(s / n) * 2 + 1, this._dollyDirection.set(this._mouse.x, this._mouse.y, 1).unproject(this.object).sub(this.object.position).normalize();
|
|
225
|
+
}
|
|
226
|
+
_clampDistance(e) {
|
|
227
|
+
return Math.max(this.minDistance, Math.min(this.maxDistance, e));
|
|
228
|
+
}
|
|
229
|
+
//
|
|
230
|
+
// event callbacks - update the object state
|
|
231
|
+
//
|
|
232
|
+
_handleMouseDownRotate(e) {
|
|
233
|
+
this._rotateStart.set(e.clientX, e.clientY);
|
|
234
|
+
}
|
|
235
|
+
_handleMouseDownDolly(e) {
|
|
236
|
+
this._updateZoomParameters(e.clientX, e.clientX), this._dollyStart.set(e.clientX, e.clientY);
|
|
237
|
+
}
|
|
238
|
+
_handleMouseDownPan(e) {
|
|
239
|
+
this._panStart.set(e.clientX, e.clientY);
|
|
240
|
+
}
|
|
241
|
+
_handleMouseMoveRotate(e) {
|
|
242
|
+
this._rotateEnd.set(e.clientX, e.clientY), this._rotateDelta.subVectors(this._rotateEnd, this._rotateStart).multiplyScalar(this.rotateSpeed);
|
|
243
|
+
const t = this.domElement;
|
|
244
|
+
this._rotateLeft(xe * this._rotateDelta.x / t.clientHeight), this._rotateUp(xe * this._rotateDelta.y / t.clientHeight), this._rotateStart.copy(this._rotateEnd), this.update();
|
|
245
|
+
}
|
|
246
|
+
_handleMouseMoveDolly(e) {
|
|
247
|
+
this._dollyEnd.set(e.clientX, e.clientY), this._dollyDelta.subVectors(this._dollyEnd, this._dollyStart), this._dollyDelta.y > 0 ? this._dollyOut(this._getZoomScale(this._dollyDelta.y)) : this._dollyDelta.y < 0 && this._dollyIn(this._getZoomScale(this._dollyDelta.y)), this._dollyStart.copy(this._dollyEnd), this.update();
|
|
248
|
+
}
|
|
249
|
+
_handleMouseMovePan(e) {
|
|
250
|
+
this._panEnd.set(e.clientX, e.clientY), this._panDelta.subVectors(this._panEnd, this._panStart).multiplyScalar(this.panSpeed), this._pan(this._panDelta.x, this._panDelta.y), this._panStart.copy(this._panEnd), this.update();
|
|
251
|
+
}
|
|
252
|
+
_handleMouseWheel(e) {
|
|
253
|
+
this._updateZoomParameters(e.clientX, e.clientY), e.deltaY < 0 ? this._dollyIn(this._getZoomScale(e.deltaY)) : e.deltaY > 0 && this._dollyOut(this._getZoomScale(e.deltaY)), this.update();
|
|
254
|
+
}
|
|
255
|
+
_handleKeyDown(e) {
|
|
256
|
+
let t = !1;
|
|
257
|
+
switch (e.code) {
|
|
258
|
+
case this.keys.UP:
|
|
259
|
+
e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateUp(xe * this.keyRotateSpeed / this.domElement.clientHeight) : this.enablePan && this._pan(0, this.keyPanSpeed), t = !0;
|
|
260
|
+
break;
|
|
261
|
+
case this.keys.BOTTOM:
|
|
262
|
+
e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateUp(-xe * this.keyRotateSpeed / this.domElement.clientHeight) : this.enablePan && this._pan(0, -this.keyPanSpeed), t = !0;
|
|
263
|
+
break;
|
|
264
|
+
case this.keys.LEFT:
|
|
265
|
+
e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateLeft(xe * this.keyRotateSpeed / this.domElement.clientHeight) : this.enablePan && this._pan(this.keyPanSpeed, 0), t = !0;
|
|
266
|
+
break;
|
|
267
|
+
case this.keys.RIGHT:
|
|
268
|
+
e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateLeft(-xe * this.keyRotateSpeed / this.domElement.clientHeight) : this.enablePan && this._pan(-this.keyPanSpeed, 0), t = !0;
|
|
269
|
+
break;
|
|
270
|
+
}
|
|
271
|
+
t && (e.preventDefault(), this.update());
|
|
272
|
+
}
|
|
273
|
+
_handleTouchStartRotate(e) {
|
|
274
|
+
if (this._pointers.length === 1)
|
|
275
|
+
this._rotateStart.set(e.pageX, e.pageY);
|
|
276
|
+
else {
|
|
277
|
+
const t = this._getSecondPointerPosition(e), o = 0.5 * (e.pageX + t.x), r = 0.5 * (e.pageY + t.y);
|
|
278
|
+
this._rotateStart.set(o, r);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
_handleTouchStartPan(e) {
|
|
282
|
+
if (this._pointers.length === 1)
|
|
283
|
+
this._panStart.set(e.pageX, e.pageY);
|
|
284
|
+
else {
|
|
285
|
+
const t = this._getSecondPointerPosition(e), o = 0.5 * (e.pageX + t.x), r = 0.5 * (e.pageY + t.y);
|
|
286
|
+
this._panStart.set(o, r);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
_handleTouchStartDolly(e) {
|
|
290
|
+
const t = this._getSecondPointerPosition(e), o = e.pageX - t.x, r = e.pageY - t.y, s = Math.sqrt(o * o + r * r);
|
|
291
|
+
this._dollyStart.set(0, s);
|
|
292
|
+
}
|
|
293
|
+
_handleTouchStartDollyPan(e) {
|
|
294
|
+
this.enableZoom && this._handleTouchStartDolly(e), this.enablePan && this._handleTouchStartPan(e);
|
|
295
|
+
}
|
|
296
|
+
_handleTouchStartDollyRotate(e) {
|
|
297
|
+
this.enableZoom && this._handleTouchStartDolly(e), this.enableRotate && this._handleTouchStartRotate(e);
|
|
298
|
+
}
|
|
299
|
+
_handleTouchMoveRotate(e) {
|
|
300
|
+
if (this._pointers.length == 1)
|
|
301
|
+
this._rotateEnd.set(e.pageX, e.pageY);
|
|
302
|
+
else {
|
|
303
|
+
const o = this._getSecondPointerPosition(e), r = 0.5 * (e.pageX + o.x), s = 0.5 * (e.pageY + o.y);
|
|
304
|
+
this._rotateEnd.set(r, s);
|
|
305
|
+
}
|
|
306
|
+
this._rotateDelta.subVectors(this._rotateEnd, this._rotateStart).multiplyScalar(this.rotateSpeed);
|
|
307
|
+
const t = this.domElement;
|
|
308
|
+
this._rotateLeft(xe * this._rotateDelta.x / t.clientHeight), this._rotateUp(xe * this._rotateDelta.y / t.clientHeight), this._rotateStart.copy(this._rotateEnd);
|
|
309
|
+
}
|
|
310
|
+
_handleTouchMovePan(e) {
|
|
311
|
+
if (this._pointers.length === 1)
|
|
312
|
+
this._panEnd.set(e.pageX, e.pageY);
|
|
313
|
+
else {
|
|
314
|
+
const t = this._getSecondPointerPosition(e), o = 0.5 * (e.pageX + t.x), r = 0.5 * (e.pageY + t.y);
|
|
315
|
+
this._panEnd.set(o, r);
|
|
316
|
+
}
|
|
317
|
+
this._panDelta.subVectors(this._panEnd, this._panStart).multiplyScalar(this.panSpeed), this._pan(this._panDelta.x, this._panDelta.y), this._panStart.copy(this._panEnd);
|
|
318
|
+
}
|
|
319
|
+
_handleTouchMoveDolly(e) {
|
|
320
|
+
const t = this._getSecondPointerPosition(e), o = e.pageX - t.x, r = e.pageY - t.y, s = Math.sqrt(o * o + r * r);
|
|
321
|
+
this._dollyEnd.set(0, s), this._dollyDelta.set(0, Math.pow(this._dollyEnd.y / this._dollyStart.y, this.zoomSpeed)), this._dollyOut(this._dollyDelta.y), this._dollyStart.copy(this._dollyEnd);
|
|
322
|
+
const i = (e.pageX + t.x) * 0.5, n = (e.pageY + t.y) * 0.5;
|
|
323
|
+
this._updateZoomParameters(i, n);
|
|
324
|
+
}
|
|
325
|
+
_handleTouchMoveDollyPan(e) {
|
|
326
|
+
this.enableZoom && this._handleTouchMoveDolly(e), this.enablePan && this._handleTouchMovePan(e);
|
|
327
|
+
}
|
|
328
|
+
_handleTouchMoveDollyRotate(e) {
|
|
329
|
+
this.enableZoom && this._handleTouchMoveDolly(e), this.enableRotate && this._handleTouchMoveRotate(e);
|
|
330
|
+
}
|
|
331
|
+
// pointers
|
|
332
|
+
_addPointer(e) {
|
|
333
|
+
this._pointers.push(e.pointerId);
|
|
334
|
+
}
|
|
335
|
+
_removePointer(e) {
|
|
336
|
+
delete this._pointerPositions[e.pointerId];
|
|
337
|
+
for (let t = 0; t < this._pointers.length; t++)
|
|
338
|
+
if (this._pointers[t] == e.pointerId) {
|
|
339
|
+
this._pointers.splice(t, 1);
|
|
340
|
+
return;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
_isTrackingPointer(e) {
|
|
344
|
+
for (let t = 0; t < this._pointers.length; t++)
|
|
345
|
+
if (this._pointers[t] == e.pointerId) return !0;
|
|
346
|
+
return !1;
|
|
347
|
+
}
|
|
348
|
+
_trackPointer(e) {
|
|
349
|
+
let t = this._pointerPositions[e.pointerId];
|
|
350
|
+
t === void 0 && (t = new ze(), this._pointerPositions[e.pointerId] = t), t.set(e.pageX, e.pageY);
|
|
351
|
+
}
|
|
352
|
+
_getSecondPointerPosition(e) {
|
|
353
|
+
const t = e.pointerId === this._pointers[0] ? this._pointers[1] : this._pointers[0];
|
|
354
|
+
return this._pointerPositions[t];
|
|
355
|
+
}
|
|
356
|
+
//
|
|
357
|
+
_customWheelEvent(e) {
|
|
358
|
+
const t = e.deltaMode, o = {
|
|
359
|
+
clientX: e.clientX,
|
|
360
|
+
clientY: e.clientY,
|
|
361
|
+
deltaY: e.deltaY
|
|
362
|
+
};
|
|
363
|
+
switch (t) {
|
|
364
|
+
case 1:
|
|
365
|
+
o.deltaY *= 16;
|
|
366
|
+
break;
|
|
367
|
+
case 2:
|
|
368
|
+
o.deltaY *= 100;
|
|
369
|
+
break;
|
|
370
|
+
}
|
|
371
|
+
return e.ctrlKey && !this._controlActive && (o.deltaY *= 10), o;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
function Zo(a) {
|
|
375
|
+
this.enabled !== !1 && (this._pointers.length === 0 && (this.domElement.setPointerCapture(a.pointerId), this.domElement.addEventListener("pointermove", this._onPointerMove), this.domElement.addEventListener("pointerup", this._onPointerUp)), !this._isTrackingPointer(a) && (this._addPointer(a), a.pointerType === "touch" ? this._onTouchStart(a) : this._onMouseDown(a)));
|
|
376
|
+
}
|
|
377
|
+
function Xo(a) {
|
|
378
|
+
this.enabled !== !1 && (a.pointerType === "touch" ? this._onTouchMove(a) : this._onMouseMove(a));
|
|
379
|
+
}
|
|
380
|
+
function Wo(a) {
|
|
381
|
+
switch (this._removePointer(a), this._pointers.length) {
|
|
382
|
+
case 0:
|
|
383
|
+
this.domElement.releasePointerCapture(a.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(io), this.state = H.NONE;
|
|
384
|
+
break;
|
|
385
|
+
case 1:
|
|
386
|
+
const e = this._pointers[0], t = this._pointerPositions[e];
|
|
387
|
+
this._onTouchStart({ pointerId: e, pageX: t.x, pageY: t.y });
|
|
388
|
+
break;
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
function qo(a) {
|
|
392
|
+
let e;
|
|
393
|
+
switch (a.button) {
|
|
394
|
+
case 0:
|
|
395
|
+
e = this.mouseButtons.LEFT;
|
|
396
|
+
break;
|
|
397
|
+
case 1:
|
|
398
|
+
e = this.mouseButtons.MIDDLE;
|
|
399
|
+
break;
|
|
400
|
+
case 2:
|
|
401
|
+
e = this.mouseButtons.RIGHT;
|
|
402
|
+
break;
|
|
403
|
+
default:
|
|
404
|
+
e = -1;
|
|
405
|
+
}
|
|
406
|
+
switch (e) {
|
|
407
|
+
case at.DOLLY:
|
|
408
|
+
if (this.enableZoom === !1) return;
|
|
409
|
+
this._handleMouseDownDolly(a), this.state = H.DOLLY;
|
|
410
|
+
break;
|
|
411
|
+
case at.ROTATE:
|
|
412
|
+
if (a.ctrlKey || a.metaKey || a.shiftKey) {
|
|
413
|
+
if (this.enablePan === !1) return;
|
|
414
|
+
this._handleMouseDownPan(a), this.state = H.PAN;
|
|
415
|
+
} else {
|
|
416
|
+
if (this.enableRotate === !1) return;
|
|
417
|
+
this._handleMouseDownRotate(a), this.state = H.ROTATE;
|
|
418
|
+
}
|
|
419
|
+
break;
|
|
420
|
+
case at.PAN:
|
|
421
|
+
if (a.ctrlKey || a.metaKey || a.shiftKey) {
|
|
422
|
+
if (this.enableRotate === !1) return;
|
|
423
|
+
this._handleMouseDownRotate(a), this.state = H.ROTATE;
|
|
424
|
+
} else {
|
|
425
|
+
if (this.enablePan === !1) return;
|
|
426
|
+
this._handleMouseDownPan(a), this.state = H.PAN;
|
|
427
|
+
}
|
|
428
|
+
break;
|
|
429
|
+
default:
|
|
430
|
+
this.state = H.NONE;
|
|
431
|
+
}
|
|
432
|
+
this.state !== H.NONE && this.dispatchEvent(jt);
|
|
433
|
+
}
|
|
434
|
+
function Go(a) {
|
|
435
|
+
switch (this.state) {
|
|
436
|
+
case H.ROTATE:
|
|
437
|
+
if (this.enableRotate === !1) return;
|
|
438
|
+
this._handleMouseMoveRotate(a);
|
|
439
|
+
break;
|
|
440
|
+
case H.DOLLY:
|
|
441
|
+
if (this.enableZoom === !1) return;
|
|
442
|
+
this._handleMouseMoveDolly(a);
|
|
443
|
+
break;
|
|
444
|
+
case H.PAN:
|
|
445
|
+
if (this.enablePan === !1) return;
|
|
446
|
+
this._handleMouseMovePan(a);
|
|
447
|
+
break;
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
function Jo(a) {
|
|
451
|
+
this.enabled === !1 || this.enableZoom === !1 || this.state !== H.NONE || (a.preventDefault(), this.dispatchEvent(jt), this._handleMouseWheel(this._customWheelEvent(a)), this.dispatchEvent(io));
|
|
452
|
+
}
|
|
453
|
+
function Qo(a) {
|
|
454
|
+
this.enabled !== !1 && this._handleKeyDown(a);
|
|
455
|
+
}
|
|
456
|
+
function ea(a) {
|
|
457
|
+
switch (this._trackPointer(a), this._pointers.length) {
|
|
458
|
+
case 1:
|
|
459
|
+
switch (this.touches.ONE) {
|
|
460
|
+
case tt.ROTATE:
|
|
461
|
+
if (this.enableRotate === !1) return;
|
|
462
|
+
this._handleTouchStartRotate(a), this.state = H.TOUCH_ROTATE;
|
|
463
|
+
break;
|
|
464
|
+
case tt.PAN:
|
|
465
|
+
if (this.enablePan === !1) return;
|
|
466
|
+
this._handleTouchStartPan(a), this.state = H.TOUCH_PAN;
|
|
467
|
+
break;
|
|
468
|
+
default:
|
|
469
|
+
this.state = H.NONE;
|
|
470
|
+
}
|
|
471
|
+
break;
|
|
472
|
+
case 2:
|
|
473
|
+
switch (this.touches.TWO) {
|
|
474
|
+
case tt.DOLLY_PAN:
|
|
475
|
+
if (this.enableZoom === !1 && this.enablePan === !1) return;
|
|
476
|
+
this._handleTouchStartDollyPan(a), this.state = H.TOUCH_DOLLY_PAN;
|
|
477
|
+
break;
|
|
478
|
+
case tt.DOLLY_ROTATE:
|
|
479
|
+
if (this.enableZoom === !1 && this.enableRotate === !1) return;
|
|
480
|
+
this._handleTouchStartDollyRotate(a), this.state = H.TOUCH_DOLLY_ROTATE;
|
|
481
|
+
break;
|
|
482
|
+
default:
|
|
483
|
+
this.state = H.NONE;
|
|
484
|
+
}
|
|
485
|
+
break;
|
|
486
|
+
default:
|
|
487
|
+
this.state = H.NONE;
|
|
488
|
+
}
|
|
489
|
+
this.state !== H.NONE && this.dispatchEvent(jt);
|
|
490
|
+
}
|
|
491
|
+
function ta(a) {
|
|
492
|
+
switch (this._trackPointer(a), this.state) {
|
|
493
|
+
case H.TOUCH_ROTATE:
|
|
494
|
+
if (this.enableRotate === !1) return;
|
|
495
|
+
this._handleTouchMoveRotate(a), this.update();
|
|
496
|
+
break;
|
|
497
|
+
case H.TOUCH_PAN:
|
|
498
|
+
if (this.enablePan === !1) return;
|
|
499
|
+
this._handleTouchMovePan(a), this.update();
|
|
500
|
+
break;
|
|
501
|
+
case H.TOUCH_DOLLY_PAN:
|
|
502
|
+
if (this.enableZoom === !1 && this.enablePan === !1) return;
|
|
503
|
+
this._handleTouchMoveDollyPan(a), this.update();
|
|
504
|
+
break;
|
|
505
|
+
case H.TOUCH_DOLLY_ROTATE:
|
|
506
|
+
if (this.enableZoom === !1 && this.enableRotate === !1) return;
|
|
507
|
+
this._handleTouchMoveDollyRotate(a), this.update();
|
|
508
|
+
break;
|
|
509
|
+
default:
|
|
510
|
+
this.state = H.NONE;
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
function oa(a) {
|
|
514
|
+
this.enabled !== !1 && a.preventDefault();
|
|
515
|
+
}
|
|
516
|
+
function aa(a) {
|
|
517
|
+
a.key === "Control" && (this._controlActive = !0, this.domElement.getRootNode().addEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
|
|
518
|
+
}
|
|
519
|
+
function sa(a) {
|
|
520
|
+
a.key === "Control" && (this._controlActive = !1, this.domElement.getRootNode().removeEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
|
|
521
|
+
}
|
|
522
|
+
function na(a) {
|
|
523
|
+
let e = null, t = null, o = null, r = null, s = null, i = null;
|
|
524
|
+
const n = T([]), h = T(new F()), P = T(new F()), U = () => {
|
|
525
|
+
if (!a.value) return;
|
|
526
|
+
e = new bo(), e.background = new vo(15790320);
|
|
527
|
+
const _ = a.value;
|
|
528
|
+
t = new Co(75, _.clientWidth / _.clientHeight, 0.1, 1e4), o = new ko({
|
|
529
|
+
antialias: !0,
|
|
530
|
+
alpha: !0
|
|
531
|
+
}), o.setSize(_.clientWidth, _.clientHeight), o.localClippingEnabled = !0, o.shadowMap.enabled = !0, o.shadowMap.type = Po, o.toneMapping = To, o.toneMappingExposure = 1, o.outputColorSpace = Mo, _.appendChild(o.domElement), r = new Ko(t, o.domElement), r.enableDamping = !0, r.dampingFactor = 0.05, s = new Eo(t, o, {
|
|
532
|
+
container: _,
|
|
533
|
+
type: "cube",
|
|
534
|
+
placement: "bottom-left",
|
|
535
|
+
offset: {
|
|
536
|
+
left: 350,
|
|
537
|
+
bottom: 22
|
|
538
|
+
},
|
|
539
|
+
background: {
|
|
540
|
+
color: "#D1D1D1"
|
|
541
|
+
}
|
|
542
|
+
}), s.attachControls(r), te(), ne();
|
|
543
|
+
}, te = () => {
|
|
544
|
+
const _ = new xo(4210752, 0.6);
|
|
545
|
+
e.add(_);
|
|
546
|
+
const y = new Pt(16777215, 2);
|
|
547
|
+
y.position.set(10, 10, 8), y.castShadow = !0, y.shadow.mapSize.width = 2048, y.shadow.mapSize.height = 2048, y.shadow.camera.near = 0.5, y.shadow.camera.far = 50, e.add(y);
|
|
548
|
+
const m = new Pt(16777215, 0.8);
|
|
549
|
+
m.position.set(-8, -8, 6), e.add(m);
|
|
550
|
+
const D = new Pt(16777215, 0.6);
|
|
551
|
+
D.position.set(0, -15, 2), e.add(D);
|
|
552
|
+
const V = new So(16777215, 4473924, 0.8);
|
|
553
|
+
e.add(V);
|
|
554
|
+
const j = new Nt(16777215, 1, 50);
|
|
555
|
+
j.position.set(15, 15, 15), e.add(j);
|
|
556
|
+
const Q = new Nt(16777215, 0.5, 50);
|
|
557
|
+
Q.position.set(-15, -15, 15), e.add(Q);
|
|
558
|
+
}, ne = () => {
|
|
559
|
+
i = requestAnimationFrame(ne), r && r.update(), o && e && t && o.render(e, t), s && s.render();
|
|
560
|
+
}, oe = (_) => {
|
|
561
|
+
[
|
|
562
|
+
"map",
|
|
563
|
+
"normalMap",
|
|
564
|
+
"bumpMap",
|
|
565
|
+
"roughnessMap",
|
|
566
|
+
"metalnessMap",
|
|
567
|
+
"emissiveMap",
|
|
568
|
+
"specularMap",
|
|
569
|
+
"envMap",
|
|
570
|
+
"lightMap",
|
|
571
|
+
"aoMap",
|
|
572
|
+
"displacementMap"
|
|
573
|
+
].forEach((m) => {
|
|
574
|
+
_[m] && _[m].dispose && _[m].dispose();
|
|
575
|
+
}), _.dispose && _.dispose();
|
|
576
|
+
}, I = (_) => {
|
|
577
|
+
_.traverse((y) => {
|
|
578
|
+
y.geometry && y.geometry.dispose(), y.material && (Array.isArray(y.material) ? y.material.forEach((m) => {
|
|
579
|
+
oe(m);
|
|
580
|
+
}) : oe(y.material));
|
|
581
|
+
});
|
|
582
|
+
};
|
|
583
|
+
return {
|
|
584
|
+
// 响应式数据
|
|
585
|
+
currentModels: n,
|
|
586
|
+
initialCameraPosition: h,
|
|
587
|
+
initialTargetPosition: P,
|
|
588
|
+
// 方法
|
|
589
|
+
initThreeJS: U,
|
|
590
|
+
handleResize: () => {
|
|
591
|
+
if (!a.value || !t || !o || !s) return;
|
|
592
|
+
const _ = a.value, y = _.clientWidth, m = _.clientHeight;
|
|
593
|
+
t.aspect = y / m, t.updateProjectionMatrix(), o.setSize(y, m), s.update();
|
|
594
|
+
},
|
|
595
|
+
fitCameraToAllModels: () => {
|
|
596
|
+
if (!t || !r || n.value.length === 0) return;
|
|
597
|
+
const _ = new Lt();
|
|
598
|
+
n.value.forEach((ie) => {
|
|
599
|
+
_.expandByObject(ie);
|
|
600
|
+
});
|
|
601
|
+
const y = _.getSize(new F()), m = _.getCenter(new F()), V = Math.max(y.x, y.y, y.z) * 0.8, j = new F(m.x + V, m.y + V, m.z + V), Q = m.clone();
|
|
602
|
+
t.position.copy(j), t.lookAt(Q), r.target.copy(Q), r.update(), h.value.copy(j), P.value.copy(Q);
|
|
603
|
+
},
|
|
604
|
+
getThreeJSObjects: () => ({
|
|
605
|
+
scene: e,
|
|
606
|
+
camera: t,
|
|
607
|
+
renderer: o,
|
|
608
|
+
controls: r,
|
|
609
|
+
gizmo: s
|
|
610
|
+
}),
|
|
611
|
+
clearAllModels: () => {
|
|
612
|
+
if (!e) return;
|
|
613
|
+
n.value.forEach((y) => {
|
|
614
|
+
e.remove(y), I(y);
|
|
615
|
+
});
|
|
616
|
+
const _ = [];
|
|
617
|
+
e.children.forEach((y) => {
|
|
618
|
+
!y.isLight && !y.isCamera && _.push(y);
|
|
619
|
+
}), _.forEach((y) => {
|
|
620
|
+
e.remove(y), I(y);
|
|
621
|
+
}), n.value = [];
|
|
622
|
+
},
|
|
623
|
+
cleanup: () => {
|
|
624
|
+
i && cancelAnimationFrame(i), o && o.dispose(), r && r.dispose(), s && s.dispose();
|
|
625
|
+
}
|
|
626
|
+
};
|
|
627
|
+
}
|
|
628
|
+
function ia(a, e) {
|
|
629
|
+
const t = T(!1);
|
|
630
|
+
let o = null, r = 12700, s = new F(), i = new F(), n = new F(), h = 0, P = null;
|
|
631
|
+
const U = (c) => c < 0.5 ? 4 * c * c * c : 1 - Math.pow(-2 * c + 2, 3) / 2, te = (c) => {
|
|
632
|
+
const k = new F(), p = h * 1.2, x = new F(n.x + p, n.y, n.z), _ = new F(n.x, n.y + p, n.z), y = new F(n.x, n.y - p, n.z);
|
|
633
|
+
if (c <= 0.567) {
|
|
634
|
+
const D = c / 0.567 * Math.PI * 2;
|
|
635
|
+
k.x = n.x + Math.cos(D) * p, k.z = n.z + Math.sin(D) * p, k.y = n.y;
|
|
636
|
+
} else if (c <= 0.724) {
|
|
637
|
+
const m = (c - 0.567) / 0.157, D = U(m);
|
|
638
|
+
k.lerpVectors(x, _, D);
|
|
639
|
+
} else if (c <= 0.881) {
|
|
640
|
+
const m = (c - 0.724) / 0.157, V = U(m) * Math.PI;
|
|
641
|
+
k.x = n.x + Math.sin(V) * p, k.y = n.y + Math.cos(V) * p, k.z = n.z;
|
|
642
|
+
} else {
|
|
643
|
+
const m = (c - 0.881) / 0.119, D = U(m);
|
|
644
|
+
k.lerpVectors(y, s, D);
|
|
645
|
+
}
|
|
646
|
+
return k;
|
|
647
|
+
}, ne = () => {
|
|
648
|
+
const { camera: c, controls: k } = a();
|
|
649
|
+
if (!c || !k) return;
|
|
650
|
+
o || (o = Date.now());
|
|
651
|
+
const p = Date.now() - o, x = Math.min(p / r, 1);
|
|
652
|
+
if (x >= 1) {
|
|
653
|
+
I();
|
|
654
|
+
return;
|
|
655
|
+
}
|
|
656
|
+
const _ = te(x);
|
|
657
|
+
c.position.copy(_), c.lookAt(n), k.target.copy(n), P = requestAnimationFrame(ne);
|
|
658
|
+
}, oe = () => {
|
|
659
|
+
if (e.value.length === 0) return;
|
|
660
|
+
const { camera: c, controls: k } = a();
|
|
661
|
+
if (!c || !k) return;
|
|
662
|
+
s.copy(c.position), i.copy(k.target);
|
|
663
|
+
const p = new Lt();
|
|
664
|
+
e.value.forEach((j) => {
|
|
665
|
+
p.expandByObject(j);
|
|
666
|
+
});
|
|
667
|
+
const x = p.getSize(new F());
|
|
668
|
+
n = p.getCenter(new F()), h = Math.max(x.x, x.y, x.z) * 1.2;
|
|
669
|
+
const _ = new F(n.x + h * 1.2, n.y, n.z);
|
|
670
|
+
k.enabled = !1;
|
|
671
|
+
const y = c.position.clone(), m = 1e3, D = Date.now(), V = () => {
|
|
672
|
+
const j = Date.now() - D, Q = Math.min(j / m, 1), ie = U(Q);
|
|
673
|
+
c.position.lerpVectors(y, _, ie), c.lookAt(n), k.target.copy(n), Q < 1 ? requestAnimationFrame(V) : (t.value = !0, o = null, ne());
|
|
674
|
+
};
|
|
675
|
+
V();
|
|
676
|
+
}, I = () => {
|
|
677
|
+
t.value = !1, o = null, P && (cancelAnimationFrame(P), P = null);
|
|
678
|
+
const { controls: c } = a();
|
|
679
|
+
c && (c.enabled = !0, c.target.copy(i));
|
|
680
|
+
};
|
|
681
|
+
return {
|
|
682
|
+
isAnimating: t,
|
|
683
|
+
toggleAnimation: () => {
|
|
684
|
+
if (t.value) {
|
|
685
|
+
t.value = !1, o = null, P && (cancelAnimationFrame(P), P = null);
|
|
686
|
+
const { camera: c, controls: k } = a();
|
|
687
|
+
if (!c || !k) return;
|
|
688
|
+
k.enabled = !0;
|
|
689
|
+
const p = c.position.clone(), x = k.target.clone(), _ = 1500, y = Date.now(), m = () => {
|
|
690
|
+
const D = Date.now() - y, V = Math.min(D / _, 1), j = U(V);
|
|
691
|
+
c.position.lerpVectors(p, s, j), k.target.lerpVectors(x, i, j), V < 1 && requestAnimationFrame(m);
|
|
692
|
+
};
|
|
693
|
+
m();
|
|
694
|
+
} else
|
|
695
|
+
oe();
|
|
696
|
+
},
|
|
697
|
+
startAnimation: oe,
|
|
698
|
+
stopAnimation: I
|
|
699
|
+
};
|
|
700
|
+
}
|
|
701
|
+
function la(a, e) {
|
|
702
|
+
const t = T(!1), o = T("none");
|
|
703
|
+
let r = [], s = [], i = new Lt(), n = new F();
|
|
704
|
+
const h = () => {
|
|
705
|
+
r = [
|
|
706
|
+
new gt(new F(1, 0, 0), 0),
|
|
707
|
+
// X轴平面
|
|
708
|
+
new gt(new F(0, 1, 0), 0),
|
|
709
|
+
// Y轴平面
|
|
710
|
+
new gt(new F(0, 0, 1), 0)
|
|
711
|
+
// Z轴平面
|
|
712
|
+
];
|
|
713
|
+
}, P = () => {
|
|
714
|
+
i.makeEmpty(), e.value.forEach((K) => {
|
|
715
|
+
i.expandByObject(K);
|
|
716
|
+
}), n = i.getCenter(new F());
|
|
717
|
+
}, U = (K) => {
|
|
718
|
+
const c = i.getSize(new F());
|
|
719
|
+
let k, p, x;
|
|
720
|
+
K === "x" ? (k = new Tt(c.z * 1.2, c.y * 1.2), p = new F(n.x, n.y, n.z), x = new Mt(0, Math.PI / 2, 0)) : K === "y" ? (k = new Tt(c.x * 1.2, c.z * 1.2), p = new F(n.x, n.y, n.z), x = new Mt(Math.PI / 2, 0, 0)) : K === "z" && (k = new Tt(c.x * 1.2, c.y * 1.2), p = new F(n.x, n.y, n.z), x = new Mt(0, 0, 0));
|
|
721
|
+
const _ = new Do({
|
|
722
|
+
color: 8900331,
|
|
723
|
+
transparent: !0,
|
|
724
|
+
opacity: 0.3,
|
|
725
|
+
side: Ro,
|
|
726
|
+
depthWrite: !1
|
|
727
|
+
}), y = new Ao(k, _);
|
|
728
|
+
return y.position.copy(p), y.rotation.copy(x), y;
|
|
729
|
+
}, te = () => {
|
|
730
|
+
if (ne(), oe(), o.value === "none")
|
|
731
|
+
return;
|
|
732
|
+
P();
|
|
733
|
+
let K = null;
|
|
734
|
+
if (o.value === "x" ? (r[0].constant = -n.x, K = r[0]) : o.value === "y" ? (r[1].constant = -n.y, K = r[1]) : o.value === "z" && (r[2].constant = -n.z, K = r[2]), K) {
|
|
735
|
+
e.value.forEach((k) => {
|
|
736
|
+
k.traverse((p) => {
|
|
737
|
+
p.isMesh && p.material && (Array.isArray(p.material) ? p.material.forEach((x) => {
|
|
738
|
+
x.clippingPlanes = [K];
|
|
739
|
+
}) : p.material.clippingPlanes = [K]);
|
|
740
|
+
});
|
|
741
|
+
});
|
|
742
|
+
const { scene: c } = a();
|
|
743
|
+
if (c) {
|
|
744
|
+
const k = U(o.value);
|
|
745
|
+
c.add(k), s.push(k);
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
}, ne = () => {
|
|
749
|
+
e.value.forEach((K) => {
|
|
750
|
+
K.traverse((c) => {
|
|
751
|
+
c.isMesh && c.material && (Array.isArray(c.material) ? c.material.forEach((k) => {
|
|
752
|
+
k.clippingPlanes = [];
|
|
753
|
+
}) : c.material.clippingPlanes = []);
|
|
754
|
+
});
|
|
755
|
+
});
|
|
756
|
+
}, oe = () => {
|
|
757
|
+
const { scene: K } = a();
|
|
758
|
+
K && s.forEach((c) => {
|
|
759
|
+
K.remove(c), c.geometry.dispose(), c.material.dispose();
|
|
760
|
+
}), s = [];
|
|
761
|
+
};
|
|
762
|
+
return {
|
|
763
|
+
isClipping: t,
|
|
764
|
+
activeClippingAxis: o,
|
|
765
|
+
toggleClipping: () => {
|
|
766
|
+
t.value = !t.value, t.value ? (h(), e.value.length > 0 && P()) : (o.value = "none", ne(), oe());
|
|
767
|
+
},
|
|
768
|
+
updateClippingPlanes: te,
|
|
769
|
+
clearClippingPlanes: ne,
|
|
770
|
+
clearClippingMeshes: oe
|
|
771
|
+
};
|
|
772
|
+
}
|
|
773
|
+
const ra = { class: "obj-viewer-container" }, ca = { class: "floating-controls" }, ha = ["disabled"], ua = ["disabled", "title"], da = {
|
|
774
|
+
key: 0,
|
|
775
|
+
viewBox: "0 0 24 24",
|
|
776
|
+
fill: "none",
|
|
777
|
+
stroke: "currentColor",
|
|
778
|
+
"stroke-width": "2"
|
|
779
|
+
}, pa = {
|
|
780
|
+
key: 1,
|
|
781
|
+
viewBox: "0 0 24 24",
|
|
782
|
+
fill: "none",
|
|
783
|
+
stroke: "currentColor",
|
|
784
|
+
"stroke-width": "2"
|
|
785
|
+
}, ma = ["disabled"], fa = ["title"], ga = {
|
|
786
|
+
key: 0,
|
|
787
|
+
viewBox: "0 0 24 24",
|
|
788
|
+
fill: "none",
|
|
789
|
+
stroke: "currentColor",
|
|
790
|
+
"stroke-width": "2"
|
|
791
|
+
}, _a = {
|
|
792
|
+
key: 1,
|
|
793
|
+
viewBox: "0 0 24 24",
|
|
794
|
+
fill: "none",
|
|
795
|
+
stroke: "currentColor",
|
|
796
|
+
"stroke-width": "2"
|
|
797
|
+
}, ya = {
|
|
798
|
+
key: 1,
|
|
799
|
+
class: "clipping-panel"
|
|
800
|
+
}, wa = { class: "panel-content" }, ba = { class: "radio-group" }, va = { class: "radio-label" }, Ca = { class: "radio-label" }, ka = { class: "radio-label" }, Pa = { class: "radio-label" }, Ta = {
|
|
801
|
+
key: 2,
|
|
802
|
+
class: "loading-overlay"
|
|
803
|
+
}, Ma = {
|
|
804
|
+
__name: "threeModel",
|
|
805
|
+
setup(a, { expose: e }) {
|
|
806
|
+
const t = T(null), o = T(!1), r = T(""), s = T(!1), i = T(!1), {
|
|
807
|
+
currentModels: n,
|
|
808
|
+
initialCameraPosition: h,
|
|
809
|
+
initialTargetPosition: P,
|
|
810
|
+
initThreeJS: U,
|
|
811
|
+
handleResize: te,
|
|
812
|
+
fitCameraToAllModels: ne,
|
|
813
|
+
getThreeJSObjects: oe,
|
|
814
|
+
clearAllModels: I,
|
|
815
|
+
cleanup: K
|
|
816
|
+
} = na(t), { isAnimating: c, toggleAnimation: k, stopAnimation: p } = ia(oe, n), { isClipping: x, activeClippingAxis: _, toggleClipping: y, updateClippingPlanes: m } = la(
|
|
817
|
+
oe,
|
|
818
|
+
n
|
|
819
|
+
), { addModelsFromUrls: D, loadModelByDefaultPath: V, urdfModel: j } = Bo(
|
|
820
|
+
oe,
|
|
821
|
+
n,
|
|
822
|
+
o,
|
|
823
|
+
r,
|
|
824
|
+
I
|
|
825
|
+
), Q = () => {
|
|
826
|
+
if (i.value || n.value.length === 0) return;
|
|
827
|
+
i.value = !0, c.value && p();
|
|
828
|
+
const { camera: J, controls: v } = oe();
|
|
829
|
+
if (!J || !v) return;
|
|
830
|
+
v.enabled = !0;
|
|
831
|
+
const Y = (M) => M < 0.5 ? 4 * M * M * M : 1 - Math.pow(-2 * M + 2, 3) / 2, bt = J.position.clone(), it = v.target.clone(), vt = 1500, g = Date.now(), f = () => {
|
|
832
|
+
const M = Date.now() - g, $ = Math.min(M / vt, 1), R = Y($);
|
|
833
|
+
J.position.lerpVectors(bt, h.value, R), v.target.lerpVectors(it, P.value, R), $ < 1 ? requestAnimationFrame(f) : i.value = !1;
|
|
834
|
+
};
|
|
835
|
+
f();
|
|
836
|
+
}, ie = () => {
|
|
837
|
+
document.fullscreenElement ? document.exitFullscreen().then(() => {
|
|
838
|
+
s.value = !1, ut(() => {
|
|
839
|
+
te();
|
|
840
|
+
});
|
|
841
|
+
}).catch((J) => {
|
|
842
|
+
console.error("无法退出全屏:", J);
|
|
843
|
+
}) : t.value.requestFullscreen().then(() => {
|
|
844
|
+
s.value = !0, ut(() => {
|
|
845
|
+
te();
|
|
846
|
+
});
|
|
847
|
+
}).catch((J) => {
|
|
848
|
+
console.error("无法进入全屏:", J);
|
|
849
|
+
});
|
|
850
|
+
}, Ie = () => {
|
|
851
|
+
s.value = !!document.fullscreenElement, s.value || ut(() => {
|
|
852
|
+
te();
|
|
853
|
+
});
|
|
854
|
+
}, ve = async (J, v) => {
|
|
855
|
+
try {
|
|
856
|
+
c.value && p(), x.value && y();
|
|
857
|
+
const Y = await v(J);
|
|
858
|
+
return ne(), Y;
|
|
859
|
+
} catch (Y) {
|
|
860
|
+
throw console.error("加载模型失败:", Y), Y;
|
|
861
|
+
}
|
|
862
|
+
}, A = async (J) => ve(J, D), De = async (J) => ve(J, V);
|
|
863
|
+
return Kt(async () => {
|
|
864
|
+
await ut(), U(), window.addEventListener("resize", te), document.addEventListener("fullscreenchange", Ie);
|
|
865
|
+
}), co(() => {
|
|
866
|
+
window.removeEventListener("resize", te), document.removeEventListener("fullscreenchange", Ie), c.value && p(), K();
|
|
867
|
+
}), e({
|
|
868
|
+
addModelsFromUrls: A,
|
|
869
|
+
loadModelByDefaultPath: De
|
|
870
|
+
}), (J, v) => (C(), X("div", ra, [
|
|
871
|
+
l(j) ? (C(), G(Yo, {
|
|
872
|
+
key: 0,
|
|
873
|
+
class: "client-robot-side",
|
|
874
|
+
model: l(j)
|
|
875
|
+
}, null, 8, ["model"])) : de("", !0),
|
|
876
|
+
u("div", {
|
|
877
|
+
ref_key: "threejsContainer",
|
|
878
|
+
ref: t,
|
|
879
|
+
class: "threejs-container"
|
|
880
|
+
}, null, 512),
|
|
881
|
+
u("div", ca, [
|
|
882
|
+
u("button", {
|
|
883
|
+
onClick: Q,
|
|
884
|
+
class: dt(["control-btn", "reset-btn"]),
|
|
885
|
+
disabled: o.value || l(n).length === 0 || i.value,
|
|
886
|
+
title: "重置"
|
|
887
|
+
}, v[10] || (v[10] = [
|
|
888
|
+
u("svg", {
|
|
889
|
+
viewBox: "0 0 24 24",
|
|
890
|
+
fill: "none",
|
|
891
|
+
stroke: "currentColor",
|
|
892
|
+
"stroke-width": "2"
|
|
893
|
+
}, [
|
|
894
|
+
u("path", { d: "M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" }),
|
|
895
|
+
u("polyline", { points: "9,22 9,12 15,12 15,22" })
|
|
896
|
+
], -1)
|
|
897
|
+
]), 8, ha),
|
|
898
|
+
u("button", {
|
|
899
|
+
onClick: v[0] || (v[0] = (...Y) => l(k) && l(k)(...Y)),
|
|
900
|
+
class: dt(["control-btn", "animation-btn", { active: l(c) }]),
|
|
901
|
+
disabled: o.value || l(n).length === 0,
|
|
902
|
+
title: l(c) ? "停止动画" : "动画视图"
|
|
903
|
+
}, [
|
|
904
|
+
l(c) ? (C(), X("svg", pa, v[12] || (v[12] = [
|
|
905
|
+
u("circle", {
|
|
906
|
+
cx: "12",
|
|
907
|
+
cy: "12",
|
|
908
|
+
r: "10"
|
|
909
|
+
}, null, -1),
|
|
910
|
+
u("rect", {
|
|
911
|
+
x: "9.5",
|
|
912
|
+
y: "8",
|
|
913
|
+
width: "2",
|
|
914
|
+
height: "8",
|
|
915
|
+
fill: "currentColor"
|
|
916
|
+
}, null, -1),
|
|
917
|
+
u("rect", {
|
|
918
|
+
x: "12.5",
|
|
919
|
+
y: "8",
|
|
920
|
+
width: "2",
|
|
921
|
+
height: "8",
|
|
922
|
+
fill: "currentColor"
|
|
923
|
+
}, null, -1)
|
|
924
|
+
]))) : (C(), X("svg", da, v[11] || (v[11] = [
|
|
925
|
+
u("circle", {
|
|
926
|
+
cx: "12",
|
|
927
|
+
cy: "12",
|
|
928
|
+
r: "10"
|
|
929
|
+
}, null, -1),
|
|
930
|
+
u("polygon", {
|
|
931
|
+
points: "10,8 16,12 10,16",
|
|
932
|
+
fill: "currentColor"
|
|
933
|
+
}, null, -1)
|
|
934
|
+
])))
|
|
935
|
+
], 10, ua),
|
|
936
|
+
u("button", {
|
|
937
|
+
onClick: v[1] || (v[1] = (...Y) => l(y) && l(y)(...Y)),
|
|
938
|
+
class: dt(["control-btn", "clipping-btn", { active: l(x) }]),
|
|
939
|
+
disabled: o.value || l(n).length === 0,
|
|
940
|
+
title: "剖面视图"
|
|
941
|
+
}, v[13] || (v[13] = [
|
|
942
|
+
u("svg", {
|
|
943
|
+
viewBox: "0 0 24 24",
|
|
944
|
+
fill: "none",
|
|
945
|
+
stroke: "currentColor",
|
|
946
|
+
"stroke-width": "2"
|
|
947
|
+
}, [
|
|
948
|
+
u("rect", {
|
|
949
|
+
x: "3",
|
|
950
|
+
y: "3",
|
|
951
|
+
width: "18",
|
|
952
|
+
height: "18"
|
|
953
|
+
}),
|
|
954
|
+
u("line", {
|
|
955
|
+
x1: "-14",
|
|
956
|
+
y1: "12",
|
|
957
|
+
x2: "30",
|
|
958
|
+
y2: "12",
|
|
959
|
+
"stroke-dasharray": "4,2"
|
|
960
|
+
})
|
|
961
|
+
], -1)
|
|
962
|
+
]), 10, ma),
|
|
963
|
+
u("button", {
|
|
964
|
+
onClick: ie,
|
|
965
|
+
class: dt(["control-btn", "fullscreen-btn"]),
|
|
966
|
+
title: s.value ? "退出全屏" : "全屏"
|
|
967
|
+
}, [
|
|
968
|
+
s.value ? (C(), X("svg", _a, v[15] || (v[15] = [
|
|
969
|
+
u("path", { d: "M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3" }, null, -1)
|
|
970
|
+
]))) : (C(), X("svg", ga, v[14] || (v[14] = [
|
|
971
|
+
u("path", { d: "M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3" }, null, -1)
|
|
972
|
+
])))
|
|
973
|
+
], 8, fa)
|
|
974
|
+
]),
|
|
975
|
+
l(x) ? (C(), X("div", ya, [
|
|
976
|
+
u("div", wa, [
|
|
977
|
+
u("div", ba, [
|
|
978
|
+
u("label", va, [
|
|
979
|
+
et(u("input", {
|
|
980
|
+
type: "radio",
|
|
981
|
+
name: "clipping-axis",
|
|
982
|
+
value: "none",
|
|
983
|
+
"onUpdate:modelValue": v[2] || (v[2] = (Y) => pt(_) ? _.value = Y : null),
|
|
984
|
+
onChange: v[3] || (v[3] = (...Y) => l(m) && l(m)(...Y))
|
|
985
|
+
}, null, 544), [
|
|
986
|
+
[mt, l(_)]
|
|
987
|
+
]),
|
|
988
|
+
v[16] || (v[16] = u("span", { class: "radio-text" }, "无切割", -1))
|
|
989
|
+
]),
|
|
990
|
+
u("label", Ca, [
|
|
991
|
+
et(u("input", {
|
|
992
|
+
type: "radio",
|
|
993
|
+
name: "clipping-axis",
|
|
994
|
+
value: "x",
|
|
995
|
+
"onUpdate:modelValue": v[4] || (v[4] = (Y) => pt(_) ? _.value = Y : null),
|
|
996
|
+
onChange: v[5] || (v[5] = (...Y) => l(m) && l(m)(...Y))
|
|
997
|
+
}, null, 544), [
|
|
998
|
+
[mt, l(_)]
|
|
999
|
+
]),
|
|
1000
|
+
v[17] || (v[17] = u("span", { class: "radio-text" }, "X轴切割", -1))
|
|
1001
|
+
]),
|
|
1002
|
+
u("label", ka, [
|
|
1003
|
+
et(u("input", {
|
|
1004
|
+
type: "radio",
|
|
1005
|
+
name: "clipping-axis",
|
|
1006
|
+
value: "y",
|
|
1007
|
+
"onUpdate:modelValue": v[6] || (v[6] = (Y) => pt(_) ? _.value = Y : null),
|
|
1008
|
+
onChange: v[7] || (v[7] = (...Y) => l(m) && l(m)(...Y))
|
|
1009
|
+
}, null, 544), [
|
|
1010
|
+
[mt, l(_)]
|
|
1011
|
+
]),
|
|
1012
|
+
v[18] || (v[18] = u("span", { class: "radio-text" }, "Y轴切割", -1))
|
|
1013
|
+
]),
|
|
1014
|
+
u("label", Pa, [
|
|
1015
|
+
et(u("input", {
|
|
1016
|
+
type: "radio",
|
|
1017
|
+
name: "clipping-axis",
|
|
1018
|
+
value: "z",
|
|
1019
|
+
"onUpdate:modelValue": v[8] || (v[8] = (Y) => pt(_) ? _.value = Y : null),
|
|
1020
|
+
onChange: v[9] || (v[9] = (...Y) => l(m) && l(m)(...Y))
|
|
1021
|
+
}, null, 544), [
|
|
1022
|
+
[mt, l(_)]
|
|
1023
|
+
]),
|
|
1024
|
+
v[19] || (v[19] = u("span", { class: "radio-text" }, "Z轴切割", -1))
|
|
1025
|
+
])
|
|
1026
|
+
])
|
|
1027
|
+
])
|
|
1028
|
+
])) : de("", !0),
|
|
1029
|
+
o.value ? (C(), X("div", Ta, [
|
|
1030
|
+
v[20] || (v[20] = u("div", { class: "loading-spinner" }, null, -1)),
|
|
1031
|
+
u("p", null, je(r.value), 1)
|
|
1032
|
+
])) : de("", !0)
|
|
1033
|
+
]));
|
|
1034
|
+
}
|
|
1035
|
+
}, Ea = /* @__PURE__ */ Ke(Ma, [["__scopeId", "data-v-0595ce23"]]);
|
|
1036
|
+
function xa(a, e, t, o, r, s) {
|
|
1037
|
+
const i = ee("svg-icon"), n = ee("ssMenu");
|
|
1038
|
+
return C(), G(n, {
|
|
1039
|
+
mode: a.mode,
|
|
1040
|
+
menuList: a.renderMenuList,
|
|
1041
|
+
onClickMenu: a.clickMenu,
|
|
1042
|
+
onOpenMenu: a.openMenu,
|
|
1043
|
+
onCloseMenu: a.closeMenu
|
|
1044
|
+
}, {
|
|
1045
|
+
title: b(({ menu: h }) => [
|
|
1046
|
+
d(i, {
|
|
1047
|
+
name: h.icon ?? "Fold",
|
|
1048
|
+
style: { width: "clamp(16px, 1.25rem, 20px)", height: "clamp(16px, 1.25rem, 20px)", "margin-right": "8px" }
|
|
1049
|
+
}, null, 8, ["name"]),
|
|
1050
|
+
u("span", null, je(h.title ?? ""), 1)
|
|
1051
|
+
]),
|
|
1052
|
+
_: 1
|
|
1053
|
+
}, 8, ["mode", "menuList", "onClickMenu", "onOpenMenu", "onCloseMenu"]);
|
|
1054
|
+
}
|
|
1055
|
+
const lo = /* @__PURE__ */ Ke(po, [["render", xa], ["__scopeId", "data-v-5c2d7ed2"]]), Sa = { class: "bread-content" }, Da = ["onClick"], Ra = {
|
|
1056
|
+
key: 0,
|
|
1057
|
+
class: "split-title"
|
|
1058
|
+
}, Aa = {
|
|
1059
|
+
__name: "index",
|
|
1060
|
+
props: {
|
|
1061
|
+
breadArray: {
|
|
1062
|
+
type: Array,
|
|
1063
|
+
default: () => []
|
|
1064
|
+
}
|
|
1065
|
+
},
|
|
1066
|
+
emits: ["click"],
|
|
1067
|
+
setup(a, { emit: e }) {
|
|
1068
|
+
const t = a, o = T([]), r = e;
|
|
1069
|
+
Kt(() => {
|
|
1070
|
+
o.value = t == null ? void 0 : t.breadArray;
|
|
1071
|
+
}), Se(
|
|
1072
|
+
() => t == null ? void 0 : t.breadArray,
|
|
1073
|
+
() => {
|
|
1074
|
+
o.value = t == null ? void 0 : t.breadArray;
|
|
1075
|
+
},
|
|
1076
|
+
{ deep: !0, immediate: !0 }
|
|
1077
|
+
);
|
|
1078
|
+
const s = (i) => {
|
|
1079
|
+
r("click", i);
|
|
1080
|
+
};
|
|
1081
|
+
return (i, n) => (C(), X("div", Sa, [
|
|
1082
|
+
(C(!0), X(St, null, Dt(o.value, (h, P) => {
|
|
1083
|
+
var U;
|
|
1084
|
+
return C(), X("div", {
|
|
1085
|
+
key: P,
|
|
1086
|
+
class: "bread-item"
|
|
1087
|
+
}, [
|
|
1088
|
+
u("div", {
|
|
1089
|
+
class: "bread-title",
|
|
1090
|
+
onClick: (te) => s(h),
|
|
1091
|
+
style: ho({ opacity: ((U = o.value) == null ? void 0 : U.length) - 1 === P ? "0.7" : "1" })
|
|
1092
|
+
}, je(h.value), 13, Da),
|
|
1093
|
+
P !== o.value.length - 1 && Array.isArray(o.value) ? (C(), X("div", Ra, je("/"))) : de("", !0)
|
|
1094
|
+
]);
|
|
1095
|
+
}), 128))
|
|
1096
|
+
]));
|
|
1097
|
+
}
|
|
1098
|
+
}, ro = /* @__PURE__ */ Ke(Aa, [["__scopeId", "data-v-ded7e2bd"]]), Ba = { class: "structure-buttons" }, La = { class: "structure-paths" }, Fa = { class: "client-header-user" }, ja = { class: "model-select" }, Oa = { class: "model-show" }, za = { class: "model-fill" }, Na = { class: "client-header-logo" }, Ua = { class: "client-header-menu" }, $a = { class: "client-header-user" }, Ia = { class: "client-main-operate" }, Va = {
|
|
1099
|
+
key: 0,
|
|
1100
|
+
class: "item-view-group"
|
|
1101
|
+
}, Ya = {
|
|
1102
|
+
key: 0,
|
|
1103
|
+
class: "calculator"
|
|
1104
|
+
}, Ha = {
|
|
1105
|
+
key: 1,
|
|
1106
|
+
class: "calculator"
|
|
1107
|
+
}, Ka = { class: "client-main-operate" }, Za = /* @__PURE__ */ xt({
|
|
1108
|
+
__name: "index2",
|
|
1109
|
+
props: {
|
|
1110
|
+
windowConfig: {
|
|
1111
|
+
type: Object,
|
|
1112
|
+
default: () => {
|
|
1113
|
+
}
|
|
1114
|
+
},
|
|
1115
|
+
showButton: {
|
|
1116
|
+
type: Boolean,
|
|
1117
|
+
default: !0
|
|
1118
|
+
}
|
|
1119
|
+
},
|
|
1120
|
+
setup(a) {
|
|
1121
|
+
const e = Ft(Fe), t = T(!1), { selectTitle: o } = Le(e), r = T(!1), s = T(!1), i = T(!1), n = T(!1), h = ao(), { loginUserInfo: P } = Le(h), U = wt(Fe), { isEdit: te } = Le(U), ne = yt(Fe), oe = T(!1), { importLoading: I, platName: K } = Le(ne), c = T("");
|
|
1122
|
+
return (k, p) => {
|
|
1123
|
+
const x = ee("el-button"), _ = ee("el-avatar"), y = ee("el-header"), m = ee("el-container"), D = ee("el-icon"), V = ee("el-input"), j = ee("el-aside"), Q = ee("el-main"), ie = ee("router-view"), Ie = Zt("loading");
|
|
1124
|
+
return l(te) === "edit" ? (C(), G(m, {
|
|
1125
|
+
key: 0,
|
|
1126
|
+
class: "client-container"
|
|
1127
|
+
}, {
|
|
1128
|
+
default: b(() => [
|
|
1129
|
+
d(y, { class: "client-structure-header" }, {
|
|
1130
|
+
default: b(() => {
|
|
1131
|
+
var ve;
|
|
1132
|
+
return [
|
|
1133
|
+
u("div", Ba, [
|
|
1134
|
+
d(x, {
|
|
1135
|
+
id: "transparentBgButton",
|
|
1136
|
+
onClick: l(Wt)
|
|
1137
|
+
}, {
|
|
1138
|
+
default: b(() => p[3] || (p[3] = [
|
|
1139
|
+
Me(" 返回页面 ")
|
|
1140
|
+
])),
|
|
1141
|
+
_: 1,
|
|
1142
|
+
__: [3]
|
|
1143
|
+
}, 8, ["onClick"]),
|
|
1144
|
+
d(x, {
|
|
1145
|
+
id: "transparentBgButton",
|
|
1146
|
+
onClick: p[0] || (p[0] = (A) => {
|
|
1147
|
+
var De, J;
|
|
1148
|
+
return l(qt)((J = (De = l(o)) == null ? void 0 : De.map((v) => v.value)) == null ? void 0 : J.join("/"));
|
|
1149
|
+
})
|
|
1150
|
+
}, {
|
|
1151
|
+
icon: b(() => [
|
|
1152
|
+
d(Ne, { name: "Store" })
|
|
1153
|
+
]),
|
|
1154
|
+
default: b(() => [
|
|
1155
|
+
p[4] || (p[4] = Me(" 保存页面 "))
|
|
1156
|
+
]),
|
|
1157
|
+
_: 1,
|
|
1158
|
+
__: [4]
|
|
1159
|
+
})
|
|
1160
|
+
]),
|
|
1161
|
+
u("div", La, [
|
|
1162
|
+
(C(), G(ro, {
|
|
1163
|
+
key: l(o),
|
|
1164
|
+
breadArray: l(o),
|
|
1165
|
+
onClick: l(Gt)
|
|
1166
|
+
}, null, 8, ["breadArray", "onClick"]))
|
|
1167
|
+
]),
|
|
1168
|
+
u("div", Fa, [
|
|
1169
|
+
nt(k.$slots, "default", {}, void 0, !0),
|
|
1170
|
+
d(_, {
|
|
1171
|
+
size: 35,
|
|
1172
|
+
src: (ve = l(P)) == null ? void 0 : ve.avatarUrl
|
|
1173
|
+
}, {
|
|
1174
|
+
default: b(() => {
|
|
1175
|
+
var A;
|
|
1176
|
+
return [
|
|
1177
|
+
Me(je(((A = l(P)) == null ? void 0 : A.account) ?? "未知"), 1)
|
|
1178
|
+
];
|
|
1179
|
+
}),
|
|
1180
|
+
_: 1
|
|
1181
|
+
}, 8, ["src"])
|
|
1182
|
+
])
|
|
1183
|
+
];
|
|
1184
|
+
}),
|
|
1185
|
+
_: 3
|
|
1186
|
+
}),
|
|
1187
|
+
l(te) === "edit" ? (C(), G(m, {
|
|
1188
|
+
key: 0,
|
|
1189
|
+
class: "model-operate",
|
|
1190
|
+
style: { "margin-top": "10px", height: "0px" }
|
|
1191
|
+
}, {
|
|
1192
|
+
default: b(() => [
|
|
1193
|
+
u("div", ja, [
|
|
1194
|
+
d(Rt)
|
|
1195
|
+
]),
|
|
1196
|
+
u("div", Oa, [
|
|
1197
|
+
d(At)
|
|
1198
|
+
]),
|
|
1199
|
+
u("div", za, [
|
|
1200
|
+
d(Bt)
|
|
1201
|
+
])
|
|
1202
|
+
]),
|
|
1203
|
+
_: 1
|
|
1204
|
+
})) : de("", !0)
|
|
1205
|
+
]),
|
|
1206
|
+
_: 3
|
|
1207
|
+
})) : et((C(), G(m, {
|
|
1208
|
+
key: 1,
|
|
1209
|
+
class: "client-container",
|
|
1210
|
+
"element-loading-text": "正在加载页面数据..."
|
|
1211
|
+
}, {
|
|
1212
|
+
default: b(() => [
|
|
1213
|
+
d(y, { class: "client-header" }, {
|
|
1214
|
+
default: b(() => {
|
|
1215
|
+
var ve;
|
|
1216
|
+
return [
|
|
1217
|
+
u("div", Na, [
|
|
1218
|
+
d(Ne, {
|
|
1219
|
+
name: "logo",
|
|
1220
|
+
style: { width: "clamp(18px, 1.5rem, 24px)", height: "clamp(18px, 1.5rem, 24px)", "margin-right": "8px" }
|
|
1221
|
+
}),
|
|
1222
|
+
p[5] || (p[5] = Me(" ISIP "))
|
|
1223
|
+
]),
|
|
1224
|
+
u("div", Ua, [
|
|
1225
|
+
d(lo, { mode: "horizontal" })
|
|
1226
|
+
]),
|
|
1227
|
+
u("div", $a, [
|
|
1228
|
+
d(V, {
|
|
1229
|
+
modelValue: c.value,
|
|
1230
|
+
"onUpdate:modelValue": p[1] || (p[1] = (A) => c.value = A),
|
|
1231
|
+
clearable: "",
|
|
1232
|
+
placeholder: "搜索",
|
|
1233
|
+
style: { width: "130px" }
|
|
1234
|
+
}, {
|
|
1235
|
+
prefix: b(() => [
|
|
1236
|
+
d(D, { class: "el-input__icon" }, {
|
|
1237
|
+
default: b(() => [
|
|
1238
|
+
d(l(no))
|
|
1239
|
+
]),
|
|
1240
|
+
_: 1
|
|
1241
|
+
})
|
|
1242
|
+
]),
|
|
1243
|
+
_: 1
|
|
1244
|
+
}, 8, ["modelValue"]),
|
|
1245
|
+
a.showButton ? (C(), G(x, {
|
|
1246
|
+
key: 0,
|
|
1247
|
+
id: "transparentBgButton"
|
|
1248
|
+
}, {
|
|
1249
|
+
icon: b(() => [
|
|
1250
|
+
d(Ne, { name: "App" })
|
|
1251
|
+
]),
|
|
1252
|
+
default: b(() => [
|
|
1253
|
+
p[6] || (p[6] = Me(" 生成APP "))
|
|
1254
|
+
]),
|
|
1255
|
+
_: 1,
|
|
1256
|
+
__: [6]
|
|
1257
|
+
})) : de("", !0),
|
|
1258
|
+
a.showButton && l(te) === "view" ? (C(), G(x, {
|
|
1259
|
+
key: 1,
|
|
1260
|
+
id: "transparentBgButton",
|
|
1261
|
+
onClick: l(Jt)
|
|
1262
|
+
}, {
|
|
1263
|
+
icon: b(() => [
|
|
1264
|
+
d(Ne, { name: "write" })
|
|
1265
|
+
]),
|
|
1266
|
+
default: b(() => [
|
|
1267
|
+
p[7] || (p[7] = Me(" 修改布局 "))
|
|
1268
|
+
]),
|
|
1269
|
+
_: 1,
|
|
1270
|
+
__: [7]
|
|
1271
|
+
}, 8, ["onClick"])) : de("", !0),
|
|
1272
|
+
nt(k.$slots, "default", {}, void 0, !0),
|
|
1273
|
+
d(_, {
|
|
1274
|
+
size: 35,
|
|
1275
|
+
src: (ve = l(P)) == null ? void 0 : ve.avatarUrl
|
|
1276
|
+
}, {
|
|
1277
|
+
default: b(() => {
|
|
1278
|
+
var A;
|
|
1279
|
+
return [
|
|
1280
|
+
Me(je(((A = l(P)) == null ? void 0 : A.account) ?? "未知"), 1)
|
|
1281
|
+
];
|
|
1282
|
+
}),
|
|
1283
|
+
_: 1
|
|
1284
|
+
}, 8, ["src"])
|
|
1285
|
+
])
|
|
1286
|
+
];
|
|
1287
|
+
}),
|
|
1288
|
+
_: 3
|
|
1289
|
+
}),
|
|
1290
|
+
d(m, { class: "client-body" }, {
|
|
1291
|
+
default: b(() => [
|
|
1292
|
+
k.$route.path === "/" ? (C(), G(Q, {
|
|
1293
|
+
key: 0,
|
|
1294
|
+
class: "client-main"
|
|
1295
|
+
}, {
|
|
1296
|
+
default: b(() => {
|
|
1297
|
+
var ve;
|
|
1298
|
+
return [
|
|
1299
|
+
d(j, { class: "client-aside" }, {
|
|
1300
|
+
default: b(() => [
|
|
1301
|
+
d(_t, { mode: "vertical" })
|
|
1302
|
+
]),
|
|
1303
|
+
_: 1
|
|
1304
|
+
}),
|
|
1305
|
+
u("div", Ia, [
|
|
1306
|
+
(C(!0), X(St, null, Dt((ve = l(ot)(l(Be))) == null ? void 0 : ve.filter((A) => A.comp !== "FormTop"), (A, De) => {
|
|
1307
|
+
var J;
|
|
1308
|
+
return C(), X("div", {
|
|
1309
|
+
class: "item-view-content",
|
|
1310
|
+
key: De
|
|
1311
|
+
}, [
|
|
1312
|
+
((J = A == null ? void 0 : A.comp) == null ? void 0 : J.toUpperCase()) !== "TABLE" ? (C(), X("div", Va, je(A.name), 1)) : de("", !0),
|
|
1313
|
+
(C(), G(Xt(l(Qt)(A.comp)), {
|
|
1314
|
+
compName: A.name,
|
|
1315
|
+
itemData: A == null ? void 0 : A.compData,
|
|
1316
|
+
childItemData: A == null ? void 0 : A.itemChildData,
|
|
1317
|
+
key: (A == null ? void 0 : A.id) ?? De,
|
|
1318
|
+
onChange: l(oo),
|
|
1319
|
+
index: (A == null ? void 0 : A.id) ?? De,
|
|
1320
|
+
onContentChange: l(to),
|
|
1321
|
+
onPageChange: l(eo)
|
|
1322
|
+
}, null, 40, ["compName", "itemData", "childItemData", "onChange", "index", "onContentChange", "onPageChange"]))
|
|
1323
|
+
]);
|
|
1324
|
+
}), 128)),
|
|
1325
|
+
r.value ? (C(), X("div", Ya, [
|
|
1326
|
+
s.value ? (C(), G(st, {
|
|
1327
|
+
key: 0,
|
|
1328
|
+
class: "calculator-content",
|
|
1329
|
+
onClickTrigger: k.clickPreview,
|
|
1330
|
+
loading: i.value,
|
|
1331
|
+
modelValue: "预览"
|
|
1332
|
+
}, null, 8, ["onClickTrigger", "loading"])) : de("", !0),
|
|
1333
|
+
d(st, {
|
|
1334
|
+
class: "calculator-content",
|
|
1335
|
+
onClickTrigger: p[2] || (p[2] = (A) => k.showThreeContent()),
|
|
1336
|
+
loading: t.value,
|
|
1337
|
+
modelValue: "调用方法"
|
|
1338
|
+
}, null, 8, ["loading"])
|
|
1339
|
+
])) : de("", !0),
|
|
1340
|
+
n.value ? (C(), X("div", Ha, [
|
|
1341
|
+
d(st, {
|
|
1342
|
+
class: "calculator-content",
|
|
1343
|
+
modelValue: "执行方法",
|
|
1344
|
+
onClickTrigger: k.clickExecute,
|
|
1345
|
+
loading: oe.value
|
|
1346
|
+
}, null, 8, ["onClickTrigger", "loading"])
|
|
1347
|
+
])) : de("", !0)
|
|
1348
|
+
])
|
|
1349
|
+
];
|
|
1350
|
+
}),
|
|
1351
|
+
_: 1
|
|
1352
|
+
})) : (C(), G(Q, {
|
|
1353
|
+
key: 1,
|
|
1354
|
+
class: "client-main"
|
|
1355
|
+
}, {
|
|
1356
|
+
default: b(() => [
|
|
1357
|
+
d(j, { class: "client-aside" }, {
|
|
1358
|
+
default: b(() => [
|
|
1359
|
+
d(_t, { mode: "vertical" })
|
|
1360
|
+
]),
|
|
1361
|
+
_: 1
|
|
1362
|
+
}),
|
|
1363
|
+
u("div", Ka, [
|
|
1364
|
+
d(ie)
|
|
1365
|
+
])
|
|
1366
|
+
]),
|
|
1367
|
+
_: 1
|
|
1368
|
+
}))
|
|
1369
|
+
]),
|
|
1370
|
+
_: 1
|
|
1371
|
+
})
|
|
1372
|
+
]),
|
|
1373
|
+
_: 3
|
|
1374
|
+
})), [
|
|
1375
|
+
[Ie, l(I)]
|
|
1376
|
+
]);
|
|
1377
|
+
};
|
|
1378
|
+
}
|
|
1379
|
+
}), Xa = /* @__PURE__ */ Ke(Za, [["__scopeId", "data-v-b82fd32b"]]), O = [
|
|
1380
|
+
{
|
|
1381
|
+
key: "FitCurve_Eleven",
|
|
1382
|
+
value: "http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35326658522693",
|
|
1383
|
+
resources: "http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35326658522693",
|
|
1384
|
+
download: "http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35326658522693/outputResources"
|
|
1385
|
+
},
|
|
1386
|
+
{
|
|
1387
|
+
key: "MakeShape",
|
|
1388
|
+
value: "http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35018179530309",
|
|
1389
|
+
resources: "http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35018179530309",
|
|
1390
|
+
download: "http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35018179530309/outputResources"
|
|
1391
|
+
},
|
|
1392
|
+
{
|
|
1393
|
+
key: "FillEmpty",
|
|
1394
|
+
value: "http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35018289382469",
|
|
1395
|
+
resources: "http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35018289382469",
|
|
1396
|
+
download: "http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35018289382469/outputResources"
|
|
1397
|
+
},
|
|
1398
|
+
{
|
|
1399
|
+
key: "ToolPathFakeFast",
|
|
1400
|
+
value: "http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35484063607109",
|
|
1401
|
+
resources: "http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35484063607109",
|
|
1402
|
+
download: "http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35484063607109/outputResources"
|
|
1403
|
+
},
|
|
1404
|
+
{
|
|
1405
|
+
key: "FiveAxisCalculator",
|
|
1406
|
+
value: "http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35237389477957",
|
|
1407
|
+
resources: "http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35237389477957",
|
|
1408
|
+
download: "http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35237389477957/outputResources"
|
|
1409
|
+
},
|
|
1410
|
+
{
|
|
1411
|
+
key: "DetectionAlgorithm",
|
|
1412
|
+
value: "http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35459977498949",
|
|
1413
|
+
resources: "http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35459977498949",
|
|
1414
|
+
download: "http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35459977498949/outputResources"
|
|
1415
|
+
},
|
|
1416
|
+
{
|
|
1417
|
+
key: "FeatureSelectionAlgorithm_FFS",
|
|
1418
|
+
value: "http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35277984187973",
|
|
1419
|
+
resources: "http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35277984187973",
|
|
1420
|
+
download: "http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35277984187973/outputResources"
|
|
1421
|
+
},
|
|
1422
|
+
{
|
|
1423
|
+
key: "AIParameterOptimization",
|
|
1424
|
+
value: "http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35788169784389",
|
|
1425
|
+
resources: "http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35788169784389"
|
|
1426
|
+
}
|
|
1427
|
+
], Qe = [
|
|
1428
|
+
{
|
|
1429
|
+
key: "型线生成",
|
|
1430
|
+
value: "http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35326658522693/outputResources/sampling_points_20.cpt"
|
|
1431
|
+
},
|
|
1432
|
+
{
|
|
1433
|
+
key: "曲面生成",
|
|
1434
|
+
value: "http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35018179530309/outputResources/output.obj"
|
|
1435
|
+
},
|
|
1436
|
+
{
|
|
1437
|
+
key: "叶片生成",
|
|
1438
|
+
value: "http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35018289382469/outputResources/output_TwoSections_completed.obj"
|
|
1439
|
+
},
|
|
1440
|
+
{
|
|
1441
|
+
key: "轨迹规划",
|
|
1442
|
+
value: "http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35484063607109/outputResources/complete_data.txt"
|
|
1443
|
+
},
|
|
1444
|
+
{
|
|
1445
|
+
key: "加工规划",
|
|
1446
|
+
value: "http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35237389477957/outputResources/NC_BC.NC"
|
|
1447
|
+
},
|
|
1448
|
+
{
|
|
1449
|
+
key: "产品检测",
|
|
1450
|
+
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"
|
|
1451
|
+
},
|
|
1452
|
+
{
|
|
1453
|
+
key: "参数筛选训练方法",
|
|
1454
|
+
value: "http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35277984187973/outputResources/fitness_iteration.png"
|
|
1455
|
+
}
|
|
1456
|
+
// {
|
|
1457
|
+
// key: "参数筛选推理",
|
|
1458
|
+
// value: "http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35277984187973/outputResources/fitness_iteration.png"
|
|
1459
|
+
// }
|
|
1460
|
+
], Wa = { class: "structure-buttons" }, qa = { class: "structure-paths" }, Ga = { class: "client-header-user" }, Ja = { class: "model-select" }, Qa = { class: "model-show" }, es = { class: "model-fill" }, ts = { class: "client-header-logo" }, os = { class: "client-header-menu" }, as = { class: "client-header-user" }, ss = { class: "client-main-content" }, ns = {
|
|
1461
|
+
key: 0,
|
|
1462
|
+
class: "item-view-group"
|
|
1463
|
+
}, is = {
|
|
1464
|
+
key: 0,
|
|
1465
|
+
class: "calculator"
|
|
1466
|
+
}, ls = {
|
|
1467
|
+
key: 1,
|
|
1468
|
+
class: "calculator"
|
|
1469
|
+
}, rs = { class: "router-aside" }, cs = { class: "router-main" }, hs = /* @__PURE__ */ xt({
|
|
1470
|
+
__name: "index",
|
|
1471
|
+
props: {
|
|
1472
|
+
windowConfig: {
|
|
1473
|
+
type: Object,
|
|
1474
|
+
default: () => {
|
|
1475
|
+
}
|
|
1476
|
+
},
|
|
1477
|
+
showButton: {
|
|
1478
|
+
type: Boolean,
|
|
1479
|
+
default: !0
|
|
1480
|
+
}
|
|
1481
|
+
},
|
|
1482
|
+
setup(a) {
|
|
1483
|
+
const e = Ft(Fe), t = T(0), o = T(!1), { selectTitle: r } = Le(e), s = T(!1), i = T(!1), n = T(!1), h = Lo(Fe), P = T(!1), { tableShowThree: U } = Le(h), te = ao(), { loginUserInfo: ne } = Le(te), oe = wt(Fe), { isEdit: I } = Le(oe), K = yt(Fe), c = jo(Fe), { objUrl: k, blobUrls: p } = Le(c), x = T(null), _ = T(!0), y = T(!1), { importLoading: m, activeMenuPath: D, platName: V } = Le(K), j = T(!1);
|
|
1484
|
+
Se(() => D.value, async (g) => {
|
|
1485
|
+
g && (j.value = !0), Qe != null && Qe.find((f) => {
|
|
1486
|
+
var M;
|
|
1487
|
+
return (f == null ? void 0 : f.key) === ((M = g == null ? void 0 : g.split("/")) == null ? void 0 : M[(g == null ? void 0 : g.split("/").length) - 1]);
|
|
1488
|
+
}) ? P.value = !0 : P.value = !1;
|
|
1489
|
+
}, { immediate: !0 });
|
|
1490
|
+
const Q = async () => {
|
|
1491
|
+
var B, w, le, ce, E;
|
|
1492
|
+
y.value = !0;
|
|
1493
|
+
const g = sessionStorage.getItem("magicToken") === "" ? "123456" : sessionStorage.getItem("magicToken");
|
|
1494
|
+
let f = ((le = (w = (B = Qe == null ? void 0 : Qe.find((he) => {
|
|
1495
|
+
var Ce, _e, Re;
|
|
1496
|
+
return (he == null ? void 0 : he.key) === ((Re = (Ce = D.value) == null ? void 0 : Ce.split("/")) == null ? void 0 : Re[((_e = D.value) == null ? void 0 : _e.split("/").length) - 1]);
|
|
1497
|
+
})) == null ? void 0 : B.value) == null ? void 0 : w.split(",")) == null ? void 0 : le[0]) ?? "";
|
|
1498
|
+
const M = await ge.post(f, null, {
|
|
1499
|
+
responseType: "blob",
|
|
1500
|
+
// 必须设置
|
|
1501
|
+
headers: {
|
|
1502
|
+
Authorization: g,
|
|
1503
|
+
"Content-Type": "application/json"
|
|
1504
|
+
}
|
|
1505
|
+
}), $ = new Blob([M.data], {
|
|
1506
|
+
type: "application/octet-stream;charset=UTF-8"
|
|
1507
|
+
});
|
|
1508
|
+
let R = {
|
|
1509
|
+
suffix: "." + ((E = f == null ? void 0 : f.split(".")) == null ? void 0 : E[((ce = f == null ? void 0 : f.split(".")) == null ? void 0 : ce.length) - 1]),
|
|
1510
|
+
blob: $,
|
|
1511
|
+
mtlBlobs: []
|
|
1512
|
+
};
|
|
1513
|
+
y.value = !1, x.value.loadModelByDefaultPath([R]);
|
|
1514
|
+
}, ie = async (g) => {
|
|
1515
|
+
var $, R, B, w, le, ce, E;
|
|
1516
|
+
const f = ($ = g == null ? void 0 : g.split("/")) == null ? void 0 : $[0], M = await go({
|
|
1517
|
+
key: {
|
|
1518
|
+
type: "mainEquip",
|
|
1519
|
+
systemKey: sessionStorage.getItem("systemKey"),
|
|
1520
|
+
pageKey: f
|
|
1521
|
+
}
|
|
1522
|
+
});
|
|
1523
|
+
return ((R = M == null ? void 0 : M.data) == null ? void 0 : R.type) === "success" ? ((E = (ce = (le = (w = (B = M == null ? void 0 : M.data) == null ? void 0 : B.result) == null ? void 0 : w[0]) == null ? void 0 : le.value) == null ? void 0 : ce.tableData) == null ? void 0 : E.隐藏三维显示) !== !0 : !0;
|
|
1524
|
+
};
|
|
1525
|
+
Se(
|
|
1526
|
+
() => Be.value,
|
|
1527
|
+
() => {
|
|
1528
|
+
var g, f, M, $, R;
|
|
1529
|
+
if (((g = Be.value) == null ? void 0 : g.length) === 2 && ((f = Be.value) != null && f.find((B) => (B == null ? void 0 : B.name) === "输入")) && ((M = Be.value) != null && M.find((B) => (B == null ? void 0 : B.name) === "输出"))) {
|
|
1530
|
+
const B = ($ = Be.value) == null ? void 0 : $.find((w) => (w == null ? void 0 : w.name) === "输出");
|
|
1531
|
+
i.value = ((R = B == null ? void 0 : B.comp) == null ? void 0 : R.toUpperCase()) === "FORM", s.value = !0;
|
|
1532
|
+
} else
|
|
1533
|
+
s.value = !1, i.value = !1;
|
|
1534
|
+
},
|
|
1535
|
+
{ deep: !0, immediate: !0 }
|
|
1536
|
+
), Se(
|
|
1537
|
+
() => D.value,
|
|
1538
|
+
async () => {
|
|
1539
|
+
D.value && (_.value = await ie(D.value));
|
|
1540
|
+
},
|
|
1541
|
+
{ deep: !0, immediate: !0 }
|
|
1542
|
+
), Se(
|
|
1543
|
+
() => [k.value, x.value],
|
|
1544
|
+
() => {
|
|
1545
|
+
var g;
|
|
1546
|
+
((g = k.value) == null ? void 0 : g.length) > 0 && x.value && x.value.addModelsFromUrls(k.value);
|
|
1547
|
+
},
|
|
1548
|
+
{ immediate: !0, deep: !0 }
|
|
1549
|
+
), Se(
|
|
1550
|
+
() => p == null ? void 0 : p.value,
|
|
1551
|
+
async () => {
|
|
1552
|
+
var g, f, M, $;
|
|
1553
|
+
if (p != null && p.value && ((g = p == null ? void 0 : p.value) == null ? void 0 : g.length) > 0 && !P.value && !((f = Be.value) != null && f.find((R) => (R == null ? void 0 : R.name) === "输入") && ((M = Be.value) != null && M.find((R) => (R == null ? void 0 : R.name) === "输出")))) {
|
|
1554
|
+
let R = [];
|
|
1555
|
+
const B = await (($ = ot(p == null ? void 0 : p.value)) == null ? void 0 : $.map(async (w) => {
|
|
1556
|
+
var Ce, _e, Re, ue, S, Pe, Ee, Ue, Ve, Ye;
|
|
1557
|
+
let le, ce;
|
|
1558
|
+
const E = (_e = (Ce = w == null ? void 0 : w.blob) == null ? void 0 : Ce.split("undefined,")) == null ? void 0 : _e[1];
|
|
1559
|
+
let he = E == null ? void 0 : E.split(",");
|
|
1560
|
+
if ((he == null ? void 0 : he.length) > 1) {
|
|
1561
|
+
let Ae = await (he == null ? void 0 : he.map(async (ae) => {
|
|
1562
|
+
var W, lt, Oe, ye, z, Te;
|
|
1563
|
+
le = await ge.get(ae, {
|
|
1564
|
+
responseType: "blob",
|
|
1565
|
+
headers: {
|
|
1566
|
+
"Content-Type": "application/json"
|
|
1567
|
+
}
|
|
1568
|
+
});
|
|
1569
|
+
let pe = [];
|
|
1570
|
+
if (((W = w == null ? void 0 : w.mtlBlobs) == null ? void 0 : W.length) > 0) {
|
|
1571
|
+
let We = await ((lt = w == null ? void 0 : w.mtlBlobs) == null ? void 0 : lt.map(async (se) => {
|
|
1572
|
+
let He = await ge.get(se, {
|
|
1573
|
+
responseType: "blob",
|
|
1574
|
+
headers: {
|
|
1575
|
+
"Content-Type": "application/json"
|
|
1576
|
+
}
|
|
1577
|
+
});
|
|
1578
|
+
return pe.push(new Blob([He.data], {
|
|
1579
|
+
type: "application/octet-stream;charset=UTF-8"
|
|
1580
|
+
})), He;
|
|
1581
|
+
}));
|
|
1582
|
+
await Promise.all(We);
|
|
1583
|
+
}
|
|
1584
|
+
return ((ye = ae == null ? void 0 : ae.split(".")) == null ? void 0 : ye[((Oe = ae == null ? void 0 : ae.split(".")) == null ? void 0 : Oe.length) - 1]) !== "undefined" && R.push({
|
|
1585
|
+
suffix: "." + ((Te = ae == null ? void 0 : ae.split(".")) == null ? void 0 : Te[((z = ae == null ? void 0 : ae.split(".")) == null ? void 0 : z.length) - 1]),
|
|
1586
|
+
blob: new Blob([le.data], {
|
|
1587
|
+
type: "application/octet-stream;charset=UTF-8"
|
|
1588
|
+
}),
|
|
1589
|
+
mtlBlobs: pe
|
|
1590
|
+
}), le;
|
|
1591
|
+
}));
|
|
1592
|
+
await Promise.all(Ae);
|
|
1593
|
+
} else if (!(E != null && E.includes("https://")) && !(E != null && E.includes("http://"))) {
|
|
1594
|
+
le = await $t({
|
|
1595
|
+
url: E
|
|
1596
|
+
});
|
|
1597
|
+
let Ae = [];
|
|
1598
|
+
if (((Re = w == null ? void 0 : w.mtlBlobs) == null ? void 0 : Re.length) > 0) {
|
|
1599
|
+
let ae = await ((ue = w == null ? void 0 : w.mtlBlobs) == null ? void 0 : ue.map(async (pe) => {
|
|
1600
|
+
let W = await $t({
|
|
1601
|
+
url: pe
|
|
1602
|
+
});
|
|
1603
|
+
return Ae.push(new Blob([W.data], {
|
|
1604
|
+
type: "application/octet-stream;charset=UTF-8"
|
|
1605
|
+
})), W;
|
|
1606
|
+
}));
|
|
1607
|
+
await Promise.all(ae);
|
|
1608
|
+
}
|
|
1609
|
+
ce = {
|
|
1610
|
+
suffix: "." + ((Pe = E == null ? void 0 : E.split(".")) == null ? void 0 : Pe[((S = E == null ? void 0 : E.split(".")) == null ? void 0 : S.length) - 1]),
|
|
1611
|
+
blob: new Blob([le.data], {
|
|
1612
|
+
type: "application/octet-stream;charset=UTF-8"
|
|
1613
|
+
}),
|
|
1614
|
+
mtlBlobs: Ae
|
|
1615
|
+
};
|
|
1616
|
+
} else {
|
|
1617
|
+
le = await ge.get(E, {
|
|
1618
|
+
responseType: "blob",
|
|
1619
|
+
headers: {
|
|
1620
|
+
"Content-Type": "application/json"
|
|
1621
|
+
}
|
|
1622
|
+
});
|
|
1623
|
+
let Ae = [];
|
|
1624
|
+
if (((Ee = w == null ? void 0 : w.mtlBlobs) == null ? void 0 : Ee.length) > 0) {
|
|
1625
|
+
let ae = await ((Ue = w == null ? void 0 : w.mtlBlobs) == null ? void 0 : Ue.map(async (pe) => {
|
|
1626
|
+
let W = await ge.get(pe, {
|
|
1627
|
+
responseType: "blob",
|
|
1628
|
+
headers: {
|
|
1629
|
+
"Content-Type": "application/json"
|
|
1630
|
+
}
|
|
1631
|
+
});
|
|
1632
|
+
return Ae.push(new Blob([W.data], {
|
|
1633
|
+
type: "application/octet-stream;charset=UTF-8"
|
|
1634
|
+
})), W;
|
|
1635
|
+
}));
|
|
1636
|
+
await Promise.all(ae);
|
|
1637
|
+
}
|
|
1638
|
+
ce = {
|
|
1639
|
+
suffix: "." + ((Ye = E == null ? void 0 : E.split(".")) == null ? void 0 : Ye[((Ve = E == null ? void 0 : E.split(".")) == null ? void 0 : Ve.length) - 1]),
|
|
1640
|
+
blob: new Blob([le.data], {
|
|
1641
|
+
type: "application/octet-stream;charset=UTF-8"
|
|
1642
|
+
}),
|
|
1643
|
+
mtlBlobs: Ae
|
|
1644
|
+
};
|
|
1645
|
+
}
|
|
1646
|
+
ce && R.push(ce);
|
|
1647
|
+
}));
|
|
1648
|
+
await Promise.all(B), x.value.loadModelByDefaultPath(R);
|
|
1649
|
+
}
|
|
1650
|
+
},
|
|
1651
|
+
{ immediate: !0, deep: !0 }
|
|
1652
|
+
), Se(
|
|
1653
|
+
() => U.value,
|
|
1654
|
+
async () => {
|
|
1655
|
+
var f, M, $, R;
|
|
1656
|
+
if (U.value !== "" && U.value) {
|
|
1657
|
+
let B = (f = D.value) == null ? void 0 : f.split("/"), w = B[(B == null ? void 0 : B.length) - 2];
|
|
1658
|
+
const ce = (((M = O == null ? void 0 : O.find((_e) => (_e == null ? void 0 : _e.key) === w)) == null ? void 0 : M.download) ?? "") + "/" + U.value, E = sessionStorage.getItem("magicToken") === "" ? "123456" : sessionStorage.getItem("magicToken"), he = await ge.post(ce, null, {
|
|
1659
|
+
responseType: "blob",
|
|
1660
|
+
// 必须设置
|
|
1661
|
+
headers: {
|
|
1662
|
+
Authorization: E,
|
|
1663
|
+
baseURL: "http://139.196.154.85:20025",
|
|
1664
|
+
"Content-Type": "application/json"
|
|
1665
|
+
}
|
|
1666
|
+
});
|
|
1667
|
+
var g = new Blob([he.data], {
|
|
1668
|
+
type: "application/octet-stream;charset=UTF-8"
|
|
1669
|
+
});
|
|
1670
|
+
const Ce = [
|
|
1671
|
+
{
|
|
1672
|
+
suffix: "." + ((R = ($ = U.value) == null ? void 0 : $.split(".")) == null ? void 0 : R[1]),
|
|
1673
|
+
blob: g,
|
|
1674
|
+
mtlBlobs: []
|
|
1675
|
+
}
|
|
1676
|
+
];
|
|
1677
|
+
x.value.loadModelByDefaultPath(Ce);
|
|
1678
|
+
}
|
|
1679
|
+
},
|
|
1680
|
+
{ deep: !0, immediate: !0 }
|
|
1681
|
+
);
|
|
1682
|
+
const Ie = async () => {
|
|
1683
|
+
var le, ce, E, he, Ce, _e, Re, ue, S, Pe, Ee, Ue, Ve, Ye, Ae, ae, pe;
|
|
1684
|
+
o.value = !0;
|
|
1685
|
+
let g = (le = D.value) == null ? void 0 : le.split("/"), f = g[(g == null ? void 0 : g.length) - 2];
|
|
1686
|
+
const M = ((ce = O == null ? void 0 : O.find((W) => (W == null ? void 0 : W.key) === f)) == null ? void 0 : ce.value) ?? "";
|
|
1687
|
+
let $ = "";
|
|
1688
|
+
const R = await ge.post("http://139.196.154.85:20024/api/sysAuth/login", {
|
|
1689
|
+
account: "superadmin",
|
|
1690
|
+
password: "9bf00809059adc7f57bd290bf73ddf4d16f4c83b5937e2d68144ab0bd60d045d22d70afeed8f2fa071cda536e1fac0daf12b8e63dd870c3ca8b308f23be6e693bb32ebd3d013116dc8338d6854b1332701a522a7c43706a6db4162fbe991c8c08aa842fbbc34",
|
|
1691
|
+
codeId: 0,
|
|
1692
|
+
code: ""
|
|
1693
|
+
});
|
|
1694
|
+
((E = R == null ? void 0 : R.data) == null ? void 0 : E.code) === 200 && ($ = `Bearer ${(Ce = (he = R.data) == null ? void 0 : he.result) == null ? void 0 : Ce.accessToken}`, sessionStorage.setItem("magicToken", $));
|
|
1695
|
+
const B = $ === "" ? "123456" : $, w = await ge.post(M, null, {
|
|
1696
|
+
headers: {
|
|
1697
|
+
Authorization: B,
|
|
1698
|
+
baseURL: "http://139.196.154.85:20025",
|
|
1699
|
+
"Content-Type": "multipart/form-data"
|
|
1700
|
+
}
|
|
1701
|
+
});
|
|
1702
|
+
if (((_e = w == null ? void 0 : w.data) == null ? void 0 : _e.type) === "success" && Ut((ue = (Re = w == null ? void 0 : w.data) == null ? void 0 : Re.result) == null ? void 0 : ue.result)) {
|
|
1703
|
+
const W = (Ve = (Ue = (Ee = JSON.parse((Pe = (S = w == null ? void 0 : w.data) == null ? void 0 : S.result) == null ? void 0 : Pe.result)) == null ? void 0 : Ee.lines_file_paths) == null ? void 0 : Ue[0]) == null ? void 0 : Ve.split("\\"), Oe = (((Ye = O == null ? void 0 : O.find((z) => (z == null ? void 0 : z.key) === f)) == null ? void 0 : Ye.resources) ?? "") + "/" + (((W == null ? void 0 : W[(W == null ? void 0 : W.length) - 2]) === "inputResources" ? "outputResources" : W == null ? void 0 : W[(W == null ? void 0 : W.length) - 2]) ?? "outputResources"), ye = await ge.post(Oe, null, {
|
|
1704
|
+
headers: {
|
|
1705
|
+
Authorization: B,
|
|
1706
|
+
baseURL: "http://139.196.154.85:20025",
|
|
1707
|
+
"Content-Type": "multipart/form-data"
|
|
1708
|
+
}
|
|
1709
|
+
});
|
|
1710
|
+
if (((Ae = ye == null ? void 0 : ye.data) == null ? void 0 : Ae.type) === "success") {
|
|
1711
|
+
const z = (ae = ye == null ? void 0 : ye.data) == null ? void 0 : ae.result, Te = Be.value, We = await ((pe = ot(Te)) == null ? void 0 : pe.map(async (se) => {
|
|
1712
|
+
var He, rt, ct, we, Z, $e;
|
|
1713
|
+
if ((se == null ? void 0 : se.name) === "输出") {
|
|
1714
|
+
if ((se == null ? void 0 : se.comp) === "Table")
|
|
1715
|
+
se.compData = (He = se == null ? void 0 : se.compData) == null ? void 0 : He.map((L) => {
|
|
1716
|
+
var q, ke;
|
|
1717
|
+
return (L == null ? void 0 : L.key) === "tableContents" && (L.contents = (ke = (q = L == null ? void 0 : L.contents) == null ? void 0 : q.map((re) => (re = re == null ? void 0 : re.map((N, be) => {
|
|
1718
|
+
var me, Ze, qe;
|
|
1719
|
+
return typeof N == "string" && be > 1 ? ((me = L == null ? void 0 : L.contents) == null ? void 0 : me.length) > 1 ? N = ((Ze = z == null ? void 0 : z[be - 1]) != null && Ze.includes("input") ? N : z == null ? void 0 : z[be - 1]) ?? N : N = z == null ? void 0 : z[0] : N = ((qe = z == null ? void 0 : z[be - 1]) != null && qe.includes("input") ? N : z == null ? void 0 : z[be - 1]) ?? N, N;
|
|
1720
|
+
}), re))) == null ? void 0 : ke.filter((re, N) => N <= (z == null ? void 0 : z.length) - 1)), L;
|
|
1721
|
+
});
|
|
1722
|
+
else if ((se == null ? void 0 : se.comp) === "Form") {
|
|
1723
|
+
let L = "";
|
|
1724
|
+
if (z == null || z.forEach((q) => {
|
|
1725
|
+
L = L === "" ? L + q : L + "," + q;
|
|
1726
|
+
}), se.compData = (rt = se == null ? void 0 : se.compData) == null ? void 0 : rt.map((q) => {
|
|
1727
|
+
var ke;
|
|
1728
|
+
return (q == null ? void 0 : q.key) === "formContent" && (q.contents = (ke = q.contents) == null ? void 0 : ke.map((re) => (re.value = L, re))), q;
|
|
1729
|
+
}), (ct = L == null ? void 0 : L.split(",")) != null && ct.find((q) => q.includes(".obj"))) {
|
|
1730
|
+
let q = {};
|
|
1731
|
+
q.suffix = ".obj";
|
|
1732
|
+
const ke = [];
|
|
1733
|
+
let re = await ((Z = (we = L == null ? void 0 : L.split(",")) == null ? void 0 : we.filter((N) => N.includes(".obj") || N.includes(".mtl"))) == null ? void 0 : Z.map(async (N) => {
|
|
1734
|
+
var me, Ze;
|
|
1735
|
+
if (N.includes(".obj")) {
|
|
1736
|
+
const ht = (((me = O == null ? void 0 : O.find((Xe) => (Xe == null ? void 0 : Xe.key) === f)) == null ? void 0 : me.download) ?? "") + "/" + N, Ge = sessionStorage.getItem("magicToken") === "" ? "123456" : sessionStorage.getItem("magicToken"), Je = await ge.post(ht, null, {
|
|
1737
|
+
responseType: "blob",
|
|
1738
|
+
// 必须设置
|
|
1739
|
+
headers: {
|
|
1740
|
+
Authorization: Ge,
|
|
1741
|
+
baseURL: "http://139.196.154.85:20025",
|
|
1742
|
+
"Content-Type": "application/json"
|
|
1743
|
+
}
|
|
1744
|
+
});
|
|
1745
|
+
var be = new Blob([Je.data], {
|
|
1746
|
+
type: "application/octet-stream;charset=UTF-8"
|
|
1747
|
+
});
|
|
1748
|
+
q.blob = be;
|
|
1749
|
+
} else if (N.includes(".mtl")) {
|
|
1750
|
+
const ht = (((Ze = O == null ? void 0 : O.find((Ct) => (Ct == null ? void 0 : Ct.key) === f)) == null ? void 0 : Ze.download) ?? "") + "/" + N, Ge = sessionStorage.getItem("magicToken") === "" ? "123456" : sessionStorage.getItem("magicToken"), Je = await ge.post(ht, null, {
|
|
1751
|
+
responseType: "blob",
|
|
1752
|
+
// 必须设置
|
|
1753
|
+
headers: {
|
|
1754
|
+
Authorization: Ge,
|
|
1755
|
+
baseURL: "http://139.196.154.85:20025",
|
|
1756
|
+
"Content-Type": "application/json"
|
|
1757
|
+
}
|
|
1758
|
+
});
|
|
1759
|
+
var be = new Blob([Je.data], {
|
|
1760
|
+
type: "application/octet-stream;charset=UTF-8"
|
|
1761
|
+
});
|
|
1762
|
+
ke.push(be);
|
|
1763
|
+
}
|
|
1764
|
+
}));
|
|
1765
|
+
await Promise.all(re), q.mtlBlobs = ke, x.value.loadModelByDefaultPath([q]);
|
|
1766
|
+
} else {
|
|
1767
|
+
const q = [];
|
|
1768
|
+
let ke = await (($e = L == null ? void 0 : L.split(",")) == null ? void 0 : $e.map(async (re) => {
|
|
1769
|
+
var Ge, Je;
|
|
1770
|
+
let N = {};
|
|
1771
|
+
N.suffix = "." + ((Ge = re == null ? void 0 : re.split(".")) == null ? void 0 : Ge[1]);
|
|
1772
|
+
const me = (((Je = O == null ? void 0 : O.find((Xe) => (Xe == null ? void 0 : Xe.key) === f)) == null ? void 0 : Je.download) ?? "") + "/" + re, Ze = sessionStorage.getItem("magicToken") === "" ? "123456" : sessionStorage.getItem("magicToken"), qe = await ge.post(me, null, {
|
|
1773
|
+
responseType: "blob",
|
|
1774
|
+
// 必须设置
|
|
1775
|
+
headers: {
|
|
1776
|
+
Authorization: Ze,
|
|
1777
|
+
baseURL: "http://139.196.154.85:20025",
|
|
1778
|
+
"Content-Type": "application/json"
|
|
1779
|
+
}
|
|
1780
|
+
});
|
|
1781
|
+
var ht = new Blob([qe.data], {
|
|
1782
|
+
type: "application/octet-stream;charset=UTF-8"
|
|
1783
|
+
});
|
|
1784
|
+
N.blob = ht, q.push(N);
|
|
1785
|
+
}));
|
|
1786
|
+
await Promise.all(ke), x.value.loadModelByDefaultPath(q);
|
|
1787
|
+
}
|
|
1788
|
+
}
|
|
1789
|
+
}
|
|
1790
|
+
return se;
|
|
1791
|
+
}));
|
|
1792
|
+
Be.value = await Promise.all(We);
|
|
1793
|
+
}
|
|
1794
|
+
}
|
|
1795
|
+
t.value++, o.value = !1;
|
|
1796
|
+
}, ve = T(""), A = T("open"), De = T("open"), J = T(!1), v = () => {
|
|
1797
|
+
const g = document.getElementById("menuCollapse");
|
|
1798
|
+
A.value === "open" ? (g.style.width = "18.75rem", g.style.height = "96%", g.style.overflow = "auto") : (g.style.width = "50px", g.style.height = "50px", g.style.overflow = "hidden");
|
|
1799
|
+
}, Y = () => {
|
|
1800
|
+
const g = document.getElementById("operateCollapse");
|
|
1801
|
+
De.value === "open" ? (g.style.width = "25rem", g.style.height = "96%", g.style.overflow = "auto") : (g.style.width = "50px", g.style.height = "50px", g.style.overflow = "hidden");
|
|
1802
|
+
}, bt = () => {
|
|
1803
|
+
J.value = !J.value;
|
|
1804
|
+
const g = document.getElementById("operateCollapse"), f = document.getElementById("menuCollapse");
|
|
1805
|
+
J.value ? (f.style.width = "18.75rem", g.style.width = "calc(100% - 24rem)") : g.style.width = "400px";
|
|
1806
|
+
}, it = (g) => {
|
|
1807
|
+
const f = URL.createObjectURL(g), M = document.createElement("a");
|
|
1808
|
+
M.href = f, M.download = "file.txt", document.body.appendChild(M), M.click(), document.body.removeChild(M), URL.revokeObjectURL(f), n.value = !1;
|
|
1809
|
+
}, vt = async () => {
|
|
1810
|
+
var le, ce, E, he, Ce, _e, Re, ue, S, Pe, Ee, Ue, Ve, Ye, Ae, ae;
|
|
1811
|
+
n.value = !0;
|
|
1812
|
+
let g = (le = D.value) == null ? void 0 : le.split("/"), f = g[(g == null ? void 0 : g.length) - 2];
|
|
1813
|
+
const M = ((ce = O == null ? void 0 : O.find((pe) => (pe == null ? void 0 : pe.key) === f)) == null ? void 0 : ce.value) ?? "";
|
|
1814
|
+
let $ = "";
|
|
1815
|
+
const R = await ge.post("http://139.196.154.85:20024/api/sysAuth/login", {
|
|
1816
|
+
account: "superadmin",
|
|
1817
|
+
password: "9bf00809059adc7f57bd290bf73ddf4d16f4c83b5937e2d68144ab0bd60d045d22d70afeed8f2fa071cda536e1fac0daf12b8e63dd870c3ca8b308f23be6e693bb32ebd3d013116dc8338d6854b1332701a522a7c43706a6db4162fbe991c8c08aa842fbbc34",
|
|
1818
|
+
codeId: 0,
|
|
1819
|
+
code: ""
|
|
1820
|
+
});
|
|
1821
|
+
if (((E = R == null ? void 0 : R.data) == null ? void 0 : E.code) === 200)
|
|
1822
|
+
$ = `Bearer ${(Ce = (he = R.data) == null ? void 0 : he.result) == null ? void 0 : Ce.accessToken}`, sessionStorage.setItem("magicToken", $);
|
|
1823
|
+
else
|
|
1824
|
+
throw kt.error("响应出错了"), new Error("响应出错了");
|
|
1825
|
+
const B = $ === "" ? "123456" : $, w = await ge.post(M, null, {
|
|
1826
|
+
headers: {
|
|
1827
|
+
Authorization: B,
|
|
1828
|
+
baseURL: "http://139.196.154.85:20025",
|
|
1829
|
+
"Content-Type": "multipart/form-data"
|
|
1830
|
+
}
|
|
1831
|
+
});
|
|
1832
|
+
if (((_e = w == null ? void 0 : w.data) == null ? void 0 : _e.code) === 200) {
|
|
1833
|
+
if (Ut((ue = (Re = w == null ? void 0 : w.data) == null ? void 0 : Re.result) == null ? void 0 : ue.result)) {
|
|
1834
|
+
const pe = (Ve = (Ue = (Ee = JSON.parse((Pe = (S = w == null ? void 0 : w.data) == null ? void 0 : S.result) == null ? void 0 : Pe.result)) == null ? void 0 : Ee.lines_file_paths) == null ? void 0 : Ue[0]) == null ? void 0 : Ve.split("\\"), lt = (((Ye = O == null ? void 0 : O.find((ye) => (ye == null ? void 0 : ye.key) === f)) == null ? void 0 : Ye.resources) ?? "") + "/" + ((pe == null ? void 0 : pe[(pe == null ? void 0 : pe.length) - 2]) ?? "outputResources"), Oe = await ge.post(lt, null, {
|
|
1835
|
+
headers: {
|
|
1836
|
+
Authorization: B,
|
|
1837
|
+
baseURL: "http://139.196.154.85:20025",
|
|
1838
|
+
"Content-Type": "multipart/form-data"
|
|
1839
|
+
}
|
|
1840
|
+
});
|
|
1841
|
+
if (((Ae = Oe == null ? void 0 : Oe.data) == null ? void 0 : Ae.code) === 200) {
|
|
1842
|
+
const ye = (ae = Oe == null ? void 0 : Oe.data) == null ? void 0 : ae.result, z = ot(Be.value);
|
|
1843
|
+
z == null || z.map(async (Te) => {
|
|
1844
|
+
var We, se, He, rt, ct;
|
|
1845
|
+
if ((Te == null ? void 0 : Te.name) === "输出" && (Te == null ? void 0 : Te.comp) === "Form") {
|
|
1846
|
+
let we = "";
|
|
1847
|
+
ye == null || ye.forEach((Z) => {
|
|
1848
|
+
we = we === "" ? we + Z : we + "," + Z;
|
|
1849
|
+
}), Te.compData = (We = Te == null ? void 0 : Te.compData) == null ? void 0 : We.map((Z) => {
|
|
1850
|
+
var $e;
|
|
1851
|
+
return (Z == null ? void 0 : Z.key) === "formContent" && (Z.contents = ($e = Z.contents) == null ? void 0 : $e.map((L) => (L.value = we, L))), Z;
|
|
1852
|
+
}), (se = we == null ? void 0 : we.split(",")) != null && se.find((Z) => Z.includes(".obj")) ? (rt = (He = we == null ? void 0 : we.split(",")) == null ? void 0 : He.filter((Z) => Z.includes(".obj") || Z.includes(".mtl"))) == null || rt.map(async (Z) => {
|
|
1853
|
+
var $e, L;
|
|
1854
|
+
if (Z.includes(".obj")) {
|
|
1855
|
+
const ke = ((($e = O == null ? void 0 : O.find((me) => (me == null ? void 0 : me.key) === f)) == null ? void 0 : $e.download) ?? "") + "/" + Z, re = sessionStorage.getItem("magicToken") === "" ? "123456" : sessionStorage.getItem("magicToken"), N = await ge.post(ke, null, {
|
|
1856
|
+
responseType: "blob",
|
|
1857
|
+
// 必须设置
|
|
1858
|
+
headers: {
|
|
1859
|
+
Authorization: re,
|
|
1860
|
+
baseURL: "http://139.196.154.85:20025",
|
|
1861
|
+
"Content-Type": "application/json"
|
|
1862
|
+
}
|
|
1863
|
+
});
|
|
1864
|
+
let be = new Blob([N.data], {
|
|
1865
|
+
type: "application/octet-stream;charset=UTF-8"
|
|
1866
|
+
});
|
|
1867
|
+
it(be);
|
|
1868
|
+
} else if (Z.includes(".mtl")) {
|
|
1869
|
+
const ke = (((L = O == null ? void 0 : O.find((me) => (me == null ? void 0 : me.key) === f)) == null ? void 0 : L.download) ?? "") + "/" + Z, re = sessionStorage.getItem("magicToken") === "" ? "123456" : sessionStorage.getItem("magicToken"), N = await ge.post(ke, null, {
|
|
1870
|
+
responseType: "blob",
|
|
1871
|
+
// 必须设置
|
|
1872
|
+
headers: {
|
|
1873
|
+
Authorization: re,
|
|
1874
|
+
baseURL: "http://139.196.154.85:20025",
|
|
1875
|
+
"Content-Type": "application/json"
|
|
1876
|
+
}
|
|
1877
|
+
});
|
|
1878
|
+
let be = new Blob([N.data], {
|
|
1879
|
+
type: "application/octet-stream;charset=UTF-8"
|
|
1880
|
+
});
|
|
1881
|
+
it(be);
|
|
1882
|
+
}
|
|
1883
|
+
}) : (ct = we == null ? void 0 : we.split(",")) == null || ct.map(async (Z) => {
|
|
1884
|
+
var N, be;
|
|
1885
|
+
"" + ((N = Z == null ? void 0 : Z.split(".")) == null ? void 0 : N[1]);
|
|
1886
|
+
const L = (((be = O == null ? void 0 : O.find((me) => (me == null ? void 0 : me.key) === f)) == null ? void 0 : be.download) ?? "") + "/" + Z, q = sessionStorage.getItem("magicToken") === "" ? "123456" : sessionStorage.getItem("magicToken"), ke = await ge.post(L, null, {
|
|
1887
|
+
responseType: "blob",
|
|
1888
|
+
// 必须设置
|
|
1889
|
+
headers: {
|
|
1890
|
+
Authorization: q,
|
|
1891
|
+
baseURL: "http://139.196.154.85:20025",
|
|
1892
|
+
"Content-Type": "application/json"
|
|
1893
|
+
}
|
|
1894
|
+
});
|
|
1895
|
+
let re = new Blob([ke.data], {
|
|
1896
|
+
type: "application/octet-stream;charset=UTF-8"
|
|
1897
|
+
});
|
|
1898
|
+
it(re);
|
|
1899
|
+
});
|
|
1900
|
+
}
|
|
1901
|
+
});
|
|
1902
|
+
} else
|
|
1903
|
+
throw kt.error("响应出错了"), new Error("响应出错了");
|
|
1904
|
+
}
|
|
1905
|
+
} else
|
|
1906
|
+
throw kt.error("响应出错了"), new Error("响应出错了");
|
|
1907
|
+
};
|
|
1908
|
+
return (g, f) => {
|
|
1909
|
+
const M = ee("el-button"), $ = ee("el-avatar"), R = ee("el-header"), B = ee("el-container"), w = ee("el-icon"), le = ee("el-input"), ce = ee("el-aside"), E = ee("el-collapse-item"), he = ee("el-collapse"), Ce = ee("el-main"), _e = ee("router-view"), Re = Zt("loading");
|
|
1910
|
+
return l(I) === "edit" ? (C(), G(B, {
|
|
1911
|
+
key: 0,
|
|
1912
|
+
class: "client-container"
|
|
1913
|
+
}, {
|
|
1914
|
+
default: b(() => [
|
|
1915
|
+
d(R, { class: "client-structure-header" }, {
|
|
1916
|
+
default: b(() => {
|
|
1917
|
+
var ue;
|
|
1918
|
+
return [
|
|
1919
|
+
u("div", Wa, [
|
|
1920
|
+
d(M, {
|
|
1921
|
+
id: "transparentBgButton",
|
|
1922
|
+
onClick: l(Wt)
|
|
1923
|
+
}, {
|
|
1924
|
+
default: b(() => f[5] || (f[5] = [
|
|
1925
|
+
Me(" 返回页面 ")
|
|
1926
|
+
])),
|
|
1927
|
+
_: 1,
|
|
1928
|
+
__: [5]
|
|
1929
|
+
}, 8, ["onClick"]),
|
|
1930
|
+
d(M, {
|
|
1931
|
+
id: "transparentBgButton",
|
|
1932
|
+
onClick: f[0] || (f[0] = (S) => {
|
|
1933
|
+
var Pe, Ee;
|
|
1934
|
+
return l(qt)((Ee = (Pe = l(r)) == null ? void 0 : Pe.map((Ue) => Ue.value)) == null ? void 0 : Ee.join("/"));
|
|
1935
|
+
})
|
|
1936
|
+
}, {
|
|
1937
|
+
icon: b(() => [
|
|
1938
|
+
d(Ne, { name: "Store" })
|
|
1939
|
+
]),
|
|
1940
|
+
default: b(() => [
|
|
1941
|
+
f[6] || (f[6] = Me(" 保存页面 "))
|
|
1942
|
+
]),
|
|
1943
|
+
_: 1,
|
|
1944
|
+
__: [6]
|
|
1945
|
+
})
|
|
1946
|
+
]),
|
|
1947
|
+
u("div", qa, [
|
|
1948
|
+
(C(), G(ro, {
|
|
1949
|
+
key: l(r),
|
|
1950
|
+
breadArray: l(r),
|
|
1951
|
+
onClick: l(Gt)
|
|
1952
|
+
}, null, 8, ["breadArray", "onClick"]))
|
|
1953
|
+
]),
|
|
1954
|
+
u("div", Ga, [
|
|
1955
|
+
nt(g.$slots, "default", {}, void 0, !0),
|
|
1956
|
+
d($, {
|
|
1957
|
+
size: 35,
|
|
1958
|
+
src: (ue = l(ne)) == null ? void 0 : ue.avatarUrl
|
|
1959
|
+
}, {
|
|
1960
|
+
default: b(() => {
|
|
1961
|
+
var S;
|
|
1962
|
+
return [
|
|
1963
|
+
Me(je(((S = l(ne)) == null ? void 0 : S.account) ?? "未知"), 1)
|
|
1964
|
+
];
|
|
1965
|
+
}),
|
|
1966
|
+
_: 1
|
|
1967
|
+
}, 8, ["src"])
|
|
1968
|
+
])
|
|
1969
|
+
];
|
|
1970
|
+
}),
|
|
1971
|
+
_: 3
|
|
1972
|
+
}),
|
|
1973
|
+
l(I) === "edit" ? (C(), G(B, {
|
|
1974
|
+
key: 0,
|
|
1975
|
+
class: "model-operate",
|
|
1976
|
+
style: { "margin-top": "10px", height: "0px" }
|
|
1977
|
+
}, {
|
|
1978
|
+
default: b(() => [
|
|
1979
|
+
u("div", Ja, [
|
|
1980
|
+
d(Rt)
|
|
1981
|
+
]),
|
|
1982
|
+
u("div", Qa, [
|
|
1983
|
+
d(At)
|
|
1984
|
+
]),
|
|
1985
|
+
u("div", es, [
|
|
1986
|
+
d(Bt)
|
|
1987
|
+
])
|
|
1988
|
+
]),
|
|
1989
|
+
_: 1
|
|
1990
|
+
})) : de("", !0)
|
|
1991
|
+
]),
|
|
1992
|
+
_: 3
|
|
1993
|
+
})) : et((C(), G(B, {
|
|
1994
|
+
key: 1,
|
|
1995
|
+
class: "client-container",
|
|
1996
|
+
"element-loading-text": "正在加载页面数据..."
|
|
1997
|
+
}, {
|
|
1998
|
+
default: b(() => [
|
|
1999
|
+
d(R, { class: "client-header" }, {
|
|
2000
|
+
default: b(() => {
|
|
2001
|
+
var ue;
|
|
2002
|
+
return [
|
|
2003
|
+
u("div", ts, [
|
|
2004
|
+
d(Ne, {
|
|
2005
|
+
name: "logo",
|
|
2006
|
+
style: { width: "clamp(18px, 1.5rem, 24px)", height: "clamp(18px, 1.5rem, 24px)", "margin-right": "8px" }
|
|
2007
|
+
}),
|
|
2008
|
+
Me(" " + je(l(V) === "" ? "CPMPIP" : l(V)), 1)
|
|
2009
|
+
]),
|
|
2010
|
+
u("div", os, [
|
|
2011
|
+
d(lo, { mode: "horizontal" })
|
|
2012
|
+
]),
|
|
2013
|
+
u("div", as, [
|
|
2014
|
+
d(le, {
|
|
2015
|
+
modelValue: ve.value,
|
|
2016
|
+
"onUpdate:modelValue": f[1] || (f[1] = (S) => ve.value = S),
|
|
2017
|
+
clearable: "",
|
|
2018
|
+
placeholder: "搜索",
|
|
2019
|
+
style: { width: "130px" }
|
|
2020
|
+
}, {
|
|
2021
|
+
prefix: b(() => [
|
|
2022
|
+
d(w, { class: "el-input__icon" }, {
|
|
2023
|
+
default: b(() => [
|
|
2024
|
+
d(l(no))
|
|
2025
|
+
]),
|
|
2026
|
+
_: 1
|
|
2027
|
+
})
|
|
2028
|
+
]),
|
|
2029
|
+
_: 1
|
|
2030
|
+
}, 8, ["modelValue"]),
|
|
2031
|
+
a.showButton ? (C(), G(M, {
|
|
2032
|
+
key: 0,
|
|
2033
|
+
id: "transparentBgButton"
|
|
2034
|
+
}, {
|
|
2035
|
+
icon: b(() => [
|
|
2036
|
+
d(Ne, { name: "App" })
|
|
2037
|
+
]),
|
|
2038
|
+
default: b(() => [
|
|
2039
|
+
f[7] || (f[7] = Me(" 生成APP "))
|
|
2040
|
+
]),
|
|
2041
|
+
_: 1,
|
|
2042
|
+
__: [7]
|
|
2043
|
+
})) : de("", !0),
|
|
2044
|
+
a.showButton && l(I) === "view" ? (C(), G(M, {
|
|
2045
|
+
key: 1,
|
|
2046
|
+
id: "transparentBgButton",
|
|
2047
|
+
onClick: l(Jt)
|
|
2048
|
+
}, {
|
|
2049
|
+
icon: b(() => [
|
|
2050
|
+
d(Ne, { name: "write" })
|
|
2051
|
+
]),
|
|
2052
|
+
default: b(() => [
|
|
2053
|
+
f[8] || (f[8] = Me(" 修改布局 "))
|
|
2054
|
+
]),
|
|
2055
|
+
_: 1,
|
|
2056
|
+
__: [8]
|
|
2057
|
+
}, 8, ["onClick"])) : de("", !0),
|
|
2058
|
+
nt(g.$slots, "default", {}, void 0, !0),
|
|
2059
|
+
d($, {
|
|
2060
|
+
size: 35,
|
|
2061
|
+
src: (ue = l(ne)) == null ? void 0 : ue.avatarUrl
|
|
2062
|
+
}, {
|
|
2063
|
+
default: b(() => {
|
|
2064
|
+
var S;
|
|
2065
|
+
return [
|
|
2066
|
+
Me(je(((S = l(ne)) == null ? void 0 : S.account) ?? "未知"), 1)
|
|
2067
|
+
];
|
|
2068
|
+
}),
|
|
2069
|
+
_: 1
|
|
2070
|
+
}, 8, ["src"])
|
|
2071
|
+
])
|
|
2072
|
+
];
|
|
2073
|
+
}),
|
|
2074
|
+
_: 3
|
|
2075
|
+
}),
|
|
2076
|
+
d(B, { class: "client-body" }, {
|
|
2077
|
+
default: b(() => [
|
|
2078
|
+
g.$route.path === "/" ? (C(), G(Ce, {
|
|
2079
|
+
key: 0,
|
|
2080
|
+
class: "client-main"
|
|
2081
|
+
}, {
|
|
2082
|
+
default: b(() => [
|
|
2083
|
+
d(he, {
|
|
2084
|
+
modelValue: A.value,
|
|
2085
|
+
"onUpdate:modelValue": f[2] || (f[2] = (ue) => A.value = ue),
|
|
2086
|
+
accordion: "",
|
|
2087
|
+
class: "client-aside",
|
|
2088
|
+
id: "menuCollapse",
|
|
2089
|
+
onChange: v
|
|
2090
|
+
}, {
|
|
2091
|
+
default: b(() => [
|
|
2092
|
+
d(E, { name: "open" }, {
|
|
2093
|
+
icon: b(() => [
|
|
2094
|
+
d(Ne, {
|
|
2095
|
+
name: A.value === "" ? "Right" : "Left",
|
|
2096
|
+
style: { width: "20px", height: "20px" }
|
|
2097
|
+
}, null, 8, ["name"])
|
|
2098
|
+
]),
|
|
2099
|
+
default: b(() => [
|
|
2100
|
+
d(ce, { style: { width: "100%" } }, {
|
|
2101
|
+
default: b(() => [
|
|
2102
|
+
d(_t, { mode: "vertical" })
|
|
2103
|
+
]),
|
|
2104
|
+
_: 1
|
|
2105
|
+
})
|
|
2106
|
+
]),
|
|
2107
|
+
_: 1
|
|
2108
|
+
})
|
|
2109
|
+
]),
|
|
2110
|
+
_: 1
|
|
2111
|
+
}, 8, ["modelValue"]),
|
|
2112
|
+
u("div", ss, [
|
|
2113
|
+
d(Ea, {
|
|
2114
|
+
isShow: j.value,
|
|
2115
|
+
windowConfig: a.windowConfig,
|
|
2116
|
+
ref_key: "threeModelRef",
|
|
2117
|
+
ref: x
|
|
2118
|
+
}, null, 8, ["isShow", "windowConfig"])
|
|
2119
|
+
]),
|
|
2120
|
+
d(he, {
|
|
2121
|
+
modelValue: De.value,
|
|
2122
|
+
"onUpdate:modelValue": f[4] || (f[4] = (ue) => De.value = ue),
|
|
2123
|
+
accordion: "",
|
|
2124
|
+
class: "client-main-operate",
|
|
2125
|
+
id: "operateCollapse",
|
|
2126
|
+
onChange: Y
|
|
2127
|
+
}, {
|
|
2128
|
+
default: b(() => [
|
|
2129
|
+
d(E, { name: "open" }, {
|
|
2130
|
+
icon: b(() => [
|
|
2131
|
+
d(Ne, {
|
|
2132
|
+
name: De.value === "open" ? "Right" : "Left",
|
|
2133
|
+
style: { width: "20px", height: "20px" }
|
|
2134
|
+
}, null, 8, ["name"])
|
|
2135
|
+
]),
|
|
2136
|
+
default: b(() => {
|
|
2137
|
+
var ue;
|
|
2138
|
+
return [
|
|
2139
|
+
u("div", null, [
|
|
2140
|
+
d(Ne, {
|
|
2141
|
+
class: "fold-icon",
|
|
2142
|
+
name: J.value ? "Right" : "Left",
|
|
2143
|
+
onClick: bt
|
|
2144
|
+
}, null, 8, ["name"]),
|
|
2145
|
+
(C(!0), X(St, null, Dt((ue = l(ot)(l(Be))) == null ? void 0 : ue.filter((S) => S.comp !== "FormTop"), (S, Pe) => {
|
|
2146
|
+
var Ee;
|
|
2147
|
+
return C(), X("div", {
|
|
2148
|
+
class: "item-view-content",
|
|
2149
|
+
key: Pe
|
|
2150
|
+
}, [
|
|
2151
|
+
((Ee = S == null ? void 0 : S.comp) == null ? void 0 : Ee.toUpperCase()) !== "TABLE" ? (C(), X("div", ns, je(S.name), 1)) : de("", !0),
|
|
2152
|
+
(C(), G(Xt(l(Qt)(S.comp)), {
|
|
2153
|
+
compName: S.name,
|
|
2154
|
+
itemData: S == null ? void 0 : S.compData,
|
|
2155
|
+
childItemData: S == null ? void 0 : S.itemChildData,
|
|
2156
|
+
key: (S == null ? void 0 : S.id) ?? Pe,
|
|
2157
|
+
onChange: l(oo),
|
|
2158
|
+
index: (S == null ? void 0 : S.id) ?? Pe,
|
|
2159
|
+
onContentChange: l(to),
|
|
2160
|
+
onPageChange: l(eo)
|
|
2161
|
+
}, null, 40, ["compName", "itemData", "childItemData", "onChange", "index", "onContentChange", "onPageChange"]))
|
|
2162
|
+
]);
|
|
2163
|
+
}), 128)),
|
|
2164
|
+
s.value ? (C(), X("div", is, [
|
|
2165
|
+
i.value ? (C(), G(st, {
|
|
2166
|
+
key: 0,
|
|
2167
|
+
class: "calculator-content",
|
|
2168
|
+
onClickTrigger: vt,
|
|
2169
|
+
loading: n.value,
|
|
2170
|
+
modelValue: "预览"
|
|
2171
|
+
}, null, 8, ["loading"])) : de("", !0),
|
|
2172
|
+
d(st, {
|
|
2173
|
+
class: "calculator-content",
|
|
2174
|
+
onClickTrigger: f[3] || (f[3] = (S) => Ie()),
|
|
2175
|
+
loading: o.value,
|
|
2176
|
+
modelValue: "调用方法"
|
|
2177
|
+
}, null, 8, ["loading"])
|
|
2178
|
+
])) : de("", !0),
|
|
2179
|
+
P.value ? (C(), X("div", ls, [
|
|
2180
|
+
d(st, {
|
|
2181
|
+
class: "calculator-content",
|
|
2182
|
+
modelValue: "执行方法",
|
|
2183
|
+
onClickTrigger: Q,
|
|
2184
|
+
loading: y.value
|
|
2185
|
+
}, null, 8, ["loading"])
|
|
2186
|
+
])) : de("", !0)
|
|
2187
|
+
])
|
|
2188
|
+
];
|
|
2189
|
+
}),
|
|
2190
|
+
_: 1
|
|
2191
|
+
})
|
|
2192
|
+
]),
|
|
2193
|
+
_: 1
|
|
2194
|
+
}, 8, ["modelValue"])
|
|
2195
|
+
]),
|
|
2196
|
+
_: 1
|
|
2197
|
+
})) : (C(), G(Ce, {
|
|
2198
|
+
key: 1,
|
|
2199
|
+
class: "client-router"
|
|
2200
|
+
}, {
|
|
2201
|
+
default: b(() => [
|
|
2202
|
+
u("div", rs, [
|
|
2203
|
+
d(ce, { width: "300px" }, {
|
|
2204
|
+
default: b(() => [
|
|
2205
|
+
d(_t, { mode: "vertical" })
|
|
2206
|
+
]),
|
|
2207
|
+
_: 1
|
|
2208
|
+
})
|
|
2209
|
+
]),
|
|
2210
|
+
u("div", cs, [
|
|
2211
|
+
d(_e)
|
|
2212
|
+
])
|
|
2213
|
+
]),
|
|
2214
|
+
_: 1
|
|
2215
|
+
}))
|
|
2216
|
+
]),
|
|
2217
|
+
_: 1
|
|
2218
|
+
})
|
|
2219
|
+
]),
|
|
2220
|
+
_: 3
|
|
2221
|
+
})), [
|
|
2222
|
+
[Re, l(m)]
|
|
2223
|
+
]);
|
|
2224
|
+
};
|
|
2225
|
+
}
|
|
2226
|
+
}), us = /* @__PURE__ */ Ke(hs, [["__scopeId", "data-v-c30c56d4"]]), ds = { class: "system-wrap" }, ps = {
|
|
2227
|
+
__name: "index",
|
|
2228
|
+
props: {
|
|
2229
|
+
windowConfig: {
|
|
2230
|
+
type: Object,
|
|
2231
|
+
default: () => {
|
|
2232
|
+
}
|
|
2233
|
+
},
|
|
2234
|
+
platform: {
|
|
2235
|
+
type: String,
|
|
2236
|
+
default: "browser"
|
|
2237
|
+
},
|
|
2238
|
+
showButton: {
|
|
2239
|
+
type: Boolean,
|
|
2240
|
+
default: !0
|
|
2241
|
+
},
|
|
2242
|
+
content: String,
|
|
2243
|
+
jsonContents: Array
|
|
2244
|
+
},
|
|
2245
|
+
setup(a) {
|
|
2246
|
+
const e = wt(Fe), t = Ft(Fe), o = yt();
|
|
2247
|
+
T(!1);
|
|
2248
|
+
const r = T(!0), s = a, i = uo(() => {
|
|
2249
|
+
switch (s == null ? void 0 : s.platform) {
|
|
2250
|
+
case "browser":
|
|
2251
|
+
return $o;
|
|
2252
|
+
case "client":
|
|
2253
|
+
return Uo;
|
|
2254
|
+
}
|
|
2255
|
+
}), n = (h) => {
|
|
2256
|
+
const P = document.documentElement;
|
|
2257
|
+
h == null || h.forEach((U) => {
|
|
2258
|
+
P.style.setProperty(U.name, U.value);
|
|
2259
|
+
});
|
|
2260
|
+
};
|
|
2261
|
+
return Se(() => s.platform, (h, P) => {
|
|
2262
|
+
h && n(i.value);
|
|
2263
|
+
}, { immediate: !0 }), Se(
|
|
2264
|
+
() => [s == null ? void 0 : s.content, s == null ? void 0 : s.jsonContents],
|
|
2265
|
+
async () => {
|
|
2266
|
+
var U, te, ne, oe;
|
|
2267
|
+
if (((U = s == null ? void 0 : s.jsonContents) == null ? void 0 : U.length) > 0) {
|
|
2268
|
+
e.setOriginalData(s == null ? void 0 : s.jsonContents);
|
|
2269
|
+
return;
|
|
2270
|
+
}
|
|
2271
|
+
if (!(s != null && s.content) || ((te = s == null ? void 0 : s.content) == null ? void 0 : te.length) === 0) return;
|
|
2272
|
+
r.value = !0, o.setImportLoading(!0);
|
|
2273
|
+
let h = [], P = [];
|
|
2274
|
+
t.setSelectTitle([]), t.setSelectIndex(""), t.setSelectMenu(""), (oe = (ne = s == null ? void 0 : s.content) == null ? void 0 : ne.filter((I) => I !== "")) == null || oe.forEach((I) => {
|
|
2275
|
+
Oo(I) ? P.push(zo(I)) : It(I) ? P.push(It(I)) : Vt(I) ? P.push(Vt(I)) : P.push(mo(I));
|
|
2276
|
+
}), h = P == null ? void 0 : P[0], await fo(h), await so(), e.setOriginalData(h), o.setImportLoading(!1);
|
|
2277
|
+
},
|
|
2278
|
+
{ deep: !0, immediate: !0 }
|
|
2279
|
+
), (h, P) => (C(), X("div", ds, [
|
|
2280
|
+
a.platform === "browser" ? (C(), G(Xa, {
|
|
2281
|
+
key: 0,
|
|
2282
|
+
showButton: a.showButton
|
|
2283
|
+
}, {
|
|
2284
|
+
default: b(() => [
|
|
2285
|
+
nt(h.$slots, "default", {}, void 0, !0)
|
|
2286
|
+
]),
|
|
2287
|
+
_: 3
|
|
2288
|
+
}, 8, ["showButton"])) : (C(), G(us, {
|
|
2289
|
+
key: 1,
|
|
2290
|
+
windowConfig: a.windowConfig,
|
|
2291
|
+
showButton: a.showButton
|
|
2292
|
+
}, {
|
|
2293
|
+
default: b(() => [
|
|
2294
|
+
nt(h.$slots, "default", {}, void 0, !0)
|
|
2295
|
+
]),
|
|
2296
|
+
_: 3
|
|
2297
|
+
}, 8, ["windowConfig", "showButton"]))
|
|
2298
|
+
]));
|
|
2299
|
+
}
|
|
2300
|
+
}, ms = /* @__PURE__ */ Ke(ps, [["__scopeId", "data-v-63e718b2"]]), fs = { class: "add-model-content" }, gs = {
|
|
2301
|
+
key: 0,
|
|
2302
|
+
class: "model-operate"
|
|
2303
|
+
}, _s = { class: "model-select" }, ys = { class: "model-fill" }, ws = {
|
|
2304
|
+
key: 1,
|
|
2305
|
+
class: "model-view"
|
|
2306
|
+
}, bs = {
|
|
2307
|
+
__name: "index",
|
|
2308
|
+
props: {
|
|
2309
|
+
mode: {
|
|
2310
|
+
type: String,
|
|
2311
|
+
default: "view"
|
|
2312
|
+
},
|
|
2313
|
+
content: {
|
|
2314
|
+
type: String,
|
|
2315
|
+
default: ""
|
|
2316
|
+
},
|
|
2317
|
+
jsonContents: {
|
|
2318
|
+
type: Array,
|
|
2319
|
+
default: () => []
|
|
2320
|
+
},
|
|
2321
|
+
showButton: {
|
|
2322
|
+
type: Boolean,
|
|
2323
|
+
default: !0
|
|
2324
|
+
},
|
|
2325
|
+
pathContent: {
|
|
2326
|
+
type: String,
|
|
2327
|
+
default: ""
|
|
2328
|
+
}
|
|
2329
|
+
},
|
|
2330
|
+
emits: ["change", "contentChange"],
|
|
2331
|
+
setup(a, { emit: e }) {
|
|
2332
|
+
const t = a, o = e, r = T([]), s = T([]), i = T([]), n = T(0), h = wt(Fe), P = yt(Fe), { itemData: U, originalData: te } = Le(h), { activeMenuPath: ne, platform: oe } = Le(P), I = T(null), K = T(0), c = T([]);
|
|
2333
|
+
T("");
|
|
2334
|
+
const k = T(0);
|
|
2335
|
+
Se(
|
|
2336
|
+
() => t == null ? void 0 : t.pathContent,
|
|
2337
|
+
() => {
|
|
2338
|
+
(t == null ? void 0 : t.pathContent) !== "" && h.setSystemPath(t == null ? void 0 : t.pathContent);
|
|
2339
|
+
},
|
|
2340
|
+
{
|
|
2341
|
+
deep: !0,
|
|
2342
|
+
immediate: !0
|
|
2343
|
+
}
|
|
2344
|
+
);
|
|
2345
|
+
const p = (m) => {
|
|
2346
|
+
o("contentChange", m);
|
|
2347
|
+
}, x = (m) => {
|
|
2348
|
+
var V;
|
|
2349
|
+
const D = (V = ot(m == null ? void 0 : m.wholeValue)) == null ? void 0 : V.map((j) => {
|
|
2350
|
+
var Q;
|
|
2351
|
+
return (j == null ? void 0 : j.comp) === "Form" && (j.compData = (Q = j.compData) == null ? void 0 : Q.map((ie) => ((ie == null ? void 0 : ie.key) === "formContent" && (ie.contents = No(ie == null ? void 0 : ie.contents)), ie))), j;
|
|
2352
|
+
});
|
|
2353
|
+
o("change", {
|
|
2354
|
+
originalContents: te.value,
|
|
2355
|
+
currentContents: m == null ? void 0 : m.wholeValue,
|
|
2356
|
+
editContent: m == null ? void 0 : m.editValue,
|
|
2357
|
+
arrayToContents: D
|
|
2358
|
+
});
|
|
2359
|
+
};
|
|
2360
|
+
Se(
|
|
2361
|
+
() => s.value,
|
|
2362
|
+
() => {
|
|
2363
|
+
k.value === s.value.length && s.value.length !== 0 && (r.value = s.value);
|
|
2364
|
+
},
|
|
2365
|
+
{ deep: !0, immediate: !0 }
|
|
2366
|
+
);
|
|
2367
|
+
const _ = () => {
|
|
2368
|
+
I.value.click();
|
|
2369
|
+
}, y = async (m) => {
|
|
2370
|
+
const D = m.target.files;
|
|
2371
|
+
if (!D) return;
|
|
2372
|
+
new FileReader(), r.value = [], s.value = [], k.value = D.length;
|
|
2373
|
+
const V = Array.from(D).map(async (j) => await new Promise((Q) => {
|
|
2374
|
+
const ie = new FileReader();
|
|
2375
|
+
ie.onload = (Ie) => {
|
|
2376
|
+
try {
|
|
2377
|
+
s.value.push(Ie.target.result), K.value++;
|
|
2378
|
+
} catch (ve) {
|
|
2379
|
+
console.error("解析失败:", ve);
|
|
2380
|
+
return;
|
|
2381
|
+
}
|
|
2382
|
+
}, ie.onerror = () => Q(`读取 ${j.name} 失败`), ie.readAsText(j), m.target.value = "", I.value = null;
|
|
2383
|
+
}));
|
|
2384
|
+
await Promise.all(V);
|
|
2385
|
+
};
|
|
2386
|
+
return Se(
|
|
2387
|
+
() => [t == null ? void 0 : t.content, t == null ? void 0 : t.jsonContents],
|
|
2388
|
+
async () => {
|
|
2389
|
+
await so(), r.value = t.content, i.value = t == null ? void 0 : t.jsonContents;
|
|
2390
|
+
},
|
|
2391
|
+
{ deep: !0, immediate: !0 }
|
|
2392
|
+
), Se(
|
|
2393
|
+
() => K.value,
|
|
2394
|
+
() => {
|
|
2395
|
+
var m;
|
|
2396
|
+
((m = c.value) == null ? void 0 : m.length) !== 0 && (h.setOriginalData(c.value), h.setItemData(c.value));
|
|
2397
|
+
},
|
|
2398
|
+
{ deep: !0, immediate: !0 }
|
|
2399
|
+
), (m, D) => {
|
|
2400
|
+
const V = ee("svg-icon"), j = ee("el-button");
|
|
2401
|
+
return C(), X("div", fs, [
|
|
2402
|
+
(t == null ? void 0 : t.mode) === "edit" ? (C(), X("div", gs, [
|
|
2403
|
+
u("div", _s, [
|
|
2404
|
+
d(Rt)
|
|
2405
|
+
]),
|
|
2406
|
+
(C(), X("div", {
|
|
2407
|
+
class: "model-show",
|
|
2408
|
+
key: n.value
|
|
2409
|
+
}, [
|
|
2410
|
+
d(At)
|
|
2411
|
+
])),
|
|
2412
|
+
u("div", ys, [
|
|
2413
|
+
d(Bt)
|
|
2414
|
+
])
|
|
2415
|
+
])) : de("", !0),
|
|
2416
|
+
(t == null ? void 0 : t.mode) === "view" ? (C(), X("div", ws, [
|
|
2417
|
+
(C(), G(ms, {
|
|
2418
|
+
showButton: a.showButton,
|
|
2419
|
+
platform: l(oe),
|
|
2420
|
+
content: r.value,
|
|
2421
|
+
onChange: x,
|
|
2422
|
+
jsonContents: i.value,
|
|
2423
|
+
onContentChange: p,
|
|
2424
|
+
key: n.value
|
|
2425
|
+
}, {
|
|
2426
|
+
default: b(() => {
|
|
2427
|
+
var Q;
|
|
2428
|
+
return [
|
|
2429
|
+
((Q = t == null ? void 0 : t.jsonContents) == null ? void 0 : Q.length) === 0 && (t != null && t.showButton) ? (C(), G(j, {
|
|
2430
|
+
key: 0,
|
|
2431
|
+
id: "transparentBgButton",
|
|
2432
|
+
onClick: _
|
|
2433
|
+
}, {
|
|
2434
|
+
icon: b(() => [
|
|
2435
|
+
d(V, { name: "import" })
|
|
2436
|
+
]),
|
|
2437
|
+
default: b(() => [
|
|
2438
|
+
u("input", {
|
|
2439
|
+
type: "file",
|
|
2440
|
+
ref_key: "fileInput",
|
|
2441
|
+
ref: I,
|
|
2442
|
+
accept: ".txt, .inm",
|
|
2443
|
+
onChange: y,
|
|
2444
|
+
style: { display: "none" },
|
|
2445
|
+
multiple: ""
|
|
2446
|
+
}, null, 544),
|
|
2447
|
+
D[0] || (D[0] = Me(" 导入模型 "))
|
|
2448
|
+
]),
|
|
2449
|
+
_: 1,
|
|
2450
|
+
__: [0]
|
|
2451
|
+
})) : de("", !0)
|
|
2452
|
+
];
|
|
2453
|
+
}),
|
|
2454
|
+
_: 1
|
|
2455
|
+
}, 8, ["showButton", "platform", "content", "jsonContents"]))
|
|
2456
|
+
])) : de("", !0)
|
|
2457
|
+
]);
|
|
2458
|
+
};
|
|
2459
|
+
}
|
|
2460
|
+
}, zs = /* @__PURE__ */ Ke(bs, [["__scopeId", "data-v-14b5611b"]]);
|
|
2461
|
+
export {
|
|
2462
|
+
zs as default
|
|
2463
|
+
};
|