ss-component-new 1.1.415 → 1.1.417

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 (97) hide show
  1. package/dist/array-CP-DB-qS.cjs +7 -0
  2. package/dist/array-CU7_6w0r.js +346 -0
  3. package/dist/{index-BSAEf__V.js → index-4pgWhRVN.js} +5 -5
  4. package/dist/{index-DjhZHYH_.cjs → index-B3AJmz_C.cjs} +1 -1
  5. package/dist/index-B8GEl5H_.cjs +87 -0
  6. package/dist/{index-BPDslvev.js → index-B8O_p-_G.js} +2 -2
  7. package/dist/{index-Dm1_86kX.js → index-BF4CXK8w.js} +3 -3
  8. package/dist/index-BMFW7H3U.cjs +1 -0
  9. package/dist/{index-BJitBJZu.cjs → index-BVTdPibL.cjs} +2 -2
  10. package/dist/{index-faxMOO3y.js → index-Bcyk637L.js} +5 -5
  11. package/dist/{index-CNQtTLfb.cjs → index-BpsdG9J0.cjs} +1 -1
  12. package/dist/{index-eSv5uzFM.js → index-Bwr24NdY.js} +354 -359
  13. package/dist/{index-DuwxEG2Y.js → index-C3T7U42Q.js} +11 -11
  14. package/dist/index-CCEkCHrk.js +1112 -0
  15. package/dist/{index-DbuzlHfh.js → index-CChV4BPy.js} +10 -10
  16. package/dist/{index-8nzu3dKT.js → index-CDLCxYbO.js} +4 -4
  17. package/dist/{index-BHxsT1eb.cjs → index-CEPaQEEW.cjs} +1 -1
  18. package/dist/{index-AzrB9NlT.js → index-CFD-iDJS.js} +4 -4
  19. package/dist/{index-VOSN3Mnh.js → index-CHub3JaO.js} +5 -5
  20. package/dist/{index-CTTEAggF.cjs → index-CIE6JLs1.cjs} +1 -1
  21. package/dist/index-CJ4l3GaJ.cjs +1 -0
  22. package/dist/{index-BxHhG5PY.js → index-CLRc75f_.js} +8 -8
  23. package/dist/{index-DrCpGMdZ.js → index-CMM_ICmU.js} +3 -3
  24. package/dist/{index-DrUjNhjW.js → index-COlD7pxM.js} +1 -1
  25. package/dist/index-CPP5Pt28.js +731 -0
  26. package/dist/{index-DoIHM98M.js → index-CSsv4KqN.js} +1 -1
  27. package/dist/{index-3dpRV7yS.cjs → index-CTu1NToC.cjs} +1 -1
  28. package/dist/{index-CdLmmvxi.cjs → index-CVMCiTTv.cjs} +1 -1
  29. package/dist/{index-BA-Qtevs.cjs → index-CZbhV1ZJ.cjs} +1 -1
  30. package/dist/{index-CilqH8oC.cjs → index-CZh-SfBL.cjs} +1 -1
  31. package/dist/{index-BimZK7wy.cjs → index-CcaDRZTq.cjs} +1 -1
  32. package/dist/{index-CA9lI4P8.js → index-CeBT1Ulw.js} +4 -4
  33. package/dist/{index-BVuLbYm9.cjs → index-CeVsvY0k.cjs} +1 -1
  34. package/dist/{index-ZUmqWSaw.cjs → index-ChcZGPnx.cjs} +1 -1
  35. package/dist/{index-CffNkMWN.cjs → index-CwIH21hM.cjs} +1 -1
  36. package/dist/{index-Dxfzna5p.cjs → index-D-RyjmUO.cjs} +1 -1
  37. package/dist/{index-B6_X9xq9.js → index-D3z4AgL1.js} +4 -4
  38. package/dist/{index-BJIMXITA.js → index-D5V1e9cO.js} +5 -5
  39. package/dist/{index-9srnYnzT.js → index-D6iU6Te6.js} +9 -9
  40. package/dist/{index-BibIA5-P.cjs → index-D88jka5v.cjs} +1 -1
  41. package/dist/{index-DHhMROzm.cjs → index-DADBCqDR.cjs} +1 -1
  42. package/dist/{index-9QTlnrEQ.cjs → index-DFb2ZrvR.cjs} +1 -1
  43. package/dist/{index-DPm-3I4S.js → index-DKCxgFUW.js} +6 -6
  44. package/dist/{index-BszUQuvL.cjs → index-DLhT_R3Q.cjs} +1 -1
  45. package/dist/{index-WPbX9sqP.cjs → index-DX66EWCT.cjs} +1 -1
  46. package/dist/{index-DMp2zGXo.js → index-Dd4IqazP.js} +7 -7
  47. package/dist/{index-DBB_scdx.cjs → index-WFdingrw.cjs} +1 -1
  48. package/dist/{index-FBp-XX6h.js → index-dGIARC7m.js} +7051 -7021
  49. package/dist/{index-BOzZXj2f.js → index-lGikBSHE.js} +7 -7
  50. package/dist/{index-BJiXsb3E.cjs → index-mGKl9i0X.cjs} +1 -1
  51. package/dist/{index-Bhg9ISur.js → index-oMbmGcaB.js} +6 -6
  52. package/dist/{index-C8jmJvXd.cjs → index-pLa33V9a.cjs} +1 -1
  53. package/dist/{index-UYsrvpRs.js → index-qs1AQKGF.js} +4 -4
  54. package/dist/index-xzoZUttH.cjs +7 -0
  55. package/dist/{index.vue_vue_type_script_setup_true_lang-CKDefrVd.js → index.vue_vue_type_script_setup_true_lang-BEMlrqwP.js} +3 -3
  56. package/dist/{index.vue_vue_type_script_setup_true_lang-Dr6igsfU.cjs → index.vue_vue_type_script_setup_true_lang-Bk4PHjWn.cjs} +1 -1
  57. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CaGB6aRQ.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D5XW-lZk.js} +2 -2
  58. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-x_oCFRtr.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DNfIOSKK.cjs} +1 -1
  59. package/dist/index.vue_vue_type_style_index_0_scoped_7ee96c6e_lang-BJ24PgNH.cjs +1 -0
  60. package/dist/index.vue_vue_type_style_index_0_scoped_7ee96c6e_lang-DlAg03w9.js +1636 -0
  61. package/dist/index.vue_vue_type_style_index_0_scoped_ed9fe0f5_lang-CNkToObt.cjs +1 -0
  62. package/dist/{index.vue_vue_type_style_index_0_scoped_306ecd73_lang-CMsb25AU.js → index.vue_vue_type_style_index_0_scoped_ed9fe0f5_lang-DM39K5kZ.js} +90 -89
  63. package/dist/login-0tdy4gQs.js +75 -0
  64. package/dist/login-BEZ7u6zR.cjs +1 -0
  65. package/dist/{main-C7zpT64X.js → main-Cq1MaQxR.js} +6 -6
  66. package/dist/{main-NoOanZcQ.cjs → main-DWQfy0Jj.cjs} +1 -1
  67. package/dist/{menu-B-Z5KAh5.cjs → menu-CAtGS1Fx.cjs} +4 -4
  68. package/dist/{menu-D9x5_s9p.js → menu-D7VMU4Hp.js} +9 -6
  69. package/dist/menuIndex-BWim3TlH.js +33 -0
  70. package/dist/menuIndex-Cg6xI-jR.cjs +1 -0
  71. package/dist/ss-component.cjs +1 -1
  72. package/dist/ss-component.css +1 -1
  73. package/dist/ss-component.js +10 -10
  74. package/dist/ss-component3.cjs +1 -1
  75. package/dist/ss-component3.js +1 -1
  76. package/dist/{threeModel-BazaxATJ.js → threeModel-CLiNKACw.js} +5 -6
  77. package/dist/{threeModel-MVkoDB-c.cjs → threeModel-CiwhTLoC.cjs} +1 -1
  78. package/dist/{threeModel.vue_vue_type_style_index_0_scoped_28fc9fe5_lang-CBBWsMHp.cjs → threeModel.vue_vue_type_style_index_0_scoped_43c8b141_lang-CHtdDFOo.cjs} +1 -1
  79. package/dist/{threeModel.vue_vue_type_style_index_0_scoped_28fc9fe5_lang-CnQhvwfL.js → threeModel.vue_vue_type_style_index_0_scoped_43c8b141_lang-CwNweo5U.js} +2 -2
  80. package/package.json +1 -1
  81. package/dist/array-CYOvmzeK.js +0 -1310
  82. package/dist/array-DAoy3WS9.cjs +0 -7
  83. package/dist/index-Bvr0YvSP.cjs +0 -74
  84. package/dist/index-CyOcoFxe.cjs +0 -1
  85. package/dist/index-D68A4TXc.cjs +0 -1
  86. package/dist/index-DIv5glVC.js +0 -1567
  87. package/dist/index-Dnq8JVuW.cjs +0 -7
  88. package/dist/index-TEDdJfFz.js +0 -677
  89. package/dist/index.vue_vue_type_style_index_0_scoped_306ecd73_lang-B7CgbfdF.cjs +0 -1
  90. package/dist/index.vue_vue_type_style_index_0_scoped_7ee96c6e_lang-COxDD0Fj.cjs +0 -1
  91. package/dist/index.vue_vue_type_style_index_0_scoped_7ee96c6e_lang-DDi07ZiD.js +0 -1593
  92. package/dist/login-CARNmuDg.js +0 -103
  93. package/dist/login-DsWsywlE.cjs +0 -1
  94. package/dist/obj/model.mtl +0 -42
  95. package/dist/obj/model.obj +0 -26110
  96. package/public/obj/model.mtl +0 -42
  97. package/public/obj/model.obj +0 -26110
