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