Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

2 строки
7.1KB

  1. var E=(o,m,c)=>new Promise((s,r)=>{var g=f=>{try{p(c.next(f))}catch(h){r(h)}},u=f=>{try{p(c.throw(f))}catch(h){r(h)}},p=f=>f.done?s(f.value):Promise.resolve(f.value).then(g,u);p((c=c.apply(o,m)).next())});import{d as B,_ as q,u as z,f as n,g as l,p as v,w as e,b as _,t as R,e as a,q as T,c as k,F as I,s as O,v as K,k as A,x as b,y as V,z as j,r as w,A as N,B as ne,o as Y,C as G,h as F,D as ae,G as oe,T as se,H as le,K as ce,I as re,J as ie,L as ue,M as de}from"./index.551f5afa.js";const me="/assets/logo-title.e15057ed.png";const _e={class:"sub-menu-title"},pe=B({name:"sidebarItem"}),fe=Object.assign(pe,{props:{index:String,title:String,item:Object},setup(o){const m=o,c=z(),s=r=>{c.push({name:r.index})};return(r,g)=>{const u=n("svg-icon"),p=n("el-icon"),f=n("el-menu-item"),h=n("sidebar-item",!0),C=n("el-sub-menu");return!(o.item.children&&o.item.children.length)&&!o.item.meta.hidden?(l(),v(f,{key:0,index:m.index,onClick:s},{title:e(()=>[_("span",_e,R(o.title),1)]),default:e(()=>[o.item.meta.icon?(l(),v(p,{key:0},{default:e(()=>[a(u,{name:o.item.meta.icon,"svg-class":"menuIcon"},null,8,["name"])]),_:1})):T("",!0)]),_:1},8,["index"])):(l(),k(I,{key:1},[o.item.meta.hidden?T("",!0):(l(),v(C,{key:0,index:m.index},{title:e(()=>[o.item.meta.icon?(l(),v(p,{key:0},{default:e(()=>[a(u,{name:o.item.meta.icon,"svg-class":"menuIcon"},null,8,["name"])]),_:1})):T("",!0),_("span",null,R(o.title),1)]),default:e(()=>[(l(!0),k(I,null,O(o.item.children,d=>(l(),v(h,{key:d.name,index:d.name,title:d.meta.title,item:d},null,8,["index","title","item"]))),128))]),_:1},8,["index"]))],64))}}}),ve=q(fe,[["__scopeId","data-v-5f99aee2"]]);const he=B({name:"sidebar"}),ge=Object.assign(he,{props:{isCollapse:{type:Boolean,default:!1},sidebarMenu:{type:Array,default:()=>[]}},setup(o){const m=o,c=K(()=>{const s=A(),{meta:r,name:g}=s;return r.activeMenu?r.activeMenu:g});return(s,r)=>{const g=n("el-menu");return l(),v(g,{"default-active":b(c),collapse:m.isCollapse,class:"el-menu-vertical-demo","unique-opened":""},{default:e(()=>[(l(!0),k(I,null,O(m.sidebarMenu,u=>(l(),v(ve,{key:u.name,index:u.name,title:u.meta.title,item:u},null,8,["index","title","item"]))),128))]),_:1},8,["default-active","collapse"])}}}),xe=q(ge,[["__scopeId","data-v-9c2e6248"]]);const ye={class:"px-15 relative"},be=B({name:"routeTags"}),ke=Object.assign(be,{setup(o){const m=A(),c=z(),{tagsList:s}=V(j.menuStore),r=t=>{c.push({name:t.name,query:t.query})},g=(t,i)=>{s.value.splice(t,1),s.value.length===0&&c.push({name:"home"}),s.value.length>0&&m.name===i&&c.push({name:s.value[s.value.length-1].name})},u=w(),p=w(),f=(t,i)=>{p.value=i+1,u.value.style.left=`${t.pageX}px`,u.value.style.top=`${t.pageY}px`},h=t=>{switch(t){case"curr":s.value.splice(p.value-1,1),s.value.length===0&&c.push({name:"home"});break;case"all":c.push({name:"home"}),s.value.splice(0,s.value.length);break}},C=w(),d=w();return N(m,t=>{const i={name:t.name,path:t.path,query:t.query,meta:t.meta};s.value.every($=>$.name!==i.name)&&i.name!=="home"&&s.value.push(i)},{immediate:!0,deep:!0}),N(s.value,()=>{ne(()=>{d.value.setScrollLeft(C.value.offsetWidth)})}),Y(()=>{document.addEventListener("click",()=>{p.value=void 0})}),(t,i)=>{const $=n("el-tag"),M=n("el-scrollbar");return l(),k("div",ye,[a(M,{ref_key:"scrollbar",ref:d},{default:e(()=>[_("ul",{ref_key:"tagsRef",ref:C,class:"flex -px-4 py-6"},[(l(!0),k(I,null,O(b(s),(x,L)=>(l(),k("li",{key:x.name,class:"px-4 flex-shrink-0"},[a($,{closable:"",effect:b(m).name===x.name?"dark":"plain",type:b(m).name===x.name?"":"info",class:"cursor-pointer select-none",onClick:G(S=>r(x),["stop"]),onClose:S=>g(L,x.name),onContextmenu:G(S=>f(S,L),["prevent"])},{default:e(()=>[F(R(x.meta.title),1)]),_:2},1032,["effect","type","onClick","onClose","onContextmenu"])]))),128))],512)]),_:1},512),ae(_("div",{ref_key:"contextmenuRef",ref:u,class:"shadow px-10 bg-white rounded fixed z-10 text-14 contextmenu"},[_("ul",null,[_("li",{class:"cursor-pointer py-5 hover:text-primary",onClick:i[0]||(i[0]=x=>h("curr"))},"\u5173\u95ED\u5F53\u524D"),_("li",{class:"cursor-pointer py-5 hover:text-primary",onClick:i[1]||(i[1]=x=>h("all"))},"\u5173\u95ED\u6240\u6709")])],512),[[oe,p.value]])])}}}),we=q(ke,[["__scopeId","data-v-216390dc"]]);const Ce=o=>(ue("data-v-3248fada"),o=o(),de(),o),Ie={class:"flex justify-between items-center"},$e=Ce(()=>_("img",{src:me,class:"logo-title",alt:""},null,-1)),Se={class:"right flex items-center"},Re={class:"flex items-center text-303133"},Me=F("\u9000\u51FA\u767B\u5F55"),Le={class:"collapse"},Te={class:"px-20 py-10 relative z-10"},je=B({name:"layout"}),Be=Object.assign(je,{setup(o){const m=z(),c=A(),s=j.userStore.userBaseInfo,r=w(!1),g=w(c.path),{menuArr:u,tagsList:p}=V(j.menuStore),f=K(()=>{let d=p.value.filter(t=>!t.meta.noCache).map(t=>t.name);return d=[...d,"OrderList","vehicleDemand","statementList","projectManage","driverFile","driverManage","userManage","companyManage","carManage","regionManage","systemLog","deviceReminderRecord","equipmentChange"],d}),h=w([]),C=d=>E(this,null,function*(){d==="logout"&&(j.userStore.registerRouteFresh=!0,yield ie(),yield m.push({name:"login"}),localStorage.clear())});return N(c,d=>{h.value=c.matched.filter((t,i)=>i!==0)},{immediate:!0,deep:!0}),Y(()=>{document.addEventListener("click",()=>{})}),(d,t)=>{const i=n("el-avatar"),$=n("arrow-down"),M=n("el-icon"),x=n("el-dropdown-item"),L=n("el-dropdown-menu"),S=n("el-dropdown"),H=n("el-header"),J=n("el-scrollbar"),U=n("expand"),W=n("fold"),X=n("el-aside"),P=n("el-breadcrumb-item"),Q=n("el-breadcrumb"),Z=n("router-view"),ee=n("el-main"),D=n("el-container");return l(),v(D,{class:"h-screen overflow-hidden layout"},{default:e(()=>[a(H,{class:"header"},{default:e(()=>[_("div",Ie,[$e,_("div",Se,[a(S,{trigger:"click",onCommand:C},{dropdown:e(()=>[a(L,null,{default:e(()=>[a(x,{command:"logout"},{default:e(()=>[Me]),_:1})]),_:1})]),default:e(()=>{var y;return[_("a",Re,[a(i,{size:34,icon:"User",class:"mr-8"}),_("span",null,R((y=b(s))==null?void 0:y.realName),1),a(M,{class:"el-icon--right"},{default:e(()=>[a($)]),_:1})])]}),_:1})])])]),_:1}),a(D,{class:"overflow-hidden"},{default:e(()=>[a(X,{class:"aside",width:r.value?"48px":"172px"},{default:e(()=>[a(J,{class:"scrollY"},{default:e(()=>[a(xe,{"sidebar-menu":b(u),"is-collapse":r.value,active:g.value},null,8,["sidebar-menu","is-collapse","active"])]),_:1}),_("div",Le,[a(M,{color:"rgba(0, 0, 0, 0.45)"},{default:e(()=>[r.value?(l(),v(U,{key:0,onClick:t[0]||(t[0]=y=>r.value=!r.value)})):(l(),v(W,{key:1,onClick:t[1]||(t[1]=y=>r.value=!r.value)}))]),_:1})])]),_:1},8,["width"]),a(D,{class:"is-vertical relative layout-content"},{default:e(()=>[b(c).name!=="home"?(l(),k(I,{key:0},[_("div",Te,[a(Q,null,{default:e(()=>[a(se,{name:"breadcrumb"},{default:e(()=>[(l(!0),k(I,null,O(h.value,y=>(l(),v(P,{key:y.name},{default:e(()=>[F(R(y.meta.title),1)]),_:2},1024))),128))]),_:1})]),_:1})]),a(we)],64)):T("",!0),a(ee,{class:"main"},{default:e(()=>[a(Z,null,{default:e(({Component:y,route:te})=>[a(le,{name:"fade-transform",mode:"out-in"},{default:e(()=>[(l(),v(ce,{include:b(f)},[(l(),v(re(y),{key:te.name}))],1032,["include"]))]),_:2},1024)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})}}}),De=q(Be,[["__scopeId","data-v-3248fada"]]);export{De as default};