import{f as e}from"./common-0c693521-1780912037814v=1.0.0.js";import{d as l,r as t,a,b as n,c as s,w as i,k as o,L as r,t as c,e as d,j as u,h as v,F as m,i as f,l as _,x as p,E as w,a1 as y,_ as g,W as x,f as h,at as k,au as b}from"./index-d052b22f-1780912037814v=1.0.0.js";const D={class:"flex-row"},C=["id"],j={class:"notice-dialog-box"},T={class:"time-text ml5 mr5"},M=["innerHTML"],S={key:0,class:"flex-row ml5 mr5 mt10"},z={class:"flex-direction"},L={class:"dialog-footer"},O=g(l({__name:"noticeDialog",setup(l,{expose:g}){const x=t(!1),{proxy:h}=y(),k=t("填报公告"),b=t(""),O=t(null),Y=t(!1),B=()=>{Y.value=!Y.value},I=async()=>{const l=await e({involve_business:3});if(200==l.code){if("[object Object]"==Object.prototype.toString.call(l.data)){let{is_remind:e,valid_start_time:t,valid_end_time:a}=l.data;return(new Date).getTime(),new Date(t).getTime(),new Date(a).getTime(),k.value=l.data.title,b.value=l.data.content,O.value=l.data,void(x.value=!0)}w.warning("暂无公告")}else w.warning(l.message)};return g({openDialog:()=>{I()}}),(e,l)=>{const t=a("FullScreen"),y=a("el-icon"),g=a("el-button"),I=a("Minus"),V=a("Close"),A=a("el-divider"),F=a("Link"),H=a("Download"),R=a("el-link"),U=a("el-dialog");return n(),s(U,{modelValue:x.value,"onUpdate:modelValue":l[1]||(l[1]=e=>x.value=e),title:k.value,center:"",width:"40%","show-close":!1,fullscreen:Y.value},{header:i((({titleId:e,titleClass:l,close:a})=>[o("div",D,[o("h4",{id:e,class:r(l),style:{flex:"1"}},c(k.value),11,C),Y.value?(n(),s(g,{key:1,type:"text",onClick:B,class:"mr10"},{default:i((()=>[d(y,{size:"20",color:"grey"},{default:i((()=>[d(I)])),_:1})])),_:1})):(n(),s(g,{key:0,type:"text",onClick:B,class:"mr10"},{default:i((()=>[d(y,{size:"20",color:"grey"},{default:i((()=>[d(t)])),_:1})])),_:1})),d(g,{type:"text",onClick:a},{default:i((()=>[d(y,{size:"20",color:"grey"},{default:i((()=>[d(V)])),_:1})])),_:2},1032,["onClick"])])])),footer:i((()=>[o("span",L,[d(g,{type:"primary",onClick:l[0]||(l[0]=e=>x.value=!1)},{default:i((()=>l[3]||(l[3]=[u("确认")]))),_:1})])])),default:i((()=>{var e,t;return[o("div",j,[o("div",T,"发布时间:"+c((t=O.value.c_time,h.$dayjs(1e3*t).format("YYYY/MM/DD"))),1),d(A,{class:"mb10 mt10"}),o("div",null,[o("div",{innerHTML:b.value},null,8,M)]),(null==(e=O.value.attachments)?void 0:e.length)>0?(n(),v("div",S,[l[2]||(l[2]=o("div",{class:"mr30 flx-center"},"附件",-1)),o("div",z,[(n(!0),v(m,null,f(O.value.attachments,(e=>(n(),v("div",{key:e,class:"flex-row flx-center"},[d(g,{type:"text",class:"attachment-link mr10",onClick:l=>(async e=>{e.file_url?window.open("http://14.17.80.135:28012/onlinePreview?url="+encodeURIComponent(p.exports.Base64.encode(e.file_url))):w.warning("预览地址无效")})(e)},{default:i((()=>[d(y,null,{default:i((()=>[d(F)])),_:1}),o("span",null,c(e.name),1)])),_:2},1032,["onClick"]),d(R,{href:e.file_url,target:"_blank"},{default:i((()=>[d(y,{size:"20"},{default:i((()=>[d(H)])),_:1})])),_:2},1032,["href"])])))),128))])])):_("v-if",!0)])]})),_:1},8,["modelValue","title","fullscreen"])}}}),[["__scopeId","data-v-b0560802"]]),Y=l({__name:"index",props:{isShow:{type:Boolean,default:!1},showAlert:{type:Boolean,default:!1}},setup(l,{expose:i}){const o=t(null),r=t(!1),c=t(""),u=l,f=()=>{var e;null==(e=o.value)||e.openDialog()};return x((()=>u.isShow),(l=>{l&&(async()=>{const l=await e({involve_business:3});if(200==l.code&&"[object Object]"==Object.prototype.toString.call(l.data)){let{is_remind:e,valid_start_time:t,valid_end_time:a}=l.data;(new Date).getTime(),new Date(t).getTime(),new Date(a).getTime();let n=k("show_notice");r.value=!0,c.value=l.data.title,1!=e||n||(f(),b("show_notice",!0))}})()}),{immediate:!0}),i({openNotice:f}),(e,l)=>{const t=a("el-alert");return n(),v(m,null,[d(O,{ref_key:"noticeRef",ref:o},null,512),h(r)&&e.showAlert?(n(),s(t,{key:0,title:"公告:"+h(c),type:"warning",description:"",closable:!1,class:"mb10","show-icon":"",onClick:f},null,8,["title"])):_("v-if",!0)],64)}}});export{Y as _};
