Files
qhmes/deploy-qhmes/frontend/js/SysMessageList-DuIrqb3b.js
2026-05-15 11:34:12 +08:00

2 lines
7.2 KiB
Java

import{by as P,bz as V,bA as U,bB as J,bC as Q,bD as q,ar as W,bE as X}from"./antd-vue-vendor-BPnV8VqP.js";import{a as Y,u as Z}from"./useSysMessage-SUJpjsrz.js";import{g as $,u as ee}from"./useComment-Cm7xlwhe.js";import{f as R,l as te,w as ae,ah as i,ar as d,as as a,F as y,k as n,aC as r,aF as o,aB as oe,au as m,av as M,ag as z,G as ne,aU as se,aQ as le,aG as re}from"./vue-vendor-C7Zq48Yl.js";import{d as ie}from"./index-BI6CMai0.js";import"./index-Du0A3ksf.js";import"./BasicModal-0sAdFEk_.js";import"./ModalHeader-keHdAHWH.js";import"./useTimeout-DDl4l82I.js";import"./vxe-table-vendor-B88kchpX.js";import"./index-DeEq83Ov.js";import"./useWindowSizeFn-PRZSD86C.js";import"./index-pxs5MULf.js";import"./index-BgYCgfME.js";import"./index-f8O7TghW.js";import"./useIntersectionObserver-BMxdTqP3.js";import"./index-Dg4HCEvo.js";import"./index-BHWalL74.js";const de={name:"SysMessageList",components:{FilterOutlined:X,CloseOutlined:W,BellFilled:q,ExclamationOutlined:Q,MailOutlined:J,InteractionOutlined:U,AlertOutlined:V,GatewayOutlined:P},props:{star:{type:Boolean,default:!1},isLowApp:{type:Boolean,default:!1},messageCount:{type:Number,default:0},cancelStarAfterDel:{type:Boolean,default:!1}},emits:["close","detail","clear","close-modal"],setup(g,{emit:u}){const{messageList:p,loadEndStatus:t,loadingMoreStatus:O,onLoadMore:w,noRead:S,getMsgCategory:L,getHrefText:b,searchParams:l,reset:_,loadData:k,updateStarMessage:x}=Y(G),f=R(0);function T(s){let{fromUser:c,rangeDateKey:C,rangeDate:j,noticeType:K}=s;l.fromUser=c||"",l.rangeDateKey=C||"",l.rangeDate=j||[],l.noticeType=K||"",h.value={locale:{emptyText:"<a-empty />"}},g.star===!0?l.starFlag="1":l.starFlag="",_(),k()}function v(s){if(x(s),s.starFlag=="1"&&g.cancelStarAfterDel){const c=p.value.findIndex(C=>C.id===C.id);if(c!==-1){p.value.splice(c,1);return}}s.starFlag=="1"?s.starFlag="0":s.starFlag="1"}const{goPage:D,currentModal:F,modalRegCache:A,bindParams:e,isFormComment:H}=Z(u,g),B=$(),{getHtml:E}=ee(B);function I(s){if(s.readFlag="1",D(s),u("close",s.id),s.busType==="email")u("close-modal");else if(["bpm","bpm_task","tenant_invite"].includes(s.busType)){if(s.msgAbstract)try{if(JSON.parse(s.msgAbstract).taskDetail)return}catch(c){}u("close-modal")}else["eoa_co_notify","eoa_co_remind","eoa_sup_notify","eoa_sup_remind"].includes(s.busType)&&u("close-modal")}const h=R({});function N(){u("clear")}function G(){let s=l.rangeDateKey,c=f.value;c>0&&!g.star&&s&&s==="7day"?h.value={emptyText:te("span",{style:{color:"rgb(255,154,0)",cursor:"pointer","text-align":"left",display:"block"},onClick:()=>{N()}},`还剩余未读消息(${c>99?"99+":c})`)}:h.value={locale:{emptyText:"<a-empty />"}}}return ae(()=>g.messageCount,s=>{f.value=s},{immediate:!0}),{messageList:p,loadEndStatus:t,loadingMoreStatus:O,onLoadMore:w,noRead:S,getMsgCategory:L,getHrefText:b,reload:T,clickStar:v,showMessageDetail:I,isFormComment:H,getHtml:E,modalRegCache:A,currentModal:F,bindParams:e,locale:h}}},ce={key:0,style:{textAlign:"center",marginTop:"12px",height:"32px",lineHeight:"32px"}},ue={key:1,style:{textAlign:"center",marginTop:"12px",height:"32px",lineHeight:"32px"}},_e={key:0,style:{background:"#f7f7f7",color:"#555",padding:"2px 5px","white-space":"nowrap",overflow:"hidden"}},ye=["innerHTML"],ge={style:{position:"relative"}},fe=["innerHTML"],me={key:1},pe=["onClick"];function be(g,u,p,t,O,w){const S=i("a-button"),L=i("a-rate"),b=i("mail-outlined"),l=i("a-avatar"),_=i("a-badge"),k=i("interaction-outlined"),x=i("alert-outlined"),f=i("GatewayOutlined"),T=i("AlertOutlined"),v=i("bell-filled"),D=i("a-list-item-meta"),F=i("a-list-item"),A=i("a-list");return a(),d(y,null,[n(A,{"item-layout":"horizontal","data-source":t.messageList,locale:t.locale},{loadMore:o(()=>[t.messageList&&t.messageList.length>0&&!t.loadEndStatus&&!t.loadingMoreStatus?(a(),d("div",ce,[n(S,{onClick:t.onLoadMore},{default:o(()=>[...u[0]||(u[0]=[ne("加载更多",-1)])]),_:1},8,["onClick"])])):z("",!0),t.messageList&&t.messageList.length>0&&t.loadEndStatus?(a(),d("div",ue," 没有更多了 ")):z("",!0)]),renderItem:o(({item:e})=>[n(F,{style:oe({background:e!=null&&e.izTop&&e.izTop==1?"#f7f7f7":"auto"})},{actions:o(()=>[n(L,{class:"antd-rate",value:e.starFlag=="1"?1:0,count:1,onClick:H=>t.clickStar(e),style:{cursor:"pointer"},disabled:""},null,8,["value","onClick"])]),default:o(()=>[n(D,null,{description:o(()=>[t.isFormComment(e)?(a(),d("div",_e,[m("div",{innerHTML:t.getHtml(e.msgContent)},null,8,ye)])):z("",!0),m("div",null,M(e.createTime),1)]),title:o(()=>[m("div",ge,[m("span",null,M(t.getMsgCategory(e)),1),e.busType=="bpm"||e.busType=="bpm_cc"||e.busType=="msg_node"||e.busType=="bpm_msg_node"?(a(),d("span",{key:0,class:"bpm-cuiban-content",innerHTML:e.msgContent},null,8,fe)):(a(),d("span",me,M(e.titile),1)),m("a",{onClick:H=>t.showMessageDetail(e),style:{"margin-left":"16px"}},M(t.getHrefText(e)),9,pe)])]),avatar:o(()=>[e.busType=="email"?(a(),d(y,{key:0},[t.noRead(e)?(a(),r(_,{key:0,dot:"",class:"msg-no-read"},{default:o(()=>[n(l,{style:{background:"#79919d"}},{default:o(()=>[n(b,{style:{"font-size":"16px"},title:"未读消息"})]),_:1})]),_:1})):(a(),r(l,{key:1,style:{background:"#79919d"}},{default:o(()=>[n(b,{style:{"font-size":"16px"}})]),_:1}))],64)):e.busType=="bpm_task"?(a(),d(y,{key:1},[t.noRead(e)?(a(),r(_,{key:0,dot:"",class:"msg-no-read"},{default:o(()=>[n(l,{style:{background:"#79919d"}},{default:o(()=>[n(k,{style:{"font-size":"16px"},title:"未读消息"})]),_:1})]),_:1})):(a(),r(l,{key:1,style:{background:"#79919d"}},{default:o(()=>[n(k,{style:{"font-size":"16px"}})]),_:1}))],64)):e.busType=="bpm"?(a(),d(y,{key:2},[t.noRead(e)?(a(),r(_,{key:0,dot:"",class:"msg-no-read"},{default:o(()=>[n(l,{style:{background:"#79919d"}},{default:o(()=>[n(x,{style:{"font-size":"16px"},title:"未读消息"})]),_:1})]),_:1})):(a(),r(l,{key:1,style:{background:"#79919d"}},{default:o(()=>[n(x,{style:{"font-size":"16px"}})]),_:1}))],64)):["eoa_co_remind","eoa_co_notify"].includes(e.busType)?(a(),d(y,{key:3},[t.noRead(e)?(a(),r(_,{key:0,dot:"",class:"msg-no-read"},{default:o(()=>[n(l,{style:{background:"#79919d"}},{default:o(()=>[n(f,{style:{"font-size":"16px"},title:"未读消息"})]),_:1})]),_:1})):(a(),r(l,{key:1,style:{background:"#79919d"}},{default:o(()=>[n(f,{style:{"font-size":"16px"}})]),_:1}))],64)):["eoa_sup_remind","eoa_sup_notify"].includes(e.busType)?(a(),d(y,{key:4},[t.noRead(e)?(a(),r(_,{key:0,dot:"",class:"msg-no-read"},{default:o(()=>[n(l,{style:{background:"#79919d"}},{default:o(()=>[n(T,{style:{"font-size":"16px"},title:"未读消息"})]),_:1})]),_:1})):(a(),r(l,{key:1,style:{background:"#79919d"}},{default:o(()=>[n(T,{style:{"font-size":"16px"}})]),_:1}))],64)):(a(),d(y,{key:5},[t.noRead(e)?(a(),r(_,{key:0,dot:"",class:"msg-no-read"},{default:o(()=>[n(l,{style:{background:"#79919d"}},{default:o(()=>[n(v,{style:{"font-size":"16px"},title:"未读消息"})]),_:1})]),_:1})):(a(),r(l,{key:1,style:{background:"#79919d"}},{default:o(()=>[n(v,{style:{"font-size":"16px"}})]),_:1}))],64))]),_:2},1024)]),_:2},1032,["style"])]),_:1},8,["data-source","locale"]),(a(),r(se,null,[t.currentModal?(a(),r(le(t.currentModal),re({key:0},t.bindParams,{key:t.currentModal,onRegister:t.modalRegCache[t.currentModal].register}),null,16,["onRegister"])):z("",!0)],1024))],64)}const Ee=ie(de,[["render",be],["__scopeId","data-v-fc2c40bf"]]);export{Ee as default};