ss-component-new 1.1.714 → 1.1.716

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 (101) hide show
  1. package/dist/{array-D1rENrtC.js → array-CV47iU9i.js} +1 -1
  2. package/dist/{array-DiC30wYM.cjs → array-C_A3GqHl.cjs} +1 -1
  3. package/dist/icons/svg/colFilter.svg +1 -0
  4. package/dist/icons/svg/colOperate.svg +1 -0
  5. package/dist/index-6cIk3a7c.cjs +1 -0
  6. package/dist/index-8oaOF8hU.cjs +1 -0
  7. package/dist/index-B-SZ9FOJ.cjs +1 -0
  8. package/dist/{index-k3Bxo8CN.js → index-B7x9V7t6.js} +7 -8
  9. package/dist/{index-DqIn00H8.js → index-B9e8jfXC.js} +2 -2
  10. package/dist/{index-B7xlKvbO.cjs → index-BBztMuYS.cjs} +1 -1
  11. package/dist/index-BDIZYI6c.cjs +1 -0
  12. package/dist/index-BJzLztcT.cjs +4207 -0
  13. package/dist/{index-BhN_xaKB.js → index-BUr_R7W4.js} +2 -2
  14. package/dist/{index-CCxinvIS.js → index-Ba_1AoLH.js} +8 -9
  15. package/dist/index-BmwSczsQ.cjs +1 -0
  16. package/dist/{index-Dq3Gb645.cjs → index-BqIFXFlH.cjs} +1 -1
  17. package/dist/{index-Cpx_u9T6.js → index-BuVGPawZ.js} +3 -3
  18. package/dist/index-C0WZBDT5.cjs +1 -0
  19. package/dist/{index-BFZBbjlZ.js → index-C1XS3ENl.js} +2 -2
  20. package/dist/index-C3NA0aaD.cjs +1 -0
  21. package/dist/index-C3fPP82O.cjs +15 -0
  22. package/dist/index-C6SI8hvh.cjs +1 -0
  23. package/dist/index-C9QubKHj.cjs +1 -0
  24. package/dist/{index-Byy_Xtef.js → index-CI5n0Xv4.js} +5 -6
  25. package/dist/{index-H-bGpaNs.js → index-CIlL2SK6.js} +1 -1
  26. package/dist/{index-cplChbGm.js → index-CVBLCbGm.js} +5 -5
  27. package/dist/{index-DldssUmp.cjs → index-CYxb4HE7.cjs} +1 -1
  28. package/dist/{index-BEHcZREm.js → index-Cfirfu0f.js} +22 -23
  29. package/dist/{index-S15gAcDT.js → index-CiKRvh8o.js} +14 -15
  30. package/dist/{index-JNw-0LM6.js → index-CtoAlRfk.js} +10 -11
  31. package/dist/{index-CRKPHTGu.js → index-D8qVbjll.js} +1 -1
  32. package/dist/index-DZKcDen7.cjs +1 -0
  33. package/dist/index-DjUopiVE.cjs +1 -0
  34. package/dist/index-DkuUEvSP.cjs +1 -0
  35. package/dist/{index-C9_p4Vm6.js → index-Dr65gNkt.js} +463 -461
  36. package/dist/index-DuVdlGvS.cjs +1 -0
  37. package/dist/index-HqICPCny.cjs +1 -0
  38. package/dist/{index-FC3u5SDQ.js → index-KCVZOl0Y.js} +5 -5
  39. package/dist/{index-B9dgbtyu.js → index-QzT_XISi.js} +43 -44
  40. package/dist/index-VBY1u2Ig.cjs +1 -0
  41. package/dist/{index-BvgxZw84.js → index-WEQVqMJE.js} +4 -4
  42. package/dist/index-Woj44XOP.cjs +1 -0
  43. package/dist/{index-DwW2YuMT.js → index-XoIvvStS.js} +1 -1
  44. package/dist/{index-DxQ-WNaQ.js → index-ZC7nAMFX.js} +8107 -8024
  45. package/dist/{index-DOs-6Cx7.cjs → index-glKQqAZb.cjs} +1 -1
  46. package/dist/{index-C3bhZmjl.js → index-h6SXo9wQ.js} +5 -5
  47. package/dist/{index-Bvnvuwkn.js → index-hVEEEQQc.js} +4434 -4369
  48. package/dist/{index-CU5qn5hA.js → index-mQLSN20F.js} +2 -2
  49. package/dist/index-mSkQE8pC.cjs +1 -0
  50. package/dist/{index-di1QdZZr.js → index-s4l8lwWV.js} +2 -2
  51. package/dist/{index.vue_vue_type_script_setup_true_lang-BcMm1KLj.cjs → index.vue_vue_type_script_setup_true_lang-CfqBx2Ou.cjs} +1 -1
  52. package/dist/{index.vue_vue_type_script_setup_true_lang-DN-3ZDhB.js → index.vue_vue_type_script_setup_true_lang-Cm3CCGlq.js} +1 -1
  53. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DCPQmJ8P.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BXjL5frf.js} +14297 -14277
  54. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BHHPVcqx.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-NOV5eRfA.cjs} +142 -142
  55. package/dist/{index.vue_vue_type_style_index_0_scoped_ffb37532_lang-bjlUC_Ux.cjs → index.vue_vue_type_style_index_0_scoped_8606206c_lang-DAM-jGzL.cjs} +13 -13
  56. package/dist/{index.vue_vue_type_style_index_0_scoped_ffb37532_lang-DB4kiFum.js → index.vue_vue_type_style_index_0_scoped_8606206c_lang-DxfIMoF9.js} +105 -106
  57. package/dist/{index.vue_vue_type_style_index_0_scoped_c81d0427_lang-Bem94E3F.js → index.vue_vue_type_style_index_0_scoped_c81d0427_lang-BdKfxEpu.js} +53 -54
  58. package/dist/index.vue_vue_type_style_index_0_scoped_c81d0427_lang-DAqDZ6lJ.cjs +1 -0
  59. package/dist/{menu-BRpPhHno.js → login-BLjZKKjO.js} +1006 -881
  60. package/dist/login-C8QOZ9u0.cjs +11 -0
  61. package/dist/{main-slCUa76N.js → main-BEId0V1l.js} +4 -4
  62. package/dist/main-BN-IctwQ.cjs +1 -0
  63. package/dist/ss-component.cjs +1 -1
  64. package/dist/ss-component.css +2 -2
  65. package/dist/ss-component.js +9 -9
  66. package/dist/ss-component2.cjs +1 -1
  67. package/dist/ss-component2.js +9 -9
  68. package/dist/{threeModel-BY_tDAcc.js → threeModel-BhgvBDsA.js} +2 -2
  69. package/dist/threeModel-D5_-Dbt2.cjs +1 -0
  70. package/package.json +1 -1
  71. package/public/icons/svg/colFilter.svg +1 -0
  72. package/public/icons/svg/colOperate.svg +1 -0
  73. package/dist/index-B1XyxOHh.cjs +0 -1
  74. package/dist/index-B6eLhxMJ.cjs +0 -1
  75. package/dist/index-BLZNIRkY.cjs +0 -15
  76. package/dist/index-BYA9VCDi.cjs +0 -1
  77. package/dist/index-C-VUvax5.cjs +0 -1
  78. package/dist/index-CGebARL6.cjs +0 -1
  79. package/dist/index-CHcDZKUi.cjs +0 -1
  80. package/dist/index-COoh2ijF.cjs +0 -1
  81. package/dist/index-CPj1rc3m.cjs +0 -1
  82. package/dist/index-Cdz4ZgAR.cjs +0 -4207
  83. package/dist/index-Cj-k4kxo.cjs +0 -1
  84. package/dist/index-Coxoz81K.cjs +0 -1
  85. package/dist/index-D6xSLp3Q.cjs +0 -1
  86. package/dist/index-DSC06oXb.cjs +0 -1
  87. package/dist/index-DTLKy7rp.cjs +0 -1
  88. package/dist/index-Decs_B4B.cjs +0 -1
  89. package/dist/index-Dp1mAXQ2.cjs +0 -1
  90. package/dist/index-Nn47GzGZ.cjs +0 -1
  91. package/dist/index-Yr549Xbj.cjs +0 -1
  92. package/dist/index.vue_vue_type_style_index_0_scoped_c81d0427_lang-CiYmZBSD.cjs +0 -1
  93. package/dist/login-CCz_BcJe.cjs +0 -1
  94. package/dist/login-h0Hl0hFq.js +0 -129
  95. package/dist/main-DUyxM_WP.cjs +0 -1
  96. package/dist/menu-vml_xHJD.cjs +0 -11
  97. package/dist/obj/model.mtl +0 -42
  98. package/dist/obj/model.obj +0 -26110
  99. package/dist/threeModel-W5f1wios.cjs +0 -1
  100. package/public/obj/model.mtl +0 -42
  101. 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-DCPQmJ8P.js";
