ss-component-new 1.3.421 → 1.3.424

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/dist/{MTLLoader-BJ1r0nij.cjs → MTLLoader-C1qSZuWT.cjs} +1 -1
  2. package/dist/{MTLLoader-1LCfWDIN.js → MTLLoader-DBXJU4gy.js} +1 -1
  3. package/dist/{OrbitControls-BI1MijP-.cjs → OrbitControls-BFwyCnTH.cjs} +1 -1
  4. package/dist/{OrbitControls-DmwRVj4H.js → OrbitControls-BK6rha_f.js} +1 -1
  5. package/dist/{URDFLoader-zXHnUuDb.js → URDFLoader-B4rOIDHb.js} +2 -2
  6. package/dist/{URDFLoader-DbITJ-FE.cjs → URDFLoader-CTaB1j6-.cjs} +1 -1
  7. package/dist/{animationData-CxG7Qmzl.js → animationData-Bfdz_yNt.js} +2 -2
  8. package/dist/{animationData-CNXbKt_k.cjs → animationData-DugoMERO.cjs} +1 -1
  9. package/dist/{array-Ctuf3DOG.js → array-BPirA4Cc.js} +5 -5
  10. package/dist/{array-DwjaSl70.cjs → array-D4Rx9WHR.cjs} +1 -1
  11. package/dist/{iconfont-ZM4Mv0Mj.cjs → iconfont-B8J8hnDJ.cjs} +1 -1
  12. package/dist/{iconfont-B7bT4X1w.js → iconfont-C4b-8B6C.js} +2 -2
  13. package/dist/{index-DN1FQ4lC.cjs → index-A9g99oCn.cjs} +1 -1
  14. package/dist/{index-Cmw1O7M3.cjs → index-B3D67GZq.cjs} +1 -1
  15. package/dist/{index-B3JW2M3W.cjs → index-B8RqhWoJ.cjs} +1 -1
  16. package/dist/{index-CxEgTjYQ.js → index-BB-4fswu.js} +1 -1
  17. package/dist/{index-mJFCoPsK.js → index-BK6-AVLE.js} +1 -1
  18. package/dist/{index-BfETnuY2.cjs → index-BMAjqhNr.cjs} +13 -13
  19. package/dist/{index-D2iC0RdT.js → index-BWtc895B.js} +81 -75
  20. package/dist/{index-reJmxzkK.cjs → index-Bn4g3hXz.cjs} +20 -20
  21. package/dist/{index-Bo8c-hpl.js → index-BnIQk5T3.js} +1 -1
  22. package/dist/{index-D9T-hj7J.js → index-BosTIy2F.js} +2 -2
  23. package/dist/{index-fGwDUF0a.cjs → index-Bu5lDLj_.cjs} +1 -1
  24. package/dist/{index-BOB41C4i.js → index-BzTL89_A.js} +7 -7
  25. package/dist/{index-DpNuo8iO.cjs → index-C1jFiukZ.cjs} +1 -1
  26. package/dist/index-C5Pf4k8t.cjs +2 -0
  27. package/dist/{index-Bd9GpNbZ.cjs → index-C772JVG0.cjs} +1 -1
  28. package/dist/{index-tdECjK2J.js → index-C9aMOwfq.js} +5 -5
  29. package/dist/{index-XaM10GFH.js → index-CPLGtgqY.js} +2161 -2158
  30. package/dist/{index-MPNdMwkX.cjs → index-CVWmCMHh.cjs} +1 -1
  31. package/dist/{index-BGOXytSm.js → index-CdsqSTRI.js} +1 -1
  32. package/dist/{index-C2UiLe43.js → index-ChNfRlIP.js} +6 -6
  33. package/dist/{index-CrXDGlUY.js → index-CjSJE_W_.js} +3 -3
  34. package/dist/{index-Bo4dSR3m.cjs → index-CnsDmHXo.cjs} +1 -1
  35. package/dist/{index-DshXKN2f.js → index-D38qJHp0.js} +1 -1
  36. package/dist/{index-CItyXwKR.js → index-DJsef_j_.js} +4 -4
  37. package/dist/index-DKh4EyHV.cjs +1 -0
  38. package/dist/{index-Cdsro90y.cjs → index-DOcUitv0.cjs} +1 -1
  39. package/dist/{index-BNQrzEfh.js → index-DOhwoePd.js} +1167 -1166
  40. package/dist/{index-KUIk6_-7.cjs → index-DPYpdz4-.cjs} +1 -1
  41. package/dist/{index-BxwNVYrj.js → index-DPooN16T.js} +1 -1
  42. package/dist/{index-4VkWVb4x.js → index-DX6ztcs4.js} +1 -1
  43. package/dist/{index-F7ilz1xi.cjs → index-D_zk9En4.cjs} +1 -1
  44. package/dist/{index-zpFkli-r.cjs → index-DaiB_qqV.cjs} +1 -1
  45. package/dist/{index-D3Ik6E9u.cjs → index-DgpEgbFi.cjs} +1 -1
  46. package/dist/{index-C9cUuEAp.cjs → index-DhD0tnVr.cjs} +1 -1
  47. package/dist/{index-BVFUG_jG.js → index-DlXwTcJ9.js} +1 -1
  48. package/dist/index-GSbBamu4.js +23403 -0
  49. package/dist/{index-DcuqAO7V.js → index-L3ZBKT8o.js} +3 -3
  50. package/dist/{index-ND4SQdF3.js → index-TDwSq2BF.js} +1 -1
  51. package/dist/{index-Bsq8-oqc.cjs → index-eE62vN8n.cjs} +1 -1
  52. package/dist/{index-BdndCl1P.js → index-ss_5hS2p.js} +1 -1
  53. package/dist/{index-DloRcfY8.cjs → index-wnEIPRYs.cjs} +1 -1
  54. package/dist/index-zg0q697-.cjs +26 -0
  55. package/dist/{index.vue_vue_type_style_index_0_scoped_6b92e250_lang-DMzXQmLy.cjs → index.vue_vue_type_style_index_0_scoped_6b92e250_lang-Bk-thOPD.cjs} +1 -1
  56. package/dist/{index.vue_vue_type_style_index_0_scoped_6b92e250_lang-BhSYtqu1.js → index.vue_vue_type_style_index_0_scoped_6b92e250_lang-EOt2_XRY.js} +1 -1
  57. package/dist/{main-D6vPtVzF.cjs → main-CE-zxQmp.cjs} +1 -1
  58. package/dist/{main-B_egGqbG.js → main-DPoBb_O1.js} +3 -3
  59. package/dist/ss-component.cjs +1 -1
  60. package/dist/ss-component.css +2 -2
  61. package/dist/ss-component.js +10 -10
  62. package/dist/ss-component2.cjs +1 -1
  63. package/dist/ss-component2.js +10 -10
  64. package/dist/{threeModel-Cjo7-QZS.cjs → threeModel-CiR7lpoR.cjs} +1 -1
  65. package/dist/{threeModel-BSyYeQZu.js → threeModel-Cj67vfAN.js} +5 -5
  66. package/dist/{threePreview-vl6uhbHM.cjs → threePreview-CbKggw3I.cjs} +1 -1
  67. package/dist/{threePreview-C6KQqoXZ.js → threePreview-GizvH53S.js} +3 -3
  68. package/dist/{threeSceneView-BSdMrsfM.js → threeSceneView-2wRxUPkw.js} +10 -10
  69. package/dist/{threeSceneView-DmFm6Q-S.cjs → threeSceneView-DWuPWq3V.cjs} +1 -1
  70. package/dist/{threeSceneViewForCPMPIP-CQP66XwY.cjs → threeSceneViewForCPMPIP-BzbKluFb.cjs} +1 -1
  71. package/dist/{threeSceneViewForCPMPIP-Da0YmvCt.js → threeSceneViewForCPMPIP-DxkeanTl.js} +7 -7
  72. package/dist/{threeTrackPathView-BvmhaG0W.js → threeTrackPathView-DSHB2LWA.js} +3 -3
  73. package/dist/{threeTrackPathView-BjwtoU5M.cjs → threeTrackPathView-ZqSjOtFS.cjs} +1 -1
  74. package/dist/{threeViewerHost-BKNIqrfT.js → threeViewerHost-BAksiU_r.js} +2 -2
  75. package/dist/{threeViewerHost-lhCLFuMH.cjs → threeViewerHost-Bi3OIwqG.cjs} +1 -1
  76. package/dist/{urdfTree-CUyckHTO.js → urdfTree-DEWAJ5kl.js} +27 -27
  77. package/dist/{urdfTree-DD12pYQE.cjs → urdfTree-DnkBJIj6.cjs} +1 -1
  78. package/dist/{workpieceTreePanel-mmroz89S.cjs → workpieceTreePanel-DzpjPYZ9.cjs} +1 -1
  79. package/dist/{workpieceTreePanel-BLUYvcFc.js → workpieceTreePanel-XOSlhouq.js} +4 -4
  80. package/package.json +1 -1
  81. package/dist/index-2VatFDli.js +0 -23246
  82. package/dist/index-DE_58kwC.cjs +0 -26
  83. package/dist/index-DwSzah5b.cjs +0 -2
  84. package/dist/index-RoXicHV9.cjs +0 -1
