ss-component-new 1.3.498 → 1.3.499

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/{array-BzLo9FoD.js → array-Druw5u-M.js} +2 -2
  2. package/dist/{array-D97z0nJZ.cjs → array-ylQqrB4K.cjs} +1 -1
  3. package/dist/{index-89NCtw1f.js → index-0YxREqVR.js} +1 -1
  4. package/dist/{index-CXzyIaKS.cjs → index-7ERgLxYj.cjs} +1 -1
  5. package/dist/{index-DvALRudH.js → index-BBrOiPGK.js} +1 -1
  6. package/dist/{index-DcVTdbvL.cjs → index-BGh1uxro.cjs} +1 -1
  7. package/dist/{index-BZWnLO_1.cjs → index-BXdqQSEY.cjs} +1 -1
  8. package/dist/{index-C8Gs2kb9.cjs → index-BdQMfu_o.cjs} +1 -1
  9. package/dist/{index-7_EcwGcL.js → index-BqNpOBoM.js} +7 -7
  10. package/dist/{index-C9ymYFoj.js → index-C4pAAQdp.js} +1 -1
  11. package/dist/{index-DYfyGCzh.cjs → index-C8rCLtrq.cjs} +1 -1
  12. package/dist/{index-DZE8ct-a.cjs → index-C9xCeExz.cjs} +1 -1
  13. package/dist/{index-ZGugCcFS.cjs → index-CDTGjAKk.cjs} +1 -1
  14. package/dist/{index-B3bhdvYB.js → index-CGeQCMvc.js} +2 -2
  15. package/dist/{index-BRf391bW.js → index-Cfemkaf_.js} +5 -5
  16. package/dist/{index-BXpHEHQK.js → index-Cmk5JeQZ.js} +1 -1
  17. package/dist/{index-DOTzO0oC.js → index-CnWXO1gL.js} +1 -1
  18. package/dist/{index-O8ibsut4.js → index-CzyWUT9R.js} +2 -2
  19. package/dist/{index-DrNcZwW9.js → index-D6EDcJGR.js} +3 -3
  20. package/dist/{index-BBFeM4OJ.cjs → index-Dn24Ga9B.cjs} +1 -1
  21. package/dist/{index-BYk8W1jo.cjs → index-Dvz89DG1.cjs} +1 -1
  22. package/dist/{index-yDS_g8Zg.js → index-K0ndentV.js} +1 -1
  23. package/dist/{index-D61oefkm.cjs → index-WN-zRQKt.cjs} +1 -1
  24. package/dist/{index-XFWr2jDi.cjs → index-Xl-9CGSG.cjs} +1 -1
  25. package/dist/{index-BxqV6K8a.cjs → index-wdYwbcGT.cjs} +2 -2
  26. package/dist/{index-Dd1I1FpL.js → index-zyWWBhHC.js} +2 -2
  27. package/dist/{main-BYr0zGF7.js → main-Cgc13-33.js} +2 -2
  28. package/dist/{main-DkUGanos.cjs → main-DE7TEEn8.cjs} +1 -1
  29. package/dist/ss-component.cjs +1 -1
  30. package/dist/ss-component.css +1 -1
  31. package/dist/ss-component.js +5 -5
  32. package/dist/ss-component2.cjs +1 -1
  33. package/dist/ss-component2.js +8 -8
  34. package/dist/{threeModel-DJufegTZ.js → threeModel-CIsq3kcq.js} +1 -1
  35. package/dist/{threeModel-C_hzvL0g.cjs → threeModel-IDPhScRH.cjs} +1 -1
  36. package/dist/{threeSceneView-DP3w9PCW.cjs → threeSceneView-DStIpx3H.cjs} +1 -1
  37. package/dist/{threeSceneView-D7W8LkVN.js → threeSceneView-f_glJbol.js} +3 -3
  38. package/dist/{threeSceneViewForCPMPIP-BCE-01xK.js → threeSceneViewForCPMPIP-Sx_2Dufk.js} +1 -1
  39. package/dist/{threeSceneViewForCPMPIP-DLA4I3u-.cjs → threeSceneViewForCPMPIP-y0IQPDJJ.cjs} +1 -1
  40. package/dist/{threeViewerHost-DNxvuNKu.js → threeViewerHost-CPqxV-dv.js} +1 -1
  41. package/dist/{threeViewerHost-BZFm839b.cjs → threeViewerHost-VZoDtZCO.cjs} +1 -1
  42. package/package.json +1 -1