@@ -0,0 +1 @@
1
+ "use strict";const t=require("vue");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DNfIOSKK.cjs");const te=require("./index-BVTdPibL.cjs"),z=require("./menu-CAtGS1Fx.cjs"),ae=require("./index-pLa33V9a.cjs"),oe=require("vue-router"),re=require("./index-CTu1NToC.cjs"),le=require("./threeModel.vue_vue_type_style_index_0_scoped_43c8b141_lang-CHtdDFOo.cjs"),ue=require("./menuIndex-Cg6xI-jR.cjs"),se=require("./index-xzoZUttH.cjs"),y=t.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-pLa33V9a.cjs")).then(v=>v.index));y.install=v=>{v.component("ssMenu",y)};const q={__name:"index",props:{name:String},setup(v){const s=v,C=t.computed(()=>te.ElIcons[s.name]);return t.onMounted(()=>{}),(F,g)=>{const D=t.resolveComponent("el-icon");return t.openBlock(),t.createBlock(D,null,{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(C.value)))]),_:1})}}},R=[{name:"--vertical-menu-bg",value:"transparent"},{name:"--vertical-submenu-hover-bg",value:"#3356E8"},{name:"--vertical-submenu-open-bg",value:"#3356E8"},{name:"--vertical-submenu-open-inline-bg",value:"#F6F6F6"},{name:"--vertical-submenu-menuitem-color",value:"#051E37"},{name:"--vertical-submenu-menuitem-active-color",value:"#3356E8"},{name:"--vertical-submenu-color",value:"#051E37"},{name:"--vertical-submenu-active-color",value:"#ffffff"},{name:"--vertical-menuitem-hover-bg",value:"#3356E8"},{name:"--vertical-menuitem-active-bg",value:"#3356E8"},{name:"--vertical-menuitem-color",value:"#051E37"},{name:"--vertical-menuitem-active-color",value:"#ffffff"},{name:"--vertical-menuitem-fontSize",value:"1rem"},{name:"--vertical-menuitem-fontWeight",value:"400"},{name:"--vertical-menuitem-active-fontWeight",value:"600"},{name:"--vertical-menuitem-font",value:"SourceHanSansCN, SourceHanSansCN"},{name:"--vertical-menuitem-radius",value:"8px"},{name:"--vertical-menu-padding",value:"0.5rem"}],ie=[{name:"--horizontal-menu-bg",value:"#051E37"},{name:"--horizontal-submenu-hover-bg",value:"#3356E8"},{name:"--horizontal-submenu-open-bg",value:"#3356E8"},{name:"--horizontal-submenu-open-inline-bg",value:"#3356E8"},{name:"--horizontal-menuitem-hover-bg",value:"#3356E8"},{name:"--horizontal-menuitem-active-bg",value:"#3356E8"},{name:"--horizontal-menuitem-color",value:"#FFFFFF"},{name:"--horizontal-menuitem-active-color",value:"#FFFFFF"},{name:"--horizontal-menuitem-fontSize",value:"1.25rem"},{name:"--horizontal-menuitem-fontWeight",value:"400"},{name:"--horizontal-menuitem-active-fontWeight",value:"600"},{name:"--horizontal-menuitem-font",value:"SourceHanSansSC, SourceHanSansSC"}],W=[{name:"--vertical-menu-bg",value:"transparent"},{name:"--vertical-submenu-hover-bg",value:"#72B02D"},{name:"--vertical-submenu-active-color",value:"#323333"},{name:"--vertical-submenu-open-bg",value:"#72B02D"},{name:"--vertical-submenu-open-inline-bg",value:"#F6F6F6"},{name:"--vertical-submenu-color",value:"#323333"},{name:"--vertical-submenu-menuitem-color",value:"#323333"},{name:"--vertical-submenu-menuitem-active-color",value:"#72B02D"},{name:"--vertical-menuitem-hover-bg",value:"#72B02D"},{name:"--vertical-menuitem-active-bg",value:"#72B02D"},{name:"--vertical-menuitem-color",value:"#323333"},{name:"--vertical-menuitem-active-color",value:"#323333"},{name:"--vertical-menuitem-fontSize",value:"1rem"},{name:"--vertical-menuitem-fontWeight",value:"400"},{name:"--vertical-menuitem-active-fontWeight",value:"600"},{name:"--vertical-menuitem-font",value:"SourceHanSansSC, SourceHanSansSC"},{name:"--vertical-menuitem-radius",value:"8px"},{name:"--vertical-menu-padding",value:"0"}],N=[{name:"--horizontal-menu-bg",value:"#323333"},{name:"--horizontal-submenu-hover-bg",value:"#FFFFFF"},{name:"--horizontal-submenu-open-bg",value:"#72B02D"},{name:"--horizontal-submenu-open-inline-bg",value:"#1C4275"},{name:"--horizontal-menuitem-hover-bg",value:"#72B02D"},{name:"--horizontal-menuitem-active-bg",value:"#72B02D"},{name:"--horizontal-menuitem-color",value:"#FFFFFF"},{name:"--horizontal-menuitem-active-color",value:"#323333"},{name:"--horizontal-menuitem-fontSize",value:"1.25rem"},{name:"--horizontal-menuitem-fontWeight",value:"400"},{name:"--horizontal-menuitem-active-fontWeight",value:"600"},{name:"--horizontal-menuitem-font",value:"SourceHanSansSC, SourceHanSansSC"}],ce=[{name:"--ssbutton-theme-color",value:"#FFFFFF"},{name:"--ssbutton-theme-bg",value:"#3356E8"},{name:"--ssbutton-special-bg",value:"rgba(255,255,255,0.2)"},{name:"--ssgroup-background",value:"linear-gradient(to right, #D6DDFA, #ffffff)"},{name:"--ssComponent-theme-color",value:"#3356E8"},{name:"--ssComponent-theme-watermark",value:"url('/public/icons/img/watermark-blue.png')"}],me=[{name:"--ssbutton-theme-color",value:"#323333"},{name:"--ssbutton-theme-bg",value:"#72B02D"},{name:"--ssbutton-special-bg",value:"rgba(255, 255, 255, 0.2)"},{name:"--ssgroup-background",value:"linear-gradient(to right, #ddf6e0, #ffffff)"},{name:"--ssComponent-theme-color",value:"#72B02D"},{name:"--ssComponent-theme-watermark",value:"url('/public/icons/img/watermark.png')"}],ve=t.defineComponent({name:"menu",components:{ssMenu:y,DynamicIcon:q,ssDialog:ae.ssDialog},setup(){const v=t.defineProps({mode:{type:String,default:"vertical"}}),s=z.useMenuState(),C=le.useModelComp(z.pinia),F=t.ref(0),g=oe.useRouter(),{asideMenus:D,menuTriggerType:O,platform:V}=z.storeToRefs(s),U=t.computed(()=>v==null?void 0:v.mode),_=t.computed(()=>{let e=[...D.value];if((e==null?void 0:e.length)===0)return g.push("/"),[];const n=G(e,$.value);return n.isFlag||(e=n==null?void 0:n.data),e}),J=async e=>{C.setRouteToChildPath(""),s.setMenuTriggerType("click"),s.setActiveMenuPath(e==null?void 0:e.path),console.log("当前菜单的结构clickMenu",e),s.setActiveAsideMenu(e),e.isRouter?g.push(e.path):g.push("/")},K=async e=>{s.setActiveMenuPath(e);const n=ue.findNodeByPropInTree(_.value,"path",e);s.setActiveAsideMenu(n),C.setRouteToChildPath(""),O.value==="click"?F.value===1?s.setActiveMenuPath(sessionStorage.getItem("pageKey")):s.setActiveMenuPath(e):s.setMenuTriggerType("click"),e!=null&&e.startsWith("/")?g.push(e):g.push("/"),F.value++},L=e=>{s.setActiveMenuPath(e)},M=e=>{const n=document.documentElement;e==null||e.forEach(l=>{n.style.setProperty(l.name,l.value)})};t.onMounted(()=>{F.value=1});const $=t.computed(()=>{const e=sessionStorage.getItem("authority");return e?JSON.parse(e):[]});t.watch(()=>V.value,e=>{e==="browser"?M(R):e==="client"&&(M(N),M(W))},{immediate:!0});const j=(e,n)=>{function l(u){u==null||u.forEach(i=>{i.show=n==null?void 0:n.some(a=>a==null?void 0:a.includes(i.path)),i.children&&l(i.children)})}return l(e),e},G=(e,n)=>{if(Array.isArray(n)){const l=Array.from(new Set(n==null?void 0:n.map(u=>u.substring(0,u.lastIndexOf("/")))));return{data:j(e,l),isFlag:!1}}else return{isFlag:(n==null?void 0:n.toUpperCase())==="SUPERADMIN"}},c=t.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),Q=e=>re.getComponent(e),X=t.ref({}),k=t.ref([]),Y=async(e,n,l)=>{var T,B,x;if(((T=e==null?void 0:e.structureIds)==null?void 0:T.length)===0)return;const u=(x=(B=e==null?void 0:e.structureIds)==null?void 0:B.filter(o=>(o==null?void 0:o.key)==="dialogConfig"))==null?void 0:x.map(o=>o==null?void 0:o.id);let i=u==null?void 0:u.map(o=>z.getInsofDataApi({id:o}));const a=await Promise.all(i);if(a==null?void 0:a.every(o=>{var r;return((r=o==null?void 0:o.data)==null?void 0:r.code)===200})){const o=a==null?void 0:a.map(r=>{var f,b,m,d,S,P,H;return{id:(m=(b=(f=r==null?void 0:r.data)==null?void 0:f.result)==null?void 0:b[0])==null?void 0:m.id,...(H=(P=(S=(d=r==null?void 0:r.data)==null?void 0:d.result)==null?void 0:S[0])==null?void 0:P.value)==null?void 0:H.pageData}});console.log("getMenuDialogStructureAsync",a),n==="create"&&(k.value=o),n==="update"&&(k.value=o==null?void 0:o.map(r=>{var f,b;return((f=r==null?void 0:r.comp)==null?void 0:f.toUpperCase())==="FORM"?{...r,compData:(b=r==null?void 0:r.compData)==null?void 0:b.map(m=>{var d;return(m==null?void 0:m.key)==="formContent"?{...m,contents:(d=m==null?void 0:m.contents)==null?void 0:d.map(S=>({...S,value:l==null?void 0:l.title}))}:m})}:r}))}},h=t.ref({}),p=t.ref({}),Z=e=>{switch(e){case"新增":return"create";case"编辑":return"update";case"删除":return"delete"}},E=t.ref({}),A=e=>{s.setIsRefreshMenus(!0),s.setCacheInputMenu({type:c.type,data:e})},I=async(e,n)=>{c.type=Z(n==null?void 0:n.operateType),await Y(n,c.type,e),s.setIsRefreshMenus(!1),p.value=e,E.value=n,(n==null?void 0:n.operateType)!=="删除"?(c.show=(n==null?void 0:n.trigger)==="openDialog",c.title=(n==null?void 0:n.operateType)+"菜单"):se.ElMessageBox.confirm(`是否确认要删除【${e==null?void 0:e.title}】`,"",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{A(e)}),console.log("clickMenuIcon",e,n,c)},ee=()=>{c.show=!1},ne=e=>e==null?void 0:e.filter(n=>n.allowInherit);return{handleCompChange:e=>{var l,u;const n=(l=e==null?void 0:e.contents)==null?void 0:l.find(i=>i.key==="formContent");n&&(h.value=(u=n==null?void 0:n.contents)==null?void 0:u.reduce((i,a)=>(i[a.key]=a.value,i.prop=a.key,i),{}))},dialogForm:X,dialogRenderComps:k,getComponents:Q,clickSubmitForm:()=>{var l,u,i,a,w;let e;c.type==="create"&&(e=((l=p.value)==null?void 0:l.path)+"/"+h.value[(u=h.value)==null?void 0:u.prop]),c.type==="update"&&(e=(i=p.value)==null?void 0:i.path);const n={...p.value,config:ne((a=p.value)==null?void 0:a.config),children:[],childMenus:[],title:h.value[(w=h.value)==null?void 0:w.prop],path:e};console.log("clickSubmitForm",E.value,p.value,n),A(n),c.show=!1},dialogInfo:c,beforeDialogDestroy:ee,clickMenuIcon:I,mode:U,renderMenuList:_,clickMenu:J,openMenu:K,closeMenu:L,changeMenuStyle:M}}});exports._sfc_main=ve;exports._sfc_main$1=q;exports.browserHorizontalMenuClasses=ie;exports.browserThemeConfig=ce;exports.browserVerticalMenuClasses=R;exports.clientHorizontalMenuClasses=N;exports.clientThemeConfig=me;exports.clientVerticalMenuClasses=W;exports.ssMenu=y;
@@ -1,15 +1,16 @@
1
- import { defineAsyncComponent as te, computed as z, onMounted as O, resolveComponent as ae, createBlock as W, openBlock as N, withCtx as oe, resolveDynamicComponent as le, defineComponent as re, defineProps as ue, ref as g, watch as se, reactive as ie } from "vue";
2
- import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CaGB6aRQ.js";
3
- import { E as me } from "./index-DbuzlHfh.js";
4
- import { u as ce, p as ve, s as pe, g as ge } from "./menu-D9x5_s9p.js";
5
- import { s as he } from "./index-UYsrvpRs.js";
6
- import { useRouter as fe } from "vue-router";
7
- import { g as be } from "./index-DMp2zGXo.js";
8
- import { u as de } from "./threeModel.vue_vue_type_style_index_0_scoped_28fc9fe5_lang-CnQhvwfL.js";
9
- import { E as Fe } from "./index-eSv5uzFM.js";
10
- const k = te(() => import("./index-UYsrvpRs.js").then((c) => c.i));
11
- k.install = (c) => {
12
- c.component("ssMenu", k);
1
+ import { defineAsyncComponent as ne, computed as z, onMounted as N, resolveComponent as te, createBlock as R, openBlock as W, withCtx as ae, resolveDynamicComponent as oe, defineComponent as le, defineProps as re, ref as g, watch as ue, reactive as se } from "vue";
2
+ import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D5XW-lZk.js";
3
+ import { E as ie } from "./index-CChV4BPy.js";
4
+ import { u as me, p as ce, s as ve, g as pe } from "./menu-D7VMU4Hp.js";
5
+ import { s as ge } from "./index-qs1AQKGF.js";
6
+ import { useRouter as he } from "vue-router";
7
+ import { g as fe } from "./index-Dd4IqazP.js";
8
+ import { u as be } from "./threeModel.vue_vue_type_style_index_0_scoped_43c8b141_lang-CwNweo5U.js";
9
+ import { f as de } from "./menuIndex-BWim3TlH.js";
10
+ import { E as Fe } from "./index-Bwr24NdY.js";
11
+ const E = ne(() => import("./index-qs1AQKGF.js").then((c) => c.i));
12
+ E.install = (c) => {
13
+ c.component("ssMenu", E);
13
14
  };
14
15
  const Ce = {
15
16
  __name: "index",
@@ -17,13 +18,13 @@ const Ce = {
17
18
  name: String
18
19
  },
19
20
  setup(c) {
20
- const u = c, F = z(() => me[u.name]);
21
- return O(() => {
21
+ const u = c, F = z(() => ie[u.name]);
22
+ return N(() => {
22
23
  }), (C, v) => {
23
- const y = ae("el-icon");
24
- return N(), W(y, null, {
25
- default: oe(() => [
26
- (N(), W(le(F.value)))
24
+ const y = te("el-icon");
25
+ return W(), R(y, null, {
26
+ default: ae(() => [
27
+ (W(), R(oe(F.value)))
27
28
  ]),
28
29
  _: 1
29
30
  });
@@ -102,7 +103,7 @@ const Ce = {
102
103
  name: "--vertical-menu-padding",
103
104
  value: "0.5rem"
104
105
  }
105
- ], He = [
106
+ ], Re = [
106
107
  {
107
108
  name: "--horizontal-menu-bg",
108
109
  value: "#051E37"
@@ -273,7 +274,7 @@ const Ce = {
273
274
  name: "--horizontal-menuitem-font",
274
275
  value: "SourceHanSansSC, SourceHanSansSC"
275
276
  }
276
- ], Re = [
277
+ ], We = [
277
278
  {
278
279
  name: "--ssbutton-theme-color",
279
280
  value: "#FFFFFF"
@@ -298,7 +299,7 @@ const Ce = {
298
299
  name: "--ssComponent-theme-watermark",
299
300
  value: "url('/public/icons/img/watermark-blue.png')"
300
301
  }
301
- ], We = [
302
+ ], Ne = [
302
303
  {
303
304
  name: "--ssbutton-theme-color",
304
305
  value: "#323333"
@@ -323,107 +324,107 @@ const Ce = {
323
324
  name: "--ssComponent-theme-watermark",
324
325
  value: "url('/public/icons/img/watermark.png')"
325
326
  }
326
- ], Ne = re({
327
+ ], Oe = le({
327
328
  name: "menu",
328
329
  components: {
329
- ssMenu: k,
330
+ ssMenu: E,
330
331
  DynamicIcon: Ce,
331
- ssDialog: he
332
+ ssDialog: ge
332
333
  },
333
334
  setup() {
334
- const c = ue({
335
+ const c = re({
335
336
  mode: {
336
337
  type: String,
337
338
  default: "vertical"
338
339
  }
339
- }), u = ce(), F = de(ve), C = g(0), v = fe(), { asideMenus: y, menuTriggerType: U, platform: V } = pe(u), $ = z(() => c == null ? void 0 : c.mode), w = z(() => {
340
+ }), u = me(), F = be(ce), C = g(0), v = he(), { asideMenus: y, menuTriggerType: O, platform: U } = ve(u), V = z(() => c == null ? void 0 : c.mode), w = z(() => {
340
341
  let e = [...y.value];
341
342
  if ((e == null ? void 0 : e.length) === 0)
342
343
  return v.push("/"), [];
343
- const n = G(e, j.value);
344
+ const n = q(e, L.value);
344
345
  return n.isFlag || (e = n == null ? void 0 : n.data), e;
345
- }), J = async (e) => {
346
- F.setRouteToChildPath(""), u.setMenuTriggerType("click"), u.setActiveMenuPath(e == null ? void 0 : e.path), u.setActiveAsideMenu(e), e.isRouter ? v.push(e.path) : v.push("/");
347
- }, K = async (e) => {
346
+ }), $ = async (e) => {
347
+ F.setRouteToChildPath(""), u.setMenuTriggerType("click"), u.setActiveMenuPath(e == null ? void 0 : e.path), console.log("当前菜单的结构clickMenu", e), u.setActiveAsideMenu(e), e.isRouter ? v.push(e.path) : v.push("/");
348
+ }, J = async (e) => {
348
349
  u.setActiveMenuPath(e);
349
- const n = findNodeByPropInTree(w.value, "path", e);
350
- u.setActiveAsideMenu(n), F.setRouteToChildPath(""), U.value === "click" ? C.value === 1 ? u.setActiveMenuPath(sessionStorage.getItem("pageKey")) : u.setActiveMenuPath(e) : u.setMenuTriggerType("click"), e != null && e.startsWith("/") ? v.push(e) : v.push("/"), C.value++;
351
- }, L = (e) => {
350
+ const n = de(w.value, "path", e);
351
+ u.setActiveAsideMenu(n), F.setRouteToChildPath(""), O.value === "click" ? C.value === 1 ? u.setActiveMenuPath(sessionStorage.getItem("pageKey")) : u.setActiveMenuPath(e) : u.setMenuTriggerType("click"), e != null && e.startsWith("/") ? v.push(e) : v.push("/"), C.value++;
352
+ }, K = (e) => {
352
353
  u.setActiveMenuPath(e);
353
354
  }, M = (e) => {
354
355
  const n = document.documentElement;
355
- e == null || e.forEach((o) => {
356
- n.style.setProperty(o.name, o.value);
356
+ e == null || e.forEach((l) => {
357
+ n.style.setProperty(l.name, l.value);
357
358
  });
358
359
  };
359
- O(() => {
360
+ N(() => {
360
361
  C.value = 1;
361
362
  });
362
- const j = z(() => {
363
+ const L = z(() => {
363
364
  const e = sessionStorage.getItem("authority");
364
365
  return e ? JSON.parse(e) : [];
365
366
  });
366
- se(() => V.value, (e) => {
367
+ ue(() => U.value, (e) => {
367
368
  e === "browser" ? M(Me) : e === "client" && (M(ze), M(Se));
368
369
  }, { immediate: !0 });
369
- const q = (e, n) => {
370
- function o(r) {
370
+ const j = (e, n) => {
371
+ function l(r) {
371
372
  r == null || r.forEach((s) => {
372
- s.show = n == null ? void 0 : n.some((l) => l == null ? void 0 : l.includes(s.path)), s.children && o(s.children);
373
+ s.show = n == null ? void 0 : n.some((t) => t == null ? void 0 : t.includes(s.path)), s.children && l(s.children);
373
374
  });
374
375
  }
375
- return o(e), e;
376
- }, G = (e, n) => {
376
+ return l(e), e;
377
+ }, q = (e, n) => {
377
378
  if (Array.isArray(n)) {
378
- const o = Array.from(new Set(n == null ? void 0 : n.map((r) => r.substring(0, r.lastIndexOf("/")))));
379
+ const l = Array.from(new Set(n == null ? void 0 : n.map((r) => r.substring(0, r.lastIndexOf("/")))));
379
380
  return {
380
- data: q(e, o),
381
+ data: j(e, l),
381
382
  isFlag: !1
382
383
  };
383
384
  } else
384
385
  return {
385
386
  isFlag: (n == null ? void 0 : n.toUpperCase()) === "SUPERADMIN"
386
387
  };
387
- }, i = ie({
388
+ }, i = se({
388
389
  show: !1,
389
390
  title: "菜单配置",
390
391
  width: "30%",
391
392
  type: "create"
392
- }), Q = (e) => be(e), X = g({}), D = g([]), Y = async (e, n, o) => {
393
+ }), G = (e) => fe(e), Q = g({}), D = g([]), X = async (e, n, l) => {
393
394
  var B, _, P;
394
395
  if (((B = e == null ? void 0 : e.structureIds) == null ? void 0 : B.length) === 0) return;
395
- const r = (P = (_ = e == null ? void 0 : e.structureIds) == null ? void 0 : _.filter((t) => (t == null ? void 0 : t.key) === "dialogConfig")) == null ? void 0 : P.map((t) => t == null ? void 0 : t.id);
396
- let s = r == null ? void 0 : r.map((t) => ge({ id: t }));
397
- const l = await Promise.all(s);
398
- if (l == null ? void 0 : l.every((t) => {
399
- var a;
400
- return ((a = t == null ? void 0 : t.data) == null ? void 0 : a.code) === 200;
396
+ const r = (P = (_ = e == null ? void 0 : e.structureIds) == null ? void 0 : _.filter((a) => (a == null ? void 0 : a.key) === "dialogConfig")) == null ? void 0 : P.map((a) => a == null ? void 0 : a.id);
397
+ let s = r == null ? void 0 : r.map((a) => pe({ id: a }));
398
+ const t = await Promise.all(s);
399
+ if (t == null ? void 0 : t.every((a) => {
400
+ var o;
401
+ return ((o = a == null ? void 0 : a.data) == null ? void 0 : o.code) === 200;
401
402
  })) {
402
- const t = l == null ? void 0 : l.map((a) => {
403
- var f, b, m, d, S, x, H, R;
403
+ const a = t == null ? void 0 : t.map((o) => {
404
+ var f, b, m, d, S, x, H;
404
405
  return {
405
- id: (m = (b = (f = a == null ? void 0 : a.data) == null ? void 0 : f.result) == null ? void 0 : b[0]) == null ? void 0 : m.id,
406
- ...(R = (H = (x = (S = (d = a == null ? void 0 : a.data) == null ? void 0 : d.result) == null ? void 0 : S[0]) == null ? void 0 : x.value) == null ? void 0 : H.pageData) == null ? void 0 : R.structure
406
+ id: (m = (b = (f = o == null ? void 0 : o.data) == null ? void 0 : f.result) == null ? void 0 : b[0]) == null ? void 0 : m.id,
407
+ ...(H = (x = (S = (d = o == null ? void 0 : o.data) == null ? void 0 : d.result) == null ? void 0 : S[0]) == null ? void 0 : x.value) == null ? void 0 : H.pageData
407
408
  };
408
409
  });
409
- n === "create" && (D.value = t), n === "update" && (D.value = t == null ? void 0 : t.map((a) => {
410
+ console.log("getMenuDialogStructureAsync", t), n === "create" && (D.value = a), n === "update" && (D.value = a == null ? void 0 : a.map((o) => {
410
411
  var f, b;
411
- return ((f = a == null ? void 0 : a.comp) == null ? void 0 : f.toUpperCase()) === "FORM" ? {
412
- ...a,
413
- compData: (b = a == null ? void 0 : a.compData) == null ? void 0 : b.map((m) => {
412
+ return ((f = o == null ? void 0 : o.comp) == null ? void 0 : f.toUpperCase()) === "FORM" ? {
413
+ ...o,
414
+ compData: (b = o == null ? void 0 : o.compData) == null ? void 0 : b.map((m) => {
414
415
  var d;
415
416
  return (m == null ? void 0 : m.key) === "formContent" ? {
416
417
  ...m,
417
418
  contents: (d = m == null ? void 0 : m.contents) == null ? void 0 : d.map((S) => ({
418
419
  ...S,
419
- value: o == null ? void 0 : o.title
420
+ value: l == null ? void 0 : l.title
420
421
  }))
421
422
  } : m;
422
423
  })
423
- } : a;
424
+ } : o;
424
425
  }));
425
426
  }
426
- }, h = g({}), p = g({}), Z = (e) => {
427
+ }, h = g({}), p = g({}), Y = (e) => {
427
428
  switch (e) {
428
429
  case "新增":
429
430
  return "create";
@@ -437,61 +438,61 @@ const Ce = {
437
438
  type: i.type,
438
439
  data: e
439
440
  });
440
- }, I = async (e, n) => {
441
- i.type = Z(n == null ? void 0 : n.operateType), await Y(n, i.type, e), u.setIsRefreshMenus(!1), p.value = e, A.value = n, (n == null ? void 0 : n.operateType) !== "删除" ? (i.show = (n == null ? void 0 : n.trigger) === "openDialog", i.title = (n == null ? void 0 : n.operateType) + "菜单") : Fe.confirm(`是否确认要删除【${e == null ? void 0 : e.title}】`, "", {
441
+ }, Z = async (e, n) => {
442
+ i.type = Y(n == null ? void 0 : n.operateType), await X(n, i.type, e), u.setIsRefreshMenus(!1), p.value = e, A.value = n, (n == null ? void 0 : n.operateType) !== "删除" ? (i.show = (n == null ? void 0 : n.trigger) === "openDialog", i.title = (n == null ? void 0 : n.operateType) + "菜单") : Fe.confirm(`是否确认要删除【${e == null ? void 0 : e.title}】`, "", {
442
443
  confirmButtonText: "确认",
443
444
  cancelButtonText: "取消",
444
445
  type: "warning"
445
446
  }).then(() => {
446
447
  T(e);
447
448
  }), console.log("clickMenuIcon", e, n, i);
448
- }, ee = () => {
449
+ }, I = () => {
449
450
  i.show = !1;
450
- }, ne = (e) => e == null ? void 0 : e.filter((n) => n.allowInherit);
451
+ }, ee = (e) => e == null ? void 0 : e.filter((n) => n.allowInherit);
451
452
  return {
452
453
  handleCompChange: (e) => {
453
- var o, r;
454
- const n = (o = e == null ? void 0 : e.contents) == null ? void 0 : o.find((s) => s.key === "formContent");
455
- n && (h.value = (r = n == null ? void 0 : n.contents) == null ? void 0 : r.reduce((s, l) => (s[l.key] = l.value, s.prop = l.key, s), {}));
454
+ var l, r;
455
+ const n = (l = e == null ? void 0 : e.contents) == null ? void 0 : l.find((s) => s.key === "formContent");
456
+ n && (h.value = (r = n == null ? void 0 : n.contents) == null ? void 0 : r.reduce((s, t) => (s[t.key] = t.value, s.prop = t.key, s), {}));
456
457
  },
457
- dialogForm: X,
458
+ dialogForm: Q,
458
459
  dialogRenderComps: D,
459
- getComponents: Q,
460
+ getComponents: G,
460
461
  clickSubmitForm: () => {
461
- var o, r, s, l, E;
462
+ var l, r, s, t, k;
462
463
  let e;
463
- i.type === "create" && (e = ((o = p.value) == null ? void 0 : o.path) + "/" + h.value[(r = h.value) == null ? void 0 : r.prop]), i.type === "update" && (e = (s = p.value) == null ? void 0 : s.path);
464
+ i.type === "create" && (e = ((l = p.value) == null ? void 0 : l.path) + "/" + h.value[(r = h.value) == null ? void 0 : r.prop]), i.type === "update" && (e = (s = p.value) == null ? void 0 : s.path);
464
465
  const n = {
465
466
  ...p.value,
466
467
  //是否继承父菜单的配置
467
- config: ne((l = p.value) == null ? void 0 : l.config),
468
+ config: ee((t = p.value) == null ? void 0 : t.config),
468
469
  children: [],
469
470
  childMenus: [],
470
- title: h.value[(E = h.value) == null ? void 0 : E.prop],
471
+ title: h.value[(k = h.value) == null ? void 0 : k.prop],
471
472
  path: e
472
473
  };
473
- console.log("clickSubmitForm", A.value, p.value), T(n), i.show = !1;
474
+ console.log("clickSubmitForm", A.value, p.value, n), T(n), i.show = !1;
474
475
  },
475
476
  dialogInfo: i,
476
- beforeDialogDestroy: ee,
477
- clickMenuIcon: I,
478
- mode: $,
477
+ beforeDialogDestroy: I,
478
+ clickMenuIcon: Z,
479
+ mode: V,
479
480
  renderMenuList: w,
480
- clickMenu: J,
481
- openMenu: K,
482
- closeMenu: L,
481
+ clickMenu: $,
482
+ openMenu: J,
483
+ closeMenu: K,
483
484
  changeMenuStyle: M
484
485
  };
485
486
  }
486
487
  });
487
488
  export {
488
- Ne as _,
489
+ Oe as _,
489
490
  Ce as a,
490
- Re as b,
491
- We as c,
491
+ We as b,
492
+ Ne as c,
492
493
  Me as d,
493
- He as e,
494
+ Re as e,
494
495
  ze as f,
495
496
  Se as g,
496
- k as s
497
+ E as s
497
498
  };
@@ -0,0 +1,75 @@
1
+ import { f as m, s as d, c as I, E as K, g as S, u as h, p as A } from "./menu-D7VMU4Hp.js";
2
+ import { f as v, g as D } from "./menuIndex-BWim3TlH.js";
3
+ const b = h(A), { menus: E } = d(b), M = m("loginState", {
4
+ state: () => ({
5
+ superAdminInfo: {},
6
+ cryptoInfo: {
7
+ publicKey: "",
8
+ privateKey: ""
9
+ },
10
+ loginUserInfo: {},
11
+ structureData: [],
12
+ isStructureExist: !1
13
+ }),
14
+ actions: {
15
+ setSuperAdminInfo(e) {
16
+ this.superAdminInfo = e;
17
+ },
18
+ setLoginUserInfo(e) {
19
+ this.loginUserInfo = e;
20
+ },
21
+ setStructureData(e) {
22
+ this.structureData = e;
23
+ },
24
+ setIsStructureExist(e) {
25
+ this.isStructureExist = e;
26
+ },
27
+ async getModelSecretAsync(e) {
28
+ var o, r, s, a, i, n, y, u, c, p, l, f, g;
29
+ const t = await S({
30
+ key: {
31
+ systemKey: e ? e.systemKey : sessionStorage.getItem("systemKey"),
32
+ pageKey: "secret",
33
+ type: "system"
34
+ }
35
+ });
36
+ return ((o = t == null ? void 0 : t.data) == null ? void 0 : o.code) === 200 && (r = t == null ? void 0 : t.data) != null && r.result && Array.isArray((s = t == null ? void 0 : t.data) == null ? void 0 : s.result) && ((i = (a = t == null ? void 0 : t.data) == null ? void 0 : a.result) == null ? void 0 : i.length) > 0 && (this.cryptoInfo.publicKey = (c = (u = (y = (n = t.data) == null ? void 0 : n.result[0]) == null ? void 0 : y.value) == null ? void 0 : u.cryptoInfo) == null ? void 0 : c.publicKey, this.cryptoInfo.privateKey = (g = (f = (l = (p = t.data) == null ? void 0 : p.result[0]) == null ? void 0 : l.value) == null ? void 0 : f.cryptoInfo) == null ? void 0 : g.privateKey), {
37
+ publicKey: this.cryptoInfo.publicKey,
38
+ privateKey: this.cryptoInfo.privateKey
39
+ };
40
+ },
41
+ async setLogRecordAsync(e, t, o = "operate") {
42
+ var r;
43
+ try {
44
+ const s = v(E.value, "path", t, "children");
45
+ if (!s) return;
46
+ const a = await I({
47
+ key: {
48
+ systemKey: sessionStorage.getItem("systemKey"),
49
+ pageKey: "/log",
50
+ type: "system",
51
+ logType: o
52
+ },
53
+ value: {
54
+ module: s ? s.title : t,
55
+ timeStamp: D(),
56
+ detail: { ...e }
57
+ }
58
+ });
59
+ return ((r = a == null ? void 0 : a.data) == null ? void 0 : r.code) === 200;
60
+ } catch (s) {
61
+ K.error(s);
62
+ }
63
+ }
64
+ },
65
+ persist: [
66
+ {
67
+ key: "loginState",
68
+ storage: localStorage,
69
+ pick: ["superAdminInfo"]
70
+ }
71
+ ]
72
+ });
73
+ export {
74
+ M as u
75
+ };
@@ -0,0 +1 @@
1
+ "use strict";const a=require("./menu-CAtGS1Fx.cjs"),I=require("./menuIndex-Cg6xI-jR.cjs"),m=a.useMenuState(a.pinia),{menus:K}=a.storeToRefs(m),S=a.defineStore("loginState",{state:()=>({superAdminInfo:{},cryptoInfo:{publicKey:"",privateKey:""},loginUserInfo:{},structureData:[],isStructureExist:!1}),actions:{setSuperAdminInfo(t){this.superAdminInfo=t},setLoginUserInfo(t){this.loginUserInfo=t},setStructureData(t){this.structureData=t},setIsStructureExist(t){this.isStructureExist=t},async getModelSecretAsync(t){var n,i,s,r,o,u,y,c,p,l,f,g,d;const e=await a.getInsofDataApi({key:{systemKey:t?t.systemKey:sessionStorage.getItem("systemKey"),pageKey:"secret",type:"system"}});return((n=e==null?void 0:e.data)==null?void 0:n.code)===200&&(i=e==null?void 0:e.data)!=null&&i.result&&Array.isArray((s=e==null?void 0:e.data)==null?void 0:s.result)&&((o=(r=e==null?void 0:e.data)==null?void 0:r.result)==null?void 0:o.length)>0&&(this.cryptoInfo.publicKey=(p=(c=(y=(u=e.data)==null?void 0:u.result[0])==null?void 0:y.value)==null?void 0:c.cryptoInfo)==null?void 0:p.publicKey,this.cryptoInfo.privateKey=(d=(g=(f=(l=e.data)==null?void 0:l.result[0])==null?void 0:f.value)==null?void 0:g.cryptoInfo)==null?void 0:d.privateKey),{publicKey:this.cryptoInfo.publicKey,privateKey:this.cryptoInfo.privateKey}},async setLogRecordAsync(t,e,n="operate"){var i;try{const s=I.findNodeByPropInTree(K.value,"path",e,"children");if(!s)return;const r=await a.createInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"/log",type:"system",logType:n},value:{module:s?s.title:e,timeStamp:I.getCurrentDateTime(),detail:{...t}}});return((i=r==null?void 0:r.data)==null?void 0:i.code)===200}catch(s){a.ElMessage.error(s)}}},persist:[{key:"loginState",storage:localStorage,pick:["superAdminInfo"]}]});exports.useLoginState=S;
@@ -1,11 +1,11 @@
1
1
  import { ref as _, watch as V, createElementBlock as C, createCommentVNode as I, openBlock as f, Fragment as le, renderList as se, createElementVNode as O, createBlock as Z, toDisplayString as v, resolveDynamicComponent as ue, onMounted as ce, createVNode as A } from "vue";
2
- import { m as ie, a as me, b as de } from "./index-BOzZXj2f.js";
3
- import { p as E, s as ee, u as ye } from "./menu-D9x5_s9p.js";
4
- import { u as te } from "./threeModel.vue_vue_type_style_index_0_scoped_28fc9fe5_lang-CnQhvwfL.js";
5
- import { g as fe } from "./index-DMp2zGXo.js";
6
- import { e as ge, a as he } from "./array-CYOvmzeK.js";
2
+ import { m as ie, a as me, b as de } from "./index-lGikBSHE.js";
3
+ import { p as E, s as ee, u as ye } from "./menu-D7VMU4Hp.js";
4
+ import { u as te } from "./threeModel.vue_vue_type_style_index_0_scoped_43c8b141_lang-CwNweo5U.js";
5
+ import { g as fe } from "./index-Dd4IqazP.js";
6
+ import { e as ge, a as he } from "./array-CU7_6w0r.js";
7
7
  import { _ as ne } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
- import { c as k } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CaGB6aRQ.js";
8
+ import { c as k } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D5XW-lZk.js";
9
9
  const x = [
10
10
  {
11
11
  key: "FormName",
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),T=require("./index-BimZK7wy.cjs"),N=require("./menu-B-Z5KAh5.cjs"),K=require("./threeModel.vue_vue_type_style_index_0_scoped_28fc9fe5_lang-CBBWsMHp.cjs"),v=require("./index-3dpRV7yS.cjs"),Q=require("./array-DAoy3WS9.cjs"),U=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),_=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-x_oCFRtr.cjs"),V=[{key:"FormName",value:"Form"},{key:"TableName",value:"Table"}],s=[{key:"FormDirect",value:"formFlex"},{key:"Form",value:"formContent"},{key:"FormButton",value:"formButton"},{key:"TableColumns",value:"header"},{key:"TableButton",value:"extraButton"},{key:"LineButton",value:"rowButton"},{key:"Table",value:"tableContents"},{key:"TableIndex",value:"tableIndex"}],ee={key:0,class:"show-content"},te={class:"item-view-group"},ne={__name:"index",props:{content:String,jsonContents:Array},emits:["change"],setup(j,{emit:E}){const t=j,S=E,g=K.useModelComp(N.pinia),{itemData:h}=N.storeToRefs(g),p=e.ref([]),C=e.ref([]),I=c=>{S("change",{wholeValue:p.value,editValue:c})},D=c=>{const k=_.cloneDeep(p.value),b=k==null?void 0:k.map((i,B)=>(B===(c==null?void 0:c.index)&&(i.compData=c==null?void 0:c.contents),i));p.value=b};e.watch(()=>h.value,()=>{var c;!h.value||((c=h.value)==null?void 0:c.length)===0||(C.value=h.value,p.value=h.value)},{deep:!0,immediate:!0}),e.watch(()=>[t==null?void 0:t.content,t==null?void 0:t.jsonContents],()=>{var k;if(((k=t==null?void 0:t.jsonContents)==null?void 0:k.length)>0){g.setOriginalData(t==null?void 0:t.jsonContents),g.setItemData(t==null?void 0:t.jsonContents);return}if(!(t!=null&&t.content)||(t==null?void 0:t.content)==="")return;const c=Q.expandStringToJson(t==null?void 0:t.content);g.setOriginalData(c),g.setItemData(c)},{deep:!0,immediate:!0});const w=c=>v.getComponent(c);return(c,k)=>{var b;return((b=C.value)==null?void 0:b.length)>0?(e.openBlock(),e.createElementBlock("div",ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(i,B)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:B},[e.createElementVNode("div",te,e.toDisplayString(i.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w(i.comp)),{itemData:i==null?void 0:i.compData,childItemData:i==null?void 0:i.itemChildData,key:B,onChange:I,index:B,onContentChange:D},null,40,["itemData","childItemData","index"]))]))),128))])):e.createCommentVNode("",!0)}}},oe=U._export_sfc(ne,[["__scopeId","data-v-1c04adc8"]]),ae={class:"add-model-content"},le={key:0,class:"model-import-data"},re={class:"import-button"},ce={key:0},se={key:1,class:"model-operate"},ue={class:"model-select"},ie={class:"model-fill"},de={key:2,class:"model-view ssComponent"},me={__name:"main",props:{mode:{type:String,default:"view"},content:{type:String,default:""},jsonContents:{type:Array,default:()=>[]},showButton:{type:Boolean,default:!0}},emits:["change"],setup(j,{emit:E}){const t=j,S=E,g=e.ref(""),h=e.ref([]),p=e.ref(0),C=K.useModelComp(N.pinia);N.useMenuState(N.pinia);const{itemData:I,originalData:D}=N.storeToRefs(C),w=e.ref(null),c=e.ref(0),k=e.ref(""),b=()=>{p.value=window.innerWidth},i=async l=>{var u;const a=(u=_.cloneDeep(l==null?void 0:l.wholeValue))==null?void 0:u.map(o=>{var y;return(o==null?void 0:o.comp)==="Form"&&(o.compData=(y=o.compData)==null?void 0:y.map(f=>((f==null?void 0:f.key)==="formContent"&&(f.contents=Q.arrayToNumberArray(f==null?void 0:f.contents)),f))),o});S("change",{originalContents:D.value,currentContents:l==null?void 0:l.wholeValue,editContent:l==null?void 0:l.editValue,stringContent:B(_.cloneDeep(l==null?void 0:l.wholeValue)),arrayToContents:a})},B=l=>{var u;let a=[];return(u=_.cloneDeep(l))==null||u.forEach(o=>{var y,f;V!=null&&V.find(n=>(n==null?void 0:n.value)===(o==null?void 0:o.comp))&&a.push(((y=V==null?void 0:V.find(n=>(n==null?void 0:n.value)===(o==null?void 0:o.comp)))==null?void 0:y.key)+"="+o.name+"/r/n"),(f=o==null?void 0:o.compData)==null||f.forEach(n=>{var F,$,J,q,A,M,R,L,z,W,H,P;if(s!=null&&s.find(d=>(d==null?void 0:d.value)===(n==null?void 0:n.key)))if(!((F=n==null?void 0:n.contents)!=null&&F.length))a.push((($=s==null?void 0:s.find(d=>(d==null?void 0:d.value)===(n==null?void 0:n.key)))==null?void 0:$.key)+"="+(n.contents===!0?'""':"Vertical")+"/r/n");else{let d=(J=n==null?void 0:n.contents)==null?void 0:J[0];if(!d)return;if(Object.keys(d).includes("label")&&Object.keys(d).includes("key")&&Object.keys(d).includes("width"))if(((A=(q=n.contents)==null?void 0:q.filter(m=>m.width!==1))==null?void 0:A.length)===0){const m=(M=_.cloneDeep(n==null?void 0:n.contents))==null?void 0:M.map(r=>({[r.label]:r.value}));a.push(((R=s==null?void 0:s.find(r=>(r==null?void 0:r.value)===(n==null?void 0:n.key)))==null?void 0:R.key)+"="+JSON.stringify(m)+"/r/n")}else{let m=[];(L=_.cloneDeep(n==null?void 0:n.contents))==null||L.reduce((r,O)=>{var G;return r[O.label]=O.key,((G=Object.keys(_.cloneDeep(r)))==null?void 0:G.length)>=O.width&&(m.push(_.cloneDeep(r)),r={}),r},{}),a.push(((z=s==null?void 0:s.find(r=>(r==null?void 0:r.value)===(n==null?void 0:n.key)))==null?void 0:z.key)+"="+JSON.stringify(m)+"/r/n")}else if(Object.keys(d).includes("label")){const m=(W=_.cloneDeep(n==null?void 0:n.contents))==null?void 0:W.map(r=>r.label);a.push(((H=s==null?void 0:s.find(r=>(r==null?void 0:r.value)===(n==null?void 0:n.key)))==null?void 0:H.key)+"="+JSON.stringify(m)+"/r/n")}else a.push(((P=s==null?void 0:s.find(m=>(m==null?void 0:m.value)===(n==null?void 0:n.key)))==null?void 0:P.key)+"="+JSON.stringify(n==null?void 0:n.contents)+"/r/n")}})}),JSON.stringify(a)},x=e.ref([]),X=()=>{w.value.click()},Y=l=>{const a=l.target.files[0];if(!a)return;const u=new FileReader;u.onload=o=>{try{g.value=o.target.result,x.value=Z(o.target.result),c.value++}catch(y){console.error("解析失败:",y)}},u.onerror=o=>{console.error("文件读取错误:",o)},u.readAsText(a)};e.onMounted(()=>{window.addEventListener("resize",b)}),e.watch(()=>[t==null?void 0:t.content,t==null?void 0:t.jsonContents],()=>{g.value=t==null?void 0:t.content,h.value=t==null?void 0:t.jsonContents},{deep:!0,immediate:!0}),e.watch(()=>c.value,()=>{var l;((l=x.value)==null?void 0:l.length)!==0&&(C.setOriginalData(x.value),C.setItemData(x.value))},{deep:!0,immediate:!0});const Z=l=>{let a=l.replace(/,/g,",").replace(/;/g,";").replace(/:/g,":");a=a.replace(/(\w+)\s*:/g,"$1:"),a=a.replace(/\r\n/g,"").replace(/\n/g,"").replace(/\t/g,"").replace(/\s+/g," ").trim(),a=a.replace(/,\s*([}\]])/g,"$1"),a=a.replace(/:(\s*)([^"{}\[\],\s]+)(\s*)([,}])/g,": $2$4");try{return JSON.parse(a)}catch(u){try{const y=new Function(`return ${a}`)();if(Array.isArray(y)||typeof y=="object")return y;throw new Error(`解析结果不是有效的数组或对象: ${u}`)}catch(o){throw new Error(`无法解析JSON: ${o.message}`)}}};return(l,a)=>{var u;return e.openBlock(),e.createElementBlock("div",ae,[((u=t==null?void 0:t.jsonContents)==null?void 0:u.length)===0?(e.openBlock(),e.createElementBlock("div",le,[e.createElementVNode("div",re,[e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:w,accept:".txt",onChange:Y,style:{display:"none"}},null,544),e.createElementVNode("button",{onClick:X,class:"import-button-content"},"导入文件"),k.value?(e.openBlock(),e.createElementBlock("span",ce,e.toDisplayString(k.value),1)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),(t==null?void 0:t.mode)==="edit"?(e.openBlock(),e.createElementBlock("div",se,[e.createElementVNode("div",ue,[e.createVNode(T.modelSelect)]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:p.value},[e.createVNode(T.modelShow)])),e.createElementVNode("div",ie,[e.createVNode(T.modelFill)])])):e.createCommentVNode("",!0),(t==null?void 0:t.mode)==="view"?(e.openBlock(),e.createElementBlock("div",de,[(e.openBlock(),e.createBlock(oe,{content:g.value,onChange:i,jsonContents:h.value,key:p.value},null,8,["content","jsonContents"]))])):e.createCommentVNode("",!0)])}}},ye=U._export_sfc(me,[["__scopeId","data-v-1dbc7677"]]);exports.default=ye;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),T=require("./index-CcaDRZTq.cjs"),N=require("./menu-CAtGS1Fx.cjs"),K=require("./threeModel.vue_vue_type_style_index_0_scoped_43c8b141_lang-CHtdDFOo.cjs"),v=require("./index-CTu1NToC.cjs"),Q=require("./array-CP-DB-qS.cjs"),U=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),_=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DNfIOSKK.cjs"),V=[{key:"FormName",value:"Form"},{key:"TableName",value:"Table"}],s=[{key:"FormDirect",value:"formFlex"},{key:"Form",value:"formContent"},{key:"FormButton",value:"formButton"},{key:"TableColumns",value:"header"},{key:"TableButton",value:"extraButton"},{key:"LineButton",value:"rowButton"},{key:"Table",value:"tableContents"},{key:"TableIndex",value:"tableIndex"}],ee={key:0,class:"show-content"},te={class:"item-view-group"},ne={__name:"index",props:{content:String,jsonContents:Array},emits:["change"],setup(j,{emit:E}){const t=j,S=E,g=K.useModelComp(N.pinia),{itemData:h}=N.storeToRefs(g),p=e.ref([]),C=e.ref([]),I=c=>{S("change",{wholeValue:p.value,editValue:c})},D=c=>{const k=_.cloneDeep(p.value),b=k==null?void 0:k.map((i,B)=>(B===(c==null?void 0:c.index)&&(i.compData=c==null?void 0:c.contents),i));p.value=b};e.watch(()=>h.value,()=>{var c;!h.value||((c=h.value)==null?void 0:c.length)===0||(C.value=h.value,p.value=h.value)},{deep:!0,immediate:!0}),e.watch(()=>[t==null?void 0:t.content,t==null?void 0:t.jsonContents],()=>{var k;if(((k=t==null?void 0:t.jsonContents)==null?void 0:k.length)>0){g.setOriginalData(t==null?void 0:t.jsonContents),g.setItemData(t==null?void 0:t.jsonContents);return}if(!(t!=null&&t.content)||(t==null?void 0:t.content)==="")return;const c=Q.expandStringToJson(t==null?void 0:t.content);g.setOriginalData(c),g.setItemData(c)},{deep:!0,immediate:!0});const w=c=>v.getComponent(c);return(c,k)=>{var b;return((b=C.value)==null?void 0:b.length)>0?(e.openBlock(),e.createElementBlock("div",ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(i,B)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:B},[e.createElementVNode("div",te,e.toDisplayString(i.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w(i.comp)),{itemData:i==null?void 0:i.compData,childItemData:i==null?void 0:i.itemChildData,key:B,onChange:I,index:B,onContentChange:D},null,40,["itemData","childItemData","index"]))]))),128))])):e.createCommentVNode("",!0)}}},oe=U._export_sfc(ne,[["__scopeId","data-v-1c04adc8"]]),ae={class:"add-model-content"},le={key:0,class:"model-import-data"},re={class:"import-button"},ce={key:0},se={key:1,class:"model-operate"},ue={class:"model-select"},ie={class:"model-fill"},de={key:2,class:"model-view ssComponent"},me={__name:"main",props:{mode:{type:String,default:"view"},content:{type:String,default:""},jsonContents:{type:Array,default:()=>[]},showButton:{type:Boolean,default:!0}},emits:["change"],setup(j,{emit:E}){const t=j,S=E,g=e.ref(""),h=e.ref([]),p=e.ref(0),C=K.useModelComp(N.pinia);N.useMenuState(N.pinia);const{itemData:I,originalData:D}=N.storeToRefs(C),w=e.ref(null),c=e.ref(0),k=e.ref(""),b=()=>{p.value=window.innerWidth},i=async l=>{var u;const a=(u=_.cloneDeep(l==null?void 0:l.wholeValue))==null?void 0:u.map(o=>{var y;return(o==null?void 0:o.comp)==="Form"&&(o.compData=(y=o.compData)==null?void 0:y.map(f=>((f==null?void 0:f.key)==="formContent"&&(f.contents=Q.arrayToNumberArray(f==null?void 0:f.contents)),f))),o});S("change",{originalContents:D.value,currentContents:l==null?void 0:l.wholeValue,editContent:l==null?void 0:l.editValue,stringContent:B(_.cloneDeep(l==null?void 0:l.wholeValue)),arrayToContents:a})},B=l=>{var u;let a=[];return(u=_.cloneDeep(l))==null||u.forEach(o=>{var y,f;V!=null&&V.find(n=>(n==null?void 0:n.value)===(o==null?void 0:o.comp))&&a.push(((y=V==null?void 0:V.find(n=>(n==null?void 0:n.value)===(o==null?void 0:o.comp)))==null?void 0:y.key)+"="+o.name+"/r/n"),(f=o==null?void 0:o.compData)==null||f.forEach(n=>{var F,$,J,q,A,M,R,L,z,W,H,P;if(s!=null&&s.find(d=>(d==null?void 0:d.value)===(n==null?void 0:n.key)))if(!((F=n==null?void 0:n.contents)!=null&&F.length))a.push((($=s==null?void 0:s.find(d=>(d==null?void 0:d.value)===(n==null?void 0:n.key)))==null?void 0:$.key)+"="+(n.contents===!0?'""':"Vertical")+"/r/n");else{let d=(J=n==null?void 0:n.contents)==null?void 0:J[0];if(!d)return;if(Object.keys(d).includes("label")&&Object.keys(d).includes("key")&&Object.keys(d).includes("width"))if(((A=(q=n.contents)==null?void 0:q.filter(m=>m.width!==1))==null?void 0:A.length)===0){const m=(M=_.cloneDeep(n==null?void 0:n.contents))==null?void 0:M.map(r=>({[r.label]:r.value}));a.push(((R=s==null?void 0:s.find(r=>(r==null?void 0:r.value)===(n==null?void 0:n.key)))==null?void 0:R.key)+"="+JSON.stringify(m)+"/r/n")}else{let m=[];(L=_.cloneDeep(n==null?void 0:n.contents))==null||L.reduce((r,O)=>{var G;return r[O.label]=O.key,((G=Object.keys(_.cloneDeep(r)))==null?void 0:G.length)>=O.width&&(m.push(_.cloneDeep(r)),r={}),r},{}),a.push(((z=s==null?void 0:s.find(r=>(r==null?void 0:r.value)===(n==null?void 0:n.key)))==null?void 0:z.key)+"="+JSON.stringify(m)+"/r/n")}else if(Object.keys(d).includes("label")){const m=(W=_.cloneDeep(n==null?void 0:n.contents))==null?void 0:W.map(r=>r.label);a.push(((H=s==null?void 0:s.find(r=>(r==null?void 0:r.value)===(n==null?void 0:n.key)))==null?void 0:H.key)+"="+JSON.stringify(m)+"/r/n")}else a.push(((P=s==null?void 0:s.find(m=>(m==null?void 0:m.value)===(n==null?void 0:n.key)))==null?void 0:P.key)+"="+JSON.stringify(n==null?void 0:n.contents)+"/r/n")}})}),JSON.stringify(a)},x=e.ref([]),X=()=>{w.value.click()},Y=l=>{const a=l.target.files[0];if(!a)return;const u=new FileReader;u.onload=o=>{try{g.value=o.target.result,x.value=Z(o.target.result),c.value++}catch(y){console.error("解析失败:",y)}},u.onerror=o=>{console.error("文件读取错误:",o)},u.readAsText(a)};e.onMounted(()=>{window.addEventListener("resize",b)}),e.watch(()=>[t==null?void 0:t.content,t==null?void 0:t.jsonContents],()=>{g.value=t==null?void 0:t.content,h.value=t==null?void 0:t.jsonContents},{deep:!0,immediate:!0}),e.watch(()=>c.value,()=>{var l;((l=x.value)==null?void 0:l.length)!==0&&(C.setOriginalData(x.value),C.setItemData(x.value))},{deep:!0,immediate:!0});const Z=l=>{let a=l.replace(/,/g,",").replace(/;/g,";").replace(/:/g,":");a=a.replace(/(\w+)\s*:/g,"$1:"),a=a.replace(/\r\n/g,"").replace(/\n/g,"").replace(/\t/g,"").replace(/\s+/g," ").trim(),a=a.replace(/,\s*([}\]])/g,"$1"),a=a.replace(/:(\s*)([^"{}\[\],\s]+)(\s*)([,}])/g,": $2$4");try{return JSON.parse(a)}catch(u){try{const y=new Function(`return ${a}`)();if(Array.isArray(y)||typeof y=="object")return y;throw new Error(`解析结果不是有效的数组或对象: ${u}`)}catch(o){throw new Error(`无法解析JSON: ${o.message}`)}}};return(l,a)=>{var u;return e.openBlock(),e.createElementBlock("div",ae,[((u=t==null?void 0:t.jsonContents)==null?void 0:u.length)===0?(e.openBlock(),e.createElementBlock("div",le,[e.createElementVNode("div",re,[e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:w,accept:".txt",onChange:Y,style:{display:"none"}},null,544),e.createElementVNode("button",{onClick:X,class:"import-button-content"},"导入文件"),k.value?(e.openBlock(),e.createElementBlock("span",ce,e.toDisplayString(k.value),1)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),(t==null?void 0:t.mode)==="edit"?(e.openBlock(),e.createElementBlock("div",se,[e.createElementVNode("div",ue,[e.createVNode(T.modelSelect)]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:p.value},[e.createVNode(T.modelShow)])),e.createElementVNode("div",ie,[e.createVNode(T.modelFill)])])):e.createCommentVNode("",!0),(t==null?void 0:t.mode)==="view"?(e.openBlock(),e.createElementBlock("div",de,[(e.openBlock(),e.createBlock(oe,{content:g.value,onChange:i,jsonContents:h.value,key:p.value},null,8,["content","jsonContents"]))])):e.createCommentVNode("",!0)])}}},ye=U._export_sfc(me,[["__scopeId","data-v-1dbc7677"]]);exports.default=ye;