cnhis-design-vue 3.2.15-beta.8 → 3.2.15-release.5
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 +9 -0
- package/es/components/ai-chat/src/Index.vue.d.ts +9 -0
- package/es/components/ai-chat/src/Index.vue2.js +1 -1
- package/es/components/ai-chat/src/components/ChatCard.js +1 -1
- package/es/components/ai-chat/style/index.css +1 -1
- package/es/components/branch-notice/index.d.ts +32 -3
- package/es/components/branch-notice/src/BranchNotice.vue.d.ts +9 -3
- package/es/components/branch-notice/src/BranchNotice.vue2.js +1 -1
- package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
- package/es/components/button-print/src/components/OldPrintComponent.vue2.js +1 -1
- package/es/components/card-reader-sdk/src/cardReaderSDK.js +1 -1
- package/es/components/classification/index.d.ts +30 -0
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +30 -0
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +30 -0
- package/es/components/classification/src/index.vue.d.ts +30 -0
- package/es/components/classification/src/index.vue2.js +1 -1
- package/es/components/date-picker/index.d.ts +10 -0
- package/es/components/date-picker/src/DatePicker.vue.d.ts +10 -0
- package/es/components/date-picker/src/DatePicker.vue2.js +1 -1
- package/es/components/expand-field/index.d.ts +1 -1
- package/es/components/expand-field/src/components/FormItemPerson.vue.d.ts +1 -1
- package/es/components/expand-field/src/components/PersonModal.vue.d.ts +1 -1
- package/es/components/expand-field/src/components/form.vue.d.ts +1 -1
- package/es/components/expand-field/src/index.vue.d.ts +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.d.ts +1 -0
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/useCommon.d.ts +1 -2
- package/es/components/fabric-chart/src/hooks/useDraw.js +1 -1
- package/es/components/field-set/src/FieldColor.vue.d.ts +21 -1
- package/es/components/field-set/src/FieldFilter.vue.d.ts +3 -2
- package/es/components/field-set/src/FieldFilter.vue2.js +1 -1
- package/es/components/field-set/src/FieldSet.vue.d.ts +1 -1
- package/es/components/field-set/src/components/condition.vue.d.ts +10 -0
- package/es/components/field-set/src/components/edit-dialog.vue.d.ts +20 -0
- package/es/components/field-set/src/components/edit-filter.vue.d.ts +10 -0
- package/es/components/field-set/src/components/table-row.vue.d.ts +1 -1
- package/es/components/field-set/src/components/table-row.vue2.js +1 -1
- package/es/components/field-set/src/utils/index.js +1 -1
- package/es/components/form-config/index.d.ts +1021 -1
- package/es/components/form-config/src/FormConfig.vue.d.ts +1021 -1
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +0 -1
- package/es/components/form-config/src/components/FormConfigEdit.vue2.js +1 -1
- package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +1019 -0
- package/es/components/form-config/src/components/FormConfigEventSetting.vue2.js +1 -1
- package/es/components/form-config/src/constants/index.js +1 -1
- package/es/components/form-config/style/index.css +1 -1
- package/es/components/form-render/src/components/renderer/select.d.ts +6 -0
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/hooks/useLowCodeReactions.js +1 -1
- package/es/components/iho-chat/index.d.ts +300 -79
- package/es/components/iho-chat/src/Index.vue.d.ts +300 -79
- package/es/components/iho-chat/src/Index.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +33 -9
- package/es/components/iho-chat/src/components/ChatAdd.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatFile.vue.d.ts +33 -10
- package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +33 -10
- package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +109 -33
- package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +33 -11
- package/es/components/iho-chat/src/components/ChatRecord.vue.d.ts +10 -1
- package/es/components/iho-chat/src/components/ChatSearch.vue.d.ts +0 -1
- package/es/components/iho-chat/src/components/ChatSet.vue.d.ts +33 -11
- package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +34 -10
- package/es/components/iho-chat/src/components/MultipleVideo.vue2.js +1 -1
- package/es/components/iho-chat/src/components/PersonProfile.vue.d.ts +0 -1
- package/es/components/iho-chat/src/components/SiderList.vue.d.ts +15 -1
- package/es/components/iho-chat/src/components/SiderList.vue2.js +1 -1
- package/es/components/iho-chat/src/components/Video.vue.d.ts +1 -1
- package/es/components/iho-chat/src/components/Video.vue2.js +1 -1
- package/es/components/iho-chat/src/hooks/useData.d.ts +4 -2
- package/es/components/iho-chat/src/hooks/useData.js +1 -1
- package/es/components/iho-chat/src/hooks/useVideo.d.ts +1 -1
- package/es/components/iho-chat/src/hooks/useVideo.js +1 -1
- package/es/components/iho-chat/src/types/index.d.ts +13 -2
- package/es/components/iho-chat/style/iconfont.ttf +0 -0
- package/es/components/iho-chat/style/index.css +1 -1
- package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.d.ts +10 -0
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +10 -0
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/select-person/index.d.ts +1 -1
- package/es/components/select-person/src/SelectPerson.vue.d.ts +1 -1
- package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
- package/es/components/select-person/src/index.vue.d.ts +1 -1
- package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue.d.ts +10 -0
- package/es/components/table-filter/src/components/bi-filter/components/Date.vue.d.ts +10 -0
- package/es/components/table-filter/src/components/bi-filter/components/index.d.ts +10 -0
- package/es/components/table-filter/src/components/bi-filter/index.vue.d.ts +10 -0
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +20 -0
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +10 -0
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +10 -0
- package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +20 -0
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +20 -0
- package/es/components/table-filter/src/components/render-widget/components/DateInner.vue.d.ts +10 -0
- package/es/components/table-filter/src/components/render-widget/components/DateOut.vue.d.ts +10 -0
- package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.d.ts +10 -0
- package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.d.ts +10 -0
- package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/index.d.ts +40 -0
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +40 -0
- package/es/shared/package.json.js +1 -1
- package/es/shared/types/business.d.ts +4 -0
- package/package.json +2 -2
@@ -7,7 +7,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
7
7
|
name: string;
|
8
8
|
}[]>;
|
9
9
|
state: {
|
10
|
-
filterable: boolean;
|
11
10
|
orgId: string | number;
|
12
11
|
currentSessionItem: AnyObject;
|
13
12
|
id: string;
|
@@ -32,6 +31,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
32
31
|
receiver?: string | undefined;
|
33
32
|
}) => Promise<void>;
|
34
33
|
trtc: TRTC;
|
34
|
+
trtcProxy: import("vue").Ref<any>;
|
35
35
|
voiceOpen: import("vue").Ref<boolean>;
|
36
36
|
isAudio: import("vue").ComputedRef<boolean>;
|
37
37
|
isCall: import("vue").ComputedRef<boolean>;
|
@@ -96,6 +96,11 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
96
96
|
default: boolean;
|
97
97
|
};
|
98
98
|
}, {
|
99
|
+
initialOptions: AnyObject[];
|
100
|
+
tabList: {
|
101
|
+
key: string;
|
102
|
+
label: string;
|
103
|
+
}[];
|
99
104
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
100
105
|
title: {
|
101
106
|
type: StringConstructor;
|
@@ -125,7 +130,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
125
130
|
}>>;
|
126
131
|
emit: (event: "comfirm", ...args: any[]) => void;
|
127
132
|
state: {
|
128
|
-
filterable: boolean;
|
129
133
|
orgId: string | number;
|
130
134
|
currentSessionItem: AnyObject;
|
131
135
|
id: string;
|
@@ -149,27 +153,41 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
149
153
|
keyword: import("vue").Ref<string>;
|
150
154
|
showModal: import("vue").Ref<boolean>;
|
151
155
|
checkedOptions: import("vue").Ref<AnyObject[]>;
|
152
|
-
options: import("vue").Ref<AnyObject[]>;
|
153
156
|
groupName: import("vue").Ref<string>;
|
154
|
-
checkedSourceIds: import("vue").Ref<(string | number)[]>;
|
155
157
|
remark: import("vue").Ref<string>;
|
158
|
+
currentTab: import("vue").Ref<AnyObject[]>;
|
159
|
+
breadcrumbList: import("vue").Ref<AnyObject[]>;
|
156
160
|
userList: import("vue").Ref<AnyObject[]>;
|
157
161
|
handleInput: () => void;
|
158
162
|
_disabledIds: import("vue").ComputedRef<any[]>;
|
159
|
-
|
163
|
+
sessionList: import("vue").ComputedRef<{
|
160
164
|
id: any;
|
161
165
|
name: any;
|
162
166
|
avatar: any;
|
167
|
+
chatType: any;
|
168
|
+
}[]>;
|
169
|
+
friends: import("vue").ComputedRef<{
|
170
|
+
id: any;
|
171
|
+
name: any;
|
172
|
+
avatar: any;
|
173
|
+
chatType: any;
|
174
|
+
}[]>;
|
175
|
+
groups: import("vue").ComputedRef<{
|
176
|
+
id: any;
|
177
|
+
name: any;
|
178
|
+
avatar: any;
|
179
|
+
chatType: any;
|
163
180
|
}[]>;
|
164
181
|
checkedIds: import("vue").ComputedRef<any[]>;
|
165
182
|
btnDisabled: import("vue").ComputedRef<boolean>;
|
166
183
|
allChecked: import("vue").WritableComputedRef<boolean>;
|
184
|
+
checkedSourceIds: import("vue").WritableComputedRef<any[]>;
|
185
|
+
currentTabKey: import("vue").ComputedRef<any>;
|
186
|
+
getDisabled: (id: string | number) => boolean;
|
187
|
+
handleClickCheckbox: (option: AnyObject) => Promise<void>;
|
188
|
+
toggleTab: (item: AnyObject) => void;
|
189
|
+
handleTabBack: () => void;
|
167
190
|
handlePositiveClick: () => Promise<void>;
|
168
|
-
updateCheckedSourceIds: () => void;
|
169
|
-
handleSourceIdsUpdate: (value: (string | number)[], meta: {
|
170
|
-
actionType: "check" | "uncheck";
|
171
|
-
value: string | number;
|
172
|
-
}) => void;
|
173
191
|
closeTag: (id: string) => void;
|
174
192
|
NModal: any;
|
175
193
|
NButton: any;
|
@@ -181,8 +199,14 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
181
199
|
NCheckbox: any;
|
182
200
|
NCheckboxGroup: any;
|
183
201
|
NTooltip: any;
|
202
|
+
NBreadcrumb: any;
|
203
|
+
NBreadcrumbItem: any;
|
184
204
|
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<{}>>, {}>;
|
185
205
|
AddOutline: 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<{}>>, {}>;
|
206
|
+
PersonOutline: 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<{}>>, {}>;
|
207
|
+
PeopleOutline: 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<{}>>, {}>;
|
208
|
+
ChevronBackOutline: 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<{}>>, {}>;
|
209
|
+
last: <T>(array: import("lodash").List<T> | null | undefined) => T | undefined;
|
186
210
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
187
211
|
title: {
|
188
212
|
type: StringConstructor;
|
@@ -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 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
|
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 x}from"../api/index.js";import"@vueuse/core";import{$message as L}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 P={class:"video-wrapper video-wrapper--multiple"},D={class:"video-header"},O={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.114"))||"接听",-1);var me=o({__name:"MultipleVideo",setup(o){const S=t(),$=t([]),{state:H,sendMessage:U,trtc:z,trtcProxy:N,voiceOpen:me,isAudio:pe,isCall:ve,startTimer:ge,resetTimer:we,toggleAudio:fe,messageTypeText:he,timing:ye,toggleVideo:ke,videocamOpen:Ie,installEventHandlers:be,uninstallEventHandlers:Ae}=B(),Ce=t(!1),Ve=n((()=>ve.value?H.userInfo.name:H.currentAVMsg.sendName)),Me=n((()=>{if(!Ce.value)return"";const e=ve.value?`(${$.value.length+1}/${H.currentAVMsg.checkedIds.length+1})`:"";return`${Ve.value}发起的${he.value}会诊${e} ${ye.value}`}));function _e(e){console.log("checkedIds :>> ",e),H.currentAVMsg.checkedIds.push(...e),xe()}function xe(){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})})),Ce.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,proxy:N.value}),Ce.value=!0,ge(),be({handleError:$e,handleRemoteUserEnter:Be,handleRemoteAudioAvailable:Te,handleRemoteUserExit:Se,handleRemoteVideoAvailable:Ee}),await z.startLocalAudio(),pe.value)return;await z.startLocalVideo({view:S.value})}catch(e){console.log("error :>> ",e),L.error(e),H.showMultipleVideo=!1}}async function Re(){try{if(H.showMultipleVideo=!1,Ae({handleError:$e,handleRemoteUserEnter:Be,handleRemoteAudioAvailable:Te,handleRemoteUserExit:Se,handleRemoteVideoAvailable:Ee}),await z.exitRoom(),await z.stopLocalAudio(),pe.value)return;await z.stopLocalVideo()}catch(e){console.log("error :>> ",e)}}async function Ee(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 Te(e){var o;const{userId:t}=e;if(t&&!(null==(o=$.value.map((e=>e.id)))?void 0:o.includes(t))){const e=await je(t);$.value.push({id:t,name:e})}}async function Be(e){const{userId:o}=e,t=await je(o);$.value.push({id:o,name:t}),ge()}async function je(e){const o=await x({userId:e});return(null==o?void 0:o.name)||""}function Se(e){console.log("event :>> 退房",e);const{userId:o}=e;$.value=R($.value,[{id:o,name:""}],"id")}function $e(e){console.log("error :>> ",e),H.showMultipleVideo=!1}return l((()=>{Re()})),(o,t)=>{var n,l,f,x,L,R;return i(),a("div",P,[e("div",D,[s(e("span",{class:"title"},r(d(Me)),513),[[c,Ce.value]]),u(d(h),{quaternary:"",circle:"",color:"#ffffffcc",onClick:Re},{icon:m((()=>[u(d(y),{component:d(I)},null,8,["component"])])),_:1})]),Ce.value?(i(),a("div",O,[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(me)?"#fff":"#000",onClick:d(fe)},{icon:m((()=>[u(d(y),{component:d(me)?d(b):d(A)},null,8,["component"])])),_:1},8,["color","onClick"]),K]),e("div",Q,[u(d(h),{text:"",color:d(Ie)?"#fff":"#000",disabled:d(pe),onClick:d(ke)},{icon:m((()=>[u(d(y),{component:d(Ie)?d(C):d(V)},null,8,["component"])])),_:1},8,["color","disabled","onClick"]),W]),e("div",{class:"btn",onClick:Re},[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:_e},{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(Ve))+((null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.108"))||"发起的")+r(d(he))+((null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.109"))||"会议"),1),d(ve)?g("v-if",!0):(i(),a("span",ie,((null==(f=window.getLanguageByCode)?void 0:f.call(window,"10010.1.110"))||"邀请你加入")+r(d(he))+((null==(x=window.getLanguageByCode)?void 0:x.call(window,"10010.1.109"))||"会议"),1))]),d(ve)?(i(),a("div",ae,[u(k,{onComfirm:_e,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==(L=window.getLanguageByCode)?void 0:L.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:xe},{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};
|
@@ -20,13 +20,14 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
20
20
|
menuPosition: any;
|
21
21
|
sessionId: import("vue").Ref<any>;
|
22
22
|
currentFilterKey: import("vue").Ref<string>;
|
23
|
+
datePickerRef: import("vue").Ref<any>;
|
24
|
+
inputRef: import("vue").Ref<any>;
|
23
25
|
dateRange: import("vue").Ref<any>;
|
24
26
|
keyword: import("vue").Ref<string>;
|
25
27
|
showSearch: import("vue").Ref<boolean>;
|
26
28
|
filterList: import("vue").Ref<AnyObject[]>;
|
27
29
|
handleInput: () => void;
|
28
30
|
state: {
|
29
|
-
filterable: boolean;
|
30
31
|
orgId: string | number;
|
31
32
|
currentSessionItem: AnyObject;
|
32
33
|
id: string;
|
@@ -46,6 +47,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
46
47
|
showMultipleVideo: boolean;
|
47
48
|
};
|
48
49
|
unreadTotal: import("vue").ComputedRef<number>;
|
50
|
+
filterable: import("vue").Ref<any>;
|
49
51
|
openSession: (session: string | AnyObject) => Promise<void>;
|
50
52
|
setUpdateSessionItem: (item: AnyObject) => void;
|
51
53
|
setCurrentSessionItem: (item: AnyObject) => void;
|
@@ -58,6 +60,8 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
58
60
|
handleContextmenu: (event: MouseEvent, id: string) => Promise<void>;
|
59
61
|
handleSelect: (key: string, session: AnyObject) => Promise<void>;
|
60
62
|
handleUpdateShow: (value: boolean) => void;
|
63
|
+
handleClickoutside: (e: Event) => void;
|
64
|
+
handleUpdateDate: (value: string[]) => void;
|
61
65
|
handleSearch: () => void;
|
62
66
|
NBadge: any;
|
63
67
|
NAvatar: any;
|
@@ -136,6 +140,9 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
136
140
|
type: StringConstructor;
|
137
141
|
default: string;
|
138
142
|
};
|
143
|
+
isDateDisabled: {
|
144
|
+
type: import("vue").PropType<(current: number, ...arg: any[]) => boolean>;
|
145
|
+
};
|
139
146
|
}, {
|
140
147
|
attrs: {
|
141
148
|
[x: string]: unknown;
|
@@ -168,6 +175,9 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
168
175
|
type: StringConstructor;
|
169
176
|
default: string;
|
170
177
|
};
|
178
|
+
isDateDisabled: {
|
179
|
+
type: import("vue").PropType<(current: number, ...arg: any[]) => boolean>;
|
180
|
+
};
|
171
181
|
}>> & {
|
172
182
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
173
183
|
}>>;
|
@@ -180,6 +190,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
180
190
|
isDateTime: import("vue").ComputedRef<boolean>;
|
181
191
|
formatRef: import("vue").ComputedRef<string>;
|
182
192
|
panelFormatRef: import("vue").ComputedRef<string | [string, string]>;
|
193
|
+
_isDateDisabled: import("vue").ComputedRef<(current: number, ...arg: any[]) => boolean>;
|
183
194
|
focus: () => any;
|
184
195
|
blur: () => any;
|
185
196
|
handleConfirm: (target: HTMLInputElement) => void;
|
@@ -219,6 +230,9 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
219
230
|
type: StringConstructor;
|
220
231
|
default: string;
|
221
232
|
};
|
233
|
+
isDateDisabled: {
|
234
|
+
type: import("vue").PropType<(current: number, ...arg: any[]) => boolean>;
|
235
|
+
};
|
222
236
|
}>> & {
|
223
237
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
224
238
|
}, {
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,ref as t,computed as
|
1
|
+
import{defineComponent as e,ref as t,computed as l,withDirectives as n,openBlock as i,createElementBlock as a,normalizeStyle as o,unref as s,createVNode as u,withCtx as r,createElementVNode as d,Fragment as v,renderList as c,createBlock as p,vShow as m,createCommentVNode as f,createTextVNode as g,toDisplayString as w,withModifiers as y,normalizeClass as k,nextTick as h}from"vue";import{NPopover as _,NInput as x,NIcon as C,NTag as M,NAvatar as R,NBadge as b}from"naive-ui";import j from"./ContextMenu.js";import{useData as D}from"../hooks/useData.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import{STATUS as E}from"../constants/index.js";import{toppingSessionApi as L,updateStatusApi as B}from"../api/index.js";import{listSort as I,formatTime as T}from"../utils/index.js";import"lodash-es";import"trtc-sdk-v5";import{vFlexibleResize as N}from"../../../../shared/directive/flexibleResize.js";import S from"../../../date-picker/index.js";import{SearchOutline as V}from"@vicons/ionicons5";import $ from"./userItemRender.js";import O from"../../../default-page/index.js";import{useDebounceFn as U}from"@vueuse/core";import{isBefore as H,isAfter as z}from"date-fns";const K={key:0,class:"sider-list__filter"},P={class:"user-list-wrapper"},W={class:"sider-list__tags box-shadow"},A=["onClick","onContextmenu"],X={class:"avatar-right"},Y={class:"name"},q={class:"msg-tip"},F={class:"msg-tip__content"},G={key:0},J=["innerHTML"];var Q=e({__name:"SiderList",setup(e){var Q,Z,ee;const te="all",le="unread",ne="ended";let ie=[];const ae=t(300),oe=t(),se=t([{label:(null==(Q=window.getLanguageByCode)?void 0:Q.call(window,"10010.1.123"))||"全部",key:te},{label:(null==(Z=window.getLanguageByCode)?void 0:Z.call(window,"10010.1.124"))||"未读",key:le},{label:(null==(ee=window.getLanguageByCode)?void 0:ee.call(window,"10010.1.77"))||"结束",key:ne}]),ue=t(),re=t(!1),de=t({left:0,top:0}),ve=t(),ce=t("all"),pe=t(),me=t(),fe=t(),ge=t(""),we=t(!1),ye=t([]),ke=U(Ne,500),{state:he,unreadTotal:_e,filterable:xe,openSession:Ce,setUpdateSessionItem:Me,setCurrentSessionItem:Re}=D(),be=l((()=>Math.min(Math.max(ae.value,240),360))),je=l((()=>I(he.sessionList)));function De({distance:e}){ae.value=ae.value+e}function Ee(e,t=s(ce)){var l;return t===te||(t===le?ie.includes(e.sessionKey)||(null!=(l=e.unreadNum)?l:0)>0:t===ne?e.status===E.ENDED:void 0)}async function Le(e,t){try{if("topping"===e)return await L({id:t.id,topping:!(null==t?void 0:t.topping)}),void(he.id===t.id?Re({topping:!(null==t?void 0:t.topping)}):Me({...t,topping:!(null==t?void 0:t.topping)}));"remove"===e&&(await B({id:t.id,status:E.REMOVED}),he.id===t.id?Re({status:E.REMOVED}):Me({...t,status:E.REMOVED}))}catch(e){}}function Be(e){we.value=e,e||(ge.value="",fe.value=null,ye.value=[])}function Ie(e){var t,l,n,i,a;const o=null==(n=null==(l=null==(t=pe.value)?void 0:t.$datePicker)?void 0:l.panelInstRef)?void 0:n.$el;Be(!(!e.target||!(o&&o.contains(e.target)||(null==(i=me.value)?void 0:i.$el)&&(null==(a=me.value)?void 0:a.$el.contains(e.target)))))}function Te(e){fe.value=e,Ne()}function Ne(){ge.value||fe.value?ye.value=je.value.filter((e=>{const t=e.name.includes(ge.value);if(!fe.value)return t;const[l,n]=fe.value,i=new Date(e.createdTime);return t&&H(i,new Date(n+" 23:59:59"))&&z(i,new Date(l+" 00:00:00"))})):ye.value=[]}return(e,t)=>n((i(),a("section",{class:"sider-list",style:o({width:s(be)+"px"})},[s(xe)?(i(),a("div",K,[u(s(_),{raw:"","content-class":"search-content__sider",class:"search-wrapper",show:we.value,placement:"bottom-start","display-directive":"show","show-arrow":!1,onClickoutside:Ie},{trigger:r((()=>[u(s(x),{ref_key:"inputRef",ref:me,placeholder:"请输入名称模糊搜索",value:ge.value,"onUpdate:value":t[0]||(t[0]=e=>ge.value=e),onInput:s(ke),onClick:t[1]||(t[1]=()=>Be(!0))},{prefix:r((()=>[u(s(C),{component:s(V)},null,8,["component"])])),_:1},8,["value","onInput"])])),default:r((()=>{var e;return[u(s(S),{ref_key:"datePickerRef",ref:pe,"formatted-value":fe.value,type:"daterange",clearable:"","onUpdate:formattedValue":Te},null,8,["formatted-value"]),d("div",P,[(i(!0),a(v,null,c(ye.value,(e=>(i(),p(s($),{key:e.id,item:e,onItemClick:t[2]||(t[2]=()=>Be(!1))},null,8,["item"])))),128)),n(u(s(O),{config:{title:" ",content:(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.81"))||"找不到相关的结果"},type:"5"},null,512),[[m,ye.value.length<1]])])]})),_:1},8,["show"])])):f("v-if",!0),d("div",W,[(i(!0),a(v,null,c(se.value,(e=>(i(),p(s(M),{type:ce.value===e.key?"primary":"default",round:"",bordered:!1,key:e.key,onClick:()=>{return t=e.key,ce.value=t,void(t===le&&(ie=(je.value.filter((e=>{var t;return(null!=(t=e.unreadNum)?t:0)>0}))||[]).map((e=>e.sessionKey))));var t}},{default:r((()=>{return[g(w(e.label)+"("+w((t=e,t.key===ne?je.value.filter((e=>e.status===E.ENDED)).length:_e.value))+") ",1)];var t})),_:2},1032,["type","onClick"])))),128))]),d("div",{class:"sider-list__box",ref_key:"listBoxRef",ref:oe},[(i(!0),a(v,null,c(s(je),(e=>{var t;return i(),a(v,{key:e.id},[e.status!==s(E).REMOVED?n((i(),a("div",{key:0,onClick:()=>s(Ce)(e),onContextmenu:y((t=>async function(e,t){var l,n,i,a,o;ve.value=t,re.value=!0,await h();const{clientX:s,clientY:u}=e,{width:r=0,height:d=0,left:v=0,top:c=0}=(null==(l=oe.value)?void 0:l.getBoundingClientRect())||{},{width:p=100,height:m=80}=(null==(i=null==(n=ue.value)?void 0:n.$el)?void 0:i.getBoundingClientRect())||{},f=null!=(o=null==(a=oe.value)?void 0:a.scrollTop)?o:0,g={};s<v+r-(p+2)-5?g.left=s-v+5+"px":g.right=v+r-s+5+"px",c+d-u<=m+5?g.bottom=5-f+"px":g.top=u-c+f+5+"px",de.value=g}(t,e.id)),["prevent"]),class:k(["sider-list__box__item",{active:e.id===s(he).id},e.topping?"sider-list__box__item--top":""])},[u(s(R),{round:"",size:"large",src:e.avatar},null,8,["src"]),d("div",X,[d("div",Y,[d("h4",null,w(e.name),1),d("span",null,w(e.lastMessage?s(T)(e.lastMessageSendTime).siderMsgTime:""),1)]),d("div",q,[d("div",F,["WITHDRAWN"===e.lastMessageStatus?(i(),a("div",G,(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.68"))||"撤回了一条消息")):(i(),a("div",{key:1,innerHTML:e.lastMessageContent},null,8,J))]),u(s(b),{value:e.unreadNum>99?"99+":e.unreadNum},null,8,["value"])])])],42,A)),[[m,Ee(e)]]):f("v-if",!0)],64)})),128)),u(s(j),{ref_key:"contextmenuRef",ref:ue,show:re.value,"onUpdate:show":t[3]||(t[3]=e=>re.value=e),type:"session",position:de.value,id:ve.value,onSelect:Le},null,8,["show","position","id"])],512)],4)),[[s(N),{mode:"VR",onMove:De}]])}});export{Q as default};
|
@@ -7,7 +7,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
7
7
|
receiver?: string | undefined;
|
8
8
|
}) => Promise<void>;
|
9
9
|
state: {
|
10
|
-
filterable: boolean;
|
11
10
|
orgId: string | number;
|
12
11
|
currentSessionItem: import("../../../../shared/types").AnyObject;
|
13
12
|
id: string;
|
@@ -26,6 +25,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
26
25
|
currentGroupUser: import("../../../../shared/types").AnyObject[];
|
27
26
|
showMultipleVideo: boolean;
|
28
27
|
};
|
28
|
+
trtcProxy: import("vue").Ref<any>;
|
29
29
|
trtc: TRTC;
|
30
30
|
timing: import("vue").Ref<string>;
|
31
31
|
voiceOpen: import("vue").Ref<boolean>;
|
@@ -1 +1 @@
|
|
1
|
-
import{createElementVNode as e,defineComponent as o,ref as n,computed as s,watch as t,onBeforeUnmount as r,openBlock as a,createElementBlock as l,withDirectives as i,vShow as c,createVNode as u,unref as d,toDisplayString as v,Fragment as m,normalizeClass as p,withCtx as g}from"vue";import{NAvatar as f,NButton as w,NIcon as h}from"naive-ui";import{Mic as
|
1
|
+
import{createElementVNode as e,defineComponent as o,ref as n,computed as s,watch as t,onBeforeUnmount as r,openBlock as a,createElementBlock as l,withDirectives as i,vShow as c,createVNode as u,unref as d,toDisplayString as v,Fragment as m,normalizeClass as p,withCtx as g}from"vue";import{NAvatar as f,NButton as w,NIcon as h}from"naive-ui";import{Mic as y,MicOffCircle as I,Call as A}from"@vicons/ionicons5";import{avFinishApi as k}from"../api/index.js";import"@vueuse/core";import{$message as E}from"../utils/index.js";import"lodash-es";import{AV_STATUS as V,CHAT_TYPE as R}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 S}from"../hooks/useVideo.js";import C from"trtc-sdk-v5";var M,b,x,L;const T={class:"video-wrapper"},j={class:"user"},_={class:"name"},N={class:"tip"},H={class:"opt-btn"},D={class:"btn"},z=e("span",null,(null==(M=window.getLanguageByCode)?void 0:M.call(window,"10010.1.104"))||"静音",-1),B=e("span",null,(null==(b=window.getLanguageByCode)?void 0:b.call(window,"10010.1.113"))||"拒接",-1),U={class:"btn"},F=e("span",null,(null==(x=window.getLanguageByCode)?void 0:x.call(window,"10010.1.125"))||"挂断",-1),O=e("span",null,(null==(L=window.getLanguageByCode)?void 0:L.call(window,"10010.1.114"))||"接听",-1);var P=o({__name:"Video",setup(o){const{sendMessage:M,state:b,trtcProxy:x,trtc:L,timing:P,voiceOpen:G,isAudio:J,isCall:$,startTimer:q,resetTimer:K,toggleAudio:Q,messageTypeText:W,time:X,installEventHandlers:Y,uninstallEventHandlers:Z}=S(),ee=n(),oe=n(),ne=n(!1);let se=null;const te=s((()=>{var e,o,n;return $.value?{avatar:b.currentSessionItem.avatar,name:b.currentSessionItem.name,userId:b.currentSessionItem.receiver}:{avatar:null==(e=b.currentAVMsg.currentMsg)?void 0:e.senderAvatar,name:null==(o=b.currentAVMsg.currentMsg)?void 0:o.senderName,userId:null==(n=b.currentAVMsg.currentMsg)?void 0:n.sender}})),re=s((()=>ne.value?J.value?P.value:"":$.value?"正在呼叫...":`邀请你${W.value}问诊...`)),ae=s((()=>{var e,o;return null==(o=null==(e=b.currentAVMsg.currentMsg)?void 0:e.content)?void 0:o.avStatus}));async function le(e=V.FINISHED){M({chatType:R.SINGLE,content:{msg:e===V.FINISHED?""+X.seconds:"s",chatMessageType:b.currentAVMsg.chatMessageType,avStatus:e},receiver:te.value.userId}),await k({recordId:b.currentAVMsg.currentMsg.id,status:e,duration:e===V.FINISHED?X.seconds:0})}async function ie(){const e=await C.isSupported();if(!e.result||!e.detail.isH264EncodeSupported||!e.detail.isH264DecodeSupported)return console.log("checkResult :>> ",e),void(b.showVideo=!1);try{if(await L.enterRoom({strRoomId:b.currentAVMsg.strRoomId,sdkAppId:parseInt(b.userInfo.sdkAppID),userId:b.userInfo.id,userSig:b.userInfo.userSig,proxy:x.value}),$.value||(ne.value=!0,q()),Y({handleError:ge,handleRemoteUserEnter:me,handleRemoteAudioAvailable:ve,handleRemoteUserExit:pe,handleRemoteVideoAvailable:de}),await L.startLocalAudio(),J.value)return;await L.startLocalVideo({view:oe.value})}catch(e){console.log("error :>> ",e),E.error(e),b.showVideo=!1}}function ce(){$.value&&!ne.value?le(V.CANCELED):le()}async function ue(){try{if(b.showVideo=!1,Z({handleError:ge,handleRemoteUserEnter:me,handleRemoteAudioAvailable:ve,handleRemoteUserExit:pe,handleRemoteVideoAvailable:de}),await L.exitRoom(),await L.stopLocalAudio(),J.value)return;await L.stopLocalVideo()}catch(e){console.log("error :>> ",e)}}async function de(e){const{userId:o,streamType:n}=e;try{await L.startRemoteVideo({userId:o,streamType:n,view:ee.value})}catch(e){console.log("error :>> ",e)}}function ve(e){}function me(){ne.value=!0,q()}function pe(e){console.log("event :>> 对方已挂断",e),ue()}function ge(e){console.log("error :>> ",e),b.showVideo=!1}return t((()=>ae.value),(e=>{b.showVideo&&(e===V.IN_CALL?async function(){$.value?ie():(se&&clearTimeout(se),se=setTimeout((async()=>{ne.value||le(V.NO_RESPONSE)}),6e4))}():ue())}),{immediate:!0}),r((()=>{ue()})),(o,n)=>(a(),l("div",T,[i(e("div",{class:"video-box",ref_key:"videoRef",ref:ee},null,512),[[c,ne.value]]),i(e("div",{class:"video-box--self",ref_key:"selfVideoRef",ref:oe},null,512),[[c,ne.value]]),i(e("div",j,[u(d(f),{size:58,round:"",src:d(te).avatar},null,8,["src"]),e("span",_,v(d(te).name),1),e("span",N,v(d(re)),1)],512),[[c,d(J)||!ne.value]]),e("div",H,[e("div",D,[d($)&&!ne.value||ne.value?(a(),l(m,{key:0},[u(d(w),{circle:"",onClick:d(Q),class:p({bordered:d(G)})},{icon:g((()=>[u(d(h),{size:"30",color:d(G)?"#fff":"#626262",component:d(G)?d(y):d(I)},null,8,["color","component"])])),_:1},8,["onClick","class"]),z],64)):(a(),l(m,{key:1},[u(d(w),{circle:"",color:"#f17568",class:"btn--rotate",onClick:n[0]||(n[0]=()=>le(d(V).REJECTED))},{icon:g((()=>[u(d(h),{size:"30",component:d(A)},null,8,["component"])])),_:1}),B],64))]),e("div",U,[d($)&&!ne.value||ne.value?(a(),l(m,{key:0},[u(d(w),{circle:"",color:"#f17568",class:"btn--rotate",onClick:ce},{icon:g((()=>[u(d(h),{size:"30",component:d(A)},null,8,["component"])])),_:1}),F],64)):(a(),l(m,{key:1},[u(d(w),{circle:"",color:"#2ac98b",onClick:ie},{icon:g((()=>[u(d(h),{size:"30",component:d(A)},null,8,["component"])])),_:1}),O],64))])])]))}});export{P as default};
|
@@ -3,10 +3,11 @@ import { ChatSock } from '../utils/chatSock';
|
|
3
3
|
import { AnyObject } from '../../../../shared/types';
|
4
4
|
export declare const InjectionIChatData: InjectionKey<ReturnType<typeof initData>>;
|
5
5
|
export declare function initData(props: AnyObject, emit: (event: 'template-click' | 'unread-message-update' | 'session-change' | 'session-close', ...args: any[]) => void): {
|
6
|
+
filterable: import("vue").Ref<any>;
|
7
|
+
trtcProxy: import("vue").Ref<any>;
|
6
8
|
cssVars: import("vue").ComputedRef<AnyObject>;
|
7
9
|
stompClient: import("vue").Ref<ChatSock | undefined>;
|
8
10
|
state: {
|
9
|
-
filterable: boolean;
|
10
11
|
orgId: string | number;
|
11
12
|
currentSessionItem: AnyObject;
|
12
13
|
id: string;
|
@@ -49,10 +50,11 @@ export declare function initData(props: AnyObject, emit: (event: 'template-click
|
|
49
50
|
emit: (event: 'template-click' | 'unread-message-update' | 'session-change' | 'session-close', ...args: any[]) => void;
|
50
51
|
};
|
51
52
|
export declare const useData: () => {
|
53
|
+
filterable: import("vue").Ref<any>;
|
54
|
+
trtcProxy: import("vue").Ref<any>;
|
52
55
|
cssVars: import("vue").ComputedRef<AnyObject>;
|
53
56
|
stompClient: import("vue").Ref<ChatSock | undefined>;
|
54
57
|
state: {
|
55
|
-
filterable: boolean;
|
56
58
|
orgId: string | number;
|
57
59
|
currentSessionItem: AnyObject;
|
58
60
|
id: string;
|
@@ -1 +1 @@
|
|
1
|
-
import{ref as e,reactive as s,
|
1
|
+
import{ref as e,reactive as s,computed as t,watch as n,toRef as i,inject as r,toRaw as o}from"vue";import{openSessionApi as a,updateStatusApi as c,groupUserApi as u}from"../api/index.js";import{promiseTimeout as m,useIntervalFn as d}from"@vueuse/core";import{isGroup as l,listSort as p,formatTime as g,transformMessage as f,getFileSize as h,simplifyMessage as S}from"../utils/index.js";import{cloneDeep as I,isArray as T,uniqBy as y}from"lodash-es";import{STATUS as v,MESSAGE_TYPE as L,CHAT_TYPE as M}from"../constants/index.js";import{useTheme as E}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 C=Symbol("InjectionIChatData");function N(e){const{lastMessage:s,lastSenderName:t=""}=e,n=S(s)||"";return l(e)&&t?t+": "+n:n}function D(r,S){const C=e(),D=s({orgId:r.orgId,currentSessionItem:{},id:"",userInfo:{id:r.userId},msgList:[],currentMsg:{},isAppendMsg:!1,sessionList:[],isChangeSession:!1,updateSessionItem:{},isUpdateSession:!1,currentReferenceMsg:null,currentReEditMsg:null,showVideo:!1,currentAVMsg:{},currentGroupUser:[],showMultipleVideo:!1}),w=E(),j=t((()=>D.sessionList.reduce(((e,s)=>e+ +s.unreadNum),0))),U=t((()=>l(D.currentSessionItem))),_=t((()=>{var e,s,t;return(null==(e=D.userInfo)?void 0:e.id)===(null==(t=null==(s=D.currentGroupUser)?void 0:s[0])?void 0:t.id)})),G=t((()=>{var e;return(null==(e=D.currentSessionItem)?void 0:e.status)===v.ENDED}));n((()=>j.value),(e=>{!async function s(t=0){if(t>2)return;const n=D.sessionList.filter((e=>{var s;return+(null!=(s=e.unreadNum)?s:0)>0}));n.every((e=>!!e.name))?S("unread-message-update",e,p(n)):(await m(300),s(++t))}()})),n([()=>D.isChangeSession,()=>D.isUpdateSession],(([e,s])=>{e&&(P(D.currentSessionItem),D.currentSessionItem.status===v.REMOVED&&V(),D.isChangeSession=!1),s&&(P(D.updateSessionItem),D.isUpdateSession=!1)}),{immediate:!0});const{pause:R,resume:x,isActive:K}=d((()=>{const e=I(D.msgList);e.some((e=>{const{sendTime:s}=e;return!(Date.now()-new Date(s).getTime()>=36e5)&&(e.__sendTime=g(s).recordTime,!0)})),D.msgList=e,O()||R()}),6e4,{immediate:!1});function O(){return!!D.msgList.length&&D.msgList.some((e=>Date.now()-new Date(e.sendTime).getTime()<36e5))}async function b(e){var s;try{null==(s=C.value)||s.send("/app/chat/send",{},JSON.stringify({chatType:D.currentSessionItem.chatType,receiver:D.currentSessionItem.receiver,...e}))}catch(e){}}function k(e){Object.assign(D.currentSessionItem,e,{lastMessageContent:Reflect.has(e,"lastMessageContent")?e.lastMessageContent:Reflect.has(e,"lastMessage")?N({...e,chatType:e.chatType||D.currentSessionItem.chatType}):D.currentSessionItem.lastMessageContent}),D.isChangeSession=!0,D.id!==D.currentSessionItem.id&&(D.msgList=[],D.id=D.currentSessionItem.id)}function A(e){const s=D.sessionList.find((s=>s.sessionKey===e.sessionKey)),t={...e,lastMessageContent:N({...e,chatType:e.chatType||(null==s?void 0:s.chatType)})};D.updateSessionItem=s?{...I(s),...t}:t,D.isUpdateSession=!0}function V(){if(!D.id)return null;const{currentSessionItem:e}=D;return D.currentSessionItem={},D.msgList=[],D.id="",D.currentGroupUser=[],e}function B(e){D.sessionList=I(y(e,"id")),D.sessionList.forEach((e=>{Object.assign(e,{defaultName:Reflect.has(e,"defaultName")?e.defaultName:e.name||"",lastMessageContent:Reflect.has(e,"lastMessageContent")?e.lastMessageContent:N(e)}),e.receiver===D.userInfo.id&&(e.unreadNum=0),e.chatType!==M.GROUP||e.name||u({id:e.receiver}).then((s=>{T(s)&&(e.name=s.map((e=>e.name)).join(","))}))}))}function P(e){!e.id||D.sessionList.map((e=>e.id)).includes(e.id)?D.sessionList.some((s=>{if(s.sessionKey===e.sessionKey){let{unreadNum:t=0}=s;return Object.assign(s,e),e.sessionKey!==D.currentSessionItem.sessionKey&&s.sender&&s.sender!==D.userInfo.id&&(s.unreadNum=++t),!0}})):B([...D.sessionList,e])}return{filterable:i(r,"filterable"),trtcProxy:i(r,"trtcProxy"),cssVars:w,stompClient:C,state:D,unreadTotal:j,isGroupChat:U,isGroupLeader:_,isEnded:G,setMsgList:function(e=[]){R(),D.msgList=I(e).sort(((e,s)=>new Date(s.sendTime).getTime()-new Date(e.sendTime).getTime())),D.msgList.forEach((e=>{var s,t;Object.assign(e,{__time:g(e.sendTime).msgTime,__content:(t=e.content.chatMessageType,[L.TEXT,L.TEXT,L.BLEND].includes(t)?f(e.content):null==(s=e.content)?void 0:s.msg),__sendTime:g(e.sendTime).recordTime}),e.content.chatMessageType!==L.FILE||e.__size||h(e.content.fileUrl).then((s=>{e.__size=s}))})),O()&&x()},sendMessage:b,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=D.sessionList.find((e=>e.receiver===i));r||await a({chatType:M.SINGLE,receiver:i,sender:D.userInfo.id});const o=(null==r?void 0:r.chatType)||M.SINGLE;b({chatType:o,receiver:i,content:n}),await m(100),t&&b({chatType:o,receiver:i,content:{chatMessageType:L.TEXT,msg:t}}),await m(100)}},openSession:async function(e){try{const s="string"==typeof e?D.sessionList.find((s=>s.id===e)):e;if(!s)return;s.status===v.REMOVED&&(await c({id:s.id,status:v.ENABLED}),A({...s,status:v.ENABLED}),s.status=v.ENABLED);const t=D.currentSessionItem.sessionKey;if(k(s),t===D.currentSessionItem.sessionKey)return;if(U.value){const e=await u({id:s.receiver});D.currentGroupUser=T(e)?e:[]}else D.currentGroupUser=y([D.userInfo,{...I(s),id:s.receiver}],"id");S("session-change",{...o(D.currentSessionItem),userList:D.currentGroupUser.map((e=>o(e)))})}catch(e){console.log("error---\x3e",e)}},closeSession:V,getCurrentSession:function(){return D.id?D.currentSessionItem:null},setCurrentSessionItem:k,setUpdateSessionItem:A,setSessionList:B,emit:S}}const w=()=>r(C);export{C as InjectionIChatData,D as initData,w as useData};
|
@@ -9,7 +9,6 @@ type EventHandlers = {
|
|
9
9
|
};
|
10
10
|
export declare function useVideo(): {
|
11
11
|
state: {
|
12
|
-
filterable: boolean;
|
13
12
|
orgId: string | number;
|
14
13
|
currentSessionItem: import("../../../../shared/types").AnyObject;
|
15
14
|
id: string;
|
@@ -28,6 +27,7 @@ export declare function useVideo(): {
|
|
28
27
|
currentGroupUser: import("../../../../shared/types").AnyObject[];
|
29
28
|
showMultipleVideo: boolean;
|
30
29
|
};
|
30
|
+
trtcProxy: import("vue").Ref<any>;
|
31
31
|
sendMessage: (message: {
|
32
32
|
chatType?: string | undefined;
|
33
33
|
content: import("../../../../shared/types").AnyObject;
|
@@ -1 +1 @@
|
|
1
|
-
import{ref as e,computed as t,onBeforeUnmount as o}from"vue";import{useData as n}from"./useData.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import{MESSAGE_TYPE as a}from"../constants/index.js";import"../api/index.js";import{formatSeconds as i}from"../utils/index.js";import"lodash-es";import l from"trtc-sdk-v5";function E(){const E={timer:null,seconds:0},{state:s,sendMessage:
|
1
|
+
import{ref as e,computed as t,onBeforeUnmount as o}from"vue";import{useData as n}from"./useData.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import{MESSAGE_TYPE as a}from"../constants/index.js";import"../api/index.js";import{formatSeconds as i}from"../utils/index.js";import"lodash-es";import l from"trtc-sdk-v5";function E(){const E={timer:null,seconds:0},{state:r,trtcProxy:s,sendMessage:d}=n(),u=e(""),m=e(!0),c=e(!0),R=t((()=>r.currentAVMsg.chatMessageType===a.AUDIO)),T=t((()=>"call"===r.currentAVMsg.callMode)),v=t((()=>{var e,t;return R.value?(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.130"))||"语音":(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.131"))||"视频"})),A=l.create();function f(){u.value="00:00:00",E.timer&&clearInterval(E.timer),E.timer=null,E.seconds=0}return o((()=>{f()})),{state:r,trtcProxy:s,sendMessage:d,trtc:A,timing:u,voiceOpen:m,videocamOpen:c,isAudio:R,isCall:T,startTimer:function(){f(),E.timer=setInterval((()=>{E.seconds++,u.value=i(E.seconds)}),1e3)},resetTimer:f,toggleAudio:async function(){await A.updateLocalAudio({mute:!m.value}),m.value=!m.value},toggleVideo:async function(){await A.updateLocalVideo({mute:!c.value}),c.value=!c.value},messageTypeText:v,time:E,installEventHandlers:function({handleError:e,handleRemoteUserEnter:t,handleRemoteAudioAvailable:o,handleRemoteUserExit:n,handleRemoteVideoAvailable:a}){A.on(l.EVENT.ERROR,e),A.on(l.EVENT.REMOTE_USER_ENTER,t),A.on(l.EVENT.REMOTE_AUDIO_AVAILABLE,o),A.on(l.EVENT.REMOTE_USER_EXIT,n),R.value||A.on(l.EVENT.REMOTE_VIDEO_AVAILABLE,a)},uninstallEventHandlers:function({handleError:e,handleRemoteUserEnter:t,handleRemoteAudioAvailable:o,handleRemoteUserExit:n,handleRemoteVideoAvailable:a}){A.off(l.EVENT.ERROR,e),A.off(l.EVENT.REMOTE_USER_ENTER,t),A.off(l.EVENT.REMOTE_AUDIO_AVAILABLE,o),A.off(l.EVENT.REMOTE_USER_EXIT,n),R.value||A.off(l.EVENT.REMOTE_VIDEO_AVAILABLE,a)}}}export{E as useVideo};
|
@@ -1,8 +1,6 @@
|
|
1
|
-
import { Ref } from 'vue';
|
2
1
|
import { AnyObject } from '../../../../shared/types';
|
3
2
|
import { UploadFileInfo } from 'naive-ui';
|
4
3
|
export type IState = {
|
5
|
-
filterable: Ref<boolean>;
|
6
4
|
orgId: number | string;
|
7
5
|
currentSessionItem: AnyObject;
|
8
6
|
id: string;
|
@@ -25,3 +23,16 @@ export type FileOptions = {
|
|
25
23
|
file: UploadFileInfo;
|
26
24
|
fileList: Array<UploadFileInfo>;
|
27
25
|
};
|
26
|
+
type TurnServer = {
|
27
|
+
url: string;
|
28
|
+
username?: string;
|
29
|
+
credential?: string;
|
30
|
+
credentialType?: string;
|
31
|
+
};
|
32
|
+
export type ProxyServer = Partial<{
|
33
|
+
websocketProxy: string;
|
34
|
+
loggerProxy: string;
|
35
|
+
turnServer: Array<TurnServer>;
|
36
|
+
iceTransportPolicy: 'all' | 'relay';
|
37
|
+
}>;
|
38
|
+
export {};
|
Binary file
|