ss-component-new 1.1.621 → 1.1.624
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/{index-cwNAtWkQ.js → index-B1An8Htq.js} +3 -3
- package/dist/{index-By4IZGWU.cjs → index-B1dHNcdB.cjs} +1 -1
- package/dist/{index-BdAqAS8j.cjs → index-B36T-VF_.cjs} +1 -1
- package/dist/{index-tyYdP21K.cjs → index-B4APtXxQ.cjs} +1 -1
- package/dist/{index-B4fU_Oqr.js → index-B5t2-ZF6.js} +1 -1
- package/dist/{index-DbxbzUiK.js → index-BHNh8h0b.js} +1 -1
- package/dist/{index-CMgvFfxY.js → index-Bf_MUmNJ.js} +2 -2
- package/dist/{index-B6QTa9We.cjs → index-BjqICyT4.cjs} +1 -1
- package/dist/{index-DnY817qu.cjs → index-BpdXzn_5.cjs} +1 -1
- package/dist/{index-CPeCOE_d.js → index-CCMMXMB1.js} +4107 -3957
- package/dist/{index-CMwn0ZEb.js → index-CHFTtzVa.js} +2 -2
- package/dist/{index-YTvm8Dyq.cjs → index-CKHYXDPm.cjs} +1 -1
- package/dist/{index-CW1zJWa7.cjs → index-CTmwu9TK.cjs} +1 -1
- package/dist/index-CW3mfGB1.cjs +1 -0
- package/dist/{index-kLzEx5xq.cjs → index-CZ5Km1gh.cjs} +1 -1
- package/dist/{index-DfQCPyug.js → index-CZ7TZZkY.js} +2 -2
- package/dist/{index-JuKGX07D.js → index-CcsATbPx.js} +1 -1
- package/dist/index-D5356qth.cjs +1 -0
- package/dist/{index-rBRZ7zGU.cjs → index-DD66d4qh.cjs} +1 -1
- package/dist/{index-CgHGkDUQ.js → index-DFYsmhwk.js} +2 -2
- package/dist/{index-Dmc9yBFD.cjs → index-DGsekK7m.cjs} +13 -13
- package/dist/{index-DE4qOxcb.cjs → index-DHI2fA2V.cjs} +1 -1
- package/dist/{index-CEcr_wVS.js → index-DQg2yjYX.js} +2 -2
- package/dist/{index-twApCU3A.js → index-DSdCQ_W0.js} +2 -2
- package/dist/{index-aptPIfv7.cjs → index-DTxA0aLx.cjs} +2 -2
- package/dist/{index-BS0NY42k.js → index-DeAB8zT4.js} +1 -1
- package/dist/{index-BLUSTZzG.js → index-DfzBGyQ0.js} +2 -2
- package/dist/{index-BFWDxfM0.js → index-DpxAyiaB.js} +4 -4
- package/dist/{index-Cz_YKerb.js → index-DwZm1s3k.js} +118 -120
- package/dist/{index-B6McL4Y5.cjs → index-DxblCBeX.cjs} +1 -1
- package/dist/{index-COcl6KL3.cjs → index-JoUULW-e.cjs} +1 -1
- package/dist/{index-DKoGXjoD.js → index-OAZCfMnP.js} +3 -3
- package/dist/{index-D1eHyt-Y.js → index-XEvHnysy.js} +665 -665
- package/dist/{index-CX298lYO.cjs → index-dfd8x3YP.cjs} +1 -1
- package/dist/{index-OUcbra1H.cjs → index-gnjMHl16.cjs} +1 -1
- package/dist/{index-DUyXqunV.js → index-nWJ2cGxt.js} +5 -5
- package/dist/{index.vue_vue_type_script_setup_true_lang-BH9_Te0S.js → index.vue_vue_type_script_setup_true_lang-BhbHPZ34.js} +22 -22
- package/dist/{index.vue_vue_type_script_setup_true_lang-at_JPyg5.cjs → index.vue_vue_type_script_setup_true_lang-DoqHilMG.cjs} +1 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BfNWM92-.cjs +1339 -0
- package/dist/index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-EGVEMSWV.js +62017 -0
- package/dist/{index.vue_vue_type_style_index_0_scoped_1ee6cc73_lang-DtoHG_C9.cjs → index.vue_vue_type_style_index_0_scoped_1ee6cc73_lang-COKqoEa-.cjs} +2 -2
- package/dist/{index.vue_vue_type_style_index_0_scoped_1ee6cc73_lang-CHdL2mdi.js → index.vue_vue_type_style_index_0_scoped_1ee6cc73_lang-KbQ9Rbrb.js} +7 -7
- package/dist/{index.vue_vue_type_style_index_0_scoped_57a7854d_lang-CZvlVQ3K.js → index.vue_vue_type_style_index_0_scoped_c8f6ea20_lang-CAQGQOWa.js} +4 -4
- package/dist/{index.vue_vue_type_style_index_0_scoped_57a7854d_lang-BmbIlTnn.cjs → index.vue_vue_type_style_index_0_scoped_c8f6ea20_lang-DZ-VOJA0.cjs} +1 -1
- package/dist/{main-MdhpVHXc.cjs → main-0xDyziYT.cjs} +1 -1
- package/dist/{main-DZAZF0E8.js → main-CMLGwMf_.js} +2 -2
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +2 -2
- package/dist/ss-component.js +7 -7
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +9 -9
- package/dist/{threeModel-BRkJrghm.cjs → threeModel-CSRasN3J.cjs} +1 -1
- package/dist/{threeModel-C2biL1qd.js → threeModel-rRoqc4B5.js} +1 -1
- package/package.json +3 -1
- package/dist/index-D5P_BYL7.cjs +0 -1
- package/dist/index-Noso3rqY.cjs +0 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Br0-XuvP.js +0 -52928
- package/dist/index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CZZJYhO9.cjs +0 -1286
package/dist/ss-component.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { defineAsyncComponent as s } from "vue";
|
|
2
2
|
import { S as b } from "./index-BHtNKL1L.js";
|
|
3
|
-
import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-
|
|
3
|
+
import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-EGVEMSWV.js";
|
|
4
4
|
import "./menu-wif0xsml.js";
|
|
5
5
|
import l from "./ss-component2.js";
|
|
6
|
-
const n = s(() => import("./main-
|
|
6
|
+
const n = s(() => import("./main-CMLGwMf_.js"));
|
|
7
7
|
n.install = (o) => {
|
|
8
8
|
o.component("ssComponent", n);
|
|
9
9
|
};
|
|
10
|
-
const t = s(() => import("./index-
|
|
10
|
+
const t = s(() => import("./index-CCMMXMB1.js").then((o) => o.n));
|
|
11
11
|
t.install = (o) => {
|
|
12
12
|
o.component("ssTab", t);
|
|
13
13
|
};
|
|
14
|
-
const e = s(() => import("./index-
|
|
14
|
+
const e = s(() => import("./index-DSdCQ_W0.js"));
|
|
15
15
|
e.install = (o) => {
|
|
16
16
|
o.component("ssMenu", e);
|
|
17
17
|
};
|
|
18
|
-
const m = s(() => import("./index-
|
|
18
|
+
const m = s(() => import("./index-nWJ2cGxt.js"));
|
|
19
19
|
m.install = (o) => {
|
|
20
20
|
o.component("ssMenuComponent", m);
|
|
21
21
|
};
|
|
@@ -27,11 +27,11 @@ const p = s(() => import("./index-CZtXRS3l.js"));
|
|
|
27
27
|
p.install = (o) => {
|
|
28
28
|
o.component("ssFold", p);
|
|
29
29
|
};
|
|
30
|
-
const i = s(() => import("./index-
|
|
30
|
+
const i = s(() => import("./index-B5t2-ZF6.js"));
|
|
31
31
|
i.install = (o) => {
|
|
32
32
|
o.component("ssAvatar", i);
|
|
33
33
|
};
|
|
34
|
-
const c = s(() => import("./threeModel-
|
|
34
|
+
const c = s(() => import("./threeModel-rRoqc4B5.js"));
|
|
35
35
|
c.install = (o) => {
|
|
36
36
|
o.component("ssThree", c);
|
|
37
37
|
};
|
package/dist/ss-component2.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const o=require("vue-router"),t=[{path:"/login",name:"Login",component:async()=>Promise.resolve().then(()=>require("./index-
|
|
1
|
+
"use strict";const o=require("vue-router"),t=[{path:"/login",name:"Login",component:async()=>Promise.resolve().then(()=>require("./index-CZ5Km1gh.cjs"))},{path:"/",name:"Model",component:async()=>Promise.resolve().then(()=>require("./index-D5356qth.cjs")),children:[{path:"平台管理/菜单管理",name:"Menu",component:async()=>Promise.resolve().then(()=>require("./index-BpdXzn_5.cjs"))},{path:"平台管理/主菜单管理",name:"MainMenu",component:async()=>Promise.resolve().then(()=>require("./index-gnjMHl16.cjs"))},{path:"系统管理/个人中心",name:"PersonalCenter",component:async()=>Promise.resolve().then(()=>require("./index-BjqICyT4.cjs"))},{path:"系统管理/职位管理",name:"Post",component:async()=>Promise.resolve().then(()=>require("./index-CKHYXDPm.cjs"))},{path:"系统管理/用户管理",name:"User",component:async()=>Promise.resolve().then(()=>require("./index-dfd8x3YP.cjs"))},{path:"系统管理/角色管理",name:"Role",component:async()=>Promise.resolve().then(()=>require("./index-B1dHNcdB.cjs"))},{path:"系统管理/部门管理",name:"Dept",component:async()=>Promise.resolve().then(()=>require("./index-DHI2fA2V.cjs"))},{path:"priority",name:"Priority",component:async()=>Promise.resolve().then(()=>require("./index-D0QjuJev.cjs"))}]}],n=o.createRouter({history:o.createWebHashHistory(),routes:t});n.beforeEach((r,s,e)=>{!sessionStorage.getItem("loginToken")&&r.path!=="/login"?e("/login"):e()});module.exports=n;
|
package/dist/ss-component2.js
CHANGED
|
@@ -3,12 +3,12 @@ const a = [
|
|
|
3
3
|
{
|
|
4
4
|
path: "/login",
|
|
5
5
|
name: "Login",
|
|
6
|
-
component: async () => import("./index-
|
|
6
|
+
component: async () => import("./index-OAZCfMnP.js")
|
|
7
7
|
},
|
|
8
8
|
{
|
|
9
9
|
path: "/",
|
|
10
10
|
name: "Model",
|
|
11
|
-
component: async () => import("./index-
|
|
11
|
+
component: async () => import("./index-DwZm1s3k.js"),
|
|
12
12
|
// component: async ()=>import('@/components/views/model/component/main.vue'),
|
|
13
13
|
// component: async ()=>import('@/components/views/canvas/index.vue'),
|
|
14
14
|
// component: async ()=>import('@/components/views/test/index.vue'),
|
|
@@ -16,37 +16,37 @@ const a = [
|
|
|
16
16
|
{
|
|
17
17
|
path: "平台管理/菜单管理",
|
|
18
18
|
name: "Menu",
|
|
19
|
-
component: async () => import("./index-
|
|
19
|
+
component: async () => import("./index-B1An8Htq.js")
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
path: "平台管理/主菜单管理",
|
|
23
23
|
name: "MainMenu",
|
|
24
|
-
component: async () => import("./index-
|
|
24
|
+
component: async () => import("./index-DeAB8zT4.js")
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
path: "系统管理/个人中心",
|
|
28
28
|
name: "PersonalCenter",
|
|
29
|
-
component: async () => import("./index-
|
|
29
|
+
component: async () => import("./index-DFYsmhwk.js")
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
32
|
path: "系统管理/职位管理",
|
|
33
33
|
name: "Post",
|
|
34
|
-
component: async () => import("./index-
|
|
34
|
+
component: async () => import("./index-Bf_MUmNJ.js")
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
path: "系统管理/用户管理",
|
|
38
38
|
name: "User",
|
|
39
|
-
component: async () => import("./index-
|
|
39
|
+
component: async () => import("./index-BHNh8h0b.js")
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
path: "系统管理/角色管理",
|
|
43
43
|
name: "Role",
|
|
44
|
-
component: async () => import("./index-
|
|
44
|
+
component: async () => import("./index-CZ7TZZkY.js")
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
path: "系统管理/部门管理",
|
|
48
48
|
name: "Dept",
|
|
49
|
-
component: async () => import("./index-
|
|
49
|
+
component: async () => import("./index-DfzBGyQ0.js")
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
52
|
path: "priority",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-aptPIfv7.cjs"),ie=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),fe=require("./menu-CcabvNj6.cjs"),pe={type:"change"},ue={type:"start"},_e={type:"end"},ne=new o.Ray,me=new o.Plane,ge=Math.cos(70*o.MathUtils.DEG2RAD),B=new o.Vector3,H=2*Math.PI,k={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},ce=1e-6;class ye extends o.Controls{constructor(t,i=null){super(t,i),this.state=k.NONE,this.target=new o.Vector3,this.cursor=new o.Vector3,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=.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:o.MOUSE.ROTATE,MIDDLE:o.MOUSE.DOLLY,RIGHT:o.MOUSE.PAN},this.touches={ONE:o.TOUCH.ROTATE,TWO:o.TOUCH.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this._lastPosition=new o.Vector3,this._lastQuaternion=new o.Quaternion,this._lastTargetPosition=new o.Vector3,this._quat=new o.Quaternion().setFromUnitVectors(t.up,new o.Vector3(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new o.Spherical,this._sphericalDelta=new o.Spherical,this._scale=1,this._panOffset=new o.Vector3,this._rotateStart=new o.Vector2,this._rotateEnd=new o.Vector2,this._rotateDelta=new o.Vector2,this._panStart=new o.Vector2,this._panEnd=new o.Vector2,this._panDelta=new o.Vector2,this._dollyStart=new o.Vector2,this._dollyEnd=new o.Vector2,this._dollyDelta=new o.Vector2,this._dollyDirection=new o.Vector3,this._mouse=new o.Vector2,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=be.bind(this),this._onPointerDown=ve.bind(this),this._onPointerUp=we.bind(this),this._onContextMenu=Se.bind(this),this._onMouseWheel=Me.bind(this),this._onKeyDown=xe.bind(this),this._onTouchStart=De.bind(this),this._onTouchMove=Ve.bind(this),this._onMouseDown=Ee.bind(this),this._onMouseMove=Pe.bind(this),this._interceptControlDown=ke.bind(this),this._interceptControlUp=Te.bind(this),this.domElement!==null&&this.connect(this.domElement),this.update()}connect(t){super.connect(t),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"}disconnect(){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"}dispose(){this.disconnect()}getPolarAngle(){return this._spherical.phi}getAzimuthalAngle(){return this._spherical.theta}getDistance(){return this.object.position.distanceTo(this.target)}listenToKeyEvents(t){t.addEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=t}stopListenToKeyEvents(){this._domElementKeyEvents!==null&&(this._domElementKeyEvents.removeEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=null)}saveState(){this.target0.copy(this.target),this.position0.copy(this.object.position),this.zoom0=this.object.zoom}reset(){this.target.copy(this.target0),this.object.position.copy(this.position0),this.object.zoom=this.zoom0,this.object.updateProjectionMatrix(),this.dispatchEvent(pe),this.update(),this.state=k.NONE}update(t=null){const i=this.object.position;B.copy(i).sub(this.target),B.applyQuaternion(this._quat),this._spherical.setFromVector3(B),this.autoRotate&&this.state===k.NONE&&this._rotateLeft(this._getAutoRotationAngle(t)),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);let s=this.minAzimuthAngle,l=this.maxAzimuthAngle;isFinite(s)&&isFinite(l)&&(s<-Math.PI?s+=H:s>Math.PI&&(s-=H),l<-Math.PI?l+=H:l>Math.PI&&(l-=H),s<=l?this._spherical.theta=Math.max(s,Math.min(l,this._spherical.theta)):this._spherical.theta=this._spherical.theta>(s+l)/2?Math.max(s,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);let m=!1;if(this.zoomToCursor&&this._performCursorZoom||this.object.isOrthographicCamera)this._spherical.radius=this._clampDistance(this._spherical.radius);else{const b=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),m=b!=this._spherical.radius}if(B.setFromSpherical(this._spherical),B.applyQuaternion(this._quatInverse),i.copy(this.target).add(B),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){let b=null;if(this.object.isPerspectiveCamera){const r=B.length();b=this._clampDistance(r*this._scale);const x=r-b;this.object.position.addScaledVector(this._dollyDirection,x),this.object.updateMatrixWorld(),m=!!x}else if(this.object.isOrthographicCamera){const r=new o.Vector3(this._mouse.x,this._mouse.y,0);r.unproject(this.object);const x=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),m=x!==this.object.zoom;const M=new o.Vector3(this._mouse.x,this._mouse.y,0);M.unproject(this.object),this.object.position.sub(M).add(r),this.object.updateMatrixWorld(),b=B.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),this.zoomToCursor=!1;b!==null&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(b).add(this.object.position):(ne.origin.copy(this.object.position),ne.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(ne.direction))<ge?this.object.lookAt(this.target):(me.setFromNormalAndCoplanarPoint(this.object.up,this.target),ne.intersectPlane(me,this.target))))}else if(this.object.isOrthographicCamera){const b=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),b!==this.object.zoom&&(this.object.updateProjectionMatrix(),m=!0)}return this._scale=1,this._performCursorZoom=!1,m||this._lastPosition.distanceToSquared(this.object.position)>ce||8*(1-this._lastQuaternion.dot(this.object.quaternion))>ce||this._lastTargetPosition.distanceToSquared(this.target)>ce?(this.dispatchEvent(pe),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(t){return t!==null?H/60*this.autoRotateSpeed*t:H/60/60*this.autoRotateSpeed}_getZoomScale(t){const i=Math.abs(t*.01);return Math.pow(.95,this.zoomSpeed*i)}_rotateLeft(t){this._sphericalDelta.theta-=t}_rotateUp(t){this._sphericalDelta.phi-=t}_panLeft(t,i){B.setFromMatrixColumn(i,0),B.multiplyScalar(-t),this._panOffset.add(B)}_panUp(t,i){this.screenSpacePanning===!0?B.setFromMatrixColumn(i,1):(B.setFromMatrixColumn(i,0),B.crossVectors(this.object.up,B)),B.multiplyScalar(t),this._panOffset.add(B)}_pan(t,i){const s=this.domElement;if(this.object.isPerspectiveCamera){const l=this.object.position;B.copy(l).sub(this.target);let m=B.length();m*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*t*m/s.clientHeight,this.object.matrix),this._panUp(2*i*m/s.clientHeight,this.object.matrix)}else this.object.isOrthographicCamera?(this._panLeft(t*(this.object.right-this.object.left)/this.object.zoom/s.clientWidth,this.object.matrix),this._panUp(i*(this.object.top-this.object.bottom)/this.object.zoom/s.clientHeight,this.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),this.enablePan=!1)}_dollyOut(t){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale/=t:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_dollyIn(t){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale*=t:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_updateZoomParameters(t,i){if(!this.zoomToCursor)return;this._performCursorZoom=!0;const s=this.domElement.getBoundingClientRect(),l=t-s.left,m=i-s.top,b=s.width,r=s.height;this._mouse.x=l/b*2-1,this._mouse.y=-(m/r)*2+1,this._dollyDirection.set(this._mouse.x,this._mouse.y,1).unproject(this.object).sub(this.object.position).normalize()}_clampDistance(t){return Math.max(this.minDistance,Math.min(this.maxDistance,t))}_handleMouseDownRotate(t){this._rotateStart.set(t.clientX,t.clientY)}_handleMouseDownDolly(t){this._updateZoomParameters(t.clientX,t.clientX),this._dollyStart.set(t.clientX,t.clientY)}_handleMouseDownPan(t){this._panStart.set(t.clientX,t.clientY)}_handleMouseMoveRotate(t){this._rotateEnd.set(t.clientX,t.clientY),this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const i=this.domElement;this._rotateLeft(H*this._rotateDelta.x/i.clientHeight),this._rotateUp(H*this._rotateDelta.y/i.clientHeight),this._rotateStart.copy(this._rotateEnd),this.update()}_handleMouseMoveDolly(t){this._dollyEnd.set(t.clientX,t.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()}_handleMouseMovePan(t){this._panEnd.set(t.clientX,t.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()}_handleMouseWheel(t){this._updateZoomParameters(t.clientX,t.clientY),t.deltaY<0?this._dollyIn(this._getZoomScale(t.deltaY)):t.deltaY>0&&this._dollyOut(this._getZoomScale(t.deltaY)),this.update()}_handleKeyDown(t){let i=!1;switch(t.code){case this.keys.UP:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateUp(H*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,this.keyPanSpeed),i=!0;break;case this.keys.BOTTOM:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateUp(-H*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,-this.keyPanSpeed),i=!0;break;case this.keys.LEFT:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateLeft(H*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(this.keyPanSpeed,0),i=!0;break;case this.keys.RIGHT:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateLeft(-H*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(-this.keyPanSpeed,0),i=!0;break}i&&(t.preventDefault(),this.update())}_handleTouchStartRotate(t){if(this._pointers.length===1)this._rotateStart.set(t.pageX,t.pageY);else{const i=this._getSecondPointerPosition(t),s=.5*(t.pageX+i.x),l=.5*(t.pageY+i.y);this._rotateStart.set(s,l)}}_handleTouchStartPan(t){if(this._pointers.length===1)this._panStart.set(t.pageX,t.pageY);else{const i=this._getSecondPointerPosition(t),s=.5*(t.pageX+i.x),l=.5*(t.pageY+i.y);this._panStart.set(s,l)}}_handleTouchStartDolly(t){const i=this._getSecondPointerPosition(t),s=t.pageX-i.x,l=t.pageY-i.y,m=Math.sqrt(s*s+l*l);this._dollyStart.set(0,m)}_handleTouchStartDollyPan(t){this.enableZoom&&this._handleTouchStartDolly(t),this.enablePan&&this._handleTouchStartPan(t)}_handleTouchStartDollyRotate(t){this.enableZoom&&this._handleTouchStartDolly(t),this.enableRotate&&this._handleTouchStartRotate(t)}_handleTouchMoveRotate(t){if(this._pointers.length==1)this._rotateEnd.set(t.pageX,t.pageY);else{const s=this._getSecondPointerPosition(t),l=.5*(t.pageX+s.x),m=.5*(t.pageY+s.y);this._rotateEnd.set(l,m)}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const i=this.domElement;this._rotateLeft(H*this._rotateDelta.x/i.clientHeight),this._rotateUp(H*this._rotateDelta.y/i.clientHeight),this._rotateStart.copy(this._rotateEnd)}_handleTouchMovePan(t){if(this._pointers.length===1)this._panEnd.set(t.pageX,t.pageY);else{const i=this._getSecondPointerPosition(t),s=.5*(t.pageX+i.x),l=.5*(t.pageY+i.y);this._panEnd.set(s,l)}this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd)}_handleTouchMoveDolly(t){const i=this._getSecondPointerPosition(t),s=t.pageX-i.x,l=t.pageY-i.y,m=Math.sqrt(s*s+l*l);this._dollyEnd.set(0,m),this._dollyDelta.set(0,Math.pow(this._dollyEnd.y/this._dollyStart.y,this.zoomSpeed)),this._dollyOut(this._dollyDelta.y),this._dollyStart.copy(this._dollyEnd);const b=(t.pageX+i.x)*.5,r=(t.pageY+i.y)*.5;this._updateZoomParameters(b,r)}_handleTouchMoveDollyPan(t){this.enableZoom&&this._handleTouchMoveDolly(t),this.enablePan&&this._handleTouchMovePan(t)}_handleTouchMoveDollyRotate(t){this.enableZoom&&this._handleTouchMoveDolly(t),this.enableRotate&&this._handleTouchMoveRotate(t)}_addPointer(t){this._pointers.push(t.pointerId)}_removePointer(t){delete this._pointerPositions[t.pointerId];for(let i=0;i<this._pointers.length;i++)if(this._pointers[i]==t.pointerId){this._pointers.splice(i,1);return}}_isTrackingPointer(t){for(let i=0;i<this._pointers.length;i++)if(this._pointers[i]==t.pointerId)return!0;return!1}_trackPointer(t){let i=this._pointerPositions[t.pointerId];i===void 0&&(i=new o.Vector2,this._pointerPositions[t.pointerId]=i),i.set(t.pageX,t.pageY)}_getSecondPointerPosition(t){const i=t.pointerId===this._pointers[0]?this._pointers[1]:this._pointers[0];return this._pointerPositions[i]}_customWheelEvent(t){const i=t.deltaMode,s={clientX:t.clientX,clientY:t.clientY,deltaY:t.deltaY};switch(i){case 1:s.deltaY*=16;break;case 2:s.deltaY*=100;break}return t.ctrlKey&&!this._controlActive&&(s.deltaY*=10),s}}function ve(a){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)))}function be(a){this.enabled!==!1&&(a.pointerType==="touch"?this._onTouchMove(a):this._onMouseMove(a))}function we(a){switch(this._removePointer(a),this._pointers.length){case 0:this.domElement.releasePointerCapture(a.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.dispatchEvent(_e),this.state=k.NONE;break;case 1:const t=this._pointers[0],i=this._pointerPositions[t];this._onTouchStart({pointerId:t,pageX:i.x,pageY:i.y});break}}function Ee(a){let t;switch(a.button){case 0:t=this.mouseButtons.LEFT;break;case 1:t=this.mouseButtons.MIDDLE;break;case 2:t=this.mouseButtons.RIGHT;break;default:t=-1}switch(t){case o.MOUSE.DOLLY:if(this.enableZoom===!1)return;this._handleMouseDownDolly(a),this.state=k.DOLLY;break;case o.MOUSE.ROTATE:if(a.ctrlKey||a.metaKey||a.shiftKey){if(this.enablePan===!1)return;this._handleMouseDownPan(a),this.state=k.PAN}else{if(this.enableRotate===!1)return;this._handleMouseDownRotate(a),this.state=k.ROTATE}break;case o.MOUSE.PAN:if(a.ctrlKey||a.metaKey||a.shiftKey){if(this.enableRotate===!1)return;this._handleMouseDownRotate(a),this.state=k.ROTATE}else{if(this.enablePan===!1)return;this._handleMouseDownPan(a),this.state=k.PAN}break;default:this.state=k.NONE}this.state!==k.NONE&&this.dispatchEvent(ue)}function Pe(a){switch(this.state){case k.ROTATE:if(this.enableRotate===!1)return;this._handleMouseMoveRotate(a);break;case k.DOLLY:if(this.enableZoom===!1)return;this._handleMouseMoveDolly(a);break;case k.PAN:if(this.enablePan===!1)return;this._handleMouseMovePan(a);break}}function Me(a){this.enabled===!1||this.enableZoom===!1||this.state!==k.NONE||(a.preventDefault(),this.dispatchEvent(ue),this._handleMouseWheel(this._customWheelEvent(a)),this.dispatchEvent(_e))}function xe(a){this.enabled!==!1&&this._handleKeyDown(a)}function De(a){switch(this._trackPointer(a),this._pointers.length){case 1:switch(this.touches.ONE){case o.TOUCH.ROTATE:if(this.enableRotate===!1)return;this._handleTouchStartRotate(a),this.state=k.TOUCH_ROTATE;break;case o.TOUCH.PAN:if(this.enablePan===!1)return;this._handleTouchStartPan(a),this.state=k.TOUCH_PAN;break;default:this.state=k.NONE}break;case 2:switch(this.touches.TWO){case o.TOUCH.DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchStartDollyPan(a),this.state=k.TOUCH_DOLLY_PAN;break;case o.TOUCH.DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchStartDollyRotate(a),this.state=k.TOUCH_DOLLY_ROTATE;break;default:this.state=k.NONE}break;default:this.state=k.NONE}this.state!==k.NONE&&this.dispatchEvent(ue)}function Ve(a){switch(this._trackPointer(a),this.state){case k.TOUCH_ROTATE:if(this.enableRotate===!1)return;this._handleTouchMoveRotate(a),this.update();break;case k.TOUCH_PAN:if(this.enablePan===!1)return;this._handleTouchMovePan(a),this.update();break;case k.TOUCH_DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchMoveDollyPan(a),this.update();break;case k.TOUCH_DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchMoveDollyRotate(a),this.update();break;default:this.state=k.NONE}}function Se(a){this.enabled!==!1&&a.preventDefault()}function ke(a){a.key==="Control"&&(this._controlActive=!0,this.domElement.getRootNode().addEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function Te(a){a.key==="Control"&&(this._controlActive=!1,this.domElement.getRootNode().removeEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function Ce(a){let t=null,i=null,s=null,l=null,m=null,b=null,r=null,x=null;const M=e.ref([]),C=e.ref(new o.Vector3),N=e.ref(new o.Vector3),O=()=>{if(!a.value)return;t=new o.Scene,t.background=new o.Color(15790320);const _=a.value;i=new o.PerspectiveCamera(75,_.clientWidth/_.clientHeight,.1,1e4),i.position.set(8,-8,6),i.up.set(0,0,1),i.lookAt(0,0,0),s=new o.WebGLRenderer({antialias:!0,alpha:!0}),s.setSize(_.clientWidth,_.clientHeight),s.localClippingEnabled=!0,s.shadowMap.enabled=!0,s.shadowMap.type=o.PCFSoftShadowMap,s.toneMapping=o.ACESFilmicToneMapping,s.toneMappingExposure=1,s.outputColorSpace=o.SRGBColorSpace,_.appendChild(s.domElement),l=new ye(i,s.domElement),l.enableDamping=!0,l.dampingFactor=.05,l.mouseButtons={LEFT:null,MIDDLE:o.MOUSE.PAN,RIGHT:o.MOUSE.ROTATE},l.panSpeed=.7,m=new o.Xe(i,s,{container:_,type:"cube",placement:"top-right",offset:{top:10,right:10},background:{color:"#D1D1D1",opacity:1},front:{label:"Top"},bottom:{label:"Front"},left:{label:"Left"},right:{label:"Right"},top:{label:"Back"},back:{label:"Bottom"}}),m.attachControls(l),v(),n()},h=(_,p)=>{r&&(t.remove(r),r.dispose()),x&&(t.remove(x),x.geometry.dispose(),x.material.dispose());const D=Math.min(Math.max(Math.floor(_/20),30),40);r=new o.GridHelper(_,D,13421772,14540253),r.rotateX(Math.PI/2),r.position.copy(p),t.add(r);const U=new o.PlaneGeometry(_,_),T=new o.ShadowMaterial({opacity:.3,color:0});x=new o.Mesh(U,T),x.position.copy(p),x.position.z-=.01,x.receiveShadow=!0,t.add(x)},S=()=>{if(M.value.length===0)return;const _=new o.Box3;let p=!1;if(M.value.forEach(K=>{if(K.userData.boundingBox)_.union(K.userData.boundingBox),p=!0;else if(K.userData.modelId&&modelBoundingBoxes.has(K.userData.modelId)){const G=modelBoundingBoxes.get(K.userData.modelId);_.union(G.box),p=!0}else _.expandByObject(K),p=!0}),!p){console.warn("无法计算包围盒,网格更新失败");return}const D=_.getSize(new o.Vector3),U=_.getCenter(new o.Vector3),T=Math.max(D.x,D.y,D.z),W=Math.max(T*8,50),L=new o.Vector3(U.x,U.y,_.min.z);h(W,L)},v=()=>{const _=new o.AmbientLight(4210752,.6);t.add(_);const p=new o.DirectionalLight(16777215,2);p.position.set(10,10,8),p.castShadow=!0,p.shadow.mapSize.width=4096,p.shadow.mapSize.height=4096,p.shadow.camera.near=.5,p.shadow.camera.far=50,p.shadow.camera.left=-50,p.shadow.camera.right=50,p.shadow.camera.top=50,p.shadow.camera.bottom=-50,t.add(p);const D=new o.DirectionalLight(16777215,.8);D.position.set(-8,-8,6),t.add(D);const U=new o.DirectionalLight(16777215,.6);U.position.set(0,-15,2),t.add(U);const T=new o.HemisphereLight(16777215,4473924,.8);t.add(T);const W=new o.PointLight(16777215,1,50);W.position.set(15,15,15),t.add(W);const L=new o.PointLight(16777215,.5,50);L.position.set(-15,-15,15),t.add(L)},n=()=>{b=requestAnimationFrame(n),l&&l.update(),s&&t&&i&&s.render(t,i),m&&m.render()},f=_=>{["map","normalMap","bumpMap","roughnessMap","metalnessMap","emissiveMap","specularMap","envMap","lightMap","aoMap","displacementMap"].forEach(D=>{_[D]&&_[D].dispose&&_[D].dispose()}),_.dispose&&_.dispose()},E=_=>{_==null||_.traverse(p=>{p.geometry&&p.geometry.dispose(),p.material&&(Array.isArray(p.material)?p.material.forEach(D=>{f(D)}):f(p.material))})};return{currentModels:M,initialCameraPosition:C,initialTargetPosition:N,initThreeJS:O,handleResize:()=>{if(!a.value||!i||!s||!m)return;const _=a.value,p=_.clientWidth,D=_.clientHeight;i.aspect=p/D,i.updateProjectionMatrix(),s.setSize(p,D),m.update()},fitCameraToAllModels:_=>{if(!i||!l||M.value.length===0)return;const p=new o.Box3;let D=!1;if(M.value.forEach(G=>{if(G.userData.boundingBox)p.union(G.userData.boundingBox),D=!0;else if(G.userData.modelId&&_.has(G.userData.modelId)){const oe=_.get(G.userData.modelId);p.union(oe.box),D=!0}else p.expandByObject(G),D=!0}),!D){console.warn("无法计算包围盒");return}const U=p.getSize(new o.Vector3),T=p.getCenter(new o.Vector3),L=Math.max(U.x,U.y,U.z)*.8,K=new o.Vector3(T.x+L,T.y-L,T.z+L);i.position.copy(K),i.lookAt(T),l.target.copy(T),l.update(),C.value.copy(K),N.value.copy(T),S()},getThreeJSObjects:()=>({scene:t,camera:i,renderer:s,controls:l,gizmo:m}),clearAllModels:()=>{if(!t)return;M.value.forEach(p=>{t.remove(p),E(p)});const _=[];t.children.forEach(p=>{!p.isLight&&!p.isCamera&&p.type!=="GridHelper"&&p!==x&&_.push(p)}),_.forEach(p=>{t.remove(p),E(p)}),M.value=[],S()},cleanup:()=>{b&&cancelAnimationFrame(b),r&&r.dispose(),x&&(x.geometry.dispose(),x.material.dispose()),s&&s.dispose(),l&&l.dispose(),m&&m.dispose()},updateGridForModels:S}}function Ae(a,t){const i=e.ref(!1);let s=null,l=12700,m=new o.Vector3,b=new o.Vector3,r=new o.Vector3,x=0,M=null;const C=n=>n<.5?4*n*n*n:1-Math.pow(-2*n+2,3)/2,N=n=>{const f=new o.Vector3,E=x*1.2,R=new o.Vector3(r.x+E,r.y,r.z),Z=new o.Vector3(r.x,r.y+E,r.z),I=new o.Vector3(r.x,r.y-E,r.z);if(n<=.567){const Y=n/.567*Math.PI*2;f.x=r.x+Math.cos(Y)*E,f.z=r.z+Math.sin(Y)*E,f.y=r.y}else if(n<=.724){const F=(n-.567)/.157,Y=C(F);f.lerpVectors(R,Z,Y)}else if(n<=.881){const F=(n-.724)/.157,_=C(F)*Math.PI;f.x=r.x+Math.sin(_)*E,f.y=r.y+Math.cos(_)*E,f.z=r.z}else{const F=(n-.881)/.119,Y=C(F);f.lerpVectors(I,m,Y)}return f},O=()=>{const{camera:n,controls:f}=a();if(!n||!f)return;s||(s=Date.now());const E=Date.now()-s,R=Math.min(E/l,1);if(R>=1){S();return}const Z=N(R);n.position.copy(Z),n.lookAt(r),f.target.copy(r),M=requestAnimationFrame(O)},h=()=>{if(t.value.length===0)return;const{camera:n,controls:f}=a();if(!n||!f)return;m.copy(n.position),b.copy(f.target);const E=new o.Box3;t.value.forEach(p=>{E.expandByObject(p)});const R=E.getSize(new o.Vector3);r=E.getCenter(new o.Vector3),x=Math.max(R.x,R.y,R.z)*1.2;const Z=new o.Vector3(r.x+x*1.2,r.y,r.z);f.enabled=!1;const I=n.position.clone(),F=1e3,Y=Date.now(),_=()=>{const p=Date.now()-Y,D=Math.min(p/F,1),U=C(D);n.position.lerpVectors(I,Z,U),n.lookAt(r),f.target.copy(r),D<1?requestAnimationFrame(_):(i.value=!0,s=null,O())};_()},S=()=>{i.value=!1,s=null,M&&(cancelAnimationFrame(M),M=null);const{controls:n}=a();n&&(n.enabled=!0,n.target.copy(b))};return{isAnimating:i,toggleAnimation:()=>{if(i.value){i.value=!1,s=null,M&&(cancelAnimationFrame(M),M=null);const{camera:n,controls:f}=a();if(!n||!f)return;f.enabled=!0;const E=n.position.clone(),R=f.target.clone(),Z=1500,I=Date.now(),F=()=>{const Y=Date.now()-I,_=Math.min(Y/Z,1),p=C(_);n.position.lerpVectors(E,m,p),f.target.lerpVectors(R,b,p),_<1&&requestAnimationFrame(F)};F()}else h()},startAnimation:h,stopAnimation:S}}function Ne(a,t){const i=e.ref(!1),s=e.ref("none");let l=[],m=[],b=new o.Box3,r=new o.Vector3;const x=()=>{l=[new o.Plane(new o.Vector3(1,0,0),0),new o.Plane(new o.Vector3(0,1,0),0),new o.Plane(new o.Vector3(0,0,1),0)]},M=()=>{b.makeEmpty(),t.value.forEach(v=>{b.expandByObject(v)}),r=b.getCenter(new o.Vector3)},C=v=>{const n=b.getSize(new o.Vector3);let f,E,R;v==="x"?(f=new o.PlaneGeometry(n.z*1.2,n.y*1.2),E=new o.Vector3(r.x,r.y,r.z),R=new o.Euler(0,Math.PI/2,0)):v==="y"?(f=new o.PlaneGeometry(n.x*1.2,n.z*1.2),E=new o.Vector3(r.x,r.y,r.z),R=new o.Euler(Math.PI/2,0,0)):v==="z"&&(f=new o.PlaneGeometry(n.x*1.2,n.y*1.2),E=new o.Vector3(r.x,r.y,r.z),R=new o.Euler(0,0,0));const Z=new o.MeshPhongMaterial({color:8900331,transparent:!0,opacity:.3,side:o.DoubleSide,depthWrite:!1}),I=new o.Mesh(f,Z);return I.position.copy(E),I.rotation.copy(R),I},N=()=>{if(O(),h(),s.value==="none")return;M();let v=null;if(s.value==="x"?(l[0].constant=-r.x,v=l[0]):s.value==="y"?(l[1].constant=-r.y,v=l[1]):s.value==="z"&&(l[2].constant=-r.z,v=l[2]),v){t.value.forEach(f=>{f.traverse(E=>{E.isMesh&&E.material&&(Array.isArray(E.material)?E.material.forEach(R=>{R.clippingPlanes=[v]}):E.material.clippingPlanes=[v])})});const{scene:n}=a();if(n){const f=C(s.value);n.add(f),m.push(f)}}},O=()=>{t.value.forEach(v=>{v.traverse(n=>{n.isMesh&&n.material&&(Array.isArray(n.material)?n.material.forEach(f=>{f.clippingPlanes=[]}):n.material.clippingPlanes=[])})})},h=()=>{const{scene:v}=a();v&&m.forEach(n=>{v.remove(n),n.geometry.dispose(),n.material.dispose()}),m=[]};return{isClipping:i,activeClippingAxis:s,toggleClipping:()=>{i.value=!i.value,i.value?(x(),t.value.length>0&&M()):(s.value="none",O(),h())},updateClippingPlanes:N,clearClippingPlanes:O,clearClippingMeshes:h}}const Re={class:"panel-content"},ze={__name:"animationTable",props:{animationData:Object,model:Object},setup(a){const t=a;e.ref();const i=e.ref();return e.watch(()=>[t==null?void 0:t.animationData],()=>{var l;let s=((l=fe.cloneDeep(t==null?void 0:t.animationData))==null?void 0:l.动画输出Content)??[];s&&(i.value=s)},{deep:!0,immediate:!0}),(s,l)=>{var m,b,r;return e.openBlock(),e.createElementBlock("div",Re,[(e.openBlock(),e.createBlock(o.ssTable,{itemData:(m=i.value)==null?void 0:m.compData,key:(b=i.value)==null?void 0:b.id,index:(r=i.value)==null?void 0:r.id,showHeader:!1},null,8,["itemData","index"]))])}}},Oe=ie._export_sfc(ze,[["__scopeId","data-v-02b89b4b"]]),Le={class:"panel-content"},je="id",Ie={__name:"urdfTree",props:{model:Object,maxExpandCount:{type:Number,default:10},expandStrategy:{type:String,default:"breadth",validator:a=>["breadth","firstLevel"].includes(a)}},emits:["nodeClick"],setup(a,{emit:t}){const i=a,s=t,l=e.ref([]),m={children:"children",label:"label"},b=h=>{s("nodeClick",h)},r=(h,S=0)=>{const v=[];return Array.isArray(h)&&(h==null?void 0:h.length)>0&&h.forEach(n=>{if(!(n!=null&&n.isMesh)&&((n==null?void 0:n.type)==="URDFJoint"||(n==null?void 0:n.type)==="URDFLink")){const f={name:n==null?void 0:n.name,label:n==null?void 0:n.name,show:!0,level:S+1,isPenultimate:!1,type:n==null?void 0:n.type,id:n==null?void 0:n.id,limit:(n==null?void 0:n.limit)??"",children:r(n==null?void 0:n.children,S+1),path:n==null?void 0:n.name};v.push(f)}}),v},x=h=>h?[{name:h==null?void 0:h.name,label:h==null?void 0:h.name,show:!0,level:1,isPenultimate:!1,type:h==null?void 0:h.type,id:h==null?void 0:h.id,limit:(h==null?void 0:h.limit)??"",children:r(h==null?void 0:h.children,1),path:h==null?void 0:h.name}]:[],M=(h,S)=>{const v=[],n=[...h];for(;n.length>0&&v.length<S;){const f=n.shift();f.children&&f.children.length>0&&(v.push(f.id),n.push(...f.children))}return v},C=(h,S)=>{const v=[];return h.forEach(n=>{if(n.children&&n.children.length>0){v.push(n.id);const f=n.children.filter(E=>E.children&&E.children.length>0).slice(0,S).map(E=>E.id);v.push(...f)}}),v.slice(0,S+1)},N=e.computed(()=>!l.value||l.value.length===0?[]:i.expandStrategy==="firstLevel"?C(l.value,i.maxExpandCount):M(l.value,i.maxExpandCount)),O=e.computed(()=>i!=null&&i.model?x(i.model):[]);return e.watch(O,h=>{l.value=JSON.parse(JSON.stringify(h))},{immediate:!0}),(h,S)=>{const v=e.resolveComponent("el-tree");return e.openBlock(),e.createElementBlock("div",Le,[e.createVNode(v,{data:l.value,props:m,"default-expanded-keys":N.value,"node-key":je,onNodeClick:b},null,8,["data","default-expanded-keys"])])}}},Be=ie._export_sfc(Ie,[["__scopeId","data-v-290ff4e1"]]),Ue={class:"panel-content"},Fe={key:0,class:"joints-list"},Ye={class:"joint-info-row"},Ze={class:"joint-left"},He={class:"joint-name"},Ke={class:"joint-range"},Xe={class:"joint-type"},$e={key:0,class:"joint-control-row"},Ge={class:"slider-container"},Je=["min","max","value","onInput","disabled"],qe={class:"value-display"},We={class:"joint-value"},Qe={class:"unit"},et={key:1,class:"empty-state"},se=.001,tt=1e3,he=60,ot={__name:"jointPanel",props:{model:Object,scene:Object,animationData:Object},setup(a,{expose:t}){const i=a;e.ref(!0);const s=e.ref([]),l=e.ref(null),m=e.ref(null),b=e.ref(12.5),r=e.ref(),x=e.ref(1302),M=e.ref(!1),C=e.ref(!1),N=e.ref(0),O=e.ref(0),h=e.ref(null),S=o.MathUtils.degToRad,v=e.ref(1),n=()=>tt/he/v.value;let f=[];e.watch(()=>i.animationData,c=>{var d;x.value=c.extra.管长,b.value=c.extra.外径/2;let w=((d=fe.cloneDeep(c))==null?void 0:d.动画输出)??[];w&&w.length>0&&(f=w)},{deep:!0}),e.computed(()=>f.length>0);const E=(c,w=!1)=>c==="revolute"?w?Math.PI:-Math.PI:c==="prismatic"?w?1:-1:0,R=()=>{if(!l.value)return ElMessage.error("未加载 URDF"),!1;let c=null;return l.value.traverse(w=>{w.name==="Pipe_Link"&&!c&&w.traverse(d=>{d instanceof o.Mesh&&!c&&(c=d)})}),c?(r.value=c,c.material=new o.MeshPhongMaterial({color:11184810,shininess:80,side:o.DoubleSide}),!0):(ElMessage.error("Pipe_Link 内未找到 Mesh"),!1)},Z=c=>{if(!c||!c.joints)return console.warn("URDF模型没有关节信息"),[];let w=null;if(c.traverse(P=>{P.name==="Pipe_Link"&&!w&&(w=P)}),w)r.value=w;else return console.warn("未找到管子模型"),[];const d=[];return Object.keys(c.joints).forEach(P=>{const y=c.joints[P];if(y._jointType==="fixed")return;const j=y.limit?{lower:y.limit.lower??E(y._jointType,!1),upper:y.limit.upper??E(y._jointType,!0)}:{lower:E(y._jointType,!1),upper:E(y._jointType,!0)};d.push({name:P,type:y._jointType||"unknown",limit:j,currentValue:y.angle||0,urdfJoint:y})}),d.sort((P,y)=>P.name.localeCompare(y.name))},I=(c,w)=>{const d=s.value.find(y=>y.name===c);if(!d)return;const P=parseFloat(w);if(d.limit){const y=Math.max(d.limit.lower,Math.min(d.limit.upper,P));d.currentValue=y}else d.currentValue=P;i.model&&i.model.setJointValue?i.model.setJointValue(c,d.currentValue):d.urdfJoint&&d.urdfJoint.setJointValue(d.currentValue)},F=c=>c.reduce((w,d)=>{let P=0;const y=d.Y??0,j=d.C??0,g=d.R??0;return y>0&&(P+=y),j>0&&g>0&&(P+=g*S(j)),w+P},0),Y=c=>{const w=[],d=c.Y??0,P=c.B??0,y=c.C??0,j=c.R??0,g={pos:new o.Vector3(0,0,0),localY:new o.Vector3(0,1,0),localX:new o.Vector3(1,0,0),localZ:new o.Vector3(0,0,1)};if(!d&&!y)return w;if(w.push(g.pos.clone()),P!==0){const u=new o.Matrix4().makeRotationAxis(g.localY,S(P));g.localX.applyMatrix4(u),g.localZ.applyMatrix4(u)}if(d>0&&(g.pos.add(g.localY.clone().multiplyScalar(d*se)),w.push(g.pos.clone())),y>0&&j>0){const u=S(y),z=j*se,X=g.pos.clone().add(g.localX.clone().multiplyScalar(-z)),Q=Math.max(16,Math.ceil(y/5));for(let $=1;$<=Q;$++){const te=u*$/Q,V=new o.Matrix4().makeRotationAxis(g.localZ,te),q=g.localX.clone().multiplyScalar(z).applyMatrix4(V),ee=X.clone().add(q);w.push(ee)}}return w},_=c=>{const w=f.slice(0,c+1),d=F(w),P=Math.max(0,x.value-d),y=[];y.push(new o.Vector3(0,0,0));const j=new o.Vector3(0,P*se,0);P>0&&y.push(j);let g={pos:j.clone(),localY:new o.Vector3(0,1,0),localX:new o.Vector3(1,0,0),localZ:new o.Vector3(0,0,1)};const u=[];for(let z=w.length-1;z>=0;z--){const X=w[z],Q=Y(X);if(Q.length>0){const $=Q.map(q=>{const ee=q.clone(),de=new o.Matrix4;return de.makeBasis(g.localX,g.localY,g.localZ),ee.applyMatrix4(de),ee.add(g.pos)});u.push($);const te=$[$.length-1];g.pos=te.clone();const V=X.B??0,J=X.C??0;if(V!==0){const q=new o.Matrix4().makeRotationAxis(g.localY,S(V));g.localX.applyMatrix4(q),g.localZ.applyMatrix4(q)}if(J>0){const q=S(J),ee=new o.Matrix4().makeRotationAxis(g.localZ,q);g.localY.applyMatrix4(ee),g.localX.applyMatrix4(ee)}}}for(const z of u)z.length>1&&y.push(...z.slice(1));y.length<2&&y.push(new o.Vector3(0,.001,0));try{const z=new o.CatmullRomCurve3(y,!1,"catmullrom",.01),X=new o.TubeGeometry(z,Math.max(2,y.length*4),b.value*se,18,!1);r.value.geometry.dispose(),r.value.geometry=X}catch(z){console.error("管件更新失败",z)}},p=(c,w)=>{c&&(Object.keys(c).forEach(d=>{const P=c[d],y=s.value.find(j=>j.name===d);y&&(y.currentValue=P,i.model&&i.model.setJointValue?i.model.setJointValue(d,P):y.urdfJoint&&y.urdfJoint.setJointValue(P))}),_(w))},D=(c,w,d)=>c+(w-c)*d,U=(c,w,d)=>{if(!c||!w)return c||w;const P={};return Object.keys(c).forEach(y=>{const j=c[y],g=w[y];P[y]=D(j,g||j,d)}),P},T=()=>{if(f.length===0){console.warn("没有动画数据");return}R(),M.value=!0,C.value=!1;const c=()=>{if(!M.value||C.value)return;const w=O.value/he,d=N.value,P=f[N.value],y=f[N.value+1];if(y){const j=U(P,y,w);p(j,d)}else p(P,d);if(O.value++,O.value>=he&&(O.value=0,N.value++,N.value>=f.length-1)){L();return}h.value=setTimeout(c,n())};c()},W=()=>{C.value=!0,h.value&&(clearTimeout(h.value),h.value=null)},L=()=>{M.value=!1,C.value=!1,v.value=1,h.value&&(clearTimeout(h.value),h.value=null)};t({startAnimation:T,pauseAnimation:W,stopAnimation:L,resetAll:()=>{L(),N.value=0,O.value=0,s.value.forEach(c=>{(c.type==="revolute"||c.type==="prismatic")&&I(c.name,0)})},fastForward:()=>{v.value<4&&(v.value=Math.min(4,v.value*2))},fastBackward:()=>{v.value>.25&&(v.value=Math.max(.25,v.value/2))}}),e.watch(()=>i.model,c=>{c?(l.value=c,s.value=Z(c)):s.value=[]},{immediate:!0});const ae=()=>{!i.model||M.value&&!C.value||s.value.forEach(c=>{c.urdfJoint&&c.urdfJoint.angle!==void 0&&(c.currentValue=c.urdfJoint.angle)})},le=()=>{const c=()=>{ae(),m.value=requestAnimationFrame(c)};c()},re=()=>{m.value&&(cancelAnimationFrame(m.value),m.value=null)};return e.onMounted(()=>{le()}),e.onUnmounted(()=>{re(),L()}),(c,w)=>(e.openBlock(),e.createElementBlock("div",Ue,[s.value.length>0?(e.openBlock(),e.createElementBlock("div",Fe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,d=>{var P,y,j,g;return e.openBlock(),e.createElementBlock("div",{key:d.name,class:"joint-item"},[e.createElementVNode("div",Ye,[e.createElementVNode("div",Ze,[e.createElementVNode("span",He,e.toDisplayString(d.name),1),e.createElementVNode("span",Ke," ["+e.toDisplayString(((P=d.limit)==null?void 0:P.lower.toFixed(2))??(d.type==="revolute"?"-3.14":"-1.00"))+", "+e.toDisplayString(((y=d.limit)==null?void 0:y.upper.toFixed(2))??(d.type==="revolute"?"3.14":"1.00"))+"] ",1)]),e.createElementVNode("span",Xe,e.toDisplayString(d.type),1)]),d.type==="revolute"||d.type==="prismatic"?(e.openBlock(),e.createElementBlock("div",$e,[e.createElementVNode("div",Ge,[e.createElementVNode("input",{type:"range",min:((j=d.limit)==null?void 0:j.lower)??(d.type==="revolute"?-Math.PI:-1),max:((g=d.limit)==null?void 0:g.upper)??(d.type==="revolute"?Math.PI:1),step:.01,value:d.currentValue,onInput:u=>I(d.name,u.target.value),class:"joint-slider",disabled:M.value&&!C.value},null,40,Je)]),e.createElementVNode("div",qe,[e.createElementVNode("span",We,e.toDisplayString(d.currentValue?Number(d.currentValue).toFixed(3):"0.000"),1),e.createElementVNode("span",Qe,e.toDisplayString(d.type==="revolute"?"rad":"m"),1)])])):e.createCommentVNode("",!0)])}),128))])):(e.openBlock(),e.createElementBlock("div",et,w[0]||(w[0]=[e.createElementVNode("p",null,"未检测到可控制的关节",-1)])))]))}},it=ie._export_sfc(ot,[["__scopeId","data-v-bc6f97a7"]]),nt=["xlink:href"],st=e.defineComponent({__name:"svgIcon",props:{backgroundColor:{default:"#f0f0f0"},prefix:{default:"icon"},name:{},size:{default:16},spin:{type:Boolean,default:!1},active:{type:Boolean,default:!1}},setup(a){const t=a,i=e.computed(()=>({backgroundColor:t.backgroundColor})),s=e.computed(()=>`#${t.prefix}-${t.name}`),l=e.computed(()=>{const{size:m}=t;let b=`${m}`;return b=`${b.replace("px","")}px`,{width:b,height:b}});return(m,b)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["container",{active:m.active}]),style:e.normalizeStyle(i.value)},[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["svg-icon",[m.$attrs.class,m.spin&&"svg-icon-spin"]]),style:e.normalizeStyle(l.value),"aria-hidden":"true"},[e.createElementVNode("use",{"xlink:href":s.value},null,8,nt)],6))],6))}}),A=ie._export_sfc(st,[["__scopeId","data-v-3150a90b"]]),at={class:"obj-viewer-container"},lt={class:"buttonGroup-top"},rt={class:"buttonGroup-topLeft"},ct={class:"buttonGroup-left"},ht={class:"buttonGroup-right"},ut={class:"buttonGroup-bottom"},dt={class:"left-panel"},pt={class:"panel-header"},mt={key:1,class:"clipping-content"},ft={class:"radio-group"},_t={class:"radio-label"},gt={class:"radio-label"},yt={class:"radio-label"},vt={class:"radio-label"},bt={class:"right-panel"},wt={class:"panel-header"},Et={key:0,class:"loading-overlay"},Pt={__name:"threeModel",props:{animationData:{type:Object,default:()=>{}}},emits:["getAnimationData"],setup(a,{expose:t,emit:i}){const s=i;let l=null,m=!1;const b=e.ref(null),r=e.ref(!1),x=e.ref("");e.ref(!1);const M=e.ref(!1),C=e.ref(!1),N=e.ref(""),O=e.ref(!1),h=e.ref(""),S=e.ref(),{currentModels:v,initialCameraPosition:n,initialTargetPosition:f,initThreeJS:E,handleResize:R,fitCameraToAllModels:Z,getThreeJSObjects:I,clearAllModels:F,cleanup:Y}=Ce(b),{isAnimating:_,toggleAnimation:p,stopAnimation:D}=Ae(I,v),{isClipping:U,activeClippingAxis:T,toggleClipping:W,updateClippingPlanes:L}=Ne(I,v),{addModelsFromUrls:K,loadModelByDefaultPath:G,urdfModel:oe,modelBoundingBoxes:ae}=o.useModelLoader(I,v,r,x,F),le=()=>{if(M.value||v.value.length===0)return;M.value=!0,_.value&&D();const{camera:g,controls:u}=I();if(!g||!u)return;u.enabled=!0;const z=J=>J<.5?4*J*J*J:1-Math.pow(-2*J+2,3)/2,X=g.position.clone(),Q=u.target.clone(),$=1500,te=Date.now(),V=()=>{const J=Date.now()-te,q=Math.min(J/$,1),ee=z(q);g.position.lerpVectors(X,n.value,ee),u.target.lerpVectors(Q,f.value,ee),q<1?requestAnimationFrame(V):M.value=!1};V()},re=async()=>m?Promise.resolve():new Promise(g=>{const u=()=>{m?g():requestAnimationFrame(u)};u()}),c=async(g,u)=>{try{await re(),_.value&&D(),U.value&&W();const z=await u(g);return Z(ae),z}catch(z){throw console.error("加载模型失败:",z),z}},w=async g=>c(g,K),d=async g=>c(g,G),P=g=>{C.value=!0,N.value=g,g==="剖面视图"&&!U.value&&W()},y=g=>{O.value=!0,h.value=g,g==="动画仿真"&&s("getAnimationData")},j=()=>{e.nextTick(()=>{var g;(g=S.value)==null||g.startAnimation()})};return e.onMounted(async()=>{await e.nextTick();try{E(),l=I().scene,m=!0,window.addEventListener("resize",R)}catch(g){console.error("Three.js初始化失败:",g)}}),e.onBeforeUnmount(()=>{m=!1,N.value="",h.value="",window.removeEventListener("resize",R),_.value&&D(),Y()}),t({addModelsFromUrls:w,loadModelByDefaultPath:d}),(g,u)=>{var X,Q,$,te;const z=e.resolveComponent("el-scrollbar");return e.openBlock(),e.createElementBlock("div",at,[e.createElementVNode("div",{ref_key:"threejsContainer",ref:b,class:"threejs-container"},null,512),e.createElementVNode("div",lt,[e.createVNode(A,{name:"guanjianjiexi",size:"34"}),e.createVNode(A,{name:"guanjiekongzhi",size:"34"}),e.createVNode(A,{name:"gongyishengcheng",size:"34"}),e.createVNode(A,{name:"buchangshezhi",size:"34"}),e.createVNode(A,{name:"shuchujiagongchengxu",size:"34"})]),e.createElementVNode("div",rt,[e.createVNode(A,{name:"viewReset",size:"24",onClick:le,title:"重置"}),e.createVNode(A,{name:"fangda",size:"24",title:"放大"}),e.createVNode(A,{name:"suoxiao",size:"24",title:"缩小"}),e.createVNode(A,{name:"lookAround",size:"24",onClick:e.unref(p),title:e.unref(_)?"停止动画":"动画视图"},null,8,["onClick","title"])]),e.createElementVNode("div",ct,[e.createVNode(A,{name:"jiegoushu",size:"24",onClick:u[0]||(u[0]=V=>P("场景树")),active:C.value&&N.value==="场景树",title:"场景树"},null,8,["active"]),e.createVNode(A,{name:"clipping",size:"24",onClick:u[1]||(u[1]=V=>P("剖面视图")),active:C.value&&N.value==="剖面视图",title:"剖面视图"},null,8,["active"]),e.createVNode(A,{name:"donghuafangzhen",size:"24",onClick:u[2]||(u[2]=V=>P("场景树3"))}),e.createVNode(A,{name:"donghuafangzhen",size:"24",onClick:u[3]||(u[3]=V=>P("场景4"))})]),e.createElementVNode("div",ht,[e.createVNode(A,{name:"donghuafangzhen",size:"24"}),e.createVNode(A,{name:"donghuafangzhen",size:"24"}),e.createVNode(A,{name:"guanjiekongzhi",size:"24",onClick:u[4]||(u[4]=V=>y("关节控制")),active:O.value&&h.value==="关节控制",title:"关节控制"},null,8,["active"]),e.createVNode(A,{name:"donghuafangzhen",size:"24",title:"动画仿真",onClick:u[5]||(u[5]=V=>y("动画仿真")),active:O.value&&h.value==="动画仿真"},null,8,["active"]),e.createVNode(A,{name:"donghuafangzhen",size:"24"}),e.createVNode(A,{name:"donghuafangzhen",size:"24"})]),e.createElementVNode("div",ut,[e.createVNode(A,{name:"kuaitui",size:"24",backgroundColor:"#ffffff",title:"快退",onClick:(X=S.value)==null?void 0:X.fastBackward},null,8,["onClick"]),e.createVNode(A,{name:"bofang",size:"24",backgroundColor:"#ffffff",title:"播放",onClick:j}),e.createVNode(A,{name:"kuaijin",size:"24",backgroundColor:"#ffffff",title:"快进",onClick:(Q=S.value)==null?void 0:Q.fastForward},null,8,["onClick"]),e.createVNode(A,{name:"zanting",size:"24",backgroundColor:"#ffffff",title:"暂停",onClick:($=S.value)==null?void 0:$.pauseAnimation},null,8,["onClick"]),e.createVNode(A,{name:"zhongzhi",size:"24",backgroundColor:"#ffffff",title:"停止",onClick:(te=S.value)==null?void 0:te.resetAll},null,8,["onClick"])]),e.withDirectives(e.createElementVNode("div",dt,[e.createElementVNode("div",pt,[e.createElementVNode("span",null,e.toDisplayString(N.value),1),e.createElementVNode("span",{class:"close",onClick:u[6]||(u[6]=V=>C.value=!1)}," X ")]),e.createVNode(z,{"max-height":"650px"},{default:e.withCtx(()=>[N.value==="场景树"?(e.openBlock(),e.createBlock(Be,{key:0,model:e.unref(oe)},null,8,["model"])):e.createCommentVNode("",!0),N.value==="剖面视图"?(e.openBlock(),e.createElementBlock("div",mt,[e.createElementVNode("div",ft,[e.createElementVNode("label",_t,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"none","onUpdate:modelValue":u[7]||(u[7]=V=>e.isRef(T)?T.value=V:null),onChange:u[8]||(u[8]=(...V)=>e.unref(L)&&e.unref(L)(...V))},null,544),[[e.vModelRadio,e.unref(T)]]),u[16]||(u[16]=e.createElementVNode("span",{class:"radio-text"},"无切割",-1))]),e.createElementVNode("label",gt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"x","onUpdate:modelValue":u[9]||(u[9]=V=>e.isRef(T)?T.value=V:null),onChange:u[10]||(u[10]=(...V)=>e.unref(L)&&e.unref(L)(...V))},null,544),[[e.vModelRadio,e.unref(T)]]),u[17]||(u[17]=e.createElementVNode("span",{class:"radio-text"},"X轴切割",-1))]),e.createElementVNode("label",yt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"y","onUpdate:modelValue":u[11]||(u[11]=V=>e.isRef(T)?T.value=V:null),onChange:u[12]||(u[12]=(...V)=>e.unref(L)&&e.unref(L)(...V))},null,544),[[e.vModelRadio,e.unref(T)]]),u[18]||(u[18]=e.createElementVNode("span",{class:"radio-text"},"Y轴切割",-1))]),e.createElementVNode("label",vt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"z","onUpdate:modelValue":u[13]||(u[13]=V=>e.isRef(T)?T.value=V:null),onChange:u[14]||(u[14]=(...V)=>e.unref(L)&&e.unref(L)(...V))},null,544),[[e.vModelRadio,e.unref(T)]]),u[19]||(u[19]=e.createElementVNode("span",{class:"radio-text"},"Z轴切割",-1))])])])):e.createCommentVNode("",!0)]),_:1})],512),[[e.vShow,C.value]]),e.withDirectives(e.createElementVNode("div",bt,[e.createElementVNode("div",wt,[e.createElementVNode("span",null,e.toDisplayString(h.value),1),e.createElementVNode("span",{class:"close",onClick:u[15]||(u[15]=V=>O.value=!1)}," X ")]),e.createVNode(z,{"max-height":"650px"},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(it,{ref_key:"jointRef",ref:S,model:e.unref(oe),scene:e.unref(l),animationData:a.animationData},null,8,["model","scene","animationData"]),[[e.vShow,h.value==="关节控制"]]),e.withDirectives(e.createVNode(Oe,{animationData:a.animationData},null,8,["animationData"]),[[e.vShow,h.value==="动画仿真"]])]),_:1})],512),[[e.vShow,O.value]]),r.value?(e.openBlock(),e.createElementBlock("div",Et,[u[20]||(u[20]=e.createElementVNode("div",{class:"loading-spinner"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(x.value),1)])):e.createCommentVNode("",!0)])}}},Mt=ie._export_sfc(Pt,[["__scopeId","data-v-3230489b"]]);exports.default=Mt;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-DTxA0aLx.cjs"),ie=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),fe=require("./menu-CcabvNj6.cjs"),pe={type:"change"},ue={type:"start"},_e={type:"end"},ne=new o.Ray,me=new o.Plane,ge=Math.cos(70*o.MathUtils.DEG2RAD),B=new o.Vector3,H=2*Math.PI,k={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},ce=1e-6;class ye extends o.Controls{constructor(t,i=null){super(t,i),this.state=k.NONE,this.target=new o.Vector3,this.cursor=new o.Vector3,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=.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:o.MOUSE.ROTATE,MIDDLE:o.MOUSE.DOLLY,RIGHT:o.MOUSE.PAN},this.touches={ONE:o.TOUCH.ROTATE,TWO:o.TOUCH.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this._lastPosition=new o.Vector3,this._lastQuaternion=new o.Quaternion,this._lastTargetPosition=new o.Vector3,this._quat=new o.Quaternion().setFromUnitVectors(t.up,new o.Vector3(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new o.Spherical,this._sphericalDelta=new o.Spherical,this._scale=1,this._panOffset=new o.Vector3,this._rotateStart=new o.Vector2,this._rotateEnd=new o.Vector2,this._rotateDelta=new o.Vector2,this._panStart=new o.Vector2,this._panEnd=new o.Vector2,this._panDelta=new o.Vector2,this._dollyStart=new o.Vector2,this._dollyEnd=new o.Vector2,this._dollyDelta=new o.Vector2,this._dollyDirection=new o.Vector3,this._mouse=new o.Vector2,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=be.bind(this),this._onPointerDown=ve.bind(this),this._onPointerUp=we.bind(this),this._onContextMenu=Se.bind(this),this._onMouseWheel=Me.bind(this),this._onKeyDown=xe.bind(this),this._onTouchStart=De.bind(this),this._onTouchMove=Ve.bind(this),this._onMouseDown=Ee.bind(this),this._onMouseMove=Pe.bind(this),this._interceptControlDown=ke.bind(this),this._interceptControlUp=Te.bind(this),this.domElement!==null&&this.connect(this.domElement),this.update()}connect(t){super.connect(t),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"}disconnect(){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"}dispose(){this.disconnect()}getPolarAngle(){return this._spherical.phi}getAzimuthalAngle(){return this._spherical.theta}getDistance(){return this.object.position.distanceTo(this.target)}listenToKeyEvents(t){t.addEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=t}stopListenToKeyEvents(){this._domElementKeyEvents!==null&&(this._domElementKeyEvents.removeEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=null)}saveState(){this.target0.copy(this.target),this.position0.copy(this.object.position),this.zoom0=this.object.zoom}reset(){this.target.copy(this.target0),this.object.position.copy(this.position0),this.object.zoom=this.zoom0,this.object.updateProjectionMatrix(),this.dispatchEvent(pe),this.update(),this.state=k.NONE}update(t=null){const i=this.object.position;B.copy(i).sub(this.target),B.applyQuaternion(this._quat),this._spherical.setFromVector3(B),this.autoRotate&&this.state===k.NONE&&this._rotateLeft(this._getAutoRotationAngle(t)),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);let s=this.minAzimuthAngle,l=this.maxAzimuthAngle;isFinite(s)&&isFinite(l)&&(s<-Math.PI?s+=H:s>Math.PI&&(s-=H),l<-Math.PI?l+=H:l>Math.PI&&(l-=H),s<=l?this._spherical.theta=Math.max(s,Math.min(l,this._spherical.theta)):this._spherical.theta=this._spherical.theta>(s+l)/2?Math.max(s,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);let m=!1;if(this.zoomToCursor&&this._performCursorZoom||this.object.isOrthographicCamera)this._spherical.radius=this._clampDistance(this._spherical.radius);else{const b=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),m=b!=this._spherical.radius}if(B.setFromSpherical(this._spherical),B.applyQuaternion(this._quatInverse),i.copy(this.target).add(B),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){let b=null;if(this.object.isPerspectiveCamera){const r=B.length();b=this._clampDistance(r*this._scale);const x=r-b;this.object.position.addScaledVector(this._dollyDirection,x),this.object.updateMatrixWorld(),m=!!x}else if(this.object.isOrthographicCamera){const r=new o.Vector3(this._mouse.x,this._mouse.y,0);r.unproject(this.object);const x=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),m=x!==this.object.zoom;const M=new o.Vector3(this._mouse.x,this._mouse.y,0);M.unproject(this.object),this.object.position.sub(M).add(r),this.object.updateMatrixWorld(),b=B.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),this.zoomToCursor=!1;b!==null&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(b).add(this.object.position):(ne.origin.copy(this.object.position),ne.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(ne.direction))<ge?this.object.lookAt(this.target):(me.setFromNormalAndCoplanarPoint(this.object.up,this.target),ne.intersectPlane(me,this.target))))}else if(this.object.isOrthographicCamera){const b=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),b!==this.object.zoom&&(this.object.updateProjectionMatrix(),m=!0)}return this._scale=1,this._performCursorZoom=!1,m||this._lastPosition.distanceToSquared(this.object.position)>ce||8*(1-this._lastQuaternion.dot(this.object.quaternion))>ce||this._lastTargetPosition.distanceToSquared(this.target)>ce?(this.dispatchEvent(pe),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(t){return t!==null?H/60*this.autoRotateSpeed*t:H/60/60*this.autoRotateSpeed}_getZoomScale(t){const i=Math.abs(t*.01);return Math.pow(.95,this.zoomSpeed*i)}_rotateLeft(t){this._sphericalDelta.theta-=t}_rotateUp(t){this._sphericalDelta.phi-=t}_panLeft(t,i){B.setFromMatrixColumn(i,0),B.multiplyScalar(-t),this._panOffset.add(B)}_panUp(t,i){this.screenSpacePanning===!0?B.setFromMatrixColumn(i,1):(B.setFromMatrixColumn(i,0),B.crossVectors(this.object.up,B)),B.multiplyScalar(t),this._panOffset.add(B)}_pan(t,i){const s=this.domElement;if(this.object.isPerspectiveCamera){const l=this.object.position;B.copy(l).sub(this.target);let m=B.length();m*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*t*m/s.clientHeight,this.object.matrix),this._panUp(2*i*m/s.clientHeight,this.object.matrix)}else this.object.isOrthographicCamera?(this._panLeft(t*(this.object.right-this.object.left)/this.object.zoom/s.clientWidth,this.object.matrix),this._panUp(i*(this.object.top-this.object.bottom)/this.object.zoom/s.clientHeight,this.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),this.enablePan=!1)}_dollyOut(t){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale/=t:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_dollyIn(t){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale*=t:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_updateZoomParameters(t,i){if(!this.zoomToCursor)return;this._performCursorZoom=!0;const s=this.domElement.getBoundingClientRect(),l=t-s.left,m=i-s.top,b=s.width,r=s.height;this._mouse.x=l/b*2-1,this._mouse.y=-(m/r)*2+1,this._dollyDirection.set(this._mouse.x,this._mouse.y,1).unproject(this.object).sub(this.object.position).normalize()}_clampDistance(t){return Math.max(this.minDistance,Math.min(this.maxDistance,t))}_handleMouseDownRotate(t){this._rotateStart.set(t.clientX,t.clientY)}_handleMouseDownDolly(t){this._updateZoomParameters(t.clientX,t.clientX),this._dollyStart.set(t.clientX,t.clientY)}_handleMouseDownPan(t){this._panStart.set(t.clientX,t.clientY)}_handleMouseMoveRotate(t){this._rotateEnd.set(t.clientX,t.clientY),this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const i=this.domElement;this._rotateLeft(H*this._rotateDelta.x/i.clientHeight),this._rotateUp(H*this._rotateDelta.y/i.clientHeight),this._rotateStart.copy(this._rotateEnd),this.update()}_handleMouseMoveDolly(t){this._dollyEnd.set(t.clientX,t.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()}_handleMouseMovePan(t){this._panEnd.set(t.clientX,t.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()}_handleMouseWheel(t){this._updateZoomParameters(t.clientX,t.clientY),t.deltaY<0?this._dollyIn(this._getZoomScale(t.deltaY)):t.deltaY>0&&this._dollyOut(this._getZoomScale(t.deltaY)),this.update()}_handleKeyDown(t){let i=!1;switch(t.code){case this.keys.UP:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateUp(H*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,this.keyPanSpeed),i=!0;break;case this.keys.BOTTOM:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateUp(-H*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,-this.keyPanSpeed),i=!0;break;case this.keys.LEFT:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateLeft(H*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(this.keyPanSpeed,0),i=!0;break;case this.keys.RIGHT:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateLeft(-H*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(-this.keyPanSpeed,0),i=!0;break}i&&(t.preventDefault(),this.update())}_handleTouchStartRotate(t){if(this._pointers.length===1)this._rotateStart.set(t.pageX,t.pageY);else{const i=this._getSecondPointerPosition(t),s=.5*(t.pageX+i.x),l=.5*(t.pageY+i.y);this._rotateStart.set(s,l)}}_handleTouchStartPan(t){if(this._pointers.length===1)this._panStart.set(t.pageX,t.pageY);else{const i=this._getSecondPointerPosition(t),s=.5*(t.pageX+i.x),l=.5*(t.pageY+i.y);this._panStart.set(s,l)}}_handleTouchStartDolly(t){const i=this._getSecondPointerPosition(t),s=t.pageX-i.x,l=t.pageY-i.y,m=Math.sqrt(s*s+l*l);this._dollyStart.set(0,m)}_handleTouchStartDollyPan(t){this.enableZoom&&this._handleTouchStartDolly(t),this.enablePan&&this._handleTouchStartPan(t)}_handleTouchStartDollyRotate(t){this.enableZoom&&this._handleTouchStartDolly(t),this.enableRotate&&this._handleTouchStartRotate(t)}_handleTouchMoveRotate(t){if(this._pointers.length==1)this._rotateEnd.set(t.pageX,t.pageY);else{const s=this._getSecondPointerPosition(t),l=.5*(t.pageX+s.x),m=.5*(t.pageY+s.y);this._rotateEnd.set(l,m)}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const i=this.domElement;this._rotateLeft(H*this._rotateDelta.x/i.clientHeight),this._rotateUp(H*this._rotateDelta.y/i.clientHeight),this._rotateStart.copy(this._rotateEnd)}_handleTouchMovePan(t){if(this._pointers.length===1)this._panEnd.set(t.pageX,t.pageY);else{const i=this._getSecondPointerPosition(t),s=.5*(t.pageX+i.x),l=.5*(t.pageY+i.y);this._panEnd.set(s,l)}this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd)}_handleTouchMoveDolly(t){const i=this._getSecondPointerPosition(t),s=t.pageX-i.x,l=t.pageY-i.y,m=Math.sqrt(s*s+l*l);this._dollyEnd.set(0,m),this._dollyDelta.set(0,Math.pow(this._dollyEnd.y/this._dollyStart.y,this.zoomSpeed)),this._dollyOut(this._dollyDelta.y),this._dollyStart.copy(this._dollyEnd);const b=(t.pageX+i.x)*.5,r=(t.pageY+i.y)*.5;this._updateZoomParameters(b,r)}_handleTouchMoveDollyPan(t){this.enableZoom&&this._handleTouchMoveDolly(t),this.enablePan&&this._handleTouchMovePan(t)}_handleTouchMoveDollyRotate(t){this.enableZoom&&this._handleTouchMoveDolly(t),this.enableRotate&&this._handleTouchMoveRotate(t)}_addPointer(t){this._pointers.push(t.pointerId)}_removePointer(t){delete this._pointerPositions[t.pointerId];for(let i=0;i<this._pointers.length;i++)if(this._pointers[i]==t.pointerId){this._pointers.splice(i,1);return}}_isTrackingPointer(t){for(let i=0;i<this._pointers.length;i++)if(this._pointers[i]==t.pointerId)return!0;return!1}_trackPointer(t){let i=this._pointerPositions[t.pointerId];i===void 0&&(i=new o.Vector2,this._pointerPositions[t.pointerId]=i),i.set(t.pageX,t.pageY)}_getSecondPointerPosition(t){const i=t.pointerId===this._pointers[0]?this._pointers[1]:this._pointers[0];return this._pointerPositions[i]}_customWheelEvent(t){const i=t.deltaMode,s={clientX:t.clientX,clientY:t.clientY,deltaY:t.deltaY};switch(i){case 1:s.deltaY*=16;break;case 2:s.deltaY*=100;break}return t.ctrlKey&&!this._controlActive&&(s.deltaY*=10),s}}function ve(a){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)))}function be(a){this.enabled!==!1&&(a.pointerType==="touch"?this._onTouchMove(a):this._onMouseMove(a))}function we(a){switch(this._removePointer(a),this._pointers.length){case 0:this.domElement.releasePointerCapture(a.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.dispatchEvent(_e),this.state=k.NONE;break;case 1:const t=this._pointers[0],i=this._pointerPositions[t];this._onTouchStart({pointerId:t,pageX:i.x,pageY:i.y});break}}function Ee(a){let t;switch(a.button){case 0:t=this.mouseButtons.LEFT;break;case 1:t=this.mouseButtons.MIDDLE;break;case 2:t=this.mouseButtons.RIGHT;break;default:t=-1}switch(t){case o.MOUSE.DOLLY:if(this.enableZoom===!1)return;this._handleMouseDownDolly(a),this.state=k.DOLLY;break;case o.MOUSE.ROTATE:if(a.ctrlKey||a.metaKey||a.shiftKey){if(this.enablePan===!1)return;this._handleMouseDownPan(a),this.state=k.PAN}else{if(this.enableRotate===!1)return;this._handleMouseDownRotate(a),this.state=k.ROTATE}break;case o.MOUSE.PAN:if(a.ctrlKey||a.metaKey||a.shiftKey){if(this.enableRotate===!1)return;this._handleMouseDownRotate(a),this.state=k.ROTATE}else{if(this.enablePan===!1)return;this._handleMouseDownPan(a),this.state=k.PAN}break;default:this.state=k.NONE}this.state!==k.NONE&&this.dispatchEvent(ue)}function Pe(a){switch(this.state){case k.ROTATE:if(this.enableRotate===!1)return;this._handleMouseMoveRotate(a);break;case k.DOLLY:if(this.enableZoom===!1)return;this._handleMouseMoveDolly(a);break;case k.PAN:if(this.enablePan===!1)return;this._handleMouseMovePan(a);break}}function Me(a){this.enabled===!1||this.enableZoom===!1||this.state!==k.NONE||(a.preventDefault(),this.dispatchEvent(ue),this._handleMouseWheel(this._customWheelEvent(a)),this.dispatchEvent(_e))}function xe(a){this.enabled!==!1&&this._handleKeyDown(a)}function De(a){switch(this._trackPointer(a),this._pointers.length){case 1:switch(this.touches.ONE){case o.TOUCH.ROTATE:if(this.enableRotate===!1)return;this._handleTouchStartRotate(a),this.state=k.TOUCH_ROTATE;break;case o.TOUCH.PAN:if(this.enablePan===!1)return;this._handleTouchStartPan(a),this.state=k.TOUCH_PAN;break;default:this.state=k.NONE}break;case 2:switch(this.touches.TWO){case o.TOUCH.DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchStartDollyPan(a),this.state=k.TOUCH_DOLLY_PAN;break;case o.TOUCH.DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchStartDollyRotate(a),this.state=k.TOUCH_DOLLY_ROTATE;break;default:this.state=k.NONE}break;default:this.state=k.NONE}this.state!==k.NONE&&this.dispatchEvent(ue)}function Ve(a){switch(this._trackPointer(a),this.state){case k.TOUCH_ROTATE:if(this.enableRotate===!1)return;this._handleTouchMoveRotate(a),this.update();break;case k.TOUCH_PAN:if(this.enablePan===!1)return;this._handleTouchMovePan(a),this.update();break;case k.TOUCH_DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchMoveDollyPan(a),this.update();break;case k.TOUCH_DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchMoveDollyRotate(a),this.update();break;default:this.state=k.NONE}}function Se(a){this.enabled!==!1&&a.preventDefault()}function ke(a){a.key==="Control"&&(this._controlActive=!0,this.domElement.getRootNode().addEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function Te(a){a.key==="Control"&&(this._controlActive=!1,this.domElement.getRootNode().removeEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function Ce(a){let t=null,i=null,s=null,l=null,m=null,b=null,r=null,x=null;const M=e.ref([]),C=e.ref(new o.Vector3),N=e.ref(new o.Vector3),O=()=>{if(!a.value)return;t=new o.Scene,t.background=new o.Color(15790320);const _=a.value;i=new o.PerspectiveCamera(75,_.clientWidth/_.clientHeight,.1,1e4),i.position.set(8,-8,6),i.up.set(0,0,1),i.lookAt(0,0,0),s=new o.WebGLRenderer({antialias:!0,alpha:!0}),s.setSize(_.clientWidth,_.clientHeight),s.localClippingEnabled=!0,s.shadowMap.enabled=!0,s.shadowMap.type=o.PCFSoftShadowMap,s.toneMapping=o.ACESFilmicToneMapping,s.toneMappingExposure=1,s.outputColorSpace=o.SRGBColorSpace,_.appendChild(s.domElement),l=new ye(i,s.domElement),l.enableDamping=!0,l.dampingFactor=.05,l.mouseButtons={LEFT:null,MIDDLE:o.MOUSE.PAN,RIGHT:o.MOUSE.ROTATE},l.panSpeed=.7,m=new o.Xe(i,s,{container:_,type:"cube",placement:"top-right",offset:{top:10,right:10},background:{color:"#D1D1D1",opacity:1},front:{label:"Top"},bottom:{label:"Front"},left:{label:"Left"},right:{label:"Right"},top:{label:"Back"},back:{label:"Bottom"}}),m.attachControls(l),v(),n()},h=(_,p)=>{r&&(t.remove(r),r.dispose()),x&&(t.remove(x),x.geometry.dispose(),x.material.dispose());const D=Math.min(Math.max(Math.floor(_/20),30),40);r=new o.GridHelper(_,D,13421772,14540253),r.rotateX(Math.PI/2),r.position.copy(p),t.add(r);const U=new o.PlaneGeometry(_,_),T=new o.ShadowMaterial({opacity:.3,color:0});x=new o.Mesh(U,T),x.position.copy(p),x.position.z-=.01,x.receiveShadow=!0,t.add(x)},S=()=>{if(M.value.length===0)return;const _=new o.Box3;let p=!1;if(M.value.forEach(K=>{if(K.userData.boundingBox)_.union(K.userData.boundingBox),p=!0;else if(K.userData.modelId&&modelBoundingBoxes.has(K.userData.modelId)){const G=modelBoundingBoxes.get(K.userData.modelId);_.union(G.box),p=!0}else _.expandByObject(K),p=!0}),!p){console.warn("无法计算包围盒,网格更新失败");return}const D=_.getSize(new o.Vector3),U=_.getCenter(new o.Vector3),T=Math.max(D.x,D.y,D.z),W=Math.max(T*8,50),L=new o.Vector3(U.x,U.y,_.min.z);h(W,L)},v=()=>{const _=new o.AmbientLight(4210752,.6);t.add(_);const p=new o.DirectionalLight(16777215,2);p.position.set(10,10,8),p.castShadow=!0,p.shadow.mapSize.width=4096,p.shadow.mapSize.height=4096,p.shadow.camera.near=.5,p.shadow.camera.far=50,p.shadow.camera.left=-50,p.shadow.camera.right=50,p.shadow.camera.top=50,p.shadow.camera.bottom=-50,t.add(p);const D=new o.DirectionalLight(16777215,.8);D.position.set(-8,-8,6),t.add(D);const U=new o.DirectionalLight(16777215,.6);U.position.set(0,-15,2),t.add(U);const T=new o.HemisphereLight(16777215,4473924,.8);t.add(T);const W=new o.PointLight(16777215,1,50);W.position.set(15,15,15),t.add(W);const L=new o.PointLight(16777215,.5,50);L.position.set(-15,-15,15),t.add(L)},n=()=>{b=requestAnimationFrame(n),l&&l.update(),s&&t&&i&&s.render(t,i),m&&m.render()},f=_=>{["map","normalMap","bumpMap","roughnessMap","metalnessMap","emissiveMap","specularMap","envMap","lightMap","aoMap","displacementMap"].forEach(D=>{_[D]&&_[D].dispose&&_[D].dispose()}),_.dispose&&_.dispose()},E=_=>{_==null||_.traverse(p=>{p.geometry&&p.geometry.dispose(),p.material&&(Array.isArray(p.material)?p.material.forEach(D=>{f(D)}):f(p.material))})};return{currentModels:M,initialCameraPosition:C,initialTargetPosition:N,initThreeJS:O,handleResize:()=>{if(!a.value||!i||!s||!m)return;const _=a.value,p=_.clientWidth,D=_.clientHeight;i.aspect=p/D,i.updateProjectionMatrix(),s.setSize(p,D),m.update()},fitCameraToAllModels:_=>{if(!i||!l||M.value.length===0)return;const p=new o.Box3;let D=!1;if(M.value.forEach(G=>{if(G.userData.boundingBox)p.union(G.userData.boundingBox),D=!0;else if(G.userData.modelId&&_.has(G.userData.modelId)){const oe=_.get(G.userData.modelId);p.union(oe.box),D=!0}else p.expandByObject(G),D=!0}),!D){console.warn("无法计算包围盒");return}const U=p.getSize(new o.Vector3),T=p.getCenter(new o.Vector3),L=Math.max(U.x,U.y,U.z)*.8,K=new o.Vector3(T.x+L,T.y-L,T.z+L);i.position.copy(K),i.lookAt(T),l.target.copy(T),l.update(),C.value.copy(K),N.value.copy(T),S()},getThreeJSObjects:()=>({scene:t,camera:i,renderer:s,controls:l,gizmo:m}),clearAllModels:()=>{if(!t)return;M.value.forEach(p=>{t.remove(p),E(p)});const _=[];t.children.forEach(p=>{!p.isLight&&!p.isCamera&&p.type!=="GridHelper"&&p!==x&&_.push(p)}),_.forEach(p=>{t.remove(p),E(p)}),M.value=[],S()},cleanup:()=>{b&&cancelAnimationFrame(b),r&&r.dispose(),x&&(x.geometry.dispose(),x.material.dispose()),s&&s.dispose(),l&&l.dispose(),m&&m.dispose()},updateGridForModels:S}}function Ae(a,t){const i=e.ref(!1);let s=null,l=12700,m=new o.Vector3,b=new o.Vector3,r=new o.Vector3,x=0,M=null;const C=n=>n<.5?4*n*n*n:1-Math.pow(-2*n+2,3)/2,N=n=>{const f=new o.Vector3,E=x*1.2,R=new o.Vector3(r.x+E,r.y,r.z),Z=new o.Vector3(r.x,r.y+E,r.z),I=new o.Vector3(r.x,r.y-E,r.z);if(n<=.567){const Y=n/.567*Math.PI*2;f.x=r.x+Math.cos(Y)*E,f.z=r.z+Math.sin(Y)*E,f.y=r.y}else if(n<=.724){const F=(n-.567)/.157,Y=C(F);f.lerpVectors(R,Z,Y)}else if(n<=.881){const F=(n-.724)/.157,_=C(F)*Math.PI;f.x=r.x+Math.sin(_)*E,f.y=r.y+Math.cos(_)*E,f.z=r.z}else{const F=(n-.881)/.119,Y=C(F);f.lerpVectors(I,m,Y)}return f},O=()=>{const{camera:n,controls:f}=a();if(!n||!f)return;s||(s=Date.now());const E=Date.now()-s,R=Math.min(E/l,1);if(R>=1){S();return}const Z=N(R);n.position.copy(Z),n.lookAt(r),f.target.copy(r),M=requestAnimationFrame(O)},h=()=>{if(t.value.length===0)return;const{camera:n,controls:f}=a();if(!n||!f)return;m.copy(n.position),b.copy(f.target);const E=new o.Box3;t.value.forEach(p=>{E.expandByObject(p)});const R=E.getSize(new o.Vector3);r=E.getCenter(new o.Vector3),x=Math.max(R.x,R.y,R.z)*1.2;const Z=new o.Vector3(r.x+x*1.2,r.y,r.z);f.enabled=!1;const I=n.position.clone(),F=1e3,Y=Date.now(),_=()=>{const p=Date.now()-Y,D=Math.min(p/F,1),U=C(D);n.position.lerpVectors(I,Z,U),n.lookAt(r),f.target.copy(r),D<1?requestAnimationFrame(_):(i.value=!0,s=null,O())};_()},S=()=>{i.value=!1,s=null,M&&(cancelAnimationFrame(M),M=null);const{controls:n}=a();n&&(n.enabled=!0,n.target.copy(b))};return{isAnimating:i,toggleAnimation:()=>{if(i.value){i.value=!1,s=null,M&&(cancelAnimationFrame(M),M=null);const{camera:n,controls:f}=a();if(!n||!f)return;f.enabled=!0;const E=n.position.clone(),R=f.target.clone(),Z=1500,I=Date.now(),F=()=>{const Y=Date.now()-I,_=Math.min(Y/Z,1),p=C(_);n.position.lerpVectors(E,m,p),f.target.lerpVectors(R,b,p),_<1&&requestAnimationFrame(F)};F()}else h()},startAnimation:h,stopAnimation:S}}function Ne(a,t){const i=e.ref(!1),s=e.ref("none");let l=[],m=[],b=new o.Box3,r=new o.Vector3;const x=()=>{l=[new o.Plane(new o.Vector3(1,0,0),0),new o.Plane(new o.Vector3(0,1,0),0),new o.Plane(new o.Vector3(0,0,1),0)]},M=()=>{b.makeEmpty(),t.value.forEach(v=>{b.expandByObject(v)}),r=b.getCenter(new o.Vector3)},C=v=>{const n=b.getSize(new o.Vector3);let f,E,R;v==="x"?(f=new o.PlaneGeometry(n.z*1.2,n.y*1.2),E=new o.Vector3(r.x,r.y,r.z),R=new o.Euler(0,Math.PI/2,0)):v==="y"?(f=new o.PlaneGeometry(n.x*1.2,n.z*1.2),E=new o.Vector3(r.x,r.y,r.z),R=new o.Euler(Math.PI/2,0,0)):v==="z"&&(f=new o.PlaneGeometry(n.x*1.2,n.y*1.2),E=new o.Vector3(r.x,r.y,r.z),R=new o.Euler(0,0,0));const Z=new o.MeshPhongMaterial({color:8900331,transparent:!0,opacity:.3,side:o.DoubleSide,depthWrite:!1}),I=new o.Mesh(f,Z);return I.position.copy(E),I.rotation.copy(R),I},N=()=>{if(O(),h(),s.value==="none")return;M();let v=null;if(s.value==="x"?(l[0].constant=-r.x,v=l[0]):s.value==="y"?(l[1].constant=-r.y,v=l[1]):s.value==="z"&&(l[2].constant=-r.z,v=l[2]),v){t.value.forEach(f=>{f.traverse(E=>{E.isMesh&&E.material&&(Array.isArray(E.material)?E.material.forEach(R=>{R.clippingPlanes=[v]}):E.material.clippingPlanes=[v])})});const{scene:n}=a();if(n){const f=C(s.value);n.add(f),m.push(f)}}},O=()=>{t.value.forEach(v=>{v.traverse(n=>{n.isMesh&&n.material&&(Array.isArray(n.material)?n.material.forEach(f=>{f.clippingPlanes=[]}):n.material.clippingPlanes=[])})})},h=()=>{const{scene:v}=a();v&&m.forEach(n=>{v.remove(n),n.geometry.dispose(),n.material.dispose()}),m=[]};return{isClipping:i,activeClippingAxis:s,toggleClipping:()=>{i.value=!i.value,i.value?(x(),t.value.length>0&&M()):(s.value="none",O(),h())},updateClippingPlanes:N,clearClippingPlanes:O,clearClippingMeshes:h}}const Re={class:"panel-content"},ze={__name:"animationTable",props:{animationData:Object,model:Object},setup(a){const t=a;e.ref();const i=e.ref();return e.watch(()=>[t==null?void 0:t.animationData],()=>{var l;let s=((l=fe.cloneDeep(t==null?void 0:t.animationData))==null?void 0:l.动画输出Content)??[];s&&(i.value=s)},{deep:!0,immediate:!0}),(s,l)=>{var m,b,r;return e.openBlock(),e.createElementBlock("div",Re,[(e.openBlock(),e.createBlock(o.ssTable,{itemData:(m=i.value)==null?void 0:m.compData,key:(b=i.value)==null?void 0:b.id,index:(r=i.value)==null?void 0:r.id,showHeader:!1},null,8,["itemData","index"]))])}}},Oe=ie._export_sfc(ze,[["__scopeId","data-v-02b89b4b"]]),Le={class:"panel-content"},je="id",Ie={__name:"urdfTree",props:{model:Object,maxExpandCount:{type:Number,default:10},expandStrategy:{type:String,default:"breadth",validator:a=>["breadth","firstLevel"].includes(a)}},emits:["nodeClick"],setup(a,{emit:t}){const i=a,s=t,l=e.ref([]),m={children:"children",label:"label"},b=h=>{s("nodeClick",h)},r=(h,S=0)=>{const v=[];return Array.isArray(h)&&(h==null?void 0:h.length)>0&&h.forEach(n=>{if(!(n!=null&&n.isMesh)&&((n==null?void 0:n.type)==="URDFJoint"||(n==null?void 0:n.type)==="URDFLink")){const f={name:n==null?void 0:n.name,label:n==null?void 0:n.name,show:!0,level:S+1,isPenultimate:!1,type:n==null?void 0:n.type,id:n==null?void 0:n.id,limit:(n==null?void 0:n.limit)??"",children:r(n==null?void 0:n.children,S+1),path:n==null?void 0:n.name};v.push(f)}}),v},x=h=>h?[{name:h==null?void 0:h.name,label:h==null?void 0:h.name,show:!0,level:1,isPenultimate:!1,type:h==null?void 0:h.type,id:h==null?void 0:h.id,limit:(h==null?void 0:h.limit)??"",children:r(h==null?void 0:h.children,1),path:h==null?void 0:h.name}]:[],M=(h,S)=>{const v=[],n=[...h];for(;n.length>0&&v.length<S;){const f=n.shift();f.children&&f.children.length>0&&(v.push(f.id),n.push(...f.children))}return v},C=(h,S)=>{const v=[];return h.forEach(n=>{if(n.children&&n.children.length>0){v.push(n.id);const f=n.children.filter(E=>E.children&&E.children.length>0).slice(0,S).map(E=>E.id);v.push(...f)}}),v.slice(0,S+1)},N=e.computed(()=>!l.value||l.value.length===0?[]:i.expandStrategy==="firstLevel"?C(l.value,i.maxExpandCount):M(l.value,i.maxExpandCount)),O=e.computed(()=>i!=null&&i.model?x(i.model):[]);return e.watch(O,h=>{l.value=JSON.parse(JSON.stringify(h))},{immediate:!0}),(h,S)=>{const v=e.resolveComponent("el-tree");return e.openBlock(),e.createElementBlock("div",Le,[e.createVNode(v,{data:l.value,props:m,"default-expanded-keys":N.value,"node-key":je,onNodeClick:b},null,8,["data","default-expanded-keys"])])}}},Be=ie._export_sfc(Ie,[["__scopeId","data-v-290ff4e1"]]),Ue={class:"panel-content"},Fe={key:0,class:"joints-list"},Ye={class:"joint-info-row"},Ze={class:"joint-left"},He={class:"joint-name"},Ke={class:"joint-range"},Xe={class:"joint-type"},$e={key:0,class:"joint-control-row"},Ge={class:"slider-container"},Je=["min","max","value","onInput","disabled"],qe={class:"value-display"},We={class:"joint-value"},Qe={class:"unit"},et={key:1,class:"empty-state"},se=.001,tt=1e3,he=60,ot={__name:"jointPanel",props:{model:Object,scene:Object,animationData:Object},setup(a,{expose:t}){const i=a;e.ref(!0);const s=e.ref([]),l=e.ref(null),m=e.ref(null),b=e.ref(12.5),r=e.ref(),x=e.ref(1302),M=e.ref(!1),C=e.ref(!1),N=e.ref(0),O=e.ref(0),h=e.ref(null),S=o.MathUtils.degToRad,v=e.ref(1),n=()=>tt/he/v.value;let f=[];e.watch(()=>i.animationData,c=>{var d;x.value=c.extra.管长,b.value=c.extra.外径/2;let w=((d=fe.cloneDeep(c))==null?void 0:d.动画输出)??[];w&&w.length>0&&(f=w)},{deep:!0}),e.computed(()=>f.length>0);const E=(c,w=!1)=>c==="revolute"?w?Math.PI:-Math.PI:c==="prismatic"?w?1:-1:0,R=()=>{if(!l.value)return ElMessage.error("未加载 URDF"),!1;let c=null;return l.value.traverse(w=>{w.name==="Pipe_Link"&&!c&&w.traverse(d=>{d instanceof o.Mesh&&!c&&(c=d)})}),c?(r.value=c,c.material=new o.MeshPhongMaterial({color:11184810,shininess:80,side:o.DoubleSide}),!0):(ElMessage.error("Pipe_Link 内未找到 Mesh"),!1)},Z=c=>{if(!c||!c.joints)return console.warn("URDF模型没有关节信息"),[];let w=null;if(c.traverse(P=>{P.name==="Pipe_Link"&&!w&&(w=P)}),w)r.value=w;else return console.warn("未找到管子模型"),[];const d=[];return Object.keys(c.joints).forEach(P=>{const y=c.joints[P];if(y._jointType==="fixed")return;const j=y.limit?{lower:y.limit.lower??E(y._jointType,!1),upper:y.limit.upper??E(y._jointType,!0)}:{lower:E(y._jointType,!1),upper:E(y._jointType,!0)};d.push({name:P,type:y._jointType||"unknown",limit:j,currentValue:y.angle||0,urdfJoint:y})}),d.sort((P,y)=>P.name.localeCompare(y.name))},I=(c,w)=>{const d=s.value.find(y=>y.name===c);if(!d)return;const P=parseFloat(w);if(d.limit){const y=Math.max(d.limit.lower,Math.min(d.limit.upper,P));d.currentValue=y}else d.currentValue=P;i.model&&i.model.setJointValue?i.model.setJointValue(c,d.currentValue):d.urdfJoint&&d.urdfJoint.setJointValue(d.currentValue)},F=c=>c.reduce((w,d)=>{let P=0;const y=d.Y??0,j=d.C??0,g=d.R??0;return y>0&&(P+=y),j>0&&g>0&&(P+=g*S(j)),w+P},0),Y=c=>{const w=[],d=c.Y??0,P=c.B??0,y=c.C??0,j=c.R??0,g={pos:new o.Vector3(0,0,0),localY:new o.Vector3(0,1,0),localX:new o.Vector3(1,0,0),localZ:new o.Vector3(0,0,1)};if(!d&&!y)return w;if(w.push(g.pos.clone()),P!==0){const u=new o.Matrix4().makeRotationAxis(g.localY,S(P));g.localX.applyMatrix4(u),g.localZ.applyMatrix4(u)}if(d>0&&(g.pos.add(g.localY.clone().multiplyScalar(d*se)),w.push(g.pos.clone())),y>0&&j>0){const u=S(y),z=j*se,X=g.pos.clone().add(g.localX.clone().multiplyScalar(-z)),Q=Math.max(16,Math.ceil(y/5));for(let $=1;$<=Q;$++){const te=u*$/Q,V=new o.Matrix4().makeRotationAxis(g.localZ,te),q=g.localX.clone().multiplyScalar(z).applyMatrix4(V),ee=X.clone().add(q);w.push(ee)}}return w},_=c=>{const w=f.slice(0,c+1),d=F(w),P=Math.max(0,x.value-d),y=[];y.push(new o.Vector3(0,0,0));const j=new o.Vector3(0,P*se,0);P>0&&y.push(j);let g={pos:j.clone(),localY:new o.Vector3(0,1,0),localX:new o.Vector3(1,0,0),localZ:new o.Vector3(0,0,1)};const u=[];for(let z=w.length-1;z>=0;z--){const X=w[z],Q=Y(X);if(Q.length>0){const $=Q.map(q=>{const ee=q.clone(),de=new o.Matrix4;return de.makeBasis(g.localX,g.localY,g.localZ),ee.applyMatrix4(de),ee.add(g.pos)});u.push($);const te=$[$.length-1];g.pos=te.clone();const V=X.B??0,J=X.C??0;if(V!==0){const q=new o.Matrix4().makeRotationAxis(g.localY,S(V));g.localX.applyMatrix4(q),g.localZ.applyMatrix4(q)}if(J>0){const q=S(J),ee=new o.Matrix4().makeRotationAxis(g.localZ,q);g.localY.applyMatrix4(ee),g.localX.applyMatrix4(ee)}}}for(const z of u)z.length>1&&y.push(...z.slice(1));y.length<2&&y.push(new o.Vector3(0,.001,0));try{const z=new o.CatmullRomCurve3(y,!1,"catmullrom",.01),X=new o.TubeGeometry(z,Math.max(2,y.length*4),b.value*se,18,!1);r.value.geometry.dispose(),r.value.geometry=X}catch(z){console.error("管件更新失败",z)}},p=(c,w)=>{c&&(Object.keys(c).forEach(d=>{const P=c[d],y=s.value.find(j=>j.name===d);y&&(y.currentValue=P,i.model&&i.model.setJointValue?i.model.setJointValue(d,P):y.urdfJoint&&y.urdfJoint.setJointValue(P))}),_(w))},D=(c,w,d)=>c+(w-c)*d,U=(c,w,d)=>{if(!c||!w)return c||w;const P={};return Object.keys(c).forEach(y=>{const j=c[y],g=w[y];P[y]=D(j,g||j,d)}),P},T=()=>{if(f.length===0){console.warn("没有动画数据");return}R(),M.value=!0,C.value=!1;const c=()=>{if(!M.value||C.value)return;const w=O.value/he,d=N.value,P=f[N.value],y=f[N.value+1];if(y){const j=U(P,y,w);p(j,d)}else p(P,d);if(O.value++,O.value>=he&&(O.value=0,N.value++,N.value>=f.length-1)){L();return}h.value=setTimeout(c,n())};c()},W=()=>{C.value=!0,h.value&&(clearTimeout(h.value),h.value=null)},L=()=>{M.value=!1,C.value=!1,v.value=1,h.value&&(clearTimeout(h.value),h.value=null)};t({startAnimation:T,pauseAnimation:W,stopAnimation:L,resetAll:()=>{L(),N.value=0,O.value=0,s.value.forEach(c=>{(c.type==="revolute"||c.type==="prismatic")&&I(c.name,0)})},fastForward:()=>{v.value<4&&(v.value=Math.min(4,v.value*2))},fastBackward:()=>{v.value>.25&&(v.value=Math.max(.25,v.value/2))}}),e.watch(()=>i.model,c=>{c?(l.value=c,s.value=Z(c)):s.value=[]},{immediate:!0});const ae=()=>{!i.model||M.value&&!C.value||s.value.forEach(c=>{c.urdfJoint&&c.urdfJoint.angle!==void 0&&(c.currentValue=c.urdfJoint.angle)})},le=()=>{const c=()=>{ae(),m.value=requestAnimationFrame(c)};c()},re=()=>{m.value&&(cancelAnimationFrame(m.value),m.value=null)};return e.onMounted(()=>{le()}),e.onUnmounted(()=>{re(),L()}),(c,w)=>(e.openBlock(),e.createElementBlock("div",Ue,[s.value.length>0?(e.openBlock(),e.createElementBlock("div",Fe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,d=>{var P,y,j,g;return e.openBlock(),e.createElementBlock("div",{key:d.name,class:"joint-item"},[e.createElementVNode("div",Ye,[e.createElementVNode("div",Ze,[e.createElementVNode("span",He,e.toDisplayString(d.name),1),e.createElementVNode("span",Ke," ["+e.toDisplayString(((P=d.limit)==null?void 0:P.lower.toFixed(2))??(d.type==="revolute"?"-3.14":"-1.00"))+", "+e.toDisplayString(((y=d.limit)==null?void 0:y.upper.toFixed(2))??(d.type==="revolute"?"3.14":"1.00"))+"] ",1)]),e.createElementVNode("span",Xe,e.toDisplayString(d.type),1)]),d.type==="revolute"||d.type==="prismatic"?(e.openBlock(),e.createElementBlock("div",$e,[e.createElementVNode("div",Ge,[e.createElementVNode("input",{type:"range",min:((j=d.limit)==null?void 0:j.lower)??(d.type==="revolute"?-Math.PI:-1),max:((g=d.limit)==null?void 0:g.upper)??(d.type==="revolute"?Math.PI:1),step:.01,value:d.currentValue,onInput:u=>I(d.name,u.target.value),class:"joint-slider",disabled:M.value&&!C.value},null,40,Je)]),e.createElementVNode("div",qe,[e.createElementVNode("span",We,e.toDisplayString(d.currentValue?Number(d.currentValue).toFixed(3):"0.000"),1),e.createElementVNode("span",Qe,e.toDisplayString(d.type==="revolute"?"rad":"m"),1)])])):e.createCommentVNode("",!0)])}),128))])):(e.openBlock(),e.createElementBlock("div",et,w[0]||(w[0]=[e.createElementVNode("p",null,"未检测到可控制的关节",-1)])))]))}},it=ie._export_sfc(ot,[["__scopeId","data-v-bc6f97a7"]]),nt=["xlink:href"],st=e.defineComponent({__name:"svgIcon",props:{backgroundColor:{default:"#f0f0f0"},prefix:{default:"icon"},name:{},size:{default:16},spin:{type:Boolean,default:!1},active:{type:Boolean,default:!1}},setup(a){const t=a,i=e.computed(()=>({backgroundColor:t.backgroundColor})),s=e.computed(()=>`#${t.prefix}-${t.name}`),l=e.computed(()=>{const{size:m}=t;let b=`${m}`;return b=`${b.replace("px","")}px`,{width:b,height:b}});return(m,b)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["container",{active:m.active}]),style:e.normalizeStyle(i.value)},[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["svg-icon",[m.$attrs.class,m.spin&&"svg-icon-spin"]]),style:e.normalizeStyle(l.value),"aria-hidden":"true"},[e.createElementVNode("use",{"xlink:href":s.value},null,8,nt)],6))],6))}}),A=ie._export_sfc(st,[["__scopeId","data-v-3150a90b"]]),at={class:"obj-viewer-container"},lt={class:"buttonGroup-top"},rt={class:"buttonGroup-topLeft"},ct={class:"buttonGroup-left"},ht={class:"buttonGroup-right"},ut={class:"buttonGroup-bottom"},dt={class:"left-panel"},pt={class:"panel-header"},mt={key:1,class:"clipping-content"},ft={class:"radio-group"},_t={class:"radio-label"},gt={class:"radio-label"},yt={class:"radio-label"},vt={class:"radio-label"},bt={class:"right-panel"},wt={class:"panel-header"},Et={key:0,class:"loading-overlay"},Pt={__name:"threeModel",props:{animationData:{type:Object,default:()=>{}}},emits:["getAnimationData"],setup(a,{expose:t,emit:i}){const s=i;let l=null,m=!1;const b=e.ref(null),r=e.ref(!1),x=e.ref("");e.ref(!1);const M=e.ref(!1),C=e.ref(!1),N=e.ref(""),O=e.ref(!1),h=e.ref(""),S=e.ref(),{currentModels:v,initialCameraPosition:n,initialTargetPosition:f,initThreeJS:E,handleResize:R,fitCameraToAllModels:Z,getThreeJSObjects:I,clearAllModels:F,cleanup:Y}=Ce(b),{isAnimating:_,toggleAnimation:p,stopAnimation:D}=Ae(I,v),{isClipping:U,activeClippingAxis:T,toggleClipping:W,updateClippingPlanes:L}=Ne(I,v),{addModelsFromUrls:K,loadModelByDefaultPath:G,urdfModel:oe,modelBoundingBoxes:ae}=o.useModelLoader(I,v,r,x,F),le=()=>{if(M.value||v.value.length===0)return;M.value=!0,_.value&&D();const{camera:g,controls:u}=I();if(!g||!u)return;u.enabled=!0;const z=J=>J<.5?4*J*J*J:1-Math.pow(-2*J+2,3)/2,X=g.position.clone(),Q=u.target.clone(),$=1500,te=Date.now(),V=()=>{const J=Date.now()-te,q=Math.min(J/$,1),ee=z(q);g.position.lerpVectors(X,n.value,ee),u.target.lerpVectors(Q,f.value,ee),q<1?requestAnimationFrame(V):M.value=!1};V()},re=async()=>m?Promise.resolve():new Promise(g=>{const u=()=>{m?g():requestAnimationFrame(u)};u()}),c=async(g,u)=>{try{await re(),_.value&&D(),U.value&&W();const z=await u(g);return Z(ae),z}catch(z){throw console.error("加载模型失败:",z),z}},w=async g=>c(g,K),d=async g=>c(g,G),P=g=>{C.value=!0,N.value=g,g==="剖面视图"&&!U.value&&W()},y=g=>{O.value=!0,h.value=g,g==="动画仿真"&&s("getAnimationData")},j=()=>{e.nextTick(()=>{var g;(g=S.value)==null||g.startAnimation()})};return e.onMounted(async()=>{await e.nextTick();try{E(),l=I().scene,m=!0,window.addEventListener("resize",R)}catch(g){console.error("Three.js初始化失败:",g)}}),e.onBeforeUnmount(()=>{m=!1,N.value="",h.value="",window.removeEventListener("resize",R),_.value&&D(),Y()}),t({addModelsFromUrls:w,loadModelByDefaultPath:d}),(g,u)=>{var X,Q,$,te;const z=e.resolveComponent("el-scrollbar");return e.openBlock(),e.createElementBlock("div",at,[e.createElementVNode("div",{ref_key:"threejsContainer",ref:b,class:"threejs-container"},null,512),e.createElementVNode("div",lt,[e.createVNode(A,{name:"guanjianjiexi",size:"34"}),e.createVNode(A,{name:"guanjiekongzhi",size:"34"}),e.createVNode(A,{name:"gongyishengcheng",size:"34"}),e.createVNode(A,{name:"buchangshezhi",size:"34"}),e.createVNode(A,{name:"shuchujiagongchengxu",size:"34"})]),e.createElementVNode("div",rt,[e.createVNode(A,{name:"viewReset",size:"24",onClick:le,title:"重置"}),e.createVNode(A,{name:"fangda",size:"24",title:"放大"}),e.createVNode(A,{name:"suoxiao",size:"24",title:"缩小"}),e.createVNode(A,{name:"lookAround",size:"24",onClick:e.unref(p),title:e.unref(_)?"停止动画":"动画视图"},null,8,["onClick","title"])]),e.createElementVNode("div",ct,[e.createVNode(A,{name:"jiegoushu",size:"24",onClick:u[0]||(u[0]=V=>P("场景树")),active:C.value&&N.value==="场景树",title:"场景树"},null,8,["active"]),e.createVNode(A,{name:"clipping",size:"24",onClick:u[1]||(u[1]=V=>P("剖面视图")),active:C.value&&N.value==="剖面视图",title:"剖面视图"},null,8,["active"]),e.createVNode(A,{name:"donghuafangzhen",size:"24",onClick:u[2]||(u[2]=V=>P("场景树3"))}),e.createVNode(A,{name:"donghuafangzhen",size:"24",onClick:u[3]||(u[3]=V=>P("场景4"))})]),e.createElementVNode("div",ht,[e.createVNode(A,{name:"donghuafangzhen",size:"24"}),e.createVNode(A,{name:"donghuafangzhen",size:"24"}),e.createVNode(A,{name:"guanjiekongzhi",size:"24",onClick:u[4]||(u[4]=V=>y("关节控制")),active:O.value&&h.value==="关节控制",title:"关节控制"},null,8,["active"]),e.createVNode(A,{name:"donghuafangzhen",size:"24",title:"动画仿真",onClick:u[5]||(u[5]=V=>y("动画仿真")),active:O.value&&h.value==="动画仿真"},null,8,["active"]),e.createVNode(A,{name:"donghuafangzhen",size:"24"}),e.createVNode(A,{name:"donghuafangzhen",size:"24"})]),e.createElementVNode("div",ut,[e.createVNode(A,{name:"kuaitui",size:"24",backgroundColor:"#ffffff",title:"快退",onClick:(X=S.value)==null?void 0:X.fastBackward},null,8,["onClick"]),e.createVNode(A,{name:"bofang",size:"24",backgroundColor:"#ffffff",title:"播放",onClick:j}),e.createVNode(A,{name:"kuaijin",size:"24",backgroundColor:"#ffffff",title:"快进",onClick:(Q=S.value)==null?void 0:Q.fastForward},null,8,["onClick"]),e.createVNode(A,{name:"zanting",size:"24",backgroundColor:"#ffffff",title:"暂停",onClick:($=S.value)==null?void 0:$.pauseAnimation},null,8,["onClick"]),e.createVNode(A,{name:"zhongzhi",size:"24",backgroundColor:"#ffffff",title:"停止",onClick:(te=S.value)==null?void 0:te.resetAll},null,8,["onClick"])]),e.withDirectives(e.createElementVNode("div",dt,[e.createElementVNode("div",pt,[e.createElementVNode("span",null,e.toDisplayString(N.value),1),e.createElementVNode("span",{class:"close",onClick:u[6]||(u[6]=V=>C.value=!1)}," X ")]),e.createVNode(z,{"max-height":"650px"},{default:e.withCtx(()=>[N.value==="场景树"?(e.openBlock(),e.createBlock(Be,{key:0,model:e.unref(oe)},null,8,["model"])):e.createCommentVNode("",!0),N.value==="剖面视图"?(e.openBlock(),e.createElementBlock("div",mt,[e.createElementVNode("div",ft,[e.createElementVNode("label",_t,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"none","onUpdate:modelValue":u[7]||(u[7]=V=>e.isRef(T)?T.value=V:null),onChange:u[8]||(u[8]=(...V)=>e.unref(L)&&e.unref(L)(...V))},null,544),[[e.vModelRadio,e.unref(T)]]),u[16]||(u[16]=e.createElementVNode("span",{class:"radio-text"},"无切割",-1))]),e.createElementVNode("label",gt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"x","onUpdate:modelValue":u[9]||(u[9]=V=>e.isRef(T)?T.value=V:null),onChange:u[10]||(u[10]=(...V)=>e.unref(L)&&e.unref(L)(...V))},null,544),[[e.vModelRadio,e.unref(T)]]),u[17]||(u[17]=e.createElementVNode("span",{class:"radio-text"},"X轴切割",-1))]),e.createElementVNode("label",yt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"y","onUpdate:modelValue":u[11]||(u[11]=V=>e.isRef(T)?T.value=V:null),onChange:u[12]||(u[12]=(...V)=>e.unref(L)&&e.unref(L)(...V))},null,544),[[e.vModelRadio,e.unref(T)]]),u[18]||(u[18]=e.createElementVNode("span",{class:"radio-text"},"Y轴切割",-1))]),e.createElementVNode("label",vt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"z","onUpdate:modelValue":u[13]||(u[13]=V=>e.isRef(T)?T.value=V:null),onChange:u[14]||(u[14]=(...V)=>e.unref(L)&&e.unref(L)(...V))},null,544),[[e.vModelRadio,e.unref(T)]]),u[19]||(u[19]=e.createElementVNode("span",{class:"radio-text"},"Z轴切割",-1))])])])):e.createCommentVNode("",!0)]),_:1})],512),[[e.vShow,C.value]]),e.withDirectives(e.createElementVNode("div",bt,[e.createElementVNode("div",wt,[e.createElementVNode("span",null,e.toDisplayString(h.value),1),e.createElementVNode("span",{class:"close",onClick:u[15]||(u[15]=V=>O.value=!1)}," X ")]),e.createVNode(z,{"max-height":"650px"},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(it,{ref_key:"jointRef",ref:S,model:e.unref(oe),scene:e.unref(l),animationData:a.animationData},null,8,["model","scene","animationData"]),[[e.vShow,h.value==="关节控制"]]),e.withDirectives(e.createVNode(Oe,{animationData:a.animationData},null,8,["animationData"]),[[e.vShow,h.value==="动画仿真"]])]),_:1})],512),[[e.vShow,O.value]]),r.value?(e.openBlock(),e.createElementBlock("div",Et,[u[20]||(u[20]=e.createElementVNode("div",{class:"loading-spinner"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(x.value),1)])):e.createCommentVNode("",!0)])}}},Mt=ie._export_sfc(Pt,[["__scopeId","data-v-3230489b"]]);exports.default=Mt;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref as D, watch as xe, createElementBlock as J, openBlock as K, createBlock as He, computed as pe, resolveComponent as Xe, createVNode as k, onMounted as Ke, onUnmounted as Qe, Fragment as et, renderList as tt, createElementVNode as P, createCommentVNode as we, toDisplayString as le, defineComponent as st, normalizeStyle as je, normalizeClass as Ie, nextTick as Fe, onBeforeUnmount as it, withDirectives as ce, unref as Z, withCtx as Ne, isRef as _e, vModelRadio as ge, vShow as ye } from "vue";
|
|
2
|
-
import { C as ot, V as y, M as he, T as ue, Q as Ue, S as Ye, c as ie, R as nt, P as Pe, d as $e, B as Ee, e as at, f as lt, g as rt, W as ct, h as ht, A as ut, i as pt, X as dt, G as mt, j as Me, k as ft, l as ze, m as _t, D as Se, H as gt, n as Ve, o as Ge, p as Je, E as ke, s as yt, q as me, r as vt, t as bt, v as wt } from "./index-
|
|
2
|
+
import { C as ot, V as y, M as he, T as ue, Q as Ue, S as Ye, c as ie, R as nt, P as Pe, d as $e, B as Ee, e as at, f as lt, g as rt, W as ct, h as ht, A as ut, i as pt, X as dt, G as mt, j as Me, k as ft, l as ze, m as _t, D as Se, H as gt, n as Ve, o as Ge, p as Je, E as ke, s as yt, q as me, r as vt, t as bt, v as wt } from "./index-DpxAyiaB.js";
|
|
3
3
|
import { _ as fe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
import { c as We } from "./menu-wif0xsml.js";
|
|
5
5
|
const Be = { type: "change" }, Le = { type: "start" }, qe = { type: "end" }, ve = new nt(), Ze = new Pe(), Pt = Math.cos(70 * $e.DEG2RAD), V = new y(), G = 2 * Math.PI, A = {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ss-component-new",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.624",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist",
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"@element-plus/icons-vue": "^2.3.1",
|
|
24
24
|
"@js-preview/excel": "^1.7.14",
|
|
25
25
|
"@vue-office/excel": "^1.7.14",
|
|
26
|
+
"@vueup/vue-quill": "^1.2.0",
|
|
26
27
|
"axios": "^1.9.0",
|
|
27
28
|
"codemirror": "^6.0.2",
|
|
28
29
|
"cropperjs": "^1.6.2",
|
|
@@ -39,6 +40,7 @@
|
|
|
39
40
|
"lodash-es": "^4.17.21",
|
|
40
41
|
"pinia": "^3.0.3",
|
|
41
42
|
"pinia-plugin-persistedstate": "^4.3.0",
|
|
43
|
+
"quill": "^2.0.3",
|
|
42
44
|
"sortablejs": "^1.15.6",
|
|
43
45
|
"three": "^0.177.0",
|
|
44
46
|
"three-viewport-gizmo": "^2.2.0",
|
package/dist/index-D5P_BYL7.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),oe=require("./index-rBRZ7zGU.cjs"),$e=require("./index-B6McL4Y5.cjs"),C=require("./index.vue_vue_type_style_index_0_scoped_1ee6cc73_lang-DtoHG_C9.cjs"),me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),r=require("./menu-CcabvNj6.cjs"),Me=require("./login-C7jVTvUQ.cjs"),pe=require("./index-BpPyaNFa.cjs"),we=require("./modelComp-B8kjqlTY.cjs"),Q=require("./index-Dmc9yBFD.cjs"),ye=require("./index-aptPIfv7.cjs"),Pe=require("./index.vue_vue_type_script_setup_true_lang-at_JPyg5.cjs"),Ee=require("./threeModel-BRkJrghm.cjs"),Ke=require("./index-Noso3rqY.cjs");require("vue-router");const ne=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CZZJYhO9.cjs"),Oe=require("./array-B_wsE8_t.cjs"),Ae=require("./index.vue_vue_type_style_index_0_scoped_57a7854d_lang-BmbIlTnn.cjs"),ze={class:"horizontal-f-18"};function Ge(x,X,n,V,F,z){const s=e.resolveComponent("svg-icon"),G=e.resolveComponent("ssMenu");return e.openBlock(),e.createBlock(G,{mode:x.mode,menuList:x.renderMenuList,onClickMenu:x.clickMenu,onOpenMenu:x.openMenu,onCloseMenu:x.closeMenu},{title:e.withCtx(({menu:S})=>[e.createVNode(s,{class:"horizontal-icon-18",name:S.icon??"Fold",style:{"margin-right":"8px"}},null,8,["name"]),e.createElementVNode("span",ze,e.toDisplayString(S.title??""),1)]),_:1},8,["mode","menuList","onClickMenu","onOpenMenu","onCloseMenu"])}const Ie=me._export_sfc(C._sfc_main,[["render",Ge],["__scopeId","data-v-6dc766db"]]),He={class:"bread-content"},Xe=["onClick"],Je={key:0,class:"split-title"},We={__name:"index",props:{breadArray:{type:Array,default:()=>[]}},emits:["click"],setup(x,{emit:X}){const n=x,V=e.ref([]),F=X;e.onMounted(()=>{V.value=n==null?void 0:n.breadArray}),e.watch(()=>n==null?void 0:n.breadArray,()=>{V.value=n==null?void 0:n.breadArray},{deep:!0,immediate:!0});const z=s=>{F("click",s)};return(s,G)=>(e.openBlock(),e.createElementBlock("div",He,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,(S,$)=>{var H;return e.openBlock(),e.createElementBlock("div",{key:$,class:"bread-item"},[e.createElementVNode("div",{class:"bread-title",onClick:le=>z(S),style:e.normalizeStyle({opacity:((H=V.value)==null?void 0:H.length)-1===$?"0.7":"1"})},e.toDisplayString(S.value),13,Xe),$!==V.value.length-1&&Array.isArray(V.value)?(e.openBlock(),e.createElementBlock("div",Je,e.toDisplayString("/"))):e.createCommentVNode("",!0)])}),128))]))}},je=me._export_sfc(We,[["__scopeId","data-v-ded7e2bd"]]),Qe={class:"structure-buttons"},Ye={class:"structure-paths"},Ze={class:"client-header-user"},et={class:"model-select"},tt={class:"model-show"},ot={class:"model-fill"},at={class:"client-header-menu"},nt={class:"client-header-user"},lt={class:"drop-menu"},rt={class:"client-main-operate","element-loading-text":"正在加载页面数据..."},it={key:0,class:"item-view-group"},st=e.defineComponent({__name:"index2",props:{windowConfig:{type:Object,default:()=>{}},showButton:{type:Boolean,default:!0}},setup(x){const X=ye.useUnit(r.pinia),{selectTitle:n}=r.storeToRefs(X),V=Me.useLoginState(),{loginUserInfo:F}=r.storeToRefs(V),z=we.useModelComp(r.pinia),{isEdit:s,routeToChildPath:G}=r.storeToRefs(z),S=r.useMenuState(r.pinia),{importLoading:$,activeAsideMenu:H,contentLoading:le}=r.storeToRefs(S),y=e.ref(""),U=e.computed(()=>H.value.isRouter),L=()=>{sessionStorage.clear(),window.location.reload()},q=async()=>{var f,M,Z,ee;S.setImportLoading(!0);const D=await r.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey")}});if(((f=D==null?void 0:D.data)==null?void 0:f.code)===200){let J=(ee=(Z=(M=D==null?void 0:D.data)==null?void 0:M.result)==null?void 0:Z.map(P=>{var re;if(((re=P==null?void 0:P.key)==null?void 0:re.layer)!=="superAdmin")return P==null?void 0:P.id}))==null?void 0:ee.filter(P=>P);await r.batchDeleteInsofDataApi({ids:J}),S.setRawMenus([])}S.setImportLoading(!1)},Y=()=>{S.setActiveMenuPath(G.value),z.setRouteToChildPath("")};return(D,f)=>{const M=e.resolveComponent("el-button"),Z=e.resolveComponent("el-avatar"),ee=e.resolveComponent("el-header"),J=e.resolveComponent("el-container"),P=e.resolveComponent("el-icon"),re=e.resolveComponent("el-input"),_=e.resolveComponent("el-aside"),j=e.resolveComponent("router-view"),K=e.resolveComponent("el-main"),E=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.withDirectives(e.createVNode(J,{class:"client-container"},{default:e.withCtx(()=>[e.createVNode(ee,{class:"client-structure-header"},{default:e.withCtx(()=>{var B;return[e.createElementVNode("div",Qe,[e.createVNode(M,{id:"transparentBgButton",onClick:e.unref(C.onBack)},{default:e.withCtx(()=>f[2]||(f[2]=[e.createTextVNode(" 返回页面 ")])),_:1,__:[2]},8,["onClick"]),e.createVNode(M,{id:"transparentBgButton",onClick:f[0]||(f[0]=t=>{var R,b;return e.unref(C.clickSavePage)((b=(R=e.unref(n))==null?void 0:R.map(te=>te.value))==null?void 0:b.join("/"))})},{icon:e.withCtx(()=>[e.createVNode(pe.SvgIcon,{name:"Store"})]),default:e.withCtx(()=>[f[3]||(f[3]=e.createTextVNode(" 保存页面 "))]),_:1,__:[3]})]),e.createElementVNode("div",Ye,[e.createVNode(je,{breadArray:e.unref(n),onClick:e.unref(C.onClick)},null,8,["breadArray","onClick"])]),e.createElementVNode("div",Ze,[e.renderSlot(D.$slots,"default",{},void 0,!0),e.createVNode(Z,{size:35,src:(B=e.unref(F))==null?void 0:B.avatarUrl},{default:e.withCtx(()=>{var t;return[e.createTextVNode(e.toDisplayString(((t=e.unref(F))==null?void 0:t.account)??"未知"),1)]}),_:1},8,["src"])])]}),_:3}),e.unref(s)==="edit"?(e.openBlock(),e.createBlock(J,{key:0,class:"model-operate",style:{"margin-top":"10px",height:"0px"}},{default:e.withCtx(()=>[e.createElementVNode("div",et,[e.createVNode(oe.modelSelect)]),e.createElementVNode("div",tt,[e.createVNode(oe.modelShow)]),e.createElementVNode("div",ot,[e.createVNode(oe.modelFill)])]),_:1})):e.createCommentVNode("",!0)]),_:3},512),[[e.vShow,e.unref(s)==="edit"]]),e.withDirectives((e.openBlock(),e.createBlock(J,{class:"client-container","element-loading-text":"正在加载页面数据..."},{default:e.withCtx(()=>[e.createVNode(ee,{class:"client-header"},{default:e.withCtx(()=>[f[6]||(f[6]=e.createElementVNode("div",{class:"client-header-logo"}," ISIP ",-1)),e.createElementVNode("div",at,[e.createVNode(Ie,{mode:"horizontal"})]),e.createElementVNode("div",nt,[e.createVNode(re,{modelValue:y.value,"onUpdate:modelValue":f[1]||(f[1]=B=>y.value=B),clearable:"",placeholder:"搜索",style:{width:"130px"}},{prefix:e.withCtx(()=>[e.createVNode(P,{class:"el-input__icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(r.search_default))]),_:1})]),_:1},8,["modelValue"]),x.showButton?(e.openBlock(),e.createBlock(M,{key:0,id:"transparentBgButton",onClick:e.unref(C.clickGenerateApp)},{icon:e.withCtx(()=>[e.createVNode(pe.SvgIcon,{name:"App"})]),default:e.withCtx(()=>[f[4]||(f[4]=e.createTextVNode(" 生成APP "))]),_:1,__:[4]},8,["onClick"])):e.createCommentVNode("",!0),x.showButton&&e.unref(s)==="view"?(e.openBlock(),e.createBlock(M,{key:1,id:"transparentBgButton",onClick:e.unref(C.onSelectFixContent)},{icon:e.withCtx(()=>[e.createVNode(pe.SvgIcon,{name:"write"})]),default:e.withCtx(()=>[f[5]||(f[5]=e.createTextVNode(" 修改布局 "))]),_:1,__:[5]},8,["onClick"])):e.createCommentVNode("",!0),e.renderSlot(D.$slots,"default",{},void 0,!0),e.createVNode(Q._sfc_main,null,{dropTitle:e.withCtx(()=>{var B;return[e.createVNode(Pe._sfc_main,{size:"35",avatarUrl:(B=e.unref(F))==null?void 0:B.avatarUrl,showCropper:!1,banClick:!0},{avatarDefault:e.withCtx(()=>{var t,R,b;return[e.createTextVNode(e.toDisplayString((t=e.unref(F))!=null&&t.account?(R=e.unref(F))==null?void 0:R.account:((b=e.unref(F))==null?void 0:b.账号)??"未知"),1)]}),_:1},8,["avatarUrl"])]}),dropMenu:e.withCtx(()=>[e.createElementVNode("div",lt,[e.createVNode(Q._sfc_main$1,{emptyColor:!0,class:"menu-button",onClickTrigger:q,modelValue:"清空数据",buttonType:""}),e.createVNode(Q._sfc_main$1,{emptyColor:!0,class:"menu-button",onClickTrigger:L,modelValue:"退出登录",buttonType:""})])]),_:1})])]),_:3,__:[6]}),e.createVNode(J,{class:"client-body"},{default:e.withCtx(()=>[e.createVNode(K,{class:"client-main"},{default:e.withCtx(()=>{var B;return[e.createVNode(_,{class:"client-aside"},{default:e.withCtx(()=>[e.createVNode($e.default,{mode:"vertical"})]),_:1}),e.withDirectives((e.openBlock(),e.createElementBlock("div",rt,[U.value?(e.openBlock(),e.createBlock(j,{key:0})):e.createCommentVNode("",!0),e.unref(G)!==""?(e.openBlock(),e.createBlock(Q._sfc_main$1,{key:1,class:"calculator-content back-content",onClickTrigger:Y,modelValue:"返回"})):e.createCommentVNode("",!0),U.value?e.createCommentVNode("",!0):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList((B=e.unref(r.cloneDeep)(e.unref(C.showItems)))==null?void 0:B.filter(t=>t.comp!=="FormTop"),(t,R)=>{var b;return e.openBlock(),e.createElementBlock("div",{class:"item-view-content",key:R},[((b=t==null?void 0:t.comp)==null?void 0:b.toUpperCase())!=="TABLE"&&t.name?(e.openBlock(),e.createElementBlock("div",it,e.toDisplayString(t.name),1)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(C.getComponents)(t.comp)),{compName:t.name,itemData:t==null?void 0:t.compData,childItemData:t==null?void 0:t.itemChildData,key:(t==null?void 0:t.id)??R,onChange:e.unref(C.onChange),index:(t==null?void 0:t.id)??R,onContentChange:e.unref(C.onContentChange),onPageChange:e.unref(C.onPageChange)},null,40,["compName","itemData","childItemData","onChange","index","onContentChange","onPageChange"]))])}),128))])),[[E,e.unref(le)]])]}),_:1})]),_:1})]),_:3})),[[e.vShow,e.unref(s)==="view"],[E,e.unref($)]])],64)}}}),ct=me._export_sfc(st,[["__scopeId","data-v-19ba8210"]]),ke=[{key:"FitCurve_Eleven",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35326658522693",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35326658522693",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35326658522693/outputResources"},{key:"MakeShape",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35018179530309",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35018179530309",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35018179530309/outputResources"},{key:"FillEmpty",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35018289382469",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35018289382469",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35018289382469/outputResources"},{key:"ToolPathFakeFast",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35484063607109",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35484063607109",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35484063607109/outputResources"},{key:"FiveAxisCalculator",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35237389477957",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35237389477957",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35237389477957/outputResources"},{key:"DetectionAlgorithm",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35459977498949",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35459977498949",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35459977498949/outputResources"},{key:"FeatureSelectionAlgorithm_FFS",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35277984187973",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35277984187973",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35277984187973/outputResources"},{key:"AIParameterOptimization",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35788169784389",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35788169784389"}],Be=[{key:"型线生成",value:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35326658522693/outputResources/sampling_points_20.cpt"},{key:"曲面生成",value:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35018179530309/outputResources/output.obj"},{key:"叶片生成",value:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35018289382469/outputResources/output_TwoSections_completed.obj"},{key:"轨迹规划",value:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35484063607109/outputResources/complete_data.txt"},{key:"加工规划",value:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35237389477957/outputResources/NC_BC.NC"},{key:"产品检测",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"},{key:"参数筛选训练方法",value:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35277984187973/outputResources/fitness_iteration.png"}],ut={class:"structure-buttons"},dt={class:"structure-paths"},pt={class:"client-header-user"},mt={class:"model-select"},ht={class:"model-show"},ft={class:"model-fill"},gt={class:"client-header-menu"},_t={class:"client-header-user"},Ct={class:"drop-menu"},yt={class:"client-main-operate","element-loading-text":"正在加载页面数据..."},wt={key:0,class:"item-view-group"},vt=e.defineComponent({__name:"index2",props:{windowConfig:{type:Object,default:()=>{}},showButton:{type:Boolean,default:!0}},emits:["showChild","buildContent"],setup(x,{emit:X}){const n=ye.useUnit(r.pinia),V=e.ref(!1);e.ref(0),e.ref(!1);const{selectTitle:F}=r.storeToRefs(n),z=e.ref(!1),s=e.ref(!1);e.ref(!1);const G=ye.useTableComp(r.pinia),S=e.ref(!1),{tableShowThree:$}=r.storeToRefs(G),H=e.ref(),le=Me.useLoginState(),{loginUserInfo:y}=r.storeToRefs(le);e.ref(null);const U=we.useModelComp(r.pinia),{isEdit:L}=r.storeToRefs(U),q=r.useMenuState(r.pinia),Y=Ke.useFormComp(r.pinia),{objUrl:D,blobUrls:f}=r.storeToRefs(Y),M=e.ref(null);e.ref(!1);const Z=e.ref(),ee=e.ref(!0);e.ref(!1);const{importLoading:J,activeMenuPath:P,activeTopMenuPath:re,platName:_,activeAsideMenu:j,contentLoading:K}=r.storeToRefs(q),E=e.ref(!1),B=e.ref(!1),t=e.ref(!1),R=X,b=()=>{R("buildContent")};e.watch(()=>P.value,async a=>{a&&(t.value=!0),a==="弯管仿真加工管理/仿真动画生成"?E.value=!0:E.value=!1,a==="弯管仿真加工管理/程序输出"?B.value=!0:B.value=!1,Be!=null&&Be.find(i=>{var u;return(i==null?void 0:i.key)===((u=a==null?void 0:a.split("/"))==null?void 0:u[(a==null?void 0:a.split("/").length)-1])})?S.value=!0:S.value=!1},{immediate:!0});const te=a=>{if((a==null?void 0:a.type)==="table"){let i=Object.values(a==null?void 0:a.row),u=i==null?void 0:i.find(d=>typeof d=="string"&&((d==null?void 0:d.includes(".urdf"))||(d==null?void 0:d.includes(".obj"))));u&&(H.value={url:u,row:a==null?void 0:a.row},R("showChild",{url:u,row:a==null?void 0:a.row}))}},W=()=>{sessionStorage.clear(),window.location.reload()},fe=async()=>{var i,u,d,v;q.setImportLoading(!0);const a=await r.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey")}});if(((i=a==null?void 0:a.data)==null?void 0:i.code)===200){let o=(v=(d=(u=a==null?void 0:a.data)==null?void 0:u.result)==null?void 0:d.map(c=>{var l;if(((l=c==null?void 0:c.key)==null?void 0:l.layer)!=="superAdmin")return c==null?void 0:c.id}))==null?void 0:v.filter(c=>c);await r.batchDeleteInsofDataApi({ids:o}),q.setRawMenus([])}q.setImportLoading(!1)},ge=async a=>{var d,v,o,c,l,N,g;const i=(d=a==null?void 0:a.split("/"))==null?void 0:d[0],u=await r.getInsofDataApi({key:{type:"mainEquip",systemKey:sessionStorage.getItem("systemKey"),pageKey:i}});return((v=u==null?void 0:u.data)==null?void 0:v.type)==="success"?((g=(N=(l=(c=(o=u==null?void 0:u.data)==null?void 0:o.result)==null?void 0:c[0])==null?void 0:l.value)==null?void 0:N.tableData)==null?void 0:g.隐藏三维显示)!==!0:!0};e.watch(()=>C.showItems.value,()=>{var a,i,u,d,v;if(((a=C.showItems.value)==null?void 0:a.length)===2&&((i=C.showItems.value)!=null&&i.find(o=>(o==null?void 0:o.name)==="输入"))&&((u=C.showItems.value)!=null&&u.find(o=>(o==null?void 0:o.name)==="输出"))){const o=(d=C.showItems.value)==null?void 0:d.find(c=>(c==null?void 0:c.name)==="输出");s.value=((v=o==null?void 0:o.comp)==null?void 0:v.toUpperCase())==="FORM",z.value=!0}else z.value=!1,s.value=!1},{deep:!0,immediate:!0}),e.watch(()=>P.value,async()=>{P.value&&(ee.value=await ge(P.value))},{deep:!0,immediate:!0}),e.watch(()=>[D.value,M.value],()=>{var a;((a=D.value)==null?void 0:a.length)>0&&M.value&&M.value.addModelsFromUrls(D.value)},{immediate:!0,deep:!0}),e.watch(()=>[f==null?void 0:f.value],async()=>{var a,i,u,d,v;if(f!=null&&f.value&&((a=f==null?void 0:f.value)==null?void 0:a.length)>0&&!S.value&&!((i=C.showItems.value)!=null&&i.find(o=>(o==null?void 0:o.name)==="输入")&&((u=C.showItems.value)!=null&&u.find(o=>(o==null?void 0:o.name)==="输出")))){V.value=!0;let o=[];const c=await((d=r.cloneDeep(f==null?void 0:f.value))==null?void 0:d.map(async l=>{var O,k,h,m,w,se,Ce,Ve,Ne,xe;let N,g,p;l!=null&&l.blob.includes("undefined")?p=(k=(O=l==null?void 0:l.blob)==null?void 0:O.split("undefined,"))==null?void 0:k[1]:p=l==null?void 0:l.blob;let A=p==null?void 0:p.split(",");if((A==null?void 0:A.length)>1){let ce=await(A==null?void 0:A.map(async I=>{var ae,be,Te,Fe,Se,De;N=await r.axios.get(I,{responseType:"blob",headers:{"Content-Type":"application/json"}});let de=[];if(((ae=l==null?void 0:l.mtlBlobs)==null?void 0:ae.length)>0){let Le=await((be=l==null?void 0:l.mtlBlobs)==null?void 0:be.map(async qe=>{let Re=await r.axios.get(qe,{responseType:"blob",headers:{"Content-Type":"application/json"}});return de.push(new Blob([Re.data],{type:"application/octet-stream;charset=UTF-8"})),Re}));await Promise.all(Le)}return((Fe=I==null?void 0:I.split("."))==null?void 0:Fe[((Te=I==null?void 0:I.split("."))==null?void 0:Te.length)-1])!=="undefined"&&o.push({suffix:"."+((De=I==null?void 0:I.split("."))==null?void 0:De[((Se=I==null?void 0:I.split("."))==null?void 0:Se.length)-1]),blob:new Blob([N.data],{type:"application/octet-stream;charset=UTF-8"}),mtlBlobs:de}),N}));await Promise.all(ce)}else if(!(p!=null&&p.includes("https://"))&&!(p!=null&&p.includes("http://"))){N=await Q.downloadAvatarApi({url:p});let ce=[];if(((h=l==null?void 0:l.mtlBlobs)==null?void 0:h.length)>0){let I=await((m=l==null?void 0:l.mtlBlobs)==null?void 0:m.map(async de=>{let ae=await Q.downloadAvatarApi({url:de});return ce.push(new Blob([ae.data],{type:"application/octet-stream;charset=UTF-8"})),ae}));await Promise.all(I)}g={suffix:"."+((se=p==null?void 0:p.split("."))==null?void 0:se[((w=p==null?void 0:p.split("."))==null?void 0:w.length)-1]),blob:new Blob([N.data],{type:"application/octet-stream;charset=UTF-8"}),mtlBlobs:ce}}else{N=await r.axios.get(p,{responseType:"blob",headers:{"Content-Type":"application/json"}});let ce=[];if(((Ce=l==null?void 0:l.mtlBlobs)==null?void 0:Ce.length)>0){let I=await((Ve=l==null?void 0:l.mtlBlobs)==null?void 0:Ve.map(async de=>{let ae=await r.axios.get(de,{responseType:"blob",headers:{"Content-Type":"application/json"}});return ce.push(new Blob([ae.data],{type:"application/octet-stream;charset=UTF-8"})),ae}));await Promise.all(I)}g={suffix:"."+((xe=p==null?void 0:p.split("."))==null?void 0:xe[((Ne=p==null?void 0:p.split("."))==null?void 0:Ne.length)-1]),blob:new Blob([N.data],{type:"application/octet-stream;charset=UTF-8"}),mtlBlobs:ce}}g&&o.push(g)}));await Promise.all(c),(o==null?void 0:o.length)!==0&&((v=M.value)==null||v.loadModelByDefaultPath(o))}},{immediate:!0,deep:!0});const _e=()=>{V.value=!1,M.value=null};e.watch(()=>$.value,async()=>{var i,u,d,v;if($.value!==""&&$.value){let o=(i=P.value)==null?void 0:i.split("/"),c=o[(o==null?void 0:o.length)-2];const N=(((u=ke==null?void 0:ke.find(A=>(A==null?void 0:A.key)===c))==null?void 0:u.download)??"")+"/"+$.value,g=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken"),p=await r.axios.post(N,null,{responseType:"blob",headers:{Authorization:g,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}});var a=new Blob([p.data],{type:"application/octet-stream;charset=UTF-8"});""+((v=(d=$.value)==null?void 0:d.split("."))==null?void 0:v[1])}},{deep:!0,immediate:!0});const ue=e.ref("");e.ref("open"),e.ref("open"),e.ref(!1),e.computed(()=>C.showItems.value);const he=e.computed(()=>j.value.isRouter),T=a=>{let i=r.cloneDeep(a),u=[],d=[];return i==null||i.forEach((v,o)=>{o===(a==null?void 0:a.length)-1?(d.push(v),u.push(d)):((d==null?void 0:d.length)!==0&&v.includes(".obj")&&(u.push(d),d=[]),d.push(v))}),u},ie=async()=>{let a={};const i=await ne.getItemData("弯管仿真加工管理/仿真动画生成",sessionStorage.getItem("systemKey"),""),u=await ne.getItemData("弯管仿真加工管理/管件解析",sessionStorage.getItem("systemKey"),"");let d=["管长","外径"],v={};u==null||u.forEach(o=>{var c;(o==null?void 0:o.comp)==="Form"&&((c=o==null?void 0:o.compData)==null||c.forEach(l=>{var N;(l==null?void 0:l.key)==="formContent"&&((N=l==null?void 0:l.contents)==null||N.forEach(g=>{d.includes(g==null?void 0:g.key)&&(v[g.key]=g.value)}))}))}),i==null||i.forEach(o=>{var c,l,N,g,p,A;if((o==null?void 0:o.comp)==="Table"){let O=[],k=(N=(l=(c=o==null?void 0:o.compData)==null?void 0:c.find(m=>(m==null?void 0:m.key)==="header"))==null?void 0:l.contents)==null?void 0:N.map(m=>m==null?void 0:m.label),h=(A=(p=(g=o==null?void 0:o.compData)==null?void 0:g.find(m=>(m==null?void 0:m.key)==="tableContents"))==null?void 0:p.contents)==null?void 0:A.map(m=>(m=m==null?void 0:m.filter(w=>!(w!=null&&w.id)),m));h==null||h.forEach(m=>{O.push(ne.getValueToObjectValue(m,k==null?void 0:k.filter(w=>w!=="操作")))}),a[o.name]=O,a[o.name+"Content"]=o}}),a.extra=v,Z.value=a},ve=e.ref(!1),Ue=async()=>{var a,i;if(ve.value=!0,H.value){const u=H.value;let d=[];if(typeof(u==null?void 0:u.url)=="string"){let v=(a=u==null?void 0:u.url)==null?void 0:a.split(","),o=(i=T(v))==null?void 0:i.map(async c=>{var l,N;if((c==null?void 0:c.length)===1){let g=c==null?void 0:c.map(async p=>{var h,m;let A=await r.axios.get(p,{responseType:"blob",headers:{"Content-Type":"application/json"}});const O=new Blob([A.data],{type:"application/octet-stream;charset=UTF-8"});let k={suffix:"."+((m=p==null?void 0:p.split("."))==null?void 0:m[((h=p==null?void 0:p.split("."))==null?void 0:h.length)-1]),blob:O,mtlBlobs:[]};return d.push(k),k});return await Promise.all(g),g}else{let g=c==null?void 0:c.find(w=>w==null?void 0:w.includes(".obj")),p=await r.axios.get(g,{responseType:"blob",headers:{"Content-Type":"application/json"}});const A=new Blob([p.data],{type:"application/octet-stream;charset=UTF-8"});let O=c==null?void 0:c.filter(w=>w==null?void 0:w.includes(".mtl")),k=[],h=O==null?void 0:O.map(async w=>{let se=await r.axios.get(g,{responseType:"blob",headers:{"Content-Type":"application/json"}});const Ce=new Blob([se.data],{type:"application/octet-stream;charset=UTF-8"});return k.push(Ce),se});await Promise.all(h);let m={suffix:"."+((N=g==null?void 0:g.split("."))==null?void 0:N[((l=g==null?void 0:g.split("."))==null?void 0:l.length)-1]),blob:A,mtlBlobs:k};return d.push(m),m}});await Promise.all(o)}M.value.loadModelByDefaultPath(d)}};return(a,i)=>{const u=e.resolveComponent("el-dialog"),d=e.resolveComponent("el-button"),v=e.resolveComponent("el-avatar"),o=e.resolveComponent("el-header"),c=e.resolveComponent("el-container"),l=e.resolveComponent("el-icon"),N=e.resolveComponent("el-input"),g=e.resolveComponent("el-aside"),p=e.resolveComponent("router-view"),A=e.resolveComponent("el-main"),O=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(u,{modelValue:ve.value,"onUpdate:modelValue":i[0]||(i[0]=k=>ve.value=k),style:{height:"700px",width:"1800px"}},{default:e.withCtx(()=>[e.createVNode(Ee.default,{ref_key:"threeModelRef",ref:M,onGetAnimationData:ie,animationData:Z.value},null,8,["animationData"])]),_:1},8,["modelValue"]),e.withDirectives(e.createVNode(c,{class:"client-container"},{default:e.withCtx(()=>[e.createVNode(o,{class:"client-structure-header"},{default:e.withCtx(()=>{var k;return[e.createElementVNode("div",ut,[e.createVNode(d,{id:"transparentBgButton",onClick:e.unref(C.onBack)},{default:e.withCtx(()=>i[3]||(i[3]=[e.createTextVNode(" 返回页面 ")])),_:1,__:[3]},8,["onClick"]),e.createVNode(d,{id:"transparentBgButton",onClick:i[1]||(i[1]=h=>{var m,w;return e.unref(C.clickSavePage)((w=(m=e.unref(F))==null?void 0:m.map(se=>se.value))==null?void 0:w.join("/"))})},{icon:e.withCtx(()=>[e.createVNode(pe.SvgIcon,{name:"Store"})]),default:e.withCtx(()=>[i[4]||(i[4]=e.createTextVNode(" 保存页面 "))]),_:1,__:[4]})]),e.createElementVNode("div",dt,[e.createVNode(je,{breadArray:e.unref(F),onClick:e.unref(C.onClick)},null,8,["breadArray","onClick"])]),e.createElementVNode("div",pt,[e.renderSlot(a.$slots,"default",{},void 0,!0),e.createVNode(v,{size:35,src:(k=e.unref(y))==null?void 0:k.avatarUrl},{default:e.withCtx(()=>{var h,m,w;return[e.createTextVNode(e.toDisplayString((h=e.unref(y))!=null&&h.account?(m=e.unref(y))==null?void 0:m.account:((w=e.unref(y))==null?void 0:w.账号)??"未知"),1)]}),_:1},8,["src"])])]}),_:3}),e.unref(L)==="edit"?(e.openBlock(),e.createBlock(c,{key:0,class:"model-operate",style:{"margin-top":"10px",height:"0px"}},{default:e.withCtx(()=>[e.createElementVNode("div",mt,[e.createVNode(oe.modelSelect)]),e.createElementVNode("div",ht,[e.createVNode(oe.modelShow)]),e.createElementVNode("div",ft,[e.createVNode(oe.modelFill)])]),_:1})):e.createCommentVNode("",!0)]),_:3},512),[[e.vShow,e.unref(L)==="edit"]]),e.withDirectives((e.openBlock(),e.createBlock(c,{class:"client-container","element-loading-text":"正在加载页面数据..."},{default:e.withCtx(()=>[e.createVNode(o,{class:"client-header"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"client-header-logo",onClick:Ue},e.toDisplayString(e.unref(_)===""?"CPMPIP":e.unref(_)),1),e.createElementVNode("div",gt,[e.createVNode(Ie,{mode:"horizontal"})]),e.createElementVNode("div",_t,[e.createVNode(N,{modelValue:ue.value,"onUpdate:modelValue":i[2]||(i[2]=k=>ue.value=k),clearable:"",placeholder:"搜索",style:{width:"130px"}},{prefix:e.withCtx(()=>[e.createVNode(l,{class:"el-input__icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(r.search_default))]),_:1})]),_:1},8,["modelValue"]),x.showButton?(e.openBlock(),e.createBlock(d,{key:0,id:"transparentBgButton",onClick:b},{icon:e.withCtx(()=>[e.createVNode(pe.SvgIcon,{name:"App"})]),default:e.withCtx(()=>[i[5]||(i[5]=e.createTextVNode(" 生成APP "))]),_:1,__:[5]})):e.createCommentVNode("",!0),x.showButton&&e.unref(L)==="view"?(e.openBlock(),e.createBlock(d,{key:1,id:"transparentBgButton",onClick:e.unref(C.onSelectFixContent)},{icon:e.withCtx(()=>[e.createVNode(pe.SvgIcon,{name:"write"})]),default:e.withCtx(()=>[i[6]||(i[6]=e.createTextVNode(" 修改布局 "))]),_:1,__:[6]},8,["onClick"])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"default",{},void 0,!0),e.createVNode(Q._sfc_main,null,{dropTitle:e.withCtx(()=>{var k;return[e.createVNode(Pe._sfc_main,{size:"35",avatarUrl:(k=e.unref(y))==null?void 0:k.avatarUrl,showCropper:!1,banClick:!0},{avatarDefault:e.withCtx(()=>{var h,m;return[e.createTextVNode(e.toDisplayString(((h=e.unref(y))==null?void 0:h.account)??((m=e.unref(y))==null?void 0:m.姓名)??"未知"),1)]}),_:1},8,["avatarUrl"])]}),dropMenu:e.withCtx(()=>[e.createElementVNode("div",Ct,[e.createVNode(Q._sfc_main$1,{emptyColor:!0,class:"menu-button",onClickTrigger:fe,modelValue:"清空数据",buttonType:""}),e.createVNode(Q._sfc_main$1,{emptyColor:!0,class:"menu-button",onClickTrigger:W,modelValue:"退出登录",buttonType:""})])]),_:1})])]),_:3}),e.createVNode(c,{class:"client-body"},{default:e.withCtx(()=>[e.createVNode(A,{class:"client-main"},{default:e.withCtx(()=>{var k;return[e.createVNode(g,{class:"client-aside"},{default:e.withCtx(()=>[e.createVNode($e.default,{mode:"vertical"})]),_:1}),e.withDirectives((e.openBlock(),e.createElementBlock("div",yt,[he.value?(e.openBlock(),e.createBlock(p,{key:0})):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList((k=e.unref(r.cloneDeep)(e.unref(C.showItems)))==null?void 0:k.filter(h=>h.comp!=="FormTop"),(h,m)=>{var w;return e.openBlock(),e.createElementBlock("div",{class:"item-view-content",key:m},[((w=h==null?void 0:h.comp)==null?void 0:w.toUpperCase())!=="TABLE"&&h.name?(e.openBlock(),e.createElementBlock("div",wt,e.toDisplayString(h.name),1)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(C.getComponents)(h.comp)),{compName:h.name,itemData:h==null?void 0:h.compData,childItemData:h==null?void 0:h.itemChildData,key:(h==null?void 0:h.id)??m,onChange:e.unref(C.onChange),index:(h==null?void 0:h.id)??m,onContentChange:e.unref(C.onContentChange),onPageChange:e.unref(C.onPageChange),onRowClick:te},null,40,["compName","itemData","childItemData","onChange","index","onContentChange","onPageChange"]))])}),128))])),[[O,e.unref(K)]])]}),_:1})]),_:1})]),_:3})),[[e.vShow,e.unref(L)==="view"],[O,e.unref(J)]]),e.createElementVNode("div",null,[e.createVNode(Q.ssDialog,{visible:V.value,onBeforeDestroy:_e,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(Ee.default,{ref_key:"threeModelRef",ref:M},null,512)]),_:1},8,["visible"])])],64)}}}),kt=me._export_sfc(vt,[["__scopeId","data-v-9f249b2b"]]),Bt={class:"system-wrap"},Vt={__name:"index",props:{windowConfig:{type:Object,default:()=>{}},platform:{type:String,default:"browser"},showButton:{type:Boolean,default:!0},content:String,jsonContents:Array},emits:["buildContent","showChild"],setup(x,{emit:X}){const n=we.useModelComp(r.pinia),V=ye.useUnit(r.pinia),F=r.useMenuState();e.ref(!1);const z=e.ref(!0),s=x,G=X,S=y=>{G("showChild",y)},$=e.computed(()=>{switch(s==null?void 0:s.platform){case"browser":return Ae.browserThemeConfig;case"client":return Ae.clientThemeConfig}}),H=y=>{const U=document.documentElement;y==null||y.forEach(L=>{U.style.setProperty(L.name,L.value)})};e.watch(()=>s.platform,(y,U)=>{y&&H($.value)},{immediate:!0});const le=()=>{G("buildContent")};return e.watch(()=>[s==null?void 0:s.content,s==null?void 0:s.jsonContents],async()=>{var L,q,Y,D;if(((L=s==null?void 0:s.jsonContents)==null?void 0:L.length)>0){n.setOriginalData(s==null?void 0:s.jsonContents);return}if(!(s!=null&&s.content)||((q=s==null?void 0:s.content)==null?void 0:q.length)===0)return;z.value=!0,F.setImportLoading(!0);let y=[],U=[];V.setSelectTitle([]),V.setSelectIndex(""),V.setSelectMenu(""),(D=(Y=s==null?void 0:s.content)==null?void 0:Y.filter(f=>f!==""))==null||D.forEach(f=>{U.push(C.expandToNewContents(f))}),y=U==null?void 0:U[0],await C.savePageDataAsync(y),await ne.loadingSystemType(),n.setOriginalData(y),F.setImportLoading(!1)},{deep:!0,immediate:!0}),(y,U)=>(e.openBlock(),e.createElementBlock("div",Bt,[x.platform==="browser"?(e.openBlock(),e.createBlock(ct,{key:0,showButton:x.showButton},{default:e.withCtx(()=>[e.renderSlot(y.$slots,"default",{},void 0,!0)]),_:3},8,["showButton"])):(e.openBlock(),e.createBlock(kt,{key:1,windowConfig:x.windowConfig,showButton:x.showButton,onBuildContent:le,onShowChild:S},{default:e.withCtx(()=>[e.renderSlot(y.$slots,"default",{},void 0,!0)]),_:3},8,["windowConfig","showButton"]))]))}},Nt=me._export_sfc(Vt,[["__scopeId","data-v-5e89b0de"]]),xt={class:"add-model-content"},bt={key:0,class:"model-operate"},Tt={class:"model-select"},Ft={class:"model-fill"},St={key:1,class:"model-view"},Dt={__name:"index",props:{mode:{type:String,default:"view"},content:{type:String,default:""},jsonContents:{type:Array,default:()=>[]},showButton:{type:Boolean,default:!0},pathContent:{type:String,default:""},pageKey:{type:String,default:""}},emits:["change","contentChange","buildContent","openThreeBuild","threeData"],setup(x,{emit:X}){const n=x,V=X,F=e.ref([]),z=e.ref(0),s=e.ref([]),G=e.ref([]),S=e.ref(0),$=we.useModelComp(r.pinia),H=r.useMenuState(r.pinia),{itemData:le,originalData:y}=r.storeToRefs($),{activeMenuPath:U,platform:L}=r.storeToRefs(H),q=e.ref(null),Y=e.ref(0),D=e.ref([]);e.ref("");const f=e.ref(0),M=()=>{V("buildContent")};e.watch(()=>n==null?void 0:n.pageKey,async()=>{let _={};if((n==null?void 0:n.pageKey)!==""){const j=await ne.getItemData(n==null?void 0:n.pageKey,sessionStorage.getItem("systemKey"),""),K=await ne.getItemData("弯管仿真加工管理/管件解析",sessionStorage.getItem("systemKey"),"");let E=["管长","外径"],B={};K==null||K.forEach(t=>{var R;(t==null?void 0:t.comp)==="Form"&&((R=t==null?void 0:t.compData)==null||R.forEach(b=>{var te;(b==null?void 0:b.key)==="formContent"&&((te=b==null?void 0:b.contents)==null||te.forEach(W=>{E.includes(W==null?void 0:W.key)&&(B[W.key]=W.value)}))}))}),j==null||j.forEach(t=>{var R,b,te,W,fe,ge;if((t==null?void 0:t.comp)==="Table"){let _e=[],ue=(te=(b=(R=t==null?void 0:t.compData)==null?void 0:R.find(T=>(T==null?void 0:T.key)==="header"))==null?void 0:b.contents)==null?void 0:te.map(T=>T==null?void 0:T.label),he=(ge=(fe=(W=t==null?void 0:t.compData)==null?void 0:W.find(T=>(T==null?void 0:T.key)==="tableContents"))==null?void 0:fe.contents)==null?void 0:ge.map(T=>(T=T==null?void 0:T.filter(ie=>!(ie!=null&&ie.id)),T));he==null||he.forEach(T=>{_e.push(ne.getValueToObjectValue(T,ue==null?void 0:ue.filter(ie=>ie!=="操作")))}),_[t.name]=_e,_[t.name+"Content"]=t}}),_.extra=B,V("threeData",_)}},{deep:!0,immediate:!0});const Z=_=>{V("openThreeBuild",_)};e.watch(()=>n==null?void 0:n.pathContent,()=>{(n==null?void 0:n.pathContent)!==""&&$.setSystemPath(n==null?void 0:n.pathContent)},{deep:!0,immediate:!0});const ee=_=>{V("contentChange",_)},J=_=>{var K;const j=(K=r.cloneDeep(_==null?void 0:_.wholeValue))==null?void 0:K.map(E=>{var B;return(E==null?void 0:E.comp)==="Form"&&(E.compData=(B=E.compData)==null?void 0:B.map(t=>((t==null?void 0:t.key)==="formContent"&&(t.contents=Oe.arrayToNumberArray(t==null?void 0:t.contents)),t))),E});V("change",{originalContents:y.value,currentContents:_==null?void 0:_.wholeValue,editContent:_==null?void 0:_.editValue,arrayToContents:j})};e.watch(()=>s.value,()=>{f.value===s.value.length&&s.value.length!==0&&(F.value=s.value)},{deep:!0,immediate:!0});const P=()=>{q.value!==null&&q.value.click()},re=async _=>{const j=_.target.files;if(!j)return;new FileReader,F.value=[],s.value=[],f.value=j.length;const K=Array.from(j).map(async E=>await new Promise(B=>{const t=new FileReader;t.onload=R=>{try{s.value.push(R.target.result),Y.value++}catch(b){console.error("解析失败:",b);return}},t.onerror=()=>B(`读取 ${E.name} 失败`),t.readAsText(E),_.target.value="",q.value=null,z.value++}));await Promise.all(K)};return e.watch(()=>[n==null?void 0:n.content,n==null?void 0:n.jsonContents],async()=>{await ne.loadingSystemType(),F.value=n.content,G.value=n==null?void 0:n.jsonContents},{deep:!0,immediate:!0}),e.watch(()=>Y.value,()=>{var _;((_=D.value)==null?void 0:_.length)!==0&&($.setOriginalData(D.value),$.setItemData(D.value))},{deep:!0,immediate:!0}),(_,j)=>{const K=e.resolveComponent("svg-icon"),E=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",xt,[(n==null?void 0:n.mode)==="edit"?(e.openBlock(),e.createElementBlock("div",bt,[e.createElementVNode("div",Tt,[e.createVNode(oe.modelSelect)]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:S.value},[e.createVNode(oe.modelShow)])),e.createElementVNode("div",Ft,[e.createVNode(oe.modelFill)])])):e.createCommentVNode("",!0),(n==null?void 0:n.mode)==="view"?(e.openBlock(),e.createElementBlock("div",St,[(e.openBlock(),e.createBlock(Nt,{showButton:x.showButton,platform:e.unref(L),content:F.value,onChange:J,jsonContents:G.value,onContentChange:ee,onBuildContent:M,key:S.value,onShowChild:Z},{default:e.withCtx(()=>{var B;return[((B=n==null?void 0:n.jsonContents)==null?void 0:B.length)===0&&(n!=null&&n.showButton)?(e.openBlock(),e.createBlock(E,{key:0,id:"transparentBgButton",onClick:P},{icon:e.withCtx(()=>[e.createVNode(K,{name:"import"})]),default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock("input",{type:"file",key:z.value,ref_key:"fileInput",ref:q,accept:".txt, .inm, .iml, .imd",onChange:re,style:{display:"none"},multiple:""},null,32)),j[0]||(j[0]=e.createTextVNode(" 导入模型 "))]),_:1,__:[0]})):e.createCommentVNode("",!0)]}),_:1},8,["showButton","platform","content","jsonContents"]))])):e.createCommentVNode("",!0)])}}},Rt=me._export_sfc(Dt,[["__scopeId","data-v-1ee6cc73"]]);exports.default=Rt;
|