ss-component-new 1.1.719 → 1.1.721

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/dist/{array-CV47iU9i.js → array-BcN1bdmj.js} +1 -1
  2. package/dist/{array-C_A3GqHl.cjs → array-CgJ6luvr.cjs} +1 -1
  3. package/dist/icons/svg/colFilter.svg +1 -0
  4. package/dist/{index-Bdy9rjka.js → index-50HGqFLU.js} +3 -3
  5. package/dist/{index-DmPffoKv.cjs → index-B9SUJ4Zu.cjs} +1 -1
  6. package/dist/index-BAdqe1Qk.cjs +1 -0
  7. package/dist/{index-CpnXGkvz.js → index-BHBGoWFE.js} +4 -4
  8. package/dist/{index-BCZ59Y4K.js → index-BHZ56TUj.js} +1 -0
  9. package/dist/{index-2p69g4HY.cjs → index-BKUqLOwQ.cjs} +5 -5
  10. package/dist/{index-Ca4sbgf-.cjs → index-BV3gIolN.cjs} +1 -1
  11. package/dist/{index-D8qVbjll.js → index-BYl3ZfMW.js} +2 -2
  12. package/dist/{index-ChQSWsp7.js → index-B_GAWj5p.js} +3 -3
  13. package/dist/{index-BU8nVgIT.js → index-B_h8SY5M.js} +1 -1
  14. package/dist/{index-juDP8c2k.js → index-BaJiGLkX.js} +1 -1
  15. package/dist/{index-HqICPCny.cjs → index-BaOJ2FlA.cjs} +1 -1
  16. package/dist/{index-BOZohpjd.cjs → index-Be3sB22h.cjs} +1 -1
  17. package/dist/{index-h0An6eiK.js → index-Bidjqofb.js} +2915 -2859
  18. package/dist/{index-BF1d01SM.js → index-Bjlg9wnM.js} +6 -6
  19. package/dist/{index-Bg2iV3ln.cjs → index-BkryeHcb.cjs} +1 -1
  20. package/dist/{index-BcNQOPYD.js → index-Bl6RAbAc.js} +2 -2
  21. package/dist/{index-47QrfG4u.cjs → index-Bwj8bU3w.cjs} +13 -13
  22. package/dist/{index-BrQVl4Zd.cjs → index-Bxw2nNk2.cjs} +1 -1
  23. package/dist/{index-DpzKMBIi.js → index-C08wAtul.js} +4 -4
  24. package/dist/{index-iGVtZ2hS.cjs → index-C1IBXnyt.cjs} +1 -1
  25. package/dist/{index-s4l8lwWV.js → index-C2KiCWir.js} +3 -3
  26. package/dist/{index-DwlLvQ7U.cjs → index-C5OJDom_.cjs} +1 -1
  27. package/dist/{index-Bu_OR9tS.js → index-C8KgQTfH.js} +8109 -7955
  28. package/dist/{index-C6SI8hvh.cjs → index-CAV4FH8Z.cjs} +1 -1
  29. package/dist/{index-XuxfvwKY.js → index-CIPfJ4V5.js} +6 -6
  30. package/dist/{index-VBY1u2Ig.cjs → index-CLaUio0q.cjs} +1 -1
  31. package/dist/{index-BAdkTvA0.cjs → index-CSfd9Nvs.cjs} +1 -1
  32. package/dist/index-CVDOumPC.js +514 -0
  33. package/dist/{index-cBErNLtY.js → index-Cd71tWDj.js} +3 -3
  34. package/dist/{index-DgPw8IAq.cjs → index-CeOHn1Vk.cjs} +1 -1
  35. package/dist/{index-B4D4I9Ei.cjs → index-Cx320XRD.cjs} +1 -1
  36. package/dist/index-CyCiiIH7.js +99 -0
  37. package/dist/{index-DSPdpu8p.cjs → index-CyTykQhT.cjs} +1 -1
  38. package/dist/index-D4nn1MaA.cjs +1 -0
  39. package/dist/{index-C_1UdyuB.cjs → index-D9G0MN0h.cjs} +1 -1
  40. package/dist/{index-KbmAaWgt.cjs → index-D9HFpsnH.cjs} +1 -1
  41. package/dist/{index-D-t9ZfYS.js → index-DFwEXQv-.js} +4 -4
  42. package/dist/{index-Ct0CmWjo.js → index-DIlWcnao.js} +1 -1
  43. package/dist/{index-CatyTybI.js → index-DJ2FxFvx.js} +1 -1
  44. package/dist/{index-BZkWytFH.js → index-DLPqu104.js} +6 -6
  45. package/dist/{index-8idzhcUq.cjs → index-DOn8yEZJ.cjs} +185 -185
  46. package/dist/{index-C9Nq7qdZ.cjs → index-Dn7yNpUx.cjs} +1 -1
  47. package/dist/{index-B1EBZK4V.cjs → index-Dz7-jX87.cjs} +1 -1
  48. package/dist/{index-glKQqAZb.cjs → index-GxAWv8aU.cjs} +1 -1
  49. package/dist/{index-CGv_PH5k.cjs → index-VQ4mf0NG.cjs} +1 -1
  50. package/dist/{index-B9e8jfXC.js → index-YA8F1H22.js} +3 -3
  51. package/dist/{index-BP-q1C8f.js → index-di0y5Ciz.js} +663 -662
  52. package/dist/{index-CHlc1LGK.cjs → index-fniyUh6b.cjs} +1 -1
  53. package/dist/{index-62jpKG-S.js → index-onW5suua.js} +4 -4
  54. package/dist/{index-Ba_1AoLH.js → index-v9IlbVxb.js} +3 -3
  55. package/dist/{index-C2JVL00b.js → index-xSTLa8Bb.js} +108 -108
  56. package/dist/{index.vue_vue_type_script_setup_true_lang-D6xvhgat.js → index.vue_vue_type_script_setup_true_lang-DAIduaBX.js} +2 -2
  57. package/dist/{index.vue_vue_type_script_setup_true_lang-BkYehasn.cjs → index.vue_vue_type_script_setup_true_lang-De8jbnS5.cjs} +1 -1
  58. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CUNGVKqd.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Bn_-cql3.cjs} +57 -57
  59. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D5Z2_TwH.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-C_N41ilG.js} +1715 -1720
  60. package/dist/{index.vue_vue_type_style_index_0_scoped_8606206c_lang-D0Bstp43.js → index.vue_vue_type_style_index_0_scoped_8606206c_lang-BgHhMOqW.js} +16 -16
  61. package/dist/{index.vue_vue_type_style_index_0_scoped_8606206c_lang-B3LO5bhv.cjs → index.vue_vue_type_style_index_0_scoped_8606206c_lang-CCQ1V4Ad.cjs} +2 -2
  62. package/dist/{index.vue_vue_type_style_index_0_scoped_c81d0427_lang-BS8sJ53i.js → index.vue_vue_type_style_index_0_scoped_c81d0427_lang-BajRaUap.js} +7 -7
  63. package/dist/{index.vue_vue_type_style_index_0_scoped_c81d0427_lang-Bk-zmumx.cjs → index.vue_vue_type_style_index_0_scoped_c81d0427_lang-CVGFhYru.cjs} +1 -1
  64. package/dist/{login-C8QOZ9u0.cjs → login-DoVI1BJb.cjs} +2 -2
  65. package/dist/{login-BLjZKKjO.js → login-Dxsw3cch.js} +6 -2
  66. package/dist/{main-0XZaToNP.js → main-B5FfttkG.js} +4 -4
  67. package/dist/{main-zPoUljx8.cjs → main-C_jD1CK-.cjs} +1 -1
  68. package/dist/ss-component.cjs +1 -1
  69. package/dist/ss-component.css +2 -2
  70. package/dist/ss-component.js +10 -10
  71. package/dist/ss-component2.cjs +1 -1
  72. package/dist/ss-component2.js +10 -10
  73. package/dist/{threeModel-8wtgLTlp.js → threeModel-BNhwg7RT.js} +3 -3
  74. package/dist/{threeModel-cQmQcupA.cjs → threeModel-Dwjk_uWz.cjs} +1 -1
  75. package/package.json +1 -1
  76. package/public/icons/svg/colFilter.svg +1 -0
  77. package/dist/index-8oaOF8hU.cjs +0 -1
  78. package/dist/index-B0HGgYuY.cjs +0 -1
  79. package/dist/index-BE-X086v.js +0 -90
  80. package/dist/index-QzT_XISi.js +0 -508
  81. package/dist/obj/model.mtl +0 -42
  82. package/dist/obj/model.obj +0 -26110
  83. package/public/obj/model.mtl +0 -42
  84. package/public/obj/model.obj +0 -26110
@@ -1,26 +1,26 @@
1
1
  import { defineAsyncComponent as s } from "vue";
2
2
  import { S as g } from "./index-BHtNKL1L.js";
3
- import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D5Z2_TwH.js";
4
- import "./login-BLjZKKjO.js";
5
- import "./index-BCZ59Y4K.js";
3
+ import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-C_N41ilG.js";
4
+ import "./login-Dxsw3cch.js";
5
+ import "./index-BHZ56TUj.js";
6
6
  import l from "./ss-component2.js";
7
- const n = s(() => import("./main-0XZaToNP.js"));
7
+ const n = s(() => import("./main-B5FfttkG.js"));
8
8
  n.install = (o) => {
9
9
  o.component("ssComponent", n);
10
10
  };
11
- const t = s(() => import("./index-h0An6eiK.js").then((o) => o.m));
11
+ const t = s(() => import("./index-Bidjqofb.js").then((o) => o.m));
12
12
  t.install = (o) => {
13
13
  o.component("ssTab", t);
14
14
  };
15
- const e = s(() => import("./index-juDP8c2k.js"));
15
+ const e = s(() => import("./index-BaJiGLkX.js"));
16
16
  e.install = (o) => {
17
17
  o.component("ssMenu", e);
18
18
  };
19
- const m = s(() => import("./index-BE-X086v.js"));
19
+ const m = s(() => import("./index-CyCiiIH7.js"));
20
20
  m.install = (o) => {
21
21
  o.component("ssMenuComponent", m);
22
22
  };
23
- const r = s(() => import("./index-BcNQOPYD.js"));
23
+ const r = s(() => import("./index-Bl6RAbAc.js"));
24
24
  r.install = (o) => {
25
25
  o.component("ssCanvas", r);
26
26
  };
@@ -28,11 +28,11 @@ const p = s(() => import("./index-CZtXRS3l.js"));
28
28
  p.install = (o) => {
29
29
  o.component("ssFold", p);
30
30
  };
31
- const i = s(() => import("./index-BU8nVgIT.js"));
31
+ const i = s(() => import("./index-B_h8SY5M.js"));
32
32
  i.install = (o) => {
33
33
  o.component("ssAvatar", i);
34
34
  };
35
- const c = s(() => import("./threeModel-8wtgLTlp.js"));
35
+ const c = s(() => import("./threeModel-BNhwg7RT.js"));
36
36
  c.install = (o) => {
37
37
  o.component("ssThree", c);
38
38
  };