@@ -1 +1 @@
1
- "use strict";const i=require("vue"),I=require("./index-ClvA5-wg.cjs"),pe=require("./index-reJmxzkK.cjs"),k=require("./index-DmwxzDGW.cjs"),fe=require("./menuIndex-B8QQIas4.cjs"),w=require("./request-Dl8yi2iS.cjs"),F=I.useModelComp(I.pinia),ee=I.useUnit(I.pinia),C=I.useMenuState(I.pinia),{menus:te,configMenu:q,activeMenuPath:$,cacheStructures:K}=I.storeToRefs(C),j=i.ref(!1),le=i.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=I.cloneDeep(te.value))==null?void 0:e.map(l=>({...l,menuType:"系统菜单"})))==null?void 0:t.filter(l=>l.title!=="系统管理"&&l.title!=="平台管理")}]}),J=i.ref([]),R=i.ref([{label:"新建"}]),de=i.computed(()=>[{key:"extraButton",contents:R.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}]),U=i.ref([]),T=i.ref({}),ie=i.ref({}),O=i.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}]),_=e=>{var t;U.value=e?(t=O.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]:""}):O.value},ge=i.ref([{label:"查询"},{label:"重置"}]),ve=async()=>{},ae=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:ae(t.childMenus)}:{...t,value:t==null?void 0:t.title,label:t==null?void 0:t.title}),g=i.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),z=i.ref([]),h=i.ref({}),b=i.ref(null),oe=i.ref([]),ne=i.computed(()=>{var e;return(e=ae(te.value))==null?void 0:e.filter(t=>t.title!=="系统管理"&&t.title!=="平台管理")}),ue=async e=>{var l,u,n,c;const t=await k.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}});oe.value=r,C.setCacheStructures({key:"contentConfig",data:r})}},ye=async e=>{var t;j.value=!0,b.value={...e,rootNode:fe.findRootNodeByPath(ne.value,e.path)},C.setCacheStructures(null),(e==null?void 0:e.level)===0?R.value.splice(0):(R.value=[{label:"新建"}],z.value=(t=e==null?void 0:e.path)==null?void 0:t.split("/")),await C.setConfigMenu(null),await ue(e==null?void 0:e.path),await x(e)},be=e=>{switch(e){case"新建":return"create";case"修改":return"update";case"删除":return"delete"}},he=async(e,t)=>{var l,u;if(!b.value)return w.ElMessage.warning("请先选择菜单");if(g.type=be(e),z.value=[],F.setSubmitCurStructure(!1),ee.setSelectTitle([]),h.value=I.cloneDeep(t),g.type!=="delete"){switch(g.type){case"create":_(null),await C.setConfigMenu(null);break;case"update":_(h.value),await C.setConfigMenu(h.value),console.log("clickRowButton",h.value);break}await i.nextTick(),g.title=`【${g.type==="create"?(l=b.value)==null?void 0:l.path:(u=h.value)==null?void 0:u.path}】菜单配置${e}`,g.show=!0}else await se(h.value,g.type)},re=i.ref(!0),Ce=async e=>{var t;T.value=e,await C.setConfigMenu({...T.value,path:(t=b.value)==null?void 0:t.path}),re.value=(e==null?void 0:e.operateType)!=="新增"};i.watch(()=>re.value,async e=>{var t;await i.nextTick(),U.value=(t=O.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:T.value?T.value[l==null?void 0:l.prop]:""})},{immediate:!0,deep:!0});const Ie=i.ref(null),ke=async(e,t)=>{var r,p,f,s,y;if(g.type==="create"){const a=(p=(r=K.value)==null?void 0:r.filter(d=>(d==null?void 0:d.key)===t))==null?void 0:p.flatMap(d=>d==null?void 0:d.data);F.setItemData(a),C.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=(y=(s=e==null?void 0:e.structureIds)==null?void 0:s.filter(a=>(a==null?void 0:a.key)===t))==null?void 0:y.map(a=>a==null?void 0:a.id);let u=l==null?void 0:l.map(a=>{if(a)return k.getInsofDataApi({id:a})});const n=await Promise.all(u),c=n==null?void 0:n.every(a=>{var d;return((d=a==null?void 0:a.data)==null?void 0:d.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(d=>{var M,D,A,P,E,o,B;return{id:(A=(D=(M=d==null?void 0:d.data)==null?void 0:M.result)==null?void 0:D[0])==null?void 0:A.id,...(B=(o=(E=(P=d==null?void 0:d.data)==null?void 0:P.result)==null?void 0:E[0])==null?void 0:o.value)==null?void 0:B.pageData}});F.setItemData(a),C.setCacheStructures({key:t,data:a})}},Te=async e=>{var n,c,r,p,f;const t=e==="操作触发的弹窗结构"?"dialogConfig":"contentConfig";C.setButtonTriggerType(t),await ke(h.value,t);let l;(n=T.value)!=null&&n.subMenus&&((c=T.value)==null?void 0:c.subMenus.length)>0&&(l=(r=z.value)==null?void 0:r.map(s=>({value:s})),l.unshift({value:(p=h.value)==null?void 0:p.title}));let u;g.type==="create"?u={...T.value,path:(f=b.value)==null?void 0:f.path}:g.type==="update"&&(u=q.value),await C.setConfigMenu(u),ee.setSelectTitle(l),F.setIsEdit("edit")},x=async e=>{var l,u,n,c,r,p;const t=await k.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}}):[]),j.value=!1},H=async(e,t,l="contentConfig")=>{var u,n,c,r,p,f;try{let s,y;t==="create"?(s={key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:$.value+"/"+((u=b.value)==null?void 0:u.path),type:"structure",rootNodePath:(c=(n=b.value)==null?void 0:n.rootNode)==null?void 0:c.path,structureBelong:l,parentTable:"",version:1},value:{pageData:e}},y=k.createInsofDataApi):t==="update"?(s={id:e==null?void 0:e.id,value:{pageData:e}},y=k.updateInsofDataApi):t==="delete"&&(s={id:e},y=k.deleteInsofDataApi);const a=await y(s);if(((r=a==null?void 0:a.data)==null?void 0:r.code)!==200)throw w.ElMessage.error("保存响应失败"),new Error("保存响应失败");const d=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:d,key:l}}}catch{w.ElMessage.error("保存响应失败")}},Z=(e,t)=>{var f,s,y;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=(y=e==null?void 0:e.flatMap(a=>a==null?void 0:a.data))==null?void 0:y.filter(a=>a==null?void 0:a.id).filter(a=>Object.keys(a).length>1),{deleteIds:c,createComps:r,updateComps:p}},m=(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},Me=e=>{const t=new Map;return e.forEach(l=>{t.set(l.id,l)}),Array.from(t.values())},De=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"),y=e==null?void 0:e.filter(o=>(o==null?void 0:o.key)==="dialogConfig");await i.nextTick();const a=(n=(u=(l=K.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 d=(p=(r=(c=K.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);d=[...d,...(f=oe.value)==null?void 0:f.map(o=>o==null?void 0:o.id)];const M=Z(y,a),D=Z(s,d),A=m("dialogConfig",M),P=m("contentConfig",D),E=[...A,...P];await Promise.all(E).then(o=>{var G,L,V,Q,W,X,Y;if(!(o==null?void 0:o.every(v=>v.status)))return;let N=(G=o==null?void 0:o.flatMap(v=>v==null?void 0:v.data))==null?void 0:G.filter(v=>(v==null?void 0:v.id)!==null&&(v==null?void 0:v.id)!==void 0);if(((L=M==null?void 0:M.updateComps)==null?void 0:L.length)===0&&g.type==="update"){const v=(Q=(V=h.value)==null?void 0:V.structureIds)==null?void 0:Q.filter(S=>(S==null?void 0:S.key)==="dialogConfig");N=[...N,...v]}if(((W=D==null?void 0:D.updateComps)==null?void 0:W.length)===0&&g.type==="update"){const v=(Y=(X=h.value)==null?void 0:X.structureIds)==null?void 0:Y.filter(S=>(S==null?void 0:S.key)==="contentConfig");N=[...N,...v]}const ce=Me(N);se({...t,isNotInitial:!0,structureIds:ce},g.type)}).catch(o=>{w.ElMessage.error(o)})}catch(s){throw w.ElMessage.error(s),new Error(s)}},se=async(e,t)=>{var n,c;let l,u;t==="create"?(l={key:{type:"menuConfigData",systemKey:sessionStorage.getItem("systemKey"),pageKey:$.value+"/"+((n=b.value)==null?void 0:n.path),tableId:"",rootNodePath:e==null?void 0:e.rootNodePath},value:{tableData:e}},u=k.createInsofDataApi):t==="update"?(l={id:e==null?void 0:e.id,value:{tableData:e}},u=k.updateInsofDataApi):t==="delete"&&(l={ids:[e.id,...(c=e==null?void 0:e.structureIds)==null?void 0:c.map(r=>r.id)]},u=k.batchDeleteInsofDataApi),pe.handleSubmitAsync(u,l,t).then(r=>{t==="create"&&J.value.push({...e,id:r}),t&&r&&w.ElMessage.success("响应成功"),x(b.value)})},Se=async()=>{var l,u,n,c,r;const e=JSON.parse(I.cloneDeep(JSON.stringify(K.value)));await i.nextTick();const t=g.type==="create"?{...q.value,rootNodePath:(u=(l=b.value)==null?void 0:l.rootNode)==null?void 0:u.path}:{...q.value,rootNodePath:(c=(n=b.value)==null?void 0:n.rootNode)==null?void 0:c.path,id:(r=h.value)==null?void 0:r.id};await De(e,t),T.value={},g.show=!1,await x(b.value)},we=()=>{g.show=!1},Ne={comp:"Group",name:"/平台管理/菜单管理",compData:[{key:"groupContents",contents:[{comp:"Table",compData:le.value,name:""}]}]},Ae=Object.freeze(Object.defineProperty({__proto__:null,beforeDialogDestroy:we,buttonValue:ge,changeTrigger:Ce,changedRow:ie,clickNodeTrigger:ye,clickRowButton:he,clickSubmitForm:Se,clickTrigger:Te,dialogInfo:g,formatFormData:_,getInitialSubStructure:ue,getTableDataAsync:x,handleItemDataChange:ve,inputForm:T,menuPageData:de,operatingForm:Ie,pageData:le,renderFormData:U,tableLoading:j,tempMenuPageData:Ne,treeData:ne},Symbol.toStringTag,{value:"Module"}));exports.State=Ae;
1
+ "use strict";const i=require("vue"),I=require("./index-ClvA5-wg.cjs"),pe=require("./index-Bn4g3hXz.cjs"),k=require("./index-DmwxzDGW.cjs"),fe=require("./menuIndex-B8QQIas4.cjs"),w=require("./request-Dl8yi2iS.cjs"),F=I.useModelComp(I.pinia),ee=I.useUnit(I.pinia),C=I.useMenuState(I.pinia),{menus:te,configMenu:q,activeMenuPath:$,cacheStructures:K}=I.storeToRefs(C),j=i.ref(!1),le=i.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=I.cloneDeep(te.value))==null?void 0:e.map(l=>({...l,menuType:"系统菜单"})))==null?void 0:t.filter(l=>l.title!=="系统管理"&&l.title!=="平台管理")}]}),J=i.ref([]),R=i.ref([{label:"新建"}]),de=i.computed(()=>[{key:"extraButton",contents:R.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}]),U=i.ref([]),T=i.ref({}),ie=i.ref({}),O=i.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}]),_=e=>{var t;U.value=e?(t=O.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]:""}):O.value},ge=i.ref([{label:"查询"},{label:"重置"}]),ve=async()=>{},ae=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:ae(t.childMenus)}:{...t,value:t==null?void 0:t.title,label:t==null?void 0:t.title}),g=i.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),z=i.ref([]),h=i.ref({}),b=i.ref(null),oe=i.ref([]),ne=i.computed(()=>{var e;return(e=ae(te.value))==null?void 0:e.filter(t=>t.title!=="系统管理"&&t.title!=="平台管理")}),ue=async e=>{var l,u,n,c;const t=await k.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}});oe.value=r,C.setCacheStructures({key:"contentConfig",data:r})}},ye=async e=>{var t;j.value=!0,b.value={...e,rootNode:fe.findRootNodeByPath(ne.value,e.path)},C.setCacheStructures(null),(e==null?void 0:e.level)===0?R.value.splice(0):(R.value=[{label:"新建"}],z.value=(t=e==null?void 0:e.path)==null?void 0:t.split("/")),await C.setConfigMenu(null),await ue(e==null?void 0:e.path),await x(e)},be=e=>{switch(e){case"新建":return"create";case"修改":return"update";case"删除":return"delete"}},he=async(e,t)=>{var l,u;if(!b.value)return w.ElMessage.warning("请先选择菜单");if(g.type=be(e),z.value=[],F.setSubmitCurStructure(!1),ee.setSelectTitle([]),h.value=I.cloneDeep(t),g.type!=="delete"){switch(g.type){case"create":_(null),await C.setConfigMenu(null);break;case"update":_(h.value),await C.setConfigMenu(h.value),console.log("clickRowButton",h.value);break}await i.nextTick(),g.title=`【${g.type==="create"?(l=b.value)==null?void 0:l.path:(u=h.value)==null?void 0:u.path}】菜单配置${e}`,g.show=!0}else await se(h.value,g.type)},re=i.ref(!0),Ce=async e=>{var t;T.value=e,await C.setConfigMenu({...T.value,path:(t=b.value)==null?void 0:t.path}),re.value=(e==null?void 0:e.operateType)!=="新增"};i.watch(()=>re.value,async e=>{var t;await i.nextTick(),U.value=(t=O.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:T.value?T.value[l==null?void 0:l.prop]:""})},{immediate:!0,deep:!0});const Ie=i.ref(null),ke=async(e,t)=>{var r,p,f,s,y;if(g.type==="create"){const a=(p=(r=K.value)==null?void 0:r.filter(d=>(d==null?void 0:d.key)===t))==null?void 0:p.flatMap(d=>d==null?void 0:d.data);F.setItemData(a),C.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=(y=(s=e==null?void 0:e.structureIds)==null?void 0:s.filter(a=>(a==null?void 0:a.key)===t))==null?void 0:y.map(a=>a==null?void 0:a.id);let u=l==null?void 0:l.map(a=>{if(a)return k.getInsofDataApi({id:a})});const n=await Promise.all(u),c=n==null?void 0:n.every(a=>{var d;return((d=a==null?void 0:a.data)==null?void 0:d.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(d=>{var M,D,A,P,E,o,B;return{id:(A=(D=(M=d==null?void 0:d.data)==null?void 0:M.result)==null?void 0:D[0])==null?void 0:A.id,...(B=(o=(E=(P=d==null?void 0:d.data)==null?void 0:P.result)==null?void 0:E[0])==null?void 0:o.value)==null?void 0:B.pageData}});F.setItemData(a),C.setCacheStructures({key:t,data:a})}},Te=async e=>{var n,c,r,p,f;const t=e==="操作触发的弹窗结构"?"dialogConfig":"contentConfig";C.setButtonTriggerType(t),await ke(h.value,t);let l;(n=T.value)!=null&&n.subMenus&&((c=T.value)==null?void 0:c.subMenus.length)>0&&(l=(r=z.value)==null?void 0:r.map(s=>({value:s})),l.unshift({value:(p=h.value)==null?void 0:p.title}));let u;g.type==="create"?u={...T.value,path:(f=b.value)==null?void 0:f.path}:g.type==="update"&&(u=q.value),await C.setConfigMenu(u),ee.setSelectTitle(l),F.setIsEdit("edit")},x=async e=>{var l,u,n,c,r,p;const t=await k.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}}):[]),j.value=!1},H=async(e,t,l="contentConfig")=>{var u,n,c,r,p,f;try{let s,y;t==="create"?(s={key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:$.value+"/"+((u=b.value)==null?void 0:u.path),type:"structure",rootNodePath:(c=(n=b.value)==null?void 0:n.rootNode)==null?void 0:c.path,structureBelong:l,parentTable:"",version:1},value:{pageData:e}},y=k.createInsofDataApi):t==="update"?(s={id:e==null?void 0:e.id,value:{pageData:e}},y=k.updateInsofDataApi):t==="delete"&&(s={id:e},y=k.deleteInsofDataApi);const a=await y(s);if(((r=a==null?void 0:a.data)==null?void 0:r.code)!==200)throw w.ElMessage.error("保存响应失败"),new Error("保存响应失败");const d=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:d,key:l}}}catch{w.ElMessage.error("保存响应失败")}},Z=(e,t)=>{var f,s,y;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=(y=e==null?void 0:e.flatMap(a=>a==null?void 0:a.data))==null?void 0:y.filter(a=>a==null?void 0:a.id).filter(a=>Object.keys(a).length>1),{deleteIds:c,createComps:r,updateComps:p}},m=(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},Me=e=>{const t=new Map;return e.forEach(l=>{t.set(l.id,l)}),Array.from(t.values())},De=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"),y=e==null?void 0:e.filter(o=>(o==null?void 0:o.key)==="dialogConfig");await i.nextTick();const a=(n=(u=(l=K.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 d=(p=(r=(c=K.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);d=[...d,...(f=oe.value)==null?void 0:f.map(o=>o==null?void 0:o.id)];const M=Z(y,a),D=Z(s,d),A=m("dialogConfig",M),P=m("contentConfig",D),E=[...A,...P];await Promise.all(E).then(o=>{var G,L,V,Q,W,X,Y;if(!(o==null?void 0:o.every(v=>v.status)))return;let N=(G=o==null?void 0:o.flatMap(v=>v==null?void 0:v.data))==null?void 0:G.filter(v=>(v==null?void 0:v.id)!==null&&(v==null?void 0:v.id)!==void 0);if(((L=M==null?void 0:M.updateComps)==null?void 0:L.length)===0&&g.type==="update"){const v=(Q=(V=h.value)==null?void 0:V.structureIds)==null?void 0:Q.filter(S=>(S==null?void 0:S.key)==="dialogConfig");N=[...N,...v]}if(((W=D==null?void 0:D.updateComps)==null?void 0:W.length)===0&&g.type==="update"){const v=(Y=(X=h.value)==null?void 0:X.structureIds)==null?void 0:Y.filter(S=>(S==null?void 0:S.key)==="contentConfig");N=[...N,...v]}const ce=Me(N);se({...t,isNotInitial:!0,structureIds:ce},g.type)}).catch(o=>{w.ElMessage.error(o)})}catch(s){throw w.ElMessage.error(s),new Error(s)}},se=async(e,t)=>{var n,c;let l,u;t==="create"?(l={key:{type:"menuConfigData",systemKey:sessionStorage.getItem("systemKey"),pageKey:$.value+"/"+((n=b.value)==null?void 0:n.path),tableId:"",rootNodePath:e==null?void 0:e.rootNodePath},value:{tableData:e}},u=k.createInsofDataApi):t==="update"?(l={id:e==null?void 0:e.id,value:{tableData:e}},u=k.updateInsofDataApi):t==="delete"&&(l={ids:[e.id,...(c=e==null?void 0:e.structureIds)==null?void 0:c.map(r=>r.id)]},u=k.batchDeleteInsofDataApi),pe.handleSubmitAsync(u,l,t).then(r=>{t==="create"&&J.value.push({...e,id:r}),t&&r&&w.ElMessage.success("响应成功"),x(b.value)})},Se=async()=>{var l,u,n,c,r;const e=JSON.parse(I.cloneDeep(JSON.stringify(K.value)));await i.nextTick();const t=g.type==="create"?{...q.value,rootNodePath:(u=(l=b.value)==null?void 0:l.rootNode)==null?void 0:u.path}:{...q.value,rootNodePath:(c=(n=b.value)==null?void 0:n.rootNode)==null?void 0:c.path,id:(r=h.value)==null?void 0:r.id};await De(e,t),T.value={},g.show=!1,await x(b.value)},we=()=>{g.show=!1},Ne={comp:"Group",name:"/平台管理/菜单管理",compData:[{key:"groupContents",contents:[{comp:"Table",compData:le.value,name:""}]}]},Ae=Object.freeze(Object.defineProperty({__proto__:null,beforeDialogDestroy:we,buttonValue:ge,changeTrigger:Ce,changedRow:ie,clickNodeTrigger:ye,clickRowButton:he,clickSubmitForm:Se,clickTrigger:Te,dialogInfo:g,formatFormData:_,getInitialSubStructure:ue,getTableDataAsync:x,handleItemDataChange:ve,inputForm:T,menuPageData:de,operatingForm:Ie,pageData:le,renderFormData:U,tableLoading:j,tempMenuPageData:Ne,treeData:ne},Symbol.toStringTag,{value:"Module"}));exports.State=Ae;
@@ -1,14 +1,14 @@
1
1
  import { defineComponent as J, ref as u, computed as Ve, resolveComponent as n, createElementBlock as D, openBlock as k, createElementVNode as o, createVNode as t, withCtx as s, toDisplayString as A, createBlock as ue, reactive as De, Fragment as pe, renderList as xe, unref as c, createTextVNode as h, onMounted as it, watch as dt, withModifiers as ct, createCommentVNode as H } from "vue";
