import{bp as H,bq as B,br as O,bs as E,bt as R,aA as V,bu as A}from"./antd-vue-vendor-CahNzUUa.js";import{a as N,u as w}from"./useSysMessage-kGf4uN4q.js";import{U as l,a2 as o,ad as r,af as e,k as s,a3 as c,F as m,a4 as k,a5 as F,G as z,V as D}from"./vue-vendor-CxLCUzY4.js";import{_ as I}from"./index-Cy4uayzW.js";import"./vxe-table-vendor-Cdi8WfTx.js";const U={name:"SysMessageList",components:{FilterOutlined:A,CloseOutlined:V,BellFilled:R,ExclamationOutlined:E,MailOutlined:O,InteractionOutlined:B,AlertOutlined:H},props:{star:{type:Boolean,default:!1}},emits:["close","detail"],setup(C,{emit:g}){const{messageList:L,loadEndStatus:t,loadingMoreStatus:S,onLoadMore:T,noRead:b,getMsgCategory:x,searchParams:d,reset:u,loadData:i,updateStarMessage:_}=N();function p(n){let{fromUser:h,rangeDateKey:a,rangeDate:v}=n;d.fromUser=h||"",d.rangeDateKey=a||"",d.rangeDate=v||[],C.star===!0?d.starFlag="1":d.starFlag="",u(),i()}function y(n){_(n),n.starFlag=="1"?n.starFlag="0":n.starFlag="1"}const{goPage:f}=w(g);function M(n){n.readFlag="1",f(n),g("close",n.id)}return{messageList:L,loadEndStatus:t,loadingMoreStatus:S,onLoadMore:T,noRead:b,getMsgCategory:x,reload:p,clickStar:y,showMessageDetail:M}}},K={key:0,style:{textAlign:"center",marginTop:"12px",height:"32px",lineHeight:"32px"}},P={key:1,style:{textAlign:"center",marginTop:"12px",height:"32px",lineHeight:"32px"}},q={style:{position:"relative"}},G=["innerHTML"],j=["innerHTML"],J=["onClick"];function Q(C,g,L,t,S,T){const b=l("a-button"),x=l("a-rate"),d=l("a-tooltip"),u=l("mail-outlined"),i=l("a-avatar"),_=l("a-badge"),p=l("interaction-outlined"),y=l("alert-outlined"),f=l("bell-filled"),M=l("a-list-item-meta"),n=l("a-list-item"),h=l("a-list");return o(),r(h,{"item-layout":"horizontal","data-source":t.messageList},{loadMore:e(()=>[t.messageList&&t.messageList.length>0&&!t.loadEndStatus&&!t.loadingMoreStatus?(o(),c("div",K,[s(b,{onClick:t.onLoadMore},{default:e(()=>g[0]||(g[0]=[z("加载更多")])),_:1},8,["onClick"])])):D("",!0),t.messageList&&t.messageList.length>0&&t.loadEndStatus?(o(),c("div",P," 没有更多了 ")):D("",!0)]),renderItem:e(({item:a})=>[s(n,null,{actions:e(()=>[s(x,{value:a.starFlag=="1"?1:0,count:1,onClick:v=>t.clickStar(a),style:{cursor:"pointer"},disabled:""},null,8,["value","onClick"])]),default:e(()=>[s(M,{description:a.createTime},{title:e(()=>[k("div",q,[k("span",null,F(t.getMsgCategory(a)),1),a.busType=="bpm"?(o(),c("span",{key:0,class:"bpm-cuiban-content",innerHTML:a.msgContent},null,8,G)):(o(),r(d,{key:1},{title:e(()=>[k("div",{innerHTML:a.msgContent},null,8,j)]),default:e(()=>[z(" "+F(a.titile),1)]),_:2},1024)),k("a",{onClick:v=>t.showMessageDetail(a),style:{"margin-left":"16px"}},"查看详情",8,J)])]),avatar:e(()=>[a.busType=="email"?(o(),c(m,{key:0},[t.noRead(a)?(o(),r(_,{key:0,dot:"",class:"msg-no-read"},{default:e(()=>[s(i,{style:{background:"#79919d"}},{default:e(()=>[s(u,{style:{"font-size":"16px"},title:"未读消息"})]),_:1})]),_:1})):(o(),r(i,{key:1,style:{background:"#79919d"}},{default:e(()=>[s(u,{style:{"font-size":"16px"}})]),_:1}))],64)):a.busType=="bpm_task"?(o(),c(m,{key:1},[t.noRead(a)?(o(),r(_,{key:0,dot:"",class:"msg-no-read"},{default:e(()=>[s(i,{style:{background:"#79919d"}},{default:e(()=>[s(p,{style:{"font-size":"16px"},title:"未读消息"})]),_:1})]),_:1})):(o(),r(i,{key:1,style:{background:"#79919d"}},{default:e(()=>[s(p,{style:{"font-size":"16px"}})]),_:1}))],64)):a.busType=="bpm"?(o(),c(m,{key:2},[t.noRead(a)?(o(),r(_,{key:0,dot:"",class:"msg-no-read"},{default:e(()=>[s(i,{style:{background:"#79919d"}},{default:e(()=>[s(y,{style:{"font-size":"16px"},title:"未读消息"})]),_:1})]),_:1})):(o(),r(i,{key:1,style:{background:"#79919d"}},{default:e(()=>[s(y,{style:{"font-size":"16px"}})]),_:1}))],64)):(o(),c(m,{key:3},[t.noRead(a)?(o(),r(_,{key:0,dot:"",class:"msg-no-read"},{default:e(()=>[s(i,{style:{background:"#79919d"}},{default:e(()=>[s(f,{style:{"font-size":"16px"},title:"未读消息"})]),_:1})]),_:1})):(o(),r(i,{key:1,style:{background:"#79919d"}},{default:e(()=>[s(f,{style:{"font-size":"16px"}})]),_:1}))],64))]),_:2},1032,["description"])]),_:2},1024)]),_:1},8,["data-source"])}const ee=I(U,[["render",Q],["__scopeId","data-v-b2fee35d"]]);export{ee as default};