4
- import "./menu-BRpPhHno.js";
3
+ import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BXjL5frf.js";
4
+ import "./login-BLjZKKjO.js";
5
5
  import "./index-BCZ59Y4K.js";
6
6
  import l from "./ss-component2.js";
7
- const n = s(() => import("./main-slCUa76N.js"));
7
+ const n = s(() => import("./main-BEId0V1l.js"));
8
8
  n.install = (o) => {
9
9
  o.component("ssComponent", n);
10
10
  };
11
- const t = s(() => import("./index-Bvnvuwkn.js").then((o) => o.m));
11
+ const t = s(() => import("./index-hVEEEQQc.js").then((o) => o.m));
12
12
  t.install = (o) => {
13
13
  o.component("ssTab", t);
14
14
  };
15
- const e = s(() => import("./index-DwW2YuMT.js"));
15
+ const e = s(() => import("./index-XoIvvStS.js"));
16
16
  e.install = (o) => {
17
17
  o.component("ssMenu", e);
18
18
  };
19
- const m = s(() => import("./index-S15gAcDT.js"));
19
+ const m = s(() => import("./index-CiKRvh8o.js"));
20
20
  m.install = (o) => {
21
21
  o.component("ssMenuComponent", m);
22
22
  };
23
- const r = s(() => import("./index-BhN_xaKB.js"));
23
+ const r = s(() => import("./index-BUr_R7W4.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-H-bGpaNs.js"));
31
+ const i = s(() => import("./index-CIlL2SK6.js"));
32
32
  i.install = (o) => {
33
33
  o.component("ssAvatar", i);
34
34
  };
