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