/* empty css                  *//* empty css                 */import{d as N,r as v,I as E,a4 as S,c as n,b as d,a as t,x as i,a5 as u,u as p,F as k,h,o as a,A as b,w as m,y as B,E as P,t as _,a6 as V,N as D,a7 as I,a8 as F,O as L,e as U,i as $,a9 as q,a0 as M,_ as O}from"./index-hZHbf6Qq.js";import{P as Q}from"./index-C__Mp2q5.js";/* empty css                                                              *//* empty css                        *//* empty css                    *//* empty css               *//* empty css                  *//* empty css                  *//* empty css                             *//* empty css                 */import{T as j}from"./index-BqhCx7JE.js";/* empty css                      */const G={class:"page-container"},H={class:"tab-nav"},J=["onClick"],K={class:"message-list"},R={class:"message-content"},W={key:1,class:"budget-text"},X={key:3,class:"unread-dot"},Y={class:"message-info"},Z={class:"message-title"},ee={class:"message-desc"},ae={class:"message-right"},te={class:"message-time"},se=N({__name:"index",setup(oe){const l=v("approval"),T=[{key:"approval",label:"审批待办",icon:V},{key:"arrival",label:"到货提醒",icon:D},{key:"budget",label:"预算预警",icon:I}],c=E({pageNum:1,pageSize:10}),r=v(0),s=v([]),f=()=>{l.value==="approval"?(s.value=[{time:"2025/01/10 11:42:32",title:"您有一个审批流程待处理",desc:"审批名称：办公用品采购申请",unread:!0,showAction:!0,iconType:"user"},{time:"2025/01/10 11:42:32",title:"您的办公用品审批申请已通过",desc:"审批名称：办公用品采购申请",unread:!0,showAction:!1,iconType:"user"},{time:"2025/01/10 11:42:32",title:"您的办公用品审批申请已通过",desc:"审批名称：办公用品采购申请",unread:!0,showAction:!1,iconType:"user"}],r.value=3):l.value==="arrival"?(s.value=[{time:"2025/01/10 11:42:32",title:"包裹到货提醒",desc:"物流状态：已到达代售点",unread:!0,showAction:!1,iconType:"package"},{time:"2025/01/10 11:42:32",title:"包裹到货提醒",desc:"物流状态：已到达代售点",unread:!1,showAction:!1,iconType:"package"}],r.value=2):(s.value=[{time:"2025/01/10 11:42:32",title:"预算预警",desc:"副标题副副标题",unread:!0,showAction:!1,iconType:"budget"},{time:"2025/01/10 11:42:32",title:"预算预警",desc:"副标题副副标题",unread:!1,showAction:!1,iconType:"budget"}],r.value=2)};S(l,()=>{c.pageNum=1,f()},{immediate:!0});const w=()=>{f()},x=z=>{M.info("跳转到审批处理页面")};return(z,o)=>{const g=P,C=$,A=q;return a(),n("div",G,[d(p(Q),{title:"消息通知"}),t("div",H,[(a(),n(k,null,h(T,e=>t("div",{key:e.key,class:b(["tab-item",{active:l.value===e.key}]),onClick:y=>l.value=e.key},[d(g,null,{default:m(()=>[(a(),i(B(e.icon)))]),_:2},1024),t("span",null,_(e.label),1)],10,J)),64))]),t("div",K,[(a(!0),n(k,null,h(s.value,(e,y)=>(a(),n("div",{key:y,class:"message-item"},[t("div",R,[t("div",{class:b(["message-icon",e.iconType||"user"])},[e.iconType==="package"?(a(),i(g,{key:0,size:20,color:"#e60012"},{default:m(()=>[d(p(F))]),_:1})):e.iconType==="budget"?(a(),n("span",W,"¥")):(a(),i(g,{key:2,size:20,color:"#fff"},{default:m(()=>[d(p(L))]),_:1})),e.unread?(a(),n("span",X)):u("",!0)],2),t("div",Y,[t("div",Z,_(e.title),1),t("div",ee,_(e.desc),1)]),t("div",ae,[t("div",te,_(e.time),1),e.showAction?(a(),i(C,{key:0,type:"danger",size:"small",onClick:ne=>x()},{default:m(()=>[...o[2]||(o[2]=[U("去处理",-1)])]),_:1},8,["onClick"])):u("",!0)])])]))),128)),s.value.length===0?(a(),i(A,{key:0,description:"暂无消息"})):u("",!0)]),s.value.length>0?(a(),i(p(j),{key:0,page:c.pageNum,"onUpdate:page":o[0]||(o[0]=e=>c.pageNum=e),pageSize:c.pageSize,"onUpdate:pageSize":o[1]||(o[1]=e=>c.pageSize=e),total:r.value,onChange:w},null,8,["page","pageSize","total"])):u("",!0)])}}}),he=O(se,[["__scopeId","data-v-28cb40e0"]]);export{he as default};