35
- const c = s(() => import("./threeModel-BY_tDAcc.js"));
35
+ const c = s(() => import("./threeModel-BhgvBDsA.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-Coxoz81K.cjs"))},{path:"/",name:"Model",component:async()=>Promise.resolve().then(()=>require("./index-CGebARL6.cjs")),children:[{path:"平台管理/菜单管理",name:"Menu",component:async()=>Promise.resolve().then(()=>require("./index-Dp1mAXQ2.cjs"))},{path:"平台管理/主菜单管理",name:"MainMenu",component:async()=>Promise.resolve().then(()=>require("./index-DTLKy7rp.cjs"))},{path:"系统管理/个人中心",name:"PersonalCenter",component:async()=>Promise.resolve().then(()=>require("./index-Yr549Xbj.cjs"))},{path:"系统管理/职位管理",name:"Post",component:async()=>Promise.resolve().then(()=>require("./index-C-VUvax5.cjs"))},{path:"系统管理/用户管理",name:"User",component:async()=>Promise.resolve().then(()=>require("./index-CPj1rc3m.cjs"))},{path:"系统管理/角色管理",name:"Role",component:async()=>Promise.resolve().then(()=>require("./index-Decs_B4B.cjs"))},{path:"系统管理/部门管理",name:"Dept",component:async()=>Promise.resolve().then(()=>require("./index-CHcDZKUi.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-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-6cIk3a7c.cjs")),children:[{path:"平台管理/菜单管理",name:"Menu",component:async()=>Promise.resolve().then(()=>require("./index-Woj44XOP.cjs"))},{path:"平台管理/主菜单管理",name:"MainMenu",component:async()=>Promise.resolve().then(()=>require("./index-DZKcDen7.cjs"))},{path:"系统管理/个人中心",name:"PersonalCenter",component:async()=>Promise.resolve().then(()=>require("./index-C9QubKHj.cjs"))},{path:"系统管理/职位管理",name:"Post",component:async()=>Promise.resolve().then(()=>require("./index-BDIZYI6c.cjs"))},{path:"系统管理/用户管理",name:"User",component:async()=>Promise.resolve().then(()=>require("./index-DkuUEvSP.cjs"))},{path:"系统管理/角色管理",name:"Role",component:async()=>Promise.resolve().then(()=>require("./index-DjUopiVE.cjs"))},{path:"系统管理/部门管理",name:"Dept",component:async()=>Promise.resolve().then(()=>require("./index-C3NA0aaD.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;
@@ -8,12 +8,12 @@ const a = [
8
8
  {
9
9
  path: "/login",
10
10
  name: "Login",
11
- component: async () => import("./index-B9dgbtyu.js")
11
+ component: async () => import("./index-QzT_XISi.js")
12
12
  },
13
13
  {
14
14
  path: "/",
15
15
  name: "Model",
16
- component: async () => import("./index-C9_p4Vm6.js"),
16
+ component: async () => import("./index-Dr65gNkt.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-BvgxZw84.js")
24
+ component: async () => import("./index-WEQVqMJE.js")
25
25
  },
26
26
  {
27
27
  path: "平台管理/主菜单管理",
28
28
  name: "MainMenu",
29
- component: async () => import("./index-BFZBbjlZ.js")
29
+ component: async () => import("./index-C1XS3ENl.js")
30
30
  },
31
31
  {
32
32
  path: "系统管理/个人中心",
33
33
  name: "PersonalCenter",
34
- component: async () => import("./index-Byy_Xtef.js")
34
+ component: async () => import("./index-CI5n0Xv4.js")
35
35
  },
36
36
  {
37
37
  path: "系统管理/职位管理",
38
38
  name: "Post",
39
- component: async () => import("./index-C3bhZmjl.js")
39
+ component: async () => import("./index-h6SXo9wQ.js")
40
40
  },
41
41
  {
42
42
  path: "系统管理/用户管理",
43
43
  name: "User",
44
- component: async () => import("./index-k3Bxo8CN.js")
44
+ component: async () => import("./index-B7x9V7t6.js")
45
45
  },
46
46
  {
47
47
  path: "系统管理/角色管理",
48
48
  name: "Role",
49
- component: async () => import("./index-Cpx_u9T6.js")
49
+ component: async () => import("./index-BuVGPawZ.js")
50
50
  },
51
51
  {
52
52
  path: "系统管理/部门管理",
53
53
  name: "Dept",
54
- component: async () => import("./index-cplChbGm.js")
54
+ component: async () => import("./index-CVBLCbGm.js")
55
55
  },
56
56
  {
57
57
  path: "priority",
@@ -1,7 +1,7 @@
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-DxQ-WNaQ.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-ZC7nAMFX.js";
3
3
  import { _ as me } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
- import { c as Ge } from "./menu-BRpPhHno.js";
4
+ import { c as Ge } from "./login-BLjZKKjO.js";
5
5
  import { E as Ie } from "./index-BCZ59Y4K.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;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-BJzLztcT.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;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ss-component-new",
3
3
  "private": false,
4
- "version": "1.1.714",
4
+ "version": "1.1.716",
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>
@@ -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="1755853844101" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7062" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><path d="M645.5296 932.62336h-0.01024c-16.19968 0-31.9488-6.70208-42.12224-17.92512-13.86496-15.20128-57.7792-54.72256-93.73184-54.72256-35.70176 0-80.29696 39.75168-93.1072 53.67296-10.14784 11.02848-25.78944 17.61792-41.84064 17.61792-7.63904 0-14.85824-1.46944-21.44256-4.36224l-1.14688-0.50688-109.27616-61.1072-1.08032-0.75776c-19.89632-13.93152-27.45856-41.1648-17.60768-63.35488 0.0768-0.17408 10.07616-23.24992 10.07616-44.29824 0-63.86688-51.95264-115.82464-115.83488-115.82464h-3.8656l-0.71168 0.01024c-18.28864 0-33.18784-16.256-37.94944-41.41568-0.37376-1.99168-9.3184-49.69984-9.3184-87.29088 0-37.59104 8.94464-85.2992 9.3184-87.31648 4.81792-25.472 20.03968-41.83552 38.66112-41.38496h3.8656c63.87712 0 115.83488-51.968 115.83488-115.84 0-21.03296-9.98912-44.11904-10.09664-44.3392-9.84576-22.17984-2.2272-49.40288 17.74592-63.28832l1.13152-0.78336 115.32288-63.34976 1.19808-0.50688c6.49216-2.76992 13.60896-4.1728 21.14048-4.1728 16.01536 0 31.67744 6.44096 41.92256 17.23904 13.64992 14.28992 56.79616 51.456 91.7248 51.456 34.57536 0 77.45536-36.43392 91.06944-50.47296 10.17856-10.5728 25.74848-16.90624 41.6-16.90624 7.69024 0 14.93504 1.45408 21.5296 4.3264l1.16736 0.50688 111.3856 61.88544 1.1008 0.76288c19.92704 13.91104 27.50464 41.14432 17.65888 63.35488-0.08704 0.16384-10.08128 23.25504-10.08128 44.29312 0 63.872 51.95264 115.84 115.82464 115.84h3.87584c18.59072-0.42496 33.82784 15.90784 38.65088 41.38496 0.37888 2.01216 9.32864 49.72032 9.32864 87.31136 0 37.5808-8.94976 85.2992-9.32864 87.30112-4.81792 25.48224-20.06016 41.7792-38.65088 41.40544h-3.87584c-63.872 0-115.82464 51.95776-115.82464 115.82464 0 21.0432 9.99424 44.11392 10.09664 44.34944 9.8304 22.14912 2.24256 49.38752-17.70496 63.28832l-1.12128 0.77312-113.25952 62.60224-1.1776 0.50688c-6.48192 2.80064-13.57312 4.21376-21.06368 4.21376z m-3.44064-53.36576c0.51712 0.33792 1.94048 0.90112 3.44064 0.90112l0.16896-0.00512 105.8304-58.48576c-2.55488-5.9392-14.24384-34.72896-14.24384-64.768 0-89.84064 70.76352-163.47136 159.47776-168.06912 1.26976-7.05024 8.20224-46.70976 8.20224-76.47232 0-29.75744-6.93248-69.4016-8.20224-76.47232-88.71424-4.60288-159.47776-78.22848-159.47776-168.06912 0-30.08 11.71456-58.91072 14.25408-64.79872l-104.10496-57.84064c-0.11264-0.00512-0.27136-0.01536-0.4352-0.01536-1.77152 0-3.4304 0.64-3.97312 1.01376-1.75616 1.79712-16.8448 17.09568-38.51264 32.34816-32.09216 22.5792-62.42816 34.0224-90.17856 34.0224-28.032 0-58.624-11.6736-90.91072-34.69824-21.79584-15.54432-36.97152-31.13472-38.71232-32.96256-0.55808-0.37888-2.23232-1.03936-4.02432-1.03936l-0.37888 0.01024-107.8272 59.22304c2.58048 6.01088 14.22848 34.74944 14.22848 64.73728 0 89.84064-70.75328 163.46624-159.47264 168.07424-1.28 7.05536-8.21248 46.70976-8.21248 76.47232 0 29.75232 6.93248 69.39136 8.21248 76.47232 88.71936 4.59776 159.47264 78.21824 159.47264 168.05888 0 30.14656-11.76064 59.0336-14.26944 64.8448l102.05696 57.06752a7.1168 7.1168 0 0 0 3.63008-0.8704c1.90976-2.048 17.15712-18.18112 39.1168-34.26816 32.72192-23.9872 63.8208-36.1472 92.42624-36.1472 28.88192 0 60.22144 12.3904 93.1328 36.82816 22.08256 16.39936 37.39648 32.83968 39.28576 34.90816z" fill="#333333" p-id="7063"></path><path d="M510.03904 666.03008c-85.05344 0-154.25024-69.20192-154.25024-154.25536 0-85.05344 69.1968-154.25024 154.25024-154.25024 85.0688 0 154.26048 69.1968 154.26048 154.25024s-69.19168 154.25536-154.26048 154.25536z m0-256.04608c-56.12032 0-101.7856 45.66528-101.7856 101.7856 0 56.12544 45.66016 101.7856 101.7856 101.7856 56.13568 0 101.80096-45.66016 101.80096-101.7856 0-56.12032-45.66528-101.7856-101.80096-101.7856z" fill="#333333" p-id="7064"></path></svg>
@@ -1 +0,0 @@
1
- "use strict";const l=require("vue"),i=require("./index-2p69g4HY.cjs"),u=require("./menu-vml_xHJD.cjs"),Y=require("./login-CCz_BcJe.cjs"),D=require("./crypto-CRbcEKIz.cjs"),de=require("./index-DOs-6Cx7.cjs"),F=u.defineStore("authorityState",{state:()=>({routerPageStructures:[]}),actions:{setRouterPageStructure(e){this.routerPageStructures=e}}}),Ae=u.useMenuState(u.pinia),{activeMenuPath:A}=u.storeToRefs(Ae),Z=Y.useLoginState(u.pinia),{structureData:be}=u.storeToRefs(Z),ke=F(u.pinia),{routerPageStructures:Se}=u.storeToRefs(ke),m=u.useModelComp(u.pinia),Be=l.ref([{label:"角色名称",value:"",name:"roleName"}]),Te=l.ref([{label:"查询"},{label:"重置"}]),H=l.reactive({isFilter:!1,filterForm:{}}),Ce=l.ref(!1),De=e=>{H.isFilter=!0,H.filterForm=e},ee=l.ref([]),te=l.ref([]),se=l.ref(""),Pe=l.computed(()=>{var r,s,t,n,a;const e=(r=Se.value)==null?void 0:r.find(o=>{var c;return((c=o==null?void 0:o.comp)==null?void 0:c.toUpperCase())==="TABLE"});if(e){se.value=e.name,te.value=(n=(t=(s=e==null?void 0:e.compData)==null?void 0:s.find(c=>(c==null?void 0:c.key)==="header"))==null?void 0:t.contents)==null?void 0:n.filter(c=>(c==null?void 0:c.label)!=="操作");const o=(a=e==null?void 0:e.compData)==null?void 0:a.map(c=>{if((c==null?void 0:c.key)==="rowButton"){let h=[];return K.value?h=[...c==null?void 0:c.contents,{label:"授权"}]:h=c==null?void 0:c.contents,{...c,contents:h}}return c});return ae(o),o}return[]}),Ke=e=>{V(e.singleContent,e.buttonName,N.value)},k=l.ref({}),O=l.ref(),P=async(e,r,s)=>{var t,n;try{const a=await e(r);return((t=a==null?void 0:a.data)==null?void 0:t.code)===200?(s!=="查询"&&await Z.setLogRecordAsync({type:s,data:r},A.value),a.data.result||((n=a==null?void 0:a.data)==null?void 0:n.code)===200):null}catch(a){i.ElMessage.error(a)}},we=(e,r)=>{const s=new Map(r.map(n=>[n.path,n.checkedButtons]));function t(n){var o,c;const a=(o=n==null?void 0:n.path)!=null&&o.startsWith("/")?(c=n==null?void 0:n.path)==null?void 0:c.substring(1):n==null?void 0:n.path;s.has(a)&&(n.checkedButtons=s.get(a)),n.children&&n.children.length>0&&n.children.forEach(t)}e.forEach(t)},re=e=>e==null?void 0:e.map(r=>{var t;const s={...r,checkedButtons:[]};return s.children&&((t=s.children)==null?void 0:t.length)>0&&(s.children=re(s.children)),s}),j=e=>{for(const r in e)if(Array.isArray(e[r]))return r;return""},ne=e=>{const r=[];let s=0;for(;s<e.length;)if(typeof e[s]=="string"){const t={title:e[s]};s+1<e.length&&Array.isArray(e[s+1])?(t.children=ne(e[s+1]),s+=2):s+=1,r.push(t)}return r},W=e=>{const r=[];let s=0;for(;s<(e==null?void 0:e.length);){const t={title:e==null?void 0:e[s]};s+1<(e==null?void 0:e.length)&&Array.isArray(e==null?void 0:e[s+1])?(t.children=ne(e==null?void 0:e[s+1]),s+=2):s+=1,r.push(t)}return r},E=(e,r="",s=new Map)=>e==null?void 0:e.map(t=>{const n=r?`${r}/${t.title}`:t.title;if(s.has(n))return s.get(n);const a={...t,path:n};return t.children&&t.children.length>0&&(a.children=E(t.children,n,s)),s.set(n,a),a}),L=(e,r)=>e.reduce((s,t)=>{const n=t[r];return s[n]||(s[n]=[]),s[n].push(t),s},{}),q=e=>{const r=[];function s(t,n){!t.children||t.children.length===0?r.push({...t,parentPath:n||""}):t.children.forEach(a=>s(a,t.path||n))}return e.forEach(t=>s(t,"")),r},_=e=>Object.entries(e).map(([s,t])=>({path:s,checkedButtons:t==null?void 0:t.map(n=>n==null?void 0:n.path)})),Ie=e=>Object.prototype.toString.call(e)==="[object Object]"&&e!==null,Re=e=>{const r={},s=Array.isArray(e)?e==null?void 0:e.filter(t=>{var n;return!(Ie(t)&&((n=Object.keys(t))!=null&&n.includes("id")))}):null;return s&&(s==null||s.forEach((t,n)=>{if(n<=0)return;const a=`a${n}`;r[a]=t})),r},S=l.ref(""),ae=e=>{var n;const r=e==null?void 0:e.find(a=>(a==null?void 0:a.key)==="tableContents");if(!r)return"";const s=(n=r==null?void 0:r.contents)==null?void 0:n[0],t=Re(s);S.value=j(t)},$e=e=>{if(!Array.isArray(e))return!1;for(let r of e){if(typeof r!="object"||r===null||typeof r.path!="string"||!Array.isArray(r.checkedButtons))return!1;for(let s of r.checkedButtons)if(typeof s!="string")return!1}return!0},Me=e=>{const r=[];for(const s in e)e[s].forEach(n=>{var h,f;const a=(h=n.path)!=null&&h.startsWith("/")?(f=n.path)==null?void 0:f.substring(1):n.path,o=a==null?void 0:a.split("/");let c=r;o.forEach(p=>{let g=c.find(d=>d.title===p);g||(g={title:p,path:n.path,children:[]},c.push(g)),c=g.children})});return r},Ee=e=>{const r={};return e.forEach(s=>{const{path:t,checkedButtons:n}=s,a=t,o=n.map(c=>({title:c.split("/").pop()||"",path:c,parentPath:a}));r[a]=o}),r},ce=e=>{let r=[];for(const s of e){let t=[s.title];if(s.children&&Array.isArray(s.children)){let n=ce(s.children);n.length>0&&t.push(n)}r.push(t)}return r},Ne=e=>{const r=[];for(const s of e){if(!Array.isArray(s)||s.length!==2)continue;const[t,n]=s,a=oe(n),o=r.indexOf(t);o===-1?r.push(t,a):r[o+1]=le(r[o+1],a)}return r},oe=e=>{const r=[];for(const s of e)if(Array.isArray(s)){if(s.length===1&&typeof s[0]=="string")r.push(s[0]);else if(s.length===2&&typeof s[0]=="string"){const[t,n]=s;r.push(t,oe(n))}}return r},le=(e,r)=>{const s=[...e];let t=0;for(;t<r.length;){const n=r[t];if(typeof n=="string"){const a=s.indexOf(n);a===-1?s.push(n,r[t+1]):s[a+1]=le(s[a+1],r[t+1]),t+=2}else s.push(n),t+=1}return s},xe=async(e,r)=>{var s,t;if(k.value=u.cloneDeep(r),m.setRefreshCurStructure(!1),(s=B.value)==null||s.splice(0),e==="授权"){if(!S.value){i.ElMessage.error("请正确定义角色权限");return}const n=$e(k.value[S.value]);let a;if(n)a=k.value[S.value];else{const c=W(k.value[S.value]),h=E(c),f=q(h),p=L(f,"parentPath");a=_(p)}if(!a||!Array.isArray(a)){i.ElMessage.error("权限数据处理出错了,请联系管理员");return}b.title=`【${r.a0}】授权`,b.show=!0,await l.nextTick();const o=a==null?void 0:a.map(c=>c==null?void 0:c.path);(t=O.value)==null||t.setCheckedKeys(o),we(w.value,a)}},Fe=()=>{b.show=!1},R=l.ref(),Oe=async e=>{const r=await P(i.getInsofDataApi,{key:{systemKey:sessionStorage.getItem("systemKey"),type:"data",pageKey:e}},"查询"),s=r==null?void 0:r.map(t=>{var n;return{id:t.id,tableData:(n=t==null?void 0:t.value)==null?void 0:n.tableData}});return s==null?void 0:s.map(t=>{var n;if(Array.isArray(t==null?void 0:t.tableData)){let a={id:t.id};return(n=t==null?void 0:t.tableData)==null||n.forEach((o,c)=>{a[`a${c}`]=o}),a}else return{...t.tableData,id:t.id}})},U=(e,r)=>{let s={};return r==null||r.forEach((t,n)=>{t.label&&e&&(s[t.label]=(e==null?void 0:e[`a${n}`])??null)}),s},V=(e,r,s)=>{var a,o,c,h;const t=u.cloneDeep(e);t!=null&&t.id&&delete t.id;const n=U(t,te.value);r==="新增"?P(i.createInsofDataApi,{key:{type:"data",systemKey:sessionStorage.getItem("systemKey"),pageKey:(a=A.value)!=null&&a.startsWith("/")?(o=A.value)==null?void 0:o.substring(1):A.value,tableId:s},value:{tableData:n}},r).then(f=>{R.value={...e,newId:f}}):r==="编辑"?P(i.updateInsofDataApi,{id:e.id,key:{type:"data",systemKey:sessionStorage.getItem("systemKey"),pageKey:(c=A.value)!=null&&c.startsWith("/")?(h=A.value)==null?void 0:h.substring(1):A.value,tableId:s},value:{tableData:n}},r).then(f=>{b.show=!1}):r==="删除"&&P(i.deleteInsofDataApi,{id:e.id},r).then(f=>{r&&f&&i.ElMessage.success(r+"成功")}),m.setRefreshCurStructure(!0)},ue=e=>{let r=[];return e==null||e.forEach(s=>{var t;if(s.checkedButtons&&((t=s.checkedButtons)==null?void 0:t.length)>0){const n={path:s.path,checkedButtons:s.checkedButtons};r=r.concat(n)}s.children&&(r=r.concat(ue(s.children)))}),r},je=()=>{const e=ue(w.value),r=Ee(e),s=Me(r),t=ce(s),n=Ne(t);R.value={...k.value,[S.value]:n},l.nextTick(()=>{V(R.value,"编辑",N.value)})},b=l.reactive({show:!1,title:"角色授权",width:"50%",draggable:!0}),We=({isPenultimate:e},r)=>{var s,t;return console.log("isPenultimate",e,r),((t=(s=r==null?void 0:r.data)==null?void 0:s.renderButtons)==null?void 0:t.length)>0?"is-penultimate":""},N=l.ref(0),he=async e=>{var t,n,a,o,c;let r;const s=await i.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),type:"structure",pageKey:e!=null&&e.startsWith("/")?e==null?void 0:e.substring(1):e}});return((t=s==null?void 0:s.data)==null?void 0:t.code)===200&&(n=s==null?void 0:s.data)!=null&&n.result&&((a=s==null?void 0:s.data)==null?void 0:a.result.length)>0&&(r=(c=(o=s==null?void 0:s.data.result)==null?void 0:o[0])==null?void 0:c.id,N.value=r),r},w=l.ref([]),Le=l.ref([{path:"资源管理",buttons:["查询","新增","编辑","删除"]},{path:"资源管理/人员",buttons:["查询","新增","编辑","删除"]}]),qe=(e,r)=>{var s;e.checkedButtons=r?(s=e.renderButtons)==null?void 0:s.map(t=>t.path):[]},B=l.ref([]),_e=(e,r)=>{var s,t,n;r.checkedButtons=e,((s=r.checkedButtons)==null?void 0:s.length)===((t=r.renderButtons)==null?void 0:t.length)?B.value.push(r.path):(e==null?void 0:e.length)===0&&(B.value=(n=B.value)==null?void 0:n.filter(a=>a!==r.path))};l.watch(()=>B.value.length,()=>{var e;(e=O.value)==null||e.setCheckedKeys([...B.value])});l.watch(()=>b.show,e=>{e||(w.value=re(w.value))});const ie=l.computed(()=>{var s;const e=(s=u.cloneDeep(be.value))==null?void 0:s.filter(t=>{var n,a;return((a=(n=t==null?void 0:t.key)==null?void 0:n.pageKey)==null?void 0:a.toUpperCase())!=="MENU"});return e==null?void 0:e.map(t=>{var o,c,h,f,p,g,d,J;const n=/button/i;let a=(h=(c=(o=t==null?void 0:t.value)==null?void 0:o.pageData)==null?void 0:c.compData)==null?void 0:h.filter(C=>n.test(C==null?void 0:C.key));return a=Array.from(new Set(a==null?void 0:a.flatMap(C=>C.contents.map(ve=>ve.label)))),{path:(p=(f=t==null?void 0:t.key)==null?void 0:f.pageKey)!=null&&p.startsWith("/")?(d=(g=t==null?void 0:t.key)==null?void 0:g.pageKey)==null?void 0:d.substring(1):(J=t==null?void 0:t.key)==null?void 0:J.pageKey,buttons:a}})}),Ue=l.ref([]),Ve=e=>{const s=[e==null?void 0:e.find(t=>(t==null?void 0:t.title)==="平台管理")].flatMap(t=>t==null?void 0:t.children);return s==null?void 0:s.map(t=>{var n,a;return{path:(n=t==null?void 0:t.path)!=null&&n.startsWith("/")?(a=t==null?void 0:t.path)==null?void 0:a.substring(1):t.path,buttons:["新增","查看","编辑","删除"]}})},X=(e,r)=>{var s;if(e.carryData){if(e.path==="系统管理/个人中心"){const t=["基本信息","上传头像","签名","修改密码"];return t==null?void 0:t.map(n=>{var a,o;return{title:n,path:(a=e==null?void 0:e.path)!=null&&a.startsWith("/")?((o=e==null?void 0:e.path)==null?void 0:o.substring(1))+"/"+n:e.path+"/"+n}})}return(s=r==null?void 0:r.buttons)==null?void 0:s.map(t=>{var n,a;return{title:t,path:(n=e==null?void 0:e.path)!=null&&n.startsWith("/")?((a=e==null?void 0:e.path)==null?void 0:a.substring(1))+"/"+t:e.path+"/"+t}})}return[]},fe=(e,r)=>{if(Array.isArray(e))return e==null?void 0:e.map(s=>{var a,o;const t=(a=s==null?void 0:s.path)!=null&&a.startsWith("/")?(o=s==null?void 0:s.path)==null?void 0:o.substring(1):s==null?void 0:s.path,n=r==null?void 0:r.find(c=>(c==null?void 0:c.path)===t);return s.children&&s.children.length>0?{...s,renderButtons:X(s,n),checkedButtons:[],children:fe(s.children,ie.value)}:{...s,renderButtons:X(s,n),checkedButtons:[]}})},ze={comp:"Group",name:"/系统管理/角色管理",compData:[{key:"groupContents",contents:[{comp:"Table",compData:ee.value,name:""}]}]},Qe=Object.freeze(Object.defineProperty({__proto__:null,addButtonsToTree:fe,addPathToTree:E,authorizeDialog:b,buttonValue:Te,changedRow:R,clickRow:k,clickRowButton:xe,clickSubmitAuthority:je,closeAuthorizeDialog:Fe,compName:se,convertArrayToTree:W,convertIndexToLabel:U,customNodeClass:We,getActivePageStructureId:he,getAuthorityKey:ae,getFirstArrayProperty:j,getLeafNodesRecursive:q,getPageDataAsync:Oe,groupByField:L,handleAddSysMenusButtons:Ve,handleItemDataChange:Ke,handleNodeBtnChange:_e,handleNodeCheckChange:qe,handleQueryChange:De,handleRowAuthorityRender:_,handleSubmitAsync:P,isPageDataExist:Ce,menuData:w,menusButtons:Le,pageData:ee,pageDataFiltered:Pe,queryFormData:Be,structureButtons:ie,structureId:N,submitTableAsyncByVerify:V,tempRolePageData:ze,tempSysMenus:Ue,treeRef:O},Symbol.toStringTag,{value:"Module"})),ye=Y.useLoginState(u.pinia),{superAdminInfo:Ge,cryptoInfo:y}=u.storeToRefs(ye),Je=u.useMenuState(u.pinia),{activeMenuPath:v}=u.storeToRefs(Je),I="123456",He=F(u.pinia),{routerPageStructures:Xe}=u.storeToRefs(He),z=l.ref(0),Ye=l.ref([{label:"用户名称",value:"",name:"userName"}]),K=l.computed(()=>{const e=sessionStorage.getItem("isSuperAdmin");return e?JSON.parse(e):!1}),Ze=e=>{console.log("handleQueryChange",e)},Q=l.ref([]),pe=l.ref(""),$=l.computed(()=>{var r,s,t,n,a;const e=(r=Xe.value)==null?void 0:r.find(o=>{var c;return((c=o==null?void 0:o.comp)==null?void 0:c.toUpperCase())==="TABLE"});return e?(pe.value=e.name,Q.value=(n=(t=(s=e==null?void 0:e.compData)==null?void 0:s.find(c=>(c==null?void 0:c.key)==="header"))==null?void 0:t.contents)==null?void 0:n.filter(c=>(c==null?void 0:c.label)!=="操作"),(a=e==null?void 0:e.compData)==null?void 0:a.map(c=>{if((c==null?void 0:c.key)==="rowButton"){const h=[...c==null?void 0:c.contents,{label:"重置密码"}];return{...c,contents:h}}return c})):[]}),me=e=>{x(e.singleContent,e.buttonName,z.value)},M=l.ref(),et=e=>{console.log("onDoubleClick",e)},tt=(e,r)=>{e==="重置密码"&&de.ElMessageBox.confirm(`该操作将会重置【${r==null?void 0:r.account}】的密码,确认重置?`,"警告",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{M.value={...r,password:I},x(M.value,e,z.value)}).catch(()=>{i.ElMessage.info("取消重置")})},ge=()=>{G(v.value).then(e=>{var s;const r=Array.isArray(e)&&(e==null?void 0:e.filter(t=>(t==null?void 0:t.account)!==Ge.value.account));$.value=(s=$.value)==null?void 0:s.map(t=>t.key==="tableContents"?{...t,contents:r==null?void 0:r.map(n=>{var a;return{...n,password:D.decryptData(n==null?void 0:n.password,(a=y==null?void 0:y.value)==null?void 0:a.privateKey)}})}:t)})},T=async(e,r,s)=>{var t,n;try{const a=await e(r);return((t=a==null?void 0:a.data)==null?void 0:t.code)===200?(s!=="查询"&&await ye.setLogRecordAsync({type:s,data:r},v.value),a.data.result||((n=a==null?void 0:a.data)==null?void 0:n.code)===200):null}catch(a){i.ElMessage.error(a)}},x=(e,r,s)=>{var a,o,c,h,f,p;const t=u.cloneDeep(e);t!=null&&t.id&&delete t.id;const n=U(t,Q.value);D.isEncryptAvailable()&&n&&(!n.password&&K.value?n.password=D.encryptData(I,(a=y==null?void 0:y.value)==null?void 0:a.publicKey):n.password&&K.value&&(n.password=D.encryptData(n==null?void 0:n.password,(o=y==null?void 0:y.value)==null?void 0:o.publicKey))),r==="新增"?T(i.createInsofDataApi,{key:{type:"data",layer:n==null?void 0:n.layer,systemKey:sessionStorage.getItem("systemKey"),pageKey:(c=v.value)!=null&&c.startsWith("/")?(h=v.value)==null?void 0:h.substring(1):v.value,tableId:s},value:{tableData:n}},r).then(g=>{var d;M.value={...e,newId:g,password:K.value?D.decryptData((e==null?void 0:e.password)??I,(d=y==null?void 0:y.value)==null?void 0:d.privateKey):e==null?void 0:e.password}}):r==="编辑"||r==="重置密码"?T(i.updateInsofDataApi,{id:e.id,key:{type:"data",layer:n==null?void 0:n.layer,systemKey:sessionStorage.getItem("systemKey"),pageKey:(f=v.value)!=null&&f.startsWith("/")?(p=v.value)==null?void 0:p.substring(1):v.value,tableId:s},value:{tableData:n}},r).then(()=>{r==="重置密码"&&ge(),b.show=!1}):r==="删除"&&T(i.deleteInsofDataApi,{id:e.id},r).then(()=>{r&&i.ElMessage.success(r+"成功")})},G=async e=>{const r=await T(i.getInsofDataApi,{key:{systemKey:sessionStorage.getItem("systemKey"),type:"data",pageKey:e}},"查询"),s=r==null?void 0:r.map(t=>{var n,a;return{id:t.id,layer:(n=t.key)==null?void 0:n.layer,tableData:(a=t==null?void 0:t.value)==null?void 0:a.tableData}});return s==null?void 0:s.map(t=>{var n;if(!Array.isArray(t==null?void 0:t.tableData))return{...t.tableData,layer:(n=t.key)==null?void 0:n.layer,id:t.id}})},st={comp:"Group",name:"/系统管理/用户管理",compData:[{key:"groupContents",contents:[{comp:"Table",compData:$.value,name:""}]}]},rt=Object.freeze(Object.defineProperty({__proto__:null,changedRow:M,clickRowButton:tt,columns:Q,compName:pe,getPageDataAsync:G,handleItemDataChange:me,handleQueryChange:Ze,handleSubmitAsync:T,loginUserIsSuper:K,onDoubleClick:et,pageData:$,queryFormData:Ye,refreshUserTableData:ge,resetPassword:I,structureId:z,submitTableAsyncByVerify:x,tempUserPageData:st},Symbol.toStringTag,{value:"Module"}));exports.State=rt;exports.State$1=Qe;exports.addPathToTree=E;exports.convertArrayToTree=W;exports.getActivePageStructureId=he;exports.getFirstArrayProperty=j;exports.getLeafNodesRecursive=q;exports.getPageDataAsync=G;exports.groupByField=L;exports.handleRowAuthorityRender=_;exports.handleSubmitAsync=T;exports.resetPassword=I;exports.submitTableAsyncByVerify=x;exports.useAuthorityState=F;
@@ -1 +0,0 @@
1
- "use strict";const d=require("vue"),T=require("./menu-vml_xHJD.cjs"),pe=require("./index-Cdz4ZgAR.cjs"),fe=require("./index-B1XyxOHh.cjs"),y=require("./index-2p69g4HY.cjs"),ie=require("./login-CCz_BcJe.cjs"),E=T.useModelComp(T.pinia),m=pe.useUnit(T.pinia),I=T.useMenuState(T.pinia),{menus:ee,configMenu:x,activeMenuPath:_,cacheStructures:F}=T.storeToRefs(I),$=d.ref(!1),te=d.computed(()=>{var e,t;return[{key:"extraButton",contents:[]},{key:"rowButton",contents:[{label:"修改"}]},{key:"header",contents:[{label:"菜单名称",prop:"title",isFormColHidden:!1},{label:"菜单类型",prop:"menuType",formType:"select",options:[{label:"系统菜单",value:"集团"},{label:"公司",value:"公司"}],isTableColHidden:!1,isFormColHidden:!0},{label:"操作"}]},{key:"tableContents",contents:(t=(e=T.cloneDeep(ee.value))==null?void 0:e.map(l=>({...l,menuType:"系统菜单"})))==null?void 0:t.filter(l=>l.title!=="系统管理"&&l.title!=="平台管理")}]}),j=d.ref([]),q=d.ref([{label:"新建"}]),de=d.computed(()=>[{key:"extraButton",contents:q.value},{key:"rowButton",contents:[{label:"修改"},{label:"删除"}]},{key:"header",contents:[{label:"操作类型",prop:"operateType",formType:"select",options:[{label:"新增",value:"新增"},{label:"编辑",value:"编辑"},{label:"删除",value:"删除"}],value:""},{label:"操作图标",prop:"operateIcon",formType:"inputPopover",value:""},{label:"操作触发事件",prop:"trigger",formType:"select",options:[{label:"弹出弹窗",value:"openDialog"}],value:"openDialog"},{label:"配置一:",prop:"dialogConfig",formType:"button",value:"弹窗内容",isTableColHidden:!0},{label:"配置二:",prop:"contentConfig",formType:"button",value:"模块内容",isTableColHidden:!0},{label:"继承配置:",prop:"allowInherit",formType:"radio",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!1,isTableColHidden:!0},{label:"操作"}]},{key:"tableContents",contents:j.value}]),J=d.ref([]),k=d.ref({}),ge=d.ref({}),R=d.ref([{label:"菜单",prop:"path",isFormColHidden:!0,value:""},{label:"操作类型:",prop:"operateType",type:"select",contents:[{label:"新增",value:"新增"},{label:"编辑",value:"编辑"},{label:"删除",value:"删除"}],value:""},{label:"操作图标:",prop:"operateIcon",type:"inputPopover",value:""},{label:"操作触发事件:",prop:"trigger",type:"select",contents:[{label:"弹出弹窗",value:"openDialog"}],value:"openDialog"},{label:"生成的菜单图标:",prop:"menuIcon",type:"inputPopover",value:""},{label:"配置一:",prop:"dialogConfig",type:"button",value:"操作触发的弹窗结构"},{label:"配置二:",prop:"contentConfig",type:"button",value:"操作生成的模块结构",isFormColHidden:!1},{label:"",prop:"structureIds",type:"input",value:[],isFormColHidden:!0},{label:"继承配置:",prop:"allowInherit",type:"radio",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0}]),O=e=>{var t;J.value=e?(t=R.value)==null?void 0:t.map(l=>l.prop==="dialogConfig"||l.prop==="contentConfig"||l.prop==="trigger"?l:{...l,value:e?e[l==null?void 0:l.prop]:""}):R.value},ve=d.ref([{label:"查询"},{label:"重置"}]),ye=async()=>{},le=e=>e.map(t=>t.childMenus&&t.childMenus.length>0?{...t,value:t==null?void 0:t.title,label:t==null?void 0:t.title,children:le(t.childMenus)}:{...t,value:t==null?void 0:t.title,label:t==null?void 0:t.title}),g=d.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),U=d.ref([]),C=d.ref({}),h=d.ref(null),ae=d.ref([]),oe=d.computed(()=>{var e;return(e=le(ee.value))==null?void 0:e.filter(t=>t.title!=="系统管理"&&t.title!=="平台管理")}),ne=async e=>{var l,u,n,c;const t=await y.getInsofDataApi({key:{type:"subStructure",systemKey:sessionStorage.getItem("systemKey"),pageKey:e,version:1}});if(((l=t==null?void 0:t.data)==null?void 0:l.code)===200&&(u=t.data)!=null&&u.result){const r=(c=(n=t.data)==null?void 0:n.result)==null?void 0:c.map(p=>{var f;return{id:p==null?void 0:p.id,...(f=p==null?void 0:p.value)==null?void 0:f.pageData}});ae.value=r,I.setCacheStructures({key:"contentConfig",data:r})}},be=async e=>{var t;$.value=!0,h.value={...e,rootNode:ie.findRootNodeByPath(oe.value,e.path)},I.setCacheStructures(null),(e==null?void 0:e.level)===0?q.value.splice(0):(q.value=[{label:"新建"}],U.value=(t=e==null?void 0:e.path)==null?void 0:t.split("/")),await I.setConfigMenu(null),await ne(e==null?void 0:e.path),await K(e)},he=e=>{switch(e){case"新建":return"create";case"修改":return"update";case"删除":return"delete"}},Ce=async(e,t)=>{var l,u;if(!h.value)return y.ElMessage.warning("请先选择菜单");if(g.type=he(e),U.value=[],E.setSubmitCurStructure(!1),m.setSelectTitle([]),C.value=T.cloneDeep(t),g.type!=="delete"){switch(g.type){case"create":O(null),await I.setConfigMenu(null);break;case"update":O(C.value),await I.setConfigMenu(C.value),console.log("clickRowButton",C.value);break}await d.nextTick(),g.title=`【${g.type==="create"?(l=h.value)==null?void 0:l.path:(u=C.value)==null?void 0:u.path}】菜单配置${e}`,g.show=!0}else await re(C.value,g.type)},ue=d.ref(!0),Ie=async e=>{var t;k.value=e,await I.setConfigMenu({...k.value,path:(t=h.value)==null?void 0:t.path}),ue.value=(e==null?void 0:e.operateType)!=="新增"};d.watch(()=>ue.value,async e=>{var t;await d.nextTick(),J.value=(t=R.value)==null?void 0:t.map(l=>l.prop==="dialogConfig"||l.prop==="contentConfig"||l.prop==="trigger"?l.prop==="contentConfig"?{...l,isFormColHidden:e}:l:{...l,value:k.value?k.value[l==null?void 0:l.prop]:""})},{immediate:!0,deep:!0});const ke=d.ref(null),Te=async(e,t)=>{var r,p,f,s,b;if(g.type==="create"){const a=(p=(r=F.value)==null?void 0:r.filter(i=>(i==null?void 0:i.key)===t))==null?void 0:p.flatMap(i=>i==null?void 0:i.data);E.setItemData(a),I.setCacheStructures({key:t,data:a})}if(console.log("getTriggerStructures1",e==null?void 0:e.structureIds,t),!(e!=null&&e.structureIds)||((f=e==null?void 0:e.structureIds)==null?void 0:f.length)===0)return;const l=(b=(s=e==null?void 0:e.structureIds)==null?void 0:s.filter(a=>(a==null?void 0:a.key)===t))==null?void 0:b.map(a=>a==null?void 0:a.id);let u=l==null?void 0:l.map(a=>{if(a)return y.getInsofDataApi({id:a})});const n=await Promise.all(u),c=n==null?void 0:n.every(a=>{var i;return((i=a==null?void 0:a.data)==null?void 0:i.code)===200});if(console.log("getTriggerStructures2",e==null?void 0:e.structureIds,t,n),c&&(n==null?void 0:n.length)>0){const a=n==null?void 0:n.map(i=>{var M,D,N,P,A,o,B;return{id:(N=(D=(M=i==null?void 0:i.data)==null?void 0:M.result)==null?void 0:D[0])==null?void 0:N.id,...(B=(o=(A=(P=i==null?void 0:i.data)==null?void 0:P.result)==null?void 0:A[0])==null?void 0:o.value)==null?void 0:B.pageData}});E.setItemData(a),I.setCacheStructures({key:t,data:a})}},Me=async e=>{var n,c,r,p,f;const t=e==="操作触发的弹窗结构"?"dialogConfig":"contentConfig";I.setButtonTriggerType(t),await Te(C.value,t);let l;(n=k.value)!=null&&n.subMenus&&((c=k.value)==null?void 0:c.subMenus.length)>0&&(l=(r=U.value)==null?void 0:r.map(s=>({value:s})),l.unshift({value:(p=C.value)==null?void 0:p.title}));let u;g.type==="create"?u={...k.value,path:(f=h.value)==null?void 0:f.path}:g.type==="update"&&(u=x.value),await I.setConfigMenu(u),m.setSelectTitle(l),E.setIsEdit("edit")},K=async e=>{var l,u,n,c,r,p;const t=await y.getInsofDataApi({key:{type:"menuConfigData",systemKey:sessionStorage.getItem("systemKey"),pageKey:_.value+"/"+(e==null?void 0:e.path),tableId:""}});((l=t==null?void 0:t.data)==null?void 0:l.code)===200&&(u=t.data)!=null&&u.result&&(j.value=((c=(n=t.data)==null?void 0:n.result)==null?void 0:c.length)>0?(p=(r=t.data)==null?void 0:r.result)==null?void 0:p.map(f=>{var s;return{id:f==null?void 0:f.id,...(s=f==null?void 0:f.value)==null?void 0:s.tableData}}):[]),$.value=!1},H=async(e,t,l="contentConfig")=>{var u,n,c,r,p,f;try{let s,b;t==="create"?(s={key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:_.value+"/"+((u=h.value)==null?void 0:u.path),type:"structure",rootNodePath:(c=(n=h.value)==null?void 0:n.rootNode)==null?void 0:c.path,structureBelong:l,parentTable:"",version:1},value:{pageData:e}},b=y.createInsofDataApi):t==="update"?(s={id:e==null?void 0:e.id,value:{pageData:e}},b=y.updateInsofDataApi):t==="delete"&&(s={id:e},b=y.deleteInsofDataApi);const a=await b(s);if(((r=a==null?void 0:a.data)==null?void 0:r.code)!==200)throw y.ElMessage.error("保存响应失败"),new Error("保存响应失败");const i=t==="create"?(p=a==null?void 0:a.data)==null?void 0:p.result:e==null?void 0:e.id;return{status:((f=a==null?void 0:a.data)==null?void 0:f.code)===200,data:{id:i,key:l}}}catch{y.ElMessage.error("保存响应失败")}},Y=(e,t)=>{var f,s,b;const l=(f=e==null?void 0:e.flatMap(a=>a==null?void 0:a.data))==null?void 0:f.map(a=>a==null?void 0:a.id),u=t.filter(a=>!(l!=null&&l.includes(a))),n=l==null?void 0:l.filter(a=>!t.includes(a));let c=null,r=null,p=null;return c=[...u,...n].filter(a=>a),r=(s=e==null?void 0:e.flatMap(a=>a==null?void 0:a.data))==null?void 0:s.filter(a=>!(a!=null&&a.id)),p=(b=e==null?void 0:e.flatMap(a=>a==null?void 0:a.data))==null?void 0:b.filter(a=>a==null?void 0:a.id).filter(a=>Object.keys(a).length>1),{deleteIds:c,createComps:r,updateComps:p}},Z=(e,t)=>{var u,n,c,r,p,f;let l=[];return((u=t==null?void 0:t.deleteIds)==null?void 0:u.length)>0&&((n=t==null?void 0:t.deleteIds)==null||n.forEach(s=>{l.push(H(s,"delete",e))})),((c=t==null?void 0:t.createComps)==null?void 0:c.length)>0&&((r=t==null?void 0:t.createComps)==null||r.forEach(s=>{l.push(H(s,"create",e))})),((p=t==null?void 0:t.updateComps)==null?void 0:p.length)>0&&((f=t==null?void 0:t.updateComps)==null||f.forEach(s=>{s!=null&&s.id&&l.push(H(s,"update",e))})),l},De=e=>{const t=new Map;return e.forEach(l=>{t.set(l.id,l)}),Array.from(t.values())},Se=async(e,t)=>{var l,u,n,c,r,p,f;try{const s=e==null?void 0:e.filter(o=>(o==null?void 0:o.key)==="contentConfig"),b=e==null?void 0:e.filter(o=>(o==null?void 0:o.key)==="dialogConfig");await d.nextTick();const a=(n=(u=(l=F.value)==null?void 0:l.filter(o=>(o==null?void 0:o.key)==="dialogConfig"))==null?void 0:u.flatMap(o=>o==null?void 0:o.data))==null?void 0:n.map(o=>o==null?void 0:o.id);let i=(p=(r=(c=F.value)==null?void 0:c.filter(o=>(o==null?void 0:o.key)==="contentConfig"))==null?void 0:r.flatMap(o=>o==null?void 0:o.data))==null?void 0:p.map(o=>o==null?void 0:o.id);i=[...i,...(f=ae.value)==null?void 0:f.map(o=>o==null?void 0:o.id)];const M=Y(b,a),D=Y(s,i),N=Z("dialogConfig",M),P=Z("contentConfig",D),A=[...N,...P];await Promise.all(A).then(o=>{var z,G,L,V,Q,W,X;if(!(o==null?void 0:o.every(v=>v.status)))return;let w=(z=o==null?void 0:o.flatMap(v=>v==null?void 0:v.data))==null?void 0:z.filter(v=>(v==null?void 0:v.id)!==null&&(v==null?void 0:v.id)!==void 0);if(((G=M==null?void 0:M.updateComps)==null?void 0:G.length)===0&&g.type==="update"){const v=(V=(L=C.value)==null?void 0:L.structureIds)==null?void 0:V.filter(S=>(S==null?void 0:S.key)==="dialogConfig");w=[...w,...v]}if(((Q=D==null?void 0:D.updateComps)==null?void 0:Q.length)===0&&g.type==="update"){const v=(X=(W=C.value)==null?void 0:W.structureIds)==null?void 0:X.filter(S=>(S==null?void 0:S.key)==="contentConfig");w=[...w,...v]}const ce=De(w);re({...t,isNotInitial:!0,structureIds:ce},g.type)}).catch(o=>{y.ElMessage.error(o)})}catch(s){throw y.ElMessage.error(s),new Error(s)}},re=async(e,t)=>{var n,c;let l,u;t==="create"?(l={key:{type:"menuConfigData",systemKey:sessionStorage.getItem("systemKey"),pageKey:_.value+"/"+((n=h.value)==null?void 0:n.path),tableId:"",rootNodePath:e==null?void 0:e.rootNodePath},value:{tableData:e}},u=y.createInsofDataApi):t==="update"?(l={id:e==null?void 0:e.id,value:{tableData:e}},u=y.updateInsofDataApi):t==="delete"&&(l={ids:[e.id,...(c=e==null?void 0:e.structureIds)==null?void 0:c.map(r=>r.id)]},u=y.batchDeleteInsofDataApi),fe.handleSubmitAsync(u,l,t).then(r=>{t==="create"&&j.value.push({...e,id:r}),t&&r&&y.ElMessage.success("响应成功"),K(h.value)})},we=async()=>{var l,u,n,c,r;const e=JSON.parse(T.cloneDeep(JSON.stringify(F.value)));await d.nextTick();const t=g.type==="create"?{...x.value,rootNodePath:(u=(l=h.value)==null?void 0:l.rootNode)==null?void 0:u.path}:{...x.value,rootNodePath:(c=(n=h.value)==null?void 0:n.rootNode)==null?void 0:c.path,id:(r=C.value)==null?void 0:r.id};await Se(e,t),k.value={},g.show=!1,await K(h.value)},Ne=()=>{g.show=!1},se={comp:"Group",name:"/平台管理/菜单管理",compData:[{key:"groupContents",contents:[{comp:"Table",compData:te.value,name:""}]}]},Pe=Object.freeze(Object.defineProperty({__proto__:null,beforeDialogDestroy:Ne,buttonValue:ve,changeTrigger:Ie,changedRow:ge,clickNodeTrigger:be,clickRowButton:Ce,clickSubmitForm:we,clickTrigger:Me,dialogInfo:g,formatFormData:O,getInitialSubStructure:ne,getTableDataAsync:K,handleItemDataChange:ye,inputForm:k,menuPageData:de,operatingForm:ke,pageData:te,renderFormData:J,tableLoading:$,tempMenuPageData:se,treeData:oe},Symbol.toStringTag,{value:"Module"}));exports.State=Pe;exports.tempMenuPageData=se;