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