import{a2 as t,f as e,g as a,o as s,h as i,w as l,i as n,a as o,k as r,F as _,l as c,j as u,t as d,N as m,m as p,O as f,z as g,y,b as x,c as h,C as j,D as v,e as b,a3 as k,a4 as D,a5 as C,x as T,n as w,a6 as L,B as N}from"./index-WeUkftbp.js";/* empty css                                                                  */import{_ as $}from"./_plugin-vue_export-helper.BCo6x5W8.js";/* empty css                                                                    *//* empty css                                                              */import{_ as B,a as F}from"./uni-row.DLutFlIQ.js";import{_ as I}from"./uni-badge.CLrZv6EZ.js";import{_ as O,a as S}from"./uni-list.D2b1m_I0.js";import{e as z}from"./index.D8Jasx-l.js";import{f as A}from"./schedule.ky61dGSO.js";import{g as H}from"./index.NTbA_2SX.js";import"./moment.BD7_iMEL.js";import{u as J}from"./useVerifyCode.Bm9sm4v1.js";import"./uni-icons.B3nCnuXe.js";/* empty css                                                              */const Q=$({__name:"noticeList",props:{listData:{type:Array,default:()=>[]},emptyTitle:{type:String,default:""}},setup(x){const h=x,{listData:j,emptyTitle:v}=t(h),b=t=>{p(`/pages/notice/info?id=${t.id}&title=${t.cate_name}`)};return(t,p)=>{const x=f,h=g,k=e(a("uni-col"),B),D=y,C=e(a("uni-row"),F),T=e(a("uni-badge"),I),w=e(a("uni-list-item"),O),L=e(a("uni-list"),S);return s(),i(h,null,{default:l((()=>[n(h,{class:"content"},{default:l((()=>[o(j).length>0?(s(),i(L,{key:0,border:!1},{default:l((()=>[(s(!0),r(_,null,c(o(j),((t,e)=>(s(),i(w,{key:"items"+e},{header:l((()=>[n(h,{class:"notice-list-item-left",onClick:e=>b(t)},{default:l((()=>[n(x,{class:"image",src:t.pic,mode:""},null,8,["src"])])),_:2},1032,["onClick"])])),body:l((()=>[n(h,{class:"notice-list-item-right",onClick:e=>b(t)},{default:l((()=>[n(C,{class:"notice-list-item-right-top display-center"},{default:l((()=>[n(k,{span:18},{default:l((()=>[u(d(t.cate_name),1)])),_:2},1024),n(k,{span:6,class:"right-top-time text-right"},{default:l((()=>[t.item.created_at?(s(),i(D,{key:0},{default:l((()=>[u(d(o(A)(t.item.created_at,!0)),1)])),_:2},1024)):m("",!0)])),_:2},1024)])),_:2},1024),n(C,{class:"notice-list-item-right-bottom display-center"},{default:l((()=>[n(k,{span:18,class:"line1"},{default:l((()=>[u(d(t.item.message?t.item.message:"暂无最新消息~"),1)])),_:2},1024),n(k,{span:6,class:"right-top-time text-right"},{default:l((()=>[n(T,{text:t.count},null,8,["text"])])),_:2},1024)])),_:2},1024)])),_:2},1032,["onClick"])])),_:2},1024)))),128))])),_:1})):(s(),i(o(z),{key:1,index:5,title:o(v)},null,8,["title"]))])),_:1})])),_:1})}}},[["__scopeId","data-v-5fc9053e"]]),V=$({__name:"index",setup(t){const e=x(),a=h((()=>e.state.app.isLogin));j((()=>{a.value?_():v()})),b([{type:1,icon:"icon-sousuo"}]);const r=b({defaultTitle:"待办(0)",listData:[],allFinish:!1}),_=()=>{k().then((t=>{r.listData=t.data;let e=0;r.listData.map((t=>{e+=Number(t.count)})),0==e?D({index:1}):C({index:1,text:e>99?"99+":e}),m()})).catch((t=>{T.error(t.message)}))},{height:c,getBarHeight:u}=J(),d=N(),m=()=>{w((()=>{u(".notice-content",d,!1),L({scrollTop:c.value,duration:0})}))};return(t,e)=>{const a=g;return s(),i(a,{class:"notice-list"},{default:l((()=>[n(a,{class:"notice-content"},{default:l((()=>[n(Q,{"list-data":o(r).listData,"empty-title":"暂无待办消息～"},null,8,["list-data"])])),_:1}),n(H)])),_:1})}}},[["__scopeId","data-v-78e94c51"]]);export{V as default};
