import{d as E,r,a as l,o as c,i as x,e as t,f as s,p as H,t as F,b as e,j as U,c as h,F as V,g as G,h as A,E as T,ap as P,_ as M,w as J,u as j,ax as K,ay as Q}from"./index-8184dd63-1780045603901v=1.0.0.js";import{e as z}from"./common-5ba50e89-1780045603901v=1.0.0.js";import{g as W}from"./base64-db2ecc3a-1780045603901v=1.0.0.js";const X={class:"flex-row"},Z=["id"],ee={class:"notice-dialog-box"},te={class:"time-text ml5 mr5"},oe=["innerHTML"],ne={key:0,class:"flex-row ml5 mr5 mt10"},le={class:"flex-direction"},se={class:"dialog-footer"},ae=E({__name:"noticeDialog",setup(k,{expose:b}){const u=r(!1),{proxy:w}=P(),f=r("\u586B\u62A5\u516C\u544A"),y=r(""),i=r(null),C=()=>{N()},o=n=>w.$dayjs(n*1e3).format("YYYY/MM/DD"),d=r(!1),p=()=>{d.value=!d.value},D=async n=>{n.file_url?window.open("http://14.17.80.135:28012/onlinePreview?url="+encodeURIComponent(W.encode(n.file_url))):T.warning("\u9884\u89C8\u5730\u5740\u65E0\u6548")},N=async()=>{const n=await z({involve_business:2});if(n.code==200){if(Object.prototype.toString.call(n.data)=="[object Object]"){let{is_remind:a,valid_start_time:S,valid_end_time:_}=n.data;new Date().getTime(),new Date(S).getTime(),new Date(_).getTime(),f.value=n.data.title,y.value=n.data.content,i.value=n.data,u.value=!0;return}T.warning("\u6682\u65E0\u516C\u544A")}else T.warning(n.message)};return b({openDialog:C}),(n,a)=>{const S=l("FullScreen"),_=l("el-icon"),g=l("el-button"),L=l("Minus"),I=l("Close"),O=l("el-divider"),Y=l("Link"),$=l("Download"),R=l("el-link"),q=l("el-dialog");return c(),x(q,{modelValue:u.value,"onUpdate:modelValue":a[1]||(a[1]=m=>u.value=m),title:f.value,center:"",width:"40%","show-close":!1,fullscreen:d.value},{header:t(({titleId:m,titleClass:v,close:B})=>[s("div",X,[s("h4",{id:m,class:H(v),style:{flex:"1"}},F(f.value),11,Z),d.value?(c(),x(g,{key:1,type:"text",onClick:p,class:"mr10"},{default:t(()=>[e(_,{size:"20",color:"grey"},{default:t(()=>[e(L)]),_:1})]),_:1})):(c(),x(g,{key:0,type:"text",onClick:p,class:"mr10"},{default:t(()=>[e(_,{size:"20",color:"grey"},{default:t(()=>[e(S)]),_:1})]),_:1})),e(g,{type:"text",onClick:B},{default:t(()=>[e(_,{size:"20",color:"grey"},{default:t(()=>[e(I)]),_:1})]),_:1},8,["onClick"])])]),footer:t(()=>[s("span",se,[e(g,{type:"primary",onClick:a[0]||(a[0]=m=>u.value=!1)},{default:t(()=>[...a[3]||(a[3]=[U("\u786E\u8BA4",-1)])]),_:1})])]),default:t(()=>{var m;return[s("div",ee,[s("div",te,"\u53D1\u5E03\u65F6\u95F4:"+F(o(i.value.c_time)),1),e(O,{class:"mb10 mt10"}),s("div",null,[s("div",{innerHTML:y.value},null,8,oe)]),((m=i.value.attachments)==null?void 0:m.length)>0?(c(),h("div",ne,[a[2]||(a[2]=s("div",{class:"mr30 flx-center"},"\u9644\u4EF6",-1)),s("div",le,[(c(!0),h(V,null,G(i.value.attachments,v=>(c(),h("div",{key:v,class:"flex-row flx-center"},[e(g,{type:"text",class:"attachment-link mr10",onClick:B=>D(v)},{default:t(()=>[e(_,null,{default:t(()=>[e(Y)]),_:1}),s("span",null,F(v.name),1)]),_:2},1032,["onClick"]),e(R,{href:v.file_url,target:"_blank"},{default:t(()=>[e(_,{size:"20"},{default:t(()=>[e($)]),_:1})]),_:1},8,["href"])]))),128))])])):A("v-if",!0)])]}),_:1},8,["modelValue","title","fullscreen"])}}});const ie=M(ae,[["__scopeId","data-v-db01d302"],["__file","D:/desktop/yunNan/vue-area-submit/src/components/Notice/components/noticeDialog.vue"]]),ce=E({__name:"index",props:{isShow:{type:Boolean,required:!0,default:!1},showAlert:{type:Boolean,required:!0,default:!1}},setup(k,{expose:b}){const u=r(null),w=r(!1),f=r(""),y=k,i=()=>{var o;(o=u.value)==null||o.openDialog()},C=async()=>{const o=await z({involve_business:2});if(o.code==200&&Object.prototype.toString.call(o.data)=="[object Object]"){let{is_remind:d,valid_start_time:p,valid_end_time:D}=o.data;new Date().getTime(),new Date(p).getTime(),new Date(D).getTime();let N=K("show_notice");w.value=!0,f.value=o.data.title,d==1&&!N&&(i(),Q("show_notice",!0))}else o.message};return J(()=>y.isShow,o=>{o&&C()},{immediate:!0}),b({openNotice:i}),(o,d)=>{const p=l("el-alert");return c(),h(V,null,[e(ie,{ref_key:"noticeRef",ref:u},null,512),j(w)&&k.showAlert?(c(),x(p,{key:0,title:"\u516C\u544A:"+j(f),type:"warning",description:"",closable:!1,class:"mb10","show-icon":"",onClick:i},null,8,["title"])):A("v-if",!0)],64)}}}),_e=M(ce,[["__file","D:/desktop/yunNan/vue-area-submit/src/components/Notice/index.vue"]]);export{_e as N};
