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

2 строки
6.8KB

  1. import{_ as ue,d as de,G as O,D as x,r as _,T as _e,o as pe,c as r,e as i,I as V,i as l,h as n,g as e,f as u,J as S,F as k,n as B,u as s,j as b,U as fe,V as me,k as D,t as f,W as he,A as ve,z as xe,a as we,N as q,q as ge,s as ke,x as ye,X as W}from"./index.622ee9e7.js";import{l as Ce}from"./auth.231232b6.js";import{h as U}from"./moment.40bc58bf.js";const w=y=>(ge("data-v-62265c7e"),y=y(),ke(),y),Ee={class:"flex items-center flex-1"},Re=w(()=>e("p",{class:"title text-black flex-shrink-0"},"\u6E56\u5DDE\u5E02\u4FE1\u606F\u5316\u9879\u76EE\u7BA1\u7406\u7CFB\u7EDF",-1)),Me=["onClick"],Se=["onClick"],be={class:"flex items-center flex-shrink-0"},Ie={class:"el-dropdown-link"},Te=w(()=>e("p",{class:"text-center font-semibold border-b border-gray-300 text-14 py-9"},"\u6D88\u606F\u901A\u77E5",-1)),Ne={class:"w-11/12 items-center text-14"},Oe={class:"truncate",style:{color:"rgba(0, 0, 0, 0.65)"}},Ve={style:{color:"rgba(0, 0, 0, 0.25)"}},Be={class:"flex items-center text-[rgba(0,0,0,0.85)] text-14"},De={class:"flex p-8"},We=w(()=>e("span",{class:"flex-shrink-0"},"\u5F53\u524D\u89D2\u8272\uFF1A",-1)),Je={class:"flex p-8"},Pe=w(()=>e("span",{class:"flex-shrink-0"},"\u5F53\u524D\u533A\u57DF\uFF1A",-1)),Le={class:"flex p-8"},ze=w(()=>e("span",{class:"flex-shrink-0"},"\u5F53\u524D\u5355\u4F4D\uFF1A",-1)),Ae=w(()=>e("span",null,"\u9000\u51FA\u767B\u5F55",-1)),$e=de({name:"layout"}),je=Object.assign($e,{setup(y){const{proxy:G}=ye(),{projectCount:J,infoList:H}=O(x.countStore)||0,m=O(x.userStore).userInfo||{},d=ve(),C=xe(),{menuArr:P}=O(x.menuStore),F=_([]),L=c=>{if(F.value=P.value.find(o=>o.name===c).children,c==="cockpits"){const o=d.resolve({path:"/cockpit"});window.open(o.href,"_blank")}else d.push({name:c})},X=async()=>{await Ce(),we.remove("token"),localStorage.clear(),d.push("/login"),window.location.reload()},K=()=>{G.$messageBox.alert("\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\uFF0813588274036\uFF09","\u7533\u8BF7\u6743\u9650",{showConfirmButton:!1})},Q=async({id:c,type:o,instanceId:R,projectId:h,meetingId:M})=>{o==="PROJECT_REVIEW"?(await W({id:c}),await x.countStore.setCountStore(),d.push({name:"handleDuringExamine",query:{instanceId:R,projectId:h}})):o==="PROJECT_REVIEW_PASS"||o==="PROJECT_REVIEW_REJECT"?(await W({id:c}),await x.countStore.setCountStore(),d.push({name:"projectStore"})):o==="PROJECT_REVIEW_BACK"?(await W({id:c}),await x.countStore.setCountStore(),d.push({name:"handleAfterGiveBack",query:{instanceId:R,id:h}})):o==="EXPERT_REVIEW"?d.push({name:"expertReview"}):o==="REVIEW_MEETING"&&d.push({name:"meetingDetail",query:{id:M}})},p=_(),I=_(),g=_(!1),T=_(),z=_(),A=_(),E=_(),Y=_(0),N=async()=>{var c;p.value=JSON.parse(JSON.stringify(P.value.filter(o=>!o.meta.hidden&&o.meta.menuType==="MENU"))),p.value.forEach(o=>{o.meta.hidden=!1}),await q(),Y.value=p.value.length*120-I.value.offsetWidth,E.value=Math.floor((p.value.length*120-I.value.offsetWidth)/120+2),T.value=p.value.slice(-E.value);for(let o=1;o<=E.value;o++)p.value[p.value.length-o].meta.hidden=!0;await q(),A.value=(c=z.value)==null?void 0:c.offsetHeight},Z=()=>{g.value=!g.value};return _e(()=>{N()}),pe(()=>{N(),window.addEventListener("resize",()=>{N()}),document.addEventListener("click",()=>{g.value=!1}),x.countStore.setCountStore()}),(c,o)=>{const R=r("More"),h=r("el-icon"),M=r("svg-icon"),$=r("el-dropdown-item"),ee=r("el-dropdown-menu"),te=r("el-dropdown"),oe=r("el-badge"),ne=r("arrow-down"),se=r("el-divider"),j=r("SwitchButton"),ae=r("el-popover"),le=r("el-header"),re=r("router-view"),ie=r("el-container");return i(),V(ie,{class:"h-screen overflow-hidden"},{default:l(()=>[n(le,{class:"header flex items-center justify-between"},{default:l(()=>[e("div",Ee,[Re,e("ul",{ref_key:"topMenuRef",ref:I,class:"flex -mx-20 header-menu flex-1"},[(i(!0),u(k,null,S(p.value,t=>(i(),u(k,{key:t.name},[t.meta.hidden?D("",!0):(i(),u("li",{key:0,class:"px-12 text-16 cursor-pointer flex items-center",onClick:a=>s(C).meta.topMenu!==t.name?L(t.name):null},[e("span",{class:B(["flex items-center",[s(C).meta.topMenu===t.name?"active-menu":"border-transparent"]])},f(t.meta.title),3)],8,Me))],64))),128)),E.value>0?(i(),u("li",{key:0,class:"px-20 text-16 cursor-pointer whitespace-nowrap relative flex items-center",onClick:me(Z,["stop"])},[e("span",{class:B(["flex items-center",[T.value.some(t=>t.name===s(C).meta.topMenu)?"active-menu":"border-transparent"]])},[n(h,{class:"mr-8",size:16},{default:l(()=>[n(R)]),_:1}),b(" \u66F4\u591A\u83DC\u5355 ")],2),e("div",{class:"absolute hidMenus w-full top-full z-10 text-center overflow-hidden",style:fe({height:g.value?`${A.value}px`:0,opacity:g.value?"100%":0})},[e("div",{ref_key:"hidMenuRef",ref:z,class:"py-10"},[(i(!0),u(k,null,S(T.value,t=>{var a;return i(),u("p",{key:t.name,class:"px-20 hidMenu",onClick:v=>L(t.name)},[e("span",{class:B(["flex items-center",[s(C).meta.topMenu===t.name?"active-menu":"border-transparent"]])},f((a=t==null?void 0:t.meta)==null?void 0:a.title),3)],8,Se)}),128))],512)],4)])):D("",!0)],512)]),e("div",be,[n(oe,{value:s(J),hidden:!s(J),class:"h-16 ml-12 mr-28"},{default:l(()=>[n(te,{trigger:"hover"},{dropdown:l(()=>[n(ee,{style:{width:"305px"},class:"newsDropDownMenu"},{default:l(()=>{var t;return[Te,(i(!0),u(k,null,S((t=s(H))==null?void 0:t.sort((a,v)=>s(U)(v.createTime).valueOf()-s(U)(a.createTime).valueOf()).filter((a,v)=>v<5),a=>(i(),V($,{key:a.id,onClick:v=>Q(a)},{default:l(()=>[e("div",Ne,[e("div",Oe,f(a.content),1),e("div",Ve,f(a.createTime),1)])]),_:2},1032,["onClick"]))),128)),n($,{class:"justify-center font-semibold border-t border-gray-300",style:{color:"rgba(0, 87, 255, 1)"},onClick:o[0]||(o[0]=a=>s(d).push({name:"infoCenter"}))},{default:l(()=>[b("\u67E5\u770B\u66F4\u591A"),n(M,{name:"forward","svg-class":"message-icon mr-8"})]),_:1})]}),_:1})]),default:l(()=>[e("span",Ie,[n(M,{name:"bell",class:"cursor-pointer text-16"})])]),_:1})]),_:1},8,["value","hidden"]),n(ae,{placement:"bottom",width:200,trigger:"click","popper-class":"loginOutPop"},{reference:l(()=>[e("a",Be,[b(f(s(m).realName)+" ",1),n(h,{class:"el-icon--right"},{default:l(()=>[n(ne)]),_:1})])]),default:l(()=>{var t,a;return[e("div",null,[e("div",De,[We,e("div",null,[(i(!0),u(k,null,S(s(m).userRoleInfoList,(v,ce)=>(i(),u("p",{key:ce},f(v.name),1))),128))])]),e("div",Je,[Pe,e("div",null,f(s(m).regionName),1)]),e("div",Le,[ze,e("div",null,f(s(m).empPosUnitName),1)]),n(se,{style:{margin:"8px 0 0 0"}}),s(m).regionCode==="330000"&&((t=s(m).userRoleInfoList)==null?void 0:t.length)<2&&((a=s(m).userRoleInfoList)==null?void 0:a[0].code)==="VISITOR"?(i(),u("p",{key:0,class:"cursor-pointer p-8 login-out",onClick:K},[n(h,null,{default:l(()=>[n(j)]),_:1}),b("\u7533\u8BF7\u6743\u9650")])):D("",!0),e("p",{class:"cursor-pointer p-8 login-out flex items-center",onClick:X},[n(h,{class:"mr-4"},{default:l(()=>[n(j)]),_:1}),Ae])])]}),_:1})])]),_:1}),n(re,null,{default:l(({Component:t})=>[(i(),V(he(t)))]),_:1})]),_:1})}}}),He=ue(je,[["__scopeId","data-v-62265c7e"]]);export{He as default};