2
2
  import { u as ut, h as pt, i as mt } from "./request-XJsZ4h2T.js";
3
- import { u as Se, o as _t, s as de, f as ce } from "./index-DshXKN2f.js";
3
+ import { u as Se, o as _t, s as de, f as ce } from "./index-D38qJHp0.js";
4
4
  import { H as Le, I as ft, u as vt, p as gt } from "./index-rGJF9UJ9.js";
5
5
  import { s as _e } from "./index-BQ9pPu8K.js";
6
- import "./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-BhSYtqu1.js";
7
- import "./index-2VatFDli.js";
6
+ import "./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-EOt2_XRY.js";
7
+ import "./index-GSbBamu4.js";
8
8
  import "./index-BHtNKL1L.js";
9
9
  import { _ as B } from "./index.vue_vue_type_script_setup_true_lang-DRzriV-s.js";
10
- import "./index-D2iC0RdT.js";
11
- import "./index-CrXDGlUY.js";
10
+ import "./index-BWtc895B.js";
11
+ import "./index-CjSJE_W_.js";
12
12
  import { _ as W } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
13
  import { c as me } from "./clone-r23wXuC7.js";
14
14
  const yt = { class: "param-auth" }, ht = { class: "body" }, kt = { class: "node-content-wrapper" }, Ct = { class: "node-label-wrapper" }, bt = { class: "node-label" }, wt = /* @__PURE__ */ J({