Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

2 wiersze
6.8KB

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