import{y as P,c as v,r as _,h as ne,al as d,z as l,I as p,J as s,B as n,E as se,D as F,K as J,P as f,S as q,R as c,A as h,Q as L,a4 as B,L as oe,M as m}from"./vendor-866bb149-1782572373740v=1.0.0.js";import{a as ue,u as re,K as ce,e as ie,_ as de}from"./index-f6f689f9-1782572373740v=1.0.0.js";import{T as pe,a as he,M as ve}from"./ToolBarRight-7aee30a2-1782572373740v=1.0.0.js";import{u as _e}from"./keepAlive-0ac97bbd-1782572373740v=1.0.0.js";import{a as K}from"./index-13a40fd6-1782572373740v=1.0.0.js";import"./eleVendor-48a7d3b8-1782572373740v=1.0.0.js";const fe=["src"],me={class:"userData"},ye={class:"userName"},ge={class:"userId"},Ce={class:"split-list"},Se=["onClick"],ke={key:0},Me={key:0,class:"el-icon"},xe={class:"mainContainer"},De={class:"left-menu"},Le=P({name:"horizontalLayout"}),Be=P({...Le,setup(Ne){const i=ue(),N=re(),I=ce(),b=v(()=>i.meta.activeMenu?i.meta.activeMenu:i.path),R=v(()=>I.showMenuListGet),T=v(()=>I.findFirstLevelPathGet),A=v(()=>!1),$=ie(),S=v(()=>$.userInfo),G=_e(),k=_([]),M=_(""),o=_(!1),x=_([]),V=100,H=100,{start:Q,stop:U}=K(()=>{o.value=!0},V),{start:W,stop:j}=K(()=>{o.value=!1},H),X=()=>{j(),Q()},Y=()=>{U(),W()},Z=t=>{let a=T.value[t],u=a.length>0?a[0].children:[],r=a.length>2?a[a.length-2].children:[],y=D(JSON.parse(JSON.stringify(u))),g=D(JSON.parse(JSON.stringify(r)));return{path:t,children:y.length>1?y:[],leftChildren:g.length>1?g:[]}},D=t=>t.filter(a=>{var u,r;return a.meta.icon="",((u=a.children)==null?void 0:u.length)>1&&(a.children=D(a.children)),!((r=a.meta)!=null&&r.isHide)});ne(()=>i.path,t=>{if(!t)return;let{path:a,children:u,leftChildren:r}=Z(t);k.value=u||[],x.value=r||[],JSON.parse(i.meta.keep_alive||"false")&&G.addKeepAliveName(i.name)},{deep:!0,immediate:!0});const ee=t=>{M.value=t.path,k.value=t.children||[],N.push({name:t.name})},te=t=>t.startsWith("svg-"),ae=t=>t.replace(/^svg-/,""),le=_({width:"30px",height:"30px"}),E=t=>{N.push({path:t.path,query:i.query})};return(t,a)=>{const u=d("SvgIcon"),r=d("el-icon"),y=d("el-scrollbar"),g=d("el-header"),w=d("el-menu-item"),z=d("el-menu"),O=d("el-container");return l(),p(O,{class:"layout"},{default:s(()=>[n("div",{class:"aside-split",style:se({width:o.value?"200px":"60px"}),onMouseleave:Y,onMouseenter:X},[n("div",{class:F(["logo","flx-center",{expand:o.value}])},[n("img",{src:S.value.avatar,alt:"logo"},null,8,fe),J(n("div",me,[n("div",ye,f(S.value.name),1),n("div",ge,f(S.value.tsNo),1)],512),[[q,o.value]])],2),c(y,null,{default:s(()=>[n("div",Ce,[(l(!0),h(L,null,B(R.value,e=>{var C;return l(),h("div",{class:F(["split-item",{"split-active":M.value===e.path||`/${(C=M.value)==null?void 0:C.split("/")[1]}`===e.path,vertical:!o.value,horizontal:o.value}]),key:e.path,onClick:Ie=>ee(e)},[e.meta.icon?(l(),h("div",ke,[te(e.meta.icon)?(l(),h("i",Me,[c(u,{name:ae(e.meta.icon),iconStyle:le.value},null,8,["name","iconStyle"])])):(l(),p(r,{key:1},{default:s(()=>[(l(),p(oe(e.meta.icon)))]),_:2},1024))])):m("v-if",!0),J(n("div",{class:"title"},f(e.meta.title),513),[[q,o.value]])],10,Se)}),128))])]),_:1})],36),c(O,null,{default:s(()=>[c(g,null,{default:s(()=>[c(pe),c(he)]),_:1}),n("div",xe,[m(" \u9876\u90E8\u4E8C\u7EA7\u83DC\u5355 "),c(z,{"default-active":b.value,router:!1,collapse:A.value,"collapse-transition":!1,"unique-opened":!0,"background-color":"#ffffff",mode:"horizontal"},{default:s(()=>[(l(!0),h(L,null,B(k.value,e=>(l(),p(w,{key:e.path,index:e.path,onClick:C=>E(e)},{default:s(()=>[n("span",null,f(e.meta.title),1)]),_:2},1032,["index","onClick"]))),128))]),_:1},8,["default-active","collapse"]),m(" \u5DE6\u8FB9\u4E09\u7EA7\u83DC\u5355 "),n("div",De,[x.value.length>0?(l(),p(z,{key:0,"default-active":b.value,router:!1,collapse:A.value,"collapse-transition":!1,"unique-opened":!0,"background-color":"#ffffff",mode:"vertical"},{default:s(()=>[(l(!0),h(L,null,B(x.value,e=>(l(),p(w,{key:e.path,index:e.path,onClick:C=>E(e)},{default:s(()=>[n("span",null,f(e.meta.title),1)]),_:2},1032,["index","onClick"]))),128))]),_:1},8,["default-active","collapse"])):m("v-if",!0),m(" \u4E3B\u5185\u5BB9 "),c(ve)])])]),_:1})]),_:1})}}});const Fe=de(Be,[["__scopeId","data-v-0b122f9d"]]);export{Fe as default};