@@ -1 +1 @@
1
- "use strict";const n=require("vue-router"),t=[{path:"/tenant",name:"Tenant",component:async()=>Promise.resolve().then(()=>require("./index-DgPw8IAq.cjs"))},{path:"/login",name:"Login",component:async()=>Promise.resolve().then(()=>require("./index-8oaOF8hU.cjs"))},{path:"/",name:"Model",component:async()=>Promise.resolve().then(()=>require("./index-KbmAaWgt.cjs")),children:[{path:"平台管理/菜单管理",name:"Menu",component:async()=>Promise.resolve().then(()=>require("./index-DwlLvQ7U.cjs"))},{path:"平台管理/主菜单管理",name:"MainMenu",component:async()=>Promise.resolve().then(()=>require("./index-C_1UdyuB.cjs"))},{path:"系统管理/个人中心",name:"PersonalCenter",component:async()=>Promise.resolve().then(()=>require("./index-B4D4I9Ei.cjs"))},{path:"系统管理/职位管理",name:"Post",component:async()=>Promise.resolve().then(()=>require("./index-B1EBZK4V.cjs"))},{path:"系统管理/用户管理",name:"User",component:async()=>Promise.resolve().then(()=>require("./index-CGv_PH5k.cjs"))},{path:"系统管理/角色管理",name:"Role",component:async()=>Promise.resolve().then(()=>require("./index-iGVtZ2hS.cjs"))},{path:"系统管理/部门管理",name:"Dept",component:async()=>Promise.resolve().then(()=>require("./index-CHlc1LGK.cjs"))},{path:"priority",name:"Priority",component:async()=>Promise.resolve().then(()=>require("./index-D0QjuJev.cjs"))}]}],o=n.createRouter({history:n.createWebHashHistory(),routes:t});o.beforeEach((r,s,e)=>{!sessionStorage.getItem("loginToken")&&r.path!=="/login"?e("/login"):e()});module.exports=o;
1
+ "use strict";const n=require("vue-router"),t=[{path:"/tenant",name:"Tenant",component:async()=>Promise.resolve().then(()=>require("./index-CeOHn1Vk.cjs"))},{path:"/login",name:"Login",component:async()=>Promise.resolve().then(()=>require("./index-D4nn1MaA.cjs"))},{path:"/",name:"Model",component:async()=>Promise.resolve().then(()=>require("./index-D9HFpsnH.cjs")),children:[{path:"平台管理/菜单管理",name:"Menu",component:async()=>Promise.resolve().then(()=>require("./index-C5OJDom_.cjs"))},{path:"平台管理/主菜单管理",name:"MainMenu",component:async()=>Promise.resolve().then(()=>require("./index-D9G0MN0h.cjs"))},{path:"系统管理/个人中心",name:"PersonalCenter",component:async()=>Promise.resolve().then(()=>require("./index-Cx320XRD.cjs"))},{path:"系统管理/职位管理",name:"Post",component:async()=>Promise.resolve().then(()=>require("./index-Dz7-jX87.cjs"))},{path:"系统管理/用户管理",name:"User",component:async()=>Promise.resolve().then(()=>require("./index-VQ4mf0NG.cjs"))},{path:"系统管理/角色管理",name:"Role",component:async()=>Promise.resolve().then(()=>require("./index-C1IBXnyt.cjs"))},{path:"系统管理/部门管理",name:"Dept",component:async()=>Promise.resolve().then(()=>require("./index-fniyUh6b.cjs"))},{path:"priority",name:"Priority",component:async()=>Promise.resolve().then(()=>require("./index-D0QjuJev.cjs"))}]}],o=n.createRouter({history:n.createWebHashHistory(),routes:t});o.beforeEach((r,s,e)=>{!sessionStorage.getItem("loginToken")&&r.path!=="/login"?e("/login"):e()});module.exports=o;
@@ -3,17 +3,17 @@ const a = [
3
3
  {
4
4
  path: "/tenant",
5
5
  name: "Tenant",
6
- component: async () => import("./index-Ct0CmWjo.js")
6
+ component: async () => import("./index-DIlWcnao.js")
7
7
  },
8
8
  {
9
9
  path: "/login",
10
10
  name: "Login",
11
- component: async () => import("./index-QzT_XISi.js")
11
+ component: async () => import("./index-CVDOumPC.js")
12
12
  },
13
13
  {
14
14
  path: "/",
15
15
  name: "Model",
16
- component: async () => import("./index-C2JVL00b.js"),
16
+ component: async () => import("./index-xSTLa8Bb.js"),
17
17
  // component: async ()=>import('@/components/views/model/component/main.vue'),
18
18
  // component: async ()=>import('@/components/views/canvas/index.vue'),
19
19
  // component: async ()=>import('@/components/views/test/index.vue'),
@@ -21,37 +21,37 @@ const a = [
21
21
  {
22
22
  path: "平台管理/菜单管理",
23
23
  name: "Menu",
24
- component: async () => import("./index-CpnXGkvz.js")
24
+ component: async () => import("./index-BHBGoWFE.js")
25
25
  },
26
26
  {
27
27
  path: "平台管理/主菜单管理",
28
28
  name: "MainMenu",
29
- component: async () => import("./index-D-t9ZfYS.js")
29
+ component: async () => import("./index-DFwEXQv-.js")
30
30
  },
31
31
  {
32
32
  path: "系统管理/个人中心",
33
33
  name: "PersonalCenter",
34
- component: async () => import("./index-DpzKMBIi.js")
34
+ component: async () => import("./index-C08wAtul.js")
35
35
  },
36
36
  {
37
37
  path: "系统管理/职位管理",
38
38
  name: "Post",
39
- component: async () => import("./index-XuxfvwKY.js")
39
+ component: async () => import("./index-CIPfJ4V5.js")
40
40
  },
41
41
  {
42
42
  path: "系统管理/用户管理",
43
43
  name: "User",
44
- component: async () => import("./index-ChQSWsp7.js")
44
+ component: async () => import("./index-B_GAWj5p.js")
45
45
  },
46
46
  {
47
47
  path: "系统管理/角色管理",
48
48
  name: "Role",
49
- component: async () => import("./index-cBErNLtY.js")
49
+ component: async () => import("./index-Cd71tWDj.js")
50
50
  },
51
51
  {
52
52
  path: "系统管理/部门管理",
53
53
  name: "Dept",
54
- component: async () => import("./index-BF1d01SM.js")
54
+ component: async () => import("./index-Bjlg9wnM.js")
55
55
  },
56
56
  {
57
57
  path: "priority",
@@ -1,8 +1,8 @@
1
1
  import { ref as b, watch as Pe, createElementBlock as q, openBlock as H, createBlock as Le, computed as ie, onMounted as $e, onUnmounted as je, Fragment as Xe, renderList as He, createElementVNode as h, createCommentVNode as xe, toDisplayString as ae, resolveComponent as Je, createVNode as z, defineComponent as Ye, normalizeStyle as Ee, normalizeClass as Fe, nextTick as Be, onBeforeUnmount as qe, withDirectives as se, unref as O, withCtx as Te, isRef as he, vModelRadio as ye, vShow as we } from "vue";
2
- import { V as M, B as be, S as Ze, C as We, P as Ke, W as Ne, d as Qe, A as et, e as tt, O as nt, M as Re, X as at, G as ot, h as Me, j as st, k as De, l as lt, D as ke, H as it, m as Ve, n as Oe, o as Ue, p as ze, E as _e, s as rt, q as de, r as ct, v as ut, T as dt, w as pt } from "./index-Bu_OR9tS.js";
2
+ import { V as M, B as be, S as Ze, C as We, P as Ke, W as Ne, d as Qe, A as et, e as tt, O as nt, M as Re, X as at, G as ot, h as Me, j as st, k as De, l as lt, D as ke, H as it, m as Ve, n as Oe, o as Ue, p as ze, E as _e, s as rt, q as de, r as ct, v as ut, T as dt, w as pt } from "./index-C8KgQTfH.js";
3
3
  import { _ as me } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
- import { c as Ge } from "./login-BLjZKKjO.js";
5
- import { E as Ie } from "./index-BCZ59Y4K.js";
4
+ import { c as Ge } from "./login-Dxsw3cch.js";
5
+ import { E as Ie } from "./index-BHZ56TUj.js";
6
6
  function mt(E) {
7
7
  let f = null, r = null, c = null, v = null, w = null, k = null, i = null, A = null;
8
8
  const F = 1e3 / 30;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-8idzhcUq.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),pe=require("./login-C8QOZ9u0.cjs"),de=require("./index-2p69g4HY.cjs");function me(z){let g=null,u=null,d=null,h=null,x=null,P=null,c=null,E=null;const D=1e3/30;let S=0;const b=e.ref([]),r=e.ref(new n.Vector3),k=e.ref(new n.Vector3),y=()=>{if(!z.value)return;g=new n.Scene,g.background=new n.Color(15790320);const m=z.value;u=new n.PerspectiveCamera(75,m.clientWidth/m.clientHeight,.1,1e4),u.position.set(8,-8,6),u.up.set(0,0,1),u.lookAt(0,0,0),d=new n.WebGLRenderer({antialias:!0,alpha:!0}),d.setSize(m.clientWidth,m.clientHeight),d.localClippingEnabled=!0,d.shadowMap.enabled=!0,d.shadowMap.type=n.PCFSoftShadowMap,d.toneMapping=n.ACESFilmicToneMapping,d.toneMappingExposure=1,d.outputColorSpace=n.SRGBColorSpace,m.appendChild(d.domElement),h=new n.OrbitControls(u,d.domElement),h.enableDamping=!0,h.dampingFactor=.05,h.mouseButtons={LEFT:null,MIDDLE:n.MOUSE.PAN,RIGHT:n.MOUSE.ROTATE},h.panSpeed=.7,x=new n.Xe(u,d,{container:m,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"}}),x.attachControls(h),f(),C()},t=(m,l)=>{c&&(g.remove(c),c.dispose()),E&&(g.remove(E),E.geometry.dispose(),E.material.dispose());const _=Math.min(Math.max(Math.floor(m/20),30),40);c=new n.GridHelper(m,_,13421772,14540253),c.rotateX(Math.PI/2),c.position.copy(l),g.add(c);const B=new n.PlaneGeometry(m,m),O=new n.ShadowMaterial({opacity:.3,color:0});E=new n.Mesh(B,O),E.position.copy(l),E.position.z-=.01,E.receiveShadow=!0,g.add(E)},p=()=>{if(b.value.length===0)return;const m=new n.Box3;let l=!1;if(b.value.forEach(X=>{if(X.userData.boundingBox)m.union(X.userData.boundingBox),l=!0;else if(X.userData.modelId&&modelBoundingBoxes.has(X.userData.modelId)){const Z=modelBoundingBoxes.get(X.userData.modelId);m.union(Z.box),l=!0}else m.expandByObject(X),l=!0}),!l){console.warn("无法计算包围盒,网格更新失败");return}const _=m.getSize(new n.Vector3),B=m.getCenter(new n.Vector3),O=Math.max(_.x,_.y,_.z),j=Math.max(O*8,50),q=new n.Vector3(B.x,B.y,m.min.z);t(j,q)},f=()=>{const m=new n.AmbientLight(4210752,.6);g.add(m);const l=new n.DirectionalLight(16777215,2);l.position.set(10,10,8),l.castShadow=!0,l.shadow.mapSize.width=4096,l.shadow.mapSize.height=4096,l.shadow.camera.near=.5,l.shadow.camera.far=50,l.shadow.camera.left=-50,l.shadow.camera.right=50,l.shadow.camera.top=50,l.shadow.camera.bottom=-50,g.add(l);const _=new n.DirectionalLight(16777215,.8);_.position.set(-8,-8,6),g.add(_);const B=new n.DirectionalLight(16777215,.6);B.position.set(0,-15,2),g.add(B);const O=new n.HemisphereLight(16777215,4473924,.8);g.add(O);const j=new n.PointLight(16777215,1,50);j.position.set(15,15,15),g.add(j);const q=new n.PointLight(16777215,.5,50);q.position.set(-15,-15,15),g.add(q)},C=()=>{P=requestAnimationFrame(C),h&&h.update();const m=performance.now(),l=m-S;l<D||(S=m-l%D,d&&g&&u&&d.render(g,u),x&&x.render())},I=m=>{["map","normalMap","bumpMap","roughnessMap","metalnessMap","emissiveMap","specularMap","envMap","lightMap","aoMap","displacementMap"].forEach(_=>{m[_]&&m[_].dispose&&m[_].dispose()}),m.dispose&&m.dispose()},A=m=>{m==null||m.traverse(l=>{l.geometry&&l.geometry.dispose(),l.material&&(Array.isArray(l.material)?l.material.forEach(_=>{I(_)}):I(l.material))})};return{currentModels:b,initialCameraPosition:r,initialTargetPosition:k,initThreeJS:y,handleResize:()=>{if(!z.value||!u||!d||!x)return;const m=z.value,l=m.clientWidth,_=m.clientHeight;u.aspect=l/_,u.updateProjectionMatrix(),d.setSize(l,_),x.update()},fitCameraToAllModels:m=>{if(!u||!h||b.value.length===0)return;const l=new n.Box3;let _=!1;if(b.value.forEach(Z=>{if(Z.userData.boundingBox)l.union(Z.userData.boundingBox),_=!0;else if(Z.userData.modelId&&m.has(Z.userData.modelId)){const ee=m.get(Z.userData.modelId);l.union(ee.box),_=!0}else l.expandByObject(Z),_=!0}),!_){console.warn("无法计算包围盒");return}const B=l.getSize(new n.Vector3),O=l.getCenter(new n.Vector3),q=Math.max(B.x,B.y,B.z)*.8,X=new n.Vector3(O.x+q,O.y-q,O.z+q);u.position.copy(X),u.lookAt(O),h.target.copy(O),h.update(),r.value.copy(X),k.value.copy(O),p()},getThreeJSObjects:()=>({scene:g,camera:u,renderer:d,controls:h,gizmo:x}),clearAllModels:()=>{if(!g)return;b.value.forEach(l=>{g.remove(l),A(l)});const m=[];g.children.forEach(l=>{!l.isLight&&!l.isCamera&&l.type!=="GridHelper"&&l!==E&&m.push(l)}),m.forEach(l=>{g.remove(l),A(l)}),b.value=[],p()},cleanup:()=>{P&&cancelAnimationFrame(P),c&&c.dispose(),E&&(E.geometry.dispose(),E.material.dispose()),d&&d.dispose(),h&&h.dispose(),x&&x.dispose()},updateGridForModels:p}}function fe(z,g){const u=e.ref(!1);let d=null,h=12700,x=new n.Vector3,P=new n.Vector3,c=new n.Vector3,E=0,F=null;const D=t=>t<.5?4*t*t*t:1-Math.pow(-2*t+2,3)/2,S=t=>{const p=new n.Vector3,f=E*1.2,C=new n.Vector3(c.x+f,c.y,c.z),I=new n.Vector3(c.x,c.y+f,c.z),A=new n.Vector3(c.x,c.y-f,c.z);if(t<=.567){const $=t/.567*Math.PI*2;p.x=c.x+Math.cos($)*f,p.z=c.z+Math.sin($)*f,p.y=c.y}else if(t<=.724){const L=(t-.567)/.157,$=D(L);p.lerpVectors(C,I,$)}else if(t<=.881){const L=(t-.724)/.157,J=D(L)*Math.PI;p.x=c.x+Math.sin(J)*f,p.y=c.y+Math.cos(J)*f,p.z=c.z}else{const L=(t-.881)/.119,$=D(L);p.lerpVectors(A,x,$)}return p},b=()=>{const{camera:t,controls:p}=z();if(!t||!p)return;d||(d=Date.now());const f=Date.now()-d,C=Math.min(f/h,1);if(C>=1){k();return}const I=S(C);t.position.copy(I),t.lookAt(c),p.target.copy(c),F=requestAnimationFrame(b)},r=()=>{if(g.value.length===0)return;const{camera:t,controls:p}=z();if(!t||!p)return;x.copy(t.position),P.copy(p.target);const f=new n.Box3;g.value.forEach(G=>{f.expandByObject(G)});const C=f.getSize(new n.Vector3);c=f.getCenter(new n.Vector3),E=Math.max(C.x,C.y,C.z)*1.2;const I=new n.Vector3(c.x+E*1.2,c.y,c.z);p.enabled=!1;const A=t.position.clone(),L=1e3,$=Date.now(),J=()=>{const G=Date.now()-$,Y=Math.min(G/L,1),m=D(Y);t.position.lerpVectors(A,I,m),t.lookAt(c),p.target.copy(c),Y<1?requestAnimationFrame(J):(u.value=!0,d=null,b())};J()},k=()=>{u.value=!1,d=null,F&&(cancelAnimationFrame(F),F=null);const{controls:t}=z();t&&(t.enabled=!0,t.target.copy(P))};return{isAnimating:u,toggleAnimation:()=>{if(u.value){u.value=!1,d=null,F&&(cancelAnimationFrame(F),F=null);const{camera:t,controls:p}=z();if(!t||!p)return;p.enabled=!0;const f=t.position.clone(),C=p.target.clone(),I=1500,A=Date.now(),L=()=>{const $=Date.now()-A,J=Math.min($/I,1),G=D(J);t.position.lerpVectors(f,x,G),p.target.lerpVectors(C,P,G),J<1&&requestAnimationFrame(L)};L()}else r()},startAnimation:r,stopAnimation:k}}function ve(z,g){const u=e.ref(!1),d=e.ref("none");let h=[],x=[],P=new n.Box3,c=new n.Vector3;const E=()=>{h=[new n.Plane(new n.Vector3(1,0,0),0),new n.Plane(new n.Vector3(0,1,0),0),new n.Plane(new n.Vector3(0,0,1),0)]},F=()=>{P.makeEmpty(),g.value.forEach(y=>{P.expandByObject(y)}),c=P.getCenter(new n.Vector3)},D=y=>{const t=P.getSize(new n.Vector3);let p,f,C;y==="x"?(p=new n.PlaneGeometry(t.z*1.2,t.y*1.2),f=new n.Vector3(c.x,c.y,c.z),C=new n.Euler(0,Math.PI/2,0)):y==="y"?(p=new n.PlaneGeometry(t.x*1.2,t.z*1.2),f=new n.Vector3(c.x,c.y,c.z),C=new n.Euler(Math.PI/2,0,0)):y==="z"&&(p=new n.PlaneGeometry(t.x*1.2,t.y*1.2),f=new n.Vector3(c.x,c.y,c.z),C=new n.Euler(0,0,0));const I=new n.MeshPhongMaterial({color:8900331,transparent:!0,opacity:.3,side:n.DoubleSide,depthWrite:!1}),A=new n.Mesh(p,I);return A.position.copy(f),A.rotation.copy(C),A},S=()=>{if(b(),r(),d.value==="none")return;F();let y=null;if(d.value==="x"?(h[0].constant=-c.x,y=h[0]):d.value==="y"?(h[1].constant=-c.y,y=h[1]):d.value==="z"&&(h[2].constant=-c.z,y=h[2]),y){g.value.forEach(p=>{p.traverse(f=>{f.isMesh&&f.material&&(Array.isArray(f.material)?f.material.forEach(C=>{C.clippingPlanes=[y]}):f.material.clippingPlanes=[y])})});const{scene:t}=z();if(t){const p=D(d.value);t.add(p),x.push(p)}}},b=()=>{g.value.forEach(y=>{y.traverse(t=>{t.isMesh&&t.material&&(Array.isArray(t.material)?t.material.forEach(p=>{p.clippingPlanes=[]}):t.material.clippingPlanes=[])})})},r=()=>{const{scene:y}=z();y&&x.forEach(t=>{y.remove(t),t.geometry.dispose(),t.material.dispose()}),x=[]};return{isClipping:u,activeClippingAxis:d,toggleClipping:()=>{u.value=!u.value,u.value?(E(),g.value.length>0&&F()):(d.value="none",b(),r())},updateClippingPlanes:S,clearClippingPlanes:b,clearClippingMeshes:r}}const ge={class:"panel-content"},he={__name:"animationPanel",props:{animationData:Object,model:Object},setup(z){const g=z;e.ref();const u=e.ref();return e.watch(()=>[g==null?void 0:g.animationData],()=>{var h;let d=((h=pe.cloneDeep(g==null?void 0:g.animationData))==null?void 0:h["输出(动画数据)Content"])??[];d&&(u.value=d)},{deep:!0,immediate:!0}),(d,h)=>{var x,P,c;return e.openBlock(),e.createElementBlock("div",ge,[(e.openBlock(),e.createBlock(n.ssTable,{itemData:(x=u.value)==null?void 0:x.compData,key:(P=u.value)==null?void 0:P.id,index:(c=u.value)==null?void 0:c.id,showHeader:!1},null,8,["itemData","index"]))])}}},ye=oe._export_sfc(he,[["__scopeId","data-v-2387536e"]]),we={class:"panel-content"},xe={key:0,class:"joints-list"},Ve={class:"joint-info-row"},Me={class:"joint-left"},ke={class:"joint-name"},Pe={class:"joint-range"},Ce={class:"joint-type"},Ee={key:0,class:"joint-control-row"},be={class:"slider-container"},_e=["min","max","value","onInput","disabled"],ze={class:"value-display"},De={class:"joint-value"},Ne={class:"unit"},Se={key:1,class:"empty-state"},ae=.001,Be=1e3,ce=60,Ae={__name:"jointPanel",props:{model:Object,scene:Object,animationData:Object},setup(z,{expose:g}){const u=z;e.ref(!0);const d=e.ref([]),h=e.ref(null),x=e.ref(null),P=e.ref(12.5),c=e.ref(),E=e.ref(1302),F=e.ref(30),D=e.ref(!1),S=e.ref(!1),b=e.ref(0),r=e.ref(0),k=e.ref(null),y=n.MathUtils.degToRad,t=e.ref(1),p=()=>Be/ce/t.value;let f=[];e.watch(()=>u.animationData,o=>{var i;E.value=o.extra.管长,P.value=o.extra.外径/2;let v=((i=pe.cloneDeep(o))==null?void 0:i["输出(动画数据)"])??[];v&&v.length>0&&(f=v)},{deep:!0}),e.computed(()=>f.length>0);const C=(o,v=!1)=>o==="revolute"?v?Math.PI:-Math.PI:o==="prismatic"?v?1:-1:0,I=()=>{if(!h.value)return de.ElMessage.error("未加载 URDF"),!1;let o=null;return h.value.traverse(v=>{o||v.name==="Pipe_Link"&&v.traverse(i=>{i instanceof n.Mesh&&!o&&(o=i)})}),o?(o.position.y-=F.value*ae,c.value=o,o.material=new n.MeshPhongMaterial({color:11184810,shininess:80,side:n.DoubleSide}),!0):(de.ElMessage.error('在 "Pipe_Link" 内未找到任何 Mesh'),!1)},A=o=>{if(!o||!o.joints)return console.warn("URDF模型没有关节信息"),[];let v=null;if(o.traverse(V=>{V.name==="Pipe_Link"&&!v&&(v=V)}),v)c.value=v;else return console.warn("未找到管子模型"),[];const i=[];return Object.keys(o.joints).forEach(V=>{const s=o.joints[V];if(s._jointType==="fixed")return;const a=s.limit?{lower:s.limit.lower??C(s._jointType,!1),upper:s.limit.upper??C(s._jointType,!0)}:{lower:C(s._jointType,!1),upper:C(s._jointType,!0)};i.push({name:V,type:s._jointType||"unknown",limit:a,currentValue:s.angle||0,urdfJoint:s})}),i.sort((V,s)=>V.name.localeCompare(s.name))},L=(o,v)=>{const i=d.value.find(s=>s.name===o);if(!i)return;const V=parseFloat(v);if(i.limit){const s=Math.max(i.limit.lower,Math.min(i.limit.upper,V));i.currentValue=s}else i.currentValue=V;u.model&&u.model.setJointValue?u.model.setJointValue(o,i.currentValue):i.urdfJoint&&i.urdfJoint.setJointValue(i.currentValue)},$=o=>o.reduce((v,i)=>{let V=0;const s=i.Y??0,a=i.C??0,w=i.R??0;return s>0&&(V+=s),a>0&&w>0&&(V+=w*y(a)),v+V},0),J=o=>{const v=[],i=o.Y??0,V=o.B??0,s=o.C??0,a=o.R??0,w={pos:new n.Vector3(0,0,0),localY:new n.Vector3(0,1,0),localX:new n.Vector3(1,0,0),localZ:new n.Vector3(0,0,1)};if(!i&&!s)return v;if(v.push(w.pos.clone()),V!==0){const U=new n.Matrix4().makeRotationAxis(w.localY,y(V));w.localX.applyMatrix4(U),w.localZ.applyMatrix4(U)}if(i>0&&(w.pos.add(w.localY.clone().multiplyScalar(i*ae)),v.push(w.pos.clone())),s>0&&a>0){const U=y(s),T=a*ae,W=w.pos.clone().add(w.localX.clone().multiplyScalar(-T)),R=Math.max(16,Math.ceil(s/5));for(let M=1;M<=R;M++){const H=U*M/R,K=new n.Matrix4().makeRotationAxis(w.localZ,H),se=w.localX.clone().multiplyScalar(T).applyMatrix4(K),ie=W.clone().add(se);v.push(ie)}}return v},G=(o,v=0)=>{let i=f.slice(0,o+1);const V=f[o+1];if(V&&v>0){const R={...V,B:(V.B??0)*v,C:(V.C??0)*v};i.push(R)}const s=$(i),a=Math.max(0,E.value-s),w=[];w.push(new n.Vector3(0,0,0));const U=new n.Vector3(0,a*ae,0);a>0&&w.push(U);let T={pos:U.clone(),localY:new n.Vector3(0,1,0),localX:new n.Vector3(1,0,0),localZ:new n.Vector3(0,0,1)};const W=[];for(let R=i.length-1;R>=0;R--){const M=i[R],H=J(M);if(H.length>0){const K=H.map(Q=>{const ne=Q.clone(),ue=new n.Matrix4;return ue.makeBasis(T.localX,T.localY,T.localZ),ne.applyMatrix4(ue),ne.add(T.pos)});W.push(K);const te=K[K.length-1];T.pos=te.clone();const se=M.B??0,ie=M.C??0;if(se!==0){const Q=new n.Matrix4().makeRotationAxis(T.localY,y(se));T.localX.applyMatrix4(Q),T.localZ.applyMatrix4(Q)}if(ie>0){const Q=y(ie),ne=new n.Matrix4().makeRotationAxis(T.localZ,Q);T.localY.applyMatrix4(ne),T.localX.applyMatrix4(ne)}}}for(const R of W)R.length>1&&w.push(...R.slice(1));w.length<2&&w.push(new n.Vector3(0,.001,0));try{const R=new n.CatmullRomCurve3(w,!1,"catmullrom",.01),M=new n.TubeGeometry(R,Math.max(2,w.length*4),P.value*ae,18,!1);c.value.geometry.dispose(),c.value.geometry=M}catch(R){console.error("管件更新失败",R)}},Y=(o,v,i=1)=>{o&&(Object.keys(o).forEach(V=>{const s=o[V],a=d.value.find(w=>w.name===V);a&&(a.currentValue=s,u.model&&u.model.setJointValue?u.model.setJointValue(V,s):a.urdfJoint&&a.urdfJoint.setJointValue(s))}),G(v,i))},m=(o,v,i)=>o+(v-o)*i,l=(o,v,i)=>{if(!o||!v)return o||v;const V={};return Object.keys(o).forEach(s=>{const a=o[s],w=v[s];V[s]=m(a,w||a,i)}),V},_=()=>{if(f.length===0){console.warn("没有动画数据");return}I(),D.value=!0,S.value=!1,b.value=0,r.value=0,B()},B=()=>{if(!D.value||S.value)return;const o=b.value;if(o>=f.length-1){const s=f[f.length-1];Y(s,f.length-1,1),j();return}const v=r.value/ce,i=f[o],V=f[o+1];if(V){const s=l(i,V,v);Y(s,o,v)}else Y(i,o);r.value++,r.value>ce&&(r.value=0,b.value++),k.value=setTimeout(B,p())},O=()=>{S.value=!0,k.value&&(clearTimeout(k.value),k.value=null)},j=()=>{D.value=!1,S.value=!1,t.value=1,k.value&&(clearTimeout(k.value),k.value=null)};g({startAnimation:_,pauseAnimation:O,stopAnimation:j,resetAll:()=>{j(),b.value=0,r.value=0,d.value.forEach(o=>{(o.type==="revolute"||o.type==="prismatic")&&L(o.name,0)}),G(-1,0)},fastForward:()=>{t.value<4&&(t.value=Math.min(4,t.value*2))},fastBackward:()=>{t.value>.25&&(t.value=Math.max(.25,t.value/2))}}),e.watch(()=>u.model,o=>{o?(h.value=o,d.value=A(o)):d.value=[]},{immediate:!0});const ee=()=>{!u.model||D.value&&!S.value||d.value.forEach(o=>{o.urdfJoint&&o.urdfJoint.angle!==void 0&&(o.currentValue=o.urdfJoint.angle)})},le=()=>{const o=()=>{ee(),x.value=requestAnimationFrame(o)};o()},re=()=>{x.value&&(cancelAnimationFrame(x.value),x.value=null)};return e.onMounted(()=>{le()}),e.onUnmounted(()=>{re(),j()}),(o,v)=>(e.openBlock(),e.createElementBlock("div",we,[d.value.length>0?(e.openBlock(),e.createElementBlock("div",xe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,i=>{var V,s,a,w;return e.openBlock(),e.createElementBlock("div",{key:i.name,class:"joint-item"},[e.createElementVNode("div",Ve,[e.createElementVNode("div",Me,[e.createElementVNode("span",ke,e.toDisplayString(i.name),1),e.createElementVNode("span",Pe," ["+e.toDisplayString(((V=i.limit)==null?void 0:V.lower.toFixed(2))??(i.type==="revolute"?"-3.14":"-1.00"))+", "+e.toDisplayString(((s=i.limit)==null?void 0:s.upper.toFixed(2))??(i.type==="revolute"?"3.14":"1.00"))+"] ",1)]),e.createElementVNode("span",Ce,e.toDisplayString(i.type),1)]),i.type==="revolute"||i.type==="prismatic"?(e.openBlock(),e.createElementBlock("div",Ee,[e.createElementVNode("div",be,[e.createElementVNode("input",{type:"range",min:((a=i.limit)==null?void 0:a.lower)??(i.type==="revolute"?-Math.PI:-1),max:((w=i.limit)==null?void 0:w.upper)??(i.type==="revolute"?Math.PI:1),step:.01,value:i.currentValue,onInput:U=>L(i.name,U.target.value),class:"joint-slider",disabled:D.value&&!S.value},null,40,_e)]),e.createElementVNode("div",ze,[e.createElementVNode("span",De,e.toDisplayString(i.currentValue?Number(i.currentValue).toFixed(3):"0.000"),1),e.createElementVNode("span",Ne,e.toDisplayString(i.type==="revolute"?"rad":"m"),1)])])):e.createCommentVNode("",!0)])}),128))])):(e.openBlock(),e.createElementBlock("div",Se,v[0]||(v[0]=[e.createElementVNode("p",null,"未检测到可控制的关节",-1)])))]))}},Re=oe._export_sfc(Ae,[["__scopeId","data-v-035ae936"]]),Fe={class:"panel-content"},Te="id",Le={__name:"urdfTree",props:{model:Object,maxExpandCount:{type:Number,default:10},expandStrategy:{type:String,default:"breadth",validator:z=>["breadth","firstLevel"].includes(z)}},emits:["nodeClick"],setup(z,{emit:g}){const u=z,d=g,h=e.ref([]),x={children:"children",label:"label"},P=r=>{d("nodeClick",r)},c=(r,k=0)=>{const y=[];return Array.isArray(r)&&(r==null?void 0:r.length)>0&&r.forEach(t=>{if(!(t!=null&&t.isMesh)&&((t==null?void 0:t.type)==="URDFJoint"||(t==null?void 0:t.type)==="URDFLink")){const p={name:t==null?void 0:t.name,label:t==null?void 0:t.name,show:!0,level:k+1,isPenultimate:!1,type:t==null?void 0:t.type,id:t==null?void 0:t.id,limit:(t==null?void 0:t.limit)??"",children:c(t==null?void 0:t.children,k+1),path:t==null?void 0:t.name};y.push(p)}}),y},E=r=>r?[{name:r==null?void 0:r.name,label:r==null?void 0:r.name,show:!0,level:1,isPenultimate:!1,type:r==null?void 0:r.type,id:r==null?void 0:r.id,limit:(r==null?void 0:r.limit)??"",children:c(r==null?void 0:r.children,1),path:r==null?void 0:r.name}]:[],F=(r,k)=>{const y=[],t=[...r];for(;t.length>0&&y.length<k;){const p=t.shift();p.children&&p.children.length>0&&(y.push(p.id),t.push(...p.children))}return y},D=(r,k)=>{const y=[];return r.forEach(t=>{if(t.children&&t.children.length>0){y.push(t.id);const p=t.children.filter(f=>f.children&&f.children.length>0).slice(0,k).map(f=>f.id);y.push(...p)}}),y.slice(0,k+1)},S=e.computed(()=>!h.value||h.value.length===0?[]:u.expandStrategy==="firstLevel"?D(h.value,u.maxExpandCount):F(h.value,u.maxExpandCount)),b=e.computed(()=>u!=null&&u.model?E(u.model):[]);return e.watch(b,r=>{h.value=JSON.parse(JSON.stringify(r))},{immediate:!0}),(r,k)=>{const y=e.resolveComponent("el-tree");return e.openBlock(),e.createElementBlock("div",Fe,[e.createVNode(y,{data:h.value,props:x,"default-expanded-keys":S.value,"node-key":Te,onNodeClick:P},null,8,["data","default-expanded-keys"])])}}},Ie=oe._export_sfc(Le,[["__scopeId","data-v-290ff4e1"]]),$e=["xlink:href"],Je=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(z){const g=z,u=e.computed(()=>({backgroundColor:g.backgroundColor})),d=e.computed(()=>`#${g.prefix}-${g.name}`),h=e.computed(()=>{const{size:x}=g;let P=`${x}`;return P=`${P.replace("px","")}px`,{width:P,height:P}});return(x,P)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["container",{active:x.active}]),style:e.normalizeStyle(u.value)},[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["svg-icon",[x.$attrs.class,x.spin&&"svg-icon-spin"]]),style:e.normalizeStyle(h.value),"aria-hidden":"true"},[e.createElementVNode("use",{"xlink:href":d.value},null,8,$e)],6))],6))}}),N=oe._export_sfc(Je,[["__scopeId","data-v-3150a90b"]]),Oe={class:"obj-viewer-container"},Ue={class:"buttonGroup-top"},Ge={class:"buttonGroup-topLeft"},je={class:"buttonGroup-left"},qe={class:"buttonGroup-right"},Xe={class:"buttonGroup-bottom"},He={class:"left-panel"},Ye={class:"panel-header"},Ze={key:1,class:"clipping-content"},We={class:"radio-group"},Ke={class:"radio-label"},Qe={class:"radio-label"},et={class:"radio-label"},tt={class:"radio-label"},nt={class:"right-panel"},at={class:"panel-header"},ot={key:0,class:"loading-overlay"},lt={__name:"threeModel",props:{animationData:{type:Object,default:()=>{}}},emits:["getAnimationData"],setup(z,{expose:g,emit:u}){const d=u;let h=null,x=!1;const P=e.ref(null),c=e.ref(!1),E=e.ref("");e.ref(!1);const F=e.ref(!1),D=e.ref(!1),S=e.ref(""),b=e.ref(!1),r=e.ref(""),k=e.ref(),{currentModels:y,initialCameraPosition:t,initialTargetPosition:p,initThreeJS:f,handleResize:C,fitCameraToAllModels:I,getThreeJSObjects:A,clearAllModels:L,cleanup:$}=me(P),{isAnimating:J,toggleAnimation:G,stopAnimation:Y}=fe(A,y),{isClipping:m,activeClippingAxis:l,toggleClipping:_,updateClippingPlanes:B}=ve(A,y),{addModelsFromUrls:O,loadModelByDefaultPath:j,urdfModel:q,modelBoundingBoxes:X}=n.useModelLoader(A,y,c,E,L),Z=()=>{if(F.value||y.value.length===0)return;F.value=!0,J.value&&Y();const{camera:s,controls:a}=A();if(!s||!a)return;a.enabled=!0;const w=H=>H<.5?4*H*H*H:1-Math.pow(-2*H+2,3)/2,U=s.position.clone(),T=a.target.clone(),W=1500,R=Date.now(),M=()=>{const H=Date.now()-R,K=Math.min(H/W,1),te=w(K);s.position.lerpVectors(U,t.value,te),a.target.lerpVectors(T,p.value,te),K<1?requestAnimationFrame(M):F.value=!1};M()},ee=async()=>x?Promise.resolve():new Promise(s=>{const a=()=>{x?s():requestAnimationFrame(a)};a()}),le=async(s,a)=>{try{await ee(),J.value&&Y(),m.value&&_();const w=await a(s);return I(X),w}catch(w){throw console.error("加载模型失败:",w),w}},re=async s=>le(s,O),o=async s=>le(s,j),v=s=>{D.value=!0,S.value=s,s==="剖面视图"&&!m.value&&_()},i=s=>{b.value=!0,r.value=s,s==="动画仿真"&&d("getAnimationData")},V=()=>{e.nextTick(()=>{var s;(s=k.value)==null||s.startAnimation()})};return e.onMounted(async()=>{await e.nextTick();try{f(),h=A().scene,x=!0,window.addEventListener("resize",C)}catch(s){console.error("Three.js初始化失败:",s)}}),e.onBeforeUnmount(()=>{x=!1,S.value="",r.value="",window.removeEventListener("resize",C),J.value&&Y(),$()}),g({addModelsFromUrls:re,loadModelByDefaultPath:o}),(s,a)=>{var U,T,W,R;const w=e.resolveComponent("el-scrollbar");return e.openBlock(),e.createElementBlock("div",Oe,[e.createElementVNode("div",{ref_key:"threejsContainer",ref:P,class:"threejs-container"},null,512),e.createElementVNode("div",Ue,[e.createVNode(N,{name:"guanjianjiexi",size:"34"}),e.createVNode(N,{name:"guanjiekongzhi",size:"34"}),e.createVNode(N,{name:"gongyishengcheng",size:"34"}),e.createVNode(N,{name:"buchangshezhi",size:"34"}),e.createVNode(N,{name:"shuchujiagongchengxu",size:"34"})]),e.createElementVNode("div",Ge,[e.createVNode(N,{name:"viewReset",size:"24",onClick:Z,title:"重置"}),e.createVNode(N,{name:"fangda",size:"24",title:"放大"}),e.createVNode(N,{name:"suoxiao",size:"24",title:"缩小"}),e.createVNode(N,{name:"lookAround",size:"24",onClick:e.unref(G),title:e.unref(J)?"停止动画":"动画视图"},null,8,["onClick","title"])]),e.createElementVNode("div",je,[e.createVNode(N,{name:"jiegoushu",size:"24",onClick:a[0]||(a[0]=M=>v("场景树")),active:D.value&&S.value==="场景树",title:"场景树"},null,8,["active"]),e.createVNode(N,{name:"clipping",size:"24",onClick:a[1]||(a[1]=M=>v("剖面视图")),active:D.value&&S.value==="剖面视图",title:"剖面视图"},null,8,["active"]),e.createVNode(N,{name:"donghuafangzhen",size:"24",onClick:a[2]||(a[2]=M=>v("场景树3"))}),e.createVNode(N,{name:"donghuafangzhen",size:"24",onClick:a[3]||(a[3]=M=>v("场景4"))})]),e.createElementVNode("div",qe,[e.createVNode(N,{name:"donghuafangzhen",size:"24"}),e.createVNode(N,{name:"donghuafangzhen",size:"24"}),e.createVNode(N,{name:"guanjiekongzhi",size:"24",onClick:a[4]||(a[4]=M=>i("关节控制")),active:b.value&&r.value==="关节控制",title:"关节控制"},null,8,["active"]),e.createVNode(N,{name:"donghuafangzhen",size:"24",title:"动画仿真",onClick:a[5]||(a[5]=M=>i("动画仿真")),active:b.value&&r.value==="动画仿真"},null,8,["active"]),e.createVNode(N,{name:"donghuafangzhen",size:"24"}),e.createVNode(N,{name:"donghuafangzhen",size:"24"})]),e.createElementVNode("div",Xe,[e.createVNode(N,{name:"kuaitui",size:"24",backgroundColor:"#ffffff",title:"快退",onClick:(U=k.value)==null?void 0:U.fastBackward},null,8,["onClick"]),e.createVNode(N,{name:"bofang",size:"24",backgroundColor:"#ffffff",title:"播放",onClick:V}),e.createVNode(N,{name:"kuaijin",size:"24",backgroundColor:"#ffffff",title:"快进",onClick:(T=k.value)==null?void 0:T.fastForward},null,8,["onClick"]),e.createVNode(N,{name:"zanting",size:"24",backgroundColor:"#ffffff",title:"暂停",onClick:(W=k.value)==null?void 0:W.pauseAnimation},null,8,["onClick"]),e.createVNode(N,{name:"zhongzhi",size:"24",backgroundColor:"#ffffff",title:"停止",onClick:(R=k.value)==null?void 0:R.resetAll},null,8,["onClick"])]),e.withDirectives(e.createElementVNode("div",He,[e.createElementVNode("div",Ye,[e.createElementVNode("span",null,e.toDisplayString(S.value),1),e.createElementVNode("span",{class:"close",onClick:a[6]||(a[6]=M=>D.value=!1)}," X ")]),e.createVNode(w,{"max-height":"650px"},{default:e.withCtx(()=>[S.value==="场景树"?(e.openBlock(),e.createBlock(Ie,{key:0,model:e.unref(q)},null,8,["model"])):e.createCommentVNode("",!0),S.value==="剖面视图"?(e.openBlock(),e.createElementBlock("div",Ze,[e.createElementVNode("div",We,[e.createElementVNode("label",Ke,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"none","onUpdate:modelValue":a[7]||(a[7]=M=>e.isRef(l)?l.value=M:null),onChange:a[8]||(a[8]=(...M)=>e.unref(B)&&e.unref(B)(...M))},null,544),[[e.vModelRadio,e.unref(l)]]),a[16]||(a[16]=e.createElementVNode("span",{class:"radio-text"},"无切割",-1))]),e.createElementVNode("label",Qe,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"x","onUpdate:modelValue":a[9]||(a[9]=M=>e.isRef(l)?l.value=M:null),onChange:a[10]||(a[10]=(...M)=>e.unref(B)&&e.unref(B)(...M))},null,544),[[e.vModelRadio,e.unref(l)]]),a[17]||(a[17]=e.createElementVNode("span",{class:"radio-text"},"X轴切割",-1))]),e.createElementVNode("label",et,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"y","onUpdate:modelValue":a[11]||(a[11]=M=>e.isRef(l)?l.value=M:null),onChange:a[12]||(a[12]=(...M)=>e.unref(B)&&e.unref(B)(...M))},null,544),[[e.vModelRadio,e.unref(l)]]),a[18]||(a[18]=e.createElementVNode("span",{class:"radio-text"},"Y轴切割",-1))]),e.createElementVNode("label",tt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"z","onUpdate:modelValue":a[13]||(a[13]=M=>e.isRef(l)?l.value=M:null),onChange:a[14]||(a[14]=(...M)=>e.unref(B)&&e.unref(B)(...M))},null,544),[[e.vModelRadio,e.unref(l)]]),a[19]||(a[19]=e.createElementVNode("span",{class:"radio-text"},"Z轴切割",-1))])])])):e.createCommentVNode("",!0)]),_:1})],512),[[e.vShow,D.value]]),e.withDirectives(e.createElementVNode("div",nt,[e.createElementVNode("div",at,[e.createElementVNode("span",null,e.toDisplayString(r.value),1),e.createElementVNode("span",{class:"close",onClick:a[15]||(a[15]=M=>b.value=!1)}," X ")]),e.createVNode(w,{"max-height":"650px"},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(Re,{ref_key:"jointRef",ref:k,model:e.unref(q),scene:e.unref(h),animationData:z.animationData},null,8,["model","scene","animationData"]),[[e.vShow,r.value==="关节控制"]]),e.withDirectives(e.createVNode(ye,{animationData:z.animationData},null,8,["animationData"]),[[e.vShow,r.value==="动画仿真"]])]),_:1})],512),[[e.vShow,b.value]]),c.value?(e.openBlock(),e.createElementBlock("div",ot,[a[20]||(a[20]=e.createElementVNode("div",{class:"loading-spinner"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(E.value),1)])):e.createCommentVNode("",!0)])}}},st=oe._export_sfc(lt,[["__scopeId","data-v-7bc47bb3"]]);exports.default=st;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-DOn8yEZJ.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),pe=require("./login-DoVI1BJb.cjs"),de=require("./index-BKUqLOwQ.cjs");function me(z){let g=null,u=null,d=null,h=null,x=null,P=null,c=null,E=null;const D=1e3/30;let S=0;const b=e.ref([]),r=e.ref(new n.Vector3),k=e.ref(new n.Vector3),y=()=>{if(!z.value)return;g=new n.Scene,g.background=new n.Color(15790320);const m=z.value;u=new n.PerspectiveCamera(75,m.clientWidth/m.clientHeight,.1,1e4),u.position.set(8,-8,6),u.up.set(0,0,1),u.lookAt(0,0,0),d=new n.WebGLRenderer({antialias:!0,alpha:!0}),d.setSize(m.clientWidth,m.clientHeight),d.localClippingEnabled=!0,d.shadowMap.enabled=!0,d.shadowMap.type=n.PCFSoftShadowMap,d.toneMapping=n.ACESFilmicToneMapping,d.toneMappingExposure=1,d.outputColorSpace=n.SRGBColorSpace,m.appendChild(d.domElement),h=new n.OrbitControls(u,d.domElement),h.enableDamping=!0,h.dampingFactor=.05,h.mouseButtons={LEFT:null,MIDDLE:n.MOUSE.PAN,RIGHT:n.MOUSE.ROTATE},h.panSpeed=.7,x=new n.Xe(u,d,{container:m,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"}}),x.attachControls(h),f(),C()},t=(m,l)=>{c&&(g.remove(c),c.dispose()),E&&(g.remove(E),E.geometry.dispose(),E.material.dispose());const _=Math.min(Math.max(Math.floor(m/20),30),40);c=new n.GridHelper(m,_,13421772,14540253),c.rotateX(Math.PI/2),c.position.copy(l),g.add(c);const B=new n.PlaneGeometry(m,m),O=new n.ShadowMaterial({opacity:.3,color:0});E=new n.Mesh(B,O),E.position.copy(l),E.position.z-=.01,E.receiveShadow=!0,g.add(E)},p=()=>{if(b.value.length===0)return;const m=new n.Box3;let l=!1;if(b.value.forEach(X=>{if(X.userData.boundingBox)m.union(X.userData.boundingBox),l=!0;else if(X.userData.modelId&&modelBoundingBoxes.has(X.userData.modelId)){const Z=modelBoundingBoxes.get(X.userData.modelId);m.union(Z.box),l=!0}else m.expandByObject(X),l=!0}),!l){console.warn("无法计算包围盒,网格更新失败");return}const _=m.getSize(new n.Vector3),B=m.getCenter(new n.Vector3),O=Math.max(_.x,_.y,_.z),j=Math.max(O*8,50),q=new n.Vector3(B.x,B.y,m.min.z);t(j,q)},f=()=>{const m=new n.AmbientLight(4210752,.6);g.add(m);const l=new n.DirectionalLight(16777215,2);l.position.set(10,10,8),l.castShadow=!0,l.shadow.mapSize.width=4096,l.shadow.mapSize.height=4096,l.shadow.camera.near=.5,l.shadow.camera.far=50,l.shadow.camera.left=-50,l.shadow.camera.right=50,l.shadow.camera.top=50,l.shadow.camera.bottom=-50,g.add(l);const _=new n.DirectionalLight(16777215,.8);_.position.set(-8,-8,6),g.add(_);const B=new n.DirectionalLight(16777215,.6);B.position.set(0,-15,2),g.add(B);const O=new n.HemisphereLight(16777215,4473924,.8);g.add(O);const j=new n.PointLight(16777215,1,50);j.position.set(15,15,15),g.add(j);const q=new n.PointLight(16777215,.5,50);q.position.set(-15,-15,15),g.add(q)},C=()=>{P=requestAnimationFrame(C),h&&h.update();const m=performance.now(),l=m-S;l<D||(S=m-l%D,d&&g&&u&&d.render(g,u),x&&x.render())},I=m=>{["map","normalMap","bumpMap","roughnessMap","metalnessMap","emissiveMap","specularMap","envMap","lightMap","aoMap","displacementMap"].forEach(_=>{m[_]&&m[_].dispose&&m[_].dispose()}),m.dispose&&m.dispose()},A=m=>{m==null||m.traverse(l=>{l.geometry&&l.geometry.dispose(),l.material&&(Array.isArray(l.material)?l.material.forEach(_=>{I(_)}):I(l.material))})};return{currentModels:b,initialCameraPosition:r,initialTargetPosition:k,initThreeJS:y,handleResize:()=>{if(!z.value||!u||!d||!x)return;const m=z.value,l=m.clientWidth,_=m.clientHeight;u.aspect=l/_,u.updateProjectionMatrix(),d.setSize(l,_),x.update()},fitCameraToAllModels:m=>{if(!u||!h||b.value.length===0)return;const l=new n.Box3;let _=!1;if(b.value.forEach(Z=>{if(Z.userData.boundingBox)l.union(Z.userData.boundingBox),_=!0;else if(Z.userData.modelId&&m.has(Z.userData.modelId)){const ee=m.get(Z.userData.modelId);l.union(ee.box),_=!0}else l.expandByObject(Z),_=!0}),!_){console.warn("无法计算包围盒");return}const B=l.getSize(new n.Vector3),O=l.getCenter(new n.Vector3),q=Math.max(B.x,B.y,B.z)*.8,X=new n.Vector3(O.x+q,O.y-q,O.z+q);u.position.copy(X),u.lookAt(O),h.target.copy(O),h.update(),r.value.copy(X),k.value.copy(O),p()},getThreeJSObjects:()=>({scene:g,camera:u,renderer:d,controls:h,gizmo:x}),clearAllModels:()=>{if(!g)return;b.value.forEach(l=>{g.remove(l),A(l)});const m=[];g.children.forEach(l=>{!l.isLight&&!l.isCamera&&l.type!=="GridHelper"&&l!==E&&m.push(l)}),m.forEach(l=>{g.remove(l),A(l)}),b.value=[],p()},cleanup:()=>{P&&cancelAnimationFrame(P),c&&c.dispose(),E&&(E.geometry.dispose(),E.material.dispose()),d&&d.dispose(),h&&h.dispose(),x&&x.dispose()},updateGridForModels:p}}function fe(z,g){const u=e.ref(!1);let d=null,h=12700,x=new n.Vector3,P=new n.Vector3,c=new n.Vector3,E=0,F=null;const D=t=>t<.5?4*t*t*t:1-Math.pow(-2*t+2,3)/2,S=t=>{const p=new n.Vector3,f=E*1.2,C=new n.Vector3(c.x+f,c.y,c.z),I=new n.Vector3(c.x,c.y+f,c.z),A=new n.Vector3(c.x,c.y-f,c.z);if(t<=.567){const $=t/.567*Math.PI*2;p.x=c.x+Math.cos($)*f,p.z=c.z+Math.sin($)*f,p.y=c.y}else if(t<=.724){const L=(t-.567)/.157,$=D(L);p.lerpVectors(C,I,$)}else if(t<=.881){const L=(t-.724)/.157,J=D(L)*Math.PI;p.x=c.x+Math.sin(J)*f,p.y=c.y+Math.cos(J)*f,p.z=c.z}else{const L=(t-.881)/.119,$=D(L);p.lerpVectors(A,x,$)}return p},b=()=>{const{camera:t,controls:p}=z();if(!t||!p)return;d||(d=Date.now());const f=Date.now()-d,C=Math.min(f/h,1);if(C>=1){k();return}const I=S(C);t.position.copy(I),t.lookAt(c),p.target.copy(c),F=requestAnimationFrame(b)},r=()=>{if(g.value.length===0)return;const{camera:t,controls:p}=z();if(!t||!p)return;x.copy(t.position),P.copy(p.target);const f=new n.Box3;g.value.forEach(G=>{f.expandByObject(G)});const C=f.getSize(new n.Vector3);c=f.getCenter(new n.Vector3),E=Math.max(C.x,C.y,C.z)*1.2;const I=new n.Vector3(c.x+E*1.2,c.y,c.z);p.enabled=!1;const A=t.position.clone(),L=1e3,$=Date.now(),J=()=>{const G=Date.now()-$,Y=Math.min(G/L,1),m=D(Y);t.position.lerpVectors(A,I,m),t.lookAt(c),p.target.copy(c),Y<1?requestAnimationFrame(J):(u.value=!0,d=null,b())};J()},k=()=>{u.value=!1,d=null,F&&(cancelAnimationFrame(F),F=null);const{controls:t}=z();t&&(t.enabled=!0,t.target.copy(P))};return{isAnimating:u,toggleAnimation:()=>{if(u.value){u.value=!1,d=null,F&&(cancelAnimationFrame(F),F=null);const{camera:t,controls:p}=z();if(!t||!p)return;p.enabled=!0;const f=t.position.clone(),C=p.target.clone(),I=1500,A=Date.now(),L=()=>{const $=Date.now()-A,J=Math.min($/I,1),G=D(J);t.position.lerpVectors(f,x,G),p.target.lerpVectors(C,P,G),J<1&&requestAnimationFrame(L)};L()}else r()},startAnimation:r,stopAnimation:k}}function ve(z,g){const u=e.ref(!1),d=e.ref("none");let h=[],x=[],P=new n.Box3,c=new n.Vector3;const E=()=>{h=[new n.Plane(new n.Vector3(1,0,0),0),new n.Plane(new n.Vector3(0,1,0),0),new n.Plane(new n.Vector3(0,0,1),0)]},F=()=>{P.makeEmpty(),g.value.forEach(y=>{P.expandByObject(y)}),c=P.getCenter(new n.Vector3)},D=y=>{const t=P.getSize(new n.Vector3);let p,f,C;y==="x"?(p=new n.PlaneGeometry(t.z*1.2,t.y*1.2),f=new n.Vector3(c.x,c.y,c.z),C=new n.Euler(0,Math.PI/2,0)):y==="y"?(p=new n.PlaneGeometry(t.x*1.2,t.z*1.2),f=new n.Vector3(c.x,c.y,c.z),C=new n.Euler(Math.PI/2,0,0)):y==="z"&&(p=new n.PlaneGeometry(t.x*1.2,t.y*1.2),f=new n.Vector3(c.x,c.y,c.z),C=new n.Euler(0,0,0));const I=new n.MeshPhongMaterial({color:8900331,transparent:!0,opacity:.3,side:n.DoubleSide,depthWrite:!1}),A=new n.Mesh(p,I);return A.position.copy(f),A.rotation.copy(C),A},S=()=>{if(b(),r(),d.value==="none")return;F();let y=null;if(d.value==="x"?(h[0].constant=-c.x,y=h[0]):d.value==="y"?(h[1].constant=-c.y,y=h[1]):d.value==="z"&&(h[2].constant=-c.z,y=h[2]),y){g.value.forEach(p=>{p.traverse(f=>{f.isMesh&&f.material&&(Array.isArray(f.material)?f.material.forEach(C=>{C.clippingPlanes=[y]}):f.material.clippingPlanes=[y])})});const{scene:t}=z();if(t){const p=D(d.value);t.add(p),x.push(p)}}},b=()=>{g.value.forEach(y=>{y.traverse(t=>{t.isMesh&&t.material&&(Array.isArray(t.material)?t.material.forEach(p=>{p.clippingPlanes=[]}):t.material.clippingPlanes=[])})})},r=()=>{const{scene:y}=z();y&&x.forEach(t=>{y.remove(t),t.geometry.dispose(),t.material.dispose()}),x=[]};return{isClipping:u,activeClippingAxis:d,toggleClipping:()=>{u.value=!u.value,u.value?(E(),g.value.length>0&&F()):(d.value="none",b(),r())},updateClippingPlanes:S,clearClippingPlanes:b,clearClippingMeshes:r}}const ge={class:"panel-content"},he={__name:"animationPanel",props:{animationData:Object,model:Object},setup(z){const g=z;e.ref();const u=e.ref();return e.watch(()=>[g==null?void 0:g.animationData],()=>{var h;let d=((h=pe.cloneDeep(g==null?void 0:g.animationData))==null?void 0:h["输出(动画数据)Content"])??[];d&&(u.value=d)},{deep:!0,immediate:!0}),(d,h)=>{var x,P,c;return e.openBlock(),e.createElementBlock("div",ge,[(e.openBlock(),e.createBlock(n.ssTable,{itemData:(x=u.value)==null?void 0:x.compData,key:(P=u.value)==null?void 0:P.id,index:(c=u.value)==null?void 0:c.id,showHeader:!1},null,8,["itemData","index"]))])}}},ye=oe._export_sfc(he,[["__scopeId","data-v-2387536e"]]),we={class:"panel-content"},xe={key:0,class:"joints-list"},Ve={class:"joint-info-row"},Me={class:"joint-left"},ke={class:"joint-name"},Pe={class:"joint-range"},Ce={class:"joint-type"},Ee={key:0,class:"joint-control-row"},be={class:"slider-container"},_e=["min","max","value","onInput","disabled"],ze={class:"value-display"},De={class:"joint-value"},Ne={class:"unit"},Se={key:1,class:"empty-state"},ae=.001,Be=1e3,ce=60,Ae={__name:"jointPanel",props:{model:Object,scene:Object,animationData:Object},setup(z,{expose:g}){const u=z;e.ref(!0);const d=e.ref([]),h=e.ref(null),x=e.ref(null),P=e.ref(12.5),c=e.ref(),E=e.ref(1302),F=e.ref(30),D=e.ref(!1),S=e.ref(!1),b=e.ref(0),r=e.ref(0),k=e.ref(null),y=n.MathUtils.degToRad,t=e.ref(1),p=()=>Be/ce/t.value;let f=[];e.watch(()=>u.animationData,o=>{var i;E.value=o.extra.管长,P.value=o.extra.外径/2;let v=((i=pe.cloneDeep(o))==null?void 0:i["输出(动画数据)"])??[];v&&v.length>0&&(f=v)},{deep:!0}),e.computed(()=>f.length>0);const C=(o,v=!1)=>o==="revolute"?v?Math.PI:-Math.PI:o==="prismatic"?v?1:-1:0,I=()=>{if(!h.value)return de.ElMessage.error("未加载 URDF"),!1;let o=null;return h.value.traverse(v=>{o||v.name==="Pipe_Link"&&v.traverse(i=>{i instanceof n.Mesh&&!o&&(o=i)})}),o?(o.position.y-=F.value*ae,c.value=o,o.material=new n.MeshPhongMaterial({color:11184810,shininess:80,side:n.DoubleSide}),!0):(de.ElMessage.error('在 "Pipe_Link" 内未找到任何 Mesh'),!1)},A=o=>{if(!o||!o.joints)return console.warn("URDF模型没有关节信息"),[];let v=null;if(o.traverse(V=>{V.name==="Pipe_Link"&&!v&&(v=V)}),v)c.value=v;else return console.warn("未找到管子模型"),[];const i=[];return Object.keys(o.joints).forEach(V=>{const s=o.joints[V];if(s._jointType==="fixed")return;const a=s.limit?{lower:s.limit.lower??C(s._jointType,!1),upper:s.limit.upper??C(s._jointType,!0)}:{lower:C(s._jointType,!1),upper:C(s._jointType,!0)};i.push({name:V,type:s._jointType||"unknown",limit:a,currentValue:s.angle||0,urdfJoint:s})}),i.sort((V,s)=>V.name.localeCompare(s.name))},L=(o,v)=>{const i=d.value.find(s=>s.name===o);if(!i)return;const V=parseFloat(v);if(i.limit){const s=Math.max(i.limit.lower,Math.min(i.limit.upper,V));i.currentValue=s}else i.currentValue=V;u.model&&u.model.setJointValue?u.model.setJointValue(o,i.currentValue):i.urdfJoint&&i.urdfJoint.setJointValue(i.currentValue)},$=o=>o.reduce((v,i)=>{let V=0;const s=i.Y??0,a=i.C??0,w=i.R??0;return s>0&&(V+=s),a>0&&w>0&&(V+=w*y(a)),v+V},0),J=o=>{const v=[],i=o.Y??0,V=o.B??0,s=o.C??0,a=o.R??0,w={pos:new n.Vector3(0,0,0),localY:new n.Vector3(0,1,0),localX:new n.Vector3(1,0,0),localZ:new n.Vector3(0,0,1)};if(!i&&!s)return v;if(v.push(w.pos.clone()),V!==0){const U=new n.Matrix4().makeRotationAxis(w.localY,y(V));w.localX.applyMatrix4(U),w.localZ.applyMatrix4(U)}if(i>0&&(w.pos.add(w.localY.clone().multiplyScalar(i*ae)),v.push(w.pos.clone())),s>0&&a>0){const U=y(s),T=a*ae,W=w.pos.clone().add(w.localX.clone().multiplyScalar(-T)),R=Math.max(16,Math.ceil(s/5));for(let M=1;M<=R;M++){const H=U*M/R,K=new n.Matrix4().makeRotationAxis(w.localZ,H),se=w.localX.clone().multiplyScalar(T).applyMatrix4(K),ie=W.clone().add(se);v.push(ie)}}return v},G=(o,v=0)=>{let i=f.slice(0,o+1);const V=f[o+1];if(V&&v>0){const R={...V,B:(V.B??0)*v,C:(V.C??0)*v};i.push(R)}const s=$(i),a=Math.max(0,E.value-s),w=[];w.push(new n.Vector3(0,0,0));const U=new n.Vector3(0,a*ae,0);a>0&&w.push(U);let T={pos:U.clone(),localY:new n.Vector3(0,1,0),localX:new n.Vector3(1,0,0),localZ:new n.Vector3(0,0,1)};const W=[];for(let R=i.length-1;R>=0;R--){const M=i[R],H=J(M);if(H.length>0){const K=H.map(Q=>{const ne=Q.clone(),ue=new n.Matrix4;return ue.makeBasis(T.localX,T.localY,T.localZ),ne.applyMatrix4(ue),ne.add(T.pos)});W.push(K);const te=K[K.length-1];T.pos=te.clone();const se=M.B??0,ie=M.C??0;if(se!==0){const Q=new n.Matrix4().makeRotationAxis(T.localY,y(se));T.localX.applyMatrix4(Q),T.localZ.applyMatrix4(Q)}if(ie>0){const Q=y(ie),ne=new n.Matrix4().makeRotationAxis(T.localZ,Q);T.localY.applyMatrix4(ne),T.localX.applyMatrix4(ne)}}}for(const R of W)R.length>1&&w.push(...R.slice(1));w.length<2&&w.push(new n.Vector3(0,.001,0));try{const R=new n.CatmullRomCurve3(w,!1,"catmullrom",.01),M=new n.TubeGeometry(R,Math.max(2,w.length*4),P.value*ae,18,!1);c.value.geometry.dispose(),c.value.geometry=M}catch(R){console.error("管件更新失败",R)}},Y=(o,v,i=1)=>{o&&(Object.keys(o).forEach(V=>{const s=o[V],a=d.value.find(w=>w.name===V);a&&(a.currentValue=s,u.model&&u.model.setJointValue?u.model.setJointValue(V,s):a.urdfJoint&&a.urdfJoint.setJointValue(s))}),G(v,i))},m=(o,v,i)=>o+(v-o)*i,l=(o,v,i)=>{if(!o||!v)return o||v;const V={};return Object.keys(o).forEach(s=>{const a=o[s],w=v[s];V[s]=m(a,w||a,i)}),V},_=()=>{if(f.length===0){console.warn("没有动画数据");return}I(),D.value=!0,S.value=!1,b.value=0,r.value=0,B()},B=()=>{if(!D.value||S.value)return;const o=b.value;if(o>=f.length-1){const s=f[f.length-1];Y(s,f.length-1,1),j();return}const v=r.value/ce,i=f[o],V=f[o+1];if(V){const s=l(i,V,v);Y(s,o,v)}else Y(i,o);r.value++,r.value>ce&&(r.value=0,b.value++),k.value=setTimeout(B,p())},O=()=>{S.value=!0,k.value&&(clearTimeout(k.value),k.value=null)},j=()=>{D.value=!1,S.value=!1,t.value=1,k.value&&(clearTimeout(k.value),k.value=null)};g({startAnimation:_,pauseAnimation:O,stopAnimation:j,resetAll:()=>{j(),b.value=0,r.value=0,d.value.forEach(o=>{(o.type==="revolute"||o.type==="prismatic")&&L(o.name,0)}),G(-1,0)},fastForward:()=>{t.value<4&&(t.value=Math.min(4,t.value*2))},fastBackward:()=>{t.value>.25&&(t.value=Math.max(.25,t.value/2))}}),e.watch(()=>u.model,o=>{o?(h.value=o,d.value=A(o)):d.value=[]},{immediate:!0});const ee=()=>{!u.model||D.value&&!S.value||d.value.forEach(o=>{o.urdfJoint&&o.urdfJoint.angle!==void 0&&(o.currentValue=o.urdfJoint.angle)})},le=()=>{const o=()=>{ee(),x.value=requestAnimationFrame(o)};o()},re=()=>{x.value&&(cancelAnimationFrame(x.value),x.value=null)};return e.onMounted(()=>{le()}),e.onUnmounted(()=>{re(),j()}),(o,v)=>(e.openBlock(),e.createElementBlock("div",we,[d.value.length>0?(e.openBlock(),e.createElementBlock("div",xe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,i=>{var V,s,a,w;return e.openBlock(),e.createElementBlock("div",{key:i.name,class:"joint-item"},[e.createElementVNode("div",Ve,[e.createElementVNode("div",Me,[e.createElementVNode("span",ke,e.toDisplayString(i.name),1),e.createElementVNode("span",Pe," ["+e.toDisplayString(((V=i.limit)==null?void 0:V.lower.toFixed(2))??(i.type==="revolute"?"-3.14":"-1.00"))+", "+e.toDisplayString(((s=i.limit)==null?void 0:s.upper.toFixed(2))??(i.type==="revolute"?"3.14":"1.00"))+"] ",1)]),e.createElementVNode("span",Ce,e.toDisplayString(i.type),1)]),i.type==="revolute"||i.type==="prismatic"?(e.openBlock(),e.createElementBlock("div",Ee,[e.createElementVNode("div",be,[e.createElementVNode("input",{type:"range",min:((a=i.limit)==null?void 0:a.lower)??(i.type==="revolute"?-Math.PI:-1),max:((w=i.limit)==null?void 0:w.upper)??(i.type==="revolute"?Math.PI:1),step:.01,value:i.currentValue,onInput:U=>L(i.name,U.target.value),class:"joint-slider",disabled:D.value&&!S.value},null,40,_e)]),e.createElementVNode("div",ze,[e.createElementVNode("span",De,e.toDisplayString(i.currentValue?Number(i.currentValue).toFixed(3):"0.000"),1),e.createElementVNode("span",Ne,e.toDisplayString(i.type==="revolute"?"rad":"m"),1)])])):e.createCommentVNode("",!0)])}),128))])):(e.openBlock(),e.createElementBlock("div",Se,v[0]||(v[0]=[e.createElementVNode("p",null,"未检测到可控制的关节",-1)])))]))}},Re=oe._export_sfc(Ae,[["__scopeId","data-v-035ae936"]]),Fe={class:"panel-content"},Te="id",Le={__name:"urdfTree",props:{model:Object,maxExpandCount:{type:Number,default:10},expandStrategy:{type:String,default:"breadth",validator:z=>["breadth","firstLevel"].includes(z)}},emits:["nodeClick"],setup(z,{emit:g}){const u=z,d=g,h=e.ref([]),x={children:"children",label:"label"},P=r=>{d("nodeClick",r)},c=(r,k=0)=>{const y=[];return Array.isArray(r)&&(r==null?void 0:r.length)>0&&r.forEach(t=>{if(!(t!=null&&t.isMesh)&&((t==null?void 0:t.type)==="URDFJoint"||(t==null?void 0:t.type)==="URDFLink")){const p={name:t==null?void 0:t.name,label:t==null?void 0:t.name,show:!0,level:k+1,isPenultimate:!1,type:t==null?void 0:t.type,id:t==null?void 0:t.id,limit:(t==null?void 0:t.limit)??"",children:c(t==null?void 0:t.children,k+1),path:t==null?void 0:t.name};y.push(p)}}),y},E=r=>r?[{name:r==null?void 0:r.name,label:r==null?void 0:r.name,show:!0,level:1,isPenultimate:!1,type:r==null?void 0:r.type,id:r==null?void 0:r.id,limit:(r==null?void 0:r.limit)??"",children:c(r==null?void 0:r.children,1),path:r==null?void 0:r.name}]:[],F=(r,k)=>{const y=[],t=[...r];for(;t.length>0&&y.length<k;){const p=t.shift();p.children&&p.children.length>0&&(y.push(p.id),t.push(...p.children))}return y},D=(r,k)=>{const y=[];return r.forEach(t=>{if(t.children&&t.children.length>0){y.push(t.id);const p=t.children.filter(f=>f.children&&f.children.length>0).slice(0,k).map(f=>f.id);y.push(...p)}}),y.slice(0,k+1)},S=e.computed(()=>!h.value||h.value.length===0?[]:u.expandStrategy==="firstLevel"?D(h.value,u.maxExpandCount):F(h.value,u.maxExpandCount)),b=e.computed(()=>u!=null&&u.model?E(u.model):[]);return e.watch(b,r=>{h.value=JSON.parse(JSON.stringify(r))},{immediate:!0}),(r,k)=>{const y=e.resolveComponent("el-tree");return e.openBlock(),e.createElementBlock("div",Fe,[e.createVNode(y,{data:h.value,props:x,"default-expanded-keys":S.value,"node-key":Te,onNodeClick:P},null,8,["data","default-expanded-keys"])])}}},Ie=oe._export_sfc(Le,[["__scopeId","data-v-290ff4e1"]]),$e=["xlink:href"],Je=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(z){const g=z,u=e.computed(()=>({backgroundColor:g.backgroundColor})),d=e.computed(()=>`#${g.prefix}-${g.name}`),h=e.computed(()=>{const{size:x}=g;let P=`${x}`;return P=`${P.replace("px","")}px`,{width:P,height:P}});return(x,P)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["container",{active:x.active}]),style:e.normalizeStyle(u.value)},[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["svg-icon",[x.$attrs.class,x.spin&&"svg-icon-spin"]]),style:e.normalizeStyle(h.value),"aria-hidden":"true"},[e.createElementVNode("use",{"xlink:href":d.value},null,8,$e)],6))],6))}}),N=oe._export_sfc(Je,[["__scopeId","data-v-3150a90b"]]),Oe={class:"obj-viewer-container"},Ue={class:"buttonGroup-top"},Ge={class:"buttonGroup-topLeft"},je={class:"buttonGroup-left"},qe={class:"buttonGroup-right"},Xe={class:"buttonGroup-bottom"},He={class:"left-panel"},Ye={class:"panel-header"},Ze={key:1,class:"clipping-content"},We={class:"radio-group"},Ke={class:"radio-label"},Qe={class:"radio-label"},et={class:"radio-label"},tt={class:"radio-label"},nt={class:"right-panel"},at={class:"panel-header"},ot={key:0,class:"loading-overlay"},lt={__name:"threeModel",props:{animationData:{type:Object,default:()=>{}}},emits:["getAnimationData"],setup(z,{expose:g,emit:u}){const d=u;let h=null,x=!1;const P=e.ref(null),c=e.ref(!1),E=e.ref("");e.ref(!1);const F=e.ref(!1),D=e.ref(!1),S=e.ref(""),b=e.ref(!1),r=e.ref(""),k=e.ref(),{currentModels:y,initialCameraPosition:t,initialTargetPosition:p,initThreeJS:f,handleResize:C,fitCameraToAllModels:I,getThreeJSObjects:A,clearAllModels:L,cleanup:$}=me(P),{isAnimating:J,toggleAnimation:G,stopAnimation:Y}=fe(A,y),{isClipping:m,activeClippingAxis:l,toggleClipping:_,updateClippingPlanes:B}=ve(A,y),{addModelsFromUrls:O,loadModelByDefaultPath:j,urdfModel:q,modelBoundingBoxes:X}=n.useModelLoader(A,y,c,E,L),Z=()=>{if(F.value||y.value.length===0)return;F.value=!0,J.value&&Y();const{camera:s,controls:a}=A();if(!s||!a)return;a.enabled=!0;const w=H=>H<.5?4*H*H*H:1-Math.pow(-2*H+2,3)/2,U=s.position.clone(),T=a.target.clone(),W=1500,R=Date.now(),M=()=>{const H=Date.now()-R,K=Math.min(H/W,1),te=w(K);s.position.lerpVectors(U,t.value,te),a.target.lerpVectors(T,p.value,te),K<1?requestAnimationFrame(M):F.value=!1};M()},ee=async()=>x?Promise.resolve():new Promise(s=>{const a=()=>{x?s():requestAnimationFrame(a)};a()}),le=async(s,a)=>{try{await ee(),J.value&&Y(),m.value&&_();const w=await a(s);return I(X),w}catch(w){throw console.error("加载模型失败:",w),w}},re=async s=>le(s,O),o=async s=>le(s,j),v=s=>{D.value=!0,S.value=s,s==="剖面视图"&&!m.value&&_()},i=s=>{b.value=!0,r.value=s,s==="动画仿真"&&d("getAnimationData")},V=()=>{e.nextTick(()=>{var s;(s=k.value)==null||s.startAnimation()})};return e.onMounted(async()=>{await e.nextTick();try{f(),h=A().scene,x=!0,window.addEventListener("resize",C)}catch(s){console.error("Three.js初始化失败:",s)}}),e.onBeforeUnmount(()=>{x=!1,S.value="",r.value="",window.removeEventListener("resize",C),J.value&&Y(),$()}),g({addModelsFromUrls:re,loadModelByDefaultPath:o}),(s,a)=>{var U,T,W,R;const w=e.resolveComponent("el-scrollbar");return e.openBlock(),e.createElementBlock("div",Oe,[e.createElementVNode("div",{ref_key:"threejsContainer",ref:P,class:"threejs-container"},null,512),e.createElementVNode("div",Ue,[e.createVNode(N,{name:"guanjianjiexi",size:"34"}),e.createVNode(N,{name:"guanjiekongzhi",size:"34"}),e.createVNode(N,{name:"gongyishengcheng",size:"34"}),e.createVNode(N,{name:"buchangshezhi",size:"34"}),e.createVNode(N,{name:"shuchujiagongchengxu",size:"34"})]),e.createElementVNode("div",Ge,[e.createVNode(N,{name:"viewReset",size:"24",onClick:Z,title:"重置"}),e.createVNode(N,{name:"fangda",size:"24",title:"放大"}),e.createVNode(N,{name:"suoxiao",size:"24",title:"缩小"}),e.createVNode(N,{name:"lookAround",size:"24",onClick:e.unref(G),title:e.unref(J)?"停止动画":"动画视图"},null,8,["onClick","title"])]),e.createElementVNode("div",je,[e.createVNode(N,{name:"jiegoushu",size:"24",onClick:a[0]||(a[0]=M=>v("场景树")),active:D.value&&S.value==="场景树",title:"场景树"},null,8,["active"]),e.createVNode(N,{name:"clipping",size:"24",onClick:a[1]||(a[1]=M=>v("剖面视图")),active:D.value&&S.value==="剖面视图",title:"剖面视图"},null,8,["active"]),e.createVNode(N,{name:"donghuafangzhen",size:"24",onClick:a[2]||(a[2]=M=>v("场景树3"))}),e.createVNode(N,{name:"donghuafangzhen",size:"24",onClick:a[3]||(a[3]=M=>v("场景4"))})]),e.createElementVNode("div",qe,[e.createVNode(N,{name:"donghuafangzhen",size:"24"}),e.createVNode(N,{name:"donghuafangzhen",size:"24"}),e.createVNode(N,{name:"guanjiekongzhi",size:"24",onClick:a[4]||(a[4]=M=>i("关节控制")),active:b.value&&r.value==="关节控制",title:"关节控制"},null,8,["active"]),e.createVNode(N,{name:"donghuafangzhen",size:"24",title:"动画仿真",onClick:a[5]||(a[5]=M=>i("动画仿真")),active:b.value&&r.value==="动画仿真"},null,8,["active"]),e.createVNode(N,{name:"donghuafangzhen",size:"24"}),e.createVNode(N,{name:"donghuafangzhen",size:"24"})]),e.createElementVNode("div",Xe,[e.createVNode(N,{name:"kuaitui",size:"24",backgroundColor:"#ffffff",title:"快退",onClick:(U=k.value)==null?void 0:U.fastBackward},null,8,["onClick"]),e.createVNode(N,{name:"bofang",size:"24",backgroundColor:"#ffffff",title:"播放",onClick:V}),e.createVNode(N,{name:"kuaijin",size:"24",backgroundColor:"#ffffff",title:"快进",onClick:(T=k.value)==null?void 0:T.fastForward},null,8,["onClick"]),e.createVNode(N,{name:"zanting",size:"24",backgroundColor:"#ffffff",title:"暂停",onClick:(W=k.value)==null?void 0:W.pauseAnimation},null,8,["onClick"]),e.createVNode(N,{name:"zhongzhi",size:"24",backgroundColor:"#ffffff",title:"停止",onClick:(R=k.value)==null?void 0:R.resetAll},null,8,["onClick"])]),e.withDirectives(e.createElementVNode("div",He,[e.createElementVNode("div",Ye,[e.createElementVNode("span",null,e.toDisplayString(S.value),1),e.createElementVNode("span",{class:"close",onClick:a[6]||(a[6]=M=>D.value=!1)}," X ")]),e.createVNode(w,{"max-height":"650px"},{default:e.withCtx(()=>[S.value==="场景树"?(e.openBlock(),e.createBlock(Ie,{key:0,model:e.unref(q)},null,8,["model"])):e.createCommentVNode("",!0),S.value==="剖面视图"?(e.openBlock(),e.createElementBlock("div",Ze,[e.createElementVNode("div",We,[e.createElementVNode("label",Ke,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"none","onUpdate:modelValue":a[7]||(a[7]=M=>e.isRef(l)?l.value=M:null),onChange:a[8]||(a[8]=(...M)=>e.unref(B)&&e.unref(B)(...M))},null,544),[[e.vModelRadio,e.unref(l)]]),a[16]||(a[16]=e.createElementVNode("span",{class:"radio-text"},"无切割",-1))]),e.createElementVNode("label",Qe,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"x","onUpdate:modelValue":a[9]||(a[9]=M=>e.isRef(l)?l.value=M:null),onChange:a[10]||(a[10]=(...M)=>e.unref(B)&&e.unref(B)(...M))},null,544),[[e.vModelRadio,e.unref(l)]]),a[17]||(a[17]=e.createElementVNode("span",{class:"radio-text"},"X轴切割",-1))]),e.createElementVNode("label",et,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"y","onUpdate:modelValue":a[11]||(a[11]=M=>e.isRef(l)?l.value=M:null),onChange:a[12]||(a[12]=(...M)=>e.unref(B)&&e.unref(B)(...M))},null,544),[[e.vModelRadio,e.unref(l)]]),a[18]||(a[18]=e.createElementVNode("span",{class:"radio-text"},"Y轴切割",-1))]),e.createElementVNode("label",tt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"z","onUpdate:modelValue":a[13]||(a[13]=M=>e.isRef(l)?l.value=M:null),onChange:a[14]||(a[14]=(...M)=>e.unref(B)&&e.unref(B)(...M))},null,544),[[e.vModelRadio,e.unref(l)]]),a[19]||(a[19]=e.createElementVNode("span",{class:"radio-text"},"Z轴切割",-1))])])])):e.createCommentVNode("",!0)]),_:1})],512),[[e.vShow,D.value]]),e.withDirectives(e.createElementVNode("div",nt,[e.createElementVNode("div",at,[e.createElementVNode("span",null,e.toDisplayString(r.value),1),e.createElementVNode("span",{class:"close",onClick:a[15]||(a[15]=M=>b.value=!1)}," X ")]),e.createVNode(w,{"max-height":"650px"},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(Re,{ref_key:"jointRef",ref:k,model:e.unref(q),scene:e.unref(h),animationData:z.animationData},null,8,["model","scene","animationData"]),[[e.vShow,r.value==="关节控制"]]),e.withDirectives(e.createVNode(ye,{animationData:z.animationData},null,8,["animationData"]),[[e.vShow,r.value==="动画仿真"]])]),_:1})],512),[[e.vShow,b.value]]),c.value?(e.openBlock(),e.createElementBlock("div",ot,[a[20]||(a[20]=e.createElementVNode("div",{class:"loading-spinner"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(E.value),1)])):e.createCommentVNode("",!0)])}}},st=oe._export_sfc(lt,[["__scopeId","data-v-7bc47bb3"]]);exports.default=st;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ss-component-new",
3
3
  "private": false,
4
- "version": "1.1.719",
4
+ "version": "1.1.721",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist",
@@ -0,0 +1 @@
1
+ <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1756102038078" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7651" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><path d="M533.09375 860.046875c-15.8203125 0-26.3671875-10.546875-26.3671875-26.3671875V417.078125c0-5.2734375 0-15.8203125 5.2734375-15.8203125l179.296875-200.390625H211.4140625l179.296875 200.390625c5.2734375 5.2734375 5.2734375 10.546875 5.2734375 15.8203125v247.8515625l42.1875 36.9140625c10.546875 10.546875 15.8203125 26.3671875 5.2734375 36.9140625-10.546875 10.546875-26.3671875 15.8203125-36.9140625 5.2734375l-52.734375-42.1875c-5.2734375-5.2734375-10.546875-10.546875-10.546875-21.09375V427.625l-210.9375-237.3046875c-10.546875-5.2734375-10.546875-21.09375-5.2734375-31.640625 0-5.2734375 10.546875-15.8203125 21.09375-15.8203125h606.4453125c10.546875 0 21.09375 5.2734375 26.3671875 15.8203125 5.2734375 10.546875 0 21.09375-5.2734375 31.640625l-210.9375 237.3046875V828.40625c0 15.8203125-15.8203125 31.640625-31.640625 31.640625zM833.6796875 432.8984375h-184.5703125c-15.8203125 0-26.3671875 10.546875-26.3671875 26.3671875s10.546875 26.3671875 26.3671875 26.3671875h184.5703125c15.8203125 0 26.3671875-10.546875 26.3671875-26.3671875 0-10.546875-10.546875-26.3671875-26.3671875-26.3671875z m0 147.65625h-184.5703125c-15.8203125 0-26.3671875 10.546875-26.3671875 26.3671875s10.546875 26.3671875 26.3671875 26.3671875h184.5703125c15.8203125 0 26.3671875-10.546875 26.3671875-26.3671875s-10.546875-26.3671875-26.3671875-26.3671875z m0 147.65625h-184.5703125c-15.8203125 0-26.3671875 10.546875-26.3671875 26.3671875s10.546875 26.3671875 26.3671875 26.3671875h184.5703125c15.8203125 0 26.3671875-10.546875 26.3671875-26.3671875s-10.546875-26.3671875-26.3671875-26.3671875z" p-id="7652"></path></svg>
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),K=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),F=require("vue-router"),V=require("./login-C8QOZ9u0.cjs"),m=require("./index-2p69g4HY.cjs"),W=require("./crypto-CRbcEKIz.cjs"),x=require("./index-VBY1u2Ig.cjs"),H={},z={class:"left-wrap"},$={class:"left-bg"};function ee(v,E){return e.openBlock(),e.createElementBlock("div",z,[e.createElementVNode("div",$,[e.renderSlot(v.$slots,"img",{},void 0,!0)])])}const te=K._export_sfc(H,[["render",ee],["__scopeId","data-v-9b7ee6c9"]]),ae={class:"right-wrap"},oe={class:"right-title"},ne={class:"right-content"},se={class:"tab-content"},re={class:"tab-tips"},ce=e.defineComponent({__name:"index",props:{tabList:{type:Array,default:[]},loading:{type:Boolean,default:!1}},emits:["clickLogin","handleTabClick"],setup(v,{emit:E}){const g=e.ref("account"),c=E,i=()=>{c("clickLogin",g.value)},A=()=>{c("handleTabClick",g.value)};return(u,p)=>{const f=e.resolveComponent("el-button"),h=e.resolveComponent("el-tab-pane"),C=e.resolveComponent("el-tabs");return e.openBlock(),e.createElementBlock("div",ae,[e.createElementVNode("div",oe,[e.renderSlot(u.$slots,"title",{},void 0,!0)]),e.createElementVNode("div",ne,[e.createVNode(C,{modelValue:g.value,"onUpdate:modelValue":p[0]||(p[0]=w=>g.value=w),class:"right-tabs",onTabClick:A},{default:e.withCtx(()=>[e.createVNode(h,{name:"account"},{label:e.withCtx(()=>[e.renderSlot(u.$slots,"tabLabel2",{},void 0,!0)]),default:e.withCtx(()=>[e.createElementVNode("div",se,[e.renderSlot(u.$slots,"tabContent2",{},void 0,!0)]),e.createElementVNode("div",{class:"tab-button special",onClick:i},[e.createVNode(f,{loading:v.loading},{default:e.withCtx(()=>[e.renderSlot(u.$slots,"tabButton2",{},void 0,!0)]),_:3},8,["loading"])]),e.createElementVNode("div",re,[e.renderSlot(u.$slots,"tabTips2",{},void 0,!0)])]),_:3})]),_:3},8,["modelValue"])])])}}}),le=K._export_sfc(ce,[["__scopeId","data-v-3ebcb6e2"]]),ie={class:"account-wrap"},de=e.defineComponent({__name:"index",props:{activeTabName:{type:String,default:""},isClickLogin:{type:Boolean,default:!1}},emits:["handleLoginFormChange"],setup(v,{emit:E}){const g=v,c=e.reactive({account:"",password:""}),i=e.reactive({account:[{required:!0,message:"请输入账号",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"}]}),A=e.ref(null),u=E;return e.watch(()=>g.isClickLogin,p=>{var f;p&&((f=A.value)==null||f.validate(h=>{u("handleLoginFormChange",h,h?c:null)}))},{immediate:!0}),e.watch(()=>g.activeTabName,p=>{var f;p&&((f=A.value)==null||f.resetFields())}),(p,f)=>{const h=e.resolveComponent("svg-icon"),C=e.resolveComponent("el-input"),w=e.resolveComponent("el-form-item"),k=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",ie,[e.createVNode(k,{model:c,rules:i,ref_key:"formRef",ref:A},{default:e.withCtx(()=>[e.createVNode(w,{label:"",prop:"account"},{default:e.withCtx(()=>[e.createVNode(C,{modelValue:c.account,"onUpdate:modelValue":f[0]||(f[0]=S=>c.account=S),placeholder:"请输入账号",clearable:""},{prefix:e.withCtx(()=>[e.createVNode(h,{name:"account",style:{width:"15px",height:"15px"}})]),_:1},8,["modelValue"])]),_:1}),e.createVNode(w,{label:"",prop:"password"},{default:e.withCtx(()=>[e.createVNode(C,{modelValue:c.password,"onUpdate:modelValue":f[1]||(f[1]=S=>c.password=S),type:"password",placeholder:"请输入密码","show-password":"",clearable:""},{prefix:e.withCtx(()=>[e.createVNode(h,{name:"password",style:{width:"15px",height:"15px"}})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])])}}}),ue=K._export_sfc(de,[["__scopeId","data-v-b023e8c1"]]),pe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAgCAYAAAB6kdqOAAAAAXNSR0IArs4c6QAAAd9JREFUWEftl71OAkEQx/97QC8XEj+iiTGexo/OnvgE0ChPIIXHQwgP4amxsYZGnkCtpbAxxiyJFEqCJie1yK7ZixhUuNtZYkLUa2/+M7+ZnbnbYTB87P3bIpi1BWCt34UEzpkUF35huWjimpmIlCbp8TMGbA7RX/uus27i2xjI9rgMC+i7jpFvI5EC+XEg2+NlSKTBMKmTuS5QlB2ApgRqz66TVXGDCmmIPhh7RxGl0bXrT15pWNLjVQZkdBuwF0i3qaPAv8StMNvjDwBmdIGQwJyfd+51xn7i4GbekvE7bd8SLQUUOi3fnElR0v3GvEPvaQOpHiIDKe9SlIQlTtq7K41BwexjPosXsQNmkWCCpjYCoqRMtP0HiirY76uQBWQRS1xalhCvnW4aQDmqCmHvR6rQsB/oKIMyClDOd53KoGxTHs8IoGpSKWOgeCI29ZhfaA0EOmpMi26n+beBAIzXkanjGLemDlpkrMbepGmjNMZTFuXY9D0dSF09wE7bhaWrsKD2IV+FgNrNtilwVKCK7zo5SgDqJY0EFJPMeSos1ilAKa++ISBruhoSUNi3Z1hA2+PqyLR/uPRLvm6qJnbqkk9dg0ziEDQV8qJIcE42DRbFnkp3lSZHiRZ8WqXfAFwe+He0YFLSAAAAAElFTkSuQmCC",fe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAx1JREFUWEfFV01oE1EQnnmpYJRGL/6gYsGLVCoUzMGLNrO1B4sYKooXQT0JWtSK4KEHEVERPCjUHgqCQlFED4raUmP3bS0UhRQKnrTorQdFBBOkBZP97AuJbNo0+2KF7GlJ3sz3zcw3M2+Z6vxwnfHJmkAqlVrT0NCwB8BepdQuAOuJaEMxgK/M/M33/UlmfpvL5cY7Ojp+2gQXSiCdTq/IZrNniOg0gM1WTplniKi/sbHxbjwe/13NpioBrXUcwB0iarUBrnBmipnPiUh6KfslCXiet9/3/af/CFxmppQ6nEgkhiv5qkhAa90N4Ob/AC/5YOZLItK30OciAlrrAwAe24Iz8yul1A0imgPQ5ft+75LpZj4qIi+D/5cRMILLZDJejTXvcRxnwDgdGxtrzufzS9abiKZisVgiKMwyAlrr8wCu2UZvzjHzgIj0mHet9fH59uyvqnrmXhG5/bc0pZehoaFYNBpN27ZaoLY/mPk1EeUAmDnRFEJgZnZ2Nt7Z2ZkpBFA6rLXeB+B5LdEXM/ARwPZa7Jg5KSJvygi4rnuFiC7aOlJKPSCiR4lEYrw4L0aIaKWl/S3HcS6XEfA8b9T3/d2WDoxORhzHmQxk0JSv2cZeKfVunnj7whJ8ALDNwkFBpMy8Q0SOBQhMA9hkYW9sv4jIzoUEvgFYbeHAEOgFcKK9vf1JUf0tAN5b2BaOMPMvETHLrEyEtgQKTmKx2NpSP7uue4GIri6XgG0JTARDInIkkP5hs6ZrILC4BLWIkJlPicigAZyYmIjOzc19twU35yqKsJY2zGazG5PJZNY4c103SUQPayFARIvb0HYQMfOoiBwMpL8PwEkiMkPMkAl9Kg4i21HMzGdF5F4JxfO8TwA+Axg33RGGzsyVR3GxnUKXETM3iUih5lrrFiK6T0TdRPQCwCoLApWXkTG0WceRSKS1ra1tugSUSqWa5397RkRbwsBD13ExqqoXEqXUYD6fvx6JRLYCOEREXQDWWYCb9q1+IQkIq35XsoC46ncpDWSiftfyEom6fpgEhVW3TzMbdS/nTOi34XKc29j+AXyzojCfNKqJAAAAAElFTkSuQmCC",ge={class:"card-wrap"},ye={class:"card-icon card"},me={class:"card-input"},Ae={class:"card-icon info"},he=e.defineComponent({__name:"index",props:{activeTabName:{type:String,default:""}},emits:["handleCardInput"],setup(v,{emit:E}){const g=v,c=e.ref(""),i=E,A=u=>{i("handleCardInput",u)};return e.watch(()=>g.activeTabName,u=>{u&&(c.value="")}),(u,p)=>{const f=e.resolveComponent("el-image"),h=e.resolveComponent("el-input");return e.openBlock(),e.createElementBlock("div",ge,[e.createElementVNode("div",ye,[e.createVNode(f,{src:e.unref(pe),fit:"contain"},null,8,["src"])]),e.createElementVNode("div",me,[e.createVNode(h,{modelValue:c.value,"onUpdate:modelValue":p[0]||(p[0]=C=>c.value=C),onChange:A,clearable:""},null,8,["modelValue"])]),e.createElementVNode("div",Ae,[e.createVNode(f,{src:e.unref(fe),fit:"contain"},null,8,["src"])])])}}}),be=K._export_sfc(he,[["__scopeId","data-v-23f91251"]]),ve=V.useMenuState(V.pinia),J=V.useLoginState(V.pinia),X=e.ref(!1),G=e.ref(!1),_e=async()=>{const v=m.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),E=m.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),type:"structure"}});return await Promise.all([v,E]).then(g=>{var A,u,p,f,h,C,w,k,S,M,B,U,P,L;const c=g==null?void 0:g[0],i=g==null?void 0:g[1];if(c.data.code===200){const Q=(w=(C=(h=(f=(p=(u=(A=c==null?void 0:c.data)==null?void 0:A.result)==null?void 0:u[0])==null?void 0:p.value)==null?void 0:f.pageData)==null?void 0:h.compData)==null?void 0:C[0])==null?void 0:w.contents;ve.setRawMenus(Q??[]),X.value=((k=c==null?void 0:c.data)==null?void 0:k.result)&&((M=(S=c==null?void 0:c.data)==null?void 0:S.result)==null?void 0:M.length)>0}else m.ElMessage.error("获取模型菜单响应失败");i.data.code===200?i.data.result&&((B=i.data.result)==null?void 0:B.length)>0&&(J.setStructureData(i.data.result),J.setIsStructureExist(!0),G.value=((U=i==null?void 0:i.data)==null?void 0:U.result)&&((L=(P=i==null?void 0:i.data)==null?void 0:P.result)==null?void 0:L.length)>0):m.ElMessage.error("获取模型结构响应失败")}),{menuExist:X.value,structureExist:G.value}};function Ce(){const v={account:"superadmin",password:"1c8e7623312244c1feb677732278fb8b2af6af1a5335fdaebbdb2720137b372b7871292d11165b83b2967b9c39fa37027d63d37a2f36d764257b566dcfa99f334faa8995301601aec549adf39aef8d89c8788da03a9164937a5f73af20a15ea60d47c7cf01cf",tenantId:-1,code:"",codeId:0};return m.service({url:"/api/sysAuth/login",method:"post",data:v})}const we={class:"login-wrap"},Ee={class:"login-body"},Ne={class:"login-body-item left"},Se={class:"login-body-item right"},ke=e.defineComponent({__name:"index",emits:["change"],setup(v,{emit:E}){const g=F.useRouter(),c=V.useLoginState(V.pinia),i=e.ref({sysCTitle:"",sysETitle:"",loginTitle:"账户密码登录",tabs:[{name:"刷卡登录",btnLabel:"请刷卡登录",tips:"温馨提示:建议使用谷歌、Microsoft Edge,版本79.0.1072.62及以上浏览器,360浏览器请使用极速模式"},{name:"用户名登录",btnLabel:"登录",tips:"温馨提示:建议使用谷歌、Microsoft Edge,版本79.0.1072.62及以上浏览器,360浏览器请使用极速模式"}]}),A=e.ref(""),u=e.ref(!1),p=e.ref(!1),f=()=>{u.value=!0},h=a=>{u.value=!1,O(a)},C=(a,o)=>{u.value=!1,a&&O(o)},w=a=>x.getFirstArrayProperty(a),k=a=>{let o;const n=x.convertArrayToTree(a),s=x.addPathToTree(n),y=x.getLeafNodesRecursive(s),b=x.groupByField(y,"parentPath");return o=x.handleRowAuthorityRender(b),o},S=(a,o)=>{var s,y,b;const n=(o==null?void 0:o.userRoles)??(o==null?void 0:o.角色名称);try{if(o.layer&&((s=o==null?void 0:o.layer)==null?void 0:s.toUpperCase())==="SUPERADMIN")return"superAdmin";if(Array.isArray(n)){if((n==null?void 0:n.length)===1){const r=a==null?void 0:a.find(t=>(t==null?void 0:t.roleName)===(n==null?void 0:n[0])||t.角色名称===(n==null?void 0:n[0])),_=w(r),l=k(r==null?void 0:r[_]);return r&&l&&Array.isArray(l)?r?l==null?void 0:l.flatMap(t=>t.checkedButtons):[]:[]}if((n==null?void 0:n.length)>1){let r=a==null?void 0:a.filter(t=>n==null?void 0:n.includes(t.roleName||(t==null?void 0:t.角色名称)));const _=w(r==null?void 0:r[0]),l=(b=(y=r==null?void 0:r.map(t=>Array.isArray(t==null?void 0:t[_])?t==null?void 0:t[_]:[]))==null?void 0:y.flat())==null?void 0:b.flatMap(t=>t.checkedButtons);return(l==null?void 0:l.length)===0?m.ElMessage.error("该用户没有权限,请联系管理员"):new Set(l)}}if(typeof n=="string"){const r=a==null?void 0:a.find(t=>(t==null?void 0:t.roleName)===n||(t==null?void 0:t.角色名称)===n),_=w(r),l=k(r==null?void 0:r[_]);return r&&l&&Array.isArray(l)?r?l==null?void 0:l.flatMap(t=>t.checkedButtons):[]:[]}}catch(r){throw new Error(r)}},M=async a=>{var o,n;try{let s=[];const y=await m.getInsofDataApi({key:{systemKey:a==null?void 0:a.systemKey,pageKey:"系统管理/角色管理",type:"data"}});if(y.data.code===200){const b=(n=(o=y.data)==null?void 0:o.result)==null?void 0:n.map(r=>r.value.tableData);s=S(b,a)}if(s)return Array.isArray(s)?Array.from(s):s;throw m.ElMessage.error("获取用户权限失败,请联系管理员"),new Error("获取用户权限失败,请联系管理员")}catch(s){throw m.ElMessage.error("获取用户权限失败,请联系管理员"),new Error(s)}},B=async a=>{var o,n,s,y,b,r,_;try{let l=[],t,I;const D=await m.getInsofDataApi({key:{pageKey:"系统管理/用户管理",type:"data"}}),R=await m.getInsofDataApi({key:{layer:"superAdmin"}});if(D.data.code===200&&R.data.code===200){const Y=(n=(o=R.data)==null?void 0:o.result)==null?void 0:n.map(d=>{var N,T;return{...d.value.tableData,layer:(N=d.key)==null?void 0:N.layer,systemKey:(T=d==null?void 0:d.key)==null?void 0:T.systemKey,id:d.id}}),j=(y=(s=D.data)==null?void 0:s.result)==null?void 0:y.map(d=>{var N,T;return{...d.value.tableData,layer:(N=d.key)==null?void 0:N.layer,systemKey:(T=d==null?void 0:d.key)==null?void 0:T.systemKey,id:d.id}}),q=[...Y,...j];if(t=q==null?void 0:q.find(d=>(d==null?void 0:d.account)===(a==null?void 0:a.account)||(d==null?void 0:d.账号)===(a==null?void 0:a.account)),t){if(((b=t.layer)==null?void 0:b.toUpperCase())!=="SUPERADMIN"&&(!(t!=null&&t.状态)||(t==null?void 0:t.状态)==="禁用"||(t==null?void 0:t.status)==="禁用")){m.ElMessage.error("该用户已被禁用,请联系管理员"),p.value=!1;return}l=await M(t);const{privateKey:d}=await c.getModelSecretAsync(t);let N;if(t.password?N=((r=t.layer)==null?void 0:r.toUpperCase())==="SUPERADMIN"?t.password:W.decryptData(t.password,d):N=((_=t.layer)==null?void 0:_.toUpperCase())==="SUPERADMIN"?t.password:x.resetPassword,(a==null?void 0:a.password)===N)I=t;else throw I=null,m.ElMessage.error("输入的密码错误,请重新输入"),p.value=!1,new Error("输入的密码错误,请重新输入")}}return I&&l?{matchedUser:I,userAuthority:l}:void 0}catch(l){throw new Error(l)}},U=async a=>{var n,s,y;const o=await B(a);if(o!=null&&o.matchedUser){c.setLoginUserInfo(o.matchedUser),sessionStorage.setItem("authority",JSON.stringify(o.userAuthority));const b=((s=(n=o.matchedUser)==null?void 0:n.layer)==null?void 0:s.toUpperCase())==="SUPERADMIN";return sessionStorage.setItem("isSuperAdmin",JSON.stringify(b)),sessionStorage.setItem("systemKey",(y=o.matchedUser)==null?void 0:y.systemKey),await P(o.matchedUser),!0}else throw p.value=!1,m.ElMessage.error("该用户不存在,请重新输入"),new Error("该用户不存在,请重新输入")},P=async a=>{var n,s,y,b,r,_,l,t,I;const o=await m.getInsofDataApi({key:{layer:"superAdmin",systemKey:a==null?void 0:a.systemKey}});if(o.data.code===200&&(n=o.data)!=null&&n.result&&Array.isArray((s=o.data)==null?void 0:s.result)&&((b=(y=o.data)==null?void 0:y.result)==null?void 0:b.length)>0){const D=(I=(t=(l=(_=(r=o.data)==null?void 0:r.result)==null?void 0:_[0])==null?void 0:l.value)==null?void 0:t.tableData)==null?void 0:I.account;c.setSuperAdminInfo({account:D})}},L=async()=>{var a,o,n;try{const s=await Ce();return((a=s==null?void 0:s.data)==null?void 0:a.code)===200?(sessionStorage.setItem("loginToken",(n=(o=s.data)==null?void 0:o.result)==null?void 0:n.accessToken),!0):!1}catch(s){m.ElMessage.error(s)}},Q=async()=>{var a,o,n;try{const s=await m.axios.post("http://139.196.154.85:20024/api/sysAuth/login",{account:"superadmin",password:"9bf00809059adc7f57bd290bf73ddf4d16f4c83b5937e2d68144ab0bd60d045d22d70afeed8f2fa071cda536e1fac0daf12b8e63dd870c3ca8b308f23be6e693bb32ebd3d013116dc8338d6854b1332701a522a7c43706a6db4162fbe991c8c08aa842fbbc34",codeId:0,code:""});return((a=s==null?void 0:s.data)==null?void 0:a.code)===200?(sessionStorage.setItem("magicToken",(n=(o=s.data)==null?void 0:o.result)==null?void 0:n.accessToken),!0):!1}catch(s){m.ElMessage.error(s)}},O=a=>{p.value=!0;let o=[U(a),L(),Q()];Promise.all(o).then(n=>{(n==null?void 0:n.every(y=>y))&&(_e(),g.push("/"),c.setLogRecordAsync({type:"登录",data:{account:a==null?void 0:a.account}},"/login","login"))})},Z=a=>{A.value=a,u.value=!1,p.value=!1};return(a,o)=>(e.openBlock(),e.createElementBlock("div",we,[e.createElementVNode("div",Ee,[e.createElementVNode("div",Ne,[e.createVNode(te,{class:"login-left-bg"},{img:e.withCtx(()=>o[0]||(o[0]=[e.createElementVNode("div",{class:"title"},[e.createElementVNode("div",null,"INSOFWORKS"),e.createElementVNode("div",null,"工业软件集成开发平台")],-1),e.createElementVNode("div",{class:"divide-line"},null,-1)])),_:1})]),e.createElementVNode("div",Se,[e.createVNode(le,{loading:p.value,onClickLogin:f,onHandleTabClick:Z},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.loginTitle),1)]),tabLabel1:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.tabs[0].name),1)]),tabContent1:e.withCtx(()=>[e.createVNode(be,{activeTabName:A.value,onHandleCardInput:h},null,8,["activeTabName"])]),tabButton1:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.tabs[0].btnLabel),1)]),tabLabel2:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.tabs[1].name),1)]),tabContent2:e.withCtx(()=>[e.createVNode(ue,{activeTabName:A.value,isClickLogin:u.value,onHandleLoginFormChange:C},null,8,["activeTabName","isClickLogin"])]),tabButton2:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value.tabs[1].btnLabel),1)]),_:1},8,["loading"])])])]))}}),Ie=K._export_sfc(ke,[["__scopeId","data-v-476e2d85"]]);exports.default=Ie;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue");require("./index-DmPffoKv.cjs");require("./login-C8QOZ9u0.cjs");require("./array-C_A3GqHl.cjs");const C=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");require("./index.vue_vue_type_style_index_0_scoped_c81d0427_lang-Bk-zmumx.cjs");require("./index.vue_vue_type_style_index_0_scoped_8606206c_lang-B3LO5bhv.cjs");require("./index-BpPyaNFa.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CUNGVKqd.cjs");require("./index-2p69g4HY.cjs");require("./index-8idzhcUq.cjs");require("vue-router");const m={__name:"index",props:{windowConfig:{type:Object,default:()=>{}},pathContent:{type:String,default:""},mode:{type:String,default:"view"},content:{type:String,default:""},jsonContents:{type:Array,default:()=>[]},showButton:{type:Boolean,default:!0},nodeDev:{type:String,default:""},pageKey:{type:String,default:""}},emits:["buildContent","openThreeBuild","threeData"],setup(i,{emit:c}){const e=i,o=c,l=()=>{o("buildContent")},s=()=>{o("setLoginInfo")},w=t=>{o("openThreeBuild",t)},f=t=>{o("threeData",t)},u=()=>{var a;const t=e!=null&&e.windowConfig?(a=e==null?void 0:e.windowConfig)==null?void 0:a.width:window.innerWidth,r=1920,d=16,h=t/r,g=d*h;document.documentElement.style.fontSize=`${g}px`};return n.onMounted(()=>{u(),window.addEventListener("resize",u)}),(t,r)=>{const d=n.resolveComponent("router-view");return n.openBlock(),n.createElementBlock("div",null,[n.createVNode(d,{mode:e==null?void 0:e.mode,content:e==null?void 0:e.content,jsonContents:e==null?void 0:e.jsonContents,pathContent:e==null?void 0:e.pathContent,showButton:e==null?void 0:e.showButton,nodeDev:e==null?void 0:e.nodeDev,windowConfig:i.windowConfig,onBuildContent:l,onOpenThreeBuild:w,pageKey:i.pageKey,onThreeData:f,onSetLoginInfo:s},null,8,["mode","content","jsonContents","pathContent","showButton","nodeDev","windowConfig","pageKey"])])}}},y=C._export_sfc(m,[["__scopeId","data-v-7138c9e0"]]);exports.default=y;
@@ -1,90 +0,0 @@
1
- import { onMounted as h, resolveComponent as C, createElementBlock as g, openBlock as y, createVNode as B } from "vue";
2
- import "./index-BP-q1C8f.js";
3
- import "./login-BLjZKKjO.js";
4
- import "./array-CV47iU9i.js";
5
- import { _ as v } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
- import "./index.vue_vue_type_style_index_0_scoped_c81d0427_lang-BS8sJ53i.js";
7
- import "./index.vue_vue_type_style_index_0_scoped_8606206c_lang-D0Bstp43.js";
8
- import "./index-BHtNKL1L.js";
9
- import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D5Z2_TwH.js";
10
- import "./index-BCZ59Y4K.js";
11
- import "./index-Bu_OR9tS.js";
12
- import "vue-router";
13
- const S = {
14
- __name: "index",
15
- props: {
16
- windowConfig: {
17
- type: Object,
18
- default: () => {
19
- }
20
- },
21
- pathContent: {
22
- type: String,
23
- default: ""
24
- },
25
- mode: {
26
- type: String,
27
- default: "view"
28
- },
29
- content: {
30
- type: String,
31
- default: ""
32
- },
33
- jsonContents: {
34
- type: Array,
35
- default: () => []
36
- },
37
- showButton: {
38
- type: Boolean,
39
- default: !0
40
- },
41
- nodeDev: {
42
- type: String,
43
- default: ""
44
- },
45
- pageKey: {
46
- type: String,
47
- default: ""
48
- }
49
- },
50
- emits: ["buildContent", "openThreeBuild", "threeData"],
51
- setup(o, { emit: u }) {
52
- const t = o, n = u, l = () => {
53
- n("buildContent");
54
- }, r = () => {
55
- n("setLoginInfo");
56
- }, m = (e) => {
57
- n("openThreeBuild", e);
58
- }, s = (e) => {
59
- n("threeData", e);
60
- }, d = () => {
61
- var c;
62
- const e = t != null && t.windowConfig ? (c = t == null ? void 0 : t.windowConfig) == null ? void 0 : c.width : window.innerWidth, a = 1920, i = 16, w = e / a, f = i * w;
63
- document.documentElement.style.fontSize = `${f}px`;
64
- };
65
- return h(() => {
66
- d(), window.addEventListener("resize", d);
67
- }), (e, a) => {
68
- const i = C("router-view");
69
- return y(), g("div", null, [
70
- B(i, {
71
- mode: t == null ? void 0 : t.mode,
72
- content: t == null ? void 0 : t.content,
73
- jsonContents: t == null ? void 0 : t.jsonContents,
74
- pathContent: t == null ? void 0 : t.pathContent,
75
- showButton: t == null ? void 0 : t.showButton,
76
- nodeDev: t == null ? void 0 : t.nodeDev,
77
- windowConfig: o.windowConfig,
78
- onBuildContent: l,
79
- onOpenThreeBuild: m,
80
- pageKey: o.pageKey,
81
- onThreeData: s,
82
- onSetLoginInfo: r
83
- }, null, 8, ["mode", "content", "jsonContents", "pathContent", "showButton", "nodeDev", "windowConfig", "pageKey"])
84
- ]);
85
- };
86
- }
87
- }, F = /* @__PURE__ */ v(S, [["__scopeId", "data-v-7138c9e0"]]);
88
- export {
89
- F as default
90
- };