cnhis-design-vue 3.2.14-beta.26 → 3.2.14-beta.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/ai-chat/index.d.ts +1 -0
- package/es/components/ai-chat/src/Index.vue.d.ts +1 -0
- package/es/components/ai-chat/src/components/ChatCard.js +1 -1
- package/es/components/ai-chat/src/components/ChatFooter.vue.d.ts +1 -0
- package/es/components/ai-chat/src/components/ChatFooter.vue2.js +1 -1
- package/es/components/ai-chat/src/components/ChatMain.js +1 -1
- package/es/components/ai-chat/style/index.css +1 -1
- package/es/components/base-search/index.d.ts +8 -3
- package/es/components/base-search/src/index.vue.d.ts +8 -3
- package/es/components/base-search/src/index.vue2.js +1 -1
- package/es/components/branch-notice/index.d.ts +54 -0
- package/es/components/branch-notice/index.js +1 -0
- package/es/components/branch-notice/src/BranchNotice.vue.d.ts +54 -0
- package/es/components/branch-notice/src/BranchNotice.vue.js +1 -0
- package/es/components/branch-notice/src/BranchNotice.vue2.js +1 -0
- package/es/components/branch-notice/src/types.d.ts +12 -0
- package/es/components/branch-notice/src/types.js +1 -0
- package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
- package/es/components/calendar/index.d.ts +4 -4
- package/es/components/calendar/src/Calendar.vue.d.ts +4 -4
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +3 -0
- package/es/components/classification/src/components/table-modal/index.vue2.js +1 -1
- package/es/components/classification/style/index.css +1 -1
- package/es/components/fabric-chart/index.d.ts +6 -4
- package/es/components/fabric-chart/src/FabricChart.vue.d.ts +6 -4
- package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +1 -1
- package/es/components/fabric-chart/src/interface.d.ts +1 -0
- package/es/components/iho-chat/index.d.ts +23 -2
- package/es/components/iho-chat/src/Index.vue.d.ts +23 -2
- package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatSearch.vue.d.ts +40 -19
- package/es/components/iho-chat/src/components/ChatSearch.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ContextMenu.js +1 -1
- package/es/components/iho-chat/src/components/MultipleVideo.vue2.js +1 -1
- package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
- package/es/components/iho-chat/src/components/SiderList.vue.d.ts +3 -0
- package/es/components/iho-chat/src/components/SiderList.vue2.js +1 -1
- package/es/components/iho-chat/src/constants/index.d.ts +1 -2
- package/es/components/iho-chat/src/constants/index.js +1 -1
- package/es/components/iho-chat/src/hooks/useData.js +1 -1
- package/es/components/iho-chat/src/hooks/useSearchUserList.js +1 -1
- package/es/components/iho-chat/src/utils/index.d.ts +1 -0
- package/es/components/iho-chat/src/utils/index.js +1 -1
- package/es/components/iho-chat/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.d.ts +2 -1
- package/es/components/index.js +1 -1
- package/es/components/quick-search/index.d.ts +3 -1
- package/es/components/quick-search/src/index.vue.d.ts +3 -1
- package/es/components/quick-search/style/index.css +1 -1
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/index.vue.d.ts +3 -1
- package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
- package/es/env.d.ts +25 -25
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
@@ -188,6 +188,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
188
188
|
unreadTotal: import("vue").ComputedRef<number>;
|
189
189
|
openSession: (item: AnyObject) => Promise<void>;
|
190
190
|
setUpdateSessionItem: (item: AnyObject) => void;
|
191
|
+
setCurrentSessionItem: (item: AnyObject) => void;
|
191
192
|
currentWidth: import("vue").ComputedRef<number>;
|
192
193
|
sessionList: import("vue").ComputedRef<AnyObject[]>;
|
193
194
|
getLabelNum: (session: AnyObject) => number;
|
@@ -242,6 +243,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
242
243
|
beforeUnmount(el: any): void;
|
243
244
|
};
|
244
245
|
formatTime: typeof import("./utils").formatTime;
|
246
|
+
STATUS: typeof import("./constants").STATUS;
|
245
247
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
246
248
|
ChatHeader: import("vue").DefineComponent<{}, {
|
247
249
|
state: {
|
@@ -1890,13 +1892,32 @@ declare const _default: import("vue").DefineComponent<{
|
|
1890
1892
|
openSession: (item: AnyObject) => Promise<void>;
|
1891
1893
|
userList: import("vue").Ref<AnyObject[]>;
|
1892
1894
|
handleInput: () => void;
|
1895
|
+
currentTabValue: import("vue").Ref<string>;
|
1896
|
+
userItemRender: import("vue").DefineComponent<{
|
1897
|
+
item: {
|
1898
|
+
type: PropType<AnyObject>;
|
1899
|
+
default: () => {};
|
1900
|
+
};
|
1901
|
+
}, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
1902
|
+
item: {
|
1903
|
+
type: PropType<AnyObject>;
|
1904
|
+
default: () => {};
|
1905
|
+
};
|
1906
|
+
}>>, {
|
1907
|
+
item: AnyObject;
|
1908
|
+
}>;
|
1909
|
+
groupList: import("vue").ComputedRef<AnyObject[]>;
|
1893
1910
|
showNoData: import("vue").ComputedRef<boolean>;
|
1894
|
-
|
1911
|
+
showAllNoData: import("vue").ComputedRef<boolean>;
|
1912
|
+
showGroupNoData: import("vue").ComputedRef<boolean>;
|
1913
|
+
addSession: (id: string) => Promise<void>;
|
1895
1914
|
NPopover: any;
|
1896
1915
|
NButton: any;
|
1897
|
-
NAvatar: any;
|
1898
1916
|
NInput: any;
|
1899
1917
|
NIcon: any;
|
1918
|
+
NTabs: any;
|
1919
|
+
NTabPane: any;
|
1920
|
+
NDivider: any;
|
1900
1921
|
SearchOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
1901
1922
|
DefaultPage: import("../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{
|
1902
1923
|
type: {
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,ref as t,computed as n,watch as o,openBlock as s,createElementBlock as i,normalizeClass as r,unref as a,normalizeStyle as l,createVNode as c,withCtx as u,Fragment as m,renderList as d,toDisplayString as p,createCommentVNode as g,createBlock as f,createElementVNode as v,createTextVNode as y,withModifiers as h,nextTick as T}from"vue";import{NImageGroup as M,NButton as w,NAvatar as k,NImage as _,NIcon as C,NSpace as x,NButtonGroup as I,NTooltip as L}from"naive-ui";import{format as j}from"date-fns";import{getHistoryRecordApi as E,readMessageApi as S}from"../api/index.js";import{useData as b}from"../hooks/useData.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import{MESSAGE_TYPE as A}from"../constants/index.js";import{isAudioOrVideoMessage as z,simplifyMessage as D,getAVTime as H,downloadFile as R}from"../utils/index.js";import{first as B,last as N,toString as O}from"lodash-es";import"trtc-sdk-v5";import P from"./PersonProfile.vue.js";import q from"./MessageTemplate.vue.js";import{emojis as J}from"../utils/emoji.js";import W from"./ContextMenu.js";import U from"./ChatAdd.vue.js";import"../../../../shared/utils/index.js";import"@vueuse/core";import"@vue/shared";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import{CallOutline as X,VideocamOutline as F,DocumentSharp as G,ChatbubbleEllipsesOutline as K,EllipsisHorizontal as Y,ArrowDownSharp as $}from"@vicons/ionicons5";import{useScrollLoading as Q}from"../../../../shared/hooks/useScrollLoading.js";const V={key:0,class:"tip-text"},Z={key:1,class:"tip-text"},ee={key:2,class:"message-box"},te={key:0,class:"content-box"},ne={class:"name-box"},oe=["data-time"],se=["onContextmenu"],ie={key:0,class:"reference-content"},re=["innerHTML"],ae=["src"],le=["innerHTML"],ce=["innerHTML"],ue={style:{"margin-left":"8px"}},me={class:"size"};var de=e({__name:"ChatMain",setup(e){const de=t(),{state:pe,setMsgList:ge,relayMessage:fe,setCurrentSessionItem:ve,isGroupChat:ye}=b(),he=t(),Te=t(!1),Me=t({left:0,top:0}),we=t(),ke=t(),_e={page:0,hasMore:!0,lastSendTime:j(new Date,"yyyy-MM-dd HH:mm:ss")},Ce=n((()=>({"--c-tip-top":ye.value?"1px":"-20px","--c-tip-gap":ye.value?"10px":"0px"})));function xe({nodes:e}){var t,n;const{_ctx:o}=null==(t=e.download)?void 0:t.children,s=o?null==(n=null==o?void 0:o.proxy)?void 0:n.previewSrc:"";return[e.prev,e.next,e.rotateCounterclockwise,e.rotateClockwise,e.resizeToOriginalSize,e.zoomOut,e.zoomIn,c(L,null,{trigger:()=>c(C,{style:"cursor: pointer",color:"rgba(255, 255, 255, 0.75",size:24,component:$,onClick:()=>s&&R(s,"img")},null),default:()=>{var e;return(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.102"))||"下载"}}),e.close]}async function Ie(){try{if(!_e.hasMore)return;_e.page++;const e=await E({sessionKey:pe.currentSessionItem.sessionKey,page:_e.page,lastSendTime:_e.lastSendTime});if(!Array.isArray(e)||0===e.length)return _e.hasMore=!1,console.log("接口返回不是一个数组,或者没有更多消息了");const t=B(e).id;_e.lastSendTime=N(e).sendTime,ge(_e.page>1?[...pe.msgList,...e]:e),1===_e.page&&pe.currentSessionItem.unreadNum&&(await S({chatType:pe.currentSessionItem.chatType,messageIdSet:[t],receiver:pe.userInfo.id,sender:pe.currentSessionItem.receiver}),ve({unreadNum:0}))}catch(e){console.log(e)}}async function Le(e,t){we.value=t,async function(e){var t,n,o,s,i,r;Te.value=!0,await T();const{clientX:a,clientY:l}=e,{width:c=0,height:u=0,left:m=0,top:d=0}=(null==(t=de.value)?void 0:t.getBoundingClientRect())||{},p=null!=(s=null==(o=null==(n=he.value)?void 0:n.$el)?void 0:o.getBoundingClientRect().height)?s:220,g=null!=(r=null==(i=de.value)?void 0:i.scrollTop)?r:0,f=5,v={};a<=m+c/2?v.left=a-m+f+"px":v.right=m+c-a-f+"px";l-d<p/2?v.top=g+f+"px":d+u-l<=p/2?v.bottom=Math.abs(g)+f+"px":v.top=g+l-d-p/2+"px";Me.value=v}(e)}function je(e){const{chatMessageType:t,messageTemplate:n}=e.content;return t!==A.TEMPLATE||!!n}function Ee(e){const{chatMessageType:t}=e.content;return e.sender===pe.userInfo.id&&Date.now()-new Date(e.sendTime).getTime()<864e5&&[A.TEXT,A.EMOJI].includes(t)}function Se(e){const{chatMessageType:t,msg:n=""}=e.content;if(t===A.BLEND){const e=O(n).match(/<img[^>]*>/gi);return!e||!e.length}return t&&[A.TEXT,A.EMOJI].includes(t)}function be(e){const{chatMessageType:t,msg:n=""}=e.content,o=O(n).match(/<img[^>]*>/gi);return t===A.BLEND&&o&&o.length}function Ae(e,t){var n,o;const{chatMessageType:s,messageTemplate:i}=e.content;if(s===A.TEMPLATE)return"system"===t?2==(null==(n=null==i?void 0:i.setting)?void 0:n.style.id):2!=(null==(o=null==i?void 0:i.setting)?void 0:o.style.id)}function ze(e){var t,n;const{chatMessageType:o,messageTemplate:s}=e;return o===A.TEMPLATE&&3==(null==(n=null==(t=null==s?void 0:s.setting)?void 0:t.style)?void 0:n.id)}function De(e,t){var n;const o=new Date(e.sendTime).getTime(),s=null==(n=pe.msgList[t+1])?void 0:n.sendTime;if(s){return o-new Date(s).getTime()>3e5}return!0}function He(e){pe.currentReferenceMsg=e,pe.currentReferenceMsg.content.referenceContent=null,Object.assign(pe.currentReferenceMsg,{chatType:pe.currentSessionItem.chatType,receiver:pe.currentSessionItem.receiver,receiverAvatar:pe.currentSessionItem.avatar,receiverName:pe.currentSessionItem.name})}function Re(e,t){var n;"reply"!==e?"relay"===e&&(null==(n=ke.value)||n.click()):He(t)}function Be(e,t){const n=pe.msgList.find((e=>e.id===we.value));fe({checkedIds:e,remark:t,content:n.content})}return Q(de,(()=>{Ie()}),"top",(()=>{Te.value=!1})),o((()=>pe.id),(e=>{e&&(pe.currentReferenceMsg=null,Object.assign(_e,{page:0,hasMore:!0,lastSendTime:j(new Date,"yyyy-MM-dd HH:mm:ss")}),Ie())}),{immediate:!0}),o((()=>pe.isAppendMsg),(e=>{e&&(ge([pe.currentMsg,...pe.msgList]),async function(){var e;null==(e=de.value)||e.scrollTo({top:0,behavior:"auto"})}(),pe.isAppendMsg=!1)}),{immediate:!0}),(e,t)=>{var n;return s(),i("div",{class:r(["chat-main",{"home-bg":!a(pe).id}]),ref_key:"chatMainRef",ref:de,style:l(a(Ce))},[c(a(M),{"show-toolbar-tooltip":"","render-toolbar":xe},{default:u((()=>[(s(!0),i(m,null,d(a(pe).msgList,((e,t)=>{var n,o;return s(),i(m,{key:e.id},[je(e)?(s(),i("div",{key:0,class:r(["message-item",{"message-item--mine":e.sender==a(pe).userInfo.id}])},[De(e,t)?(s(),i("p",V,p(e.__sendTime),1)):g("v-if",!0),Ae(e,"system")||"WITHDRAWN"===e.status?(s(),i(m,{key:1},[Ae(e,"system")?(s(),f(q,{key:0,data:e},null,8,["data"])):g("v-if",!0),"WITHDRAWN"===e.status?(s(),i("p",Z,[v("span",null,p(e.sender==a(pe).userInfo.id?(null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.67"))||"你":e.senderName)+((null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.68"))||"撤回了一条消息"),1),Ee(e)?(s(),f(a(w),{key:0,size:"tiny",style:{color:"var(--c-primary-color)","margin-left":"5px"},text:"",onClick:()=>function(e){pe.currentReEditMsg=e}(e)},{default:u((()=>{var e;return[y((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.69"))||"重新编辑")]})),_:2},1032,["onClick"])):g("v-if",!0)])):g("v-if",!0)],64)):(s(),i("div",ee,[c(P,{"user-id":e.sender,placement:e.sender==a(pe).userInfo.id?"left":"right"},{trigger:u((()=>[c(a(k),{round:"",size:38,src:e.senderAvatar},null,8,["src"])])),_:2},1032,["user-id","placement"]),e.content?(s(),i("div",te,[v("div",ne,[v("span",{class:"name","data-time":e.__time},p(a(ye)?e.senderName:""),9,oe)]),v("div",{class:r(["content",{emoji:e.content.chatMessageType===a(A).EMOJI&&!e.content.referenceContent,template:e.content.chatMessageType===a(A).TEMPLATE,"template--3":ze(e.content),"audio-video":a(z)(e.content),file:e.content.chatMessageType===a(A).FILE}]),onContextmenu:h((t=>Le(t,e.id)),["prevent"])},[Se(e)?(s(),i(m,{key:0},[e.content.referenceContent?(s(),i("div",ie,[v("span",null,p(e.content.referenceContent.senderName)+":",1),v("pre",{innerHTML:a(D)(e.content.referenceContent.content)},null,8,re)])):g("v-if",!0),e.content.chatMessageType===a(A).EMOJI?(s(),i("img",{key:1,class:r([e.content.referenceContent?"emoji--min":"emoji--big"]),src:a(J).findEmoji(e.__content)},null,10,ae)):(s(),i("pre",{key:2,innerHTML:e.__content},null,8,le))],64)):g("v-if",!0),be(e)?(s(),i("pre",{key:1,innerHTML:e.__content},null,8,ce)):g("v-if",!0),Ae(e,"template")?(s(),f(q,{key:2,data:e},null,8,["data"])):g("v-if",!0),e.content.chatMessageType===a(A).IMAGE?(s(),f(a(_),{key:3,width:"240",src:e.__content},null,8,["src"])):g("v-if",!0),a(z)(e.content)?(s(),i(m,{key:4},[c(a(C),{class:r({"is-audio":e.content.chatMessageType===a(A).AUDIO}),component:e.content.chatMessageType===a(A).AUDIO?a(X):a(F)},null,8,["class","component"]),v("span",ue,p(a(H)(e.__content)),1)],64)):g("v-if",!0),e.content.chatMessageType===a(A).FILE?(s(),f(a(x),{key:5,"wrap-item":!1},{default:u((()=>[c(a(C),{class:"icon-file",size:"40",component:a(G)},null,8,["component"]),c(a(x),{"wrap-item":!1,vertical:"",justify:"space-between",style:{"row-gap":"0"}},{default:u((()=>[v("span",null,p(e.__content),1),v("span",me,p(e.__size),1)])),_:2},1024)])),_:2},1024)):g("v-if",!0),c(a(I),{class:"quick-menu"},{default:u((()=>[a(z)(e.content)?g("v-if",!0):(s(),i(m,{key:0},[g(' <n-button quaternary size="tiny">\n\t\t\t\t\t\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<i class="chat--iconfont chat--icon-face" />\n\t\t\t\t\t\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t\t\t\t\t</n-button> '),c(a(w),{quaternary:"",size:"tiny",onClick:()=>He(e)},{icon:u((()=>[c(a(C),{size:"17",component:a(K)},null,8,["component"])])),_:2},1032,["onClick"])],64)),c(a(w),{quaternary:"",size:"tiny",onClick:t=>Le(t,e.id)},{icon:u((()=>[c(a(C),{size:"14",component:a(Y)},null,8,["component"])])),_:2},1032,["onClick"])])),_:2},1024)],42,se)])):g("v-if",!0)]))],2)):g("v-if",!0)],64)})),128))])),_:1}),c(a(W),{ref_key:"contextmenuRef",ref:he,show:Te.value,"onUpdate:show":t[0]||(t[0]=e=>Te.value=e),position:Me.value,id:we.value,onSelect:Re},null,8,["show","position","id"]),c(U,{title:(null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.70"))||"转发消息",mode:"relay",onComfirm:Be},{trigger:u((()=>{var e;return[v("span",{style:{display:"none"},ref_key:"relayTriggerRef",ref:ke},(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.98"))||"转发",512)]})),_:1})],6)}}});export{de as default};
|
1
|
+
import{defineComponent as e,ref as t,computed as n,watch as o,openBlock as s,createElementBlock as i,normalizeClass as r,unref as a,normalizeStyle as l,createVNode as c,withCtx as u,Fragment as m,renderList as d,toDisplayString as p,createCommentVNode as g,createBlock as f,createElementVNode as v,createTextVNode as y,withModifiers as h,nextTick as T}from"vue";import{NImageGroup as M,NButton as w,NAvatar as k,NImage as _,NIcon as C,NSpace as x,NButtonGroup as I,NTooltip as L}from"naive-ui";import{format as j}from"date-fns";import{getHistoryRecordApi as E,readMessageApi as S}from"../api/index.js";import{useData as b}from"../hooks/useData.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import{MESSAGE_TYPE as A}from"../constants/index.js";import{isAudioOrVideoMessage as z,simplifyMessage as D,getAVTime as H,downloadFile as R}from"../utils/index.js";import{first as B,last as N,toString as O}from"lodash-es";import"trtc-sdk-v5";import P from"./PersonProfile.vue.js";import q from"./MessageTemplate.vue.js";import{emojis as J}from"../utils/emoji.js";import W from"./ContextMenu.js";import U from"./ChatAdd.vue.js";import"../../../../shared/utils/index.js";import"@vueuse/core";import"@vue/shared";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import{CallOutline as X,VideocamOutline as F,DocumentSharp as G,ChatbubbleEllipsesOutline as K,EllipsisHorizontal as Y,ArrowDownSharp as $}from"@vicons/ionicons5";import{useScrollLoading as Q}from"../../../../shared/hooks/useScrollLoading.js";const V={key:0,class:"tip-text"},Z={key:1,class:"tip-text"},ee={key:2,class:"message-box"},te={key:0,class:"content-box"},ne={class:"name-box"},oe=["data-time"],se=["onContextmenu"],ie={key:0,class:"reference-content"},re=["innerHTML"],ae=["src"],le=["innerHTML"],ce=["innerHTML"],ue={style:{"margin-left":"8px"}},me={class:"size"};var de=e({__name:"ChatMain",setup(e){const de=t(),{state:pe,setMsgList:ge,relayMessage:fe,setCurrentSessionItem:ve,isGroupChat:ye}=b(),he=t(),Te=t(!1),Me=t({left:0,top:0}),we=t(),ke=t(),_e={page:0,hasMore:!0,lastSendTime:j(new Date,"yyyy-MM-dd HH:mm:ss")},Ce=n((()=>({"--c-tip-top":ye.value?"1px":"-20px","--c-tip-gap":ye.value?"10px":"0px"})));function xe({nodes:e}){var t,n;const{_ctx:o}=null==(t=e.download)?void 0:t.children,s=o?null==(n=null==o?void 0:o.proxy)?void 0:n.previewSrc:"";return[e.prev,e.next,e.rotateCounterclockwise,e.rotateClockwise,e.resizeToOriginalSize,e.zoomOut,e.zoomIn,c(L,null,{trigger:()=>c(C,{style:"cursor: pointer",color:"rgba(255, 255, 255, 0.75",size:24,component:$,onClick:()=>s&&R(s,"img")},null),default:()=>{var e;return(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.102"))||"下载"}}),e.close]}async function Ie(){try{if(!_e.hasMore)return;_e.page++;const e=await E({sessionKey:pe.currentSessionItem.sessionKey,page:_e.page,lastSendTime:_e.lastSendTime});if(!Array.isArray(e)||0===e.length)return _e.hasMore=!1,console.log("接口返回不是一个数组,或者没有更多消息了");const t=B(e).id;_e.lastSendTime=N(e).sendTime,ge(_e.page>1?[...pe.msgList,...e]:e),1===_e.page&&pe.currentSessionItem.unreadNum&&(await S({chatType:pe.currentSessionItem.chatType,messageIdSet:[t],receiver:pe.userInfo.id,sender:pe.currentSessionItem.receiver}),ve({unreadNum:0}))}catch(e){console.log(e)}}async function Le(e,t){we.value=t,async function(e){var t,n,o,s,i,r;Te.value=!0,await T();const{clientX:a,clientY:l}=e,{width:c=0,height:u=0,left:m=0,top:d=0}=(null==(t=de.value)?void 0:t.getBoundingClientRect())||{},p=null!=(s=null==(o=null==(n=he.value)?void 0:n.$el)?void 0:o.getBoundingClientRect().height)?s:220,g=null!=(r=null==(i=de.value)?void 0:i.scrollTop)?r:0,f=5,v={};a<=m+c/2?v.left=a-m+f+"px":v.right=m+c-a-f+"px";l-d<p/2?v.top=g+f+"px":d+u-l<=p/2?v.bottom=Math.abs(g)+f+"px":v.top=g+l-d-p/2+"px";Me.value=v}(e)}function je(e){const{chatMessageType:t,messageTemplate:n}=e.content;return t!==A.TEMPLATE||!!n}function Ee(e){const{chatMessageType:t}=e.content;return e.sender===pe.userInfo.id&&Date.now()-new Date(e.sendTime).getTime()<864e5&&[A.TEXT,A.EMOJI].includes(t)}function Se(e){const{chatMessageType:t,msg:n=""}=e.content;if(t===A.BLEND){const e=O(n).match(/<img[^>]*>/gi);return!e||!e.length}return t&&[A.TEXT,A.EMOJI].includes(t)}function be(e){const{chatMessageType:t,msg:n=""}=e.content,o=O(n).match(/<img[^>]*>/gi);return t===A.BLEND&&o&&o.length}function Ae(e,t){var n,o;const{chatMessageType:s,messageTemplate:i}=e.content;if(s===A.TEMPLATE)return"system"===t?2==(null==(n=null==i?void 0:i.setting)?void 0:n.style.id):2!=(null==(o=null==i?void 0:i.setting)?void 0:o.style.id)}function ze(e){var t,n;const{chatMessageType:o,messageTemplate:s}=e;return o===A.TEMPLATE&&3==(null==(n=null==(t=null==s?void 0:s.setting)?void 0:t.style)?void 0:n.id)}function De(e,t){var n;const o=new Date(e.sendTime).getTime(),s=null==(n=pe.msgList[t+1])?void 0:n.sendTime;if(s){return o-new Date(s).getTime()>3e5}return!0}function He(e){pe.currentReferenceMsg=e,pe.currentReferenceMsg.content.referenceContent=null,Object.assign(pe.currentReferenceMsg,{chatType:pe.currentSessionItem.chatType,receiver:pe.currentSessionItem.receiver,receiverAvatar:pe.currentSessionItem.avatar,receiverName:pe.currentSessionItem.name})}function Re(e,t){var n;"reply"!==e?"relay"===e&&(null==(n=ke.value)||n.click()):He(t)}function Be(e,t){const n=pe.msgList.find((e=>e.id===we.value));fe({checkedIds:e,remark:t,content:n.content})}return Q(de,(()=>{Ie()}),"top",(()=>{Te.value=!1})),o((()=>pe.id),(e=>{e&&(pe.currentReferenceMsg=null,Object.assign(_e,{page:0,hasMore:!0,lastSendTime:j(new Date,"yyyy-MM-dd HH:mm:ss")}),Ie())}),{immediate:!0}),o((()=>pe.isAppendMsg),(e=>{e&&(ge([pe.currentMsg,...pe.msgList]),async function(){var e;null==(e=de.value)||e.scrollTo({top:0,behavior:"auto"})}(),pe.isAppendMsg=!1)}),{immediate:!0}),(e,t)=>{var n;return s(),i("div",{class:r(["chat-main",{"home-bg":!a(pe).id}]),ref_key:"chatMainRef",ref:de,style:l(a(Ce))},[c(a(M),{"show-toolbar-tooltip":"","render-toolbar":xe},{default:u((()=>[(s(!0),i(m,null,d(a(pe).msgList,((e,t)=>{var n,o;return s(),i(m,{key:e.id},[je(e)?(s(),i("div",{key:0,class:r(["message-item",{"message-item--mine":e.sender==a(pe).userInfo.id}])},[De(e,t)?(s(),i("p",V,p(e.__sendTime),1)):g("v-if",!0),Ae(e,"system")||"WITHDRAWN"===e.status?(s(),i(m,{key:1},[Ae(e,"system")?(s(),f(q,{key:0,data:e},null,8,["data"])):g("v-if",!0),"WITHDRAWN"===e.status?(s(),i("p",Z,[v("span",null,p(e.sender==a(pe).userInfo.id?(null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.67"))||"你":e.senderName)+((null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.68"))||"撤回了一条消息"),1),Ee(e)?(s(),f(a(w),{key:0,size:"tiny",style:{color:"var(--c-primary-color)","margin-left":"5px"},text:"",onClick:()=>function(e){pe.currentReEditMsg=e}(e)},{default:u((()=>{var e;return[y((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.69"))||"重新编辑")]})),_:2},1032,["onClick"])):g("v-if",!0)])):g("v-if",!0)],64)):(s(),i("div",ee,[c(P,{"user-id":e.sender,placement:e.sender==a(pe).userInfo.id?"left":"right"},{trigger:u((()=>[c(a(k),{round:"",size:38,src:e.senderAvatar},null,8,["src"])])),_:2},1032,["user-id","placement"]),e.content?(s(),i("div",te,[v("div",ne,[v("span",{class:"name","data-time":e.__time},p(a(ye)?e.senderName:""),9,oe)]),v("div",{class:r(["content",{emoji:e.content.chatMessageType===a(A).EMOJI&&!e.content.referenceContent,template:e.content.chatMessageType===a(A).TEMPLATE,"template--3":ze(e.content),"audio-video":a(z)(e.content),file:e.content.chatMessageType===a(A).FILE}]),onContextmenu:h((t=>Le(t,e.id)),["prevent"])},[Se(e)?(s(),i(m,{key:0},[e.content.referenceContent?(s(),i("div",ie,[v("span",null,p(e.content.referenceContent.senderName)+":",1),v("pre",{innerHTML:a(D)(e.content.referenceContent.content)},null,8,re)])):g("v-if",!0),e.content.chatMessageType===a(A).EMOJI?(s(),i("img",{key:1,class:r([e.content.referenceContent?"emoji--min":"emoji--big"]),src:a(J).findEmoji(e.__content)},null,10,ae)):(s(),i("pre",{key:2,innerHTML:e.__content},null,8,le))],64)):g("v-if",!0),be(e)?(s(),i("pre",{key:1,innerHTML:e.__content},null,8,ce)):g("v-if",!0),Ae(e,"template")?(s(),f(q,{key:2,data:e},null,8,["data"])):g("v-if",!0),e.content.chatMessageType===a(A).IMAGE?(s(),f(a(_),{key:3,width:"240",src:e.__content},null,8,["src"])):g("v-if",!0),a(z)(e.content)?(s(),i(m,{key:4},[c(a(C),{class:r({"is-audio":e.content.chatMessageType===a(A).AUDIO}),component:e.content.chatMessageType===a(A).AUDIO?a(X):a(F)},null,8,["class","component"]),v("span",ue,p(a(H)(e.__content)),1)],64)):g("v-if",!0),e.content.chatMessageType===a(A).FILE?(s(),f(a(x),{key:5,"wrap-item":!1},{default:u((()=>[c(a(C),{class:"icon-file",size:"40",component:a(G)},null,8,["component"]),c(a(x),{"wrap-item":!1,vertical:"",justify:"space-between",style:{"row-gap":"0"}},{default:u((()=>[v("span",null,p(e.__content),1),v("span",me,p(e.__size),1)])),_:2},1024)])),_:2},1024)):g("v-if",!0),c(a(I),{class:"quick-menu"},{default:u((()=>[a(z)(e.content)?g("v-if",!0):(s(),i(m,{key:0},[g(' <n-button quaternary size="tiny">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<template #icon>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<i class="chat--iconfont chat--icon-face" />\r\n\t\t\t\t\t\t\t\t\t\t\t\t</template>\r\n\t\t\t\t\t\t\t\t\t\t\t</n-button> '),c(a(w),{quaternary:"",size:"tiny",onClick:()=>He(e)},{icon:u((()=>[c(a(C),{size:"17",component:a(K)},null,8,["component"])])),_:2},1032,["onClick"])],64)),c(a(w),{quaternary:"",size:"tiny",onClick:t=>Le(t,e.id)},{icon:u((()=>[c(a(C),{size:"14",component:a(Y)},null,8,["component"])])),_:2},1032,["onClick"])])),_:2},1024)],42,se)])):g("v-if",!0)]))],2)):g("v-if",!0)],64)})),128))])),_:1}),c(a(W),{ref_key:"contextmenuRef",ref:he,show:Te.value,"onUpdate:show":t[0]||(t[0]=e=>Te.value=e),position:Me.value,id:we.value,onSelect:Re},null,8,["show","position","id"]),c(U,{title:(null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.70"))||"转发消息",mode:"relay",onComfirm:Be},{trigger:u((()=>{var e;return[v("span",{style:{display:"none"},ref_key:"relayTriggerRef",ref:ke},(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.98"))||"转发",512)]})),_:1})],6)}}});export{de as default};
|
@@ -1,38 +1,59 @@
|
|
1
|
+
import { PropType } from 'vue';
|
2
|
+
import { AnyObject } from '../../../../shared/types';
|
1
3
|
declare const _default: import("vue").DefineComponent<{}, {
|
2
4
|
listRef: import("vue").Ref<any>;
|
3
5
|
inputRef: import("vue").Ref<any>;
|
4
6
|
showSearch: import("vue").Ref<boolean>;
|
5
7
|
keyword: import("vue").Ref<string>;
|
6
|
-
cssVars: import("vue").ComputedRef<
|
8
|
+
cssVars: import("vue").ComputedRef<AnyObject>;
|
7
9
|
state: {
|
8
10
|
orgId: string | number;
|
9
|
-
currentSessionItem:
|
11
|
+
currentSessionItem: AnyObject;
|
10
12
|
id: string;
|
11
|
-
userInfo:
|
12
|
-
msgList:
|
13
|
-
currentMsg:
|
13
|
+
userInfo: AnyObject;
|
14
|
+
msgList: AnyObject[];
|
15
|
+
currentMsg: AnyObject;
|
14
16
|
isAppendMsg: boolean;
|
15
|
-
sessionList:
|
17
|
+
sessionList: AnyObject[];
|
16
18
|
isChangeSession: boolean;
|
17
|
-
updateSessionItem:
|
19
|
+
updateSessionItem: AnyObject;
|
18
20
|
isUpdateSession: boolean;
|
19
|
-
currentReferenceMsg:
|
20
|
-
currentReEditMsg:
|
21
|
+
currentReferenceMsg: AnyObject | null;
|
22
|
+
currentReEditMsg: AnyObject | null;
|
21
23
|
showVideo: boolean;
|
22
|
-
currentAVMsg:
|
23
|
-
currentGroupUser:
|
24
|
+
currentAVMsg: AnyObject;
|
25
|
+
currentGroupUser: AnyObject[];
|
24
26
|
showMultipleVideo: boolean;
|
25
27
|
};
|
26
|
-
openSession: (item:
|
27
|
-
userList: import("vue").Ref<
|
28
|
+
openSession: (item: AnyObject) => Promise<void>;
|
29
|
+
userList: import("vue").Ref<AnyObject[]>;
|
28
30
|
handleInput: () => void;
|
31
|
+
currentTabValue: import("vue").Ref<string>;
|
32
|
+
userItemRender: import("vue").DefineComponent<{
|
33
|
+
item: {
|
34
|
+
type: PropType<AnyObject>;
|
35
|
+
default: () => {};
|
36
|
+
};
|
37
|
+
}, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
38
|
+
item: {
|
39
|
+
type: PropType<AnyObject>;
|
40
|
+
default: () => {};
|
41
|
+
};
|
42
|
+
}>>, {
|
43
|
+
item: AnyObject;
|
44
|
+
}>;
|
45
|
+
groupList: import("vue").ComputedRef<AnyObject[]>;
|
29
46
|
showNoData: import("vue").ComputedRef<boolean>;
|
30
|
-
|
47
|
+
showAllNoData: import("vue").ComputedRef<boolean>;
|
48
|
+
showGroupNoData: import("vue").ComputedRef<boolean>;
|
49
|
+
addSession: (id: string) => Promise<void>;
|
31
50
|
NPopover: any;
|
32
51
|
NButton: any;
|
33
|
-
NAvatar: any;
|
34
52
|
NInput: any;
|
35
53
|
NIcon: any;
|
54
|
+
NTabs: any;
|
55
|
+
NTabPane: any;
|
56
|
+
NDivider: any;
|
36
57
|
SearchOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
37
58
|
DefaultPage: import("../../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{
|
38
59
|
type: {
|
@@ -40,7 +61,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
40
61
|
default: string;
|
41
62
|
};
|
42
63
|
config: {
|
43
|
-
type:
|
64
|
+
type: PropType<AnyObject>;
|
44
65
|
default: () => {
|
45
66
|
title: string;
|
46
67
|
content: string;
|
@@ -53,7 +74,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
53
74
|
default: string;
|
54
75
|
};
|
55
76
|
config: {
|
56
|
-
type:
|
77
|
+
type: PropType<AnyObject>;
|
57
78
|
default: () => {
|
58
79
|
title: string;
|
59
80
|
content: string;
|
@@ -77,7 +98,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
77
98
|
default: string;
|
78
99
|
};
|
79
100
|
config: {
|
80
|
-
type:
|
101
|
+
type: PropType<AnyObject>;
|
81
102
|
default: () => {
|
82
103
|
title: string;
|
83
104
|
content: string;
|
@@ -87,7 +108,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
87
108
|
onReloadPage?: ((...args: any[]) => any) | undefined;
|
88
109
|
}, {
|
89
110
|
type: string;
|
90
|
-
config:
|
111
|
+
config: AnyObject;
|
91
112
|
}>>;
|
92
113
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
93
114
|
export default _default;
|
@@ -1 +1 @@
|
|
1
|
-
import{
|
1
|
+
import{createElementVNode as e,defineComponent as l,ref as t,computed as n,watch as a,nextTick as i,openBlock as o,createBlock as s,unref as r,normalizeStyle as u,withCtx as d,createVNode as c,createTextVNode as v,createElementBlock as p,Fragment as f,renderList as g,resolveDynamicComponent as w,normalizeClass as m,createCommentVNode as y,withDirectives as h,vShow as k}from"vue";import{NPopover as L,NButton as C,NIcon as _,NInput as B,NTabs as j,NTabPane as x,NDivider as b,NAvatar as U}from"naive-ui";import{SearchOutline as R}from"@vicons/ionicons5";import{useData as z}from"../hooks/useData.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import{openSessionApi as I}from"../api/index.js";import{isGroup as S}from"../utils/index.js";import{trim as D}from"lodash-es";import"trtc-sdk-v5";import{useSearchUserList as N}from"../hooks/useSearchUserList.js";import E from"../../../default-page/index.js";var G,O;const T=e("div",{class:"title"},(null==(G=window.getLanguageByCode)?void 0:G.call(window,"10010.1.510"))||"联系人",-1),V=e("div",{class:"title"},(null==(O=window.getLanguageByCode)?void 0:O.call(window,"10010.1.575"))||"我的群组",-1),$={class:"user-list-wrapper"};var q=l({__name:"ChatSearch",setup(G){const O=t(),q=t(),A=t(!1),F=t(""),{cssVars:H,state:J,openSession:K}=z(),{userList:M,handleInput:P}=N({wrapperRef:O,keywordRef:F}),Q=t("all"),W=l({name:"UserItemRender",props:{item:{type:Object,default:()=>({})}},render(){return c("div",{class:"user-item",onClick:()=>async function(e){A.value=!1;const l=J.sessionList.find((l=>e&&[l.receiver,l.id].includes(e)));let t=l;if(!l){t=await I({chatType:"SINGLE",receiver:e,sender:J.userInfo.id})}K(t)}(this.item.id)},[c(U,{round:!0,size:32,src:this.item.avatar},null),c("div",{class:"user-info"},[c("span",null,[this.item.name]),c("span",null,[this.item.deptName]),c("span",null,[this.item.post])])])}}),X=n((()=>(F.value||"").replace(/^\s+|\s+$/g,"")?J.sessionList.filter((e=>S(e)&&(null==e?void 0:e.name.includes(F.value)))):[])),Y=n((()=>!M.value.length&&!!D(F.value||""))),Z=n((()=>!M.value.length&&!X.value.length&&!!D(F.value||""))),ee=n((()=>!X.value.length&&!!D(F.value||"")));return a((()=>A.value),(async e=>{var l;e&&(await i(),null==(l=q.value)||l.focus())})),(l,t)=>(o(),s(r(L),{raw:"","content-class":"search-content",class:"search-wrapper",style:u(r(H)),show:A.value,"onUpdate:show":t[4]||(t[4]=e=>A.value=e),placement:"top",trigger:"click","display-directive":"show","show-arrow":!1,delay:0,overlap:""},{trigger:d((()=>[c(r(C),{color:"#ffffff4D",class:"search-trigger-btn"},{icon:d((()=>[c(r(_),{component:r(R),color:"#ffffff80"},null,8,["component"])])),default:d((()=>{var e;return[v((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.80"))||"搜索联系人")]})),_:1})])),default:d((()=>[c(r(B),{ref_key:"inputRef",ref:q,size:"small",clearable:"",autofocus:"",value:F.value,"onUpdate:value":[t[0]||(t[0]=e=>F.value=e),r(P)]},{prefix:d((()=>[c(r(_),{color:"#ffffff80",component:r(R)},null,8,["component"])])),_:1},8,["value","onUpdate:value"]),c(r(j),{type:"line",animated:"",value:Q.value,"onUpdate:value":t[3]||(t[3]=e=>Q.value=e)},{default:d((()=>{var l,n,a;return[c(r(x),{name:"all",tab:(null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.571"))||"综合","display-directive":"show",style:{padding:"0 10px 10px"}},{default:d((()=>{var e;return[r(M).length>0?(o(),p(f,{key:0},[T,(o(!0),p(f,null,g(r(M),((e,l)=>(o(),p(f,{key:e.id},[l<3?(o(),s(w(r(W)),{key:0,item:e,class:m({last:r(M).length<4?l===r(M).length-1:2===l})},null,8,["item","class"])):y("v-if",!0)],64)))),128)),r(M).length>3?(o(),s(r(C),{key:0,text:"",type:"primary",onClick:t[1]||(t[1]=()=>Q.value="user")},{icon:d((()=>[c(r(_),{component:r(R),size:"16"},null,8,["component"])])),default:d((()=>{var e;return[v((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.573"))||"查看更多联系人")]})),_:1})):y("v-if",!0)],64)):y("v-if",!0),r(M).length&&r(X).length?(o(),s(r(b),{key:1})):y("v-if",!0),r(X).length>0?(o(),p(f,{key:2},[V,(o(!0),p(f,null,g(r(X),((e,l)=>(o(),p(f,{key:e.id},[l<3?(o(),s(w(r(W)),{key:0,item:e,class:m({last:r(X).length<4?l===r(X).length-1:2===l})},null,8,["item","class"])):y("v-if",!0)],64)))),128)),r(X).length>3?(o(),s(r(C),{key:0,text:"",type:"primary",onClick:t[2]||(t[2]=()=>Q.value="group")},{icon:d((()=>[c(r(_),{component:r(R),size:"16"},null,8,["component"])])),default:d((()=>{var e;return[v((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.574"))||"查看更多群组")]})),_:1})):y("v-if",!0)],64)):y("v-if",!0),h(c(r(E),{config:{title:" ",content:(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.81"))||"找不到相关的结果"},type:"5"},null,512),[[k,r(Z)]])]})),_:1}),c(r(x),{name:"user",tab:(null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.510"))||"联系人","display-directive":"show"},{default:d((()=>{var l;return[e("div",{class:"user-list-wrapper",ref_key:"listRef",ref:O},[(o(!0),p(f,null,g(r(M),(e=>(o(),s(w(r(W)),{key:e.id,item:e},null,8,["item"])))),128)),h(c(r(E),{config:{title:" ",content:(null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.81"))||"找不到相关的结果"},type:"5"},null,512),[[k,r(Y)]])],512)]})),_:1}),c(r(x),{name:"group",tab:(null==(a=window.getLanguageByCode)?void 0:a.call(window,"10010.1.572"))||"群组","display-directive":"show"},{default:d((()=>{var l;return[e("div",$,[(o(!0),p(f,null,g(r(X),(e=>(o(),s(w(r(W)),{key:e.id,item:e},null,8,["item"])))),128)),h(c(r(E),{config:{title:" ",content:(null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.81"))||"找不到相关的结果"},type:"5"},null,512),[[k,r(ee)]])])]})),_:1})]})),_:1},8,["value"])])),_:1},8,["style","show"]))}});export{q as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,ref as t,computed as o,withDirectives as i,createVNode as s,vShow as n,isVNode as a}from"vue";import{NButtonGroup as l,NButton as r,NIcon as d}from"naive-ui";import{CopyOutline as c,OpenOutline as u,ChatbubbleEllipsesOutline as p,ReturnDownBack as m,DownloadOutline as w}from"@vicons/ionicons5";import{onClickOutside as g}from"@vueuse/core";import{useData as y}from"../hooks/useData.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import{MESSAGE_TYPE as
|
1
|
+
import{defineComponent as e,ref as t,computed as o,withDirectives as i,createVNode as s,vShow as n,isVNode as a}from"vue";import{NButtonGroup as l,NButton as r,NIcon as d}from"naive-ui";import{CopyOutline as c,OpenOutline as u,ChatbubbleEllipsesOutline as p,ReturnDownBack as m,DownloadOutline as w}from"@vicons/ionicons5";import{onClickOutside as g}from"@vueuse/core";import{useData as y}from"../hooks/useData.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import{STATUS as f,MESSAGE_TYPE as v}from"../constants/index.js";import{recallMessageApi as h}from"../api/index.js";import{isAudioOrVideoMessage as T,$message as b,downloadFile as I}from"../utils/index.js";import"lodash-es";import"trtc-sdk-v5";import{emojis as E}from"../utils/emoji.js";import{format as j}from"date-fns";var k=e({name:"PopupMenu",inheritAttrs:!1,props:{type:{type:String,default:"message"},show:{type:Boolean,default:!1},position:{type:Object},id:{type:String}},emits:["update:show","select"],setup(e,{attrs:k,slots:M,emit:L}){var D,x,S,A,B;const{state:C,setCurrentSessionItem:O}=y(),W=[{icon:c,label:(null==(D=window.getLanguageByCode)?void 0:D.call(window,"10010.1.97"))||"复制",key:"copy"},{icon:u,label:(null==(x=window.getLanguageByCode)?void 0:x.call(window,"10010.1.98"))||"转发",key:"relay"},{icon:p,label:(null==(S=window.getLanguageByCode)?void 0:S.call(window,"10010.1.99"))||"回复",key:"reply"},{icon:m,label:(null==(A=window.getLanguageByCode)?void 0:A.call(window,"10010.1.101"))||"撤回",key:"withdraw"},{icon:w,label:(null==(B=window.getLanguageByCode)?void 0:B.call(window,"10010.1.102"))||"下载",key:"download"}],$=[{label:"置顶会话",key:"topping"},{label:"移除会话",key:"remove"}],H=t(null),J=o((()=>("message"===e.type?C.msgList:C.sessionList).find((({id:t})=>t===e.id)))),N=o((()=>{var t;if(!e.id)return[];if(!(null==J?void 0:J.value))return[];if("session"===e.type){const e=[...$];return e[0].label=(null==(t=J.value)?void 0:t.topping)?"取消置顶":"置顶会话",J.value.status===f.ENDED&&e.pop(),e}const{content:o={},sendTime:i,sender:s}=J.value,{chatMessageType:n}=o,a=[];return(s!==C.userInfo.id||n===v.TEMPLATE||s===C.userInfo.id&&Date.now()-new Date(i).getTime()>2592e5)&&a.push("withdraw"),[v.TEXT,v.EMOJI,v.BLEND].includes(n)?a.push("download"):T(o)?a.push("copy","relay","reply","download"):n===v.FILE?a.push("copy"):[v.FORWARD,v.TEMPLATE].includes(n)&&a.push("copy","download"),a.length?W.filter((e=>!a.includes(e.key))):W}));return g(H,(e=>{L("update:show",!1)})),()=>{let t;return e.id&&N.value?i(s("div",{class:"contextmenu-wrapper",ref:H,style:e.position},[s(l,{vertical:!0},(o=t=N.value.map((t=>s(r,{key:t.key,onClick:()=>async function(t){L("update:show",!1);const{content:o={},sendTime:i,sender:s}=J.value||{},{chatMessageType:n}=o;switch(t){case"copy":if(!o.msg)return console.log("复制内容为空!");if(!navigator||!("clipboard"in navigator))return console.log("当前浏览器版本不支持复制!");try{if(n===v.TEXT)await navigator.clipboard.writeText(o.msg);else{let e;if([v.EMOJI,v.IMAGE].includes(n)){const t=n===v.EMOJI?E.findEmoji(o.msg):o.msg;e=`<img data-msg=${o.msg} data-type=${n} class=${n===v.EMOJI?"emoji--min":""} src=${t} />`}else e=o.msg;await navigator.clipboard.write([new window.ClipboardItem({"text/html":new Blob([e],{type:"text/html"})})])}}catch(e){console.log("复制失败!")}return;case"download":{let{fileUrl:e,msg:t}=o;return n===v.IMAGE&&(e=t,t=t.match(/\/([^\/?#]+)$/)[1]),void I(e,t)}case"withdraw":try{const t=C.msgList.findIndex((({id:t})=>t===e.id)),o=0===t;if(await h({chatType:C.currentSessionItem.chatType,messageIdSet:[e.id],receiver:C.currentSessionItem.receiver,sender:C.userInfo.id,isLastMessage:o}),C.msgList[t].status="WITHDRAWN",o){const e=j(new Date,"yyyy-MM-dd HH:mm:ss");O({lastMessageStatus:"WITHDRAWN",lastMessageSendTime:e,sortTime:e,updatedTime:e})}}catch(e){b.error("撤回失败")}return}L("select",t,J.value)}(t.key),quaternary:!0},{default:()=>t.label,icon:()=>t.icon?s(d,{component:t.icon},null):null}))),"function"==typeof o||"[object Object]"===Object.prototype.toString.call(o)&&!a(o)?t:{default:()=>[t]}))]),[[n,e.show]]):null;var o}}});export{k as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{createElementVNode as e,defineComponent as o,ref as t,computed as n,onBeforeUnmount as l,openBlock as i,createElementBlock as a,withDirectives as s,toDisplayString as
|
1
|
+
import{createElementVNode as e,defineComponent as o,ref as t,computed as n,onBeforeUnmount as l,openBlock as i,createElementBlock as a,withDirectives as s,toDisplayString as r,unref as d,vShow as c,createVNode as u,withCtx as m,Fragment as p,renderList as v,createCommentVNode as g,createTextVNode as w,nextTick as f}from"vue";import{NButton as h,NIcon as y}from"naive-ui";import k from"./ChatAdd.vue.js";import{Close as I,Mic as b,MicOff as A,Videocam as C,VideocamOff as V,Call as M,PersonAdd as _}from"@vicons/ionicons5";import{getUserDetailApi as L}from"../api/index.js";import"@vueuse/core";import{$message as x}from"../utils/index.js";import{xorBy as R}from"lodash-es";import{CHAT_TYPE as E,SUBSCRIBE_MESSAGE_TYPE as T}from"../constants/index.js";import"../../../../shared/utils/index.js";import"date-fns";import"@vue/shared";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import"../../../../shared/hooks/useScrollLoading.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import{useVideo as B}from"../hooks/useVideo.js";import j from"trtc-sdk-v5";var S,$,H,U,z,N;const D={class:"video-wrapper video-wrapper--multiple"},O={class:"video-header"},P={key:0,class:"video-main"},Y={class:"video-main__left"},q=["data-name"],G={class:"video-bottom"},F={class:"btn-group"},J={class:"btn"},K=e("span",{class:"text"},(null==(S=window.getLanguageByCode)?void 0:S.call(window,"10010.1.104"))||"静音",-1),Q={class:"btn"},W=e("span",{class:"text"},(null==($=window.getLanguageByCode)?void 0:$.call(window,"10010.1.105"))||"摄像头",-1),X=e("span",{class:"text"},(null==(H=window.getLanguageByCode)?void 0:H.call(window,"10010.1.106"))||"结束会诊",-1),Z={class:"btn"},ee=e("span",{class:"text"},(null==(U=window.getLanguageByCode)?void 0:U.call(window,"10010.1.107"))||"添加参会人",-1),oe={class:"video-main__right"},te=["id","data-name"],ne={class:"user"},le={class:"name"},ie={key:0,class:"tip"},ae={key:0,class:"calling-box"},se={key:1,class:"opt-btn"},re={class:"btn"},de=e("span",null,(null==(z=window.getLanguageByCode)?void 0:z.call(window,"10010.1.113"))||"拒接",-1),ce={class:"btn"},ue=e("span",null,(null==(N=window.getLanguageByCode)?void 0:N.call(window,"10010.1.126"))||"接听",-1);var me=o({__name:"MultipleVideo",setup(o){const S=t(),$=t([]),{state:H,sendMessage:U,trtc:z,voiceOpen:N,isAudio:me,isCall:pe,startTimer:ve,resetTimer:ge,toggleAudio:we,messageTypeText:fe,timing:he,toggleVideo:ye,videocamOpen:ke,installEventHandlers:Ie,uninstallEventHandlers:be}=B(),Ae=t(!1),Ce=n((()=>pe.value?H.userInfo.name:H.currentAVMsg.sendName)),Ve=n((()=>{if(!Ae.value)return"";const e=pe.value?`(${$.value.length+1}/${H.currentAVMsg.checkedIds.length+1})`:"";return`${Ce.value}发起的${fe.value}会诊${e} ${he.value}`}));function Me(e){console.log("checkedIds :>> ",e),H.currentAVMsg.checkedIds.push(...e),_e()}function _e(){var e;(null==(e=H.currentAVMsg.checkedIds)?void 0:e.length)&&H.currentAVMsg.checkedIds.forEach((e=>{U({chatType:E.SINGLE,content:{msg:H.currentAVMsg.chatMessageType+","+H.currentAVMsg.strRoomId,chatMessageType:T.AV_STATUS},receiver:e})})),Ae.value||Le()}async function Le(){const e=await j.isSupported();if(!e.result||!e.detail.isH264EncodeSupported||!e.detail.isH264DecodeSupported)return console.log("checkResult :>> ",e),void(H.showMultipleVideo=!1);try{if(await z.enterRoom({strRoomId:H.currentAVMsg.strRoomId,sdkAppId:parseInt(H.userInfo.sdkAppID),userId:H.userInfo.id,userSig:H.userInfo.userSig}),Ae.value=!0,ve(),Ie({handleError:Se,handleRemoteUserEnter:Te,handleRemoteAudioAvailable:Ee,handleRemoteUserExit:je,handleRemoteVideoAvailable:Re}),await z.startLocalAudio(),me.value)return;await z.startLocalVideo({view:S.value})}catch(e){console.log("error :>> ",e),x.error(e),H.showMultipleVideo=!1}}async function xe(){try{if(H.showMultipleVideo=!1,be({handleError:Se,handleRemoteUserEnter:Te,handleRemoteAudioAvailable:Ee,handleRemoteUserExit:je,handleRemoteVideoAvailable:Re}),await z.exitRoom(),await z.stopLocalAudio(),me.value)return;await z.stopLocalVideo()}catch(e){console.log("error :>> ",e)}}async function Re(e){const{userId:o,streamType:t}=e;try{t===j.TYPE.STREAM_TYPE_MAIN&&(await f(),await z.startRemoteVideo({userId:o,streamType:t,view:o}))}catch(e){console.log("error :>> ",e)}}async function Ee(e){var o;const{userId:t}=e;if(t&&!(null==(o=$.value.map((e=>e.id)))?void 0:o.includes(t))){const e=await Be(t);$.value.push({id:t,name:e})}}async function Te(e){const{userId:o}=e,t=await Be(o);$.value.push({id:o,name:t}),ve()}async function Be(e){const o=await L({userId:e});return(null==o?void 0:o.name)||""}function je(e){console.log("event :>> 退房",e);const{userId:o}=e;$.value=R($.value,[{id:o,name:""}],"id")}function Se(e){console.log("error :>> ",e),H.showMultipleVideo=!1}return l((()=>{xe()})),(o,t)=>{var n,l,f,L,x,R;return i(),a("div",D,[e("div",O,[s(e("span",{class:"title"},r(d(Ve)),513),[[c,Ae.value]]),u(d(h),{quaternary:"",circle:"",color:"#ffffffcc",onClick:xe},{icon:m((()=>[u(d(y),{component:d(I)},null,8,["component"])])),_:1})]),Ae.value?(i(),a("div",P,[e("div",Y,[e("div",{ref_key:"selfVideoRef",ref:S,class:"video-view","data-name":d(H).userInfo.name},null,8,q),e("div",G,[e("div",F,[e("div",J,[u(d(h),{text:"",color:d(N)?"#fff":"#000",onClick:d(we)},{icon:m((()=>[u(d(y),{component:d(N)?d(b):d(A)},null,8,["component"])])),_:1},8,["color","onClick"]),K]),e("div",Q,[u(d(h),{text:"",color:d(ke)?"#fff":"#000",disabled:d(me),onClick:d(ye)},{icon:m((()=>[u(d(y),{component:d(ke)?d(C):d(V)},null,8,["component"])])),_:1},8,["color","disabled","onClick"]),W]),e("div",{class:"btn",onClick:xe},[u(d(h),{circle:"",color:"#f17568",class:"btn--rotate"},{icon:m((()=>[u(d(y),{component:d(M)},null,8,["component"])])),_:1}),X]),u(k,{onComfirm:Me},{trigger:m((()=>[e("div",Z,[u(d(h),{text:"",color:"#fff"},{icon:m((()=>[u(d(y),{component:d(_)},null,8,["component"])])),_:1}),ee])])),_:1})])])]),e("div",oe,[(i(!0),a(p,null,v($.value,(e=>(i(),a("div",{key:e.id,id:e.id,class:"video-view","data-name":e.name},null,8,te)))),128))])])):(i(),a(p,{key:1},[e("div",ne,[e("span",le,r(d(Ce))+((null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.108"))||"发起的")+r(d(fe))+((null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.109"))||"会议"),1),d(pe)?g("v-if",!0):(i(),a("span",ie,((null==(f=window.getLanguageByCode)?void 0:f.call(window,"10010.1.110"))||"邀请你加入")+r(d(fe))+((null==(L=window.getLanguageByCode)?void 0:L.call(window,"10010.1.109"))||"会议"),1))]),d(pe)?(i(),a("div",ae,[u(k,{onComfirm:Me,disabledIds:d(H).currentAVMsg.checkedIds},{trigger:m((()=>[u(d(h),{size:"large",circle:"",color:"#000"},{icon:m((()=>[u(d(y),{component:d(_)},null,8,["component"])])),_:1})])),_:1},8,["disabledIds"]),e("p",null,((null==(x=window.getLanguageByCode)?void 0:x.call(window,"10010.1.111"))||"已邀请共")+r(d(H).currentAVMsg.checkedIds.length)+((null==(R=window.getLanguageByCode)?void 0:R.call(window,"10010.1.40"))||"人"),1),u(d(h),{size:"large",strong:"",round:"",type:"primary",onClick:_e},{default:m((()=>{var e;return[w((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.112"))||"开始会诊")]})),_:1}),g(' <div class="btn-box">\r\n\t\t\t\t\t\t<n-button color="#000" round>\r\n\t\t\t\t\t\t\t<template #icon>\r\n\t\t\t\t\t\t\t\t<n-icon :component="Mic" />\r\n\t\t\t\t\t\t\t</template>\r\n\t\t\t\t\t\t</n-button>\r\n\t\t\t\t\t\t<n-button color="#000" round>\r\n\t\t\t\t\t\t\t<template #icon>\r\n\t\t\t\t\t\t\t\t<n-icon :component="Videocam" />\r\n\t\t\t\t\t\t\t</template>\r\n\t\t\t\t\t\t</n-button>\r\n\t\t\t\t\t</div> ')])):(i(),a("div",se,[e("div",re,[u(d(h),{circle:"",color:"#f17568",class:"btn--rotate",onClick:t[0]||(t[0]=()=>d(H).showMultipleVideo=!1)},{icon:m((()=>[u(d(y),{size:"30",component:d(M)},null,8,["component"])])),_:1}),de]),e("div",ce,[u(d(h),{circle:"",color:"#2ac98b",onClick:Le},{icon:m((()=>[u(d(y),{size:"30",component:d(M)},null,8,["component"])])),_:1}),ue])]))],64))])}}});export{me as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as t,ref as e,reactive as l,computed as n,openBlock as o,createBlock as a,unref as i,withCtx as
|
1
|
+
import{defineComponent as t,ref as e,reactive as l,computed as n,openBlock as o,createBlock as a,unref as i,withCtx as r,renderSlot as s,createElementBlock as d,Fragment as c,withDirectives as u,createElementVNode as p,createVNode as v,createCommentVNode as g,toDisplayString as m,createTextVNode as w,renderList as y,vShow as f}from"vue";import{NPopover as k,NAvatar as h,NButton as b,NIcon as C}from"naive-ui";import{ChatbubbleEllipses as j,EyeOffOutline as L,EyeOutline as B,Close as I}from"@vicons/ionicons5";import{useData as _}from"../hooks/useData.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import{CHAT_TYPE as x}from"../constants/index.js";import{openSessionApi as z,getUserDetailApi as N}from"../api/index.js";import"../utils/index.js";import"lodash-es";import"trtc-sdk-v5";const D={class:"person-profile-main"},S={class:"left"},$={class:"profile"},E={class:"profile__text"},P={class:"right"},q={class:"right__content"},G={class:"label"},O={class:"content"};var T=t({__name:"PersonProfile",props:{userId:{type:String,required:!0},disabled:{type:Boolean,default:!1}},emits:["close"],setup(t,{emit:T}){var U,A,F,H,J,K,M,Q;const R=t,{state:V,openSession:W}=_(),X=e(!1),Y=e(!1),Z=e(!1),tt=l({}),et=[{label:(null==(U=window.getLanguageByCode)?void 0:U.call(window,"10010.1.115"))||"机构",value:"",key:"orgName"},{label:(null==(A=window.getLanguageByCode)?void 0:A.call(window,"10010.1.116"))||"姓名",value:"",key:"name"},{label:(null==(F=window.getLanguageByCode)?void 0:F.call(window,"10010.1.117"))||"归属科室",value:"",key:"deptName"},{label:(null==(H=window.getLanguageByCode)?void 0:H.call(window,"10010.1.118"))||"业务科室",value:"",key:"businessDeptNames"},{label:(null==(J=window.getLanguageByCode)?void 0:J.call(window,"10010.1.119"))||"手机号",value:"",key:"phone"},{label:(null==(K=window.getLanguageByCode)?void 0:K.call(window,"10010.1.120"))||"岗位",value:"",key:"post"},{label:(null==(M=window.getLanguageByCode)?void 0:M.call(window,"10010.1.121"))||"工号",value:"",key:"jobId"},{label:(null==(Q=window.getLanguageByCode)?void 0:Q.call(window,"10010.1.122"))||"性别",value:"",key:"orgName"}],lt=n((()=>(tt.id&&et.forEach((t=>{const{key:e}=t;t.value=tt[e]})),et)));async function nt(){X.value=!1;let t=V.sessionList.find((t=>t.receiver===R.userId));if(!t)try{t=await z({chatType:x.SINGLE,receiver:R.userId,sender:V.userInfo.id})}catch(t){console.log("error :>> ",t)}t&&W(t),T("close")}async function ot(t){if(!t)return;const e=await N({userId:R.userId});(null==e?void 0:e.id)?Object.assign(tt,e):tt.id=""}function at(t){const{key:e,value:l}=t;return"phone"!==e||Z.value?l:(l||"").replace(/(\d{3})\d{4}(\d{4})/,"$1****$2")}return(e,l)=>(o(),a(i(k),{raw:"",class:"person-profile-wrapper",show:X.value,"onUpdate:show":[l[3]||(l[3]=t=>X.value=t),ot],trigger:t.disabled?"manual":"click","show-arrow":!1,to:"body",shift:""},{trigger:r((()=>[s(e.$slots,"trigger")])),default:r((()=>[tt.id?(o(),d(c,{key:0},[u(p("div",D,[p("div",S,[p("div",$,[v(i(h),{src:tt.avatar,bordered:"",round:"",size:100,onClickCapture:l[0]||(l[0]=t=>Y.value=!0)},null,8,["src"]),g(' <n-upload abstract accept="image/*" @change="onChange">\r\n\t\t\t\t\t\t\t<n-upload-trigger #="{ handleClick }" abstract>\r\n\t\t\t\t\t\t\t\t<n-button\r\n\t\t\t\t\t\t\t\t\tcircle\r\n\t\t\t\t\t\t\t\t\tsecondary\r\n\t\t\t\t\t\t\t\t\tclass="edit-avatar"\r\n\t\t\t\t\t\t\t\t\tv-show="userDetail.id === state.userInfo.id"\r\n\t\t\t\t\t\t\t\t\t@click="handleClick"\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t<template #icon>\r\n\t\t\t\t\t\t\t\t\t\t<n-icon size="16" color="#666666" :component="Camera" />\r\n\t\t\t\t\t\t\t\t\t</template>\r\n\t\t\t\t\t\t\t\t</n-button>\r\n\t\t\t\t\t\t\t</n-upload-trigger>\r\n\t\t\t\t\t\t</n-upload> '),p("div",E,[p("h4",null,m(tt.name),1),p("p",null,m(tt.orgName),1)]),v(i(b),{strong:"",secondary:"",onClick:nt},{default:r((()=>[v(i(C),{size:"13",color:"#666666",component:i(j),style:{"margin-right":"6px"}},null,8,["component"]),w(" 发消息 ")])),_:1})])]),p("div",P,[p("div",q,[(o(!0),d(c,null,y(i(lt),((t,e)=>(o(),d("div",{class:"info-item",key:e},[p("span",G,m(t.label),1),p("div",O,[p("span",null,m(at(t)),1),"phone"===t.key&&at(t)?(o(),a(i(C),{key:0,size:"16",color:"#666666",component:Z.value?i(L):i(B),style:{"margin-left":"10px"},onClick:l[1]||(l[1]=t=>Z.value=!Z.value)},null,8,["component"])):g("v-if",!0)])])))),128))])])],512),[[f,!Y.value]]),u(p("div",{class:"large-avatar",onClick:l[2]||(l[2]=t=>Y.value=!1)},[v(i(b),{circle:"",size:"small",secondary:""},{icon:r((()=>[v(i(C),{size:24,component:i(I),color:"#fff"},null,8,["component"])])),_:1}),v(i(h),{size:310,round:"",src:tt.avatar},null,8,["src"])],512),[[f,Y.value]])],64)):g("v-if",!0)])),_:3},8,["show","trigger"]))}});export{T as default};
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { CSSProperties } from 'vue';
|
2
2
|
import { AnyObject } from '../../../../shared/types';
|
3
3
|
import { formatTime } from '../utils';
|
4
|
+
import { STATUS } from '../constants';
|
4
5
|
declare const _default: import("vue").DefineComponent<{}, {
|
5
6
|
filterKey: {
|
6
7
|
all: string;
|
@@ -42,6 +43,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
42
43
|
unreadTotal: import("vue").ComputedRef<number>;
|
43
44
|
openSession: (item: AnyObject) => Promise<void>;
|
44
45
|
setUpdateSessionItem: (item: AnyObject) => void;
|
46
|
+
setCurrentSessionItem: (item: AnyObject) => void;
|
45
47
|
currentWidth: import("vue").ComputedRef<number>;
|
46
48
|
sessionList: import("vue").ComputedRef<AnyObject[]>;
|
47
49
|
getLabelNum: (session: AnyObject) => number;
|
@@ -96,5 +98,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
96
98
|
beforeUnmount(el: any): void;
|
97
99
|
};
|
98
100
|
formatTime: typeof formatTime;
|
101
|
+
STATUS: typeof STATUS;
|
99
102
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
100
103
|
export default _default;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,ref as t,computed as
|
1
|
+
import{defineComponent as e,ref as t,computed as i,withDirectives as l,openBlock as n,createElementBlock as o,normalizeStyle as s,unref as a,createBlock as u,createCommentVNode as d,createElementVNode as r,Fragment as v,renderList as p,withCtx as c,createTextVNode as m,toDisplayString as g,withModifiers as f,normalizeClass as y,createVNode as w,vShow as k,nextTick as h}from"vue";import{NSpin as x,NTag as _,NAvatar as C,NBadge as M}from"naive-ui";import E from"./ContextMenu.js";import{useData as b}from"../hooks/useData.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import{STATUS as R}from"../constants/index.js";import{toppingSessionApi as j,updateStatusApi as D}from"../api/index.js";import{listSort as L,formatTime as S}from"../utils/index.js";import"lodash-es";import"trtc-sdk-v5";import{vFlexibleResize as B}from"../../../../shared/directive/flexibleResize.js";const N={class:"sider-list__filter box-shadow"},T=["onClick","onContextmenu"],V={class:"avatar-right"},O={class:"name"},H={class:"msg-tip"},I={class:"msg-tip__content"},z={key:0},K=["innerHTML"];var U=e({__name:"SiderList",setup(e){var U,W,A;const X="all",Y="unread",$="ended";let q=[];const F=t(300),G=t(),J=t(!1),P=t([{label:(null==(U=window.getLanguageByCode)?void 0:U.call(window,"10010.1.123"))||"全部",key:X},{label:(null==(W=window.getLanguageByCode)?void 0:W.call(window,"10010.1.124"))||"未读",key:Y},{label:(null==(A=window.getLanguageByCode)?void 0:A.call(window,"10010.1.77"))||"结束",key:$}]),Q=t(),Z=t(!1),ee=t({left:0,top:0}),te=t(),ie=t("all"),{state:le,unreadTotal:ne,openSession:oe,setUpdateSessionItem:se,setCurrentSessionItem:ae}=b(),ue=i((()=>Math.min(Math.max(F.value,240),360))),de=i((()=>L(le.sessionList)));function re({distance:e}){F.value=F.value+e}function ve(e,t=a(ie)){var i;return t===X||(t===Y?q.includes(e.sessionKey)||(null!=(i=e.unreadNum)?i:0)>0:t===$?e.status===R.ENDED:void 0)}async function pe(e,t){try{if("topping"===e)return await j({id:t.id,topping:!(null==t?void 0:t.topping)}),void(le.id===t.id?ae({topping:!(null==t?void 0:t.topping)}):se({...t,topping:!(null==t?void 0:t.topping)}));"remove"===e&&(await D({id:t.id,status:R.REMOVED}),le.id===t.id?ae({status:R.REMOVED}):se({...t,status:R.REMOVED}))}catch(e){}}return(e,t)=>l((n(),o("section",{class:"sider-list",style:s({width:a(ue)+"px"})},[J.value?(n(),u(a(x),{key:0,stroke:"#5585f5"})):d("v-if",!0),d(' <n-input v-else placeholder="输入用户名模糊搜索" v-model:value="keyword" @keyup.enter="handleSearch"></n-input> '),r("div",N,[(n(!0),o(v,null,p(P.value,(e=>(n(),u(a(_),{type:ie.value===e.key?"primary":"default",round:"",bordered:!1,key:e.key,onClick:()=>{return t=e.key,ie.value=t,void(t===Y&&(q=(de.value.filter((e=>{var t;return(null!=(t=e.unreadNum)?t:0)>0}))||[]).map((e=>e.sessionKey))));var t}},{default:c((()=>{return[m(g(e.label)+"("+g((t=e,t.key===$?de.value.filter((e=>e.status===R.ENDED)).length:ne.value))+") ",1)];var t})),_:2},1032,["type","onClick"])))),128))]),r("div",{class:"sider-list__box",ref_key:"listBoxRef",ref:G},[(n(!0),o(v,null,p(a(de),(e=>{var t;return n(),o(v,{key:e.id},[e.status!==a(R).REMOVED?l((n(),o("div",{key:0,onClick:()=>a(oe)(e),onContextmenu:f((t=>async function(e,t){var i,l,n,o,s;te.value=t,Z.value=!0,await h();const{clientX:a,clientY:u}=e,{width:d=0,height:r=0,left:v=0,top:p=0}=(null==(i=G.value)?void 0:i.getBoundingClientRect())||{},{width:c=100,height:m=80}=(null==(n=null==(l=Q.value)?void 0:l.$el)?void 0:n.getBoundingClientRect())||{},g=null!=(s=null==(o=G.value)?void 0:o.scrollTop)?s:0,f={};a<v+d-(c+2)-5?f.left=a-v+5+"px":f.right=v+d-a+5+"px",p+r-u<=m+5?f.bottom=5-g+"px":f.top=u-p+g+5+"px",ee.value=f}(t,e.id)),["prevent"]),class:y(["sider-list__box__item",{active:e.id===a(le).id},e.topping?"sider-list__box__item--top":""])},[w(a(C),{round:"",size:"large",src:e.avatar},null,8,["src"]),r("div",V,[r("div",O,[r("h4",null,g(e.name),1),r("span",null,g(e.lastMessage?a(S)(e.lastMessageSendTime).siderMsgTime:""),1)]),r("div",H,[r("div",I,["WITHDRAWN"===e.lastMessageStatus?(n(),o("div",z,(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.68"))||"撤回了一条消息")):(n(),o("div",{key:1,innerHTML:e.lastMessageContent},null,8,K))]),w(a(M),{value:e.unreadNum>99?"99+":e.unreadNum},null,8,["value"])])])],42,T)),[[k,ve(e)]]):d("v-if",!0)],64)})),128)),w(a(E),{ref_key:"contextmenuRef",ref:Q,show:Z.value,"onUpdate:show":t[0]||(t[0]=e=>Z.value=e),type:"session",position:ee.value,id:te.value,onSelect:pe},null,8,["show","position","id"])],512)],4)),[[a(B),{mode:"VR",onMove:re}]])}});export{U as default};
|
@@ -1 +1 @@
|
|
1
|
-
var E=(E=>(E.SINGLE="SINGLE",E.GROUP="GROUP",E))(E||{}),S=(E=>(E.TEXT="TEXT",E.FILE="FILE",E.EMOJI="EMOJI",E.IMAGE="IMAGE",E.TEMPLATE="TEMPLATE",E.BLEND="BLEND",E.FORWARD="FORWARD",E.QUICK_REPLY="QUICK_REPLY",E.AUDIO="AUDIO",E.VIDEO="VIDEO",E))(S||{}),A=(E=>(E.JOIN_GROUP="JOIN_GROUP",E.LEAVE_GROUP="LEAVE_GROUP",E.NEW_SESSION="NEW_SESSION",E.MESSAGE="MESSAGE",E.AV_STATUS="AV_STATUS",E.RECALL_MESSAGE="RECALL_MESSAGE",E.DISABLE_SESSION="DISABLE_SESSION",E))(A||{}),
|
1
|
+
var E=(E=>(E.SINGLE="SINGLE",E.GROUP="GROUP",E))(E||{}),S=(E=>(E.TEXT="TEXT",E.FILE="FILE",E.EMOJI="EMOJI",E.IMAGE="IMAGE",E.TEMPLATE="TEMPLATE",E.BLEND="BLEND",E.FORWARD="FORWARD",E.QUICK_REPLY="QUICK_REPLY",E.AUDIO="AUDIO",E.VIDEO="VIDEO",E))(S||{}),A=(E=>(E.JOIN_GROUP="JOIN_GROUP",E.LEAVE_GROUP="LEAVE_GROUP",E.NEW_SESSION="NEW_SESSION",E.MESSAGE="MESSAGE",E.AV_STATUS="AV_STATUS",E.RECALL_MESSAGE="RECALL_MESSAGE",E.DISABLE_SESSION="DISABLE_SESSION",E))(A||{}),L=(E=>(E.IN_CALL="IN_CALL",E.CALL_BUSY="CALL_BUSY",E.NO_RESPONSE="NO_RESPONSE",E.FINISHED="FINISHED",E.REJECTED="REJECTED",E.CANCELED="CANCELED",E))(L||{}),I=(E=>(E.REMOVED="REMOVED",E.ENABLED="ENABLED",E.ENDED="ENDED",E))(I||{});export{L as AV_STATUS,E as CHAT_TYPE,S as MESSAGE_TYPE,I as STATUS,A as SUBSCRIBE_MESSAGE_TYPE};
|
@@ -1 +1 @@
|
|
1
|
-
import{ref as e,reactive as s,computed as t,watch as n,inject as i,toRaw as r}from"vue";import{openSessionApi as o,groupUserApi as
|
1
|
+
import{ref as e,reactive as s,computed as t,watch as n,inject as i,toRaw as r}from"vue";import{openSessionApi as o,updateStatusApi as a,groupUserApi as c}from"../api/index.js";import{promiseTimeout as u,useIntervalFn as m}from"@vueuse/core";import{isGroup as d,listSort as l,formatTime as p,transformMessage as g,getFileSize as h,simplifyMessage as f}from"../utils/index.js";import{cloneDeep as S,isArray as I,uniqBy as T}from"lodash-es";import{STATUS as y,MESSAGE_TYPE as v,CHAT_TYPE as L}from"../constants/index.js";import{useTheme as M}from"../../../../shared/hooks/useTheme.js";import"date-fns";import"@vue/shared";import"../../../../shared/utils/index.js";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import"naive-ui";import"../../../../shared/hooks/useScrollLoading.js";const E=Symbol("InjectionIChatData");function C(e){const{lastMessage:s,lastSenderName:t=""}=e,n=f(s)||"";return d(e)&&t?t+": "+n:n}function N(i,f){const E=e(),N=s({orgId:i.orgId,currentSessionItem:{},id:"",userInfo:{id:i.userId},msgList:[],currentMsg:{},isAppendMsg:!1,sessionList:[],isChangeSession:!1,updateSessionItem:{},isUpdateSession:!1,currentReferenceMsg:null,currentReEditMsg:null,showVideo:!1,currentAVMsg:{},currentGroupUser:[],showMultipleVideo:!1}),D=M(),w=t((()=>N.sessionList.reduce(((e,s)=>e+ +s.unreadNum),0))),j=t((()=>d(N.currentSessionItem))),U=t((()=>{var e,s,t;return(null==(e=N.userInfo)?void 0:e.id)===(null==(t=null==(s=N.currentGroupUser)?void 0:s[0])?void 0:t.id)})),_=t((()=>{var e;return(null==(e=N.currentSessionItem)?void 0:e.status)===y.ENDED}));n((()=>w.value),(e=>{!async function s(t=0){if(t>2)return;const n=N.sessionList.filter((e=>{var s;return+(null!=(s=e.unreadNum)?s:0)>0}));n.every((e=>!!e.name))?f("unread-message-update",e,l(n)):(await u(300),s(++t))}()})),n([()=>N.isChangeSession,()=>N.isUpdateSession],(([e,s])=>{e&&(B(N.currentSessionItem),N.currentSessionItem.status===y.REMOVED&&V(),N.isChangeSession=!1),s&&(B(N.updateSessionItem),N.isUpdateSession=!1)}),{immediate:!0});const{pause:G,resume:R,isActive:K}=m((()=>{const e=S(N.msgList);e.some((e=>{const{sendTime:s}=e;return!(Date.now()-new Date(s).getTime()>=36e5)&&(e.__sendTime=p(s).recordTime,!0)})),N.msgList=e,O()||G()}),6e4,{immediate:!1});function O(){return!!N.msgList.length&&N.msgList.some((e=>Date.now()-new Date(e.sendTime).getTime()<36e5))}async function k(e){var s;try{null==(s=E.value)||s.send("/app/chat/send",{},JSON.stringify({chatType:N.currentSessionItem.chatType,receiver:N.currentSessionItem.receiver,...e}))}catch(e){}}function x(e){Object.assign(N.currentSessionItem,e,{lastMessageContent:Reflect.has(e,"lastMessageContent")?e.lastMessageContent:Reflect.has(e,"lastMessage")?C({...e,chatType:e.chatType||N.currentSessionItem.chatType}):N.currentSessionItem.lastMessageContent}),N.isChangeSession=!0,N.id!==N.currentSessionItem.id&&(N.msgList=[],N.id=N.currentSessionItem.id)}function A(e){const s=N.sessionList.find((s=>s.sessionKey===e.sessionKey)),t={...e,lastMessageContent:C({...e,chatType:e.chatType||(null==s?void 0:s.chatType)})};N.updateSessionItem=s?{...S(s),...t}:t,N.isUpdateSession=!0}function V(){if(!N.id)return null;const{currentSessionItem:e}=N;return N.currentSessionItem={},N.msgList=[],N.id="",N.currentGroupUser=[],e}function b(e){N.sessionList=S(T(e,"id")),N.sessionList.forEach((e=>{Object.assign(e,{defaultName:Reflect.has(e,"defaultName")?e.defaultName:e.name||"",lastMessageContent:Reflect.has(e,"lastMessageContent")?e.lastMessageContent:C(e)}),e.receiver===N.userInfo.id&&(e.unreadNum=0),e.chatType!==L.GROUP||e.name||c({id:e.receiver}).then((s=>{I(s)&&(e.name=s.map((e=>e.name)).join(","))}))}))}function B(e){!e.id||N.sessionList.map((e=>e.id)).includes(e.id)?N.sessionList.some((s=>{if(s.sessionKey===e.sessionKey){let{unreadNum:t=0}=s;return Object.assign(s,e),e.sessionKey!==N.currentSessionItem.sessionKey&&s.sender&&s.sender!==N.userInfo.id&&(s.unreadNum=++t),!0}})):b([...N.sessionList,e])}return{cssVars:D,stompClient:E,state:N,unreadTotal:w,isGroupChat:j,isGroupLeader:U,isEnded:_,setMsgList:function(e=[]){G(),N.msgList=S(e).sort(((e,s)=>new Date(s.sendTime).getTime()-new Date(e.sendTime).getTime())),N.msgList.forEach((e=>{var s,t;Object.assign(e,{__time:p(e.sendTime).msgTime,__content:(t=e.content.chatMessageType,[v.TEXT,v.TEXT,v.BLEND].includes(t)?g(e.content):null==(s=e.content)?void 0:s.msg),__sendTime:p(e.sendTime).recordTime}),e.content.chatMessageType!==v.FILE||e.__size||h(e.content.fileUrl).then((s=>{e.__size=s}))})),O()&&R()},sendMessage:k,relayMessage:async function(e){const{checkedIds:s,remark:t,content:n}=e;for(let e=0;e<s.length;e++){const i=s[e],r=N.sessionList.find((e=>e.receiver===i));r||await o({chatType:L.SINGLE,receiver:i,sender:N.userInfo.id});const a=(null==r?void 0:r.chatType)||L.SINGLE;k({chatType:a,receiver:i,content:n}),await u(100),t&&k({chatType:a,receiver:i,content:{chatMessageType:v.TEXT,msg:t}}),await u(100)}},openSession:async function(e){try{e.status===y.REMOVED&&(await a({id:e.id,status:y.ENABLED}),A({...e,status:y.ENABLED}),e.status=y.ENABLED);const s=N.currentSessionItem.sessionKey;if(x(e),s===N.currentSessionItem.sessionKey)return;if(j.value){const s=await c({id:e.receiver});N.currentGroupUser=I(s)?s:[]}else N.currentGroupUser=T([N.userInfo,{...S(e),id:e.receiver}],"id");f("session-change",{...r(N.currentSessionItem),userList:N.currentGroupUser.map((e=>r(e)))})}catch(e){console.log("error---\x3e",e)}},closeSession:V,getCurrentSession:function(){return N.id?N.currentSessionItem:null},setCurrentSessionItem:x,setUpdateSessionItem:A,setSessionList:b,emit:f}}const D=()=>i(E);export{E as InjectionIChatData,N as initData,D as useData};
|
@@ -1 +1 @@
|
|
1
|
-
import{ref as e}from"vue";import{isArray as o}from"lodash-es";import{listUserApi as r}from"../api/index.js";import{useDebounceFn as s}from"@vueuse/core";import"../../../../shared/utils/index.js";import"naive-ui";import"date-fns";import"@vue/shared";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{useScrollLoading as t}from"../../../../shared/hooks/useScrollLoading.js";import{useData as a}from"./useData.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import"../utils/index.js";import"trtc-sdk-v5";function i({wrapperRef:i,keywordRef:n,before:p,after:u}){const m={page:0,hasMore:!0},{state:c}=a(),d=e([]),l=s((function(){Object.assign(m,{page:0,hasMore:!0}),f()}),300);async function f(){const e=(n.value||"").replace(/^\s+|\s+$/g,"");if(!e)return void(p?p():d.value=[]);if(!m.hasMore)return;m.page++,1==m.page&&(d.value=[]);const s=await r({orgId:c.orgId,keyword:e,page:m.page,pageSize:
|
1
|
+
import{ref as e}from"vue";import{isArray as o}from"lodash-es";import{listUserApi as r}from"../api/index.js";import{useDebounceFn as s}from"@vueuse/core";import"../../../../shared/utils/index.js";import"naive-ui";import"date-fns";import"@vue/shared";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{useScrollLoading as t}from"../../../../shared/hooks/useScrollLoading.js";import{useData as a}from"./useData.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import"../utils/index.js";import"trtc-sdk-v5";function i({wrapperRef:i,keywordRef:n,before:p,after:u}){const m={page:0,hasMore:!0},{state:c}=a(),d=e([]),l=s((function(){Object.assign(m,{page:0,hasMore:!0}),f()}),300);async function f(){const e=(n.value||"").replace(/^\s+|\s+$/g,"");if(!e)return void(p?p():d.value=[]);if(!m.hasMore)return;m.page++,1==m.page&&(d.value=[]);const s=await r({orgId:c.orgId,keyword:e,page:m.page,pageSize:15});o(s.records)&&d.value.length<=+s.total&&(d.value=m.page>1?d.value.concat(s.records):s.records,null==u||u(),d.value.length>=+s.total&&(m.hasMore=!1))}return t(i,(()=>{f()})),{userList:d,handleInput:l}}export{i as useSearchUserList};
|
@@ -14,3 +14,4 @@ export declare function getFileSize(url: string): Promise<unknown>;
|
|
14
14
|
export declare function base64ToFile(base64: string): Promise<File | undefined>;
|
15
15
|
export declare function isAudioOrVideoMessage(message: AnyObject): boolean;
|
16
16
|
export declare function formatSeconds(seconds: number): string;
|
17
|
+
export declare function isGroup(session: AnyObject): boolean;
|
@@ -1 +1 @@
|
|
1
|
-
import{isToday as e,format as t,isYesterday as n,startOfDay as o}from"date-fns";import{cloneDeep as
|
1
|
+
import{isToday as e,format as t,isYesterday as n,startOfDay as o}from"date-fns";import{cloneDeep as r,isNumber as a,isNaN as i}from"lodash-es";import{MESSAGE_TYPE as s,CHAT_TYPE as l}from"../constants/index.js";import{emojis as c}from"./emoji.js";import{uuidGenerator as u}from"../../../../shared/utils/index.js";import{createDiscreteApi as d}from"naive-ui";const{message:g}=d(["message"]);function m(o){var r;const a=new Date(o);let i,s;if(e(a))i=s=t(a,"HH:mm");else{i=n(a)?(null==(r=window.getLanguageByCode)?void 0:r.call(window,"10010.1.135"))||"昨天":t(a,"MM-dd");const e=a.getFullYear(),o=(new Date).getFullYear();s=t(a,e<o?"yyyy年M月d日 HH:mm":"M月d日 HH:mm")}return{siderMsgTime:i,msgTime:s,recordTime:function(o){var r,a,i,s;const l=new Date(o),c=Date.now()-l.getTime();if(c<6e4)return(null==(r=window.getLanguageByCode)?void 0:r.call(window,"10010.1.133"))||"刚刚";if(c<36e5)return Math.ceil(c/1e3/60)+((null==(a=window.getLanguageByCode)?void 0:a.call(window,"10010.1.136"))||"分钟前");if(e(l))return((null==(i=window.getLanguageByCode)?void 0:i.call(window,"10010.1.134"))||"今天")+t(l,"HH:mm");if(n(l))return((null==(s=window.getLanguageByCode)?void 0:s.call(window,"10010.1.135"))||"昨天")+t(l,"HH:mm");{const e=l.getFullYear(),n=(new Date).getFullYear();return t(l,e<n?"yyyy年M月d日 HH:mm":"M月d日 HH:mm")}}(o)}}function p(e){return r(e||[]).sort(((e,t)=>e.topping&&!t.topping?-1:!e.topping&&t.topping?1:new Date(t.sortTime).getTime()-new Date(e.sortTime).getTime()))}function w(e){if(!(null==e?void 0:e.msg))return"";const{chatMessageType:t="",msg:n=""}=e;let o=n.toString();if(t===s.BLEND){const e=o.match(/\[([^\]]+)\]/g);return null==e||e.forEach((e=>{const n=e.match(/\[([^\]]+)\]/);if(n&&n.length>1){const r=c.findEmoji(n[1]);r&&(o=o.replace(e,`<img data-msg=${n[1]} data-type=${t} class="emoji--min" src=${r} />`))}})),o}const r=e=>new RegExp("\\n*\\["+(e||"")+"(code|pre|div|span|p|table|thead|th|tbody|tr|td|ul|li|ol|li|dl|dt|dd|h2|h3|h4|h5)([\\s\\S]*?)]\\n*","g");return o=o.replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,""").replace(/@(\S+)(\s+?|$)/g,'@<a href="javascript:;">$1</a>$2').replace(r(),"<$1 $2>").replace(r("/"),"</$1>").replace(/\n/g,"<br>"),o}function f(e){var t,n;if(e&&a(+e)&&!i(+e)){const n=E(+e),o=n.split(":");let r=n;return 3===o.length&&"00"===o[0]&&(r=`${o[1]}:${o[2]}`),((null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.137"))||"通话时长")+r}return(null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.138"))||"已取消"}function y(e){var t;if(!e)return"";const{chatMessageType:n,msg:o,messageTemplate:r}=e,a=T(e)?f(o):"";switch(n){case s.TEXT:return w(e);case s.IMAGE:return"[图片]";case s.FILE:return"[文件]";case s.EMOJI:return`<img class="emoji--min" alt=${o} src=${c.findEmoji(o)}>`;case s.TEMPLATE:return null==(t=null==r?void 0:r.setting)?void 0:t.title;case s.VIDEO:return`[视频通话]${a}`;case s.AUDIO:return`[语音通话]${a}`;default:return"[消息]"}}function h(e,t){const n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="blob",n.onload=function(e){if(200===n.status){const e=window.URL.createObjectURL(n.response),o=document.createElement("a");o.href=e,o.download=t,o.dispatchEvent(new MouseEvent("click")),window.URL.revokeObjectURL(e)}},n.send()}function v(e){return new Promise(((t,n)=>{const o=new XMLHttpRequest;o.open("HEAD",e,!0),o.onreadystatechange=()=>{var e;if(4===o.readyState&&200===o.status){let n=null!=(e=o.getResponseHeader("Content-Length"))?e:0;const r=+n;r>1048576?n=(r/1048576).toFixed(2)+"M":r>1024?n=(r/1024).toFixed(2)+"K":n+="B",t(n)}},o.send()}))}async function H(e){try{const t=await fetch(e),n=await t.blob();return new File([n],`${u()}.${n.type.split("/")[1]}`,{type:n.type})}catch(e){return}}function T(e){return e&&[s.AUDIO,s.VIDEO].includes(e.chatMessageType)}function E(e){const n=o(new Date);return n.setSeconds(e),t(n,"HH:mm:ss")}function M(e){return e.chatType===l.GROUP}export{g as $message,H as base64ToFile,h as downloadFile,E as formatSeconds,m as formatTime,f as getAVTime,v as getFileSize,T as isAudioOrVideoMessage,M as isGroup,p as listSort,y as simplifyMessage,w as transformMessage};
|