ss-component-new 1.2.19 → 1.2.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{animationData-DHZB79in.js → animationData-BgVD7m_Z.js} +4 -4
- package/dist/{animationData-CM-r9wyr.cjs → animationData-CMbPkqzG.cjs} +1 -1
- package/dist/{array-DtLHXuRQ.cjs → array-CFSAyjws.cjs} +1 -1
- package/dist/{array-lSB-nT70.js → array-DPyu0w54.js} +2 -2
- package/dist/{index-BdpUfLri.cjs → index-10VrsYdM.cjs} +1 -1
- package/dist/{index-BA5XOzgo.js → index-B0IAWN2b.js} +6 -6
- package/dist/{index-CQF_xosZ.cjs → index-B1GAMEgu.cjs} +1 -1
- package/dist/{index-Cwgs7EkD.js → index-B1XSRq6_.js} +1 -1
- package/dist/index-B3GHAekq.cjs +1 -0
- package/dist/{index-qagc_PIZ.js → index-B3VR9DS9.js} +127 -127
- package/dist/{index-CYp77kPp.js → index-B42dCx1W.js} +35 -35
- package/dist/{index-BXBJvXWT.js → index-BHMxqTVw.js} +1 -1
- package/dist/{index-BZPwTn-e.js → index-BISAvhZU.js} +3 -3
- package/dist/{index-B66Gznvh.cjs → index-BIvF4-_X.cjs} +1 -1
- package/dist/{index-DLovX_qy.js → index-BIxz3VQK.js} +11 -11
- package/dist/{index-CDLzfr4U.js → index-BKM1OHVI.js} +2 -2
- package/dist/{index-CYe2gI66.cjs → index-BKPxS6l5.cjs} +1 -1
- package/dist/{index-CCZA5OMk.js → index-BKd-eN-X.js} +45 -45
- package/dist/{index-d7fMw53g.cjs → index-BSzMEymQ.cjs} +1 -1
- package/dist/{index-C0lRDd5G.cjs → index-BVORb8w5.cjs} +1 -1
- package/dist/{index-CJ18eFLi.cjs → index-BaEflW9q.cjs} +1 -1
- package/dist/{index-C461j30b.js → index-Bgje9P6C.js} +1 -1
- package/dist/{index-CKvtRDgL.cjs → index-Bm44NMcZ.cjs} +1 -1
- package/dist/{index-DoJxkMbN.js → index-BnP-OVLZ.js} +19 -19
- package/dist/{index-CUm-3IJT.cjs → index-BoBLST3L.cjs} +1 -1
- package/dist/{index-Cp9R4hVX.cjs → index-Bpa1jsWq.cjs} +1 -1
- package/dist/{index-DW-CHCUy.js → index-BsorG9sX.js} +3 -3
- package/dist/{index-CohL-xT-.js → index-Byuw-d13.js} +2 -2
- package/dist/{index-DWyHMwpG.js → index-CETOzEkF.js} +6 -6
- package/dist/{index-BwjuTBrR.js → index-CFrBvay9.js} +1 -1
- package/dist/{index-ClF5mrVY.cjs → index-CPVt8Wrk.cjs} +1 -1
- package/dist/{index-BkRpCoTx.cjs → index-CTVVACAH.cjs} +1 -1
- package/dist/{index-ct6Uwcq4.cjs → index-CahUIEFl.cjs} +1 -1
- package/dist/{index--LhAkpOq.cjs → index-CbslhDEf.cjs} +1 -1
- package/dist/{index-Dw4KeMlJ.cjs → index-Cu7pB5GB.cjs} +1 -1
- package/dist/{index-Cf79bLZO.js → index-Cu_QyXxB.js} +2 -2
- package/dist/{index-DcmGr3J0.cjs → index-CyqP7oeY.cjs} +1 -1
- package/dist/{index-BKgbkArH.cjs → index-CyzuptEh.cjs} +1 -1
- package/dist/{index-n6maO8qu.js → index-D0fqSkIt.js} +2 -2
- package/dist/{index-BfNqdIOP.js → index-D3w8CFxz.js} +4 -4
- package/dist/{index-Cqd0F9a9.js → index-DAkKNbYV.js} +12 -12
- package/dist/{index-DhqF2CA-.js → index-DRGXzdw7.js} +2 -2
- package/dist/{index-CijoI-9f.js → index-DZgwOX56.js} +6 -6
- package/dist/{index-DFXZiHSV.cjs → index-DaOTArXF.cjs} +1 -1
- package/dist/{index-9YqHJG26.js → index-DhcAF24X.js} +8 -8
- package/dist/{index-BovzU-BN.js → index-DmmUjSu_.js} +4 -4
- package/dist/{index-BWHJGJ1e.cjs → index-Do4CoXhH.cjs} +1 -1
- package/dist/{index-CAkJ-S5C.cjs → index-DpmVXC_Q.cjs} +1 -1
- package/dist/{index-C26I2eIi.cjs → index-DubsCmcm.cjs} +1 -1
- package/dist/{index-CAAtUOzM.cjs → index-DwkFRUcM.cjs} +1 -1
- package/dist/{index-CvSBsAV7.cjs → index-FGO3o5gd.cjs} +1 -1
- package/dist/{index-CutRp0mU.js → index-IplqGB4d.js} +6 -6
- package/dist/{index-Ckc2csf3.js → index-Z-Tg_cZ7.js} +2 -2
- package/dist/{index-CY02zKVE.cjs → index-bL_GpYsf.cjs} +1 -1
- package/dist/{index-CqnPwWag.js → index-lzrjiUS5.js} +2 -2
- package/dist/{index-Cd58A7uv.cjs → index-rhNfaMfG.cjs} +1 -1
- package/dist/{index-B19xwKx1.js → index-sUsojzpW.js} +1 -1
- package/dist/{index-CwVl7hYK.js → index-w38DtIEl.js} +6 -6
- package/dist/{index-BdioXHog.js → index-x1q2XfBL.js} +12 -12
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CqTDROhf.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Be4dFvUC.js} +2 -2
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DMNlG9dC.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CIRzfvAn.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-DZZXEjAk.js → index.vue_vue_type_style_index_0_scoped_92477073_lang-6zdxGopn.js} +13 -13
- package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-CM9szr9Y.cjs → index.vue_vue_type_style_index_0_scoped_92477073_lang-97ZyXl6J.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-DCpKvb-8.js → index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-BgIXU87c.js} +11641 -11513
- package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-CY0MiFwy.cjs +56 -0
- package/dist/{index.vue_vue_type_style_index_1_lang-CecxMizO.cjs → index.vue_vue_type_style_index_1_lang-29vzgcAi.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_1_lang-BswQV5Lr.js → index.vue_vue_type_style_index_1_lang-CtkjAjQ8.js} +3 -3
- package/dist/index.vue_vue_type_style_index_1_lang-DUZFMfkl.js +8310 -0
- package/dist/index.vue_vue_type_style_index_1_lang-ckXQqCiT.cjs +32 -0
- package/dist/{isString-BNK38WbE.js → isString-BrYdkZh8.js} +1 -1
- package/dist/{main-oZpjzC8J.cjs → main-Bt-9WV5Z.cjs} +1 -1
- package/dist/{main-DD4ds9VF.js → main-DNN-2mgC.js} +5 -5
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +11 -11
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +12 -12
- package/dist/{threeLatheView-Bp0kjo_V.js → threeLatheView-DuqX5kKf.js} +2 -2
- package/dist/{threeModel-CFk-bjEz.cjs → threeModel-14TQ7qah.cjs} +1 -1
- package/dist/{threeModel-od894OgJ.js → threeModel-KPFJkl4n.js} +3 -3
- package/dist/{threePreview-DFFjm93P.js → threePreview-B7C8gY5w.js} +1 -1
- package/dist/{threeSceneView-DKa3NvXL.cjs → threeSceneView-Bb-MdEV9.cjs} +1 -1
- package/dist/{threeSceneView-J9yJnd-8.js → threeSceneView-SrIIrGLz.js} +8 -8
- package/dist/{threeSceneViewForCPMPIP-C9RBmFtK.js → threeSceneViewForCPMPIP-CN_9lSRm.js} +25 -25
- package/dist/{threeSceneViewForCPMPIP-cGJ49EX2.cjs → threeSceneViewForCPMPIP-Da6YyhFH.cjs} +1 -1
- package/dist/{threeViewerHost-Cpea-3lX.js → threeViewerHost-BwiicdtA.js} +10 -10
- package/dist/{threeViewerHost-DqllErXG.cjs → threeViewerHost-U-AzJqIN.cjs} +1 -1
- package/dist/{useRayCaster-B2SPBFYC.js → useRayCaster-Bx73bXeL.js} +1 -1
- package/dist/{useRayCaster-CjOF8Be7.cjs → useRayCaster-CnW80o7b.cjs} +1 -1
- package/package.json +1 -1
- package/dist/index-BRbH6lIH.cjs +0 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-_Oz7xRLf.cjs +0 -56
- package/dist/index.vue_vue_type_style_index_1_lang-CT_2jezv.cjs +0 -32
- package/dist/index.vue_vue_type_style_index_1_lang-DMXip4Xp.js +0 -8260
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const g=require("vue"),O=require("./index.vue_vue_type_style_index_1_lang-CT_2jezv.cjs"),i=require("./index-1z9RrjZc.cjs"),pe=require("./index-BRbH6lIH.cjs"),A=O.useModelComp(i.pinia),m=pe.useUnit(i.pinia),I=O.useMenuState(i.pinia),{menus:ee,configMenu:B,activeMenuPath:q,cacheStructures:E}=i.storeToRefs(I),j=g.ref(!1),te=g.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(ee.value))==null?void 0:e.map(l=>({...l,menuType:"系统菜单"})))==null?void 0:t.filter(l=>l.title!=="系统管理"&&l.title!=="平台管理")}]}),$=g.ref([]),H=g.ref([{label:"新建"}]),fe=g.computed(()=>[{key:"extraButton",contents:H.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:$.value}]),J=g.ref([]),k=g.ref({}),de=g.ref({}),_=g.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}]),R=e=>{var t;J.value=e?(t=_.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]:""}):_.value},ie=g.ref([{label:"查询"},{label:"重置"}]),ge=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}),v=g.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),U=g.ref([]),C=g.ref({}),h=g.ref(null),ae=g.ref([]),oe=g.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 i.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})}},ve=async e=>{var t;j.value=!0,h.value={...e,rootNode:i.findRootNodeByPath(oe.value,e.path)},I.setCacheStructures(null),(e==null?void 0:e.level)===0?H.value.splice(0):(H.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 F(e)},ye=e=>{switch(e){case"新建":return"create";case"修改":return"update";case"删除":return"delete"}},be=async(e,t)=>{var l,u;if(!h.value)return i.ElMessage.warning("请先选择菜单");if(v.type=ye(e),U.value=[],A.setSubmitCurStructure(!1),m.setSelectTitle([]),C.value=i.cloneDeep(t),v.type!=="delete"){switch(v.type){case"create":R(null),await I.setConfigMenu(null);break;case"update":R(C.value),await I.setConfigMenu(C.value),console.log("clickRowButton",C.value);break}await g.nextTick(),v.title=`【${v.type==="create"?(l=h.value)==null?void 0:l.path:(u=C.value)==null?void 0:u.path}】菜单配置${e}`,v.show=!0}else await re(C.value,v.type)},ue=g.ref(!0),he=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)!=="新增"};g.watch(()=>ue.value,async e=>{var t;await g.nextTick(),J.value=(t=_.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 Ce=g.ref(null),Ie=async(e,t)=>{var r,p,f,s,b;if(v.type==="create"){const a=(p=(r=E.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);A.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 i.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 T,M,w,N,P,o,K;return{id:(w=(M=(T=d==null?void 0:d.data)==null?void 0:T.result)==null?void 0:M[0])==null?void 0:w.id,...(K=(o=(P=(N=d==null?void 0:d.data)==null?void 0:N.result)==null?void 0:P[0])==null?void 0:o.value)==null?void 0:K.pageData}});A.setItemData(a),I.setCacheStructures({key:t,data:a})}},ke=async e=>{var n,c,r,p,f;const t=e==="操作触发的弹窗结构"?"dialogConfig":"contentConfig";I.setButtonTriggerType(t),await Ie(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;v.type==="create"?u={...k.value,path:(f=h.value)==null?void 0:f.path}:v.type==="update"&&(u=B.value),await I.setConfigMenu(u),m.setSelectTitle(l),A.setIsEdit("edit")},F=async e=>{var l,u,n,c,r,p;const t=await i.getInsofDataApi({key:{type:"menuConfigData",systemKey:sessionStorage.getItem("systemKey"),pageKey:q.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&&($.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},x=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:q.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=i.createInsofDataApi):t==="update"?(s={id:e==null?void 0:e.id,value:{pageData:e}},b=i.updateInsofDataApi):t==="delete"&&(s={id:e},b=i.deleteInsofDataApi);const a=await b(s);if(((r=a==null?void 0:a.data)==null?void 0:r.code)!==200)throw i.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{i.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(x(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(x(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(x(s,"update",e))})),l},Te=e=>{const t=new Map;return e.forEach(l=>{t.set(l.id,l)}),Array.from(t.values())},Me=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 g.nextTick();const a=(n=(u=(l=E.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=E.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=ae.value)==null?void 0:f.map(o=>o==null?void 0:o.id)];const T=Y(b,a),M=Y(s,d),w=Z("dialogConfig",T),N=Z("contentConfig",M),P=[...w,...N];await Promise.all(P).then(o=>{var z,G,L,V,Q,W,X;if(!(o==null?void 0:o.every(y=>y.status)))return;let S=(z=o==null?void 0:o.flatMap(y=>y==null?void 0:y.data))==null?void 0:z.filter(y=>(y==null?void 0:y.id)!==null&&(y==null?void 0:y.id)!==void 0);if(((G=T==null?void 0:T.updateComps)==null?void 0:G.length)===0&&v.type==="update"){const y=(V=(L=C.value)==null?void 0:L.structureIds)==null?void 0:V.filter(D=>(D==null?void 0:D.key)==="dialogConfig");S=[...S,...y]}if(((Q=M==null?void 0:M.updateComps)==null?void 0:Q.length)===0&&v.type==="update"){const y=(X=(W=C.value)==null?void 0:W.structureIds)==null?void 0:X.filter(D=>(D==null?void 0:D.key)==="contentConfig");S=[...S,...y]}const ce=Te(S);re({...t,isNotInitial:!0,structureIds:ce},v.type)}).catch(o=>{i.ElMessage.error(o)})}catch(s){throw i.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:q.value+"/"+((n=h.value)==null?void 0:n.path),tableId:"",rootNodePath:e==null?void 0:e.rootNodePath},value:{tableData:e}},u=i.createInsofDataApi):t==="update"?(l={id:e==null?void 0:e.id,value:{tableData:e}},u=i.updateInsofDataApi):t==="delete"&&(l={ids:[e.id,...(c=e==null?void 0:e.structureIds)==null?void 0:c.map(r=>r.id)]},u=i.batchDeleteInsofDataApi),O.handleSubmitAsync(u,l,t).then(r=>{t==="create"&&$.value.push({...e,id:r}),t&&r&&i.ElMessage.success("响应成功"),F(h.value)})},De=async()=>{var l,u,n,c,r;const e=JSON.parse(i.cloneDeep(JSON.stringify(E.value)));await g.nextTick();const t=v.type==="create"?{...B.value,rootNodePath:(u=(l=h.value)==null?void 0:l.rootNode)==null?void 0:u.path}:{...B.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 Me(e,t),k.value={},v.show=!1,await F(h.value)},Se=()=>{v.show=!1},se={comp:"Group",name:"/平台管理/菜单管理",compData:[{key:"groupContents",contents:[{comp:"Table",compData:te.value,name:""}]}]},we=Object.freeze(Object.defineProperty({__proto__:null,beforeDialogDestroy:Se,buttonValue:ie,changeTrigger:he,changedRow:de,clickNodeTrigger:ve,clickRowButton:be,clickSubmitForm:De,clickTrigger:ke,dialogInfo:v,formatFormData:R,getInitialSubStructure:ne,getTableDataAsync:F,handleItemDataChange:ge,inputForm:k,menuPageData:fe,operatingForm:Ce,pageData:te,renderFormData:J,tableLoading:j,tempMenuPageData:se,treeData:oe},Symbol.toStringTag,{value:"Module"}));exports.State=we;exports.tempMenuPageData=se;
|
|
1
|
+
"use strict";const g=require("vue"),O=require("./index.vue_vue_type_style_index_1_lang-ckXQqCiT.cjs"),i=require("./index-1z9RrjZc.cjs"),pe=require("./index-B3GHAekq.cjs"),A=O.useModelComp(i.pinia),m=pe.useUnit(i.pinia),I=O.useMenuState(i.pinia),{menus:ee,configMenu:B,activeMenuPath:q,cacheStructures:E}=i.storeToRefs(I),j=g.ref(!1),te=g.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(ee.value))==null?void 0:e.map(l=>({...l,menuType:"系统菜单"})))==null?void 0:t.filter(l=>l.title!=="系统管理"&&l.title!=="平台管理")}]}),$=g.ref([]),H=g.ref([{label:"新建"}]),fe=g.computed(()=>[{key:"extraButton",contents:H.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:$.value}]),J=g.ref([]),k=g.ref({}),de=g.ref({}),_=g.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}]),R=e=>{var t;J.value=e?(t=_.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]:""}):_.value},ie=g.ref([{label:"查询"},{label:"重置"}]),ge=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}),v=g.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),U=g.ref([]),C=g.ref({}),h=g.ref(null),ae=g.ref([]),oe=g.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 i.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})}},ve=async e=>{var t;j.value=!0,h.value={...e,rootNode:i.findRootNodeByPath(oe.value,e.path)},I.setCacheStructures(null),(e==null?void 0:e.level)===0?H.value.splice(0):(H.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 F(e)},ye=e=>{switch(e){case"新建":return"create";case"修改":return"update";case"删除":return"delete"}},be=async(e,t)=>{var l,u;if(!h.value)return i.ElMessage.warning("请先选择菜单");if(v.type=ye(e),U.value=[],A.setSubmitCurStructure(!1),m.setSelectTitle([]),C.value=i.cloneDeep(t),v.type!=="delete"){switch(v.type){case"create":R(null),await I.setConfigMenu(null);break;case"update":R(C.value),await I.setConfigMenu(C.value),console.log("clickRowButton",C.value);break}await g.nextTick(),v.title=`【${v.type==="create"?(l=h.value)==null?void 0:l.path:(u=C.value)==null?void 0:u.path}】菜单配置${e}`,v.show=!0}else await re(C.value,v.type)},ue=g.ref(!0),he=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)!=="新增"};g.watch(()=>ue.value,async e=>{var t;await g.nextTick(),J.value=(t=_.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 Ce=g.ref(null),Ie=async(e,t)=>{var r,p,f,s,b;if(v.type==="create"){const a=(p=(r=E.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);A.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 i.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 T,M,w,N,P,o,K;return{id:(w=(M=(T=d==null?void 0:d.data)==null?void 0:T.result)==null?void 0:M[0])==null?void 0:w.id,...(K=(o=(P=(N=d==null?void 0:d.data)==null?void 0:N.result)==null?void 0:P[0])==null?void 0:o.value)==null?void 0:K.pageData}});A.setItemData(a),I.setCacheStructures({key:t,data:a})}},ke=async e=>{var n,c,r,p,f;const t=e==="操作触发的弹窗结构"?"dialogConfig":"contentConfig";I.setButtonTriggerType(t),await Ie(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;v.type==="create"?u={...k.value,path:(f=h.value)==null?void 0:f.path}:v.type==="update"&&(u=B.value),await I.setConfigMenu(u),m.setSelectTitle(l),A.setIsEdit("edit")},F=async e=>{var l,u,n,c,r,p;const t=await i.getInsofDataApi({key:{type:"menuConfigData",systemKey:sessionStorage.getItem("systemKey"),pageKey:q.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&&($.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},x=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:q.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=i.createInsofDataApi):t==="update"?(s={id:e==null?void 0:e.id,value:{pageData:e}},b=i.updateInsofDataApi):t==="delete"&&(s={id:e},b=i.deleteInsofDataApi);const a=await b(s);if(((r=a==null?void 0:a.data)==null?void 0:r.code)!==200)throw i.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{i.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(x(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(x(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(x(s,"update",e))})),l},Te=e=>{const t=new Map;return e.forEach(l=>{t.set(l.id,l)}),Array.from(t.values())},Me=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 g.nextTick();const a=(n=(u=(l=E.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=E.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=ae.value)==null?void 0:f.map(o=>o==null?void 0:o.id)];const T=Y(b,a),M=Y(s,d),w=Z("dialogConfig",T),N=Z("contentConfig",M),P=[...w,...N];await Promise.all(P).then(o=>{var z,G,L,V,Q,W,X;if(!(o==null?void 0:o.every(y=>y.status)))return;let S=(z=o==null?void 0:o.flatMap(y=>y==null?void 0:y.data))==null?void 0:z.filter(y=>(y==null?void 0:y.id)!==null&&(y==null?void 0:y.id)!==void 0);if(((G=T==null?void 0:T.updateComps)==null?void 0:G.length)===0&&v.type==="update"){const y=(V=(L=C.value)==null?void 0:L.structureIds)==null?void 0:V.filter(D=>(D==null?void 0:D.key)==="dialogConfig");S=[...S,...y]}if(((Q=M==null?void 0:M.updateComps)==null?void 0:Q.length)===0&&v.type==="update"){const y=(X=(W=C.value)==null?void 0:W.structureIds)==null?void 0:X.filter(D=>(D==null?void 0:D.key)==="contentConfig");S=[...S,...y]}const ce=Te(S);re({...t,isNotInitial:!0,structureIds:ce},v.type)}).catch(o=>{i.ElMessage.error(o)})}catch(s){throw i.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:q.value+"/"+((n=h.value)==null?void 0:n.path),tableId:"",rootNodePath:e==null?void 0:e.rootNodePath},value:{tableData:e}},u=i.createInsofDataApi):t==="update"?(l={id:e==null?void 0:e.id,value:{tableData:e}},u=i.updateInsofDataApi):t==="delete"&&(l={ids:[e.id,...(c=e==null?void 0:e.structureIds)==null?void 0:c.map(r=>r.id)]},u=i.batchDeleteInsofDataApi),O.handleSubmitAsync(u,l,t).then(r=>{t==="create"&&$.value.push({...e,id:r}),t&&r&&i.ElMessage.success("响应成功"),F(h.value)})},De=async()=>{var l,u,n,c,r;const e=JSON.parse(i.cloneDeep(JSON.stringify(E.value)));await g.nextTick();const t=v.type==="create"?{...B.value,rootNodePath:(u=(l=h.value)==null?void 0:l.rootNode)==null?void 0:u.path}:{...B.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 Me(e,t),k.value={},v.show=!1,await F(h.value)},Se=()=>{v.show=!1},se={comp:"Group",name:"/平台管理/菜单管理",compData:[{key:"groupContents",contents:[{comp:"Table",compData:te.value,name:""}]}]},we=Object.freeze(Object.defineProperty({__proto__:null,beforeDialogDestroy:Se,buttonValue:ie,changeTrigger:he,changedRow:de,clickNodeTrigger:ve,clickRowButton:be,clickSubmitForm:De,clickTrigger:ke,dialogInfo:v,formatFormData:R,getInitialSubStructure:ne,getTableDataAsync:F,handleItemDataChange:ge,inputForm:k,menuPageData:fe,operatingForm:Ce,pageData:te,renderFormData:J,tableLoading:j,tempMenuPageData:se,treeData:oe},Symbol.toStringTag,{value:"Module"}));exports.State=we;exports.tempMenuPageData=se;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ref as me, computed as vt, resolveComponent as $t, createElementBlock as be, openBlock as fe, Fragment as Nt, renderList as Ht, createElementVNode as ve, toDisplayString as st, createVNode as he, watch as ue, withCtx as Me, createBlock as Wt, resolveDynamicComponent as gr, createTextVNode as pn, createCommentVNode as gt, normalizeStyle as mn, withModifiers as Dt, defineComponent as mr, inject as rr, shallowRef as Ni, reactive as Yt, toRef as Hi, onBeforeMount as yr, onMounted as br, watchEffect as Wi, onBeforeUnmount as xr, normalizeClass as ir, renderSlot as dn, nextTick as Ye, provide as or, toRefs as ar, withDirectives as Yi, mergeProps as Xi, vShow as Vi, unref as sr } from "vue";
|
|
2
|
-
import { r as fn, g as wr } from "./index-
|
|
3
|
-
import { p as yn, s as bn, c as De, E as Gi } from "./index-
|
|
4
|
-
import { a as xn, E as Ui } from "./index.vue_vue_type_style_index_1_lang-
|
|
5
|
-
import { i as Ce, o as ke, b as lr, w as qi, Z as Ki, n as Ji } from "./array-
|
|
2
|
+
import { r as fn, g as wr } from "./index-DAkKNbYV.js";
|
|
3
|
+
import { p as yn, s as bn, c as De, E as Gi } from "./index-B42dCx1W.js";
|
|
4
|
+
import { a as xn, E as Ui } from "./index.vue_vue_type_style_index_1_lang-DUZFMfkl.js";
|
|
5
|
+
import { i as Ce, o as ke, b as lr, w as qi, Z as Ki, n as Ji } from "./array-DPyu0w54.js";
|
|
6
6
|
import { _ as wn } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
7
|
import Zi from "./index-DiRBJiMW.js";
|
|
8
|
-
import { a as Qi, b as eo } from "./index-
|
|
9
|
-
import { g as to } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-
|
|
8
|
+
import { a as Qi, b as eo } from "./index-w38DtIEl.js";
|
|
9
|
+
import { g as to } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Be4dFvUC.js";
|
|
10
10
|
const no = { class: "type-select" }, ro = { class: "group-label" }, io = { class: "group-items" }, oo = ["onDragstart"], ao = {
|
|
11
11
|
__name: "index",
|
|
12
12
|
props: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as l, reactive as c, onMounted as s, createElementBlock as r, openBlock as i, createVNode as p } from "vue";
|
|
2
|
-
import { S as m } from "./index-
|
|
3
|
-
import { s as _ } from "./index-
|
|
2
|
+
import { S as m } from "./index-lzrjiUS5.js";
|
|
3
|
+
import { s as _ } from "./index-B3VR9DS9.js";
|
|
4
4
|
import { _ as d } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
const f = { class: "log-wrap" }, u = /* @__PURE__ */ l({
|
|
6
6
|
__name: "index",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),l=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),l=require("./index-Bpa1jsWq.cjs"),_=require("./index-CahUIEFl.cjs");require("./index-BpPyaNFa.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CIRzfvAn.cjs");const h=require("./index-DaOTArXF.cjs");require("./index.vue_vue_type_style_index_1_lang-ckXQqCiT.cjs");const f=require("./index-1z9RrjZc.cjs"),y=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),V={class:"personal-wrapper"},x={class:"personal-box left"},N={class:"base-avatar"},S={class:"center-avatar"},D={class:"base-info"},E={class:"base-signature"},k={class:"personal-box right"},B=e.defineComponent({__name:"index",setup(T){const t=e.reactive({...l.State}),b=f.useLoginState(),{loginUserInfo:n}=f.storeToRefs(b);return e.onMounted(()=>{var s;t.getUserTableHeadersAsync(),t.refreshLoginUserInfoAsync((s=n==null?void 0:n.value)==null?void 0:s.id),l.tabKey.value++}),(s,o)=>{var c,d,u,g,p,m,v;const r=e.resolveComponent("svg-icon"),i=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",V,[e.createElementVNode("div",x,[e.createElementVNode("div",N,[e.createElementVNode("div",S,[e.withDirectives(e.createVNode(_.ssAvatar,{size:100,disabled:t.uploadDisabled,userInfo:e.unref(n),onSubmitImage:o[0]||(o[0]=a=>t.submitImageAsync("avatarUrl",a))},null,8,["disabled","userInfo"]),[[i,t.avatarLoading]])])]),e.createElementVNode("div",D,[e.createElementVNode("div",null,[e.createVNode(r,{name:"userAccount",style:{width:"15px",height:"15px"}}),e.createElementVNode("span",null,e.toDisplayString(((c=e.unref(n))==null?void 0:c.account)||(((d=e.unref(n))==null?void 0:d.姓名)??"未知")),1)]),e.createElementVNode("div",null,[e.createVNode(r,{name:"role",style:{width:"15px",height:"15px"}}),e.createElementVNode("span",null,e.toDisplayString(((u=e.unref(n))==null?void 0:u.layer)==="superAdmin"?"超级管理员":((g=e.unref(n))==null?void 0:g.角色名称)??"未知"),1)]),e.createElementVNode("div",null,[e.createVNode(r,{name:"dept",style:{width:"15px",height:"15px"}}),e.createElementVNode("span",null,e.toDisplayString(((p=e.unref(n))==null?void 0:p.部门名称)??"未知"),1)]),e.createElementVNode("div",null,[e.createVNode(r,{name:"status",style:{width:"15px",height:"15px"}}),e.createElementVNode("span",null,e.toDisplayString(((m=e.unref(n))==null?void 0:m.layer)==="superAdmin"?"启用":((v=e.unref(n))==null?void 0:v.状态)??"未知"),1)])]),e.createElementVNode("div",E,[e.withDirectives(e.createVNode(_.ssSignature,{userInfo:e.unref(n),itemData:t.itemData,onClickSignButton:t.clickSignButton,onBeforeDestroy:t.beforeSignDestroy,onClickSubmitSign:o[1]||(o[1]=a=>t.submitImageAsync("signature",a))},null,8,["userInfo","itemData","onClickSignButton","onBeforeDestroy"]),[[i,t.signatureLoading]])])]),e.withDirectives((e.openBlock(),e.createElementBlock("div",k,[(e.openBlock(),e.createBlock(h.ssTab,{key:e.unref(l.tabKey),tabsContents:t.tabsContents,onChangeTrigger:t.changeFormTrigger,onClickTrigger:t.clickTabButton},null,8,["tabsContents","onChangeTrigger","onClickTrigger"]))])),[[i,t.loading]])])}}}),C=y._export_sfc(B,[["__scopeId","data-v-3bdf3f4b"]]);exports.default=C;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref as _, computed as A } from "vue";
|
|
2
|
-
import { d as I, E as s, g as M } from "./index-
|
|
3
|
-
import { E as N } from "./index.vue_vue_type_style_index_1_lang-
|
|
2
|
+
import { d as I, E as s, g as M } from "./index-B42dCx1W.js";
|
|
3
|
+
import { E as N } from "./index.vue_vue_type_style_index_1_lang-DUZFMfkl.js";
|
|
4
4
|
const K = _([]), T = A(() => [
|
|
5
5
|
{
|
|
6
6
|
key: "extraButton",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),T=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),N=require("./index.vue_vue_type_style_index_1_lang-CT_2jezv.cjs"),W=require("vue-router"),y=require("./index-1z9RrjZc.cjs"),$=require("./index-CQF_xosZ.cjs"),H={},z={class:"left-wrap"},ee={class:"left-bg"};function te(C,S){return e.openBlock(),e.createElementBlock("div",z,[e.createElementVNode("div",ee,[e.renderSlot(C.$slots,"img",{},void 0,!0)])])}const ae=T._export_sfc(H,[["render",te],["__scopeId","data-v-9b7ee6c9"]]),ne={class:"right-wrap"},oe={class:"right-title"},se={class:"right-content"},re={class:"tab-content"},ce={class:"tab-tips"},le=e.defineComponent({__name:"index",props:{tabList:{type:Array,default:[]},loading:{type:Boolean,default:!1}},emits:["clickLogin","handleTabClick"],setup(C,{emit:S}){const _=e.ref("account"),l=S,b=()=>{l("clickLogin",_.value)},v=()=>{l("handleTabClick",_.value)};return(p,g)=>{const f=e.resolveComponent("el-button"),A=e.resolveComponent("el-tab-pane"),m=e.resolveComponent("el-tabs");return e.openBlock(),e.createElementBlock("div",ne,[e.createElementVNode("div",oe,[e.renderSlot(p.$slots,"title",{},void 0,!0)]),e.createElementVNode("div",se,[e.createVNode(m,{modelValue:_.value,"onUpdate:modelValue":g[0]||(g[0]=w=>_.value=w),class:"right-tabs",onTabClick:v},{default:e.withCtx(()=>[e.createVNode(A,{name:"account"},{label:e.withCtx(()=>[e.renderSlot(p.$slots,"tabLabel2",{},void 0,!0)]),default:e.withCtx(()=>[e.createElementVNode("div",re,[e.renderSlot(p.$slots,"tabContent2",{},void 0,!0)]),e.createElementVNode("div",{class:"tab-button special",onClick:b},[e.createVNode(f,{loading:C.loading},{default:e.withCtx(()=>[e.renderSlot(p.$slots,"tabButton2",{},void 0,!0)]),_:3},8,["loading"])]),e.createElementVNode("div",ce,[e.renderSlot(p.$slots,"tabTips2",{},void 0,!0)])]),_:3})]),_:3},8,["modelValue"])])])}}}),ie=T._export_sfc(le,[["__scopeId","data-v-3ebcb6e2"]]),de={class:"account-wrap"},ue=e.defineComponent({__name:"index",props:{activeTabName:{type:String,default:""},isClickLogin:{type:Boolean,default:!1}},emits:["handleLoginFormChange"],setup(C,{emit:S}){const _=C,l=e.reactive({account:"",password:""}),b=e.reactive({account:[{required:!0,message:"请输入账号",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"}]}),v=e.ref(null),p=S;return e.watch(()=>_.isClickLogin,g=>{var f;g&&((f=v.value)==null||f.validate(A=>{var m;for(let w in l)l.hasOwnProperty(w)&&(l[w]=(m=l[w])==null?void 0:m.trim());p("handleLoginFormChange",A,A?l:null)}))},{immediate:!0}),e.watch(()=>_.activeTabName,g=>{var f;g&&((f=v.value)==null||f.resetFields())}),(g,f)=>{const A=e.resolveComponent("svg-icon"),m=e.resolveComponent("el-input"),w=e.resolveComponent("el-form-item"),B=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",de,[e.createVNode(B,{model:l,rules:b,ref_key:"formRef",ref:v},{default:e.withCtx(()=>[e.createVNode(w,{label:"",prop:"account"},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:l.account,"onUpdate:modelValue":f[0]||(f[0]=I=>l.account=I),placeholder:"请输入账号",clearable:""},{prefix:e.withCtx(()=>[e.createVNode(A,{name:"account",style:{width:"15px",height:"15px"}})]),_:1},8,["modelValue"])]),_:1}),e.createVNode(w,{label:"",prop:"password"},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:l.password,"onUpdate:modelValue":f[1]||(f[1]=I=>l.password=I),type:"password",placeholder:"请输入密码","show-password":"",clearable:""},{prefix:e.withCtx(()=>[e.createVNode(A,{name:"password",style:{width:"15px",height:"15px"}})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])])}}}),pe=T._export_sfc(ue,[["__scopeId","data-v-702adefe"]]),fe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAgCAYAAAB6kdqOAAAAAXNSR0IArs4c6QAAAd9JREFUWEftl71OAkEQx/97QC8XEj+iiTGexo/OnvgE0ChPIIXHQwgP4amxsYZGnkCtpbAxxiyJFEqCJie1yK7ZixhUuNtZYkLUa2/+M7+ZnbnbYTB87P3bIpi1BWCt34UEzpkUF35huWjimpmIlCbp8TMGbA7RX/uus27i2xjI9rgMC+i7jpFvI5EC+XEg2+NlSKTBMKmTuS5QlB2ApgRqz66TVXGDCmmIPhh7RxGl0bXrT15pWNLjVQZkdBuwF0i3qaPAv8StMNvjDwBmdIGQwJyfd+51xn7i4GbekvE7bd8SLQUUOi3fnElR0v3GvEPvaQOpHiIDKe9SlIQlTtq7K41BwexjPosXsQNmkWCCpjYCoqRMtP0HiirY76uQBWQRS1xalhCvnW4aQDmqCmHvR6rQsB/oKIMyClDOd53KoGxTHs8IoGpSKWOgeCI29ZhfaA0EOmpMi26n+beBAIzXkanjGLemDlpkrMbepGmjNMZTFuXY9D0dSF09wE7bhaWrsKD2IV+FgNrNtilwVKCK7zo5SgDqJY0EFJPMeSos1ilAKa++ISBruhoSUNi3Z1hA2+PqyLR/uPRLvm6qJnbqkk9dg0ziEDQV8qJIcE42DRbFnkp3lSZHiRZ8WqXfAFwe+He0YFLSAAAAAElFTkSuQmCC",ye="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAx1JREFUWEfFV01oE1EQnnmpYJRGL/6gYsGLVCoUzMGLNrO1B4sYKooXQT0JWtSK4KEHEVERPCjUHgqCQlFED4raUmP3bS0UhRQKnrTorQdFBBOkBZP97AuJbNo0+2KF7GlJ3sz3zcw3M2+Z6vxwnfHJmkAqlVrT0NCwB8BepdQuAOuJaEMxgK/M/M33/UlmfpvL5cY7Ojp+2gQXSiCdTq/IZrNniOg0gM1WTplniKi/sbHxbjwe/13NpioBrXUcwB0iarUBrnBmipnPiUh6KfslCXiet9/3/af/CFxmppQ6nEgkhiv5qkhAa90N4Ob/AC/5YOZLItK30OciAlrrAwAe24Iz8yul1A0imgPQ5ft+75LpZj4qIi+D/5cRMILLZDJejTXvcRxnwDgdGxtrzufzS9abiKZisVgiKMwyAlrr8wCu2UZvzjHzgIj0mHet9fH59uyvqnrmXhG5/bc0pZehoaFYNBpN27ZaoLY/mPk1EeUAmDnRFEJgZnZ2Nt7Z2ZkpBFA6rLXeB+B5LdEXM/ARwPZa7Jg5KSJvygi4rnuFiC7aOlJKPSCiR4lEYrw4L0aIaKWl/S3HcS6XEfA8b9T3/d2WDoxORhzHmQxk0JSv2cZeKfVunnj7whJ8ALDNwkFBpMy8Q0SOBQhMA9hkYW9sv4jIzoUEvgFYbeHAEOgFcKK9vf1JUf0tAN5b2BaOMPMvETHLrEyEtgQKTmKx2NpSP7uue4GIri6XgG0JTARDInIkkP5hs6ZrILC4BLWIkJlPicigAZyYmIjOzc19twU35yqKsJY2zGazG5PJZNY4c103SUQPayFARIvb0HYQMfOoiBwMpL8PwEkiMkPMkAl9Kg4i21HMzGdF5F4JxfO8TwA+Axg33RGGzsyVR3GxnUKXETM3iUih5lrrFiK6T0TdRPQCwCoLApWXkTG0WceRSKS1ra1tugSUSqWa5397RkRbwsBD13ExqqoXEqXUYD6fvx6JRLYCOEREXQDWWYCb9q1+IQkIq35XsoC46ncpDWSiftfyEom6fpgEhVW3TzMbdS/nTOi34XKc29j+AXyzojCfNKqJAAAAAElFTkSuQmCC",ge={class:"card-wrap"},me={class:"card-icon card"},Ae={class:"card-input"},he={class:"card-icon info"},be=e.defineComponent({__name:"index",props:{activeTabName:{type:String,default:""}},emits:["handleCardInput"],setup(C,{emit:S}){const _=C,l=e.ref(""),b=S,v=p=>{b("handleCardInput",p==null?void 0:p.trim())};return e.watch(()=>_.activeTabName,p=>{p&&(l.value="")}),(p,g)=>{const f=e.resolveComponent("el-image"),A=e.resolveComponent("el-input");return e.openBlock(),e.createElementBlock("div",ge,[e.createElementVNode("div",me,[e.createVNode(f,{src:e.unref(fe),fit:"contain"},null,8,["src"])]),e.createElementVNode("div",Ae,[e.createVNode(A,{modelValue:l.value,"onUpdate:modelValue":g[0]||(g[0]=m=>l.value=m),onChange:v,clearable:""},null,8,["modelValue"])]),e.createElementVNode("div",he,[e.createVNode(f,{src:e.unref(ye),fit:"contain"},null,8,["src"])])])}}}),ve=T._export_sfc(be,[["__scopeId","data-v-cd989d3c"]]);function _e(){const C={account:"superadmin",password:"1c8e7623312244c1feb677732278fb8b2af6af1a5335fdaebbdb2720137b372b7871292d11165b83b2967b9c39fa37027d63d37a2f36d764257b566dcfa99f334faa8995301601aec549adf39aef8d89c8788da03a9164937a5f73af20a15ea60d47c7cf01cf",tenantId:-1,code:"",codeId:0};return y.service({url:"/api/sysAuth/login",method:"post",data:C})}const Ce={class:"login-wrap"},we={class:"login-body"},Ee={class:"login-body-item left"},Ne={class:"title"},Se={class:"login-body-item right"},ke=e.defineComponent({__name:"index",emits:["change"],setup(C,{emit:S}){const _=W.useRouter(),l=y.useLoginState(y.pinia),{systemKey:b,systemInfo:v,loginUserInfo:p}=y.storeToRefs(l),g=e.ref({sysCTitle:"",sysETitle:"",loginTitle:"账户密码登录",tabs:[{name:"刷卡登录",btnLabel:"请刷卡登录",tips:"温馨提示:建议使用谷歌、Microsoft Edge,版本79.0.1072.62及以上浏览器,360浏览器请使用极速模式"},{name:"用户名登录",btnLabel:"登录",tips:"温馨提示:建议使用谷歌、Microsoft Edge,版本79.0.1072.62及以上浏览器,360浏览器请使用极速模式"}]}),f=e.ref(""),A=e.ref(!1),m=e.ref(!1),w=()=>{A.value=!0},B=a=>{A.value=!1,L(a)},I=(a,n)=>{A.value=!1,a&&L(n)},M=a=>N.getFirstArrayProperty(a),D=a=>{let n;const o=N.convertArrayToTree(a),s=N.addPathToTree(o),i=N.getLeafNodesRecursive(s),u=N.groupByField(i,"parentPath");return n=N.handleRowAuthorityRender(u),n},R=(a,n)=>{var s,i,u;const o=(n==null?void 0:n.userRoles)??(n==null?void 0:n.角色名称);try{if(n.layer&&((s=n==null?void 0:n.layer)==null?void 0:s.toUpperCase())==="SUPERADMIN")return"superAdmin";if(Array.isArray(o)){if((o==null?void 0:o.length)===1){const r=a==null?void 0:a.find(t=>(t==null?void 0:t.roleName)===(o==null?void 0:o[0])||t.角色名称===(o==null?void 0:o[0])),h=M(r),c=D(r==null?void 0:r[h]);return r&&c&&Array.isArray(c)?r?c==null?void 0:c.flatMap(t=>t.checkedButtons):[]:[]}if((o==null?void 0:o.length)>1){let r=a==null?void 0:a.filter(t=>o==null?void 0:o.includes(t.roleName||(t==null?void 0:t.角色名称)));const h=M(r==null?void 0:r[0]),c=(u=(i=r==null?void 0:r.map(t=>Array.isArray(t==null?void 0:t[h])?t==null?void 0:t[h]:[]))==null?void 0:i.flat())==null?void 0:u.flatMap(t=>t.checkedButtons);return(c==null?void 0:c.length)===0?y.ElMessage.error("该用户没有权限,请联系管理员"):new Set(c)}}if(typeof o=="string"){const r=a==null?void 0:a.find(t=>(t==null?void 0:t.roleName)===o||(t==null?void 0:t.角色名称)===o),h=M(r),c=D(r==null?void 0:r[h]);return r&&c&&Array.isArray(c)?r?c==null?void 0:c.flatMap(t=>t.checkedButtons):[]:[]}}catch(r){throw new Error(r)}},Q=async a=>{var n,o;try{let s=[];const i=await y.getInsofDataApi({key:{systemKey:b.value?b.value:a==null?void 0:a.systemKey,pageKey:"系统管理/角色管理",type:"data"}});if(i.data.code===200){const u=(o=(n=i.data)==null?void 0:n.result)==null?void 0:o.map(r=>r.value.tableData);s=R(u,a)}if(s)return Array.isArray(s)?Array.from(s):s;throw y.ElMessage.error("获取用户权限失败,请联系管理员"),new Error("获取用户权限失败,请联系管理员")}catch(s){throw y.ElMessage.error("获取用户权限失败,请联系管理员"),new Error(s)}},q=async a=>{var n,o,s,i,u,r,h;try{let c=[],t,k,x;b.value?x={pageKey:"系统管理/用户管理",type:"data",systemKey:b.value}:x={pageKey:"系统管理/用户管理",type:"data"};const P=await y.getInsofDataApi({key:x});let K;if(!sessionStorage.getItem("systemKey")||sessionStorage.getItem("systemKey")===""?K=await y.getInsofDataApi({key:{layer:"superAdmin"}}):K=await y.getInsofDataApi({key:{layer:"superAdmin",systemKey:sessionStorage.getItem("systemKey")}}),P.data.code===200&&K.data.code===200){const j=(o=(n=K.data)==null?void 0:n.result)==null?void 0:o.map(d=>{var E,V;return{...d.value.tableData,layer:(E=d.key)==null?void 0:E.layer,systemKey:(V=d==null?void 0:d.key)==null?void 0:V.systemKey,id:d.id}}),F=(i=(s=P.data)==null?void 0:s.result)==null?void 0:i.map(d=>{var E,V;return{...d.value.tableData,layer:(E=d.key)==null?void 0:E.layer,systemKey:(V=d==null?void 0:d.key)==null?void 0:V.systemKey,id:d.id}}),U=[...j,...F];if(t=U==null?void 0:U.find(d=>(d==null?void 0:d.account)===(a==null?void 0:a.account)||(d==null?void 0:d.账号)===(a==null?void 0:a.account)),t){if(((u=t.layer)==null?void 0:u.toUpperCase())!=="SUPERADMIN"&&(!(t!=null&&t.状态)||(t==null?void 0:t.状态)==="禁用"||(t==null?void 0:t.status)==="禁用")){y.ElMessage.error("该用户已被禁用,请联系管理员"),m.value=!1;return}c=await Q(t);const{privateKey:d}=await l.getModelSecretAsync(t);let E;if(t.password?E=((r=t.layer)==null?void 0:r.toUpperCase())==="SUPERADMIN"?t.password:N.decryptData(t.password,d):E=((h=t.layer)==null?void 0:h.toUpperCase())==="SUPERADMIN"?t.password:N.resetPassword,(a==null?void 0:a.password)===E)k=t;else throw k=null,y.ElMessage.error("输入的密码错误,请重新输入"),m.value=!1,new Error("输入的密码错误,请重新输入")}else return y.ElMessage.error("该用户不存在,请重新输入")}return k&&c?{matchedUser:k,userAuthority:c}:void 0}catch(c){throw new Error(c)}},O=async a=>{var o,s,i;const n=await q(a);if(n!=null&&n.matchedUser){l.setLoginUserInfo(n.matchedUser),sessionStorage.setItem("authority",JSON.stringify(n.userAuthority));const u=((s=(o=n.matchedUser)==null?void 0:o.layer)==null?void 0:s.toUpperCase())==="SUPERADMIN";return sessionStorage.setItem("isSuperAdmin",JSON.stringify(u)),sessionStorage.setItem("systemKey",b.value?b.value:(i=n.matchedUser)==null?void 0:i.systemKey),await J(n.matchedUser),!0}else throw m.value=!1,new Error("该用户数据处理失败,请联系管理员")},J=async a=>{var o,s,i,u,r,h,c,t,k;const n=await y.getInsofDataApi({key:{layer:"superAdmin",systemKey:b.value?b.value:a==null?void 0:a.systemKey}});if(n.data.code===200&&(o=n.data)!=null&&o.result&&Array.isArray((s=n.data)==null?void 0:s.result)&&((u=(i=n.data)==null?void 0:i.result)==null?void 0:u.length)>0){const x=(k=(t=(c=(h=(r=n.data)==null?void 0:r.result)==null?void 0:h[0])==null?void 0:c.value)==null?void 0:t.tableData)==null?void 0:k.account;l.setSuperAdminInfo({account:x})}},X=async()=>{var a,n,o;try{const s=await _e();return((a=s==null?void 0:s.data)==null?void 0:a.code)===200?(sessionStorage.setItem("loginToken",(o=(n=s.data)==null?void 0:n.result)==null?void 0:o.accessToken),!0):!1}catch(s){y.ElMessage.error(s)}},G=async()=>{var a,n,o;try{const s=await y.axios.post("http://139.196.154.85:20024/api/sysAuth/login",{account:"superadmin",password:"9bf00809059adc7f57bd290bf73ddf4d16f4c83b5937e2d68144ab0bd60d045d22d70afeed8f2fa071cda536e1fac0daf12b8e63dd870c3ca8b308f23be6e693bb32ebd3d013116dc8338d6854b1332701a522a7c43706a6db4162fbe991c8c08aa842fbbc34",codeId:0,code:""});return((a=s==null?void 0:s.data)==null?void 0:a.code)===200?(sessionStorage.setItem("magicToken",(o=(n=s.data)==null?void 0:n.result)==null?void 0:o.accessToken),!0):!1}catch(s){y.ElMessage.error(s)}},L=async a=>{var i,u,r,h;m.value=!0;let n=[O(a),X(),G()];const o=await Promise.all(n);(o==null?void 0:o.every(c=>c))&&(await $.verifyStructureDataToStore(),_.push("/"),l.setLogRecordAsync({type:"登录",data:{account:((i=p.value)==null?void 0:i.account)??((u=p.value)==null?void 0:u.账号),userName:((r=p.value)==null?void 0:r.姓名)||((h=p.value)==null?void 0:h.userName)||"未知"}},"/login","login"))},Z=a=>{f.value=a,A.value=!1,m.value=!1},Y=a=>/^[\u4e00-\u9fa5\s,。!?《》“”【】]+$/.test(a);return(a,n)=>(e.openBlock(),e.createElementBlock("div",Ce,[e.createElementVNode("div",we,[e.createElementVNode("div",Ee,[e.createVNode(ae,{class:"login-left-bg"},{img:e.withCtx(()=>{var o,s,i,u;return[e.createElementVNode("div",Ne,[e.createElementVNode("div",null,e.toDisplayString(((o=e.unref(v))==null?void 0:o.EnglishName)||"INSOFWORKS"),1),e.createElementVNode("div",null,e.toDisplayString((s=e.unref(v))!=null&&s.chineseName&&Y((i=e.unref(v))==null?void 0:i.chineseName)?(u=e.unref(v))==null?void 0:u.chineseName:"工业软件集成开发平台"),1)]),n[0]||(n[0]=e.createElementVNode("div",{class:"divide-line"},null,-1))]}),_:1})]),e.createElementVNode("div",Se,[e.createVNode(ie,{loading:m.value,onClickLogin:w,onHandleTabClick:Z},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.value.loginTitle),1)]),tabLabel1:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.value.tabs[0].name),1)]),tabContent1:e.withCtx(()=>[e.createVNode(ve,{activeTabName:f.value,onHandleCardInput:B},null,8,["activeTabName"])]),tabButton1:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.value.tabs[0].btnLabel),1)]),tabLabel2:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.value.tabs[1].name),1)]),tabContent2:e.withCtx(()=>[e.createVNode(pe,{activeTabName:f.value,isClickLogin:A.value,onHandleLoginFormChange:I},null,8,["activeTabName","isClickLogin"])]),tabButton2:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.value.tabs[1].btnLabel),1)]),_:1},8,["loading"])])])]))}}),Ie=T._export_sfc(ke,[["__scopeId","data-v-756665ac"]]);exports.default=Ie;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),T=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),N=require("./index.vue_vue_type_style_index_1_lang-ckXQqCiT.cjs"),W=require("vue-router"),y=require("./index-1z9RrjZc.cjs"),$=require("./index-B1GAMEgu.cjs"),H={},z={class:"left-wrap"},ee={class:"left-bg"};function te(C,S){return e.openBlock(),e.createElementBlock("div",z,[e.createElementVNode("div",ee,[e.renderSlot(C.$slots,"img",{},void 0,!0)])])}const ae=T._export_sfc(H,[["render",te],["__scopeId","data-v-9b7ee6c9"]]),ne={class:"right-wrap"},oe={class:"right-title"},se={class:"right-content"},re={class:"tab-content"},ce={class:"tab-tips"},le=e.defineComponent({__name:"index",props:{tabList:{type:Array,default:[]},loading:{type:Boolean,default:!1}},emits:["clickLogin","handleTabClick"],setup(C,{emit:S}){const _=e.ref("account"),l=S,b=()=>{l("clickLogin",_.value)},v=()=>{l("handleTabClick",_.value)};return(p,g)=>{const f=e.resolveComponent("el-button"),A=e.resolveComponent("el-tab-pane"),m=e.resolveComponent("el-tabs");return e.openBlock(),e.createElementBlock("div",ne,[e.createElementVNode("div",oe,[e.renderSlot(p.$slots,"title",{},void 0,!0)]),e.createElementVNode("div",se,[e.createVNode(m,{modelValue:_.value,"onUpdate:modelValue":g[0]||(g[0]=w=>_.value=w),class:"right-tabs",onTabClick:v},{default:e.withCtx(()=>[e.createVNode(A,{name:"account"},{label:e.withCtx(()=>[e.renderSlot(p.$slots,"tabLabel2",{},void 0,!0)]),default:e.withCtx(()=>[e.createElementVNode("div",re,[e.renderSlot(p.$slots,"tabContent2",{},void 0,!0)]),e.createElementVNode("div",{class:"tab-button special",onClick:b},[e.createVNode(f,{loading:C.loading},{default:e.withCtx(()=>[e.renderSlot(p.$slots,"tabButton2",{},void 0,!0)]),_:3},8,["loading"])]),e.createElementVNode("div",ce,[e.renderSlot(p.$slots,"tabTips2",{},void 0,!0)])]),_:3})]),_:3},8,["modelValue"])])])}}}),ie=T._export_sfc(le,[["__scopeId","data-v-3ebcb6e2"]]),de={class:"account-wrap"},ue=e.defineComponent({__name:"index",props:{activeTabName:{type:String,default:""},isClickLogin:{type:Boolean,default:!1}},emits:["handleLoginFormChange"],setup(C,{emit:S}){const _=C,l=e.reactive({account:"",password:""}),b=e.reactive({account:[{required:!0,message:"请输入账号",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"}]}),v=e.ref(null),p=S;return e.watch(()=>_.isClickLogin,g=>{var f;g&&((f=v.value)==null||f.validate(A=>{var m;for(let w in l)l.hasOwnProperty(w)&&(l[w]=(m=l[w])==null?void 0:m.trim());p("handleLoginFormChange",A,A?l:null)}))},{immediate:!0}),e.watch(()=>_.activeTabName,g=>{var f;g&&((f=v.value)==null||f.resetFields())}),(g,f)=>{const A=e.resolveComponent("svg-icon"),m=e.resolveComponent("el-input"),w=e.resolveComponent("el-form-item"),B=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",de,[e.createVNode(B,{model:l,rules:b,ref_key:"formRef",ref:v},{default:e.withCtx(()=>[e.createVNode(w,{label:"",prop:"account"},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:l.account,"onUpdate:modelValue":f[0]||(f[0]=I=>l.account=I),placeholder:"请输入账号",clearable:""},{prefix:e.withCtx(()=>[e.createVNode(A,{name:"account",style:{width:"15px",height:"15px"}})]),_:1},8,["modelValue"])]),_:1}),e.createVNode(w,{label:"",prop:"password"},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:l.password,"onUpdate:modelValue":f[1]||(f[1]=I=>l.password=I),type:"password",placeholder:"请输入密码","show-password":"",clearable:""},{prefix:e.withCtx(()=>[e.createVNode(A,{name:"password",style:{width:"15px",height:"15px"}})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])])}}}),pe=T._export_sfc(ue,[["__scopeId","data-v-702adefe"]]),fe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAgCAYAAAB6kdqOAAAAAXNSR0IArs4c6QAAAd9JREFUWEftl71OAkEQx/97QC8XEj+iiTGexo/OnvgE0ChPIIXHQwgP4amxsYZGnkCtpbAxxiyJFEqCJie1yK7ZixhUuNtZYkLUa2/+M7+ZnbnbYTB87P3bIpi1BWCt34UEzpkUF35huWjimpmIlCbp8TMGbA7RX/uus27i2xjI9rgMC+i7jpFvI5EC+XEg2+NlSKTBMKmTuS5QlB2ApgRqz66TVXGDCmmIPhh7RxGl0bXrT15pWNLjVQZkdBuwF0i3qaPAv8StMNvjDwBmdIGQwJyfd+51xn7i4GbekvE7bd8SLQUUOi3fnElR0v3GvEPvaQOpHiIDKe9SlIQlTtq7K41BwexjPosXsQNmkWCCpjYCoqRMtP0HiirY76uQBWQRS1xalhCvnW4aQDmqCmHvR6rQsB/oKIMyClDOd53KoGxTHs8IoGpSKWOgeCI29ZhfaA0EOmpMi26n+beBAIzXkanjGLemDlpkrMbepGmjNMZTFuXY9D0dSF09wE7bhaWrsKD2IV+FgNrNtilwVKCK7zo5SgDqJY0EFJPMeSos1ilAKa++ISBruhoSUNi3Z1hA2+PqyLR/uPRLvm6qJnbqkk9dg0ziEDQV8qJIcE42DRbFnkp3lSZHiRZ8WqXfAFwe+He0YFLSAAAAAElFTkSuQmCC",ye="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAx1JREFUWEfFV01oE1EQnnmpYJRGL/6gYsGLVCoUzMGLNrO1B4sYKooXQT0JWtSK4KEHEVERPCjUHgqCQlFED4raUmP3bS0UhRQKnrTorQdFBBOkBZP97AuJbNo0+2KF7GlJ3sz3zcw3M2+Z6vxwnfHJmkAqlVrT0NCwB8BepdQuAOuJaEMxgK/M/M33/UlmfpvL5cY7Ojp+2gQXSiCdTq/IZrNniOg0gM1WTplniKi/sbHxbjwe/13NpioBrXUcwB0iarUBrnBmipnPiUh6KfslCXiet9/3/af/CFxmppQ6nEgkhiv5qkhAa90N4Ob/AC/5YOZLItK30OciAlrrAwAe24Iz8yul1A0imgPQ5ft+75LpZj4qIi+D/5cRMILLZDJejTXvcRxnwDgdGxtrzufzS9abiKZisVgiKMwyAlrr8wCu2UZvzjHzgIj0mHet9fH59uyvqnrmXhG5/bc0pZehoaFYNBpN27ZaoLY/mPk1EeUAmDnRFEJgZnZ2Nt7Z2ZkpBFA6rLXeB+B5LdEXM/ARwPZa7Jg5KSJvygi4rnuFiC7aOlJKPSCiR4lEYrw4L0aIaKWl/S3HcS6XEfA8b9T3/d2WDoxORhzHmQxk0JSv2cZeKfVunnj7whJ8ALDNwkFBpMy8Q0SOBQhMA9hkYW9sv4jIzoUEvgFYbeHAEOgFcKK9vf1JUf0tAN5b2BaOMPMvETHLrEyEtgQKTmKx2NpSP7uue4GIri6XgG0JTARDInIkkP5hs6ZrILC4BLWIkJlPicigAZyYmIjOzc19twU35yqKsJY2zGazG5PJZNY4c103SUQPayFARIvb0HYQMfOoiBwMpL8PwEkiMkPMkAl9Kg4i21HMzGdF5F4JxfO8TwA+Axg33RGGzsyVR3GxnUKXETM3iUih5lrrFiK6T0TdRPQCwCoLApWXkTG0WceRSKS1ra1tugSUSqWa5397RkRbwsBD13ExqqoXEqXUYD6fvx6JRLYCOEREXQDWWYCb9q1+IQkIq35XsoC46ncpDWSiftfyEom6fpgEhVW3TzMbdS/nTOi34XKc29j+AXyzojCfNKqJAAAAAElFTkSuQmCC",ge={class:"card-wrap"},me={class:"card-icon card"},Ae={class:"card-input"},he={class:"card-icon info"},be=e.defineComponent({__name:"index",props:{activeTabName:{type:String,default:""}},emits:["handleCardInput"],setup(C,{emit:S}){const _=C,l=e.ref(""),b=S,v=p=>{b("handleCardInput",p==null?void 0:p.trim())};return e.watch(()=>_.activeTabName,p=>{p&&(l.value="")}),(p,g)=>{const f=e.resolveComponent("el-image"),A=e.resolveComponent("el-input");return e.openBlock(),e.createElementBlock("div",ge,[e.createElementVNode("div",me,[e.createVNode(f,{src:e.unref(fe),fit:"contain"},null,8,["src"])]),e.createElementVNode("div",Ae,[e.createVNode(A,{modelValue:l.value,"onUpdate:modelValue":g[0]||(g[0]=m=>l.value=m),onChange:v,clearable:""},null,8,["modelValue"])]),e.createElementVNode("div",he,[e.createVNode(f,{src:e.unref(ye),fit:"contain"},null,8,["src"])])])}}}),ve=T._export_sfc(be,[["__scopeId","data-v-cd989d3c"]]);function _e(){const C={account:"superadmin",password:"1c8e7623312244c1feb677732278fb8b2af6af1a5335fdaebbdb2720137b372b7871292d11165b83b2967b9c39fa37027d63d37a2f36d764257b566dcfa99f334faa8995301601aec549adf39aef8d89c8788da03a9164937a5f73af20a15ea60d47c7cf01cf",tenantId:-1,code:"",codeId:0};return y.service({url:"/api/sysAuth/login",method:"post",data:C})}const Ce={class:"login-wrap"},we={class:"login-body"},Ee={class:"login-body-item left"},Ne={class:"title"},Se={class:"login-body-item right"},ke=e.defineComponent({__name:"index",emits:["change"],setup(C,{emit:S}){const _=W.useRouter(),l=y.useLoginState(y.pinia),{systemKey:b,systemInfo:v,loginUserInfo:p}=y.storeToRefs(l),g=e.ref({sysCTitle:"",sysETitle:"",loginTitle:"账户密码登录",tabs:[{name:"刷卡登录",btnLabel:"请刷卡登录",tips:"温馨提示:建议使用谷歌、Microsoft Edge,版本79.0.1072.62及以上浏览器,360浏览器请使用极速模式"},{name:"用户名登录",btnLabel:"登录",tips:"温馨提示:建议使用谷歌、Microsoft Edge,版本79.0.1072.62及以上浏览器,360浏览器请使用极速模式"}]}),f=e.ref(""),A=e.ref(!1),m=e.ref(!1),w=()=>{A.value=!0},B=a=>{A.value=!1,L(a)},I=(a,n)=>{A.value=!1,a&&L(n)},M=a=>N.getFirstArrayProperty(a),D=a=>{let n;const o=N.convertArrayToTree(a),s=N.addPathToTree(o),i=N.getLeafNodesRecursive(s),u=N.groupByField(i,"parentPath");return n=N.handleRowAuthorityRender(u),n},R=(a,n)=>{var s,i,u;const o=(n==null?void 0:n.userRoles)??(n==null?void 0:n.角色名称);try{if(n.layer&&((s=n==null?void 0:n.layer)==null?void 0:s.toUpperCase())==="SUPERADMIN")return"superAdmin";if(Array.isArray(o)){if((o==null?void 0:o.length)===1){const r=a==null?void 0:a.find(t=>(t==null?void 0:t.roleName)===(o==null?void 0:o[0])||t.角色名称===(o==null?void 0:o[0])),h=M(r),c=D(r==null?void 0:r[h]);return r&&c&&Array.isArray(c)?r?c==null?void 0:c.flatMap(t=>t.checkedButtons):[]:[]}if((o==null?void 0:o.length)>1){let r=a==null?void 0:a.filter(t=>o==null?void 0:o.includes(t.roleName||(t==null?void 0:t.角色名称)));const h=M(r==null?void 0:r[0]),c=(u=(i=r==null?void 0:r.map(t=>Array.isArray(t==null?void 0:t[h])?t==null?void 0:t[h]:[]))==null?void 0:i.flat())==null?void 0:u.flatMap(t=>t.checkedButtons);return(c==null?void 0:c.length)===0?y.ElMessage.error("该用户没有权限,请联系管理员"):new Set(c)}}if(typeof o=="string"){const r=a==null?void 0:a.find(t=>(t==null?void 0:t.roleName)===o||(t==null?void 0:t.角色名称)===o),h=M(r),c=D(r==null?void 0:r[h]);return r&&c&&Array.isArray(c)?r?c==null?void 0:c.flatMap(t=>t.checkedButtons):[]:[]}}catch(r){throw new Error(r)}},Q=async a=>{var n,o;try{let s=[];const i=await y.getInsofDataApi({key:{systemKey:b.value?b.value:a==null?void 0:a.systemKey,pageKey:"系统管理/角色管理",type:"data"}});if(i.data.code===200){const u=(o=(n=i.data)==null?void 0:n.result)==null?void 0:o.map(r=>r.value.tableData);s=R(u,a)}if(s)return Array.isArray(s)?Array.from(s):s;throw y.ElMessage.error("获取用户权限失败,请联系管理员"),new Error("获取用户权限失败,请联系管理员")}catch(s){throw y.ElMessage.error("获取用户权限失败,请联系管理员"),new Error(s)}},q=async a=>{var n,o,s,i,u,r,h;try{let c=[],t,k,x;b.value?x={pageKey:"系统管理/用户管理",type:"data",systemKey:b.value}:x={pageKey:"系统管理/用户管理",type:"data"};const P=await y.getInsofDataApi({key:x});let K;if(!sessionStorage.getItem("systemKey")||sessionStorage.getItem("systemKey")===""?K=await y.getInsofDataApi({key:{layer:"superAdmin"}}):K=await y.getInsofDataApi({key:{layer:"superAdmin",systemKey:sessionStorage.getItem("systemKey")}}),P.data.code===200&&K.data.code===200){const j=(o=(n=K.data)==null?void 0:n.result)==null?void 0:o.map(d=>{var E,V;return{...d.value.tableData,layer:(E=d.key)==null?void 0:E.layer,systemKey:(V=d==null?void 0:d.key)==null?void 0:V.systemKey,id:d.id}}),F=(i=(s=P.data)==null?void 0:s.result)==null?void 0:i.map(d=>{var E,V;return{...d.value.tableData,layer:(E=d.key)==null?void 0:E.layer,systemKey:(V=d==null?void 0:d.key)==null?void 0:V.systemKey,id:d.id}}),U=[...j,...F];if(t=U==null?void 0:U.find(d=>(d==null?void 0:d.account)===(a==null?void 0:a.account)||(d==null?void 0:d.账号)===(a==null?void 0:a.account)),t){if(((u=t.layer)==null?void 0:u.toUpperCase())!=="SUPERADMIN"&&(!(t!=null&&t.状态)||(t==null?void 0:t.状态)==="禁用"||(t==null?void 0:t.status)==="禁用")){y.ElMessage.error("该用户已被禁用,请联系管理员"),m.value=!1;return}c=await Q(t);const{privateKey:d}=await l.getModelSecretAsync(t);let E;if(t.password?E=((r=t.layer)==null?void 0:r.toUpperCase())==="SUPERADMIN"?t.password:N.decryptData(t.password,d):E=((h=t.layer)==null?void 0:h.toUpperCase())==="SUPERADMIN"?t.password:N.resetPassword,(a==null?void 0:a.password)===E)k=t;else throw k=null,y.ElMessage.error("输入的密码错误,请重新输入"),m.value=!1,new Error("输入的密码错误,请重新输入")}else return y.ElMessage.error("该用户不存在,请重新输入")}return k&&c?{matchedUser:k,userAuthority:c}:void 0}catch(c){throw new Error(c)}},O=async a=>{var o,s,i;const n=await q(a);if(n!=null&&n.matchedUser){l.setLoginUserInfo(n.matchedUser),sessionStorage.setItem("authority",JSON.stringify(n.userAuthority));const u=((s=(o=n.matchedUser)==null?void 0:o.layer)==null?void 0:s.toUpperCase())==="SUPERADMIN";return sessionStorage.setItem("isSuperAdmin",JSON.stringify(u)),sessionStorage.setItem("systemKey",b.value?b.value:(i=n.matchedUser)==null?void 0:i.systemKey),await J(n.matchedUser),!0}else throw m.value=!1,new Error("该用户数据处理失败,请联系管理员")},J=async a=>{var o,s,i,u,r,h,c,t,k;const n=await y.getInsofDataApi({key:{layer:"superAdmin",systemKey:b.value?b.value:a==null?void 0:a.systemKey}});if(n.data.code===200&&(o=n.data)!=null&&o.result&&Array.isArray((s=n.data)==null?void 0:s.result)&&((u=(i=n.data)==null?void 0:i.result)==null?void 0:u.length)>0){const x=(k=(t=(c=(h=(r=n.data)==null?void 0:r.result)==null?void 0:h[0])==null?void 0:c.value)==null?void 0:t.tableData)==null?void 0:k.account;l.setSuperAdminInfo({account:x})}},X=async()=>{var a,n,o;try{const s=await _e();return((a=s==null?void 0:s.data)==null?void 0:a.code)===200?(sessionStorage.setItem("loginToken",(o=(n=s.data)==null?void 0:n.result)==null?void 0:o.accessToken),!0):!1}catch(s){y.ElMessage.error(s)}},G=async()=>{var a,n,o;try{const s=await y.axios.post("http://139.196.154.85:20024/api/sysAuth/login",{account:"superadmin",password:"9bf00809059adc7f57bd290bf73ddf4d16f4c83b5937e2d68144ab0bd60d045d22d70afeed8f2fa071cda536e1fac0daf12b8e63dd870c3ca8b308f23be6e693bb32ebd3d013116dc8338d6854b1332701a522a7c43706a6db4162fbe991c8c08aa842fbbc34",codeId:0,code:""});return((a=s==null?void 0:s.data)==null?void 0:a.code)===200?(sessionStorage.setItem("magicToken",(o=(n=s.data)==null?void 0:n.result)==null?void 0:o.accessToken),!0):!1}catch(s){y.ElMessage.error(s)}},L=async a=>{var i,u,r,h;m.value=!0;let n=[O(a),X(),G()];const o=await Promise.all(n);(o==null?void 0:o.every(c=>c))&&(await $.verifyStructureDataToStore(),_.push("/"),l.setLogRecordAsync({type:"登录",data:{account:((i=p.value)==null?void 0:i.account)??((u=p.value)==null?void 0:u.账号),userName:((r=p.value)==null?void 0:r.姓名)||((h=p.value)==null?void 0:h.userName)||"未知"}},"/login","login"))},Z=a=>{f.value=a,A.value=!1,m.value=!1},Y=a=>/^[\u4e00-\u9fa5\s,。!?《》“”【】]+$/.test(a);return(a,n)=>(e.openBlock(),e.createElementBlock("div",Ce,[e.createElementVNode("div",we,[e.createElementVNode("div",Ee,[e.createVNode(ae,{class:"login-left-bg"},{img:e.withCtx(()=>{var o,s,i,u;return[e.createElementVNode("div",Ne,[e.createElementVNode("div",null,e.toDisplayString(((o=e.unref(v))==null?void 0:o.EnglishName)||"INSOFWORKS"),1),e.createElementVNode("div",null,e.toDisplayString((s=e.unref(v))!=null&&s.chineseName&&Y((i=e.unref(v))==null?void 0:i.chineseName)?(u=e.unref(v))==null?void 0:u.chineseName:"工业软件集成开发平台"),1)]),n[0]||(n[0]=e.createElementVNode("div",{class:"divide-line"},null,-1))]}),_:1})]),e.createElementVNode("div",Se,[e.createVNode(ie,{loading:m.value,onClickLogin:w,onHandleTabClick:Z},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.value.loginTitle),1)]),tabLabel1:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.value.tabs[0].name),1)]),tabContent1:e.withCtx(()=>[e.createVNode(ve,{activeTabName:f.value,onHandleCardInput:B},null,8,["activeTabName"])]),tabButton1:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.value.tabs[0].btnLabel),1)]),tabLabel2:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.value.tabs[1].name),1)]),tabContent2:e.withCtx(()=>[e.createVNode(pe,{activeTabName:f.value,isClickLogin:A.value,onHandleLoginFormChange:I},null,8,["activeTabName","isClickLogin"])]),tabButton2:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.value.tabs[1].btnLabel),1)]),_:1},8,["loading"])])])]))}}),Ie=T._export_sfc(ke,[["__scopeId","data-v-756665ac"]]);exports.default=Ie;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as b } from "./index.vue_vue_type_style_index_0_scoped_92477073_lang-
|
|
1
|
+
import { _ as b } from "./index.vue_vue_type_style_index_0_scoped_92477073_lang-6zdxGopn.js";
|
|
2
2
|
import { resolveComponent as r, createElementBlock as i, openBlock as n, Fragment as p, createVNode as l, createCommentVNode as k, withCtx as s, createElementVNode as d, normalizeStyle as w, toDisplayString as c, renderList as v, createTextVNode as _, createBlock as B, resolveDynamicComponent as I } from "vue";
|
|
3
3
|
import { _ as L } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
const V = ["title"], $ = {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ref as G, resolveComponent as e0, createBlock as j, openBlock as b, createCommentVNode as t0, createSlots as B2, withCtx as H, renderSlot as u0, defineComponent as w2, onMounted as ae, createVNode as X, createElementVNode as o0, createElementBlock as V, Fragment as y0, renderList as D0, createTextVNode as ie, toDisplayString as q0, reactive as r1, h as Ee, Transition as $r, withDirectives as ht, vShow as Wt, createApp as Wr, toRefs as Mo, nextTick as _2, isRef as jr, computed as i0, watch as m2, onBeforeUnmount as kn, normalizeStyle as X0, normalizeClass as Y3, resolveDynamicComponent as jt, normalizeProps as Ur, guardReactiveProps as Fr, mergeProps as a1, withModifiers as To, inject as qr, watchEffect as we, onUnmounted as c1, unref as it, resolveDirective as Yr } from "vue";
|
|
2
2
|
import { S as dt } from "./index-BHtNKL1L.js";
|
|
3
|
-
import { h as Kr, d as Qe, S as ms, r as Xr, H as Qr, P as Jr, x as Zr, Q as vs, j as ws } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-
|
|
3
|
+
import { h as Kr, d as Qe, S as ms, r as Xr, H as Qr, P as Jr, x as Zr, Q as vs, j as ws } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Be4dFvUC.js";
|
|
4
4
|
import { _ as P0 } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
-
import { _ as ne, s as On } from "./index-
|
|
6
|
-
import { a as Dn, u as zo,
|
|
7
|
-
import {
|
|
8
|
-
import { b as Ho, T as K3, a as ha, d as da } from "./threeViewerHost-
|
|
9
|
-
import { s as ua } from "./index-
|
|
5
|
+
import { _ as ne, s as On } from "./index-B1XSRq6_.js";
|
|
6
|
+
import { a as Dn, u as zo, aM as Po } from "./index.vue_vue_type_style_index_1_lang-DUZFMfkl.js";
|
|
7
|
+
import { bD as Ao, bE as Vo, c4 as ea, c5 as xs, br as ta, aW as e3, O as ia, a8 as Eo, aA as Ct, aV as bs, V as Bo, c6 as na, p as t3, s as i3, c as q2, E as Mn, a as Lo, c7 as sa, aM as oa, ao as la, c8 as ra, b as aa, aS as ca } from "./index-B42dCx1W.js";
|
|
8
|
+
import { b as Ho, T as K3, a as ha, d as da } from "./threeViewerHost-BwiicdtA.js";
|
|
9
|
+
import { s as ua } from "./index-D0fqSkIt.js";
|
|
10
10
|
var fa = "[object Date]";
|
|
11
11
|
function pa(n) {
|
|
12
12
|
return Ao(n) && Vo(n) == fa;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ref as s, watch as d, defineComponent as y, reactive as m, onMounted as i, createElementBlock as g, openBlock as D, createVNode as f } from "vue";
|
|
2
2
|
import "./index-BHtNKL1L.js";
|
|
3
|
-
import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-
|
|
4
|
-
import {
|
|
5
|
-
import { g as v, s as c } from "./index-
|
|
6
|
-
import { s as
|
|
7
|
-
const
|
|
3
|
+
import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Be4dFvUC.js";
|
|
4
|
+
import { az as h, ay as C, a as _, u as k, aA as S } from "./index.vue_vue_type_style_index_1_lang-DUZFMfkl.js";
|
|
5
|
+
import { g as v, s as c } from "./index-B42dCx1W.js";
|
|
6
|
+
import { s as A } from "./index-B3VR9DS9.js";
|
|
7
|
+
const T = _(), { itemData: B } = c(T), u = s(0), I = s([
|
|
8
8
|
{
|
|
9
9
|
label: "机构名称",
|
|
10
10
|
value: "",
|
|
@@ -94,11 +94,11 @@ const A = _(), { itemData: B } = c(A), u = s(0), I = s([
|
|
|
94
94
|
key: "tableContents",
|
|
95
95
|
contents: []
|
|
96
96
|
}
|
|
97
|
-
]),
|
|
97
|
+
]), M = (e) => {
|
|
98
98
|
h(e.singleContent, e.buttonName, u.value);
|
|
99
|
-
},
|
|
99
|
+
}, P = (e) => {
|
|
100
100
|
console.log("onDoubleClick", e);
|
|
101
|
-
},
|
|
101
|
+
}, x = (e, t) => {
|
|
102
102
|
console.log("onButtonClick", e, t);
|
|
103
103
|
}, N = async (e) => {
|
|
104
104
|
const t = await C(v, {
|
|
@@ -150,10 +150,10 @@ d(() => B.value, (e) => {
|
|
|
150
150
|
const O = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
151
151
|
__proto__: null,
|
|
152
152
|
getPageDataAsync: N,
|
|
153
|
-
handleItemDataChange:
|
|
153
|
+
handleItemDataChange: M,
|
|
154
154
|
handleQueryChange: w,
|
|
155
|
-
onButtonClick:
|
|
156
|
-
onDoubleClick:
|
|
155
|
+
onButtonClick: x,
|
|
156
|
+
onDoubleClick: P,
|
|
157
157
|
pageData: r,
|
|
158
158
|
queryFormData: I,
|
|
159
159
|
structureId: u,
|
|
@@ -165,7 +165,7 @@ const O = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
165
165
|
return i(async () => {
|
|
166
166
|
t.structureId = await S(a.value);
|
|
167
167
|
}), (o, n) => (D(), g("div", z, [
|
|
168
|
-
f(
|
|
168
|
+
f(A, {
|
|
169
169
|
itemData: t.pageData,
|
|
170
170
|
onChange: t.handleItemDataChange
|
|
171
171
|
}, null, 8, ["itemData", "onChange"])
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var oit = Object.defineProperty;
|
|
2
2
|
var sit = (r, e, t) => e in r ? oit(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
3
|
var Cr = (r, e, t) => sit(r, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
import { i as k9, o as hW,
|
|
5
|
-
import {
|
|
4
|
+
import { i as k9, o as hW, bB as lit, bC as dW, bD as pW, bE as uit, bF as cit, bG as fit, v as hit, bH as vW, bI as dit, bJ as pit, h as uO, bK as vit, bL as git, bM as mit, bN as cO, bO as yit, bP as bit, S as wit, g as _it, s as xit, u as Sit, p as kit, c as D1 } from "./index-B42dCx1W.js";
|
|
5
|
+
import { aD as Tit, aE as Cit, p as Ait, aF as Eit, i as Mit, aG as Iit, O as T9 } from "./index.vue_vue_type_style_index_1_lang-DUZFMfkl.js";
|
|
6
6
|
function Dit(r, e) {
|
|
7
7
|
return Tit(Cit(r, e, Ait), r + "");
|
|
8
8
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var ait=Object.defineProperty;var oit=(r,e,t)=>e in r?ait(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var Cr=(r,e,t)=>oit(r,typeof e!="symbol"?e+"":e,t);const ai=require("./index-1z9RrjZc.cjs"),Zh=require("./index.vue_vue_type_style_index_1_lang-CT_2jezv.cjs");function uW(r,e){return Zh.setToString(Zh.overRest(r,e,Zh.identity),r+"")}function sit(r,e,t){if(!ai.isObject(t))return!1;var n=typeof e;return(n=="number"?ai.isArrayLike(t)&&ai.isIndex(e,t.length):n=="string"&&e in t)?ai.eq(t[e],r):!1}function lit(r){return uW(function(e,t){var n=-1,i=t.length,a=i>1?t[i-1]:void 0,o=i>2?t[2]:void 0;for(a=r.length>3&&typeof a=="function"?(i--,a):void 0,o&&sit(t[0],t[1],o)&&(a=i<3?void 0:a,i=1),e=Object(e);++n<i;){var s=t[n];s&&r(e,s,n,a)}return e})}var uit="[object Object]",cit=Function.prototype,fit=Object.prototype,cW=cit.toString,hit=fit.hasOwnProperty,dit=cW.call(Object);function fW(r){if(!ai.isObjectLike(r)||ai.baseGetTag(r)!=uit)return!1;var e=ai.getPrototype(r);if(e===null)return!0;var t=hit.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&cW.call(t)==dit}function pit(r){return function(e,t,n){for(var i=-1,a=Object(e),o=n(e),s=o.length;s--;){var l=o[++i];if(t(a[l],l,a)===!1)break}return e}}var hW=pit();function bE(r,e,t){(t!==void 0&&!ai.eq(r[e],t)||t===void 0&&!(e in r))&&ai.baseAssignValue(r,e,t)}function dW(r){return ai.isObjectLike(r)&&ai.isArrayLike(r)}function wE(r,e){if(!(e==="constructor"&&typeof r[e]=="function")&&e!="__proto__")return r[e]}function vit(r){return ai.copyObject(r,ai.keysIn(r))}function git(r,e,t,n,i,a,o){var s=wE(r,t),l=wE(e,t),u=o.get(l);if(u){bE(r,t,u);return}var c=a?a(s,l,t+"",r,e,o):void 0,f=c===void 0;if(f){var h=ai.isArray(l),d=!h&&ai.isBuffer(l),p=!h&&!d&&ai.isTypedArray(l);c=l,h||d||p?ai.isArray(s)?c=s:dW(s)?c=ai.copyArray(s):d?(f=!1,c=ai.cloneBuffer(l,!0)):p?(f=!1,c=ai.cloneTypedArray(l,!0)):c=[]:fW(l)||ai.isArguments(l)?(c=s,ai.isArguments(s)?c=vit(s):(!ai.isObject(s)||ai.isFunction$1(s))&&(c=ai.initCloneObject(l))):f=!1}f&&(o.set(l,c),i(c,l,n,a,o),o.delete(l)),bE(r,t,c)}function pW(r,e,t,n,i){r!==e&&hW(e,function(a,o){if(i||(i=new ai.Stack),ai.isObject(a))git(r,e,o,t,pW,n,i);else{var s=n?n(wE(r,o),a,o+"",r,e,i):void 0;s===void 0&&(s=a),bE(r,o,s)}},ai.keysIn)}var Kh=lit(function(r,e,t){pW(r,e,t)}),bs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function m0(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function mit(r){if(Object.prototype.hasOwnProperty.call(r,"__esModule"))return r;var e=r.default;if(typeof e=="function"){var t=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return r[n]}})}),t}var p4={exports:{}},yit=p4.exports,lO;function bit(){return lO||(lO=1,function(r,e){(function(t,n){r.exports=n()})(yit,function(){var t=1e3,n=6e4,i=36e5,a="millisecond",o="second",s="minute",l="hour",u="day",c="week",f="month",h="quarter",d="year",p="date",g="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(D){var k=["th","st","nd","rd"],C=D%100;return"["+D+(k[(C-20)%10]||k[C]||k[0])+"]"}},b=function(D,k,C){var I=String(D);return!I||I.length>=k?D:""+Array(k+1-I.length).join(C)+D},w={s:b,z:function(D){var k=-D.utcOffset(),C=Math.abs(k),I=Math.floor(C/60),M=C%60;return(k<=0?"+":"-")+b(I,2,"0")+":"+b(M,2,"0")},m:function D(k,C){if(k.date()<C.date())return-D(C,k);var I=12*(C.year()-k.year())+(C.month()-k.month()),M=k.clone().add(I,f),L=C-M<0,z=k.clone().add(I+(L?-1:1),f);return+(-(I+(C-M)/(L?M-z:z-M))||0)},a:function(D){return D<0?Math.ceil(D)||0:Math.floor(D)},p:function(D){return{M:f,y:d,w:c,d:u,D:p,h:l,m:s,s:o,ms:a,Q:h}[D]||String(D||"").toLowerCase().replace(/s$/,"")},u:function(D){return D===void 0}},_="en",x={};x[_]=v;var S="$isDayjsObject",T=function(D){return D instanceof F||!(!D||!D[S])},A=function D(k,C,I){var M;if(!k)return _;if(typeof k=="string"){var L=k.toLowerCase();x[L]&&(M=L),C&&(x[L]=C,M=L);var z=k.split("-");if(!M&&z.length>1)return D(z[0])}else{var N=k.name;x[N]=k,M=N}return!I&&M&&(_=M),M||!I&&_},B=function(D,k){if(T(D))return D.clone();var C=typeof k=="object"?k:{};return C.date=D,C.args=arguments,new F(C)},O=w;O.l=A,O.i=T,O.w=function(D,k){return B(D,{locale:k.$L,utc:k.$u,x:k.$x,$offset:k.$offset})};var F=function(){function D(C){this.$L=A(C.locale,null,!0),this.parse(C),this.$x=this.$x||C.x||{},this[S]=!0}var k=D.prototype;return k.parse=function(C){this.$d=function(I){var M=I.date,L=I.utc;if(M===null)return new Date(NaN);if(O.u(M))return new Date;if(M instanceof Date)return new Date(M);if(typeof M=="string"&&!/Z$/i.test(M)){var z=M.match(m);if(z){var N=z[2]-1||0,U=(z[7]||"0").substring(0,3);return L?new Date(Date.UTC(z[1],N,z[3]||1,z[4]||0,z[5]||0,z[6]||0,U)):new Date(z[1],N,z[3]||1,z[4]||0,z[5]||0,z[6]||0,U)}}return new Date(M)}(C),this.init()},k.init=function(){var C=this.$d;this.$y=C.getFullYear(),this.$M=C.getMonth(),this.$D=C.getDate(),this.$W=C.getDay(),this.$H=C.getHours(),this.$m=C.getMinutes(),this.$s=C.getSeconds(),this.$ms=C.getMilliseconds()},k.$utils=function(){return O},k.isValid=function(){return this.$d.toString()!==g},k.isSame=function(C,I){var M=B(C);return this.startOf(I)<=M&&M<=this.endOf(I)},k.isAfter=function(C,I){return B(C)<this.startOf(I)},k.isBefore=function(C,I){return this.endOf(I)<B(C)},k.$g=function(C,I,M){return O.u(C)?this[I]:this.set(M,C)},k.unix=function(){return Math.floor(this.valueOf()/1e3)},k.valueOf=function(){return this.$d.getTime()},k.startOf=function(C,I){var M=this,L=!!O.u(I)||I,z=O.p(C),N=function(pt,rt){var X=O.w(M.$u?Date.UTC(M.$y,rt,pt):new Date(M.$y,rt,pt),M);return L?X:X.endOf(u)},U=function(pt,rt){return O.w(M.toDate()[pt].apply(M.toDate("s"),(L?[0,0,0,0]:[23,59,59,999]).slice(rt)),M)},V=this.$W,G=this.$M,Y=this.$D,Q="set"+(this.$u?"UTC":"");switch(z){case d:return L?N(1,0):N(31,11);case f:return L?N(1,G):N(0,G+1);case c:var yt=this.$locale().weekStart||0,ot=(V<yt?V+7:V)-yt;return N(L?Y-ot:Y+(6-ot),G);case u:case p:return U(Q+"Hours",0);case l:return U(Q+"Minutes",1);case s:return U(Q+"Seconds",2);case o:return U(Q+"Milliseconds",3);default:return this.clone()}},k.endOf=function(C){return this.startOf(C,!1)},k.$set=function(C,I){var M,L=O.p(C),z="set"+(this.$u?"UTC":""),N=(M={},M[u]=z+"Date",M[p]=z+"Date",M[f]=z+"Month",M[d]=z+"FullYear",M[l]=z+"Hours",M[s]=z+"Minutes",M[o]=z+"Seconds",M[a]=z+"Milliseconds",M)[L],U=L===u?this.$D+(I-this.$W):I;if(L===f||L===d){var V=this.clone().set(p,1);V.$d[N](U),V.init(),this.$d=V.set(p,Math.min(this.$D,V.daysInMonth())).$d}else N&&this.$d[N](U);return this.init(),this},k.set=function(C,I){return this.clone().$set(C,I)},k.get=function(C){return this[O.p(C)]()},k.add=function(C,I){var M,L=this;C=Number(C);var z=O.p(I),N=function(G){var Y=B(L);return O.w(Y.date(Y.date()+Math.round(G*C)),L)};if(z===f)return this.set(f,this.$M+C);if(z===d)return this.set(d,this.$y+C);if(z===u)return N(1);if(z===c)return N(7);var U=(M={},M[s]=n,M[l]=i,M[o]=t,M)[z]||1,V=this.$d.getTime()+C*U;return O.w(V,this)},k.subtract=function(C,I){return this.add(-1*C,I)},k.format=function(C){var I=this,M=this.$locale();if(!this.isValid())return M.invalidDate||g;var L=C||"YYYY-MM-DDTHH:mm:ssZ",z=O.z(this),N=this.$H,U=this.$m,V=this.$M,G=M.weekdays,Y=M.months,Q=M.meridiem,yt=function(rt,X,et,ut){return rt&&(rt[X]||rt(I,L))||et[X].slice(0,ut)},ot=function(rt){return O.s(N%12||12,rt,"0")},pt=Q||function(rt,X,et){var ut=rt<12?"AM":"PM";return et?ut.toLowerCase():ut};return L.replace(y,function(rt,X){return X||function(et){switch(et){case"YY":return String(I.$y).slice(-2);case"YYYY":return O.s(I.$y,4,"0");case"M":return V+1;case"MM":return O.s(V+1,2,"0");case"MMM":return yt(M.monthsShort,V,Y,3);case"MMMM":return yt(Y,V);case"D":return I.$D;case"DD":return O.s(I.$D,2,"0");case"d":return String(I.$W);case"dd":return yt(M.weekdaysMin,I.$W,G,2);case"ddd":return yt(M.weekdaysShort,I.$W,G,3);case"dddd":return G[I.$W];case"H":return String(N);case"HH":return O.s(N,2,"0");case"h":return ot(1);case"hh":return ot(2);case"a":return pt(N,U,!0);case"A":return pt(N,U,!1);case"m":return String(U);case"mm":return O.s(U,2,"0");case"s":return String(I.$s);case"ss":return O.s(I.$s,2,"0");case"SSS":return O.s(I.$ms,3,"0");case"Z":return z}return null}(rt)||z.replace(":","")})},k.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},k.diff=function(C,I,M){var L,z=this,N=O.p(I),U=B(C),V=(U.utcOffset()-this.utcOffset())*n,G=this-U,Y=function(){return O.m(z,U)};switch(N){case d:L=Y()/12;break;case f:L=Y();break;case h:L=Y()/3;break;case c:L=(G-V)/6048e5;break;case u:L=(G-V)/864e5;break;case l:L=G/i;break;case s:L=G/n;break;case o:L=G/t;break;default:L=G}return M?L:O.a(L)},k.daysInMonth=function(){return this.endOf(f).$D},k.$locale=function(){return x[this.$L]},k.locale=function(C,I){if(!C)return this.$L;var M=this.clone(),L=A(C,I,!0);return L&&(M.$L=L),M},k.clone=function(){return O.w(this.$d,this)},k.toDate=function(){return new Date(this.valueOf())},k.toJSON=function(){return this.isValid()?this.toISOString():null},k.toISOString=function(){return this.$d.toISOString()},k.toString=function(){return this.$d.toUTCString()},D}(),E=F.prototype;return B.prototype=E,[["$ms",a],["$s",o],["$m",s],["$H",l],["$W",u],["$M",f],["$y",d],["$D",p]].forEach(function(D){E[D[1]]=function(k){return this.$g(k,D[0],D[1])}}),B.extend=function(D,k){return D.$i||(D(k,F,B),D.$i=!0),B},B.locale=A,B.isDayjs=T,B.unix=function(D){return B(1e3*D)},B.en=x[_],B.Ls=x,B.p={},B})}(p4)),p4.exports}var wit=bit();const _it=m0(wit),xit=ai.useLoginState(ai.pinia),{loginUserInfo:BT}=ai.storeToRefs(xit),Sit=async r=>{var i,a,o,s,l,u,c,f,h,d,p,g,m,y,v,b,w,_,x,S,T,A,B,O,F,E,D,k,C,I,M,L;let e=[];(i=r==null?void 0:r.menuSelect)==null||i.forEach(z=>{});let t="",n;if(r!=null&&r.menuSelect&&(n=await Zh.menuToParent(r==null?void 0:r.menuSelect)),n==null||n.forEach(z=>{var N,U;(z==null?void 0:z.name)===(((U=(N=r==null?void 0:r.groupSelect)==null?void 0:N[0])==null?void 0:U.replaceAll("'",""))??"")&&(t=z==null?void 0:z.id)}),r!=null&&r.menuId){t=r==null?void 0:r.menuId;const z=await ai.getInsofDataApi({id:t}),N=(l=(s=(o=(a=z==null?void 0:z.data)==null?void 0:a.result)==null?void 0:o[0])==null?void 0:s.key)==null?void 0:l.pageKey;n=await Zh.getItemData(N,sessionStorage.getItem("systemKey"),"")}if(t!==""){const z=(f=(c=(u=n==null?void 0:n.find(V=>(V==null?void 0:V.id)===t))==null?void 0:u.compData)==null?void 0:c.find(V=>(V==null?void 0:V.key)==="header"))==null?void 0:f.contents;let N=0;z.every(V=>Array.isArray(V))?N=(h=z==null?void 0:z[0])==null?void 0:h.findIndex(V=>{var G,Y,Q;return(V==null?void 0:V.label)===((Q=(Y=(G=r==null?void 0:r.groupSelect)==null?void 0:G[1])==null?void 0:Y.replaceAll("[",""))==null?void 0:Q.replaceAll("]",""))}):N=z==null?void 0:z.findIndex(V=>{var G,Y,Q;return(V==null?void 0:V.label)===((Q=(Y=(G=r==null?void 0:r.groupSelect)==null?void 0:G[1])==null?void 0:Y.replaceAll("[",""))==null?void 0:Q.replaceAll("]",""))}),N===-1&&(N=0);let U=(m=(g=(p=(d=n==null?void 0:n.find(V=>(V==null?void 0:V.id)===t))==null?void 0:d.compData)==null?void 0:p.find(V=>(V==null?void 0:V.key)==="tableContents"))==null?void 0:g.contents)==null?void 0:m.map(V=>(V=V==null?void 0:V.filter(G=>!(G!=null&&G.id)),V));if((r==null?void 0:r.filter)!==""){let V={};V[(v=(y=r==null?void 0:r.filter)==null?void 0:y.split("#"))==null?void 0:v[0]]=(w=(b=r==null?void 0:r.filter)==null?void 0:b.split("#"))==null?void 0:w[1];let G=(x=(_=r==null?void 0:r.filter)==null?void 0:_.split("#"))==null?void 0:x[1];G==="@loginUser"&&(G=((S=BT.value)==null?void 0:S.姓名)||((T=BT.value)==null?void 0:T.account)||((A=BT.value)==null?void 0:A.账号));let Y=z==null?void 0:z.findIndex(Q=>{var yt,ot;return(Q==null?void 0:Q.prop)===((ot=(yt=Object.keys(V))==null?void 0:yt[0])==null?void 0:ot.replaceAll("'",""))});U=U==null?void 0:U.filter(Q=>(Q==null?void 0:Q[Y])===G)}if((B=r==null?void 0:r.menuFilter)!=null&&B.find(V=>{var G;return(G=V==null?void 0:V.content)==null?void 0:G.includes("@Condition")})){let V=(D=(E=(F=(O=r==null?void 0:r.menuFilter)==null?void 0:O.find(Y=>{var Q;return(Q=Y==null?void 0:Y.content)==null?void 0:Q.includes("@Condition")}))==null?void 0:F.content)==null?void 0:E.split(":"))==null?void 0:D[1],G=(k=n==null?void 0:n.find(Y=>(Y==null?void 0:Y.id)===t))==null?void 0:k.compData;U=(L=(M=(I=(C=Zh.onConditionContents([G],V))==null?void 0:C[0])==null?void 0:I.find(Y=>(Y==null?void 0:Y.key)==="tableContents"))==null?void 0:M.contents)==null?void 0:L.map(Y=>(Y=Y==null?void 0:Y.filter(Q=>!(Q!=null&&Q.id)),Y))}U==null||U.forEach(V=>{e.push({label:V==null?void 0:V[N],value:V==null?void 0:V[N]})})}return e};/**!
|
|
1
|
+
"use strict";var ait=Object.defineProperty;var oit=(r,e,t)=>e in r?ait(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var Cr=(r,e,t)=>oit(r,typeof e!="symbol"?e+"":e,t);const ai=require("./index-1z9RrjZc.cjs"),Zh=require("./index.vue_vue_type_style_index_1_lang-ckXQqCiT.cjs");function uW(r,e){return Zh.setToString(Zh.overRest(r,e,Zh.identity),r+"")}function sit(r,e,t){if(!ai.isObject(t))return!1;var n=typeof e;return(n=="number"?ai.isArrayLike(t)&&ai.isIndex(e,t.length):n=="string"&&e in t)?ai.eq(t[e],r):!1}function lit(r){return uW(function(e,t){var n=-1,i=t.length,a=i>1?t[i-1]:void 0,o=i>2?t[2]:void 0;for(a=r.length>3&&typeof a=="function"?(i--,a):void 0,o&&sit(t[0],t[1],o)&&(a=i<3?void 0:a,i=1),e=Object(e);++n<i;){var s=t[n];s&&r(e,s,n,a)}return e})}var uit="[object Object]",cit=Function.prototype,fit=Object.prototype,cW=cit.toString,hit=fit.hasOwnProperty,dit=cW.call(Object);function fW(r){if(!ai.isObjectLike(r)||ai.baseGetTag(r)!=uit)return!1;var e=ai.getPrototype(r);if(e===null)return!0;var t=hit.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&cW.call(t)==dit}function pit(r){return function(e,t,n){for(var i=-1,a=Object(e),o=n(e),s=o.length;s--;){var l=o[++i];if(t(a[l],l,a)===!1)break}return e}}var hW=pit();function bE(r,e,t){(t!==void 0&&!ai.eq(r[e],t)||t===void 0&&!(e in r))&&ai.baseAssignValue(r,e,t)}function dW(r){return ai.isObjectLike(r)&&ai.isArrayLike(r)}function wE(r,e){if(!(e==="constructor"&&typeof r[e]=="function")&&e!="__proto__")return r[e]}function vit(r){return ai.copyObject(r,ai.keysIn(r))}function git(r,e,t,n,i,a,o){var s=wE(r,t),l=wE(e,t),u=o.get(l);if(u){bE(r,t,u);return}var c=a?a(s,l,t+"",r,e,o):void 0,f=c===void 0;if(f){var h=ai.isArray(l),d=!h&&ai.isBuffer(l),p=!h&&!d&&ai.isTypedArray(l);c=l,h||d||p?ai.isArray(s)?c=s:dW(s)?c=ai.copyArray(s):d?(f=!1,c=ai.cloneBuffer(l,!0)):p?(f=!1,c=ai.cloneTypedArray(l,!0)):c=[]:fW(l)||ai.isArguments(l)?(c=s,ai.isArguments(s)?c=vit(s):(!ai.isObject(s)||ai.isFunction$1(s))&&(c=ai.initCloneObject(l))):f=!1}f&&(o.set(l,c),i(c,l,n,a,o),o.delete(l)),bE(r,t,c)}function pW(r,e,t,n,i){r!==e&&hW(e,function(a,o){if(i||(i=new ai.Stack),ai.isObject(a))git(r,e,o,t,pW,n,i);else{var s=n?n(wE(r,o),a,o+"",r,e,i):void 0;s===void 0&&(s=a),bE(r,o,s)}},ai.keysIn)}var Kh=lit(function(r,e,t){pW(r,e,t)}),bs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function m0(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function mit(r){if(Object.prototype.hasOwnProperty.call(r,"__esModule"))return r;var e=r.default;if(typeof e=="function"){var t=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return r[n]}})}),t}var p4={exports:{}},yit=p4.exports,lO;function bit(){return lO||(lO=1,function(r,e){(function(t,n){r.exports=n()})(yit,function(){var t=1e3,n=6e4,i=36e5,a="millisecond",o="second",s="minute",l="hour",u="day",c="week",f="month",h="quarter",d="year",p="date",g="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(D){var k=["th","st","nd","rd"],C=D%100;return"["+D+(k[(C-20)%10]||k[C]||k[0])+"]"}},b=function(D,k,C){var I=String(D);return!I||I.length>=k?D:""+Array(k+1-I.length).join(C)+D},w={s:b,z:function(D){var k=-D.utcOffset(),C=Math.abs(k),I=Math.floor(C/60),M=C%60;return(k<=0?"+":"-")+b(I,2,"0")+":"+b(M,2,"0")},m:function D(k,C){if(k.date()<C.date())return-D(C,k);var I=12*(C.year()-k.year())+(C.month()-k.month()),M=k.clone().add(I,f),L=C-M<0,z=k.clone().add(I+(L?-1:1),f);return+(-(I+(C-M)/(L?M-z:z-M))||0)},a:function(D){return D<0?Math.ceil(D)||0:Math.floor(D)},p:function(D){return{M:f,y:d,w:c,d:u,D:p,h:l,m:s,s:o,ms:a,Q:h}[D]||String(D||"").toLowerCase().replace(/s$/,"")},u:function(D){return D===void 0}},_="en",x={};x[_]=v;var S="$isDayjsObject",T=function(D){return D instanceof F||!(!D||!D[S])},A=function D(k,C,I){var M;if(!k)return _;if(typeof k=="string"){var L=k.toLowerCase();x[L]&&(M=L),C&&(x[L]=C,M=L);var z=k.split("-");if(!M&&z.length>1)return D(z[0])}else{var N=k.name;x[N]=k,M=N}return!I&&M&&(_=M),M||!I&&_},B=function(D,k){if(T(D))return D.clone();var C=typeof k=="object"?k:{};return C.date=D,C.args=arguments,new F(C)},O=w;O.l=A,O.i=T,O.w=function(D,k){return B(D,{locale:k.$L,utc:k.$u,x:k.$x,$offset:k.$offset})};var F=function(){function D(C){this.$L=A(C.locale,null,!0),this.parse(C),this.$x=this.$x||C.x||{},this[S]=!0}var k=D.prototype;return k.parse=function(C){this.$d=function(I){var M=I.date,L=I.utc;if(M===null)return new Date(NaN);if(O.u(M))return new Date;if(M instanceof Date)return new Date(M);if(typeof M=="string"&&!/Z$/i.test(M)){var z=M.match(m);if(z){var N=z[2]-1||0,U=(z[7]||"0").substring(0,3);return L?new Date(Date.UTC(z[1],N,z[3]||1,z[4]||0,z[5]||0,z[6]||0,U)):new Date(z[1],N,z[3]||1,z[4]||0,z[5]||0,z[6]||0,U)}}return new Date(M)}(C),this.init()},k.init=function(){var C=this.$d;this.$y=C.getFullYear(),this.$M=C.getMonth(),this.$D=C.getDate(),this.$W=C.getDay(),this.$H=C.getHours(),this.$m=C.getMinutes(),this.$s=C.getSeconds(),this.$ms=C.getMilliseconds()},k.$utils=function(){return O},k.isValid=function(){return this.$d.toString()!==g},k.isSame=function(C,I){var M=B(C);return this.startOf(I)<=M&&M<=this.endOf(I)},k.isAfter=function(C,I){return B(C)<this.startOf(I)},k.isBefore=function(C,I){return this.endOf(I)<B(C)},k.$g=function(C,I,M){return O.u(C)?this[I]:this.set(M,C)},k.unix=function(){return Math.floor(this.valueOf()/1e3)},k.valueOf=function(){return this.$d.getTime()},k.startOf=function(C,I){var M=this,L=!!O.u(I)||I,z=O.p(C),N=function(pt,rt){var X=O.w(M.$u?Date.UTC(M.$y,rt,pt):new Date(M.$y,rt,pt),M);return L?X:X.endOf(u)},U=function(pt,rt){return O.w(M.toDate()[pt].apply(M.toDate("s"),(L?[0,0,0,0]:[23,59,59,999]).slice(rt)),M)},V=this.$W,G=this.$M,Y=this.$D,Q="set"+(this.$u?"UTC":"");switch(z){case d:return L?N(1,0):N(31,11);case f:return L?N(1,G):N(0,G+1);case c:var yt=this.$locale().weekStart||0,ot=(V<yt?V+7:V)-yt;return N(L?Y-ot:Y+(6-ot),G);case u:case p:return U(Q+"Hours",0);case l:return U(Q+"Minutes",1);case s:return U(Q+"Seconds",2);case o:return U(Q+"Milliseconds",3);default:return this.clone()}},k.endOf=function(C){return this.startOf(C,!1)},k.$set=function(C,I){var M,L=O.p(C),z="set"+(this.$u?"UTC":""),N=(M={},M[u]=z+"Date",M[p]=z+"Date",M[f]=z+"Month",M[d]=z+"FullYear",M[l]=z+"Hours",M[s]=z+"Minutes",M[o]=z+"Seconds",M[a]=z+"Milliseconds",M)[L],U=L===u?this.$D+(I-this.$W):I;if(L===f||L===d){var V=this.clone().set(p,1);V.$d[N](U),V.init(),this.$d=V.set(p,Math.min(this.$D,V.daysInMonth())).$d}else N&&this.$d[N](U);return this.init(),this},k.set=function(C,I){return this.clone().$set(C,I)},k.get=function(C){return this[O.p(C)]()},k.add=function(C,I){var M,L=this;C=Number(C);var z=O.p(I),N=function(G){var Y=B(L);return O.w(Y.date(Y.date()+Math.round(G*C)),L)};if(z===f)return this.set(f,this.$M+C);if(z===d)return this.set(d,this.$y+C);if(z===u)return N(1);if(z===c)return N(7);var U=(M={},M[s]=n,M[l]=i,M[o]=t,M)[z]||1,V=this.$d.getTime()+C*U;return O.w(V,this)},k.subtract=function(C,I){return this.add(-1*C,I)},k.format=function(C){var I=this,M=this.$locale();if(!this.isValid())return M.invalidDate||g;var L=C||"YYYY-MM-DDTHH:mm:ssZ",z=O.z(this),N=this.$H,U=this.$m,V=this.$M,G=M.weekdays,Y=M.months,Q=M.meridiem,yt=function(rt,X,et,ut){return rt&&(rt[X]||rt(I,L))||et[X].slice(0,ut)},ot=function(rt){return O.s(N%12||12,rt,"0")},pt=Q||function(rt,X,et){var ut=rt<12?"AM":"PM";return et?ut.toLowerCase():ut};return L.replace(y,function(rt,X){return X||function(et){switch(et){case"YY":return String(I.$y).slice(-2);case"YYYY":return O.s(I.$y,4,"0");case"M":return V+1;case"MM":return O.s(V+1,2,"0");case"MMM":return yt(M.monthsShort,V,Y,3);case"MMMM":return yt(Y,V);case"D":return I.$D;case"DD":return O.s(I.$D,2,"0");case"d":return String(I.$W);case"dd":return yt(M.weekdaysMin,I.$W,G,2);case"ddd":return yt(M.weekdaysShort,I.$W,G,3);case"dddd":return G[I.$W];case"H":return String(N);case"HH":return O.s(N,2,"0");case"h":return ot(1);case"hh":return ot(2);case"a":return pt(N,U,!0);case"A":return pt(N,U,!1);case"m":return String(U);case"mm":return O.s(U,2,"0");case"s":return String(I.$s);case"ss":return O.s(I.$s,2,"0");case"SSS":return O.s(I.$ms,3,"0");case"Z":return z}return null}(rt)||z.replace(":","")})},k.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},k.diff=function(C,I,M){var L,z=this,N=O.p(I),U=B(C),V=(U.utcOffset()-this.utcOffset())*n,G=this-U,Y=function(){return O.m(z,U)};switch(N){case d:L=Y()/12;break;case f:L=Y();break;case h:L=Y()/3;break;case c:L=(G-V)/6048e5;break;case u:L=(G-V)/864e5;break;case l:L=G/i;break;case s:L=G/n;break;case o:L=G/t;break;default:L=G}return M?L:O.a(L)},k.daysInMonth=function(){return this.endOf(f).$D},k.$locale=function(){return x[this.$L]},k.locale=function(C,I){if(!C)return this.$L;var M=this.clone(),L=A(C,I,!0);return L&&(M.$L=L),M},k.clone=function(){return O.w(this.$d,this)},k.toDate=function(){return new Date(this.valueOf())},k.toJSON=function(){return this.isValid()?this.toISOString():null},k.toISOString=function(){return this.$d.toISOString()},k.toString=function(){return this.$d.toUTCString()},D}(),E=F.prototype;return B.prototype=E,[["$ms",a],["$s",o],["$m",s],["$H",l],["$W",u],["$M",f],["$y",d],["$D",p]].forEach(function(D){E[D[1]]=function(k){return this.$g(k,D[0],D[1])}}),B.extend=function(D,k){return D.$i||(D(k,F,B),D.$i=!0),B},B.locale=A,B.isDayjs=T,B.unix=function(D){return B(1e3*D)},B.en=x[_],B.Ls=x,B.p={},B})}(p4)),p4.exports}var wit=bit();const _it=m0(wit),xit=ai.useLoginState(ai.pinia),{loginUserInfo:BT}=ai.storeToRefs(xit),Sit=async r=>{var i,a,o,s,l,u,c,f,h,d,p,g,m,y,v,b,w,_,x,S,T,A,B,O,F,E,D,k,C,I,M,L;let e=[];(i=r==null?void 0:r.menuSelect)==null||i.forEach(z=>{});let t="",n;if(r!=null&&r.menuSelect&&(n=await Zh.menuToParent(r==null?void 0:r.menuSelect)),n==null||n.forEach(z=>{var N,U;(z==null?void 0:z.name)===(((U=(N=r==null?void 0:r.groupSelect)==null?void 0:N[0])==null?void 0:U.replaceAll("'",""))??"")&&(t=z==null?void 0:z.id)}),r!=null&&r.menuId){t=r==null?void 0:r.menuId;const z=await ai.getInsofDataApi({id:t}),N=(l=(s=(o=(a=z==null?void 0:z.data)==null?void 0:a.result)==null?void 0:o[0])==null?void 0:s.key)==null?void 0:l.pageKey;n=await Zh.getItemData(N,sessionStorage.getItem("systemKey"),"")}if(t!==""){const z=(f=(c=(u=n==null?void 0:n.find(V=>(V==null?void 0:V.id)===t))==null?void 0:u.compData)==null?void 0:c.find(V=>(V==null?void 0:V.key)==="header"))==null?void 0:f.contents;let N=0;z.every(V=>Array.isArray(V))?N=(h=z==null?void 0:z[0])==null?void 0:h.findIndex(V=>{var G,Y,Q;return(V==null?void 0:V.label)===((Q=(Y=(G=r==null?void 0:r.groupSelect)==null?void 0:G[1])==null?void 0:Y.replaceAll("[",""))==null?void 0:Q.replaceAll("]",""))}):N=z==null?void 0:z.findIndex(V=>{var G,Y,Q;return(V==null?void 0:V.label)===((Q=(Y=(G=r==null?void 0:r.groupSelect)==null?void 0:G[1])==null?void 0:Y.replaceAll("[",""))==null?void 0:Q.replaceAll("]",""))}),N===-1&&(N=0);let U=(m=(g=(p=(d=n==null?void 0:n.find(V=>(V==null?void 0:V.id)===t))==null?void 0:d.compData)==null?void 0:p.find(V=>(V==null?void 0:V.key)==="tableContents"))==null?void 0:g.contents)==null?void 0:m.map(V=>(V=V==null?void 0:V.filter(G=>!(G!=null&&G.id)),V));if((r==null?void 0:r.filter)!==""){let V={};V[(v=(y=r==null?void 0:r.filter)==null?void 0:y.split("#"))==null?void 0:v[0]]=(w=(b=r==null?void 0:r.filter)==null?void 0:b.split("#"))==null?void 0:w[1];let G=(x=(_=r==null?void 0:r.filter)==null?void 0:_.split("#"))==null?void 0:x[1];G==="@loginUser"&&(G=((S=BT.value)==null?void 0:S.姓名)||((T=BT.value)==null?void 0:T.account)||((A=BT.value)==null?void 0:A.账号));let Y=z==null?void 0:z.findIndex(Q=>{var yt,ot;return(Q==null?void 0:Q.prop)===((ot=(yt=Object.keys(V))==null?void 0:yt[0])==null?void 0:ot.replaceAll("'",""))});U=U==null?void 0:U.filter(Q=>(Q==null?void 0:Q[Y])===G)}if((B=r==null?void 0:r.menuFilter)!=null&&B.find(V=>{var G;return(G=V==null?void 0:V.content)==null?void 0:G.includes("@Condition")})){let V=(D=(E=(F=(O=r==null?void 0:r.menuFilter)==null?void 0:O.find(Y=>{var Q;return(Q=Y==null?void 0:Y.content)==null?void 0:Q.includes("@Condition")}))==null?void 0:F.content)==null?void 0:E.split(":"))==null?void 0:D[1],G=(k=n==null?void 0:n.find(Y=>(Y==null?void 0:Y.id)===t))==null?void 0:k.compData;U=(L=(M=(I=(C=Zh.onConditionContents([G],V))==null?void 0:C[0])==null?void 0:I.find(Y=>(Y==null?void 0:Y.key)==="tableContents"))==null?void 0:M.contents)==null?void 0:L.map(Y=>(Y=Y==null?void 0:Y.filter(Q=>!(Q!=null&&Q.id)),Y))}U==null||U.forEach(V=>{e.push({label:V==null?void 0:V[N],value:V==null?void 0:V[N]})})}return e};/**!
|
|
2
2
|
* Sortable 1.15.6
|
|
3
3
|
* @author RubaXa <trash@rubaxa.org>
|
|
4
4
|
* @author owenm <owen23355@gmail.com>
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineAsyncComponent as ne, computed as D, onMounted as
|
|
1
|
+
import { defineAsyncComponent as ne, computed as D, onMounted as V, resolveComponent as le, createBlock as N, openBlock as U, withCtx as ae, resolveDynamicComponent as oe, defineComponent as ue, defineProps as ce, ref as g, watch as ie, reactive as pe } from "vue";
|
|
2
2
|
import { S as ge } from "./index-BHtNKL1L.js";
|
|
3
|
-
import {
|
|
4
|
-
import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-
|
|
5
|
-
import { u as Ce, a as ye, E as de } from "./index.vue_vue_type_style_index_1_lang-
|
|
6
|
-
import { s as Ae } from "./index-
|
|
3
|
+
import { by as ve, p as he, s as fe, bz as Me, g as me } from "./index-B42dCx1W.js";
|
|
4
|
+
import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Be4dFvUC.js";
|
|
5
|
+
import { u as Ce, a as ye, E as de } from "./index.vue_vue_type_style_index_1_lang-DUZFMfkl.js";
|
|
6
|
+
import { s as Ae } from "./index-B1XSRq6_.js";
|
|
7
7
|
import { useRouter as we } from "vue-router";
|
|
8
8
|
import { e as Te, g as ke, h as Se, a as De, d as Pe } from "./index-C2usxP_Q.js";
|
|
9
|
-
import { g as _e } from "./index-
|
|
10
|
-
const b = ne(() => import("./index-
|
|
9
|
+
import { g as _e } from "./index-DAkKNbYV.js";
|
|
10
|
+
const b = ne(() => import("./index-w38DtIEl.js").then((p) => p.j));
|
|
11
11
|
b.install = (p) => {
|
|
12
12
|
p.component("ssMenu", b);
|
|
13
13
|
};
|
|
@@ -18,12 +18,12 @@ const Fe = {
|
|
|
18
18
|
},
|
|
19
19
|
setup(p) {
|
|
20
20
|
const u = p, T = D(() => ve[u.name]);
|
|
21
|
-
return
|
|
21
|
+
return V(() => {
|
|
22
22
|
}), (k, v) => {
|
|
23
23
|
const P = le("el-icon");
|
|
24
|
-
return
|
|
24
|
+
return U(), N(P, null, {
|
|
25
25
|
default: ae(() => [
|
|
26
|
-
(
|
|
26
|
+
(U(), N(oe(T.value)))
|
|
27
27
|
]),
|
|
28
28
|
_: 1
|
|
29
29
|
});
|
|
@@ -62,7 +62,7 @@ const Fe = {
|
|
|
62
62
|
t.style.setProperty(l.name, l.value);
|
|
63
63
|
});
|
|
64
64
|
};
|
|
65
|
-
|
|
65
|
+
V(() => {
|
|
66
66
|
k.value = 1;
|
|
67
67
|
});
|
|
68
68
|
const L = D(() => {
|
|
@@ -112,10 +112,10 @@ const Fe = {
|
|
|
112
112
|
return ((n = r == null ? void 0 : r.data) == null ? void 0 : n.code) === 200;
|
|
113
113
|
})) {
|
|
114
114
|
const r = o == null ? void 0 : o.map((n) => {
|
|
115
|
-
var d, A, c, w, S, O,
|
|
115
|
+
var d, A, c, w, S, O, z;
|
|
116
116
|
return {
|
|
117
117
|
id: (c = (A = (d = n == null ? void 0 : n.data) == null ? void 0 : d.result) == null ? void 0 : A[0]) == null ? void 0 : c.id,
|
|
118
|
-
...(
|
|
118
|
+
...(z = (O = (S = (w = n == null ? void 0 : n.data) == null ? void 0 : w.result) == null ? void 0 : S[0]) == null ? void 0 : O.value) == null ? void 0 : z.pageData
|
|
119
119
|
};
|
|
120
120
|
});
|
|
121
121
|
t === "create" && (_.value = r), t === "update" && (_.value = r == null ? void 0 : r.map((n) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const s=require("vue"),ne=require("./index-BpPyaNFa.cjs"),w=require("./index-1z9RrjZc.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-
|
|
1
|
+
"use strict";const s=require("vue"),ne=require("./index-BpPyaNFa.cjs"),w=require("./index-1z9RrjZc.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CIRzfvAn.cjs");const R=require("./index.vue_vue_type_style_index_1_lang-ckXQqCiT.cjs"),le=require("./index-CPVt8Wrk.cjs"),oe=require("vue-router"),k=require("./index-9hspBVrQ.cjs"),ue=require("./index-Cu7pB5GB.cjs"),P=s.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-DaOTArXF.cjs")).then(v=>v.index));P.install=v=>{v.component("ssMenu",P)};const U={__name:"index",props:{name:String},setup(v){const a=v,x=s.computed(()=>w.ElIcons[a.name]);return s.onMounted(()=>{}),(T,g)=>{const S=s.resolveComponent("el-icon");return s.openBlock(),s.createBlock(S,null,{default:s.withCtx(()=>[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(x.value)))]),_:1})}}},ce=s.defineComponent({name:"menu",components:{SvgIcon:ne.SvgIcon,ssMenu:P,DynamicIcon:U,ssDialog:le.ssDialog},setup(){const v=s.defineProps({mode:{type:String,default:"vertical"}}),a=R.useMenuState(),x=R.useModelComp(w.pinia),T=s.ref(0),g=oe.useRouter(),{asideMenus:S,menuTriggerType:V,platform:z}=w.storeToRefs(a),H=s.computed(()=>v==null?void 0:v.mode),B=s.computed(()=>{let e=[...S.value];if((e==null?void 0:e.length)===0)return g.push("/"),[];const t=G(e,L.value);return t.isFlag||(e=t==null?void 0:t.data),e}),W=async e=>{x.setRouteToChildPath(""),a.setMenuTriggerType("click"),a.setActiveMenuPath(e==null?void 0:e.path),a.setActiveAsideMenu(e),e.isRouter?g.push(e.path):g.push("/")},J=async e=>{const t=w.findNodeByPropInTree(B.value,"path",e);a.setActiveAsideMenu(t),x.setRouteToChildPath(""),V.value==="click"?T.value===1?a.setActiveMenuPath(sessionStorage.getItem("pageKey")):a.setActiveMenuPath(e):(a.setMenuTriggerType("click"),a.setActiveMenuPath(e)),e!=null&&e.startsWith("/")?g.push(e):g.push("/"),T.value++},K=e=>{a.setActiveMenuPath(e)},h=e=>{const t=document.documentElement;e==null||e.forEach(o=>{t.style.setProperty(o.name,o.value)})};s.onMounted(()=>{T.value=1});const L=s.computed(()=>{const e=sessionStorage.getItem("authority");return e?JSON.parse(e):[]});s.watch(()=>z.value,e=>{e==="browser"?h(k.browserVerticalMenuClasses):e==="client"?(h(k.clientHorizontalMenuClasses),h(k.clientVerticalMenuClasses)):e==="three"&&(h(k.threeHorizontalMenuClasses),h(k.threeVerticalMenuClasses))},{immediate:!0});const j=(e,t)=>{function o(u){u==null||u.forEach(r=>{var f,C;const c=(f=r==null?void 0:r.path)!=null&&f.startsWith("/")?(C=r==null?void 0:r.path)==null?void 0:C.substring(1):r==null?void 0:r.path;r.show=t==null?void 0:t.some(d=>d==null?void 0:d.includes(c)),r.children&&o(r.children)})}return o(e),e},G=(e,t)=>{if(Array.isArray(t)){const o=Array.from(new Set(t==null?void 0:t.map(u=>u.substring(0,u.lastIndexOf("/")))));return{data:j(e,o),isFlag:!1}}else return{isFlag:(t==null?void 0:t.toUpperCase())==="SUPERADMIN"}},p=s.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),I=e=>ue.getComponent(e),Q=s.ref({}),F=s.ref([]),X=async(e,t,o)=>{var C,d,E;if(!(e!=null&&e.structureIds)||((C=e==null?void 0:e.structureIds)==null?void 0:C.length)===0)return;const u=(E=(d=e==null?void 0:e.structureIds)==null?void 0:d.filter(n=>(n==null?void 0:n.key)==="dialogConfig"))==null?void 0:E.map(n=>n==null?void 0:n.id);let r=u==null?void 0:u.map(n=>w.getInsofDataApi({id:n}));const c=await Promise.all(r);if(c==null?void 0:c.every(n=>{var l;return((l=n==null?void 0:n.data)==null?void 0:l.code)===200})){const n=c==null?void 0:c.map(l=>{var _,m,i,A,D,O,N;return{id:(i=(m=(_=l==null?void 0:l.data)==null?void 0:_.result)==null?void 0:m[0])==null?void 0:i.id,...(N=(O=(D=(A=l==null?void 0:l.data)==null?void 0:A.result)==null?void 0:D[0])==null?void 0:O.value)==null?void 0:N.pageData}});t==="create"&&(F.value=n),t==="update"&&(F.value=n==null?void 0:n.map(l=>{var _,m;return((_=l==null?void 0:l.comp)==null?void 0:_.toUpperCase())==="FORM"?{...l,compData:(m=l==null?void 0:l.compData)==null?void 0:m.map(i=>{var A;return(i==null?void 0:i.key)==="formContent"?{...i,contents:(A=i==null?void 0:i.contents)==null?void 0:A.map(D=>({...D,value:o==null?void 0:o.title}))}:i})}:l}))}},y=s.ref({}),M=s.ref({}),Y=e=>{switch(e){case"新增":return"create";case"编辑":return"update";case"删除":return"delete"}},b=s.ref({}),$=e=>{a.setCacheInputMenu({type:p.type,data:e}),a.setIsRefreshMenus(!0)},Z=async(e,t)=>{p.type=Y(t==null?void 0:t.operateType),await X(t,p.type,e),M.value=e,b.value=t,(t==null?void 0:t.operateType)!=="删除"?(p.show=(t==null?void 0:t.trigger)==="openDialog",p.title=(t==null?void 0:t.operateType)+"菜单"):R.ElMessageBox.confirm(`是否确认要删除【${e==null?void 0:e.title}】`,"",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{$(e)})},ee=()=>{p.show=!1},te=e=>e==null?void 0:e.filter(t=>t.allowInherit),se=()=>{var o,u,r,c,f;let e;p.type==="create"&&(e=((o=M.value)==null?void 0:o.path)+"/"+y.value[(u=y.value)==null?void 0:u.prop]),p.type==="update"&&(e=(r=M.value)==null?void 0:r.path);const t={...M.value,config:te((c=M.value)==null?void 0:c.config),children:[],childMenus:[],title:y.value[(f=y.value)==null?void 0:f.prop],path:e};console.log("clickSubmitForm",b.value,M.value,t),$(t),p.show=!1},re=e=>{var o,u;const t=(o=e==null?void 0:e.contents)==null?void 0:o.find(r=>r.key==="formContent");t&&(y.value=(u=t==null?void 0:t.contents)==null?void 0:u.reduce((r,c)=>(r[c.key]=c.value,r.prop=c.key,r),{}))},q=s.ref(!1);return{isCollapse:q,handleMenuCollapse:()=>{q.value=!q.value},handleCompChange:re,dialogForm:Q,dialogRenderComps:F,getComponents:I,clickSubmitForm:se,dialogInfo:p,beforeDialogDestroy:ee,clickMenuIcon:Z,mode:H,renderMenuList:B,clickMenu:W,openMenu:J,closeMenu:K,changeMenuStyle:h}}});exports._sfc_main=ce;exports._sfc_main$1=U;exports.ssMenu=P;
|