@@ -1 +1 @@
1
- "use strict";const t=require("vue"),w=require("./index-CMUsYepp.cjs"),He=require("./index-BpPyaNFa.cjs");require("./index.vue_vue_type_style_index_0_scoped_07c75c98_lang-J7Knzs4U.cjs");const me=require("./request-Dl8yi2iS.cjs"),et=require("./index-B-pflqKE.cjs"),tt=require("./index-DYfyGCzh.cjs"),ot=require("vue-router"),ke=require("./index-DKh4EyHV.cjs"),z=require("./index-DmwxzDGW.cjs"),lt=require("./index-BxqV6K8a.cjs"),st=require("./menuIndex-CBqMx085.cjs"),ue=require("./index-BuZHI6xx.cjs"),it=require("./index-DkTHtURJ.cjs"),at=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Se=t.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-DYfyGCzh.cjs")).then(r=>r.index));Se.install=r=>{r.component("ssMenu",Se)};const Ee={__name:"index",props:{name:String},setup(r){const c=r,S=t.computed(()=>me.Icons[c.name]);return t.onMounted(()=>{}),(h,a)=>{const l=t.resolveComponent("el-icon");return t.openBlock(),t.createBlock(l,null,{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(S.value)))]),_:1})}}},xe=(r,c,S=0)=>{let h=r;return h!=null&&h.every(a=>Array.isArray(a))&&(h!=null&&h.every(a=>Array.isArray(a)&&a.length===1)?h=h==null?void 0:h.filter(a=>(a==null?void 0:a[0])!==(c==null?void 0:c[S])):h=h==null?void 0:h.map(a=>{if(a!=null&&a.find(l=>l===(c==null?void 0:c[S]))&&(c==null?void 0:c.length)!==1){let l=w.cloneDeep(c),n=a==null?void 0:a.filter(C=>C!==(l==null?void 0:l[S])),I=S+1,M=xe(n,l,I),b=[];b.push(a==null?void 0:a[0]),M==null||M.forEach(C=>{b.push(C)}),a=b}return a})),h},qe=(r,c,S,h=0)=>{let a=r;return a!=null&&a.every(l=>Array.isArray(l))&&(a!=null&&a.every(l=>Array.isArray(l)&&l.length===1)?a.push([S]):a=a==null?void 0:a.map(l=>{if(l!=null&&l.find(n=>n===(c==null?void 0:c[h]))&&(c==null?void 0:c.length)!==1){let n=w.cloneDeep(c),I=l==null?void 0:l.filter(E=>E!==(n==null?void 0:n[h])),M=h+1,b=qe(I,n,S,M),C=[];C.push(l==null?void 0:l[0]),b==null||b.forEach(E=>{C.push(E)}),l=C}return l})),a},be=(r,c,S,h,a=0)=>{let l=r;return l!=null&&l.every(n=>Array.isArray(n))&&(l!=null&&l.every(n=>Array.isArray(n)&&n.length===1)?l=l==null?void 0:l.map(n=>((n==null?void 0:n[0])===S&&(n=[h]),n)):l=l==null?void 0:l.map(n=>{if(n!=null&&n.find(I=>I===(c==null?void 0:c[a]))&&(c==null?void 0:c.length)!==1){let I=w.cloneDeep(c),M=n==null?void 0:n.filter(L=>L!==(I==null?void 0:I[a])),b=a+1,C=be(M,I,S,h,b),E=[];E.push(n==null?void 0:n[0]),C==null||C.forEach(L=>{E.push(L)}),n=E}return n})),l};function Ve(r="menu"){return{name:r,components:{SvgIcon:He.SvgIcon,ssMenu:Se,DynamicIcon:Ee,ssDialog:et.ssDialog,ssInput:tt.ssInput},setup(c,{emit:S}){const h=t.defineProps({mode:{type:String,default:"vertical"}}),a=t.ref([{allowInherit:!1,operateType:"复制新增",operateIcon:"CopyAddMenu"},{allowInherit:!1,operateType:"删除",operateIcon:"DeleteMenu"},{allowInherit:!1,operateType:"修改菜单名",operateIcon:"FixedMenu"}]),l=w.useMenuState(),n=w.useModelComp(w.pinia),I=w.useLoginState(w.pinia),{loginUserInfo:M}=w.storeToRefs(I),b=t.ref(0),C=ot.useRouter(),E=t.ref(),{asideMenus:L,menuTriggerType:i,platform:De,jumpMenuInform:U}=w.storeToRefs(l),{fixMenuStatus:_e}=w.storeToRefs(n),{isSuperAdmin:Ie}=it.useRole(),q=t.computed(()=>h==null?void 0:h.mode),Be=o=>o==null?void 0:o.map(e=>{var p,v;return!(e!=null&&e.children)||((p=e==null?void 0:e.children)==null?void 0:p.length)===0?e.config=a.value:e!=null&&e.children&&((v=e==null?void 0:e.children)==null?void 0:v.length)>0&&(e.children=Be(e.children)),e}),we=t.computed(()=>{let o=[...L.value];if((o==null?void 0:o.length)===0)return C.push("/"),[];const s=Ue(o,Le.value);return s.isFlag||(o=s==null?void 0:s.data),o=o==null?void 0:o.map(e=>{var p,v;return!(e!=null&&e.children)||((p=e==null?void 0:e.children)==null?void 0:p.length)===0?e.config=a.value:e!=null&&e.children&&((v=e==null?void 0:e.children)==null?void 0:v.length)>0&&(e.children=Be(e.children)),e}),o}),Fe=async(o,s)=>{n.setRouteToChildPath(""),l.setMenuTriggerType("click"),l.setActiveMenuPath(o==null?void 0:o.path),l.setActiveAsideMenu(o),o.isRouter?C.push(o.path):C.push("/"),S("node-click",o,s)},Ne=async o=>{const s=st.findNodeByPropInTree(we.value,"path",o);l.setActiveAsideMenu(s),n.setRouteToChildPath(""),_e.value?n.setFixMenuStatus(!1):(G.value&&(i.value="open"),i.value==="click"?U.value||l.setActiveMenuPath(o):G.value||(l.setMenuTriggerType("click"),U.value||l.setActiveMenuPath(o))),o!=null&&o.startsWith("/")?C.push(o):C.push("/"),b.value++},$e=o=>{G.value||l.setActiveMenuPath(o)},J=o=>{const s=document.documentElement;o==null||o.forEach(e=>{s.style.setProperty(e.name,e.value)})};t.onMounted(()=>{b.value=1});const Le=t.computed(()=>{const o=sessionStorage.getItem("authority");return o?JSON.parse(o):[]});t.watch(()=>De.value,o=>{o==="browser"?J(ke.browserVerticalMenuClasses):o==="client"?(J(ke.clientHorizontalMenuClasses),J(ke.clientVerticalMenuClasses)):o==="three"&&(J(ke.threeHorizontalMenuClasses),J(ke.threeVerticalMenuClasses))},{immediate:!0});const Ue=(o,s)=>({isFlag:!0}),R=t.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),Re=o=>lt.getComponent(o),je=t.ref({}),Pe=t.ref([]),Z=t.ref({}),W=t.ref({}),Oe=o=>{switch(o){case"复制新增":return"create";case"修改菜单名":return"update";case"删除":return"delete"}},Me=t.ref({}),Ke=o=>{l.setCacheInputMenu({type:R.type,data:o}),l.setIsRefreshMenus(!0)},ze=async(o,s,e)=>{var p,v,k,P,B,Q,A,H,m,ee,te,oe,le,se,ie,ae,re,ne,ce,pe,de,he,fe,ve,ye,Ce,ge;if(s==="create"){let F=(e==null?void 0:e.title)+"(1)",$=(v=(p=e==null?void 0:e.path)==null?void 0:p.split("/"))==null?void 0:v.filter((D,y)=>{var u,T;return y!==((T=(u=e==null?void 0:e.path)==null?void 0:u.split("/"))==null?void 0:T.length)-1}),N=await ue.getItemData((B=(P=(k=e==null?void 0:e.path)==null?void 0:k.split("/"))==null?void 0:P.filter((D,y)=>{var u,T;return y!==((T=(u=e==null?void 0:e.path)==null?void 0:u.split("/"))==null?void 0:T.length)-1}))==null?void 0:B.join("/"),sessionStorage.getItem("systemKey"),"");if($.push(F),$=$==null?void 0:$.join("/"),(N==null?void 0:N.length)>0){let D=N==null?void 0:N[0],y=(A=(Q=D==null?void 0:D.compData)==null?void 0:Q.find(u=>(u==null?void 0:u.key)==="header"))==null?void 0:A.contents;if(((H=y==null?void 0:y[0])==null?void 0:H.directiveLabel)==="#isMain"){let u=(m=y==null?void 0:y[0])==null?void 0:m.prop,T=(te=(ee=D==null?void 0:D.compData)==null?void 0:ee.find(_=>(_==null?void 0:_.key)==="tableContents"))==null?void 0:te.contents,O;T==null||T.forEach(_=>{var K,j;if(_.length===1)((K=_==null?void 0:_[0])==null?void 0:K[u])===(e==null?void 0:e.title)&&(O=_==null?void 0:_[0],O[u]=F);else{let d=(j=y==null?void 0:y.filter(f=>f!=="操作"))==null?void 0:j.map(f=>f==null?void 0:f.prop),V=_==null?void 0:_.filter(f=>!(f!=null&&f.id)),x=ue.getValueToObjectValue(V,d);x[u]=F,O=x}}),await z.createInsofDataApi({key:{type:"data",pageKey:(se=(le=(oe=e==null?void 0:e.path)==null?void 0:oe.split("/"))==null?void 0:le.filter((_,K)=>{var j,d;return K!==((d=(j=e==null?void 0:e.path)==null?void 0:j.split("/"))==null?void 0:d.length)-1}))==null?void 0:se.join("/"),tableId:D==null?void 0:D.id,systemKey:sessionStorage.getItem("systemKey"),createUserId:(ie=M.value)==null?void 0:ie.id,createUserLayer:((ae=M.value)==null?void 0:ae.dept)||((re=M.value)==null?void 0:re.部门名称)},value:{tableData:O}})}}await ue.newLoadingConstruct(e==null?void 0:e.path,$),l.setUpdateMenuStatus(!1),await w.verifyStructureDataToStore(),l.setActiveMenuPath((pe=(ce=(ne=e==null?void 0:e.path)==null?void 0:ne.split("/"))==null?void 0:ce.filter((D,y)=>{var u,T;return y!==((T=(u=e==null?void 0:e.path)==null?void 0:u.split("/"))==null?void 0:T.length)-1}))==null?void 0:pe.join("/")),l.setActiveTopMenuPath((he=(de=e==null?void 0:e.path)==null?void 0:de.split("/"))==null?void 0:he[0]),l.setIsRefreshMenus(!1),l.setIsRefreshMenus(!0)}else if(s==="update")E.value=e;else if(s==="delete"){let F=[];(F==null?void 0:F.length)>0&&await z.batchDeleteInsofDataApi({ids:F}),l.setUpdateMenuStatus(!1),await w.verifyStructureDataToStore(),l.setActiveMenuPath((ye=(ve=(fe=e==null?void 0:e.path)==null?void 0:fe.split("/"))==null?void 0:ve.filter(($,N)=>{var D,y;return N!==((y=(D=e==null?void 0:e.path)==null?void 0:D.split("/"))==null?void 0:y.length)-1}))==null?void 0:ye.join("/")),l.setActiveTopMenuPath((ge=(Ce=e==null?void 0:e.path)==null?void 0:Ce.split("/"))==null?void 0:ge[0]),l.setIsRefreshMenus(!1),l.setIsRefreshMenus(!0)}},Je=async(o,s)=>{var H,m,ee,te,oe,le,se,ie,ae,re,ne,ce,pe,de,he,fe,ve,ye,Ce,ge,F,$,N,D,y,u,T,O,_,K,j;let e=await z.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),p=(m=(H=e==null?void 0:e.data)==null?void 0:H.result)==null?void 0:m[0],v=(ee=p==null?void 0:p.value)==null?void 0:ee.pageData;v.compData=(te=v.compData)==null?void 0:te.map(d=>{var V,x;return(d==null?void 0:d.key)==="menuContents"&&(d.contents=be(d.contents,(V=s==null?void 0:s.path)==null?void 0:V.split("/"),s==null?void 0:s.title,(x=o==null?void 0:o.target)==null?void 0:x.value)),d}),p!=null&&p.id&&await z.updateInsofDataApi({id:p==null?void 0:p.id,value:{pageData:v}});let k=(le=(oe=s==null?void 0:s.path)==null?void 0:oe.split("/"))==null?void 0:le.filter((d,V)=>{var x,f;return V!==((f=(x=s==null?void 0:s.path)==null?void 0:x.split("/"))==null?void 0:f.length)-1}),P=k==null?void 0:k.join("/");k.push((se=o==null?void 0:o.target)==null?void 0:se.value),k=k==null?void 0:k.join("/");let B=await ue.getItemData(P,sessionStorage.getItem("systemKey"),"");if(((ce=(ne=(re=(ae=(ie=B==null?void 0:B[0])==null?void 0:ie.compData)==null?void 0:ae.find(d=>(d==null?void 0:d.key)==="header"))==null?void 0:re.contents)==null?void 0:ne[0])==null?void 0:ce.directiveLabel)==="#isMain"){let d=(ve=(fe=(he=(de=(pe=B==null?void 0:B[0])==null?void 0:pe.compData)==null?void 0:de.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:he.contents)==null?void 0:fe[0])==null?void 0:ve.prop,V=(ge=(Ce=(ye=B==null?void 0:B[0])==null?void 0:ye.compData)==null?void 0:Ce.find(g=>(g==null?void 0:g.key)==="tableContents"))==null?void 0:ge.contents,x=(D=(N=($=(F=B==null?void 0:B[0])==null?void 0:F.compData)==null?void 0:$.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:N.contents)==null?void 0:D.map(g=>g==null?void 0:g.prop),f;if(V==null||V.forEach(g=>{var Y;let X=ue.getValueToObjectValue(g,x);(X==null?void 0:X[d])===s.title&&(f=X,f[d]=(Y=o==null?void 0:o.target)==null?void 0:Y.value)}),f){let g={};for(let Y in f)Y!=="id"&&(g[Y]=f==null?void 0:f[Y]);let X=[{id:f==null?void 0:f.id,value:{tableData:g}}];await z.batchUpdateInsofDataApi({dataList:X})}}let Q=await z.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:s==null?void 0:s.path}}),A=(u=(y=Q==null?void 0:Q.data)==null?void 0:y.result)==null?void 0:u.map(d=>({id:d==null?void 0:d.id,key:d==null?void 0:d.key}));A=A==null?void 0:A.map(d=>(d.key.pageKey=k,d)),(A==null?void 0:A.length)>0&&await z.batchUpdateInsofDataApi({dataList:A}),l.setUpdateMenuStatus(!1),await w.verifyStructureDataToStore(),l.setActiveMenuPath((_=(O=(T=s==null?void 0:s.path)==null?void 0:T.split("/"))==null?void 0:O.filter((d,V)=>{var x,f;return V!==((f=(x=s==null?void 0:s.path)==null?void 0:x.split("/"))==null?void 0:f.length)-1}))==null?void 0:_.join("/")),l.setActiveTopMenuPath((j=(K=s==null?void 0:s.path)==null?void 0:K.split("/"))==null?void 0:j[0]),l.setIsRefreshMenus(!1),l.setIsRefreshMenus(!0),E.value=void 0},We=async(o,s)=>{R.type=Oe(s==null?void 0:s.operateType),await ze(s,R.type,o),W.value=o,Me.value=s},Ge=()=>{R.show=!1},Qe=o=>o==null?void 0:o.filter(s=>s.allowInherit),Xe=()=>{var e,p,v,k,P;let o;R.type==="create"&&(o=((e=W.value)==null?void 0:e.path)+"/"+Z.value[(p=Z.value)==null?void 0:p.prop]),R.type==="update"&&(o=(v=W.value)==null?void 0:v.path);const s={...W.value,config:Qe((k=W.value)==null?void 0:k.config),children:[],childMenus:[],title:Z.value[(P=Z.value)==null?void 0:P.prop],path:o};console.log("clickSubmitForm",Me.value,W.value,s),Ke(s),R.show=!1},Ye=o=>{var e,p;const s=(e=o==null?void 0:o.contents)==null?void 0:e.find(v=>v.key==="formContent");s&&(Z.value=(p=s==null?void 0:s.contents)==null?void 0:p.reduce((v,k)=>(v[k.key]=k.value,v.prop=k.key,v),{}))},G=t.ref(!1),Ze=()=>{G.value=!G.value},Te=t.ref(null);return t.watch(()=>L.value,async o=>{var s,e;if(o){await t.nextTick();const p=o==null?void 0:o[0];if(((s=p==null?void 0:p.children)==null?void 0:s.length)>0){const v=p==null?void 0:p.path;Te.value&&((e=Te.value)==null||e.openMenuRefByIndex(v))}else U!=null&&U.value?l.setJumpMenuInform(!1):l.setActiveMenuPath((p==null?void 0:p.path)??"")}},{immediate:!0}),{menuRef:Te,isCollapse:G,handleMenuCollapse:Ze,handleCompChange:Ye,dialogForm:je,dialogRenderComps:Pe,getComponents:Re,clickSubmitForm:Xe,dialogInfo:R,beforeDialogDestroy:Ge,clickMenuIcon:We,mode:q,renderMenuList:we,clickMenu:Fe,openMenu:Ne,closeMenu:$e,changeMenuStyle:J,fixElement:E,onBlur:Je,isSuperAdmin:Ie}}}}const rt=t.defineComponent(Ve()),nt=["title"],ct={key:1,class:"menu-title",style:{display:"flex",width:"100px"}},pt={key:2,class:"menu-operate-icon"},dt={class:"menu-config-wrap"},ht=["onClick"],ft={class:"module-dialog-content"};function vt(r,c,S,h,a,l){var L;const n=t.resolveComponent("ss-input"),I=t.resolveComponent("svg-icon"),M=t.resolveComponent("el-popover"),b=t.resolveComponent("ss-menu"),C=t.resolveComponent("el-button"),E=t.resolveComponent("ss-dialog");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(b,{ref:"menuRef",class:"vertical-menu",mode:r.mode,menuList:r.renderMenuList,isCollapse:r.isCollapse,uniqueOpened:!0,onClickMenu:r.clickMenu,onOpenMenu:r.openMenu,onCloseMenu:r.closeMenu},{title:t.withCtx(({menu:i})=>{var De,U,_e,Ie;return[!r.fixElement||(i==null?void 0:i.path)!==((De=r.fixElement)==null?void 0:De.path)?(t.openBlock(),t.createElementBlock("span",{key:0,title:i.title,class:"menu-title",style:t.normalizeStyle({marginRight:i!=null&&i.config&&((U=i==null?void 0:i.config)==null?void 0:U.length)>0?"25px":"1px"})},t.toDisplayString(i.title??""),13,nt)):t.createCommentVNode("",!0),r.fixElement&&(i==null?void 0:i.path)===((_e=r.fixElement)==null?void 0:_e.path)?(t.openBlock(),t.createElementBlock("span",ct,[t.createVNode(n,{value:i.title,onBlur:q=>r.onBlur(q,i)},null,8,["value","onBlur"])])):t.createCommentVNode("",!0),i!=null&&i.config&&((Ie=i==null?void 0:i.config)==null?void 0:Ie.length)>0&&r.isSuperAdmin?(t.openBlock(),t.createElementBlock("span",pt,[t.createVNode(M,{title:"",placement:"bottom-start",trigger:"hover","popper-class":"menu-operate-popover"},{reference:t.withCtx(()=>[t.createVNode(I,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})]),default:t.withCtx(()=>[t.createElementVNode("div",dt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i==null?void 0:i.config,q=>(t.openBlock(),t.createElementBlock("div",{class:"menu-config-item",key:q.id,onClick:Be=>r.clickMenuIcon(i,q)},[t.createVNode(I,{name:q==null?void 0:q.operateIcon,style:{width:"15px",height:"15px","margin-right":"8px"}},null,8,["name"]),t.createElementVNode("span",null,t.toDisplayString(q==null?void 0:q.operateType),1)],8,ht))),128))])]),_:2},1024)])):t.createCommentVNode("",!0)]}),_:1},8,["mode","menuList","isCollapse","onClickMenu","onOpenMenu","onCloseMenu"]),((L=r.renderMenuList)==null?void 0:L.length)>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:"fold-icon",onClick:c[0]||(c[0]=(...i)=>r.handleMenuCollapse&&r.handleMenuCollapse(...i))},[t.createVNode(I,{name:r.isCollapse?"expand":"pack",style:{width:"15px",height:"15px"}},null,8,["name"])])):t.createCommentVNode("",!0),t.createVNode(E,{class:"module-dialog",title:r.dialogInfo.title,visible:r.dialogInfo.show,width:r.dialogInfo.width,onBeforeDestroy:r.beforeDialogDestroy},{default:t.withCtx(()=>[t.createElementVNode("div",ft,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.dialogRenderComps,i=>(t.openBlock(),t.createElementBlock("div",{key:i.id},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.getComponents((i==null?void 0:i.comp)??"Input")),{itemData:i==null?void 0:i.compData,key:i==null?void 0:i.id,content:(i==null?void 0:i.contents)??[],config:i==null?void 0:i.config,onContentChange:r.handleCompChange},null,40,["itemData","content","config","onContentChange"]))]))),128))])]),footer:t.withCtx(()=>[t.createElementVNode("div",null,[t.createVNode(C,{id:"themeBorderButton",onClick:r.beforeDialogDestroy},{default:t.withCtx(()=>c[1]||(c[1]=[t.createTextVNode("取消")])),_:1,__:[1]},8,["onClick"]),t.createVNode(C,{id:"themeButton",onClick:r.clickSubmitForm},{default:t.withCtx(()=>c[2]||(c[2]=[t.createTextVNode(" 确认 ")])),_:1,__:[2]},8,["onClick"])])]),_:1},8,["title","visible","width","onBeforeDestroy"])],64)}const Ae=at._export_sfc(rt,[["render",vt],["__scopeId","data-v-a385ba2f"]]),yt=Object.freeze(Object.defineProperty({__proto__:null,addSelectMenu:qe,default:Ae,deleteSelectMenu:xe,fixSelectMenu:be,setComponent:Ve},Symbol.toStringTag,{value:"Module"}));exports._sfc_main=Ee;exports.index=yt;exports.ssMenu=Se;exports.ssVMenu=Ae;
1
+ "use strict";const t=require("vue"),w=require("./index-CMUsYepp.cjs"),He=require("./index-BpPyaNFa.cjs");require("./index.vue_vue_type_style_index_0_scoped_07c75c98_lang-J7Knzs4U.cjs");const me=require("./request-Dl8yi2iS.cjs"),et=require("./index-B-pflqKE.cjs"),tt=require("./index-C8rCLtrq.cjs"),ot=require("vue-router"),ke=require("./index-DKh4EyHV.cjs"),z=require("./index-DmwxzDGW.cjs"),lt=require("./index-wdYwbcGT.cjs"),st=require("./menuIndex-CBqMx085.cjs"),ue=require("./index-BuZHI6xx.cjs"),it=require("./index-DkTHtURJ.cjs"),at=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Se=t.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-C8rCLtrq.cjs")).then(r=>r.index));Se.install=r=>{r.component("ssMenu",Se)};const Ee={__name:"index",props:{name:String},setup(r){const c=r,S=t.computed(()=>me.Icons[c.name]);return t.onMounted(()=>{}),(h,a)=>{const l=t.resolveComponent("el-icon");return t.openBlock(),t.createBlock(l,null,{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(S.value)))]),_:1})}}},xe=(r,c,S=0)=>{let h=r;return h!=null&&h.every(a=>Array.isArray(a))&&(h!=null&&h.every(a=>Array.isArray(a)&&a.length===1)?h=h==null?void 0:h.filter(a=>(a==null?void 0:a[0])!==(c==null?void 0:c[S])):h=h==null?void 0:h.map(a=>{if(a!=null&&a.find(l=>l===(c==null?void 0:c[S]))&&(c==null?void 0:c.length)!==1){let l=w.cloneDeep(c),n=a==null?void 0:a.filter(C=>C!==(l==null?void 0:l[S])),I=S+1,M=xe(n,l,I),b=[];b.push(a==null?void 0:a[0]),M==null||M.forEach(C=>{b.push(C)}),a=b}return a})),h},qe=(r,c,S,h=0)=>{let a=r;return a!=null&&a.every(l=>Array.isArray(l))&&(a!=null&&a.every(l=>Array.isArray(l)&&l.length===1)?a.push([S]):a=a==null?void 0:a.map(l=>{if(l!=null&&l.find(n=>n===(c==null?void 0:c[h]))&&(c==null?void 0:c.length)!==1){let n=w.cloneDeep(c),I=l==null?void 0:l.filter(E=>E!==(n==null?void 0:n[h])),M=h+1,b=qe(I,n,S,M),C=[];C.push(l==null?void 0:l[0]),b==null||b.forEach(E=>{C.push(E)}),l=C}return l})),a},be=(r,c,S,h,a=0)=>{let l=r;return l!=null&&l.every(n=>Array.isArray(n))&&(l!=null&&l.every(n=>Array.isArray(n)&&n.length===1)?l=l==null?void 0:l.map(n=>((n==null?void 0:n[0])===S&&(n=[h]),n)):l=l==null?void 0:l.map(n=>{if(n!=null&&n.find(I=>I===(c==null?void 0:c[a]))&&(c==null?void 0:c.length)!==1){let I=w.cloneDeep(c),M=n==null?void 0:n.filter(L=>L!==(I==null?void 0:I[a])),b=a+1,C=be(M,I,S,h,b),E=[];E.push(n==null?void 0:n[0]),C==null||C.forEach(L=>{E.push(L)}),n=E}return n})),l};function Ve(r="menu"){return{name:r,components:{SvgIcon:He.SvgIcon,ssMenu:Se,DynamicIcon:Ee,ssDialog:et.ssDialog,ssInput:tt.ssInput},setup(c,{emit:S}){const h=t.defineProps({mode:{type:String,default:"vertical"}}),a=t.ref([{allowInherit:!1,operateType:"复制新增",operateIcon:"CopyAddMenu"},{allowInherit:!1,operateType:"删除",operateIcon:"DeleteMenu"},{allowInherit:!1,operateType:"修改菜单名",operateIcon:"FixedMenu"}]),l=w.useMenuState(),n=w.useModelComp(w.pinia),I=w.useLoginState(w.pinia),{loginUserInfo:M}=w.storeToRefs(I),b=t.ref(0),C=ot.useRouter(),E=t.ref(),{asideMenus:L,menuTriggerType:i,platform:De,jumpMenuInform:U}=w.storeToRefs(l),{fixMenuStatus:_e}=w.storeToRefs(n),{isSuperAdmin:Ie}=it.useRole(),q=t.computed(()=>h==null?void 0:h.mode),Be=o=>o==null?void 0:o.map(e=>{var p,v;return!(e!=null&&e.children)||((p=e==null?void 0:e.children)==null?void 0:p.length)===0?e.config=a.value:e!=null&&e.children&&((v=e==null?void 0:e.children)==null?void 0:v.length)>0&&(e.children=Be(e.children)),e}),we=t.computed(()=>{let o=[...L.value];if((o==null?void 0:o.length)===0)return C.push("/"),[];const s=Ue(o,Le.value);return s.isFlag||(o=s==null?void 0:s.data),o=o==null?void 0:o.map(e=>{var p,v;return!(e!=null&&e.children)||((p=e==null?void 0:e.children)==null?void 0:p.length)===0?e.config=a.value:e!=null&&e.children&&((v=e==null?void 0:e.children)==null?void 0:v.length)>0&&(e.children=Be(e.children)),e}),o}),Fe=async(o,s)=>{n.setRouteToChildPath(""),l.setMenuTriggerType("click"),l.setActiveMenuPath(o==null?void 0:o.path),l.setActiveAsideMenu(o),o.isRouter?C.push(o.path):C.push("/"),S("node-click",o,s)},Ne=async o=>{const s=st.findNodeByPropInTree(we.value,"path",o);l.setActiveAsideMenu(s),n.setRouteToChildPath(""),_e.value?n.setFixMenuStatus(!1):(G.value&&(i.value="open"),i.value==="click"?U.value||l.setActiveMenuPath(o):G.value||(l.setMenuTriggerType("click"),U.value||l.setActiveMenuPath(o))),o!=null&&o.startsWith("/")?C.push(o):C.push("/"),b.value++},$e=o=>{G.value||l.setActiveMenuPath(o)},J=o=>{const s=document.documentElement;o==null||o.forEach(e=>{s.style.setProperty(e.name,e.value)})};t.onMounted(()=>{b.value=1});const Le=t.computed(()=>{const o=sessionStorage.getItem("authority");return o?JSON.parse(o):[]});t.watch(()=>De.value,o=>{o==="browser"?J(ke.browserVerticalMenuClasses):o==="client"?(J(ke.clientHorizontalMenuClasses),J(ke.clientVerticalMenuClasses)):o==="three"&&(J(ke.threeHorizontalMenuClasses),J(ke.threeVerticalMenuClasses))},{immediate:!0});const Ue=(o,s)=>({isFlag:!0}),R=t.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),Re=o=>lt.getComponent(o),je=t.ref({}),Pe=t.ref([]),Z=t.ref({}),W=t.ref({}),Oe=o=>{switch(o){case"复制新增":return"create";case"修改菜单名":return"update";case"删除":return"delete"}},Me=t.ref({}),Ke=o=>{l.setCacheInputMenu({type:R.type,data:o}),l.setIsRefreshMenus(!0)},ze=async(o,s,e)=>{var p,v,k,P,B,Q,A,H,m,ee,te,oe,le,se,ie,ae,re,ne,ce,pe,de,he,fe,ve,ye,Ce,ge;if(s==="create"){let F=(e==null?void 0:e.title)+"(1)",$=(v=(p=e==null?void 0:e.path)==null?void 0:p.split("/"))==null?void 0:v.filter((D,y)=>{var u,T;return y!==((T=(u=e==null?void 0:e.path)==null?void 0:u.split("/"))==null?void 0:T.length)-1}),N=await ue.getItemData((B=(P=(k=e==null?void 0:e.path)==null?void 0:k.split("/"))==null?void 0:P.filter((D,y)=>{var u,T;return y!==((T=(u=e==null?void 0:e.path)==null?void 0:u.split("/"))==null?void 0:T.length)-1}))==null?void 0:B.join("/"),sessionStorage.getItem("systemKey"),"");if($.push(F),$=$==null?void 0:$.join("/"),(N==null?void 0:N.length)>0){let D=N==null?void 0:N[0],y=(A=(Q=D==null?void 0:D.compData)==null?void 0:Q.find(u=>(u==null?void 0:u.key)==="header"))==null?void 0:A.contents;if(((H=y==null?void 0:y[0])==null?void 0:H.directiveLabel)==="#isMain"){let u=(m=y==null?void 0:y[0])==null?void 0:m.prop,T=(te=(ee=D==null?void 0:D.compData)==null?void 0:ee.find(_=>(_==null?void 0:_.key)==="tableContents"))==null?void 0:te.contents,O;T==null||T.forEach(_=>{var K,j;if(_.length===1)((K=_==null?void 0:_[0])==null?void 0:K[u])===(e==null?void 0:e.title)&&(O=_==null?void 0:_[0],O[u]=F);else{let d=(j=y==null?void 0:y.filter(f=>f!=="操作"))==null?void 0:j.map(f=>f==null?void 0:f.prop),V=_==null?void 0:_.filter(f=>!(f!=null&&f.id)),x=ue.getValueToObjectValue(V,d);x[u]=F,O=x}}),await z.createInsofDataApi({key:{type:"data",pageKey:(se=(le=(oe=e==null?void 0:e.path)==null?void 0:oe.split("/"))==null?void 0:le.filter((_,K)=>{var j,d;return K!==((d=(j=e==null?void 0:e.path)==null?void 0:j.split("/"))==null?void 0:d.length)-1}))==null?void 0:se.join("/"),tableId:D==null?void 0:D.id,systemKey:sessionStorage.getItem("systemKey"),createUserId:(ie=M.value)==null?void 0:ie.id,createUserLayer:((ae=M.value)==null?void 0:ae.dept)||((re=M.value)==null?void 0:re.部门名称)},value:{tableData:O}})}}await ue.newLoadingConstruct(e==null?void 0:e.path,$),l.setUpdateMenuStatus(!1),await w.verifyStructureDataToStore(),l.setActiveMenuPath((pe=(ce=(ne=e==null?void 0:e.path)==null?void 0:ne.split("/"))==null?void 0:ce.filter((D,y)=>{var u,T;return y!==((T=(u=e==null?void 0:e.path)==null?void 0:u.split("/"))==null?void 0:T.length)-1}))==null?void 0:pe.join("/")),l.setActiveTopMenuPath((he=(de=e==null?void 0:e.path)==null?void 0:de.split("/"))==null?void 0:he[0]),l.setIsRefreshMenus(!1),l.setIsRefreshMenus(!0)}else if(s==="update")E.value=e;else if(s==="delete"){let F=[];(F==null?void 0:F.length)>0&&await z.batchDeleteInsofDataApi({ids:F}),l.setUpdateMenuStatus(!1),await w.verifyStructureDataToStore(),l.setActiveMenuPath((ye=(ve=(fe=e==null?void 0:e.path)==null?void 0:fe.split("/"))==null?void 0:ve.filter(($,N)=>{var D,y;return N!==((y=(D=e==null?void 0:e.path)==null?void 0:D.split("/"))==null?void 0:y.length)-1}))==null?void 0:ye.join("/")),l.setActiveTopMenuPath((ge=(Ce=e==null?void 0:e.path)==null?void 0:Ce.split("/"))==null?void 0:ge[0]),l.setIsRefreshMenus(!1),l.setIsRefreshMenus(!0)}},Je=async(o,s)=>{var H,m,ee,te,oe,le,se,ie,ae,re,ne,ce,pe,de,he,fe,ve,ye,Ce,ge,F,$,N,D,y,u,T,O,_,K,j;let e=await z.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),p=(m=(H=e==null?void 0:e.data)==null?void 0:H.result)==null?void 0:m[0],v=(ee=p==null?void 0:p.value)==null?void 0:ee.pageData;v.compData=(te=v.compData)==null?void 0:te.map(d=>{var V,x;return(d==null?void 0:d.key)==="menuContents"&&(d.contents=be(d.contents,(V=s==null?void 0:s.path)==null?void 0:V.split("/"),s==null?void 0:s.title,(x=o==null?void 0:o.target)==null?void 0:x.value)),d}),p!=null&&p.id&&await z.updateInsofDataApi({id:p==null?void 0:p.id,value:{pageData:v}});let k=(le=(oe=s==null?void 0:s.path)==null?void 0:oe.split("/"))==null?void 0:le.filter((d,V)=>{var x,f;return V!==((f=(x=s==null?void 0:s.path)==null?void 0:x.split("/"))==null?void 0:f.length)-1}),P=k==null?void 0:k.join("/");k.push((se=o==null?void 0:o.target)==null?void 0:se.value),k=k==null?void 0:k.join("/");let B=await ue.getItemData(P,sessionStorage.getItem("systemKey"),"");if(((ce=(ne=(re=(ae=(ie=B==null?void 0:B[0])==null?void 0:ie.compData)==null?void 0:ae.find(d=>(d==null?void 0:d.key)==="header"))==null?void 0:re.contents)==null?void 0:ne[0])==null?void 0:ce.directiveLabel)==="#isMain"){let d=(ve=(fe=(he=(de=(pe=B==null?void 0:B[0])==null?void 0:pe.compData)==null?void 0:de.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:he.contents)==null?void 0:fe[0])==null?void 0:ve.prop,V=(ge=(Ce=(ye=B==null?void 0:B[0])==null?void 0:ye.compData)==null?void 0:Ce.find(g=>(g==null?void 0:g.key)==="tableContents"))==null?void 0:ge.contents,x=(D=(N=($=(F=B==null?void 0:B[0])==null?void 0:F.compData)==null?void 0:$.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:N.contents)==null?void 0:D.map(g=>g==null?void 0:g.prop),f;if(V==null||V.forEach(g=>{var Y;let X=ue.getValueToObjectValue(g,x);(X==null?void 0:X[d])===s.title&&(f=X,f[d]=(Y=o==null?void 0:o.target)==null?void 0:Y.value)}),f){let g={};for(let Y in f)Y!=="id"&&(g[Y]=f==null?void 0:f[Y]);let X=[{id:f==null?void 0:f.id,value:{tableData:g}}];await z.batchUpdateInsofDataApi({dataList:X})}}let Q=await z.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:s==null?void 0:s.path}}),A=(u=(y=Q==null?void 0:Q.data)==null?void 0:y.result)==null?void 0:u.map(d=>({id:d==null?void 0:d.id,key:d==null?void 0:d.key}));A=A==null?void 0:A.map(d=>(d.key.pageKey=k,d)),(A==null?void 0:A.length)>0&&await z.batchUpdateInsofDataApi({dataList:A}),l.setUpdateMenuStatus(!1),await w.verifyStructureDataToStore(),l.setActiveMenuPath((_=(O=(T=s==null?void 0:s.path)==null?void 0:T.split("/"))==null?void 0:O.filter((d,V)=>{var x,f;return V!==((f=(x=s==null?void 0:s.path)==null?void 0:x.split("/"))==null?void 0:f.length)-1}))==null?void 0:_.join("/")),l.setActiveTopMenuPath((j=(K=s==null?void 0:s.path)==null?void 0:K.split("/"))==null?void 0:j[0]),l.setIsRefreshMenus(!1),l.setIsRefreshMenus(!0),E.value=void 0},We=async(o,s)=>{R.type=Oe(s==null?void 0:s.operateType),await ze(s,R.type,o),W.value=o,Me.value=s},Ge=()=>{R.show=!1},Qe=o=>o==null?void 0:o.filter(s=>s.allowInherit),Xe=()=>{var e,p,v,k,P;let o;R.type==="create"&&(o=((e=W.value)==null?void 0:e.path)+"/"+Z.value[(p=Z.value)==null?void 0:p.prop]),R.type==="update"&&(o=(v=W.value)==null?void 0:v.path);const s={...W.value,config:Qe((k=W.value)==null?void 0:k.config),children:[],childMenus:[],title:Z.value[(P=Z.value)==null?void 0:P.prop],path:o};console.log("clickSubmitForm",Me.value,W.value,s),Ke(s),R.show=!1},Ye=o=>{var e,p;const s=(e=o==null?void 0:o.contents)==null?void 0:e.find(v=>v.key==="formContent");s&&(Z.value=(p=s==null?void 0:s.contents)==null?void 0:p.reduce((v,k)=>(v[k.key]=k.value,v.prop=k.key,v),{}))},G=t.ref(!1),Ze=()=>{G.value=!G.value},Te=t.ref(null);return t.watch(()=>L.value,async o=>{var s,e;if(o){await t.nextTick();const p=o==null?void 0:o[0];if(((s=p==null?void 0:p.children)==null?void 0:s.length)>0){const v=p==null?void 0:p.path;Te.value&&((e=Te.value)==null||e.openMenuRefByIndex(v))}else U!=null&&U.value?l.setJumpMenuInform(!1):l.setActiveMenuPath((p==null?void 0:p.path)??"")}},{immediate:!0}),{menuRef:Te,isCollapse:G,handleMenuCollapse:Ze,handleCompChange:Ye,dialogForm:je,dialogRenderComps:Pe,getComponents:Re,clickSubmitForm:Xe,dialogInfo:R,beforeDialogDestroy:Ge,clickMenuIcon:We,mode:q,renderMenuList:we,clickMenu:Fe,openMenu:Ne,closeMenu:$e,changeMenuStyle:J,fixElement:E,onBlur:Je,isSuperAdmin:Ie}}}}const rt=t.defineComponent(Ve()),nt=["title"],ct={key:1,class:"menu-title",style:{display:"flex",width:"100px"}},pt={key:2,class:"menu-operate-icon"},dt={class:"menu-config-wrap"},ht=["onClick"],ft={class:"module-dialog-content"};function vt(r,c,S,h,a,l){var L;const n=t.resolveComponent("ss-input"),I=t.resolveComponent("svg-icon"),M=t.resolveComponent("el-popover"),b=t.resolveComponent("ss-menu"),C=t.resolveComponent("el-button"),E=t.resolveComponent("ss-dialog");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(b,{ref:"menuRef",class:"vertical-menu",mode:r.mode,menuList:r.renderMenuList,isCollapse:r.isCollapse,uniqueOpened:!0,onClickMenu:r.clickMenu,onOpenMenu:r.openMenu,onCloseMenu:r.closeMenu},{title:t.withCtx(({menu:i})=>{var De,U,_e,Ie;return[!r.fixElement||(i==null?void 0:i.path)!==((De=r.fixElement)==null?void 0:De.path)?(t.openBlock(),t.createElementBlock("span",{key:0,title:i.title,class:"menu-title",style:t.normalizeStyle({marginRight:i!=null&&i.config&&((U=i==null?void 0:i.config)==null?void 0:U.length)>0?"25px":"1px"})},t.toDisplayString(i.title??""),13,nt)):t.createCommentVNode("",!0),r.fixElement&&(i==null?void 0:i.path)===((_e=r.fixElement)==null?void 0:_e.path)?(t.openBlock(),t.createElementBlock("span",ct,[t.createVNode(n,{value:i.title,onBlur:q=>r.onBlur(q,i)},null,8,["value","onBlur"])])):t.createCommentVNode("",!0),i!=null&&i.config&&((Ie=i==null?void 0:i.config)==null?void 0:Ie.length)>0&&r.isSuperAdmin?(t.openBlock(),t.createElementBlock("span",pt,[t.createVNode(M,{title:"",placement:"bottom-start",trigger:"hover","popper-class":"menu-operate-popover"},{reference:t.withCtx(()=>[t.createVNode(I,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})]),default:t.withCtx(()=>[t.createElementVNode("div",dt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i==null?void 0:i.config,q=>(t.openBlock(),t.createElementBlock("div",{class:"menu-config-item",key:q.id,onClick:Be=>r.clickMenuIcon(i,q)},[t.createVNode(I,{name:q==null?void 0:q.operateIcon,style:{width:"15px",height:"15px","margin-right":"8px"}},null,8,["name"]),t.createElementVNode("span",null,t.toDisplayString(q==null?void 0:q.operateType),1)],8,ht))),128))])]),_:2},1024)])):t.createCommentVNode("",!0)]}),_:1},8,["mode","menuList","isCollapse","onClickMenu","onOpenMenu","onCloseMenu"]),((L=r.renderMenuList)==null?void 0:L.length)>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:"fold-icon",onClick:c[0]||(c[0]=(...i)=>r.handleMenuCollapse&&r.handleMenuCollapse(...i))},[t.createVNode(I,{name:r.isCollapse?"expand":"pack",style:{width:"15px",height:"15px"}},null,8,["name"])])):t.createCommentVNode("",!0),t.createVNode(E,{class:"module-dialog",title:r.dialogInfo.title,visible:r.dialogInfo.show,width:r.dialogInfo.width,onBeforeDestroy:r.beforeDialogDestroy},{default:t.withCtx(()=>[t.createElementVNode("div",ft,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.dialogRenderComps,i=>(t.openBlock(),t.createElementBlock("div",{key:i.id},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.getComponents((i==null?void 0:i.comp)??"Input")),{itemData:i==null?void 0:i.compData,key:i==null?void 0:i.id,content:(i==null?void 0:i.contents)??[],config:i==null?void 0:i.config,onContentChange:r.handleCompChange},null,40,["itemData","content","config","onContentChange"]))]))),128))])]),footer:t.withCtx(()=>[t.createElementVNode("div",null,[t.createVNode(C,{id:"themeBorderButton",onClick:r.beforeDialogDestroy},{default:t.withCtx(()=>c[1]||(c[1]=[t.createTextVNode("取消")])),_:1,__:[1]},8,["onClick"]),t.createVNode(C,{id:"themeButton",onClick:r.clickSubmitForm},{default:t.withCtx(()=>c[2]||(c[2]=[t.createTextVNode(" 确认 ")])),_:1,__:[2]},8,["onClick"])])]),_:1},8,["title","visible","width","onBeforeDestroy"])],64)}const Ae=at._export_sfc(rt,[["render",vt],["__scopeId","data-v-a385ba2f"]]),yt=Object.freeze(Object.defineProperty({__proto__:null,addSelectMenu:qe,default:Ae,deleteSelectMenu:xe,fixSelectMenu:be,setComponent:Ve},Symbol.toStringTag,{value:"Module"}));exports._sfc_main=Ee;exports.index=yt;exports.ssMenu=Se;exports.ssVMenu=Ae;
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),C=require("./request-Dl8yi2iS.cjs"),_=require("./index-CMUsYepp.cjs"),N=require("./index-DmwxzDGW.cjs"),M=require("./JSEncrypt-IYbV4kRj.cjs"),Q=require("./index-BuZHI6xx.cjs"),X=require("./index-CWEUTGiD.cjs"),T=require("./index-DYfyGCzh.cjs"),R=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),U=require("./index-BpPyaNFa.cjs");function Y(r,s){const t=new M.JSEncrypt;return t.setPublicKey(s),t.encrypt(r)||""}function Z(r,s){const t=new M.JSEncrypt;return t.setPrivateKey(s),t.decrypt(r)||""}const V=_.useLoginState(_.pinia),{loginUserInfo:p,cryptoInfo:x}=_.storeToRefs(V),ee=_.useMenuState(_.pinia),{activeMenuPath:A}=_.storeToRefs(ee),L=e.ref(0),K=e.computed(()=>{var r,s,t,o,l,u,a,f,b,m,y;return[{label:"",name:"账号",prop:"账号",value:((r=p.value)==null?void 0:r.account)||(((s=p.value)==null?void 0:s.账号)??"未知")},{label:"",name:"角色名称",prop:"角色名称",value:((t=p.value)==null?void 0:t.layer)==="superAdmin"?"超级管理员":(o=p.value)==null?void 0:o.角色名称},{label:"",name:"部门名称",prop:"部门名称",value:((l=p.value)==null?void 0:l.部门名称)??"未知"},{label:"",name:"状态",prop:"状态",value:((u=p.value)==null?void 0:u.layer)==="superAdmin"?"启用":((a=p.value)==null?void 0:a.状态)??"未知"},{label:"",prop:"头像",isFormColHidden:!0,value:((f=p.value)==null?void 0:f.layer)==="superAdmin"?"启用":((b=p.value)==null?void 0:b.状态)??"未知"},{label:"",prop:"签名",isFormColHidden:!0,value:((m=p.value)==null?void 0:m.layer)==="superAdmin"?"启用":((y=p.value)==null?void 0:y.状态)??"未知"}]}),te=()=>{},q=e.ref(!1),E=e.reactive({dialogTitle:"电子签名",dialogWidth:"30",dialogShow:!1,url:""}),D=e.ref([{label:"签字版",icon:C.edit_pen_default,type:"button",disabled:!1},{label:"电子签名",icon:C.edit_default,type:"button",disabled:!1},{label:"上传手写签名",icon:C.upload_filled_default,type:"buttonUpload",disabled:!1}]),P=e.ref(!1),$=e.ref(!1),z=e.ref(!1),O=e.computed(()=>{var o,l,u;const r=sessionStorage.getItem("authority"),s=JSON.parse(r||""),t=(o=A.value)!=null&&o.startsWith("/")?(l=A.value)==null?void 0:l.substring(1):A.value;return Array.isArray(s)?(z.value=!(s!=null&&s.includes(`${t}/上传头像`)),(u=D.value)==null?void 0:u.map(a=>({...a,disabled:!(s!=null&&s.includes(`${t}/签名`))}))):typeof s=="string"&&(s==null?void 0:s.toUpperCase())==="SUPERADMIN"?D.value:[]}),ae=e.computed(()=>[{key:"signConfig",contents:E},{key:"signTypeList",contents:O.value}]),re=r=>{E.dialogShow=r.label==="电子签名"},W=()=>{E.dialogShow=!1},j=async r=>{var t,o,l,u,a,f,b,m,y;const s=await N.getInsofDataApi({id:r});if(((t=s==null?void 0:s.data)==null?void 0:t.code)===200&&s.data.result&&Array.isArray(s.data.result)&&s.data.result.length>0){const d={...(u=(l=(o=s.data.result)==null?void 0:o[0])==null?void 0:l.value)==null?void 0:u.tableData,id:(f=(a=s.data.result)==null?void 0:a[0])==null?void 0:f.id,layer:(y=(m=(b=s.data.result)==null?void 0:b[0])==null?void 0:m.key)==null?void 0:y.layer};V.setLoginUserInfo(d)}},H=async(r,s)=>{var o,l,u;const t=_.cloneDeep(r);t==null||delete t.id;try{const a=await N.updateInsofDataApi({id:(o=p.value)==null?void 0:o.id,value:{tableData:t}});((l=a==null?void 0:a.data)==null?void 0:l.code)===200&&(W(),C.ElMessage.success("修改成功"),await j((u=p.value)==null?void 0:u.id),await V.setLogRecordAsync({type:s,data:r},A.value))}catch{C.ElMessage.error("修改响应失败")}finally{q.value=!1,P.value=!1,$.value=!1}},se=async(r,s)=>{var l;const t=r==="avatarUrl"?"头像":"签名",o={...p.value,status:((l=p.value)==null?void 0:l.status)??"启用",[t]:s};P.value=r==="avatarUrl",$.value=r==="signature",await H(o,"图片修改")},I=e.reactive({baseCols:[],otherCols:[]}),J=e.ref([]),G=e.ref(),ne=(r,s,t)=>{var u,a,f,b,m,y;let o;const l=s;((a=(u=p.value)==null?void 0:u.layer)==null?void 0:a.toUpperCase())!=="SUPERADMIN"?o=(f=p.value)!=null&&f.password?Z((b=p.value)==null?void 0:b.password,(m=x==null?void 0:x.value)==null?void 0:m.privateKey):Q.resetPassword:o=(y=p.value)==null?void 0:y.password,o===l?t():t(new Error("输入的密码与原密码不匹配,请重新输入"))},oe=(r,s,t)=>{s?t():t(new Error("请输入密码"))},le=(r,s,t)=>{var o;s!==((o=G.value)==null?void 0:o.newtPass)?t(new Error("两次输入的密码不一致")):t()},ue=async()=>{var s,t,o,l,u,a,f,b,m,y;const r=await N.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),type:"structure",pageKey:"系统管理/用户管理"}});if(((s=r==null?void 0:r.data)==null?void 0:s.code)===200&&r.data.result&&((t=r.data.result)==null?void 0:t.length)>0){const d=(f=(a=(u=(l=(o=r.data.result)==null?void 0:o[0])==null?void 0:l.value)==null?void 0:u.pageData)==null?void 0:a.compData)==null?void 0:f.find(n=>(n==null?void 0:n.key)==="header"),w=(b=K.value)==null?void 0:b.map(n=>n==null?void 0:n.prop);I.baseCols=d&&((m=d.contents)==null?void 0:m.map(n=>({...n,isFormColHidden:(w==null?void 0:w.includes(n==null?void 0:n.prop))||(n==null?void 0:n.label)==="操作"})));const S=(y=d.contents)==null?void 0:y.find(n=>(n==null?void 0:n.prop)==="password"),i=[{...S,label:"当前密码",prop:"currentPass",validator:ne},{...S,label:"新密码",prop:"newtPass",validator:oe},{...S,label:"确认密码",prop:"confirmNewPass",validator:le}];I.otherCols=i,de(p.value)}},ie=r=>{G.value=r},ce=async({content:r,buttonName:s})=>{var o,l,u,a,f;let t;s==="确定"&&(t={...p.value,status:((o=p.value)==null?void 0:o.status)??"启用",password:((u=(l=p.value)==null?void 0:l.layer)==null?void 0:u.toUpperCase())==="SUPERADMIN"?r==null?void 0:r.confirmNewPass:Y(r==null?void 0:r.confirmNewPass,(a=x.value)==null?void 0:a.publicKey)}),s==="保存基本信息"&&(t={...p.value,...r,status:((f=p.value)==null?void 0:f.status)??"启用"}),q.value=!0,await H(t,s)},F=()=>{var o,l;const r={base:[{label:"保存基本信息"}],other:[{label:"重置",background:"#b7b8b8"},{label:"确定"}]},s=sessionStorage.getItem("authority"),t=JSON.parse(s||"");if(Array.isArray(t)){const u=(o=A.value)!=null&&o.startsWith("/")?(l=A.value)==null?void 0:l.substring(1):A.value,a=t!=null&&t.includes(`${u}/基本信息`)?r==null?void 0:r.base:[],f=t!=null&&t.includes(`${u}/修改密码`)?r==null?void 0:r.other:[];return{base:a,other:f}}else return typeof t=="string"&&(t==null?void 0:t.toUpperCase())==="SUPERADMIN"?r:null},de=r=>{var s,t,o,l,u;J.value=[{value:"基础信息",label:"基础信息",children:[{type:"form",content:{rowContents:(s=I.baseCols)==null?void 0:s.map(a=>({...a,width:2,type:a==null?void 0:a.formType,name:a==null?void 0:a.prop,prop:a==null?void 0:a.prop,contents:a==null?void 0:a.options,value:r[a==null?void 0:a.prop]})),formRules:{userName:[{required:!0,message:"输入不能为空",trigger:"blur"}],birthDay:[{required:!0,message:"输入不能为空",trigger:"blur"}],phone:[{required:!0,message:"输入不能为空",trigger:"blur"}]},buttonValue:(t=F())==null?void 0:t.base,isEnableWrap:!1,isButtonRow:!1},value:""}]},{value:"修改密码",label:"修改密码",children:[{type:"form",content:{rowContents:(o=I.otherCols)==null?void 0:o.map(a=>({...a,width:1,type:a==null?void 0:a.formType,name:a==null?void 0:a.prop,contents:a==null?void 0:a.options})),formRules:(l=I.otherCols)==null?void 0:l.reduce((a,f)=>(a[f.prop]=[{required:!0,message:"输入有误",trigger:"change"},{validator:(b,m,y)=>f.validator(b,m,y),trigger:"blur"}],a),{}),buttonValue:(u=F())==null?void 0:u.other,isEnableWrap:!1},value:""}]}]},pe=Object.freeze(Object.defineProperty({__proto__:null,avatarLoading:P,beforeSignDestroy:W,changeFormTrigger:ie,clickFormButton:te,clickSignButton:re,clickTabButton:ce,getUserTableHeadersAsync:ue,itemData:ae,loading:q,refreshLoginUserInfoAsync:j,rowContents:K,signPadInfo:E,signTypes:O,signatureLoading:$,submitImageAsync:se,tabKey:L,tabsContents:J,tempSignTypes:D,uploadDisabled:z},Symbol.toStringTag,{value:"Module"})),fe={class:"avatar-model-wrap"},ge={key:0},ve=e.defineComponent({__name:"index",props:{disabled:{type:Boolean,default:!1},avatarUrl:{type:String,default:""},size:{type:[String,Number],default:"large"},userInfo:{type:Object,default:{}},clickStop:{type:Boolean,default:!0}},emits:["submitImage","deleteImage"],setup(r,{emit:s}){const t=r,o=s,l=e.computed(()=>"http://222.92.178.198:62001"),u=e.ref(""),a=e.ref(""),f=e.ref();e.watch(()=>{var d;return(d=t.userInfo)==null?void 0:d.头像},d=>{a.value=d?l.value+"/"+d:""},{immediate:!0});const b=async()=>{if(!(t!=null&&t.disabled))try{const d=await _.platformDownloadFile({url:u.value});if(d.status!==200)throw new Error(`HTTP error! status: ${d.status}`);const w=new Blob([d.data],{type:d.headers["content-type"]});f.value=w}catch(d){throw new Error(d)}},m=async d=>{var w,S,i,n,h;try{const g=await T.uploadFile(d);((w=g==null?void 0:g.data)==null?void 0:w.code)===200&&(a.value=l.value+"/"+((i=(S=g.data)==null?void 0:S.result)==null?void 0:i.url),u.value=(h=(n=g.data)==null?void 0:n.result)==null?void 0:h.url,o("submitImage",u.value))}catch(g){C.ElMessage.error(g)}},y=async()=>{try{if(!a.value)return}catch(d){C.ElMessage.error(d)}};return(d,w)=>{var S,i;return e.openBlock(),e.createElementBlock("div",fe,[e.createVNode(X.Avatar,{avatarUrl:a.value??"",avatarBlob:f.value,size:r.size,onClickAvatar:b,onSubmitImage:m,onDeleteImage:y,clickStop:t==null?void 0:t.clickStop},{avatarDefault:e.withCtx(()=>{var n,h,g,v;return[e.createTextVNode(e.toDisplayString(((h=(n=r.userInfo)==null?void 0:n.account)==null?void 0:h.charAt(0))||((v=(g=r.userInfo)==null?void 0:g.姓名)==null?void 0:v.charAt(0))||""),1)]}),_:1},8,["avatarUrl","avatarBlob","size","clickStop"]),r.disabled?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",ge,e.toDisplayString(((S=r.userInfo)==null?void 0:S.account)||((i=r.userInfo)==null?void 0:i.账号)||"未知"),1))])}}}),ye=R._export_sfc(ve,[["__scopeId","data-v-1a1f2575"]]),be=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["clickSignButton","clickSubmitSign","beforeDestroy"],setup(r,{emit:s}){const t=r,o=e.ref({}),l=e.ref([]),u=s,a=i=>{o.value.dialogShow=(i==null?void 0:i.label)==="电子签名",u("clickSignButton",i)},f=()=>{o.value.dialogShow=!1,u("beforeDestroy")},b=e.computed(()=>"http://222.92.178.198:62001"),m=i=>{var c;const n=i.split(","),h=(c=n==null?void 0:n[0])==null?void 0:c.match(/:(.*?);/)[1],g=atob(n[1]);let v=g.length;const k=new Uint8Array(v);for(;v--;)k[v]=g.charCodeAt(v);return new Blob([k],{type:h})},y=async i=>{var n,h,g;try{const v=await T.uploadFile(i);((n=v==null?void 0:v.data)==null?void 0:n.code)===200&&u("clickSubmitSign",(g=(h=v.data)==null?void 0:h.result)==null?void 0:g.url)}catch(v){C.ElMessage.error(v)}},d=e.ref(""),w=i=>{d.value=i,o.value.dialogShow=!1;const n=new FormData,h=m(i);n.append("file",h,"image.png"),y(n)},S=i=>{const n=new FormData;n.append("file",i==null?void 0:i.file),y(n)};return e.watch(()=>t==null?void 0:t.itemData,i=>{var h,g,v,k;d.value="",(h=o.value)!=null&&h.dialogShow&&(o.value.dialogShow=!1);const n=(g=i==null?void 0:i.find(c=>(c==null?void 0:c.key)==="signConfig"))==null?void 0:g.contents;n&&Object.keys(n).forEach(c=>{(n[c]===void 0||n[c]===null||n[c]==="")&&delete n[c]}),o.value=(v=i==null?void 0:i.find(c=>(c==null?void 0:c.key)==="signConfig"))==null?void 0:v.contents,l.value=(k=i==null?void 0:i.find(c=>(c==null?void 0:c.key)==="signTypeList"))==null?void 0:k.contents},{immediate:!0}),(i,n)=>{const h=e.resolveComponent("el-empty"),g=e.resolveComponent("el-image"),v=e.resolveComponent("el-button"),k=e.resolveComponent("el-upload");return e.openBlock(),e.createBlock(T.Signature,{signPadInfo:o.value,onBeforeDestroy:f,onClickSubmitSign:w},{signatureRender:e.withCtx(()=>{var c,B;return[e.createElementVNode("div",{class:"signature-render",style:e.normalizeStyle({width:`${(c=o.value)==null?void 0:c.signPadWidth}%`})},[e.createVNode(g,{src:d.value?d.value:b.value+"/"+((B=r.userInfo)==null?void 0:B.签名),fit:"contain"},{error:e.withCtx(()=>[e.createVNode(h,{"image-size":60,description:" "},{image:e.withCtx(()=>[e.createVNode(U.SvgIcon,{name:"emptyImg"})]),_:1})]),_:1},8,["src"])],4)]}),signatureTypes:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,c=>{var B;return e.openBlock(),e.createElementBlock("div",{key:c.label,class:"signature-button"},[(B=c.label)!=null&&B.includes("上传")?(e.openBlock(),e.createBlock(k,{key:0,ref_for:!0,ref:"uploadRef","http-request":S,"show-file-list":!1},{trigger:e.withCtx(()=>[e.createVNode(v,{disabled:c.disabled,id:"themeButton"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.label),1)]),icon:e.withCtx(()=>[e.createVNode(U.SvgIcon,{name:c.icon??""},null,8,["name"])]),_:2},1032,["disabled"])]),_:2},1536)):(e.openBlock(),e.createBlock(v,{key:1,id:"themeButton",disabled:c.disabled,onClick:he=>a(c)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.label),1)]),icon:e.withCtx(()=>[e.createVNode(U.SvgIcon,{name:c.icon??""},null,8,["name"])]),_:2},1032,["disabled","onClick"]))])}),128))]),_:1},8,["signPadInfo"])}}}),me=R._export_sfc(be,[["__scopeId","data-v-ce5a2314"]]);exports.State=pe;exports.ssAvatar=ye;exports.ssSignature=me;exports.tabKey=L;
1
+ "use strict";const e=require("vue"),C=require("./request-Dl8yi2iS.cjs"),_=require("./index-CMUsYepp.cjs"),N=require("./index-DmwxzDGW.cjs"),M=require("./JSEncrypt-IYbV4kRj.cjs"),Q=require("./index-BuZHI6xx.cjs"),X=require("./index-CWEUTGiD.cjs"),T=require("./index-C8rCLtrq.cjs"),R=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),U=require("./index-BpPyaNFa.cjs");function Y(r,s){const t=new M.JSEncrypt;return t.setPublicKey(s),t.encrypt(r)||""}function Z(r,s){const t=new M.JSEncrypt;return t.setPrivateKey(s),t.decrypt(r)||""}const V=_.useLoginState(_.pinia),{loginUserInfo:p,cryptoInfo:x}=_.storeToRefs(V),ee=_.useMenuState(_.pinia),{activeMenuPath:A}=_.storeToRefs(ee),L=e.ref(0),K=e.computed(()=>{var r,s,t,o,l,u,a,f,b,m,y;return[{label:"",name:"账号",prop:"账号",value:((r=p.value)==null?void 0:r.account)||(((s=p.value)==null?void 0:s.账号)??"未知")},{label:"",name:"角色名称",prop:"角色名称",value:((t=p.value)==null?void 0:t.layer)==="superAdmin"?"超级管理员":(o=p.value)==null?void 0:o.角色名称},{label:"",name:"部门名称",prop:"部门名称",value:((l=p.value)==null?void 0:l.部门名称)??"未知"},{label:"",name:"状态",prop:"状态",value:((u=p.value)==null?void 0:u.layer)==="superAdmin"?"启用":((a=p.value)==null?void 0:a.状态)??"未知"},{label:"",prop:"头像",isFormColHidden:!0,value:((f=p.value)==null?void 0:f.layer)==="superAdmin"?"启用":((b=p.value)==null?void 0:b.状态)??"未知"},{label:"",prop:"签名",isFormColHidden:!0,value:((m=p.value)==null?void 0:m.layer)==="superAdmin"?"启用":((y=p.value)==null?void 0:y.状态)??"未知"}]}),te=()=>{},q=e.ref(!1),E=e.reactive({dialogTitle:"电子签名",dialogWidth:"30",dialogShow:!1,url:""}),D=e.ref([{label:"签字版",icon:C.edit_pen_default,type:"button",disabled:!1},{label:"电子签名",icon:C.edit_default,type:"button",disabled:!1},{label:"上传手写签名",icon:C.upload_filled_default,type:"buttonUpload",disabled:!1}]),P=e.ref(!1),$=e.ref(!1),z=e.ref(!1),O=e.computed(()=>{var o,l,u;const r=sessionStorage.getItem("authority"),s=JSON.parse(r||""),t=(o=A.value)!=null&&o.startsWith("/")?(l=A.value)==null?void 0:l.substring(1):A.value;return Array.isArray(s)?(z.value=!(s!=null&&s.includes(`${t}/上传头像`)),(u=D.value)==null?void 0:u.map(a=>({...a,disabled:!(s!=null&&s.includes(`${t}/签名`))}))):typeof s=="string"&&(s==null?void 0:s.toUpperCase())==="SUPERADMIN"?D.value:[]}),ae=e.computed(()=>[{key:"signConfig",contents:E},{key:"signTypeList",contents:O.value}]),re=r=>{E.dialogShow=r.label==="电子签名"},W=()=>{E.dialogShow=!1},j=async r=>{var t,o,l,u,a,f,b,m,y;const s=await N.getInsofDataApi({id:r});if(((t=s==null?void 0:s.data)==null?void 0:t.code)===200&&s.data.result&&Array.isArray(s.data.result)&&s.data.result.length>0){const d={...(u=(l=(o=s.data.result)==null?void 0:o[0])==null?void 0:l.value)==null?void 0:u.tableData,id:(f=(a=s.data.result)==null?void 0:a[0])==null?void 0:f.id,layer:(y=(m=(b=s.data.result)==null?void 0:b[0])==null?void 0:m.key)==null?void 0:y.layer};V.setLoginUserInfo(d)}},H=async(r,s)=>{var o,l,u;const t=_.cloneDeep(r);t==null||delete t.id;try{const a=await N.updateInsofDataApi({id:(o=p.value)==null?void 0:o.id,value:{tableData:t}});((l=a==null?void 0:a.data)==null?void 0:l.code)===200&&(W(),C.ElMessage.success("修改成功"),await j((u=p.value)==null?void 0:u.id),await V.setLogRecordAsync({type:s,data:r},A.value))}catch{C.ElMessage.error("修改响应失败")}finally{q.value=!1,P.value=!1,$.value=!1}},se=async(r,s)=>{var l;const t=r==="avatarUrl"?"头像":"签名",o={...p.value,status:((l=p.value)==null?void 0:l.status)??"启用",[t]:s};P.value=r==="avatarUrl",$.value=r==="signature",await H(o,"图片修改")},I=e.reactive({baseCols:[],otherCols:[]}),J=e.ref([]),G=e.ref(),ne=(r,s,t)=>{var u,a,f,b,m,y;let o;const l=s;((a=(u=p.value)==null?void 0:u.layer)==null?void 0:a.toUpperCase())!=="SUPERADMIN"?o=(f=p.value)!=null&&f.password?Z((b=p.value)==null?void 0:b.password,(m=x==null?void 0:x.value)==null?void 0:m.privateKey):Q.resetPassword:o=(y=p.value)==null?void 0:y.password,o===l?t():t(new Error("输入的密码与原密码不匹配,请重新输入"))},oe=(r,s,t)=>{s?t():t(new Error("请输入密码"))},le=(r,s,t)=>{var o;s!==((o=G.value)==null?void 0:o.newtPass)?t(new Error("两次输入的密码不一致")):t()},ue=async()=>{var s,t,o,l,u,a,f,b,m,y;const r=await N.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),type:"structure",pageKey:"系统管理/用户管理"}});if(((s=r==null?void 0:r.data)==null?void 0:s.code)===200&&r.data.result&&((t=r.data.result)==null?void 0:t.length)>0){const d=(f=(a=(u=(l=(o=r.data.result)==null?void 0:o[0])==null?void 0:l.value)==null?void 0:u.pageData)==null?void 0:a.compData)==null?void 0:f.find(n=>(n==null?void 0:n.key)==="header"),w=(b=K.value)==null?void 0:b.map(n=>n==null?void 0:n.prop);I.baseCols=d&&((m=d.contents)==null?void 0:m.map(n=>({...n,isFormColHidden:(w==null?void 0:w.includes(n==null?void 0:n.prop))||(n==null?void 0:n.label)==="操作"})));const S=(y=d.contents)==null?void 0:y.find(n=>(n==null?void 0:n.prop)==="password"),i=[{...S,label:"当前密码",prop:"currentPass",validator:ne},{...S,label:"新密码",prop:"newtPass",validator:oe},{...S,label:"确认密码",prop:"confirmNewPass",validator:le}];I.otherCols=i,de(p.value)}},ie=r=>{G.value=r},ce=async({content:r,buttonName:s})=>{var o,l,u,a,f;let t;s==="确定"&&(t={...p.value,status:((o=p.value)==null?void 0:o.status)??"启用",password:((u=(l=p.value)==null?void 0:l.layer)==null?void 0:u.toUpperCase())==="SUPERADMIN"?r==null?void 0:r.confirmNewPass:Y(r==null?void 0:r.confirmNewPass,(a=x.value)==null?void 0:a.publicKey)}),s==="保存基本信息"&&(t={...p.value,...r,status:((f=p.value)==null?void 0:f.status)??"启用"}),q.value=!0,await H(t,s)},F=()=>{var o,l;const r={base:[{label:"保存基本信息"}],other:[{label:"重置",background:"#b7b8b8"},{label:"确定"}]},s=sessionStorage.getItem("authority"),t=JSON.parse(s||"");if(Array.isArray(t)){const u=(o=A.value)!=null&&o.startsWith("/")?(l=A.value)==null?void 0:l.substring(1):A.value,a=t!=null&&t.includes(`${u}/基本信息`)?r==null?void 0:r.base:[],f=t!=null&&t.includes(`${u}/修改密码`)?r==null?void 0:r.other:[];return{base:a,other:f}}else return typeof t=="string"&&(t==null?void 0:t.toUpperCase())==="SUPERADMIN"?r:null},de=r=>{var s,t,o,l,u;J.value=[{value:"基础信息",label:"基础信息",children:[{type:"form",content:{rowContents:(s=I.baseCols)==null?void 0:s.map(a=>({...a,width:2,type:a==null?void 0:a.formType,name:a==null?void 0:a.prop,prop:a==null?void 0:a.prop,contents:a==null?void 0:a.options,value:r[a==null?void 0:a.prop]})),formRules:{userName:[{required:!0,message:"输入不能为空",trigger:"blur"}],birthDay:[{required:!0,message:"输入不能为空",trigger:"blur"}],phone:[{required:!0,message:"输入不能为空",trigger:"blur"}]},buttonValue:(t=F())==null?void 0:t.base,isEnableWrap:!1,isButtonRow:!1},value:""}]},{value:"修改密码",label:"修改密码",children:[{type:"form",content:{rowContents:(o=I.otherCols)==null?void 0:o.map(a=>({...a,width:1,type:a==null?void 0:a.formType,name:a==null?void 0:a.prop,contents:a==null?void 0:a.options})),formRules:(l=I.otherCols)==null?void 0:l.reduce((a,f)=>(a[f.prop]=[{required:!0,message:"输入有误",trigger:"change"},{validator:(b,m,y)=>f.validator(b,m,y),trigger:"blur"}],a),{}),buttonValue:(u=F())==null?void 0:u.other,isEnableWrap:!1},value:""}]}]},pe=Object.freeze(Object.defineProperty({__proto__:null,avatarLoading:P,beforeSignDestroy:W,changeFormTrigger:ie,clickFormButton:te,clickSignButton:re,clickTabButton:ce,getUserTableHeadersAsync:ue,itemData:ae,loading:q,refreshLoginUserInfoAsync:j,rowContents:K,signPadInfo:E,signTypes:O,signatureLoading:$,submitImageAsync:se,tabKey:L,tabsContents:J,tempSignTypes:D,uploadDisabled:z},Symbol.toStringTag,{value:"Module"})),fe={class:"avatar-model-wrap"},ge={key:0},ve=e.defineComponent({__name:"index",props:{disabled:{type:Boolean,default:!1},avatarUrl:{type:String,default:""},size:{type:[String,Number],default:"large"},userInfo:{type:Object,default:{}},clickStop:{type:Boolean,default:!0}},emits:["submitImage","deleteImage"],setup(r,{emit:s}){const t=r,o=s,l=e.computed(()=>"http://222.92.178.198:62001"),u=e.ref(""),a=e.ref(""),f=e.ref();e.watch(()=>{var d;return(d=t.userInfo)==null?void 0:d.头像},d=>{a.value=d?l.value+"/"+d:""},{immediate:!0});const b=async()=>{if(!(t!=null&&t.disabled))try{const d=await _.platformDownloadFile({url:u.value});if(d.status!==200)throw new Error(`HTTP error! status: ${d.status}`);const w=new Blob([d.data],{type:d.headers["content-type"]});f.value=w}catch(d){throw new Error(d)}},m=async d=>{var w,S,i,n,h;try{const g=await T.uploadFile(d);((w=g==null?void 0:g.data)==null?void 0:w.code)===200&&(a.value=l.value+"/"+((i=(S=g.data)==null?void 0:S.result)==null?void 0:i.url),u.value=(h=(n=g.data)==null?void 0:n.result)==null?void 0:h.url,o("submitImage",u.value))}catch(g){C.ElMessage.error(g)}},y=async()=>{try{if(!a.value)return}catch(d){C.ElMessage.error(d)}};return(d,w)=>{var S,i;return e.openBlock(),e.createElementBlock("div",fe,[e.createVNode(X.Avatar,{avatarUrl:a.value??"",avatarBlob:f.value,size:r.size,onClickAvatar:b,onSubmitImage:m,onDeleteImage:y,clickStop:t==null?void 0:t.clickStop},{avatarDefault:e.withCtx(()=>{var n,h,g,v;return[e.createTextVNode(e.toDisplayString(((h=(n=r.userInfo)==null?void 0:n.account)==null?void 0:h.charAt(0))||((v=(g=r.userInfo)==null?void 0:g.姓名)==null?void 0:v.charAt(0))||""),1)]}),_:1},8,["avatarUrl","avatarBlob","size","clickStop"]),r.disabled?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",ge,e.toDisplayString(((S=r.userInfo)==null?void 0:S.account)||((i=r.userInfo)==null?void 0:i.账号)||"未知"),1))])}}}),ye=R._export_sfc(ve,[["__scopeId","data-v-1a1f2575"]]),be=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["clickSignButton","clickSubmitSign","beforeDestroy"],setup(r,{emit:s}){const t=r,o=e.ref({}),l=e.ref([]),u=s,a=i=>{o.value.dialogShow=(i==null?void 0:i.label)==="电子签名",u("clickSignButton",i)},f=()=>{o.value.dialogShow=!1,u("beforeDestroy")},b=e.computed(()=>"http://222.92.178.198:62001"),m=i=>{var c;const n=i.split(","),h=(c=n==null?void 0:n[0])==null?void 0:c.match(/:(.*?);/)[1],g=atob(n[1]);let v=g.length;const k=new Uint8Array(v);for(;v--;)k[v]=g.charCodeAt(v);return new Blob([k],{type:h})},y=async i=>{var n,h,g;try{const v=await T.uploadFile(i);((n=v==null?void 0:v.data)==null?void 0:n.code)===200&&u("clickSubmitSign",(g=(h=v.data)==null?void 0:h.result)==null?void 0:g.url)}catch(v){C.ElMessage.error(v)}},d=e.ref(""),w=i=>{d.value=i,o.value.dialogShow=!1;const n=new FormData,h=m(i);n.append("file",h,"image.png"),y(n)},S=i=>{const n=new FormData;n.append("file",i==null?void 0:i.file),y(n)};return e.watch(()=>t==null?void 0:t.itemData,i=>{var h,g,v,k;d.value="",(h=o.value)!=null&&h.dialogShow&&(o.value.dialogShow=!1);const n=(g=i==null?void 0:i.find(c=>(c==null?void 0:c.key)==="signConfig"))==null?void 0:g.contents;n&&Object.keys(n).forEach(c=>{(n[c]===void 0||n[c]===null||n[c]==="")&&delete n[c]}),o.value=(v=i==null?void 0:i.find(c=>(c==null?void 0:c.key)==="signConfig"))==null?void 0:v.contents,l.value=(k=i==null?void 0:i.find(c=>(c==null?void 0:c.key)==="signTypeList"))==null?void 0:k.contents},{immediate:!0}),(i,n)=>{const h=e.resolveComponent("el-empty"),g=e.resolveComponent("el-image"),v=e.resolveComponent("el-button"),k=e.resolveComponent("el-upload");return e.openBlock(),e.createBlock(T.Signature,{signPadInfo:o.value,onBeforeDestroy:f,onClickSubmitSign:w},{signatureRender:e.withCtx(()=>{var c,B;return[e.createElementVNode("div",{class:"signature-render",style:e.normalizeStyle({width:`${(c=o.value)==null?void 0:c.signPadWidth}%`})},[e.createVNode(g,{src:d.value?d.value:b.value+"/"+((B=r.userInfo)==null?void 0:B.签名),fit:"contain"},{error:e.withCtx(()=>[e.createVNode(h,{"image-size":60,description:" "},{image:e.withCtx(()=>[e.createVNode(U.SvgIcon,{name:"emptyImg"})]),_:1})]),_:1},8,["src"])],4)]}),signatureTypes:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,c=>{var B;return e.openBlock(),e.createElementBlock("div",{key:c.label,class:"signature-button"},[(B=c.label)!=null&&B.includes("上传")?(e.openBlock(),e.createBlock(k,{key:0,ref_for:!0,ref:"uploadRef","http-request":S,"show-file-list":!1},{trigger:e.withCtx(()=>[e.createVNode(v,{disabled:c.disabled,id:"themeButton"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.label),1)]),icon:e.withCtx(()=>[e.createVNode(U.SvgIcon,{name:c.icon??""},null,8,["name"])]),_:2},1032,["disabled"])]),_:2},1536)):(e.openBlock(),e.createBlock(v,{key:1,id:"themeButton",disabled:c.disabled,onClick:he=>a(c)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.label),1)]),icon:e.withCtx(()=>[e.createVNode(U.SvgIcon,{name:c.icon??""},null,8,["name"])]),_:2},1032,["disabled","onClick"]))])}),128))]),_:1},8,["signPadInfo"])}}}),me=R._export_sfc(be,[["__scopeId","data-v-ce5a2314"]]);exports.State=pe;exports.ssAvatar=ye;exports.ssSignature=me;exports.tabKey=L;
@@ -4,11 +4,11 @@ import { u as Se, o as _t, s as de, f as ce } from "./index-DuL936Vd.js";
4
4
  import { G as Le, H as ft, u as vt, p as gt } from "./index-CwJwXVns.js";
5
5
  import { s as _e } from "./index-11kpzK0A.js";
6
6
  import "./index.vue_vue_type_style_index_0_scoped_07c75c98_lang-DFyt9sBY.js";
7
- import "./index-BRf391bW.js";
7
+ import "./index-Cfemkaf_.js";
8
8
  import "./index-BHtNKL1L.js";
9
9
  import { _ as B } from "./index.vue_vue_type_script_setup_true_lang-DRzriV-s.js";
10
10
  import "./index-CI4RP047.js";
11
- import "./index-DvALRudH.js";
11
+ import "./index-BBrOiPGK.js";
12
12
  import { _ as W } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
13
  import { c as me } from "./clone-EMplXNdV.js";
14
14
  const yt = { class: "param-auth" }, ht = { class: "body" }, kt = { class: "node-content-wrapper" }, Ct = { class: "node-label-wrapper" }, bt = { class: "node-label" }, wt = /* @__PURE__ */ J({
@@ -4,14 +4,14 @@ var Ni = (e, a, l) => ip(e, typeof a != "symbol" ? a + "" : a, l);
4
4
  import { ref as ae, watch as yl, nextTick as jl, resolveComponent as Tl, createBlock as vl, openBlock as ce, withCtx as We, createElementVNode as be, renderSlot as Fi, defineComponent as ai, computed as Kl, createElementBlock as qe, createCommentVNode as Ml, normalizeStyle as li, toDisplayString as ll, onMounted as qi, onUnmounted as Cs, withModifiers as Vr, createVNode as He, createTextVNode as El, Fragment as Cl, renderList as er, normalizeClass as Wi, onBeforeUnmount as oo, unref as Xl, createSlots as pu, mergeProps as ts, resolveDynamicComponent as an, shallowRef as nd, reactive as Ii, getCurrentInstance as sd, inject as Yt, provide as Zs, toRef as np, onBeforeMount as od, watchEffect as sp, getCurrentScope as op, onScopeDispose as tp, toRefs as ec, withDirectives as up, vShow as cp } from "vue";
5
5
  import { o as dp, q as fp, E as Bl, b as Pi, l as td, i as ac, a as lc, ar as ud, as as pp, at as hp, au as Ot, aq as rc } from "./request-XJsZ4h2T.js";
6
6
  import { e as gn, c as Re, s as fr, i as Tn, p as ir, b as Ln, u as Dn, j as $n, n as cd, a as Nn, a6 as Po, a5 as hu, a3 as Eo, q as to, h as Ai, a7 as An, m as Ho, k as $o, E as on, t as Qs, a8 as vp, a9 as Ks, aa as yp, a1 as gp } from "./index-CwJwXVns.js";
7
- import { S as mp, b as oi, _ as ic, f as bp, h as dd, i as Ms, j as Qo, a as Ir, k as Jt, l as kp, m as _p, d as vu, e as xp, c as wp, n as Sp, o as Ap } from "./index-BXpHEHQK.js";
7
+ import { S as mp, b as oi, _ as ic, f as bp, h as dd, i as Ms, j as Qo, a as Ir, k as Jt, l as kp, m as _p, d as vu, e as xp, c as wp, n as Sp, o as Ap } from "./index-Cmk5JeQZ.js";
8
8
  import { h as Aa, B as Wn, C as Vs, D as fd, g as ei, E as Ep, m as ds, F as Fo, t as us, G as Tp, H as Dp, f as zp, I as nc, J as Ip, e as $s, K as uo, r as Mp, k as eo, L as Op, d as zi, c as Ls, M as Bp, u as yu, N as Yi, O as Vo, P as pd, Q as Cp, R as hd, S as $p, s as jn, l as Lp, T as Np, w as Rp, U as Pp, V as Hp, W as Fp, X as vd, Y as Ri, Z as Ds, _ as En, $ as is, a0 as Bt, a1 as jp, o as Up, a2 as Ct, a3 as Wp, a4 as qp } from "./index-CI4RP047.js";
9
9
  import { _ as zr } from "./_plugin-vue_export-helper-CHgC5LLL.js";
10
10
  import { r as Kp, I as sc, J as Gp, K as Yp, C as Jp, c as $t, u as yd, N as Gs, O as Xp, Q as gd, R as md, s as Lt, U as Zp, t as Qp, h as as, B as Vp, V as Nt, Y as oc, k as xs, l as Ws, Z as e0, w as a0, _ as l0, $ as r0, a0 as bd, d as kd, a1 as tc } from "./index.vue_vue_type_style_index_0_scoped_07c75c98_lang-DFyt9sBY.js";
11
11
  import { s as si } from "./index-11kpzK0A.js";
12
- import { a as _d, T as xd } from "./threeViewerHost-DNxvuNKu.js";
12
+ import { a as _d, T as xd } from "./threeViewerHost-CPqxV-dv.js";
13
13
  import { g as Ts, u as Xt, c as wd, a as co, e as gu, b as jo } from "./index-DUq4XELr.js";
14
- import { a as i0, s as n0 } from "./index-DvALRudH.js";
14
+ import { a as i0, s as n0 } from "./index-BBrOiPGK.js";
15
15
  import { u as Sd } from "./index-DuL936Vd.js";
16
16
  /* empty css */
17
17
  import { i as Uo } from "./isString-ChmgnNIb.js";
@@ -24781,7 +24781,7 @@ const ng = /* @__PURE__ */ ai({
24781
24781
  setup(e) {
24782
24782
  const a = e, l = ae([]), r = ae(), i = ae([]), n = ae(0), d = ae([]), o = ae(300), u = () => {
24783
24783
  var g;
24784
- r.value && (o.value = 40 * ((g = i == null ? void 0 : i.value) == null ? void 0 : g.length));
24784
+ r.value && (o.value = Math.max(40 * ((g = i == null ? void 0 : i.value) == null ? void 0 : g.length), 100));
24785
24785
  };
24786
24786
  qi(() => {
24787
24787
  jl(() => {
@@ -24888,7 +24888,7 @@ const ng = /* @__PURE__ */ ai({
24888
24888
  ], 512);
24889
24889
  };
24890
24890
  }
24891
- }), sg = /* @__PURE__ */ zr(ng, [["__scopeId", "data-v-478d08ef"]]), og = ae([
24891
+ }), sg = /* @__PURE__ */ zr(ng, [["__scopeId", "data-v-786bdd41"]]), og = ae([
24892
24892
  {
24893
24893
  name: "表格",
24894
24894
  type: "table",
@@ -8,7 +8,7 @@ import { _ as Y0 } from "./index.vue_vue_type_script_setup_true_lang-DRzriV-s.js
8
8
  import { m as Ki, B as $9, Y as l8 } from "./index-CI4RP047.js";
9
9
  /* empty css */
10
10
  import { s as J4 } from "./index-11kpzK0A.js";
11
- import { T as Xi, a as j9 } from "./threeViewerHost-DNxvuNKu.js";
11
+ import { T as Xi, a as j9 } from "./threeViewerHost-CPqxV-dv.js";
12
12
  import { A as W9 } from "./index-BDGxsSv8.js";
13
13
  var U9 = "[object Date]";
14
14
  function I9(n) {
@@ -1,5 +1,5 @@
1
1
  import { ref as n, computed as c, defineComponent as s, reactive as p, onMounted as i, createElementBlock as u, openBlock as f, createVNode as b } from "vue";
2
- import { W as m } from "./index-BRf391bW.js";
2
+ import { W as m } from "./index-Cfemkaf_.js";
3
3
  import { g as d, c as _ } from "./index-D-547T_n.js";
4
4
  import { _ as k } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
5
  const l = n([]), g = c(() => [
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as C, reactive as k, onMounted as D, resolveComponent as B, resolveDirective as T, createElementBlock as y, openBlock as u, createElementVNode as t, withDirectives as p, createVNode as o, unref as n, toDisplayString as r, createBlock as A } from "vue";
2
- import { S as I, t as x, s as w, a as L } from "./index-DvALRudH.js";
2
+ import { S as I, t as x, s as w, a as L } from "./index-BBrOiPGK.js";
3
3
  import "./index.vue_vue_type_style_index_0_scoped_07c75c98_lang-DFyt9sBY.js";
4
4
  import "./index-BHtNKL1L.js";
5
- import { e as E } from "./index-BXpHEHQK.js";
5
+ import { e as E } from "./index-Cmk5JeQZ.js";
6
6
  import "./index-CI4RP047.js";
7
7
  import { b as N, s as U } from "./index-CwJwXVns.js";
8
8
  import "./request-XJsZ4h2T.js";
@@ -4,16 +4,16 @@ import { S as Mt } from "./index-BHtNKL1L.js";
4
4
  import "./index.vue_vue_type_style_index_0_scoped_07c75c98_lang-DFyt9sBY.js";
5
5
  import { I as wt } from "./request-XJsZ4h2T.js";
6
6
  import { s as ut } from "./index-11kpzK0A.js";
7
- import { c as At } from "./index-BXpHEHQK.js";
7
+ import { c as At } from "./index-Cmk5JeQZ.js";
8
8
  import { useRouter as Bt } from "vue-router";
9
9
  import { a as Et, e as Ft, f as Lt, g as Ut, h as jt } from "./index-ChNfRlIP.js";
10
10
  import { g as qe, u as Pt, b as We, c as Ot, a as Rt } from "./index-DUq4XELr.js";
11
- import { g as Kt } from "./index-BRf391bW.js";
11
+ import { g as Kt } from "./index-Cfemkaf_.js";
12
12
  import { f as $t } from "./menuIndex-6R2YfOgI.js";
13
13
  import { d as Ge, e as Ne, n as zt } from "./index-CI4RP047.js";
14
14
  import { u as xt } from "./index-DuL936Vd.js";
15
15
  import { _ as Jt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
16
- const Ue = gt(() => import("./index-BXpHEHQK.js").then((i) => i.p));
16
+ const Ue = gt(() => import("./index-Cmk5JeQZ.js").then((i) => i.p));
17
17
  Ue.install = (i) => {
18
18
  i.component("ssMenu", Ue);
19
19
  };