Files
qhmes/web-dist/js/SysMessageList-BsdGLqaN.js
2026-06-16 18:19:57 +08:00

2 lines
16 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
var G=(o,e,a)=>new Promise((t,m)=>{var T=f=>{try{v(a.next(f))}catch(c){m(c)}},O=f=>{try{v(a.throw(f))}catch(c){m(c)}},v=f=>f.done?t(f.value):Promise.resolve(f.value).then(T,O);v((a=a.apply(o,e)).next())});import{a as st,u as ct,i as mt}from"./useSysMessage-DGHfzLi3.js";import{cq as w,au as dt,b1 as ut,fE as pt,hm as ft,v as gt,aK as _t,df as U}from"./index-X7Y8jykP.js";import"./index-BDvqZ5j4.js";import{_ as yt}from"./ImChatModal.vue_vue_type_style_index_0_lang-OmNIJ9EN.js";import{f as s,C as p,z as l,y as d,A as i,K as _,H as M,Y as vt,B as bt,ab as ht,F as y,h as Ot,r as Y,i as kt,T as xt,E as L,G as b,Q as h}from"./vue-vendor-DNhG1Cve.js";import{E as Mt,B as Tt,F as Ct}from"./FilterOutlined-BGXTurEr.js";import{L as zt,_ as It,a as At}from"./index-Wl3jtD-0.js";import{u as St}from"./useModal-DaJ3Bflg.js";import{B as wt}from"./index-DfX9t4DO.js";import{A as Ht}from"./index-B4gPlWQt.js";import Pt from"./index-CTwqbU-l.js";import"./index-Cq6YxX27.js";import"./emoji-mart-vue-fast-R0uJEDq-.js";import"./BasicModal-xH56XuRZ.js";import"./ModalHeader-Sr8KwhJJ.js";import"./useTimeout-D5AmIBZw.js";import"./index-BzChaRPg.js";import"./useWindowSizeFn-C-0M9_Ul.js";import"./index-ByCwbQDV.js";import"./index-Upeu4GGa.js";import"./index-C4wWpZeQ.js";import"./index-M9QP6cvf.js";import"./Skeleton-CimgOdM7.js";import"./useScrollTo-0FPEw5-K.js";import"./useIntersectionObserver-BGOgyKyu.js";import"./useAppInject-DPZGPcR3.js";import"./index-CuWaQdlK.js";import"./index-DO7ZhK45.js";import"./ImChat-CP9TPra1.js";import"./useWebSocket-CMyoaPFz.js";import"./ImChatInput-rBvfVpHc.js";/* empty css */import"./index-CfNJyBRj.js";import"./dropdown-jkliuVyN.js";import"./ImChatSettingsModal-4rnykuc8.js";import"./index-DklMb9Qc.js";import"./UpOutlined-B1UMbtrP.js";import"./ImPageListPickModal.vue_vue_type_script_setup_true_lang-DaELlYpW.js";import"./BasicTable-C6eG0bgK.js";import"./BasicTable.vue_vue_type_style_index_0_lang-B9DxrWas.js";import"./BasicForm-ClUSoD_-.js";import"./helper-DcLcf4v6.js";import"./BasicForm.vue_vue_type_style_index_0_lang-B29PWQy0.js";import"./index-saD4h7VJ.js";import"./useBreakpoint-DXhPW7nV.js";import"./useEventListener-BRXjwk7A.js";import"./breakpointEnum-BhAg6bcX.js";import"./uniqBy--vsL0WVB.js";import"./useForm-D61zovon.js";import"./injectionKey-DPVn4AgL.js";import"./index-DSsDi_fL.js";import"./Group-UHkub2tu.js";import"./Checkbox-Dbxs4we4.js";import"./index-BuONesFs.js";import"./FormOutlined-Y84itqS0.js";import"./useTableContext-CncNVXgp.js";import"./index-DTjkSGYl.js";import"./eagerComputed-BTlOruLW.js";import"./fromPairs-Dx9PT-t0.js";import"./useMaxLevel-DE205ncc.js";import"./index-DfHu-LAS.js";import"./Group-DBzJABA_.js";import"./RadioButton-DRBix2Fq.js";import"./index-C7ckZv9Z.js";import"./DirectoryTree-nk_YTTIy.js";import"./FolderOpenOutlined-SzIPA7z0.js";import"./index-Cl-8Hzo4.js";import"./scrollTo-D49dA-9c.js";import"./operationUnit-vCu2co3e.js";import"./index-C69VKHba.js";import"./index-DsixALRt.js";import"./dayjs-jnKD3YGS.js";import"./index-aCD42OrZ.js";import"./quarterOfYear-BU2sPnff.js";import"./index-J2mOtM3w.js";import"./dayjs-ALi1pEeb.js";import"./clickOutside-DHfwTU6R.js";import"./onMountedOrActivated-DhSdLlqP.js";import"./throttle-De_jAmBh.js";import"./uuid-CODpppBC.js";import"./sortable.esm-DJNoJSdJ.js";import"./RedoOutlined-Cq2g4Slp.js";import"./index-CeNCCWzL.js";import"./TableAction.vue_vue_type_style_index_0_lang-BIWZ0bGo.js";import"./index-fAAIzD3j.js";import"./TableImg.vue_vue_type_style_index_0_lang-65ZOQtFn.js";import"./useListPage-CK9oQ-1O.js";import"./useTable-DbHE4FHE.js";import"./useMethods-D3efiSSd.js";import"./useApprovalSelection-D4wlWO_T.js";import"./ImBizRecordMessageContent-DJr_9NNp.js";import"./approvalHandle.api-gBzdKBq5.js";import"./ImApprovalDetailModal-Dnx-eyNG.js";import"./index-DWDasoBX.js";import"./index-3-sNW-01.js";import"./ImCreateGroupModal-Co9b_zTb.js";import"./ImGroupSettingDrawer-CYkJsATT.js";import"./index-D9GWo192.js";import"./ArrowLeftOutlined-B3JgaWh-.js";import"./index-DZJwICFr.js";import"./isNumeric-DjvBa-1E.js";import"./ImGroupAddMemberModal-N0YNycEF.js";import"./useDrawer-BDPywy9W.js";var jt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M193 796c0 17.7 14.3 32 32 32h574c17.7 0 32-14.3 32-32V563c0-176.2-142.8-319-319-319S193 386.8 193 563v233zm72-233c0-136.4 110.6-247 247-247s247 110.6 247 247v193H404V585c0-5.5-4.5-10-10-10h-44c-5.5 0-10 4.5-10 10v171h-75V563zm-48.1-252.5l39.6-39.6c3.1-3.1 3.1-8.2 0-11.3l-67.9-67.9a8.03 8.03 0 00-11.3 0l-39.6 39.6a8.03 8.03 0 000 11.3l67.9 67.9c3.1 3.1 8.1 3.1 11.3 0zm669.6-79.2l-39.6-39.6a8.03 8.03 0 00-11.3 0l-67.9 67.9a8.03 8.03 0 000 11.3l39.6 39.6c3.1 3.1 8.2 3.1 11.3 0l67.9-67.9c3.1-3.2 3.1-8.2 0-11.3zM832 892H192c-17.7 0-32 14.3-32 32v24c0 4.4 3.6 8 8 8h688c4.4 0 8-3.6 8-8v-24c0-17.7-14.3-32-32-32zM484 180h56c4.4 0 8-3.6 8-8V76c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v96c0 4.4 3.6 8 8 8z"}}]},name:"alert",theme:"outlined"};function J(o){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?Object(arguments[e]):{},t=Object.keys(a);typeof Object.getOwnPropertySymbols=="function"&&(t=t.concat(Object.getOwnPropertySymbols(a).filter(function(m){return Object.getOwnPropertyDescriptor(a,m).enumerable}))),t.forEach(function(m){Dt(o,m,a[m])})}return o}function Dt(o,e,a){return e in o?Object.defineProperty(o,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):o[e]=a,o}var F=function(e,a){var t=J({},e,a.attrs);return s(w,J({},t,{icon:jt}),null)};F.displayName="AlertOutlined";F.inheritAttrs=!1;var Vt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 392c8.8 0 16-7.2 16-16V192c0-8.8-7.2-16-16-16H744c-8.8 0-16 7.2-16 16v56H296v-56c0-8.8-7.2-16-16-16H96c-8.8 0-16 7.2-16 16v184c0 8.8 7.2 16 16 16h56v240H96c-8.8 0-16 7.2-16 16v184c0 8.8 7.2 16 16 16h184c8.8 0 16-7.2 16-16v-56h432v56c0 8.8 7.2 16 16 16h184c8.8 0 16-7.2 16-16V648c0-8.8-7.2-16-16-16h-56V392h56zM792 240h88v88h-88v-88zm-648 88v-88h88v88h-88zm88 456h-88v-88h88v88zm648-88v88h-88v-88h88zm-80-64h-56c-8.8 0-16 7.2-16 16v56H296v-56c0-8.8-7.2-16-16-16h-56V392h56c8.8 0 16-7.2 16-16v-56h432v56c0 8.8 7.2 16 16 16h56v240z"}}]},name:"gateway",theme:"outlined"};function q(o){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?Object(arguments[e]):{},t=Object.keys(a);typeof Object.getOwnPropertySymbols=="function"&&(t=t.concat(Object.getOwnPropertySymbols(a).filter(function(m){return Object.getOwnPropertyDescriptor(a,m).enumerable}))),t.forEach(function(m){Lt(o,m,a[m])})}return o}function Lt(o,e,a){return e in o?Object.defineProperty(o,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):o[e]=a,o}var B=function(e,a){var t=q({},e,a.attrs);return s(w,q({},t,{icon:Vt}),null)};B.displayName="GatewayOutlined";B.inheritAttrs=!1;var Ft={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656zM304.8 524h50.7c3.7 0 6.8-3 6.8-6.8v-78.9c0-19.7 15.9-35.6 35.5-35.6h205.7v53.4c0 5.7 6.5 8.8 10.9 5.3l109.1-85.7c3.5-2.7 3.5-8 0-10.7l-109.1-85.7c-4.4-3.5-10.9-.3-10.9 5.3V338H397.7c-55.1 0-99.7 44.8-99.7 100.1V517c0 4 3 7 6.8 7zm-4.2 134.9l109.1 85.7c4.4 3.5 10.9.3 10.9-5.3v-53.4h205.7c55.1 0 99.7-44.8 99.7-100.1v-78.9c0-3.7-3-6.8-6.8-6.8h-50.7c-3.7 0-6.8 3-6.8 6.8v78.9c0 19.7-15.9 35.6-35.5 35.6H420.6V568c0-5.7-6.5-8.8-10.9-5.3l-109.1 85.7c-3.5 2.5-3.5 7.8 0 10.5z"}}]},name:"interaction",theme:"outlined"};function Q(o){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?Object(arguments[e]):{},t=Object.keys(a);typeof Object.getOwnPropertySymbols=="function"&&(t=t.concat(Object.getOwnPropertySymbols(a).filter(function(m){return Object.getOwnPropertyDescriptor(a,m).enumerable}))),t.forEach(function(m){Bt(o,m,a[m])})}return o}function Bt(o,e,a){return e in o?Object.defineProperty(o,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):o[e]=a,o}var R=function(e,a){var t=Q({},e,a.attrs);return s(w,Q({},t,{icon:Ft}),null)};R.displayName="InteractionOutlined";R.inheritAttrs=!1;var Rt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0068.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z"}}]},name:"mail",theme:"outlined"};function W(o){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?Object(arguments[e]):{},t=Object.keys(a);typeof Object.getOwnPropertySymbols=="function"&&(t=t.concat(Object.getOwnPropertySymbols(a).filter(function(m){return Object.getOwnPropertyDescriptor(a,m).enumerable}))),t.forEach(function(m){Et(o,m,a[m])})}return o}function Et(o,e,a){return e in o?Object.defineProperty(o,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):o[e]=a,o}var E=function(e,a){var t=W({},e,a.attrs);return s(w,W({},t,{icon:Rt}),null)};E.displayName="MailOutlined";E.inheritAttrs=!1;const Nt={name:"SysMessageList",components:{FilterOutlined:Ct,CloseOutlined:ut,BellFilled:Tt,ExclamationOutlined:Mt,MailOutlined:E,InteractionOutlined:R,AlertOutlined:F,GatewayOutlined:B,ImChatModal:yt},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(o,{emit:e}){const{messageList:a,loadEndStatus:t,loadingMoreStatus:m,onLoadMore:T,noRead:O,getMsgCategory:v,getHrefText:f,searchParams:c,reset:g,loadData:C,reloadFresh:z,updateStarMessage:I}=st(N),k=Y(0),[A,{openModal:S}]=St();function H(r){return r?gt(r):""}function P(r){return(((r==null?void 0:r.titile)||"").split("")[0]||"?").slice(0,1)}function j(r,u=!1){let{fromUser:x,rangeDateKey:rt,rangeDate:lt,noticeType:it}=r;c.fromUser=x||"",c.rangeDateKey=rt||"",c.rangeDate=lt||[],c.noticeType=it||"",o.star===!0?c.starFlag="1":c.starFlag="",u?z(!0):(g(),C())}function n(r){if(I(r),r.starFlag=="1"&&o.cancelStarAfterDel){const u=a.value.findIndex(x=>x.id===x.id);if(u!==-1){a.value.splice(u,1);return}}r.starFlag=="1"?r.starFlag="0":r.starFlag="1"}const{goPage:D,currentModal:X,modalRegCache:Z,bindParams:K,isFormComment:$}=ct(e,o),tt=pt(),{getHtml:et}=ft(tt);function at(r){return G(this,null,function*(){if(mt(r)){r.imConvType==="group"?(yield U({conversationId:r.imConversationId}))==="modal"&&S(!0,{conversationId:r.imConversationId}):(yield U({targetUserId:r.imTargetUserId,pageContext:null}))==="modal"&&S(!0,{targetUserId:r.imTargetUserId,pageContext:null}),e("close-modal");return}if(r.readFlag="1",D(r),e("close",r.id),r.busType==="email")e("close-modal");else if(["bpm","bpm_task","tenant_invite"].includes(r.busType)){if(r.msgAbstract)try{if(JSON.parse(r.msgAbstract).taskDetail)return}catch(u){}e("close-modal")}else["eoa_co_notify","eoa_co_remind","eoa_sup_notify","eoa_sup_remind"].includes(r.busType)&&e("close-modal")})}const V=Y({});function ot(r){return r?_t(r).format("YYYY-MM-DD hh:mm"):""}function nt(){e("clear")}function N(){let r=c.rangeDateKey,u=k.value;u>0&&!o.star&&r&&r==="7day"?V.value={emptyText:kt("span",{style:{color:"rgb(255,154,0)",cursor:"pointer","text-align":"left",display:"block"},onClick:()=>{nt()}},`还剩余未读消息(${u>99?"99+":u})`)}:V.value={locale:{emptyText:"<a-empty />"}}}return Ot(()=>o.messageCount,r=>{k.value=r,a.value.length===0&&t.value&&N()},{immediate:!0}),{messageList:a,loadEndStatus:t,loadingMoreStatus:m,onLoadMore:T,noRead:O,getMsgCategory:v,getHrefText:f,reload:j,clickStar:n,showMessageDetail:at,isFormComment:$,getHtml:et,modalRegCache:Z,currentModal:X,bindParams:K,locale:V,formatData:ot,registerImChatModal:A,getImAvatar:H,getImAvatarText:P}}},Gt={key:0,style:{textAlign:"center",marginTop:"12px",height:"32px",lineHeight:"32px"}},Ut={key:1},Yt={key:0,style:{background:"#f7f7f7",color:"#555",padding:"2px 5px","white-space":"nowrap",overflow:"hidden"}},Jt=["innerHTML"],qt={style:{position:"relative"}},Qt=["innerHTML"],Wt={key:1},Xt=["onClick"];function Zt(o,e,a,t,m,T){const O=_("a-button"),v=Pt,f=_("mail-outlined"),c=Ht,g=wt,C=_("interaction-outlined"),z=_("alert-outlined"),I=_("GatewayOutlined"),k=_("AlertOutlined"),A=_("bell-filled"),S=At,H=It,P=zt,j=_("ImChatModal");return l(),p(y,null,[s(P,{"item-layout":"horizontal","data-source":t.messageList,locale:t.locale},{loadMore:i(()=>[t.messageList&&t.messageList.length>0?(l(),p("div",Gt,[!t.loadEndStatus&&!t.loadingMoreStatus?(l(),d(O,{key:0,onClick:t.onLoadMore},{default:i(()=>[...e[0]||(e[0]=[L("加载更多",-1)])]),_:1},8,["onClick"])):t.loadEndStatus?(l(),p("span",Ut,"没有更多了")):M("",!0)])):M("",!0)]),renderItem:i(({item:n})=>[s(H,{style:xt({background:n!=null&&n.izTop&&n.izTop==1?"#f7f7f7":"auto"})},{actions:i(()=>[h("span",null,b(t.formatData(n.sendTime)),1),n.busType!=="im_chat"?(l(),d(v,{key:0,class:"antd-rate",value:n.starFlag=="1"?1:0,count:1,onClick:D=>t.clickStar(n),style:{cursor:"pointer"},disabled:""},null,8,["value","onClick"])):M("",!0)]),default:i(()=>[s(S,null,{description:i(()=>[t.isFormComment(n)?(l(),p("div",Yt,[h("div",{innerHTML:t.getHtml(n.msgContent)},null,8,Jt)])):M("",!0),h("div",null,b(n.createTime),1)]),title:i(()=>[h("div",qt,[h("span",null,b(t.getMsgCategory(n)),1),n.busType=="bpm"||n.busType=="bpm_cc"||n.busType=="msg_node"||n.busType=="bpm_msg_node"?(l(),p("span",{key:0,class:"bpm-cuiban-content",innerHTML:n.msgContent},null,8,Qt)):(l(),p("span",Wt,b(n.titile),1)),h("a",{onClick:D=>t.showMessageDetail(n),style:{"margin-left":"16px"}},b(t.getHrefText(n)),9,Xt)])]),avatar:i(()=>[n.busType=="email"?(l(),p(y,{key:0},[t.noRead(n)?(l(),d(g,{key:0,dot:"",class:"msg-no-read"},{default:i(()=>[s(c,{style:{background:"#79919d"}},{default:i(()=>[s(f,{style:{"font-size":"16px"},title:"未读消息"})]),_:1})]),_:1})):(l(),d(c,{key:1,style:{background:"#79919d"}},{default:i(()=>[s(f,{style:{"font-size":"16px"}})]),_:1}))],64)):n.busType=="bpm_task"?(l(),p(y,{key:1},[t.noRead(n)?(l(),d(g,{key:0,dot:"",class:"msg-no-read"},{default:i(()=>[s(c,{style:{background:"#79919d"}},{default:i(()=>[s(C,{style:{"font-size":"16px"},title:"未读消息"})]),_:1})]),_:1})):(l(),d(c,{key:1,style:{background:"#79919d"}},{default:i(()=>[s(C,{style:{"font-size":"16px"}})]),_:1}))],64)):n.busType=="bpm"?(l(),p(y,{key:2},[t.noRead(n)?(l(),d(g,{key:0,dot:"",class:"msg-no-read"},{default:i(()=>[s(c,{style:{background:"#79919d"}},{default:i(()=>[s(z,{style:{"font-size":"16px"},title:"未读消息"})]),_:1})]),_:1})):(l(),d(c,{key:1,style:{background:"#79919d"}},{default:i(()=>[s(z,{style:{"font-size":"16px"}})]),_:1}))],64)):["eoa_co_remind","eoa_co_notify"].includes(n.busType)?(l(),p(y,{key:3},[t.noRead(n)?(l(),d(g,{key:0,dot:"",class:"msg-no-read"},{default:i(()=>[s(c,{style:{background:"#79919d"}},{default:i(()=>[s(I,{style:{"font-size":"16px"},title:"未读消息"})]),_:1})]),_:1})):(l(),d(c,{key:1,style:{background:"#79919d"}},{default:i(()=>[s(I,{style:{"font-size":"16px"}})]),_:1}))],64)):["eoa_sup_remind","eoa_sup_notify"].includes(n.busType)?(l(),p(y,{key:4},[t.noRead(n)?(l(),d(g,{key:0,dot:"",class:"msg-no-read"},{default:i(()=>[s(c,{style:{background:"#79919d"}},{default:i(()=>[s(k,{style:{"font-size":"16px"},title:"未读消息"})]),_:1})]),_:1})):(l(),d(c,{key:1,style:{background:"#79919d"}},{default:i(()=>[s(k,{style:{"font-size":"16px"}})]),_:1}))],64)):n.busType=="im_chat"?(l(),p(y,{key:5},[t.noRead(n)?(l(),d(g,{key:0,dot:"",class:"msg-no-read"},{default:i(()=>[s(c,{src:t.getImAvatar(n.imAvatar),style:{background:"#5b8ff9"}},{default:i(()=>[L(b(t.getImAvatarText(n)),1)]),_:2},1032,["src"])]),_:2},1024)):(l(),d(c,{key:1,src:t.getImAvatar(n.imAvatar),style:{background:"#5b8ff9"}},{default:i(()=>[L(b(t.getImAvatarText(n)),1)]),_:2},1032,["src"]))],64)):(l(),p(y,{key:6},[t.noRead(n)?(l(),d(g,{key:0,dot:"",class:"msg-no-read"},{default:i(()=>[s(c,{style:{background:"#79919d"}},{default:i(()=>[s(A,{style:{"font-size":"16px"},title:"未读消息"})]),_:1})]),_:1})):(l(),d(c,{key:1,style:{background:"#79919d"}},{default:i(()=>[s(A,{style:{"font-size":"16px"}})]),_:1}))],64))]),_:2},1024)]),_:2},1032,["style"])]),_:1},8,["data-source","locale"]),s(j,{onRegister:t.registerImChatModal},null,8,["onRegister"]),(l(),d(ht,null,[t.currentModal?(l(),d(vt(t.currentModal),bt({key:0},t.bindParams,{key:t.currentModal,onRegister:t.modalRegCache[t.currentModal].register}),null,16,["onRegister"])):M("",!0)],1024))],64)}const Qa=dt(Nt,[["render",Zt],["__scopeId","data-v-318c3edc"]]);export{Qa as default};