/* empty css             *//* empty css                  *//* empty css                   *//* empty css               *//* empty css                  *//* empty css                    */import{_ as a}from"./index.vue_vue_type_script_setup_true_lang-bc7fd1e2.js";/* empty css                 *//* empty css                *//* empty css                */import{d as e,m as t,p as l,x as s,an as i,o,c as n,W as d,ay as u,e as r,a as c,w as p,b as v,l as m,F as f,y as _,f as y,G as j,aX as b,t as h,ax as g,J as x,aR as k,av as w,aw as C,aY as V,S as H,aZ as L,v as T,az as M,aA as S,_ as D}from"./index-2b50ecca.js";import{u as G}from"./useGetList-927e47a1.js";import J from"./notices-d7fe861f.js";import R from"./todayData-206ad88f.js";import{c as U,n as X,a as Y,d as Z,b as q}from"./index-5cdf9bd7.js";/* empty css                      *//* empty css                 *//* empty css               *//* empty css                  *//* empty css                     *//* empty css                  */import"./http-aa208300.js";import"./el-tooltip-4ed993c7.js";import"./userStatistics-016b7f08.js";const z=a=>(M("data-v-5115602c"),a=a(),S(),a),A=z((()=>r("h3",null,"最新通知 ",-1))),F={class:"noticebody h-full"},I=["onClick"],K={class:"notices"},N={class:"n-time-text"},Q={style:{display:"flex","justify-content":"center"}},W=[z((()=>r("label",{style:{color:"darkgray"}}," 暂无新通知",-1)))],B=z((()=>r("div",null,null,-1))),E={style:{width:"100%",height:"40px","background-color":"#fff"}},O=["innerHTML"],P=["innerHTML"],$={class:"dialog-footer"},aa=D(e({__name:"index",setup(e){const M=t(!1),S=t({}),D=t([]),z=t(0),aa=t(!1),{data:ea,query:ta,search:la,reset:sa,loading:ia}=G("system/notices/notice/mine",!0),oa=l((()=>{var a;return null==(a=ea.value)?void 0:a.data})),na=()=>{X(S.value.id).then((a=>{la()})),M.value=!1},da=async()=>{let a=ta.value;a.limit=1,await Y(a).then((a=>{let e=a.data.shift(0);e?(1==aa.value&&ra(e),S.value=e):S.value={}}))},ua=()=>{aa.value=!aa.value,1==aa.value&&S.value.id&&ra(S.value)},ra=a=>{q(a.id).then((a=>{S.value.id=a.data.id,S.value.title=a.data.title,S.value.content=a.data.content,na()}))},ca=(a,e)=>{var t;a.props.name,z.value=Number(null==(t=null==a?void 0:a.props)?void 0:t.name),ta.value.notice_type_id=a.props.name,la(),da()};return s((async()=>{U().then((a=>{a.data.id&&(M.value=!0,S.value.id=a.data.id,S.value.title=a.data.title,S.value.content=a.data.content)})),ta.value.notice_type_id=z,await la(),Z({}).then((a=>{D.value=a.data,D.value.unshift({id:0,name:"全部"})})),da()})),(e,t)=>{const l=g,s=x,G=k,U=w,X=a,Y=C,Z=V,q=H,ea=L,ta=T,la=i("action"),sa=i("ac");return o(),n(f,null,[d(r("div",null,[c(l,{style:{padding:"5px"}},{default:p((()=>[r("div",{class:"header-title"},[A,v(),r("h4",{onClick:ua},"查看全部")]),c(J)])),_:1}),d((o(),m(l,{shadow:"always",style:{"margin-top":"20px"}},{default:p((()=>[c(R)])),_:1})),[[la,"statistic.HomeStatistics.statistics"],[sa]])],512),[[u,0==aa.value]]),d(r("div",null,[c(ea,{gutter:20},{default:p((()=>[c(Z,{span:8},{default:p((()=>[c(Y,{type:"border-card",modelValue:z.value,"onUpdate:modelValue":t[0]||(t[0]=a=>z.value=a),class:"tabs",onTabClick:ca},{default:p((()=>[(o(!0),n(f,null,_(D.value,(a=>(o(),m(U,{key:a.id,label:a.name,name:a.id},{default:p((()=>[r("div",F,[(o(!0),n(f,null,_(y(oa),((a,e)=>(o(),n("div",{class:j(["notice-item itme",a.id==S.value.id?"active":""]),onClick:e=>ra(a),key:e},[0==a.is_read?(o(),m(G,{key:0,"is-dot":"",class:"item"},{default:p((()=>[c(s,null,{default:p((()=>[c(y(b))])),_:1})])),_:1})):(o(),m(s,{key:1},{default:p((()=>[c(y(b))])),_:1})),r("label",K,[v(h(a.title)+" ",1),r("p",N,h(a.created_at),1)])],10,I)))),128))]),d(r("div",Q,W,512),[[u,y(oa).length<1]])])),_:2},1032,["label","name"])))),128)),c(X)])),_:1},8,["modelValue"])])),_:1}),c(Z,{span:0},{default:p((()=>[B])),_:1}),c(Z,{span:16,style:{"background-color":"#fff"}},{default:p((()=>[r("div",E,[c(q,{class:"bak-txt",onClick:ua},{default:p((()=>[v("返回")])),_:1})]),r("div",{sclass:"flex h-full flex-wrap break-all",innerHTML:S.value.content},null,8,O)])),_:1})])),_:1})],512),[[u,1==aa.value]]),c(ta,{draggable:"",modelValue:M.value,"onUpdate:modelValue":t[1]||(t[1]=a=>M.value=a),title:S.value.title,width:"30%",center:""},{footer:p((()=>[r("span",$,[c(q,{onClick:na},{default:p((()=>[v("我知道了")])),_:1})])])),default:p((()=>[r("div",{class:"flex flex-wrap break-all",innerHTML:S.value.content},null,8,P)])),_:1},8,["modelValue","title"])],64)}}}),[["__scopeId","data-v-5115602c"]]);export{aa as default};
