cnhis-design-vue 3.3.1-beta.3 → 3.3.1-beta.44
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 +289 -68
- package/es/components/ai-chat/src/Index.vue.d.ts +289 -68
- package/es/components/ai-chat/src/Index.vue2.js +1 -1
- package/es/components/ai-chat/src/api/index.d.ts +5 -3
- package/es/components/ai-chat/src/api/index.js +1 -1
- package/es/components/ai-chat/src/components/ChatAudio.vue.d.ts +9 -15
- package/es/components/ai-chat/src/components/ChatAudio.vue2.js +1 -1
- package/es/components/ai-chat/src/components/ChatBI.vue.d.ts +2 -2
- package/es/components/ai-chat/src/components/ChatBI.vue2.js +1 -1
- package/es/components/ai-chat/src/components/ChatCard.js +1 -1
- package/es/components/ai-chat/src/components/ChatFooter.vue.d.ts +46 -55
- 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/src/components/ChatMainDefault.js +1 -0
- package/es/components/ai-chat/src/components/ChatPatient.vue.d.ts +2 -2
- package/es/components/ai-chat/src/components/ChatPatient.vue2.js +1 -1
- package/es/components/ai-chat/src/components/ChatPrompt.vue.d.ts +2 -2
- package/es/components/ai-chat/src/components/ChatPrompt.vue2.js +1 -1
- package/es/components/ai-chat/src/components/ChatRight.vue.d.ts +6 -5
- package/es/components/ai-chat/src/components/ChatRight.vue2.js +1 -1
- package/es/components/ai-chat/src/components/card/JsonCard.js +1 -1
- package/es/components/ai-chat/src/components/{card/SelectIcon.d.ts → message-render/CardRender.d.ts} +9 -7
- package/es/components/ai-chat/src/components/message-render/CardRender.js +1 -0
- package/es/components/ai-chat/src/components/message-render/FormRender.d.ts +16 -0
- package/es/components/ai-chat/src/components/message-render/FormRender.js +1 -0
- package/es/components/ai-chat/src/components/mobile/MobileChatAudio.vue.d.ts +36 -0
- package/es/components/ai-chat/src/components/mobile/MobileChatAudio.vue.js +1 -0
- package/es/components/ai-chat/src/components/mobile/MobileChatAudio.vue2.js +1 -0
- package/es/components/ai-chat/src/components/mobile/MobileChatFooter.vue.d.ts +105 -0
- package/es/components/ai-chat/src/components/mobile/MobileChatFooter.vue.js +1 -0
- package/es/components/ai-chat/src/components/mobile/MobileChatFooter.vue2.js +1 -0
- package/es/components/ai-chat/src/components/svgs/AddIcon.vue.js +1 -0
- package/es/components/ai-chat/src/components/svgs/AudioIcon.vue.js +1 -0
- package/es/components/ai-chat/src/components/svgs/KeyboardIcon.vue.js +1 -0
- package/es/components/ai-chat/src/components/svgs/MicroPhone.vue.js +1 -0
- package/es/components/ai-chat/src/hooks/index.d.ts +2 -0
- package/es/components/ai-chat/src/hooks/index.js +1 -0
- package/es/components/ai-chat/src/hooks/useChartAudioContext.d.ts +18 -0
- package/es/components/ai-chat/src/hooks/useChartAudioContext.js +1 -0
- package/es/components/ai-chat/src/hooks/useData.d.ts +77 -0
- package/es/components/ai-chat/src/hooks/useData.js +1 -0
- package/es/components/ai-chat/src/hooks/useFooterContext.d.ts +38 -0
- package/es/components/ai-chat/src/hooks/useFooterContext.js +1 -0
- package/es/components/ai-chat/src/hooks/useProgram.d.ts +12 -4
- package/es/components/ai-chat/src/hooks/useProgram.js +1 -1
- package/es/components/ai-chat/src/hooks/useSSE.d.ts +9 -0
- package/es/components/ai-chat/src/hooks/useSSE.js +1 -0
- package/es/components/ai-chat/src/hooks/useWebsocket.d.ts +3 -1
- package/es/components/ai-chat/src/hooks/useWebsocket.js +1 -1
- package/es/components/ai-chat/src/types/index.d.ts +1 -3
- package/es/components/ai-chat/src/types/index.js +1 -1
- package/es/components/ai-chat/src/utils/index.d.ts +6 -1
- package/es/components/ai-chat/src/utils/index.js +1 -1
- package/es/components/ai-chat/style/index.css +1 -1
- package/es/components/audio-sdk/index.d.ts +274 -2
- package/es/components/audio-sdk/index.js +1 -1
- package/es/components/audio-sdk/src/Index.vue.d.ts +274 -0
- package/es/components/audio-sdk/src/Index.vue.js +1 -0
- package/es/components/audio-sdk/src/Index.vue2.js +1 -0
- package/es/components/audio-sdk/src/audioSDK.d.ts +59 -26
- package/es/components/audio-sdk/src/audioSDK.js +1 -1
- package/es/components/audio-sdk/src/components/form.vue.d.ts +51 -0
- package/es/components/audio-sdk/src/components/recording-modal.vue.d.ts +100 -0
- package/es/components/audio-sdk/src/components/recording-modal.vue.js +1 -0
- package/es/components/audio-sdk/src/components/recording-modal.vue2.js +1 -0
- package/es/components/audio-sdk/src/components/recording.vue.d.ts +53 -4
- package/es/components/audio-sdk/src/components/recording.vue2.js +1 -1
- package/es/components/audio-sdk/src/utils/index.d.ts +7 -0
- package/es/components/audio-sdk/src/utils/index.js +1 -0
- package/es/components/audio-sdk/src/utils/recordingModal.d.ts +7 -4
- package/es/components/audio-sdk/src/utils/recordingModal.js +1 -1
- package/es/components/audio-sdk/style/index.css +1 -1
- package/es/components/button-print/index.d.ts +30 -0
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +30 -0
- package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
- package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +9 -0
- package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
- package/es/components/button-print/src/components/OldPrintComponent.vue.d.ts +9 -0
- package/es/components/button-print/src/components/OldPrintComponent.vue2.js +1 -1
- package/es/components/button-print/src/utils/print.d.ts +2 -2
- package/es/components/button-print/src/utils/print.js +1 -1
- package/es/components/calendar/index.d.ts +126 -3
- package/es/components/calendar/src/Calendar.vue.d.ts +126 -2
- package/es/components/callback/src/components/render/popupMaps.d.ts +7 -1
- package/es/components/card-reader-sdk/src/cardReaderSDK.d.ts +4 -8
- package/es/components/card-reader-sdk/src/cardReaderSDK.js +1 -1
- package/es/components/card-render/src/components/Button.vue.d.ts +3 -0
- package/es/components/card-render/src/components/Button.vue2.js +1 -1
- package/es/components/card-render/src/components/ScaleView.vue.d.ts +39 -0
- package/es/components/card-render/src/components/ScaleView.vue.js +1 -0
- package/es/components/card-render/src/components/ScaleView.vue2.js +1 -0
- package/es/components/card-render/src/components/Table.vue.d.ts +104 -0
- package/es/components/card-render/src/components/Table.vue.js +1 -0
- package/es/components/card-render/src/components/Table.vue2.js +1 -0
- package/es/components/card-render/src/components/Text.vue.d.ts +1 -0
- package/es/components/card-render/src/components/Text.vue2.js +1 -1
- package/es/components/card-render/src/components/index.d.ts +139 -0
- package/es/components/card-render/src/components/index.js +1 -1
- package/es/components/card-render/src/constants/index.d.ts +4 -1
- package/es/components/card-render/src/constants/index.js +1 -1
- package/es/components/card-render/style/index.css +1 -1
- package/es/components/date-picker/src/DatePicker.vue2.js +1 -1
- package/es/components/fabric-chart/index.d.ts +6 -2
- package/es/components/fabric-chart/src/FabricChart.vue.d.ts +6 -2
- package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
- package/es/components/field-editor/index.d.ts +7 -1
- package/es/components/field-editor/src/FieldEditor.vue.d.ts +7 -1
- package/es/components/field-set/src/FieldColor.vue.d.ts +1 -1
- package/es/components/field-set/src/FieldFilter.vue.d.ts +1 -1
- package/es/components/field-set/src/FieldSet.vue.d.ts +1 -1
- package/es/components/field-set/src/components/table-row.vue.d.ts +1 -1
- package/es/components/form-config/index.d.ts +73 -13
- package/es/components/form-config/src/FormConfig.vue.d.ts +73 -13
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +7 -1
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +45 -9
- package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +15 -3
- package/es/components/form-render/index.d.ts +7 -1
- package/es/components/form-render/index.js +1 -1
- package/es/components/form-render/src/FormRender.vue.d.ts +7 -1
- package/es/components/form-render/src/FormRender.vue2.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +7 -1
- package/es/components/form-render/src/components/renderer/date.d.ts +4 -2
- package/es/components/form-render/src/components/renderer/date.js +1 -1
- package/es/components/form-render/src/components/renderer/formItem.d.ts +2 -0
- package/es/components/form-render/src/components/renderer/formItem.js +1 -1
- package/es/components/form-render/src/components/renderer/input.d.ts +5 -0
- package/es/components/form-render/src/components/renderer/input.js +1 -1
- package/es/components/form-render/src/components/renderer/levelSearchCascader/index.d.ts +9 -0
- package/es/components/form-render/src/components/renderer/levelSearchCascader/index.js +1 -1
- package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +14 -1
- package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +14 -1
- package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
- package/es/components/form-render/src/components/renderer/select.d.ts +5 -0
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/components/tooltipMessage.vue.d.ts +12 -1
- package/es/components/form-render/src/components/tooltipMessage.vue2.js +1 -1
- package/es/components/form-render/src/hooks/useBusinessBinding.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +4 -0
- package/es/components/form-render/src/hooks/useLowCodeReactions.js +1 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +9 -3
- package/es/components/form-render/src/types/index.d.ts +2 -0
- package/es/components/form-render/src/utils/index.d.ts +1 -0
- package/es/components/form-render/src/utils/index.js +1 -1
- package/es/components/form-render/style/index.css +1 -1
- package/es/components/guide/src/renderer.d.ts +2 -2
- package/es/components/iho-chat/index.d.ts +206 -4
- package/es/components/iho-chat/src/Index.vue.d.ts +206 -4
- package/es/components/iho-chat/src/api/index.d.ts +1 -0
- package/es/components/iho-chat/src/api/index.js +1 -1
- package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +8 -0
- package/es/components/iho-chat/src/components/ChatAdd.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatFile.vue.d.ts +11 -3
- package/es/components/iho-chat/src/components/ChatFile.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +7 -0
- package/es/components/iho-chat/src/components/ChatFooter.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +96 -2
- package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +77 -0
- package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatRecord.vue.d.ts +71 -1
- package/es/components/iho-chat/src/components/ChatRecord.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatSearch.vue.d.ts +8 -2
- package/es/components/iho-chat/src/components/ChatSearch.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatSet.vue.d.ts +10 -0
- package/es/components/iho-chat/src/components/ChatSet.vue2.js +1 -1
- package/es/components/iho-chat/src/components/MessageMergeForward.vue.d.ts +70 -1
- package/es/components/iho-chat/src/components/MessageMergeForward.vue2.js +1 -1
- package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +7 -0
- package/es/components/iho-chat/src/components/PersonProfile.vue.d.ts +3 -0
- package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
- package/es/components/iho-chat/src/components/SiderList.vue.d.ts +3 -1
- package/es/components/iho-chat/src/components/SiderList.vue2.js +1 -1
- package/es/components/iho-chat/src/constants/index.d.ts +9 -2
- package/es/components/iho-chat/src/constants/index.js +1 -1
- package/es/components/iho-chat/src/hooks/useSearchPatientList.d.ts +11 -0
- package/es/components/iho-chat/src/hooks/useSearchPatientList.js +1 -0
- package/es/components/iho-chat/src/utils/chatSock.js +1 -1
- package/es/components/iho-chat/src/utils/index.d.ts +6 -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/iho-table/index.d.ts +3 -0
- package/es/components/iho-table/index.js +1 -1
- package/es/components/iho-table/src/IhoTable.vue2.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/index.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.d.ts +3 -3
- package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.js +1 -1
- package/es/components/iho-table/src/hooks/useTablePlugin.js +1 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/headerPlugin/index.d.ts +1 -1
- package/es/components/iho-table/src/plugins/headerPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/highLightSetPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/index.d.ts +79 -3
- package/es/components/iho-table/src/plugins/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useSelectOption.d.ts +7 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useSelectOption.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.d.ts +1 -2
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/checkRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/stickyFixedPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/varialbleHeightPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/utils.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +1 -0
- package/es/components/iho-table/src/types/pluginType.d.ts +2 -2
- package/es/components/iho-table/src/utils/index.js +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/info-header/index.d.ts +24 -2
- package/es/components/info-header/src/InfoHeader.vue.d.ts +24 -2
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +2 -0
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +2 -0
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +9 -1
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +7 -1
- package/es/components/scale-view/index.d.ts +17 -3
- package/es/components/scale-view/src/ScaleView.vue.d.ts +17 -3
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/scale-view/src/components/EvaluateCountdown.vue.d.ts +1 -1
- package/es/components/scale-view/src/hooks/scaleview-computed.js +1 -1
- package/es/components/scale-view/src/hooks/scaleview-init.d.ts +3 -1
- package/es/components/scale-view/src/hooks/scaleview-init.js +1 -1
- package/es/components/scale-view/src/hooks/scaleview-props.d.ts +4 -0
- package/es/components/scale-view/src/hooks/scaleview-props.js +1 -1
- package/es/components/scale-view/src/hooks/use-component.d.ts +1 -2189
- package/es/components/shortcut-provider/src/ShortcutProvider.vue2.js +1 -1
- package/es/components/shortcut-setter/index.d.ts +15 -3
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +15 -3
- package/es/components/steps-wheel/index.d.ts +18 -0
- package/es/components/steps-wheel/src/StepsWheel.vue.d.ts +18 -0
- package/es/components/steps-wheel/src/StepsWheel.vue2.js +1 -1
- package/es/shared/assets/img/use.png.js +1 -1
- package/es/shared/components/ArrowIcon/ArrowIcon.vue.js +1 -0
- package/es/shared/components/ArrowIcon/index.d.ts +2 -0
- package/es/shared/components/ArrowIcon/index.js +1 -0
- package/es/shared/components/DateIcon/DateIcon.vue.js +1 -0
- package/es/shared/components/DateIcon/index.d.ts +2 -0
- package/es/shared/components/DateIcon/index.js +1 -0
- package/es/shared/hooks/useLevelSearchCascader.d.ts +1 -0
- package/es/shared/hooks/useLevelSearchCascader.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/package.json +5 -3
- package/es/components/ai-chat/src/components/ChatMainInner.js +0 -1
- package/es/components/ai-chat/src/components/card/SelectIcon.js +0 -1
- /package/es/components/ai-chat/src/components/{ChatMainInner.d.ts → ChatMainDefault.d.ts} +0 -0
@@ -71,6 +71,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
71
71
|
renderToolbar: ({ nodes }: ImageRenderToolbarProps) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
72
72
|
[key: string]: any;
|
73
73
|
}>[];
|
74
|
+
formatImage: (obj: AnyObject | string, type: string) => any;
|
74
75
|
getHistoryRecord: () => Promise<void>;
|
75
76
|
handleSelectLabel: (event: MouseEvent, msgId: string) => void;
|
76
77
|
handleContextmenu: (event: MouseEvent, msgId: string) => Promise<void>;
|
@@ -275,17 +276,86 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
275
276
|
};
|
276
277
|
isForward: boolean;
|
277
278
|
};
|
279
|
+
cssVars: import("vue").ComputedRef<AnyObject>;
|
278
280
|
msgItem: import("vue").ComputedRef<AnyObject>;
|
279
281
|
msgList: import("vue").ComputedRef<any>;
|
280
282
|
NModal: any;
|
281
283
|
NAvatar: any;
|
284
|
+
NIcon: any;
|
285
|
+
isArray: {
|
286
|
+
(value?: any): value is any[];
|
287
|
+
<T>(value?: any): value is any[];
|
288
|
+
};
|
282
289
|
formatTime: typeof import("../utils").formatTime;
|
283
290
|
getForwardTitle: typeof getForwardTitle;
|
291
|
+
isDoctorRole: typeof import("../utils").isDoctorRole;
|
292
|
+
getRoleName: typeof import("../utils").getRoleName;
|
293
|
+
getFileDetails: typeof import("../utils").getFileDetails;
|
294
|
+
getFileType: typeof import("../utils").getFileType;
|
295
|
+
getDetail: typeof import("../utils").getDetail;
|
296
|
+
showAudioAndVideoRecord: typeof import("../utils").showAudioAndVideoRecord;
|
297
|
+
simplifyMessage: typeof simplifyMessage;
|
284
298
|
MESSAGE_TYPE: typeof MESSAGE_TYPE;
|
285
299
|
emojis: {
|
286
300
|
default: string[][];
|
287
301
|
findEmoji(name: string): any;
|
288
302
|
};
|
303
|
+
MessageEvent: import("vue").DefineComponent<{
|
304
|
+
data: {
|
305
|
+
type: import("vue").PropType<AnyObject>;
|
306
|
+
required: true;
|
307
|
+
};
|
308
|
+
}, {
|
309
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
310
|
+
data: {
|
311
|
+
type: import("vue").PropType<AnyObject>;
|
312
|
+
required: true;
|
313
|
+
};
|
314
|
+
}>> & {}>>;
|
315
|
+
state: {
|
316
|
+
orgId: string | number;
|
317
|
+
currentSessionItem: AnyObject;
|
318
|
+
id: string;
|
319
|
+
userInfo: AnyObject;
|
320
|
+
msgList: AnyObject[];
|
321
|
+
currentMsg: AnyObject;
|
322
|
+
isAppendMsg: boolean;
|
323
|
+
sessionList: AnyObject[];
|
324
|
+
isChangeSession: boolean;
|
325
|
+
updateSessionItem: AnyObject;
|
326
|
+
isUpdateSession: boolean;
|
327
|
+
currentReferenceMsg: AnyObject | null;
|
328
|
+
currentReEditMsg: AnyObject | null;
|
329
|
+
showVideo: boolean;
|
330
|
+
currentAVMsg: AnyObject;
|
331
|
+
currentGroupUser: AnyObject[];
|
332
|
+
showMultipleVideo: boolean;
|
333
|
+
userDetail: {
|
334
|
+
show: boolean;
|
335
|
+
position: {
|
336
|
+
x: number;
|
337
|
+
y: number;
|
338
|
+
};
|
339
|
+
userId: string;
|
340
|
+
info: AnyObject | null;
|
341
|
+
};
|
342
|
+
isForward: boolean;
|
343
|
+
};
|
344
|
+
setUserDetail: (event: MouseEvent, userDetail: AnyObject) => void;
|
345
|
+
inviter: import("vue").Ref<any>;
|
346
|
+
invitee: import("vue").Ref<any[]>;
|
347
|
+
isValidJSON: (str: string) => boolean;
|
348
|
+
getTask: (_id: string | number, arrRes: AnyObject[]) => () => Promise<unknown>;
|
349
|
+
getEventContent: (data: AnyObject) => Promise<void>;
|
350
|
+
NButton: any;
|
351
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
352
|
+
data: {
|
353
|
+
type: import("vue").PropType<AnyObject>;
|
354
|
+
required: true;
|
355
|
+
};
|
356
|
+
}>>, {}>;
|
357
|
+
CallOutline: 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<{}>>, {}>;
|
358
|
+
VideocamOutline: 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<{}>>, {}>;
|
289
359
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
290
360
|
id: {
|
291
361
|
type: StringConstructor;
|
@@ -482,6 +552,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
482
552
|
remark: import("vue").Ref<string>;
|
483
553
|
currentTab: import("vue").Ref<AnyObject[]>;
|
484
554
|
breadcrumbList: import("vue").Ref<AnyObject[]>;
|
555
|
+
breadcrumbRef: import("vue").Ref<any>;
|
485
556
|
userList: import("vue").Ref<AnyObject[]>;
|
486
557
|
handleInput: () => void;
|
487
558
|
_disabledIds: import("vue").ComputedRef<any[]>;
|
@@ -490,18 +561,21 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
490
561
|
name: any;
|
491
562
|
avatar: any;
|
492
563
|
chatType: any;
|
564
|
+
roleInfo: any;
|
493
565
|
}[]>;
|
494
566
|
friends: import("vue").ComputedRef<{
|
495
567
|
id: any;
|
496
568
|
name: any;
|
497
569
|
avatar: any;
|
498
570
|
chatType: any;
|
571
|
+
roleInfo: any;
|
499
572
|
}[]>;
|
500
573
|
groups: import("vue").ComputedRef<{
|
501
574
|
id: any;
|
502
575
|
name: any;
|
503
576
|
avatar: any;
|
504
577
|
chatType: any;
|
578
|
+
roleInfo: any;
|
505
579
|
}[]>;
|
506
580
|
checkedIds: import("vue").ComputedRef<any[]>;
|
507
581
|
btnDisabled: import("vue").ComputedRef<boolean>;
|
@@ -510,6 +584,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
510
584
|
currentTabKey: import("vue").ComputedRef<any>;
|
511
585
|
showAllCheckbox: import("vue").ComputedRef<boolean>;
|
512
586
|
getOrgList: () => Promise<void>;
|
587
|
+
handleSearchInput: () => void;
|
513
588
|
setUserTotal: (tree: AnyObject[]) => void;
|
514
589
|
getDisabled: (id: string | number) => boolean;
|
515
590
|
handleClickCheckbox: (option: AnyObject) => Promise<void>;
|
@@ -539,6 +614,8 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
539
614
|
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<{}>>, {}>;
|
540
615
|
ChevronForwardOutline: 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<{}>>, {}>;
|
541
616
|
last: <T_1>(array: import("lodash").List<T_1> | null | undefined) => T_1 | undefined;
|
617
|
+
isDoctorRole: typeof import("../utils").isDoctorRole;
|
618
|
+
getRoleName: typeof import("../utils").getRoleName;
|
542
619
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
543
620
|
title: {
|
544
621
|
type: StringConstructor;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,ref as n,reactive as t,computed as s,watch as o,openBlock as i,createElementBlock as a,normalizeClass as l,unref as r,normalizeStyle as c,createVNode as u,withCtx as d,Fragment as m,renderList as p,toDisplayString as g,createCommentVNode as y,createBlock as v,createElementVNode as f,createTextVNode as h,withModifiers as k,nextTick as w}from"vue";import{NImageGroup as T,NButton as M,NCheckbox as C,NAvatar as _,NImage as x,NIcon as L,NSpace as I,NButtonGroup as b,NTooltip as j}from"naive-ui";import{format as E}from"date-fns";import{getHistoryRecordApi as S,readMessageApi as z}from"../api/index.js";import{useData as A}from"../hooks/useData.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import{MESSAGE_TYPE as D}from"../constants/index.js";import{isAudioOrVideoMessage as R,simplifyMessage as H,getForwardTitle as N,getAVTime as O,downloadFile as B}from"../utils/index.js";import{first as F,last as U,isArray as q,toString as W}from"lodash-es";import"trtc-sdk-v5";import P from"./MessageTemplate.vue.js";import J from"./MessageEvent.vue.js";import X from"./MessageMergeForward.vue.js";import G from"./SelectLabel.vue.js";import{emojis as K}from"../utils/emoji.js";import Y from"./ContextMenu.js";import V 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 $,VideocamOutline as Q,DocumentSharp as Z,HappyOutline as ee,ChatbubbleEllipsesOutline as ne,EllipsisHorizontal as te,ArrowDownSharp as se}from"@vicons/ionicons5";import{useScrollLoading as oe}from"../../../../shared/hooks/useScrollLoading.js";const ie={key:0,class:"tip-text"},ae={key:1,class:"tip-text"},le=["onClick"],re={class:"message-box"},ce={key:0,class:"content-box"},ue={class:"name-box"},de=["data-time"],me=["onContextmenu"],pe={key:0,class:"reference-content"},ge=["innerHTML"],ye=["src"],ve=["innerHTML"],fe=["innerHTML"],he=["onClick"],ke={class:"merge-msg-contents"},we={style:{"margin-left":"8px"}},Te={class:"size"},Me=["src"],Ce={key:0};var _e=e({__name:"ChatMain",setup(e){const _e=n(),{state:xe,setMsgList:Le,relayMessage:Ie,setCurrentSessionItem:be,setMessageLabel:je,setUserDetail:Ee,isGroupChat:Se}=A(),ze=n(),Ae=n(!1),De=n({left:0,top:0}),Re=n(),He=n(),Ne=n(!1),Oe=t({x:0,y:0}),Be=n(!1),Fe={page:0,hasMore:!0,lastSendTime:E(new Date,"yyyy-MM-dd HH:mm:ss")},Ue=s((()=>({"--c-tip-top":Se.value?"1px":"-20px","--c-tip-gap":Se.value?"10px":"0px"})));function qe({nodes:e}){var n,t;const{_ctx:s}=null==(n=e.download)?void 0:n.children,o=s?null==(t=null==s?void 0:s.proxy)?void 0:t.previewSrc:"";return[e.prev,e.next,e.rotateCounterclockwise,e.rotateClockwise,e.resizeToOriginalSize,e.zoomOut,e.zoomIn,u(j,null,{trigger:()=>u(L,{style:"cursor: pointer",color:"rgba(255, 255, 255, 0.75",size:24,component:se,onClick:()=>o&&B(o,"img")},null),default:()=>{var e;return(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.102"))||"下载"}}),e.close]}async function We(){try{if(!Fe.hasMore)return;Fe.page++;const e=await S({sessionKey:xe.currentSessionItem.sessionKey,page:Fe.page,lastSendTime:Fe.lastSendTime});if(!Array.isArray(e)||0===e.length)return Fe.hasMore=!1,console.log("接口返回不是一个数组,或者没有更多消息了");const n=F(e).id;Fe.lastSendTime=U(e).sendTime,Le(Fe.page>1?[...xe.msgList,...e]:e),1===Fe.page&&xe.currentSessionItem.unreadNum&&(await z({chatType:xe.currentSessionItem.chatType,messageIdSet:[n],receiver:xe.userInfo.id,sender:xe.currentSessionItem.receiver}),be({unreadNum:0}))}catch(e){console.log(e)}}async function Pe(e,n){Re.value=n,async function(e){var n,t,s,o,i,a;Ae.value=!0,await w();const{clientX:l,clientY:r}=e,{width:c=0,height:u=0,left:d=0,top:m=0}=(null==(n=_e.value)?void 0:n.getBoundingClientRect())||{},p=null!=(o=null==(s=null==(t=ze.value)?void 0:t.$el)?void 0:s.getBoundingClientRect().height)?o:220,g=null!=(a=null==(i=_e.value)?void 0:i.scrollTop)?a:0,y=5,v={};l<=d+c/2?v.left=l-d+y+"px":v.right=d+c-l-y+"px";r-m<p/2?v.top=g+y+"px":m+u-r<=p/2?v.bottom=Math.abs(g)+y+"px":v.top=g+r-m-p/2+"px";De.value=v}(e)}function Je(e){const{chatMessageType:n,messageTemplate:t}=e.content;return n!==D.TEMPLATE||!!t}function Xe(e){const{chatMessageType:n}=e.content;return e.sender===xe.userInfo.id&&Date.now()-new Date(e.sendTime).getTime()<864e5&&[D.TEXT,D.EMOJI].includes(n)}function Ge(e){const{chatMessageType:n,msg:t=""}=e.content;if(n===D.BLEND){const e=W(t).match(/<img[^>]*>/gi);return!e||!e.length}return n&&[D.TEXT,D.EMOJI].includes(n)}function Ke(e){const{chatMessageType:n,msg:t=""}=e.content,s=W(t).match(/<img[^>]*>/gi);return n===D.BLEND&&s&&s.length}function Ye(e,n){var t,s;const{chatMessageType:o,messageTemplate:i}=e.content;if(o===D.TEMPLATE)return"system"===n?2==(null==(t=null==i?void 0:i.setting)?void 0:t.style.id):2!=(null==(s=null==i?void 0:i.setting)?void 0:s.style.id)}function Ve(e){var n,t;const{chatMessageType:s,messageTemplate:o}=e;return s===D.TEMPLATE&&3==(null==(t=null==(n=null==o?void 0:o.setting)?void 0:n.style)?void 0:t.id)}function $e(e,n){var t;const s=new Date(e.sendTime).getTime(),o=null==(t=xe.msgList[n+1])?void 0:t.sendTime;if(o){return s-new Date(o).getTime()>3e5}return!0}function Qe(e){xe.currentReferenceMsg=e,xe.currentReferenceMsg.content.referenceContent=null,Object.assign(xe.currentReferenceMsg,{chatType:xe.currentSessionItem.chatType,receiver:xe.currentSessionItem.receiver,receiverAvatar:xe.currentSessionItem.avatar,receiverName:xe.currentSessionItem.name})}function Ze(e,n){var t;"reply"!==e?"relay"===e&&(null==(t=He.value)||t.click()):Qe(n)}function en({checkedIds:e,remark:n}){const t=xe.msgList.find((e=>e.id===Re.value));Ie({checkedIds:e,remark:n,contents:[t.content]})}return oe(_e,(()=>{We()}),"top",(()=>{Ne.value=Ae.value=!1})),o((()=>xe.id),(e=>{e&&(xe.currentReferenceMsg=null,Object.assign(Fe,{page:0,hasMore:!0,lastSendTime:E(new Date,"yyyy-MM-dd HH:mm:ss")}),We())}),{immediate:!0}),o((()=>xe.isAppendMsg),(e=>{e&&(Le([xe.currentMsg,...xe.msgList]),async function(){var e;null==(e=_e.value)||e.scrollTo({top:0,behavior:"auto"})}(),xe.isAppendMsg=!1)}),{immediate:!0}),(e,n)=>{var t;return i(),a("div",{class:l(["chat-main",{"home-bg":!r(xe).id,"chat-main--check":r(xe).isForward}]),ref_key:"chatMainRef",ref:_e,style:c(r(Ue))},[u(r(T),{"show-toolbar-tooltip":"","render-toolbar":qe},{default:d((()=>[(i(!0),a(m,null,p(r(xe).msgList,((e,t)=>{var s,o,c;return i(),a(m,{key:e.id},[Je(e)?(i(),a("div",{key:0,class:l(["message-item",{"message-item--mine":e.sender==r(xe).userInfo.id}])},[$e(e,t)?(i(),a("p",ie,g(e.__sendTime),1)):y("v-if",!0),Ye(e,"system")||"WITHDRAWN"===e.status||(null==(s=e.content)?void 0:s.chatMessageType)===r(D).EVENT?(i(),a(m,{key:1},[Ye(e,"system")?(i(),v(P,{key:0,data:e},null,8,["data"])):y("v-if",!0),"WITHDRAWN"===e.status?(i(),a("p",ae,[f("span",null,g(e.sender==r(xe).userInfo.id?(null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.67"))||"你":e.senderName)+((null==(c=window.getLanguageByCode)?void 0:c.call(window,"10010.1.68"))||"撤回了一条消息"),1),Xe(e)?(i(),v(r(M),{key:0,size:"tiny",style:{color:"var(--c-primary-color)","margin-left":"5px"},text:"",onClick:()=>function(e){xe.currentReEditMsg=e}(e)},{default:d((()=>{var e;return[h((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.69"))||"重新编辑")]})),_:2},1032,["onClick"])):y("v-if",!0)])):(i(),v(J,{key:2,data:e},null,8,["data"]))],64)):(i(),a("div",{key:2,class:l(["message-wrapper",{checked:e.checked}]),onClick:()=>e.checked=!e.checked},[u(r(C),{checked:e.checked,"onUpdate:checked":n=>e.checked=n,size:"large"},null,8,["checked","onUpdate:checked"]),f("div",re,[u(r(_),{round:"",size:38,src:e.senderAvatar,onClick:k((n=>r(Ee)(n,{show:!0,userId:e.sender})),["stop"])},null,8,["src","onClick"]),e.content?(i(),a("div",ce,[f("div",ue,[f("span",{class:"name","data-time":e.__time},g(r(Se)?e.senderName:""),9,de)]),f("div",{class:l(["content",{emoji:e.content.chatMessageType===r(D).EMOJI&&!e.content.referenceContent,template:e.content.chatMessageType===r(D).TEMPLATE,"template--3":Ve(e.content),"audio-video":r(R)(e.content),file:e.content.chatMessageType===r(D).FILE,"merge-msg":e.content.chatMessageType===r(D).FORWARD&&r(q)(e.content.forwardMessageList)}]),onContextmenu:k((n=>!r(xe).isForward&&Pe(n,e.id)),["prevent"])},[Ge(e)?(i(),a(m,{key:0},[e.content.referenceContent?(i(),a("div",pe,[f("span",null,g(e.content.referenceContent.senderName)+":",1),f("pre",{innerHTML:r(H)(e.content.referenceContent.content)},null,8,ge)])):y("v-if",!0),e.content.chatMessageType===r(D).EMOJI?(i(),a("img",{key:1,class:l([e.content.referenceContent?"emoji--min":"emoji--big"]),src:r(K).findEmoji(e.__content)},null,10,ye)):(i(),a("pre",{key:2,innerHTML:e.__content},null,8,ve))],64)):y("v-if",!0),Ke(e)?(i(),a("pre",{key:1,innerHTML:e.__content},null,8,fe)):y("v-if",!0),Ye(e,"template")?(i(),v(P,{key:2,data:e},null,8,["data"])):y("v-if",!0),e.content.chatMessageType===r(D).FORWARD&&r(q)(e.content.forwardMessageList)?(i(),a("div",{key:3,class:"merge-msg-box",onClick:()=>function(e){xe.isForward||(Re.value=e.id,Be.value=!0)}(e)},[f("h4",null,g(r(N)(e.content)),1),f("div",ke,[(i(!0),a(m,null,p(e.content.forwardMessageList,(e=>(i(),a("div",{key:e.id},g(e.senderName)+":"+g(r(H)(e.content)),1)))),128))])],8,he)):y("v-if",!0),e.content.chatMessageType===r(D).IMAGE?(i(),v(r(x),{key:4,width:"240",src:e.__content,onClick:n[0]||(n[0]=e=>e.stopPropagation())},null,8,["src"])):y("v-if",!0),r(R)(e.content)?(i(),a(m,{key:5},[u(r(L),{class:l({"is-audio":e.content.chatMessageType===r(D).AUDIO}),component:e.content.chatMessageType===r(D).AUDIO?r($):r(Q)},null,8,["class","component"]),f("span",we,g(r(O)(e.__content)),1)],64)):y("v-if",!0),e.content.chatMessageType===r(D).FILE?(i(),v(r(I),{key:6,"wrap-item":!1},{default:d((()=>[u(r(L),{class:"icon-file",size:"40",component:r(Z)},null,8,["component"]),u(r(I),{"wrap-item":!1,vertical:"",justify:"space-between",style:{"row-gap":"0"}},{default:d((()=>[f("span",null,g(e.__content),1),f("span",Te,g(e.__size),1)])),_:2},1024)])),_:2},1024)):y("v-if",!0),!r(R)(e.content)&&e.content.labelList?(i(),v(r(I),{key:7,"wrap-item":!1},{default:d((()=>[(i(!0),a(m,null,p(e.content.labelList,((n,t)=>(i(),a("div",{key:t,class:"label-item"},["text"===n.type?(i(),v(r(M),{key:0,type:n.label.type,secondary:"",size:"tiny",onClick:()=>r(je)({type:n.type,labelItem:n.label,msgId:e.id})},{default:d((()=>[h(g(n.label.label),1)])),_:2},1032,["type","onClick"])):(i(),v(r(M),{key:1,quaternary:"",size:"tiny",onClick:()=>r(je)({type:n.type,labelItem:n.label,msgId:e.id})},{icon:d((()=>[f("img",{class:"emoji--min",src:r(K).findEmoji(n.label)},null,8,Me)])),_:2},1032,["onClick"])),(i(!0),a(m,null,p(n.userList,((e,t)=>(i(),a(m,{key:e.id},[u(r(M),{quaternary:"",type:"tertiary",size:"tiny",onClick:n=>r(Ee)(n,{show:!0,info:e})},{default:d((()=>[h(g(e.name),1)])),_:2},1032,["onClick"]),t<n.userList.length-1?(i(),a("span",Ce,",")):y("v-if",!0)],64)))),128))])))),128))])),_:2},1024)):y("v-if",!0),u(r(b),{class:"quick-menu"},{default:d((()=>[r(R)(e.content)?y("v-if",!0):(i(),a(m,{key:0},[u(r(M),{quaternary:"",size:"tiny",onClick:n=>function(e,n){Ne.value=!0,Oe.x=e.clientX,Oe.y=e.clientY,Re.value=n}(n,e.id)},{icon:d((()=>[u(r(L),{size:"17",component:r(ee)},null,8,["component"])])),_:2},1032,["onClick"]),u(r(M),{quaternary:"",size:"tiny",onClick:()=>Qe(e)},{icon:d((()=>[u(r(L),{size:"17",component:r(ne)},null,8,["component"])])),_:2},1032,["onClick"])],64)),u(r(M),{quaternary:"",size:"tiny",onClick:n=>Pe(n,e.id)},{icon:d((()=>[u(r(L),{size:"14",component:r(te)},null,8,["component"])])),_:2},1032,["onClick"])])),_:2},1024)],42,me)])):y("v-if",!0)])],10,le))],2)):y("v-if",!0)],64)})),128))])),_:1}),u(r(Y),{ref_key:"contextmenuRef",ref:ze,show:Ae.value,"onUpdate:show":n[1]||(n[1]=e=>Ae.value=e),position:De.value,id:Re.value,onSelect:Ze},null,8,["show","position","id"]),u(V,{title:(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.44"))||"转发消息",mode:"relay",onComfirm:en},{trigger:d((()=>{var e;return[f("span",{style:{display:"none"},ref_key:"relayTriggerRef",ref:He},(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.45"))||"转发",512)]})),_:1}),Re.value?(i(),v(G,{key:0,show:Ne.value,"onUpdate:show":n[2]||(n[2]=e=>Ne.value=e),x:Oe.x,y:Oe.y,id:Re.value},null,8,["show","x","y","id"])):y("v-if",!0),u(X,{show:Be.value,"onUpdate:show":n[3]||(n[3]=e=>Be.value=e),id:Re.value},null,8,["show","id"])],6)}}});export{_e as default};
|
1
|
+
import{defineComponent as e,ref as n,reactive as t,computed as s,watch as o,openBlock as i,createElementBlock as a,normalizeClass as l,unref as r,normalizeStyle as c,createVNode as u,withCtx as d,Fragment as m,renderList as p,toDisplayString as g,createCommentVNode as y,createBlock as v,createElementVNode as f,createTextVNode as h,withModifiers as k,nextTick as T}from"vue";import{NImageGroup as w,NButton as M,NCheckbox as C,NAvatar as L,NImage as _,NIcon as x,NSpace as I,NButtonGroup as b,NTooltip as j}from"naive-ui";import{format as E}from"date-fns";import{getHistoryRecordApi as S,readMessageApi as z}from"../api/index.js";import{useData as A}from"../hooks/useData.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import{MESSAGE_TYPE as D}from"../constants/index.js";import{isAudioOrVideoMessage as R,simplifyMessage as H,getForwardTitle as N,getAVTime as O,downloadFile as B}from"../utils/index.js";import{first as U,last as F,isArray as q,toString as W}from"lodash-es";import"trtc-sdk-v5";import J from"./MessageTemplate.vue.js";import P from"./MessageEvent.vue.js";import X from"./MessageMergeForward.vue.js";import G from"./SelectLabel.vue.js";import{emojis as K}from"../utils/emoji.js";import Y from"./ContextMenu.js";import V 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 $,VideocamOutline as Q,DocumentSharp as Z,HappyOutline as ee,ChatbubbleEllipsesOutline as ne,EllipsisHorizontal as te,ArrowDownSharp as se}from"@vicons/ionicons5";import{useScrollLoading as oe}from"../../../../shared/hooks/useScrollLoading.js";const ie={key:0,class:"tip-text"},ae={key:1,class:"tip-text"},le=["onClick"],re={class:"message-box"},ce={key:0,class:"content-box"},ue={class:"name-box"},de=["data-time"],me=["onContextmenu"],pe={key:0,class:"reference-content"},ge=["innerHTML"],ye=["src"],ve=["innerHTML"],fe=["innerHTML"],he=["onClick"],ke={class:"merge-msg-contents"},Te={class:"label-name"},we=["innerHTML"],Me={style:{"margin-left":"8px"}},Ce={class:"size"},Le=["src"],_e={key:0};var xe=e({__name:"ChatMain",setup(e){const xe=n(),{state:Ie,setMsgList:be,relayMessage:je,setCurrentSessionItem:Ee,setMessageLabel:Se,setUserDetail:ze,isGroupChat:Ae}=A(),De=n(),Re=n(!1),He=n({left:0,top:0}),Ne=n(),Oe=n(),Be=n(!1),Ue=t({x:0,y:0}),Fe=n(!1),qe={page:0,hasMore:!0,lastSendTime:E(new Date,"yyyy-MM-dd HH:mm:ss")},We=s((()=>({"--c-tip-top":Ae.value?"1px":"-20px","--c-tip-gap":Ae.value?"10px":"0px"})));function Je({nodes:e}){var n,t;const{_ctx:s}=null==(n=e.download)?void 0:n.children,o=s?null==(t=null==s?void 0:s.proxy)?void 0:t.previewSrc:"";return[e.prev,e.next,e.rotateCounterclockwise,e.rotateClockwise,e.resizeToOriginalSize,e.zoomOut,e.zoomIn,u(j,null,{trigger:()=>u(x,{style:"cursor: pointer",color:"rgba(255, 255, 255, 0.75",size:24,component:se,onClick:()=>o&&B(o,"img")},null),default:()=>{var e;return(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.102"))||"下载"}}),e.close]}function Pe(e,n){try{if("string"==typeof e){return JSON.parse(e)[n]}return e[n]}catch(n){return e}}async function Xe(){try{if(!qe.hasMore)return;qe.page++;const e=await S({sessionKey:Ie.currentSessionItem.sessionKey,page:qe.page,lastSendTime:qe.lastSendTime});if(!Array.isArray(e)||0===e.length)return qe.hasMore=!1,console.log("接口返回不是一个数组,或者没有更多消息了");const n=U(e).id;qe.lastSendTime=F(e).sendTime,be(qe.page>1?[...Ie.msgList,...e]:e),1===qe.page&&Ie.currentSessionItem.unreadNum&&(await z({chatType:Ie.currentSessionItem.chatType,messageIdSet:[n],receiver:Ie.userInfo.id,sender:Ie.currentSessionItem.receiver}),Ee({unreadNum:0}))}catch(e){console.log(e)}}async function Ge(e,n){Ne.value=n,async function(e){var n,t,s,o,i,a;Re.value=!0,await T();const{clientX:l,clientY:r}=e,{width:c=0,height:u=0,left:d=0,top:m=0}=(null==(n=xe.value)?void 0:n.getBoundingClientRect())||{},p=null!=(o=null==(s=null==(t=De.value)?void 0:t.$el)?void 0:s.getBoundingClientRect().height)?o:220,g=null!=(a=null==(i=xe.value)?void 0:i.scrollTop)?a:0,y=5,v={};l<=d+c/2?v.left=l-d+y+"px":v.right=d+c-l-y+"px";r-m<p/2?v.top=g+y+"px":m+u-r<=p/2?v.bottom=Math.abs(g)+y+"px":v.top=g+r-m-p/2+"px";He.value=v}(e)}function Ke(e){const{chatMessageType:n,messageTemplate:t}=e.content;return n!==D.TEMPLATE||!!t}function Ye(e){const{chatMessageType:n}=e.content;return e.sender===Ie.userInfo.id&&Date.now()-new Date(e.sendTime).getTime()<864e5&&[D.TEXT,D.EMOJI].includes(n)}function Ve(e){const{chatMessageType:n,msg:t=""}=e.content;if(n===D.BLEND){const e=W(t).match(/<img[^>]*>/gi);return!e||!e.length}return n&&[D.TEXT,D.EMOJI].includes(n)}function $e(e){const{chatMessageType:n,msg:t=""}=e.content,s=W(t).match(/<img[^>]*>/gi);return n===D.BLEND&&s&&s.length}function Qe(e,n){var t,s;const{chatMessageType:o,messageTemplate:i}=e.content;if(o===D.TEMPLATE)return"system"===n?2==(null==(t=null==i?void 0:i.setting)?void 0:t.style.id):2!=(null==(s=null==i?void 0:i.setting)?void 0:s.style.id)}function Ze(e){var n,t;const{chatMessageType:s,messageTemplate:o}=e;return s===D.TEMPLATE&&3==(null==(t=null==(n=null==o?void 0:o.setting)?void 0:n.style)?void 0:t.id)}function en(e,n){var t;const s=new Date(e.sendTime).getTime(),o=null==(t=Ie.msgList[n+1])?void 0:t.sendTime;if(o){return s-new Date(o).getTime()>3e5}return!0}function nn(e){Ie.currentReferenceMsg=e,Ie.currentReferenceMsg.content.referenceContent=null,Object.assign(Ie.currentReferenceMsg,{chatType:Ie.currentSessionItem.chatType,receiver:Ie.currentSessionItem.receiver,receiverAvatar:Ie.currentSessionItem.avatar,receiverName:Ie.currentSessionItem.name})}function tn(e,n){var t;"reply"!==e?"relay"===e&&(null==(t=Oe.value)||t.click()):nn(n)}function sn({checkedIds:e,remark:n}){const t=Ie.msgList.find((e=>e.id===Ne.value));je({checkedIds:e,remark:n,contents:[t.content]})}return oe(xe,(()=>{Xe()}),"top",(()=>{Be.value=Re.value=!1})),o((()=>Ie.id),(e=>{e&&(Ie.currentReferenceMsg=null,Object.assign(qe,{page:0,hasMore:!0,lastSendTime:E(new Date,"yyyy-MM-dd HH:mm:ss")}),Xe())}),{immediate:!0}),o((()=>Ie.isAppendMsg),(e=>{e&&(be([Ie.currentMsg,...Ie.msgList]),async function(){var e;null==(e=xe.value)||e.scrollTo({top:0,behavior:"auto"})}(),Ie.isAppendMsg=!1)}),{immediate:!0}),(e,n)=>{var t;return i(),a("div",{class:l(["chat-main",{"home-bg":!r(Ie).id,"chat-main--check":r(Ie).isForward}]),ref_key:"chatMainRef",ref:xe,style:c(r(We))},[u(r(w),{"show-toolbar-tooltip":"","render-toolbar":Je},{default:d((()=>[(i(!0),a(m,null,p(r(Ie).msgList,((e,t)=>{var s,o,c;return i(),a(m,{key:e.id},[Ke(e)?(i(),a("div",{key:0,class:l(["message-item",{"message-item--mine":e.sender==r(Ie).userInfo.id}])},[en(e,t)?(i(),a("p",ie,g(e.__sendTime),1)):y("v-if",!0),Qe(e,"system")||"WITHDRAWN"===e.status||(null==(s=e.content)?void 0:s.chatMessageType)===r(D).EVENT?(i(),a(m,{key:1},[Qe(e,"system")?(i(),v(J,{key:0,data:e},null,8,["data"])):y("v-if",!0),"WITHDRAWN"===e.status?(i(),a("p",ae,[f("span",null,g(e.sender==r(Ie).userInfo.id?(null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.67"))||"你":e.senderName)+((null==(c=window.getLanguageByCode)?void 0:c.call(window,"10010.1.68"))||"撤回了一条消息"),1),Ye(e)?(i(),v(r(M),{key:0,size:"tiny",style:{color:"var(--c-primary-color)","margin-left":"5px"},text:"",onClick:()=>function(e){Ie.currentReEditMsg=e}(e)},{default:d((()=>{var e;return[h((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.69"))||"重新编辑")]})),_:2},1032,["onClick"])):y("v-if",!0)])):(i(),v(P,{key:2,data:e},null,8,["data"]))],64)):(i(),a("div",{key:2,class:l(["message-wrapper",{checked:e.checked}]),onClick:()=>e.checked=!e.checked},[u(r(C),{checked:e.checked,"onUpdate:checked":n=>e.checked=n,size:"large"},null,8,["checked","onUpdate:checked"]),f("div",re,[u(r(L),{round:"",size:38,src:e.senderAvatar,onClick:k((n=>r(ze)(n,{show:!0,userId:e.sender})),["stop"])},null,8,["src","onClick"]),e.content?(i(),a("div",ce,[f("div",ue,[f("span",{class:"name","data-time":e.__time},g(r(Ae)?e.senderName:""),9,de)]),f("div",{class:l(["content",{emoji:e.content.chatMessageType===r(D).EMOJI&&!e.content.referenceContent,template:e.content.chatMessageType===r(D).TEMPLATE,"template--3":Ze(e.content),"audio-video":r(R)(e.content),file:e.content.chatMessageType===r(D).FILE,"merge-msg":e.content.chatMessageType===r(D).FORWARD&&r(q)(e.content.forwardMessageList),"reference-info":Ve(e)}]),onContextmenu:k((n=>!r(Ie).isForward&&Ge(n,e.id)),["prevent"])},[Ve(e)?(i(),a(m,{key:0},[e.content.referenceContent?(i(),a("div",pe,[f("span",null,g(e.content.referenceContent.senderName)+":",1),f("pre",{innerHTML:r(H)(e.content.referenceContent.content)},null,8,ge)])):y("v-if",!0),e.content.chatMessageType===r(D).EMOJI?(i(),a("img",{key:1,class:l([e.content.referenceContent?"emoji--min":"emoji--big"]),src:r(K).findEmoji(e.__content)},null,10,ye)):(i(),a("pre",{key:2,innerHTML:e.__content},null,8,ve))],64)):y("v-if",!0),$e(e)?(i(),a("pre",{key:1,innerHTML:e.__content},null,8,fe)):y("v-if",!0),Qe(e,"template")?(i(),v(J,{key:2,data:e},null,8,["data"])):y("v-if",!0),e.content.chatMessageType===r(D).FORWARD&&r(q)(e.content.forwardMessageList)?(i(),a("div",{key:3,class:"merge-msg-box",onClick:()=>function(e){Ie.isForward||(Ne.value=e.id,Fe.value=!0)}(e)},[f("h4",null,g(r(N)(e.content)),1),f("div",ke,[(i(!0),a(m,null,p(e.content.forwardMessageList,(e=>(i(),a("div",{key:e.id,class:"merge-msg-contents-item"},[f("span",Te,g(e.senderName)+":",1),f("pre",{innerHTML:r(H)(e.content)},null,8,we)])))),128))])],8,he)):y("v-if",!0),e.content.chatMessageType===r(D).IMAGE?(i(),v(r(_),{key:4,width:"240",src:Pe(e.__content,"fileUrl"),onClick:n[0]||(n[0]=e=>e.stopPropagation())},null,8,["src"])):y("v-if",!0),r(R)(e.content)?(i(),a(m,{key:5},[u(r(x),{class:l({"is-audio":e.content.chatMessageType===r(D).AUDIO}),component:e.content.chatMessageType===r(D).AUDIO?r($):r(Q)},null,8,["class","component"]),f("span",Me,g(r(O)(e.__content)),1)],64)):y("v-if",!0),e.content.chatMessageType===r(D).FILE?(i(),v(r(I),{key:6,"wrap-item":!1},{default:d((()=>[u(r(x),{class:"icon-file",size:"40",component:r(Z)},null,8,["component"]),u(r(I),{"wrap-item":!1,vertical:"",justify:"space-between",style:{"row-gap":"0"}},{default:d((()=>[f("span",null,g(Pe(e.__content,"fileName")),1),f("span",Ce,g(e.__size),1)])),_:2},1024)])),_:2},1024)):y("v-if",!0),!r(R)(e.content)&&e.content.labelList?(i(),v(r(I),{key:7,"wrap-item":!1},{default:d((()=>[(i(!0),a(m,null,p(e.content.labelList,((n,t)=>(i(),a("div",{key:t,class:"label-item"},["text"===n.type?(i(),v(r(M),{key:0,type:n.label.type,secondary:"",size:"tiny",onClick:()=>r(Se)({type:n.type,labelItem:n.label,msgId:e.id})},{default:d((()=>[h(g(n.label.label),1)])),_:2},1032,["type","onClick"])):(i(),v(r(M),{key:1,quaternary:"",size:"tiny",onClick:()=>r(Se)({type:n.type,labelItem:n.label,msgId:e.id})},{icon:d((()=>[f("img",{class:"emoji--min",src:r(K).findEmoji(n.label)},null,8,Le)])),_:2},1032,["onClick"])),(i(!0),a(m,null,p(n.userList,((e,t)=>(i(),a(m,{key:e.id},[u(r(M),{quaternary:"",type:"tertiary",size:"tiny",onClick:n=>r(ze)(n,{show:!0,info:e})},{default:d((()=>[h(g(e.name),1)])),_:2},1032,["onClick"]),t<n.userList.length-1?(i(),a("span",_e,",")):y("v-if",!0)],64)))),128))])))),128))])),_:2},1024)):y("v-if",!0),u(r(b),{class:"quick-menu"},{default:d((()=>[r(R)(e.content)?y("v-if",!0):(i(),a(m,{key:0},[u(r(M),{quaternary:"",size:"tiny",onClick:n=>function(e,n){Be.value=!0,Ue.x=e.clientX,Ue.y=e.clientY,Ne.value=n}(n,e.id)},{icon:d((()=>[u(r(x),{size:"17",component:r(ee)},null,8,["component"])])),_:2},1032,["onClick"]),u(r(M),{quaternary:"",size:"tiny",onClick:()=>nn(e)},{icon:d((()=>[u(r(x),{size:"17",component:r(ne)},null,8,["component"])])),_:2},1032,["onClick"])],64)),u(r(M),{quaternary:"",size:"tiny",onClick:n=>Ge(n,e.id)},{icon:d((()=>[u(r(x),{size:"14",component:r(te)},null,8,["component"])])),_:2},1032,["onClick"])])),_:2},1024)],42,me)])):y("v-if",!0)])],10,le))],2)):y("v-if",!0)],64)})),128))])),_:1}),u(r(Y),{ref_key:"contextmenuRef",ref:De,show:Re.value,"onUpdate:show":n[1]||(n[1]=e=>Re.value=e),position:He.value,id:Ne.value,onSelect:tn},null,8,["show","position","id"]),u(V,{title:(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.44"))||"转发消息",mode:"relay",onComfirm:sn},{trigger:d((()=>{var e;return[f("span",{style:{display:"none"},ref_key:"relayTriggerRef",ref:Oe},(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.45"))||"转发",512)]})),_:1}),Ne.value?(i(),v(G,{key:0,show:Be.value,"onUpdate:show":n[2]||(n[2]=e=>Be.value=e),x:Ue.x,y:Ue.y,id:Ne.value},null,8,["show","x","y","id"])):y("v-if",!0),u(X,{show:Fe.value,"onUpdate:show":n[3]||(n[3]=e=>Fe.value=e),id:Ne.value},null,8,["show","id"])],6)}}});export{xe as default};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { PropType } from 'vue';
|
2
2
|
import { AnyObject } from '../../../../shared/types';
|
3
|
-
import { formatTime } from '../utils';
|
3
|
+
import { formatTime, isDoctorRole, getRoleName, getFileDetails, getFileType, getDetail, showAudioAndVideoRecord, getForwardTitle, simplifyMessage } from '../utils';
|
4
4
|
import { MESSAGE_TYPE } from '../constants';
|
5
5
|
declare const _default: import("vue").DefineComponent<{
|
6
6
|
visible: {
|
@@ -45,6 +45,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
45
45
|
};
|
46
46
|
isForward: boolean;
|
47
47
|
};
|
48
|
+
cssVars: import("vue").ComputedRef<AnyObject>;
|
48
49
|
recordRef: import("vue").Ref<any>;
|
49
50
|
recordList: import("vue").Ref<AnyObject[]>;
|
50
51
|
keyword: import("vue").Ref<any>;
|
@@ -69,10 +70,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
69
70
|
NModal: any;
|
70
71
|
NTag: any;
|
71
72
|
NInput: any;
|
73
|
+
NIcon: any;
|
72
74
|
NSelect: any;
|
73
75
|
NAvatar: any;
|
74
76
|
NPopover: any;
|
75
77
|
NInputGroup: any;
|
78
|
+
CallOutline: 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<{}>>, {}>;
|
79
|
+
VideocamOutline: 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<{}>>, {}>;
|
76
80
|
DatePicker: import("../../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{
|
77
81
|
updateUnchangedValue: {
|
78
82
|
type: BooleanConstructor;
|
@@ -202,12 +206,78 @@ declare const _default: import("vue").DefineComponent<{
|
|
202
206
|
to: string | false | HTMLElement;
|
203
207
|
holidays: Date[];
|
204
208
|
}>>;
|
209
|
+
isArray: {
|
210
|
+
(value?: any): value is any[];
|
211
|
+
<T>(value?: any): value is any[];
|
212
|
+
};
|
205
213
|
formatTime: typeof formatTime;
|
214
|
+
isDoctorRole: typeof isDoctorRole;
|
215
|
+
getRoleName: typeof getRoleName;
|
216
|
+
getFileDetails: typeof getFileDetails;
|
217
|
+
getFileType: typeof getFileType;
|
218
|
+
getDetail: typeof getDetail;
|
219
|
+
showAudioAndVideoRecord: typeof showAudioAndVideoRecord;
|
220
|
+
getForwardTitle: typeof getForwardTitle;
|
221
|
+
simplifyMessage: typeof simplifyMessage;
|
206
222
|
MESSAGE_TYPE: typeof MESSAGE_TYPE;
|
207
223
|
emojis: {
|
208
224
|
default: string[][];
|
209
225
|
findEmoji(name: string): any;
|
210
226
|
};
|
227
|
+
MessageEvent: import("vue").DefineComponent<{
|
228
|
+
data: {
|
229
|
+
type: PropType<AnyObject>;
|
230
|
+
required: true;
|
231
|
+
};
|
232
|
+
}, {
|
233
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
234
|
+
data: {
|
235
|
+
type: PropType<AnyObject>;
|
236
|
+
required: true;
|
237
|
+
};
|
238
|
+
}>> & {}>>;
|
239
|
+
state: {
|
240
|
+
orgId: string | number;
|
241
|
+
currentSessionItem: AnyObject;
|
242
|
+
id: string;
|
243
|
+
userInfo: AnyObject;
|
244
|
+
msgList: AnyObject[];
|
245
|
+
currentMsg: AnyObject;
|
246
|
+
isAppendMsg: boolean;
|
247
|
+
sessionList: AnyObject[];
|
248
|
+
isChangeSession: boolean;
|
249
|
+
updateSessionItem: AnyObject;
|
250
|
+
isUpdateSession: boolean;
|
251
|
+
currentReferenceMsg: AnyObject | null;
|
252
|
+
currentReEditMsg: AnyObject | null;
|
253
|
+
showVideo: boolean;
|
254
|
+
currentAVMsg: AnyObject;
|
255
|
+
currentGroupUser: AnyObject[];
|
256
|
+
showMultipleVideo: boolean;
|
257
|
+
userDetail: {
|
258
|
+
show: boolean;
|
259
|
+
position: {
|
260
|
+
x: number;
|
261
|
+
y: number;
|
262
|
+
};
|
263
|
+
userId: string;
|
264
|
+
info: AnyObject | null;
|
265
|
+
};
|
266
|
+
isForward: boolean;
|
267
|
+
};
|
268
|
+
setUserDetail: (event: MouseEvent, userDetail: AnyObject) => void;
|
269
|
+
inviter: import("vue").Ref<any>;
|
270
|
+
invitee: import("vue").Ref<any[]>;
|
271
|
+
isValidJSON: (str: string) => boolean;
|
272
|
+
getTask: (_id: string | number, arrRes: AnyObject[]) => () => Promise<unknown>;
|
273
|
+
getEventContent: (data: AnyObject) => Promise<void>;
|
274
|
+
NButton: any;
|
275
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
276
|
+
data: {
|
277
|
+
type: PropType<AnyObject>;
|
278
|
+
required: true;
|
279
|
+
};
|
280
|
+
}>>, {}>;
|
211
281
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
212
282
|
visible: {
|
213
283
|
type: BooleanConstructor;
|
@@ -1 +1 @@
|
|
1
|
-
import{createElementVNode as e,defineComponent as a,ref as l,watch as t,openBlock as
|
1
|
+
import{createElementVNode as e,defineComponent as a,ref as l,watch as t,openBlock as s,createBlock as n,unref as o,withCtx as r,createVNode as i,toDisplayString as c,normalizeStyle as d,resolveDynamicComponent as u,createElementBlock as v,Fragment as m,renderList as p,createCommentVNode as g,withDirectives as f,normalizeClass as h,vShow as y,createTextVNode as w}from"vue";import{NModal as b,NAvatar as _,NInputGroup as T,NInput as M,NIcon as k,NSelect as I,NPopover as L,NTag as j}from"naive-ui";import{CallOutline as x,VideocamOutline as A,SearchOutline as C}from"@vicons/ionicons5";import{useData as D}from"../hooks/useData.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import{MESSAGE_TYPE as E}from"../constants/index.js";import{searchChatRecordApi as S}from"../api/index.js";import{transformMessage as H,isDoctorRole as U,getRoleName as B,formatTime as N,getFileDetails as O,getFileType as R,getDetail as z,showAudioAndVideoRecord as G,getForwardTitle as V,simplifyMessage as W}from"../utils/index.js";import{last as F,isArray as J}from"lodash-es";import"trtc-sdk-v5";import P from"../../../date-picker/index.js";import{useDebounceFn as $}from"@vueuse/core";import{format as q}from"date-fns";import"../../../../shared/utils/index.js";import"@vue/shared";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import{useScrollLoading as K}from"../../../../shared/hooks/useScrollLoading.js";import{emojis as Q}from"../utils/emoji.js";import X from"./MessageEvent.vue.js";var Y,Z;const ee={class:"iho-chat-dialog__header"},ae=e("span",{class:"left"},(null==(Y=window.getLanguageByCode)?void 0:Y.call(window,"10010.1.65"))||"聊天记录",-1),le={class:"center"},te={class:"chat-record-box"},se={class:"msg-box"},ne={class:"name-and-time"},oe={class:"seach-box"},re={class:"ellipsis"},ie={style:{"white-space":"nowrap"}},ce={class:"content"},de=["src"],ue={class:"file-type"},ve={class:"text"},me={class:"name"},pe={class:"detail"},ge=["src"],fe={class:"merge-msg-box"},he={class:"forward-title"},ye={class:"merge-msg-contents"},we={class:"label-name"},be=["innerHTML"],_e=["innerHTML"],Te={key:1,class:"no-data"},Me={class:"chat-record-box__filter"},ke=e("span",{class:"filter-title"},(null==(Z=window.getLanguageByCode)?void 0:Z.call(window,"10010.1.72"))||"添加筛选条件",-1),Ie={class:"filter-item"},Le=e("span",{class:"label"},"成员:",-1),je={class:"filter-item"},xe=e("span",{class:"label"},"日期:",-1),Ae={class:"time-target"},Ce={class:"time-target__item"},De=e("span",null,"开始:",-1),Ee={class:"tip"},Se={class:"time-target__item"},He=e("span",null,"结束:",-1),Ue={class:"tip"};var Be=a({__name:"ChatRecord",props:{visible:{type:Boolean}},setup(a){const Y=a,Z={color:"#fff",textColor:"#666"},{state:Be,cssVars:Ne}=D(),Oe=l(),Re=l([]),ze=l(),Ge=l([]),Ve=l(),We=l(),Fe=$($e,500),Je={page:0,hasMore:!0,lastSendTime:q(new Date,"yyyy-MM-dd HH:mm:ss")};async function Pe(){var e;try{if(!Je.hasMore)return;Je.page++;const a=await S({orgId:Be.orgId,keyword:ze.value,endTime:Qe(),startTime:Ve.value?Ve.value+" 00:00:00":"",lastSendTime:Je.lastSendTime,memberIdSet:Ge.value,page:Je.page,recordType:"ALL",receiver:Be.currentSessionItem.receiver,userId:Be.userInfo.id});Array.isArray(a)&&0!==a.length&&Array.isArray(a[0].recordList)||(Je.hasMore=!1);let l=a||[];Array.isArray(a)&&a.length>0&&(l=a[0].recordList.filter((e=>"WITHDRAWN"!==e.status))),Je.lastSendTime=null==(e=F(l))?void 0:e.sendTime,l.forEach((e=>{var a,l,t;let s="";if(e.content.chatMessageType===E.TEMPLATE)s=null==(t=null==(l=null==(a=e.content)?void 0:a.messageTemplate)?void 0:l.setting)?void 0:t.title;else s=H(e.content);e.__content=s})),Re.value=Je.page>1?Re.value.concat(l):l}catch(e){}}function $e(){Object.assign(Je,{page:0,hasMore:!0,lastSendTime:Qe()||q(new Date,"yyyy-MM-dd HH:mm:ss")}),Pe()}function qe(e){return!!We.value&&e>Date.parse(`${We.value} 23:59:59`)}function Ke(e){return!!Ve.value&&e<Date.parse(Ve.value)}function Qe(){return We.value?We.value+" 23:59:59":""}function Xe(e){switch(e){case"member":Ge.value=[];break;case"start":Ve.value=null;break;case"end":We.value=null}}function Ye(e){return i(m,null,[i("div",{style:"display: flex;align-items: center"},[i(_,{src:e.avatar,round:!0,size:"small"},null),i("span",{style:"margin-left: 10px"},[e.name])])])}return K(Oe,(()=>{Pe()})),t([()=>Ge.value,()=>Ve.value,()=>We.value],(()=>{Y.visible&&$e()}),{deep:!0}),t((()=>Y.visible),(e=>{e?$e():(ze.value="",We.value=null,Ve.value=null,Ge.value=[],Re.value=[])})),(a,l)=>(s(),n(o(b),{preset:"dialog",title:"","show-icon":!1,"auto-focus":!1,class:"iho-chat-dialog"},{header:r((()=>[e("div",ee,[ae,e("div",le,[i(o(_),{round:"",size:30,src:o(Be).currentSessionItem.avatar},null,8,["src"]),e("span",null,c(o(Be).currentSessionItem.name),1)])])])),default:r((()=>[e("div",{class:"iho-chat-dialog__content iho-chat-record-wrapper",style:d(o(Ne))},[i(o(T),null,{default:r((()=>{var e;return[(s(),n(u((()=>[i(k,{component:C,size:18,color:"#6666"},null),Ge.value.length>0?i(j,{closable:!0,bordered:!1,color:Z,onClose:()=>Xe("member")},{default:()=>{var e,a;return[w("成员:")," ",Ge.value.length>1?Ge.value.length+((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.40"))||"人"):null==(a=Be.currentGroupUser.find((e=>e.id===Ge.value[0])))?void 0:a.name]}}):null,Ve.value?i(j,{closable:!0,bordered:!1,color:Z,onClose:()=>Xe("start")},{default:()=>[w("起始时间: "),Ve.value]}):null,We.value?i(j,{closable:!0,bordered:!1,color:Z,onClose:()=>Xe("end")},{default:()=>[w("结束时间: "),We.value]}):null])))),i(o(M),{placeholder:(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.36"))||"搜索",value:ze.value,"onUpdate:value":l[0]||(l[0]=e=>ze.value=e),valueModifiers:{trim:!0},onInput:o(Fe)},null,8,["value","onInput"])]})),_:1}),e("div",te,[e("div",{class:"chat-record-box__content",ref_key:"recordRef",ref:Oe},[Re.value.length>0?(s(!0),v(m,{key:0},p(Re.value,(a=>(s(),v("div",{class:"content-item",key:a.id},[i(o(_),{round:"",size:38,src:a.senderAvatar},null,8,["src"]),e("div",se,[e("div",ne,[g(" <span>{{ item.senderName }}</span> "),e("div",oe,[e("span",re,c(a.senderName),1),f(e("label",{class:h(["iho-chatRole",o(U)(a.roleInfo)?"isDoctor":""])},c(o(B)(a.roleInfo)),3),[[y,o(B)(a.roleInfo)]])]),e("span",ie,c(o(N)(a.sendTime).recordTime),1)]),e("div",ce,[a.content.chatMessageType===o(E).IMAGE?(s(),v("img",{key:0,src:o(O)(a.__content,"fileUrl")},null,8,de)):a.content.chatMessageType===o(E).FILE?(s(),v(m,{key:1},[e("span",ue,c(o(R)(a.__content)),1),e("div",ve,[e("span",me,c(o(O)(a.__content,"fileName")),1),e("span",pe,c(o(z)(a)),1)])],64)):a.content.chatMessageType===o(E).EMOJI?(s(),v("img",{key:2,class:"emoji",src:o(Q).findEmoji(a.__content)},null,8,ge)):a.content.chatMessageType===o(E).EVENT?(s(),n(X,{key:3,data:a},null,8,["data"])):a.content.chatMessageType===o(E).AUDIO||a.content.chatMessageType===o(E).VIDEO?(s(),v(m,{key:4},[g(" 语音通话和视频通话 "),i(o(k),{class:"is-video-call",component:a.content.chatMessageType===o(E).AUDIO?o(x):o(A)},null,8,["component"]),e("span",null,c(o(G)(a.content.chatMessageType)),1)],64)):a.content.chatMessageType===o(E).FORWARD&&o(J)(a.content.forwardMessageList)?(s(),v(m,{key:5},[g(" 消息转发 "),e("div",fe,[e("h4",he,c(o(V)(a.content)),1),e("div",ye,[(s(!0),v(m,null,p(a.content.forwardMessageList,(a=>(s(),v("div",{key:a.id,class:"merge-msg-contents-item"},[e("span",we,c(a.senderName)+":",1),e("pre",{innerHTML:o(W)(a.content)},null,8,be)])))),128))])])],64)):(s(),v("p",{key:6,innerHTML:a.__content},null,8,_e))])])])))),128)):(s(),v("div",Te,"没有找到相关记录"))],512),e("div",Me,[ke,e("div",Ie,[Le,i(o(I),{value:Ge.value,"onUpdate:value":l[1]||(l[1]=e=>Ge.value=e),multiple:"","max-tag-count":1,"render-label":Ye,options:o(Be).currentGroupUser,"value-field":"id"},null,8,["value","options"])]),e("div",je,[xe,e("div",Ae,[i(o(L),{trigger:"click","show-arrow":!1},{trigger:r((()=>{var a;return[e("div",Ce,[De,f(i(o(j),{bordered:!1,color:Z,closable:"",onClose:l[2]||(l[2]=()=>Xe("start"))},{default:r((()=>[w(c(Ve.value),1)])),_:1},512),[[y,Ve.value]]),f(e("span",Ee,(null==(a=window.getLanguageByCode)?void 0:a.call(window,"10010.1.76"))||"点击选择",512),[[y,!Ve.value]])])]})),default:r((()=>[i(o(P),{"formatted-value":Ve.value,"onUpdate:formatted-value":l[3]||(l[3]=e=>Ve.value=e),type:"date",panel:"",clearable:"","is-date-disabled":qe},null,8,["formatted-value"])])),_:1}),i(o(L),{trigger:"click","show-arrow":!1},{trigger:r((()=>{var a;return[e("div",Se,[He,f(i(o(j),{bordered:!1,color:Z,closable:"",onClose:l[4]||(l[4]=()=>Xe("end"))},{default:r((()=>[w(c(We.value),1)])),_:1},512),[[y,We.value]]),f(e("span",Ue,(null==(a=window.getLanguageByCode)?void 0:a.call(window,"10010.1.76"))||"点击选择",512),[[y,!We.value]])])]})),default:r((()=>[i(o(P),{"formatted-value":We.value,"onUpdate:formatted-value":l[5]||(l[5]=e=>We.value=e),type:"date",panel:"",clearable:"","is-date-disabled":Ke},null,8,["formatted-value"])])),_:1})])])])])],4)])),_:1}))}});export{Be as default};
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { AnyObject } from '../../../../shared/types';
|
2
2
|
declare const _default: import("vue").DefineComponent<{}, {
|
3
|
-
|
3
|
+
userListRef: import("vue").Ref<any>;
|
4
|
+
patientListRef: import("vue").Ref<any>;
|
4
5
|
inputRef: import("vue").Ref<any>;
|
5
6
|
showSearch: import("vue").Ref<boolean>;
|
6
7
|
keyword: import("vue").Ref<string>;
|
@@ -37,14 +38,19 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
37
38
|
openSession: (session: string | AnyObject) => Promise<void>;
|
38
39
|
userList: import("vue").Ref<AnyObject[]>;
|
39
40
|
handleInput: () => void;
|
41
|
+
patientList: import("vue").Ref<AnyObject[]>;
|
42
|
+
handlePatientInput: () => void;
|
40
43
|
currentTabValue: import("vue").Ref<string>;
|
41
44
|
currentIndex: import("vue").Ref<number>;
|
42
45
|
groupList: import("vue").ComputedRef<AnyObject[]>;
|
43
|
-
|
46
|
+
showNoUserData: import("vue").ComputedRef<boolean>;
|
47
|
+
showNoPatientData: import("vue").ComputedRef<boolean>;
|
44
48
|
showAllNoData: import("vue").ComputedRef<boolean>;
|
45
49
|
showGroupNoData: import("vue").ComputedRef<boolean>;
|
50
|
+
userStartIndex: import("vue").ComputedRef<number>;
|
46
51
|
groupStartIndex: import("vue").ComputedRef<number>;
|
47
52
|
currentList: import("vue").ComputedRef<AnyObject[]>;
|
53
|
+
handleSearchInput: () => void;
|
48
54
|
handleKeyDown: (event: KeyboardEvent) => void;
|
49
55
|
addSession: (id: string) => Promise<void>;
|
50
56
|
handleTabChange: () => void;
|
@@ -1 +1 @@
|
|
1
|
-
import{createElementVNode as e,defineComponent as l,ref as
|
1
|
+
import{createElementVNode as e,defineComponent as l,ref as t,computed as n,watch as o,nextTick as a,openBlock as s,createBlock as u,unref as i,normalizeStyle as r,withCtx as v,createVNode as c,createTextVNode as d,withModifiers as p,createCommentVNode as f,createElementBlock as g,Fragment as m,renderList as w,normalizeClass as y,withDirectives as h,vShow as k}from"vue";import{NPopover as C,NButton as L,NIcon as _,NInput as M,NTabs as j,NTabPane as I,NDivider as x}from"naive-ui";import{SearchOutline as B}from"@vicons/ionicons5";import{useData as R}from"../hooks/useData.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import{openSessionApi as b}from"../api/index.js";import{isGroup as D}from"../utils/index.js";import{trim as U}from"lodash-es";import"trtc-sdk-v5";import{useSearchUserList as S}from"../hooks/useSearchUserList.js";import{useSearchPatientList as z}from"../hooks/useSearchPatientList.js";import A from"../../../default-page/index.js";import E from"./userItemRender.js";var K;const P=e("div",{class:"title"},"联系人(患者)",-1),G=e("div",{class:"title"},"联系人(医护)",-1),N=e("div",{class:"title"},(null==(K=window.getLanguageByCode)?void 0:K.call(window,"10010.1.575"))||"我的群组",-1),T={class:"user-list-wrapper"};var V=l({__name:"ChatSearch",setup(l){const K=t(),V=t(),$=t(),q=t(!1),F=t(""),{cssVars:H,state:J,openSession:O}=R(),{userList:Q,handleInput:W}=S({wrapperRef:K,keywordRef:F}),{patientList:X,handlePatientInput:Y}=z({wrapperRef:V,keywordRef:F}),Z=t("all"),ee=t(0),le=n((()=>(F.value||"").replace(/^\s+|\s+$/g,"")?J.sessionList.filter((e=>D(e)&&(null==e?void 0:e.name.includes(F.value)))):[])),te=n((()=>!Q.value.length&&!!U(F.value||""))),ne=n((()=>!X.value.length&&!!U(F.value||""))),oe=n((()=>!(Q.value.length||X.value.length||le.value.length||!U(F.value||"")))),ae=n((()=>!le.value.length&&!!U(F.value||""))),se=n((()=>X.value.length>3?4:X.value.length)),ue=n((()=>(Q.value.length>3?4:Q.value.length)+se.value)),ie=n((()=>{switch(Z.value){case"patient":return X.value;case"user":return Q.value;case"group":return le.value;default:{const e=[],l=X.value.length,t=Q.value.length,n=le.value.length;return l>0&&(l>3?e.push(...X.value.slice(0,3),{id:"patient"}):e.push(...X.value)),t>0&&(t>3?e.push(...Q.value.slice(0,3),{id:"user"}):e.push(...Q.value)),n>0&&(n>3?e.push(...le.value.slice(0,3),{id:"group"}):e.push(...le.value)),e}}}));function re(){W(),Y()}function ve(e){if(["ArrowUp","ArrowDown"].includes(e.key)){e.preventDefault();const l=i(ee);if("ArrowUp"===e.key){const e=l>0?l-1:ie.value.length-1;ee.value=e}else if("ArrowDown"===e.key){const e=l<ie.value.length-1?l+1:0;ee.value=e}}else if(["Enter"].includes(e.key)){e.preventDefault();const l=ie.value.find(((e,l)=>ee.value===l)).id;["patient","user","group"].includes(l)?Z.value=l:async function(e){q.value=!1;const l=J.sessionList.find((l=>e&&[l.receiver,l.id].includes(e)));let t=l;if(!l){t=await b({chatType:"SINGLE",receiver:e,sender:J.userInfo.id})}O(t)}(l)}}function ce(){$.value.focus(),ee.value=0}function de(){q.value=!1}return o((()=>q.value),(async e=>{var l;e&&(await a(),null==(l=$.value)||l.focus())})),(l,t)=>(s(),u(i(C),{raw:"","content-class":"search-content",class:"search-wrapper",style:r(i(H)),show:q.value,"onUpdate:show":t[8]||(t[8]=e=>q.value=e),placement:"top",trigger:"click","display-directive":"show","show-arrow":!1,delay:0,overlap:""},{trigger:v((()=>[c(i(L),{color:"#ffffff4D",class:"search-trigger-btn"},{icon:v((()=>[c(i(_),{component:i(B),color:"#ffffff80"},null,8,["component"])])),default:v((()=>{var e;return[d((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.80"))||"搜索联系人")]})),_:1})])),default:v((()=>[c(i(M),{ref_key:"inputRef",ref:$,size:"small",clearable:"",autofocus:"",value:F.value,"onUpdate:value":[t[0]||(t[0]=e=>F.value=e),re],onKeydown:p(ve,["stop"])},{prefix:v((()=>[c(i(_),{color:"#ffffff80",component:i(B)},null,8,["component"])])),_:1},8,["value","onKeydown"]),c(i(j),{type:"line",animated:"",value:Z.value,"onUpdate:value":[t[7]||(t[7]=e=>Z.value=e),ce]},{default:v((()=>{var l,n;return[c(i(I),{name:"all",tab:(null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.571"))||"综合","display-directive":"show",style:{padding:"0 10px 10px","overflow-y":"auto"}},{default:v((()=>{var e,l;return[f(" 联系人(患者) "),i(X).length>0?(s(),g(m,{key:0},[P,(s(!0),g(m,null,w(i(X),((e,l)=>(s(),g(m,{key:e.id},[l<3?(s(),u(i(E),{key:0,item:e,class:y({last:i(X).length<4?l===i(X).length-1:2===l,selected:ee.value===l}),onItemClick:de,onMouseover:p((()=>ee.value=l),["stop"])},null,8,["item","class","onMouseover"])):f("v-if",!0)],64)))),128)),i(X).length>3?(s(),g("div",{key:0,onClick:t[1]||(t[1]=()=>Z.value="user"),class:y(["user-item",3===ee.value?"selected":""]),onMouseover:t[2]||(t[2]=p((()=>ee.value=3),["stop"]))},[c(i(L),{text:"",type:"primary"},{icon:v((()=>[c(i(_),{component:i(B),size:"16"},null,8,["component"])])),default:v((()=>[d(" 查看更多联系人(患者) ")])),_:1})],34)):f("v-if",!0)],64)):f("v-if",!0),i(X).length&&i(Q).length?(s(),u(i(x),{key:1})):f("v-if",!0),f(" 联系人(医护) "),i(Q).length>0?(s(),g(m,{key:2},[G,(s(!0),g(m,null,w(i(Q),((e,l)=>(s(),g(m,{key:e.id},[l<3?(s(),u(i(E),{key:0,item:e,class:y({last:i(Q).length<4?l===i(Q).length-1:2===l,selected:ee.value===i(se)+l}),onItemClick:de,onMouseover:p((()=>ee.value=i(se)+l),["stop"])},null,8,["item","class","onMouseover"])):f("v-if",!0)],64)))),128)),i(Q).length>3?(s(),g("div",{key:0,onClick:t[3]||(t[3]=()=>Z.value="user"),class:y(["user-item",ee.value===i(se)+3?"selected":""]),onMouseover:t[4]||(t[4]=p((()=>ee.value=i(se)+3),["stop"]))},[c(i(L),{text:"",type:"primary"},{icon:v((()=>[c(i(_),{component:i(B),size:"16"},null,8,["component"])])),default:v((()=>[d(" 查看更多联系人(医护) ")])),_:1})],34)):f("v-if",!0)],64)):f("v-if",!0),i(Q).length&&i(le).length?(s(),u(i(x),{key:3})):f("v-if",!0),f((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.572"))||"群组"),i(le).length>0?(s(),g(m,{key:4},[N,(s(!0),g(m,null,w(i(le),((e,l)=>(s(),g(m,{key:e.id},[l<3?(s(),u(i(E),{key:0,item:e,class:y({last:i(le).length<4?l===i(le).length-1:2===l,selected:ee.value===i(ue)+l}),onItemClick:de,onMouseover:p((()=>ee.value=i(ue)+l),["stop"])},null,8,["item","class","onMouseover"])):f("v-if",!0)],64)))),128)),i(le).length>3?(s(),g("div",{key:0,onClick:t[5]||(t[5]=()=>Z.value="group"),class:y(["user-item",ee.value===i(ue)+3?"selected":""]),onMouseover:t[6]||(t[6]=p((()=>ee.value=i(ue)+3),["stop"]))},[c(i(L),{text:"",type:"primary"},{icon:v((()=>[c(i(_),{component:i(B),size:"16"},null,8,["component"])])),default:v((()=>{var e;return[d((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.574"))||"查看更多群组")]})),_:1})],34)):f("v-if",!0)],64)):f("v-if",!0),h(c(i(A),{config:{title:" ",content:(null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.81"))||"找不到相关的结果"},type:"5"},null,512),[[k,i(oe)]])]})),_:1}),c(i(I),{name:"patient",tab:"联系人(患者)","display-directive":"show"},{default:v((()=>{var l;return[e("div",{class:"user-list-wrapper",ref_key:"patientListRef",ref:V},[(s(!0),g(m,null,w(i(X),((e,l)=>(s(),u(i(E),{key:e.id,item:e,onItemClick:de,class:y({selected:ee.value===l}),onMouseover:p((()=>ee.value=l),["stop"])},null,8,["item","class","onMouseover"])))),128)),h(c(i(A),{config:{title:" ",content:(null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.81"))||"找不到相关的结果"},type:"5"},null,512),[[k,i(ne)]])],512)]})),_:1}),c(i(I),{name:"user",tab:"联系人(医护)","display-directive":"show"},{default:v((()=>{var l;return[e("div",{class:"user-list-wrapper",ref_key:"userListRef",ref:K},[(s(!0),g(m,null,w(i(Q),((e,l)=>(s(),u(i(E),{key:e.id,item:e,onItemClick:de,class:y({selected:ee.value===l}),onMouseover:p((()=>ee.value=l),["stop"])},null,8,["item","class","onMouseover"])))),128)),h(c(i(A),{config:{title:" ",content:(null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.81"))||"找不到相关的结果"},type:"5"},null,512),[[k,i(te)]])],512)]})),_:1}),c(i(I),{name:"group",tab:(null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.572"))||"群组","display-directive":"show"},{default:v((()=>{var l;return[e("div",T,[(s(!0),g(m,null,w(i(le),((e,l)=>(s(),u(i(E),{key:e.id,item:e,onItemClick:de,class:y({selected:ee.value===l}),onMouseover:p((()=>ee.value=l),["stop"])},null,8,["item","class","onMouseover"])))),128)),h(c(i(A),{config:{title:" ",content:(null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.81"))||"找不到相关的结果"},type:"5"},null,512),[[k,i(ae)]])])]})),_:1})]})),_:1},8,["value"])])),_:1},8,["style","show"]))}});export{V as default};
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { AnyObject } from '../../../../shared/types';
|
2
|
+
import { isDoctorRole, getRoleName } from '../utils';
|
2
3
|
import { FileOptions } from '../types';
|
3
4
|
declare const _default: import("vue").DefineComponent<{}, {
|
4
5
|
attrs: {
|
@@ -163,6 +164,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
163
164
|
remark: import("vue").Ref<string>;
|
164
165
|
currentTab: import("vue").Ref<AnyObject[]>;
|
165
166
|
breadcrumbList: import("vue").Ref<AnyObject[]>;
|
167
|
+
breadcrumbRef: import("vue").Ref<any>;
|
166
168
|
userList: import("vue").Ref<AnyObject[]>;
|
167
169
|
handleInput: () => void;
|
168
170
|
_disabledIds: import("vue").ComputedRef<any[]>;
|
@@ -171,18 +173,21 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
171
173
|
name: any;
|
172
174
|
avatar: any;
|
173
175
|
chatType: any;
|
176
|
+
roleInfo: any;
|
174
177
|
}[]>;
|
175
178
|
friends: import("vue").ComputedRef<{
|
176
179
|
id: any;
|
177
180
|
name: any;
|
178
181
|
avatar: any;
|
179
182
|
chatType: any;
|
183
|
+
roleInfo: any;
|
180
184
|
}[]>;
|
181
185
|
groups: import("vue").ComputedRef<{
|
182
186
|
id: any;
|
183
187
|
name: any;
|
184
188
|
avatar: any;
|
185
189
|
chatType: any;
|
190
|
+
roleInfo: any;
|
186
191
|
}[]>;
|
187
192
|
checkedIds: import("vue").ComputedRef<any[]>;
|
188
193
|
btnDisabled: import("vue").ComputedRef<boolean>;
|
@@ -191,6 +196,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
191
196
|
currentTabKey: import("vue").ComputedRef<any>;
|
192
197
|
showAllCheckbox: import("vue").ComputedRef<boolean>;
|
193
198
|
getOrgList: () => Promise<void>;
|
199
|
+
handleSearchInput: () => void;
|
194
200
|
setUserTotal: (tree: AnyObject[]) => void;
|
195
201
|
getDisabled: (id: string | number) => boolean;
|
196
202
|
handleClickCheckbox: (option: AnyObject) => Promise<void>;
|
@@ -220,6 +226,8 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
220
226
|
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<{}>>, {}>;
|
221
227
|
ChevronForwardOutline: 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<{}>>, {}>;
|
222
228
|
last: <T>(array: import("lodash").List<T> | null | undefined) => T | undefined;
|
229
|
+
isDoctorRole: typeof isDoctorRole;
|
230
|
+
getRoleName: typeof getRoleName;
|
223
231
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
224
232
|
title: {
|
225
233
|
type: StringConstructor;
|
@@ -253,5 +261,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
253
261
|
mode: string;
|
254
262
|
disabledIds: string[];
|
255
263
|
}>;
|
264
|
+
isDoctorRole: typeof isDoctorRole;
|
265
|
+
getRoleName: typeof getRoleName;
|
256
266
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
257
267
|
export default _default;
|
@@ -1 +1 @@
|
|
1
|
-
import{createElementVNode as e,defineComponent as n,useAttrs as o,ref as
|
1
|
+
import{createElementVNode as e,defineComponent as n,useAttrs as o,ref as l,computed as t,watch as a,openBlock as i,createBlock as s,unref as r,withCtx as c,createVNode as u,createTextVNode as d,createElementBlock as m,Fragment as p,renderList as v,toDisplayString as g,withDirectives as w,normalizeClass as f,vShow as y,createCommentVNode as _,withKeys as h,nextTick as k}from"vue";import{NDrawer as C,NDrawerContent as I,NButton as b,NIcon as L,NAvatar as B,NUpload as S,NUploadTrigger as x,NInput as U,NSpace as z,NSwitch as j,NPopconfirm as G}from"naive-ui";import{ChevronBackOutline as D,ChevronForwardOutline as R,AddOutline as A,RemoveOutline as F,Pencil as P}from"@vicons/ionicons5";import{useData as K}from"../hooks/useData.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import{toppingSessionApi as N,groupLeaveApi as O,groupUpdateApi as q}from"../api/index.js";import{isDoctorRole as E,getRoleName as H}from"../utils/index.js";import{trim as J,isFunction as M}from"lodash-es";import"trtc-sdk-v5";import Q from"./ChatAdd.vue.js";var T,V,W,X,Y,Z,$,ee,ne,oe;const le={key:0,class:"chat-set-wrapper"},te=["onClick"],ae={class:"role-name"},ie={class:"name"},se={key:0,class:"item__right",style:{color:"var(--c-primary-color)"}},re={class:"name"},ce={class:"item item-column"},ue=e("span",{class:"label"},(null==(T=window.getLanguageByCode)?void 0:T.call(window,"10010.1.85"))||"群成员",-1),de={class:"group-box"},me=["onClick"],pe={class:"name"},ve={class:"group-box__item"},ge=e("span",{class:"name"},(null==(V=window.getLanguageByCode)?void 0:V.call(window,"10010.1.86"))||"添加",-1),we={class:"group-box__item"},fe=e("span",{class:"name"},(null==(W=window.getLanguageByCode)?void 0:W.call(window,"10010.1.88"))||"移除",-1),ye=["onClick"],_e=e("span",{class:"label"},(null==(X=window.getLanguageByCode)?void 0:X.call(window,"10010.1.90"))||"群头像",-1),he={class:"item"},ke=e("span",{class:"label"},(null==(Y=window.getLanguageByCode)?void 0:Y.call(window,"10010.1.91"))||"群名称",-1),Ce={class:"item__right"},Ie={class:"txt"},be={class:"item"},Le=e("span",{class:"label"},(null==(Z=window.getLanguageByCode)?void 0:Z.call(window,"10010.1.92"))||"置顶聊天",-1),Be={class:"item item--red"},Se=e("span",{class:"label"},(null==($=window.getLanguageByCode)?void 0:$.call(window,"10010.1.93"))||"退出群聊",-1),xe=e("p",{style:{width:"230px"}},(null==(ee=window.getLanguageByCode)?void 0:ee.call(window,"10010.1.94"))||"是否确认退出群聊?",-1),Ue={class:"item item--red"},ze=e("span",{class:"label"},(null==(ne=window.getLanguageByCode)?void 0:ne.call(window,"10010.1.95"))||"解散该群",-1),je=e("p",{style:{width:"230px"}},(null==(oe=window.getLanguageByCode)?void 0:oe.call(window,"10010.1.96"))||"是否确认解散群聊?",-1);var Ge=n({__name:"ChatSet",setup(n){const T=o(),{state:V,setCurrentSessionItem:W,setUserDetail:X,isGroupChat:Y,isGroupLeader:Z}=K(),$=l(),ee=l(!1),ne=l(""),oe=l(!1),Ge=t((()=>V.currentGroupUser.map((e=>e.id)))),De=t((()=>V.currentGroupUser?Z.value?V.currentGroupUser.slice(0,6):V.currentGroupUser.slice(0,7):[]));async function Re(e){try{await N({id:V.currentSessionItem.id,topping:e}),W({topping:e})}catch(e){}}async function Ae(e){await O({dissolution:!!e,groupId:V.currentSessionItem.receiver,operator:V.userInfo.id,memberIdSet:e?Ge.value:[V.userInfo.id]})}async function Fe(){var e;ne.value=V.currentSessionItem.name,ee.value=!0,await k(),null==(e=$.value)||e.select()}async function Pe(e){const n=new FormData,o=Object.assign({id:V.currentSessionItem.receiver},e);for(const e in o)n.append(e,o[e]);await q(n)}async function Ke(){ee.value=!1;const e=J(ne.value);e&&e!==V.currentSessionItem.name&&(await Pe({name:e}),W({name:e,defaultName:e}))}async function Ne(e){const{file:n}=e.file,o=new FileReader;o.onload=function(e){var n;(null==(n=e.target)?void 0:n.result)&&W({avatar:e.target.result})},o.readAsDataURL(e.file.file),await Pe({file:n})}return a((()=>V.id),(e=>{M(T["onUpdate:show"])&&T["onUpdate:show"](!1)})),(n,o)=>(i(),s(r(C),{width:320,"trap-focus":!1,"block-scroll":!1,to:".iho-chat",onAfterLeave:o[8]||(o[8]=e=>oe.value=!1)},{default:c((()=>[u(r(I),null,{header:c((()=>{var e,n;return[r(Y)&&oe.value?(i(),s(r(b),{key:0,text:"",color:"#666",onClick:o[0]||(o[0]=e=>oe.value=!1),style:{"font-size":"var(--n-title-font-size)"}},{icon:c((()=>[u(r(L),{size:20,component:r(D)},null,8,["component"])])),default:c((()=>{var e;return[d((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.82"))||"返回")]})),_:1})):r(Y)?(i(),m(p,{key:1},[d((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.83"))||"群设置")],64)):(i(),m(p,{key:2},[d((null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.66"))||"聊天设置")],64))]})),default:c((()=>{var n;return[r(V).id?(i(),m("div",le,[r(Y)&&oe.value?(i(!0),m(p,{key:0},v(r(V).currentGroupUser,((n,o)=>{var l;return i(),m("div",{key:n.id,class:"item",onClick:e=>r(X)(e,{show:!0,userId:n.id})},[u(r(B),{round:"",size:40,src:n.avatar},null,8,["src"]),e("div",ae,[e("span",ie,g(n.name),1),w(e("label",{class:f(["iho-chatRole",r(E)(n.roleInfo)?"isDoctor":""]),style:{"margin-right":"6px"}},g(r(H)(n.roleInfo)),3),[[y,r(H)(n.roleInfo)]])]),0===o?(i(),m("span",se,(null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.84"))||"群主")):_("v-if",!0)],8,te)})),128)):(i(),m(p,{key:1},[e("div",{class:"item user-info",onClick:o[1]||(o[1]=e=>!r(Y)&&r(X)(e,{show:!0,userId:r(V).currentSessionItem.receiver}))},[u(r(B),{round:"",size:40,src:r(V).currentSessionItem.avatar},null,8,["src"]),e("span",re,g(r(V).currentSessionItem.name),1),w(e("label",{class:f(["iho-chatRole",r(E)(r(V).currentSessionItem.roleInfo)?"isDoctor":""])},g(r(H)(r(V).currentSessionItem.roleInfo)),3),[[y,r(H)(r(V).currentSessionItem.roleInfo)]]),r(Y)?_("v-if",!0):(i(),s(r(L),{key:0,size:24,component:r(R),class:"item__right"},null,8,["component"]))]),r(Y)?(i(),m(p,{key:0},[e("div",ce,[ue,e("div",de,[(i(!0),m(p,null,v(r(De),(n=>(i(),m("div",{key:n.id,class:"group-box__item",onClick:e=>r(X)(e,{show:!0,userId:n.id})},[u(r(B),{round:"",size:40,src:n.avatar},null,8,["src"]),e("span",pe,g(n.name),1),w(e("label",{class:f(["iho-chatRole",r(E)(n.roleInfo)?"isDoctor":""]),style:{"margin-left":"0"}},g(r(H)(n.roleInfo)),3),[[y,r(H)(n.roleInfo)]])],8,me)))),128)),u(Q,{mode:"join",disabledIds:r(Ge)},{trigger:c((()=>[e("div",ve,[u(r(b),{strong:"",secondary:"",circle:""},{icon:c((()=>[u(r(L),{component:r(A)},null,8,["component"])])),_:1}),ge])])),_:1},8,["disabledIds"]),r(Z)?(i(),s(Q,{key:0,title:(null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.87"))||"移除成员",mode:"remove",options:r(V).currentGroupUser},{trigger:c((()=>[e("div",we,[u(r(b),{strong:"",secondary:"",circle:""},{icon:c((()=>[u(r(L),{component:r(F)},null,8,["component"])])),_:1}),fe])])),_:1},8,["options"])):_("v-if",!0)]),u(r(b),{text:"","icon-placement":"right",color:"#999",onClick:o[2]||(o[2]=e=>oe.value=!0)},{icon:c((()=>[u(r(L),{component:r(R)},null,8,["component"])])),default:c((()=>{var e;return[d((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.89"))||"查看全部群成员")]})),_:1})]),u(r(S),{abstract:"",multiple:"",accept:"image/*",onChange:Ne},{default:c((()=>[u(r(x),{abstract:""},{default:c((({handleClick:n})=>[e("div",{class:"item",onClick:n},[_e,u(r(L),{size:20,component:r(R),class:"item__right"},null,8,["component"])],8,ye)])),_:1})])),_:1}),e("div",he,[ke,e("div",Ce,[ee.value?(i(),s(r(U),{key:0,ref_key:"inputRef",ref:$,value:ne.value,"onUpdate:value":o[3]||(o[3]=e=>ne.value=e),onBlur:Ke,onKeydown:o[4]||(o[4]=h((e=>e.target.blur()),["enter"]))},null,8,["value"])):(i(),s(r(z),{key:1,"wrap-item":!1,onClick:Fe,align:"center"},{default:c((()=>[e("span",Ie,g(r(V).currentSessionItem.name),1),u(r(b),{text:"",style:{"font-size":"14px","--n-text-color":"#999"}},{default:c((()=>[u(r(L),{component:r(P)},null,8,["component"])])),_:1})])),_:1}))])])],64)):_("v-if",!0),e("div",be,[Le,u(r(j),{value:r(V).currentSessionItem.topping,"onUpdate:value":[o[5]||(o[5]=e=>r(V).currentSessionItem.topping=e),Re],class:"item__right"},null,8,["value"])]),r(Y)?(i(),m(p,{key:1},[u(r(G),{onPositiveClick:o[6]||(o[6]=()=>Ae(!1))},{trigger:c((()=>[e("div",Be,[Se,u(r(L),{size:20,component:r(R),class:"item__right"},null,8,["component"])])])),default:c((()=>[xe])),_:1}),r(Z)?(i(),s(r(G),{key:0,onPositiveClick:o[7]||(o[7]=()=>Ae(!0))},{trigger:c((()=>[e("div",Ue,[ze,u(r(L),{size:20,component:r(R),class:"item__right"},null,8,["component"])])])),default:c((()=>[je])),_:1})):_("v-if",!0)],64)):_("v-if",!0)],64))])):_("v-if",!0)]})),_:1})])),_:1}))}});export{Ge as default};
|