cnhis-design-vue 3.2.15-beta.2 → 3.2.15-beta.20
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/README.md +87 -87
- 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/src/components/ChatMain.js +1 -1
- package/es/components/ai-chat/src/components/ChatPatient.vue2.js +1 -1
- package/es/components/ai-chat/style/index.css +1 -1
- package/es/components/big-table/src/BigTable.vue2.js +1 -1
- package/es/components/branch-notice/index.d.ts +425 -9
- package/es/components/branch-notice/src/BranchNotice.vue.d.ts +378 -9
- package/es/components/branch-notice/src/BranchNotice.vue2.js +1 -1
- package/es/components/branch-notice/src/canstants.d.ts +2 -1
- package/es/components/branch-notice/src/canstants.js +1 -1
- package/es/components/branch-notice/src/components/NoticeItem.vue.d.ts +168 -44
- package/es/components/branch-notice/src/components/NoticeItem.vue.js +1 -0
- package/es/components/branch-notice/src/components/NoticeItem.vue2.js +1 -0
- package/es/components/branch-notice/src/components/NoticeItemAside.vue.d.ts +74 -5
- package/es/components/branch-notice/src/components/NoticeItemAside.vue.js +1 -0
- package/es/components/branch-notice/src/components/NoticeItemAside.vue2.js +1 -0
- package/es/components/branch-notice/src/components/NoticeOperationList.vue.js +1 -0
- package/es/components/branch-notice/src/components/NoticeOperationList.vue2.js +1 -0
- package/es/components/branch-notice/src/drawLine.js +1 -1
- package/es/components/branch-notice/src/hooks/useTheme.d.ts +1 -0
- package/es/components/branch-notice/src/hooks/useTheme.js +1 -0
- package/es/components/branch-notice/src/types.d.ts +22 -4
- package/es/components/branch-notice/style/index.css +1 -1
- package/es/components/button-print/src/components/IdentityVerification.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/src/components/search-filter/index.vue2.js +1 -1
- package/es/components/classification/src/components/table-modal/index.vue2.js +1 -1
- package/es/components/classification/src/index.vue2.js +1 -1
- package/es/components/expand-field/src/components/FormBatchOptionsModal.vue2.js +1 -1
- package/es/components/expand-field/src/components/PersonModal.vue2.js +1 -1
- package/es/components/expand-field/src/components/form.vue2.js +1 -1
- package/es/components/expand-field/src/index.vue2.js +1 -1
- package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/hooks/useDetailEvent.js +1 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.js +1 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useMeasureInstrument.js +1 -1
- package/es/components/fabric-chart/src/hooks/index.d.ts +1 -0
- package/es/components/fabric-chart/src/hooks/index.js +1 -1
- package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcess.js +1 -1
- package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcessChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useLeft.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/surgicalAnesthesia/useTop.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useBottom.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useOther.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTop.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/fabric-chart/src/hooks/{temperature/useShadow.d.ts → useShadow.d.ts} +2 -2
- package/es/components/fabric-chart/src/hooks/useShadow.js +1 -0
- package/es/components/fabric-chart/src/utils/index.d.ts +1 -0
- package/es/components/fabric-chart/src/utils/index.js +1 -1
- package/es/components/field-set/src/FieldColor.vue.d.ts +1 -1
- package/es/components/field-set/src/FieldColor.vue2.js +1 -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/FieldSet.vue2.js +1 -1
- package/es/components/field-set/src/TableStyle.vue2.js +1 -1
- package/es/components/field-set/src/components/edit-dialog.vue2.js +1 -1
- package/es/components/field-set/src/components/edit-filter.vue2.js +1 -1
- 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/constants/filter.js +1 -1
- package/es/components/field-set/src/constants/index.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/src/hooks/useLocale.js +1 -1
- package/es/components/form-config/style/index.css +1 -1
- package/es/components/form-render/src/FormRender.vue2.js +1 -1
- package/es/components/form-render/src/components/renderer/combination/combination.js +1 -1
- package/es/components/form-render/src/components/renderer/complex.js +1 -1
- package/es/components/form-render/src/components/renderer/date.js +1 -1
- package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
- package/es/components/form-render/src/components/renderer/searchCascade.js +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/components/renderer/switch.js +1 -1
- package/es/components/form-render/src/components/renderer/text.js +1 -1
- package/es/components/form-render/src/components/renderer/textarea.js +1 -1
- package/es/components/form-render/src/hooks/useAnchor.js +1 -1
- package/es/components/form-render/src/hooks/useBusinessBinding.js +1 -1
- package/es/components/form-render/src/hooks/useComplexOptions.js +1 -1
- package/es/components/form-render/src/hooks/useFieldNormalize.js +1 -1
- package/es/components/form-render/src/hooks/useFormValidator.js +1 -1
- package/es/components/form-render/src/hooks/useLowCodeReactions.js +1 -1
- package/es/components/form-render/src/hooks/usePresetScope.js +1 -1
- package/es/components/form-render/src/utils/index.js +1 -1
- package/es/components/iho-chat/index.d.ts +518 -83
- package/es/components/iho-chat/src/Index.vue.d.ts +518 -83
- package/es/components/iho-chat/src/Index.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +33 -8
- package/es/components/iho-chat/src/components/ChatAdd.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatFile.vue.d.ts +33 -8
- package/es/components/iho-chat/src/components/ChatFile.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +33 -8
- package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +101 -26
- package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +34 -9
- package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatSearch.vue.d.ts +33 -34
- package/es/components/iho-chat/src/components/ChatSearch.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatSet.vue.d.ts +34 -9
- package/es/components/iho-chat/src/components/ContextMenu.js +1 -1
- package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +34 -8
- package/es/components/iho-chat/src/components/MultipleVideo.vue2.js +1 -1
- package/es/components/iho-chat/src/components/PersonProfile.vue.d.ts +1 -1
- package/es/components/iho-chat/src/components/SiderList.vue.d.ts +207 -4
- package/es/components/iho-chat/src/components/SiderList.vue2.js +1 -1
- package/es/components/iho-chat/src/components/Video.vue.d.ts +1 -0
- package/es/components/iho-chat/src/components/Video.vue2.js +1 -1
- package/es/components/iho-chat/src/components/userItemRender.d.ts +18 -0
- package/es/components/iho-chat/src/components/userItemRender.js +1 -0
- package/es/components/iho-chat/src/hooks/useData.d.ts +6 -2
- package/es/components/iho-chat/src/hooks/useData.js +1 -1
- package/es/components/iho-chat/src/hooks/useVideo.d.ts +1 -0
- package/es/components/iho-chat/src/hooks/useVideo.js +1 -1
- package/es/components/iho-chat/src/hooks/useWebSocket.js +1 -1
- package/es/components/iho-chat/src/types/index.d.ts +13 -0
- package/es/components/iho-chat/src/utils/index.js +1 -1
- 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/dynamicFilterRenderPlugin/dynamicFilter.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/filterTextPlugin/filter.vue2.js +1 -1
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/info-header/src/components/patientInfo/index.vue2.js +1 -1
- package/es/components/keyboard/src/components/NumberPanel.vue2.js +1 -1
- package/es/components/map/src/Map.vue2.js +1 -1
- package/es/components/quick-search/src/index.vue2.js +1 -1
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/scale-view/src/components/formitem/r-sign.js +1 -1
- package/es/components/scale-view/src/components/formitem/standard-modal.js +1 -1
- package/es/components/scale-view/src/hooks/scaleview-methods.js +1 -1
- package/es/components/scale-view/src/hooks/scaleview-submit.js +1 -1
- package/es/components/select-label/src/SelectLabel.vue2.js +1 -1
- package/es/components/select-label/src/ihoLabel/IhoSelectLabel.vue2.js +1 -1
- package/es/components/table-export-field/src/components/ExportModal.vue2.js +1 -1
- package/es/components/table-export-field/src/components/SaveProjectModal.vue2.js +1 -1
- package/es/components/table-filter/src/components/bi-filter/helpers/options.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/helpers/dateExtraMap.js +1 -1
- package/es/components/table-filter/src/tool/baseOptions.js +1 -1
- package/es/components/template-render/src/components/index.d.ts +23 -23
- package/es/components/tooth-bitmap/src/ToothBitmap.vue2.js +1 -1
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue2.js +1 -1
- package/es/components/vod-chunk-upload/src/vod-upload-modal.js +1 -1
- package/es/shared/assets/img/ai__avatar.png.js +1 -1
- package/es/shared/assets/img/defaultCover/10review_successful.png.js +1 -1
- package/es/shared/assets/img/defaultCover/11review_fail.png.js +1 -1
- package/es/shared/assets/img/defaultCover/12no_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/13no_menu_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/14no_call_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/15no_use_tag.png.js +1 -1
- package/es/shared/assets/img/defaultCover/16no_table_data.png.js +1 -1
- package/es/shared/assets/img/defaultCover/1location.png.js +1 -1
- package/es/shared/assets/img/defaultCover/2notfound.png.js +1 -1
- package/es/shared/assets/img/defaultCover/3loading.png.js +1 -1
- package/es/shared/assets/img/defaultCover/4no_permission.png.js +1 -1
- package/es/shared/assets/img/defaultCover/5no_data.png.js +1 -1
- package/es/shared/assets/img/defaultCover/6no_network.png.js +1 -1
- package/es/shared/assets/img/defaultCover/7no_doctor.png.js +1 -1
- package/es/shared/assets/img/defaultCover/8system_error.png.js +1 -1
- package/es/shared/assets/img/defaultCover/9system_upgrade.png.js +1 -1
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/logo.png.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/table_style_2.png.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/es/shared/hooks/useLevelSearchCascader.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/es/shared/types/business.d.ts +4 -0
- package/package.json +2 -2
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
- package/es/components/fabric-chart/src/hooks/temperature/useShadow.js +0 -1
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
- package/es/shared/utils/fabricjs/index.d.ts +0 -6823
- package/es/shared/utils/tapable/index.d.ts +0 -139
@@ -114,7 +114,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
114
114
|
currentGroupUser: AnyObject[];
|
115
115
|
showMultipleVideo: boolean;
|
116
116
|
};
|
117
|
-
openSession: (
|
117
|
+
openSession: (session: string | AnyObject) => Promise<void>;
|
118
118
|
showUserDetail: import("vue").Ref<boolean>;
|
119
119
|
showLargeAvatar: import("vue").Ref<boolean>;
|
120
120
|
showPhone: import("vue").Ref<boolean>;
|
@@ -301,6 +301,11 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
301
301
|
default: boolean;
|
302
302
|
};
|
303
303
|
}, {
|
304
|
+
initialOptions: AnyObject[];
|
305
|
+
tabList: {
|
306
|
+
key: string;
|
307
|
+
label: string;
|
308
|
+
}[];
|
304
309
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
305
310
|
title: {
|
306
311
|
type: StringConstructor;
|
@@ -353,27 +358,41 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
353
358
|
keyword: import("vue").Ref<string>;
|
354
359
|
showModal: import("vue").Ref<boolean>;
|
355
360
|
checkedOptions: import("vue").Ref<AnyObject[]>;
|
356
|
-
options: import("vue").Ref<AnyObject[]>;
|
357
361
|
groupName: import("vue").Ref<string>;
|
358
|
-
checkedSourceIds: import("vue").Ref<(string | number)[]>;
|
359
362
|
remark: import("vue").Ref<string>;
|
363
|
+
currentTab: import("vue").Ref<AnyObject[]>;
|
364
|
+
breadcrumbList: import("vue").Ref<AnyObject[]>;
|
360
365
|
userList: import("vue").Ref<AnyObject[]>;
|
361
366
|
handleInput: () => void;
|
362
367
|
_disabledIds: import("vue").ComputedRef<any[]>;
|
363
|
-
|
368
|
+
sessionList: import("vue").ComputedRef<{
|
369
|
+
id: any;
|
370
|
+
name: any;
|
371
|
+
avatar: any;
|
372
|
+
chatType: any;
|
373
|
+
}[]>;
|
374
|
+
friends: import("vue").ComputedRef<{
|
375
|
+
id: any;
|
376
|
+
name: any;
|
377
|
+
avatar: any;
|
378
|
+
chatType: any;
|
379
|
+
}[]>;
|
380
|
+
groups: import("vue").ComputedRef<{
|
364
381
|
id: any;
|
365
382
|
name: any;
|
366
383
|
avatar: any;
|
384
|
+
chatType: any;
|
367
385
|
}[]>;
|
368
386
|
checkedIds: import("vue").ComputedRef<any[]>;
|
369
387
|
btnDisabled: import("vue").ComputedRef<boolean>;
|
370
388
|
allChecked: import("vue").WritableComputedRef<boolean>;
|
389
|
+
checkedSourceIds: import("vue").WritableComputedRef<any[]>;
|
390
|
+
currentTabKey: import("vue").ComputedRef<any>;
|
391
|
+
getDisabled: (id: string | number) => boolean;
|
392
|
+
handleClickCheckbox: (option: AnyObject) => Promise<void>;
|
393
|
+
toggleTab: (item: AnyObject) => void;
|
394
|
+
handleTabBack: () => void;
|
371
395
|
handlePositiveClick: () => Promise<void>;
|
372
|
-
updateCheckedSourceIds: () => void;
|
373
|
-
handleSourceIdsUpdate: (value: (string | number)[], meta: {
|
374
|
-
actionType: "check" | "uncheck";
|
375
|
-
value: string | number;
|
376
|
-
}) => void;
|
377
396
|
closeTag: (id: string) => void;
|
378
397
|
NModal: any;
|
379
398
|
NButton: any;
|
@@ -385,8 +404,14 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
385
404
|
NCheckbox: any;
|
386
405
|
NCheckboxGroup: any;
|
387
406
|
NTooltip: any;
|
407
|
+
NBreadcrumb: any;
|
408
|
+
NBreadcrumbItem: any;
|
388
409
|
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<{}>>, {}>;
|
389
410
|
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<{}>>, {}>;
|
411
|
+
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<{}>>, {}>;
|
412
|
+
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<{}>>, {}>;
|
413
|
+
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<{}>>, {}>;
|
414
|
+
last: <T>(array: import("lodash").List<T> | null | undefined) => T | undefined;
|
390
415
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
391
416
|
title: {
|
392
417
|
type: StringConstructor;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,ref as t,computed as n,watch as o,openBlock as s,createElementBlock as i,normalizeClass as r,unref as a,normalizeStyle as l,createVNode as c,withCtx as u,Fragment as m,renderList as d,toDisplayString as p,createCommentVNode as g,createBlock as f,createElementVNode as v,createTextVNode as y,withModifiers as h,nextTick as T}from"vue";import{NImageGroup as M,NButton as w,NAvatar as k,NImage as _,NIcon as C,NSpace as x,NButtonGroup as I,NTooltip as L}from"naive-ui";import{format as j}from"date-fns";import{getHistoryRecordApi as E,readMessageApi as S}from"../api/index.js";import{useData as b}from"../hooks/useData.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import{MESSAGE_TYPE as A}from"../constants/index.js";import{isAudioOrVideoMessage as z,simplifyMessage as D,getAVTime as H,downloadFile as R}from"../utils/index.js";import{first as B,last as N,toString as O}from"lodash-es";import"trtc-sdk-v5";import P from"./PersonProfile.vue.js";import q from"./MessageTemplate.vue.js";import{emojis as J}from"../utils/emoji.js";import W from"./ContextMenu.js";import U from"./ChatAdd.vue.js";import"../../../../shared/utils/index.js";import"@vueuse/core";import"@vue/shared";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import{CallOutline as X,VideocamOutline as F,DocumentSharp as G,ChatbubbleEllipsesOutline as K,EllipsisHorizontal as Y,ArrowDownSharp as $}from"@vicons/ionicons5";import{useScrollLoading as Q}from"../../../../shared/hooks/useScrollLoading.js";const V={key:0,class:"tip-text"},Z={key:1,class:"tip-text"},ee={key:2,class:"message-box"},te={key:0,class:"content-box"},ne={class:"name-box"},oe=["data-time"],se=["onContextmenu"],ie={key:0,class:"reference-content"},re=["innerHTML"],ae=["src"],le=["innerHTML"],ce=["innerHTML"],ue={style:{"margin-left":"8px"}},me={class:"size"};var de=e({__name:"ChatMain",setup(e){const de=t(),{state:pe,setMsgList:ge,relayMessage:fe,setCurrentSessionItem:ve,isGroupChat:ye}=b(),he=t(),Te=t(!1),Me=t({left:0,top:0}),we=t(),ke=t(),_e={page:0,hasMore:!0,lastSendTime:j(new Date,"yyyy-MM-dd HH:mm:ss")},Ce=n((()=>({"--c-tip-top":ye.value?"1px":"-20px","--c-tip-gap":ye.value?"10px":"0px"})));function xe({nodes:e}){var t,n;const{_ctx:o}=null==(t=e.download)?void 0:t.children,s=o?null==(n=null==o?void 0:o.proxy)?void 0:n.previewSrc:"";return[e.prev,e.next,e.rotateCounterclockwise,e.rotateClockwise,e.resizeToOriginalSize,e.zoomOut,e.zoomIn,c(L,null,{trigger:()=>c(C,{style:"cursor: pointer",color:"rgba(255, 255, 255, 0.75",size:24,component:$,onClick:()=>s&&R(s,"img")},null),default:()=>{var e;return(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.102"))||"下载"}}),e.close]}async function Ie(){try{if(!_e.hasMore)return;_e.page++;const e=await E({sessionKey:pe.currentSessionItem.sessionKey,page:_e.page,lastSendTime:_e.lastSendTime});if(!Array.isArray(e)||0===e.length)return _e.hasMore=!1,console.log("接口返回不是一个数组,或者没有更多消息了");const t=B(e).id;_e.lastSendTime=N(e).sendTime,ge(_e.page>1?[...pe.msgList,...e]:e),1===_e.page&&pe.currentSessionItem.unreadNum&&(await S({chatType:pe.currentSessionItem.chatType,messageIdSet:[t],receiver:pe.userInfo.id,sender:pe.currentSessionItem.receiver}),ve({unreadNum:0}))}catch(e){console.log(e)}}async function Le(e,t){we.value=t,async function(e){var t,n,o,s,i,r;Te.value=!0,await T();const{clientX:a,clientY:l}=e,{width:c=0,height:u=0,left:m=0,top:d=0}=(null==(t=de.value)?void 0:t.getBoundingClientRect())||{},p=null!=(s=null==(o=null==(n=he.value)?void 0:n.$el)?void 0:o.getBoundingClientRect().height)?s:220,g=null!=(r=null==(i=de.value)?void 0:i.scrollTop)?r:0,f=5,v={};a<=m+c/2?v.left=a-m+f+"px":v.right=m+c-a-f+"px";l-d<p/2?v.top=g+f+"px":d+u-l<=p/2?v.bottom=Math.abs(g)+f+"px":v.top=g+l-d-p/2+"px";Me.value=v}(e)}function je(e){const{chatMessageType:t,messageTemplate:n}=e.content;return t!==A.TEMPLATE||!!n}function Ee(e){const{chatMessageType:t}=e.content;return e.sender===pe.userInfo.id&&Date.now()-new Date(e.sendTime).getTime()<864e5&&[A.TEXT,A.EMOJI].includes(t)}function Se(e){const{chatMessageType:t,msg:n=""}=e.content;if(t===A.BLEND){const e=O(n).match(/<img[^>]*>/gi);return!e||!e.length}return t&&[A.TEXT,A.EMOJI].includes(t)}function be(e){const{chatMessageType:t,msg:n=""}=e.content,o=O(n).match(/<img[^>]*>/gi);return t===A.BLEND&&o&&o.length}function Ae(e,t){var n,o;const{chatMessageType:s,messageTemplate:i}=e.content;if(s===A.TEMPLATE)return"system"===t?2==(null==(n=null==i?void 0:i.setting)?void 0:n.style.id):2!=(null==(o=null==i?void 0:i.setting)?void 0:o.style.id)}function ze(e){var t,n;const{chatMessageType:o,messageTemplate:s}=e;return o===A.TEMPLATE&&3==(null==(n=null==(t=null==s?void 0:s.setting)?void 0:t.style)?void 0:n.id)}function De(e,t){var n;const o=new Date(e.sendTime).getTime(),s=null==(n=pe.msgList[t+1])?void 0:n.sendTime;if(s){return o-new Date(s).getTime()>3e5}return!0}function He(e){pe.currentReferenceMsg=e,pe.currentReferenceMsg.content.referenceContent=null,Object.assign(pe.currentReferenceMsg,{chatType:pe.currentSessionItem.chatType,receiver:pe.currentSessionItem.receiver,receiverAvatar:pe.currentSessionItem.avatar,receiverName:pe.currentSessionItem.name})}function Re(e,t){var n;"reply"!==e?"relay"===e&&(null==(n=ke.value)||n.click()):He(t)}function Be(e,t){const n=pe.msgList.find((e=>e.id===we.value));fe({checkedIds:e,remark:t,content:n.content})}return Q(de,(()=>{Ie()}),"top",(()=>{Te.value=!1})),o((()=>pe.id),(e=>{e&&(pe.currentReferenceMsg=null,Object.assign(_e,{page:0,hasMore:!0,lastSendTime:j(new Date,"yyyy-MM-dd HH:mm:ss")}),Ie())}),{immediate:!0}),o((()=>pe.isAppendMsg),(e=>{e&&(ge([pe.currentMsg,...pe.msgList]),async function(){var e;null==(e=de.value)||e.scrollTo({top:0,behavior:"auto"})}(),pe.isAppendMsg=!1)}),{immediate:!0}),(e,t)=>{var n;return s(),i("div",{class:r(["chat-main",{"home-bg":!a(pe).id}]),ref_key:"chatMainRef",ref:de,style:l(a(Ce))},[c(a(M),{"show-toolbar-tooltip":"","render-toolbar":xe},{default:u((()=>[(s(!0),i(m,null,d(a(pe).msgList,((e,t)=>{var n,o;return s(),i(m,{key:e.id},[je(e)?(s(),i("div",{key:0,class:r(["message-item",{"message-item--mine":e.sender==a(pe).userInfo.id}])},[De(e,t)?(s(),i("p",V,p(e.__sendTime),1)):g("v-if",!0),Ae(e,"system")||"WITHDRAWN"===e.status?(s(),i(m,{key:1},[Ae(e,"system")?(s(),f(q,{key:0,data:e},null,8,["data"])):g("v-if",!0),"WITHDRAWN"===e.status?(s(),i("p",Z,[v("span",null,p(e.sender==a(pe).userInfo.id?(null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.67"))||"你":e.senderName)+((null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.68"))||"撤回了一条消息"),1),Ee(e)?(s(),f(a(w),{key:0,size:"tiny",style:{color:"var(--c-primary-color)","margin-left":"5px"},text:"",onClick:()=>function(e){pe.currentReEditMsg=e}(e)},{default:u((()=>{var e;return[y((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.69"))||"重新编辑")]})),_:2},1032,["onClick"])):g("v-if",!0)])):g("v-if",!0)],64)):(s(),i("div",ee,[c(P,{"user-id":e.sender,placement:e.sender==a(pe).userInfo.id?"left":"right"},{trigger:u((()=>[c(a(k),{round:"",size:38,src:e.senderAvatar},null,8,["src"])])),_:2},1032,["user-id","placement"]),e.content?(s(),i("div",te,[v("div",ne,[v("span",{class:"name","data-time":e.__time},p(a(ye)?e.senderName:""),9,oe)]),v("div",{class:r(["content",{emoji:e.content.chatMessageType===a(A).EMOJI&&!e.content.referenceContent,template:e.content.chatMessageType===a(A).TEMPLATE,"template--3":ze(e.content),"audio-video":a(z)(e.content),file:e.content.chatMessageType===a(A).FILE}]),onContextmenu:h((t=>Le(t,e.id)),["prevent"])},[Se(e)?(s(),i(m,{key:0},[e.content.referenceContent?(s(),i("div",ie,[v("span",null,p(e.content.referenceContent.senderName)+":",1),v("pre",{innerHTML:a(D)(e.content.referenceContent.content)},null,8,re)])):g("v-if",!0),e.content.chatMessageType===a(A).EMOJI?(s(),i("img",{key:1,class:r([e.content.referenceContent?"emoji--min":"emoji--big"]),src:a(J).findEmoji(e.__content)},null,10,ae)):(s(),i("pre",{key:2,innerHTML:e.__content},null,8,le))],64)):g("v-if",!0),be(e)?(s(),i("pre",{key:1,innerHTML:e.__content},null,8,ce)):g("v-if",!0),Ae(e,"template")?(s(),f(q,{key:2,data:e},null,8,["data"])):g("v-if",!0),e.content.chatMessageType===a(A).IMAGE?(s(),f(a(_),{key:3,width:"240",src:e.__content},null,8,["src"])):g("v-if",!0),a(z)(e.content)?(s(),i(m,{key:4},[c(a(C),{class:r({"is-audio":e.content.chatMessageType===a(A).AUDIO}),component:e.content.chatMessageType===a(A).AUDIO?a(X):a(F)},null,8,["class","component"]),v("span",ue,p(a(H)(e.__content)),1)],64)):g("v-if",!0),e.content.chatMessageType===a(A).FILE?(s(),f(a(x),{key:5,"wrap-item":!1},{default:u((()=>[c(a(C),{class:"icon-file",size:"40",component:a(G)},null,8,["component"]),c(a(x),{"wrap-item":!1,vertical:"",justify:"space-between",style:{"row-gap":"0"}},{default:u((()=>[v("span",null,p(e.__content),1),v("span",me,p(e.__size),1)])),_:2},1024)])),_:2},1024)):g("v-if",!0),c(a(I),{class:"quick-menu"},{default:u((()=>[a(z)(e.content)?g("v-if",!0):(s(),i(m,{key:0},[g(' <n-button quaternary size="tiny">\n\t\t\t\t\t\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<i class="chat--iconfont chat--icon-face" />\n\t\t\t\t\t\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t\t\t\t\t</n-button> '),c(a(w),{quaternary:"",size:"tiny",onClick:()=>He(e)},{icon:u((()=>[c(a(C),{size:"17",component:a(K)},null,8,["component"])])),_:2},1032,["onClick"])],64)),c(a(w),{quaternary:"",size:"tiny",onClick:t=>Le(t,e.id)},{icon:u((()=>[c(a(C),{size:"14",component:a(Y)},null,8,["component"])])),_:2},1032,["onClick"])])),_:2},1024)],42,se)])):g("v-if",!0)]))],2)):g("v-if",!0)],64)})),128))])),_:1}),c(a(W),{ref_key:"contextmenuRef",ref:he,show:Te.value,"onUpdate:show":t[0]||(t[0]=e=>Te.value=e),position:Me.value,id:we.value,onSelect:Re},null,8,["show","position","id"]),c(U,{title:(null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.70"))||"转发消息",mode:"relay",onComfirm:Be},{trigger:u((()=>{var e;return[v("span",{style:{display:"none"},ref_key:"relayTriggerRef",ref:ke},(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.98"))||"转发",512)]})),_:1})],6)}}});export{de as default};
|
1
|
+
import{defineComponent as e,ref as t,computed as n,watch as o,openBlock as s,createElementBlock as i,normalizeClass as r,unref as a,normalizeStyle as l,createVNode as c,withCtx as u,Fragment as m,renderList as d,toDisplayString as p,createCommentVNode as g,createBlock as f,createElementVNode as v,createTextVNode as y,withModifiers as h,nextTick as T}from"vue";import{NImageGroup as M,NButton as w,NAvatar as k,NImage as _,NIcon as C,NSpace as x,NButtonGroup as I,NTooltip as L}from"naive-ui";import{format as j}from"date-fns";import{getHistoryRecordApi as E,readMessageApi as S}from"../api/index.js";import{useData as b}from"../hooks/useData.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import{MESSAGE_TYPE as A}from"../constants/index.js";import{isAudioOrVideoMessage as z,simplifyMessage as D,getAVTime as H,downloadFile as R}from"../utils/index.js";import{first as B,last as N,toString as O}from"lodash-es";import"trtc-sdk-v5";import P from"./PersonProfile.vue.js";import q from"./MessageTemplate.vue.js";import{emojis as J}from"../utils/emoji.js";import W from"./ContextMenu.js";import U from"./ChatAdd.vue.js";import"../../../../shared/utils/index.js";import"@vueuse/core";import"@vue/shared";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import{CallOutline as X,VideocamOutline as F,DocumentSharp as G,ChatbubbleEllipsesOutline as K,EllipsisHorizontal as Y,ArrowDownSharp as $}from"@vicons/ionicons5";import{useScrollLoading as Q}from"../../../../shared/hooks/useScrollLoading.js";const V={key:0,class:"tip-text"},Z={key:1,class:"tip-text"},ee={key:2,class:"message-box"},te={key:0,class:"content-box"},ne={class:"name-box"},oe=["data-time"],se=["onContextmenu"],ie={key:0,class:"reference-content"},re=["innerHTML"],ae=["src"],le=["innerHTML"],ce=["innerHTML"],ue={style:{"margin-left":"8px"}},me={class:"size"};var de=e({__name:"ChatMain",setup(e){const de=t(),{state:pe,setMsgList:ge,relayMessage:fe,setCurrentSessionItem:ve,isGroupChat:ye}=b(),he=t(),Te=t(!1),Me=t({left:0,top:0}),we=t(),ke=t(),_e={page:0,hasMore:!0,lastSendTime:j(new Date,"yyyy-MM-dd HH:mm:ss")},Ce=n((()=>({"--c-tip-top":ye.value?"1px":"-20px","--c-tip-gap":ye.value?"10px":"0px"})));function xe({nodes:e}){var t,n;const{_ctx:o}=null==(t=e.download)?void 0:t.children,s=o?null==(n=null==o?void 0:o.proxy)?void 0:n.previewSrc:"";return[e.prev,e.next,e.rotateCounterclockwise,e.rotateClockwise,e.resizeToOriginalSize,e.zoomOut,e.zoomIn,c(L,null,{trigger:()=>c(C,{style:"cursor: pointer",color:"rgba(255, 255, 255, 0.75",size:24,component:$,onClick:()=>s&&R(s,"img")},null),default:()=>{var e;return(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.102"))||"下载"}}),e.close]}async function Ie(){try{if(!_e.hasMore)return;_e.page++;const e=await E({sessionKey:pe.currentSessionItem.sessionKey,page:_e.page,lastSendTime:_e.lastSendTime});if(!Array.isArray(e)||0===e.length)return _e.hasMore=!1,console.log("接口返回不是一个数组,或者没有更多消息了");const t=B(e).id;_e.lastSendTime=N(e).sendTime,ge(_e.page>1?[...pe.msgList,...e]:e),1===_e.page&&pe.currentSessionItem.unreadNum&&(await S({chatType:pe.currentSessionItem.chatType,messageIdSet:[t],receiver:pe.userInfo.id,sender:pe.currentSessionItem.receiver}),ve({unreadNum:0}))}catch(e){console.log(e)}}async function Le(e,t){we.value=t,async function(e){var t,n,o,s,i,r;Te.value=!0,await T();const{clientX:a,clientY:l}=e,{width:c=0,height:u=0,left:m=0,top:d=0}=(null==(t=de.value)?void 0:t.getBoundingClientRect())||{},p=null!=(s=null==(o=null==(n=he.value)?void 0:n.$el)?void 0:o.getBoundingClientRect().height)?s:220,g=null!=(r=null==(i=de.value)?void 0:i.scrollTop)?r:0,f=5,v={};a<=m+c/2?v.left=a-m+f+"px":v.right=m+c-a-f+"px";l-d<p/2?v.top=g+f+"px":d+u-l<=p/2?v.bottom=Math.abs(g)+f+"px":v.top=g+l-d-p/2+"px";Me.value=v}(e)}function je(e){const{chatMessageType:t,messageTemplate:n}=e.content;return t!==A.TEMPLATE||!!n}function Ee(e){const{chatMessageType:t}=e.content;return e.sender===pe.userInfo.id&&Date.now()-new Date(e.sendTime).getTime()<864e5&&[A.TEXT,A.EMOJI].includes(t)}function Se(e){const{chatMessageType:t,msg:n=""}=e.content;if(t===A.BLEND){const e=O(n).match(/<img[^>]*>/gi);return!e||!e.length}return t&&[A.TEXT,A.EMOJI].includes(t)}function be(e){const{chatMessageType:t,msg:n=""}=e.content,o=O(n).match(/<img[^>]*>/gi);return t===A.BLEND&&o&&o.length}function Ae(e,t){var n,o;const{chatMessageType:s,messageTemplate:i}=e.content;if(s===A.TEMPLATE)return"system"===t?2==(null==(n=null==i?void 0:i.setting)?void 0:n.style.id):2!=(null==(o=null==i?void 0:i.setting)?void 0:o.style.id)}function ze(e){var t,n;const{chatMessageType:o,messageTemplate:s}=e;return o===A.TEMPLATE&&3==(null==(n=null==(t=null==s?void 0:s.setting)?void 0:t.style)?void 0:n.id)}function De(e,t){var n;const o=new Date(e.sendTime).getTime(),s=null==(n=pe.msgList[t+1])?void 0:n.sendTime;if(s){return o-new Date(s).getTime()>3e5}return!0}function He(e){pe.currentReferenceMsg=e,pe.currentReferenceMsg.content.referenceContent=null,Object.assign(pe.currentReferenceMsg,{chatType:pe.currentSessionItem.chatType,receiver:pe.currentSessionItem.receiver,receiverAvatar:pe.currentSessionItem.avatar,receiverName:pe.currentSessionItem.name})}function Re(e,t){var n;"reply"!==e?"relay"===e&&(null==(n=ke.value)||n.click()):He(t)}function Be(e,t){const n=pe.msgList.find((e=>e.id===we.value));fe({checkedIds:e,remark:t,content:n.content})}return Q(de,(()=>{Ie()}),"top",(()=>{Te.value=!1})),o((()=>pe.id),(e=>{e&&(pe.currentReferenceMsg=null,Object.assign(_e,{page:0,hasMore:!0,lastSendTime:j(new Date,"yyyy-MM-dd HH:mm:ss")}),Ie())}),{immediate:!0}),o((()=>pe.isAppendMsg),(e=>{e&&(ge([pe.currentMsg,...pe.msgList]),async function(){var e;null==(e=de.value)||e.scrollTo({top:0,behavior:"auto"})}(),pe.isAppendMsg=!1)}),{immediate:!0}),(e,t)=>{var n;return s(),i("div",{class:r(["chat-main",{"home-bg":!a(pe).id}]),ref_key:"chatMainRef",ref:de,style:l(a(Ce))},[c(a(M),{"show-toolbar-tooltip":"","render-toolbar":xe},{default:u((()=>[(s(!0),i(m,null,d(a(pe).msgList,((e,t)=>{var n,o;return s(),i(m,{key:e.id},[je(e)?(s(),i("div",{key:0,class:r(["message-item",{"message-item--mine":e.sender==a(pe).userInfo.id}])},[De(e,t)?(s(),i("p",V,p(e.__sendTime),1)):g("v-if",!0),Ae(e,"system")||"WITHDRAWN"===e.status?(s(),i(m,{key:1},[Ae(e,"system")?(s(),f(q,{key:0,data:e},null,8,["data"])):g("v-if",!0),"WITHDRAWN"===e.status?(s(),i("p",Z,[v("span",null,p(e.sender==a(pe).userInfo.id?(null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.67"))||"你":e.senderName)+((null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.68"))||"撤回了一条消息"),1),Ee(e)?(s(),f(a(w),{key:0,size:"tiny",style:{color:"var(--c-primary-color)","margin-left":"5px"},text:"",onClick:()=>function(e){pe.currentReEditMsg=e}(e)},{default:u((()=>{var e;return[y((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.69"))||"重新编辑")]})),_:2},1032,["onClick"])):g("v-if",!0)])):g("v-if",!0)],64)):(s(),i("div",ee,[c(P,{"user-id":e.sender,placement:e.sender==a(pe).userInfo.id?"left":"right"},{trigger:u((()=>[c(a(k),{round:"",size:38,src:e.senderAvatar},null,8,["src"])])),_:2},1032,["user-id","placement"]),e.content?(s(),i("div",te,[v("div",ne,[v("span",{class:"name","data-time":e.__time},p(a(ye)?e.senderName:""),9,oe)]),v("div",{class:r(["content",{emoji:e.content.chatMessageType===a(A).EMOJI&&!e.content.referenceContent,template:e.content.chatMessageType===a(A).TEMPLATE,"template--3":ze(e.content),"audio-video":a(z)(e.content),file:e.content.chatMessageType===a(A).FILE}]),onContextmenu:h((t=>Le(t,e.id)),["prevent"])},[Se(e)?(s(),i(m,{key:0},[e.content.referenceContent?(s(),i("div",ie,[v("span",null,p(e.content.referenceContent.senderName)+":",1),v("pre",{innerHTML:a(D)(e.content.referenceContent.content)},null,8,re)])):g("v-if",!0),e.content.chatMessageType===a(A).EMOJI?(s(),i("img",{key:1,class:r([e.content.referenceContent?"emoji--min":"emoji--big"]),src:a(J).findEmoji(e.__content)},null,10,ae)):(s(),i("pre",{key:2,innerHTML:e.__content},null,8,le))],64)):g("v-if",!0),be(e)?(s(),i("pre",{key:1,innerHTML:e.__content},null,8,ce)):g("v-if",!0),Ae(e,"template")?(s(),f(q,{key:2,data:e},null,8,["data"])):g("v-if",!0),e.content.chatMessageType===a(A).IMAGE?(s(),f(a(_),{key:3,width:"240",src:e.__content},null,8,["src"])):g("v-if",!0),a(z)(e.content)?(s(),i(m,{key:4},[c(a(C),{class:r({"is-audio":e.content.chatMessageType===a(A).AUDIO}),component:e.content.chatMessageType===a(A).AUDIO?a(X):a(F)},null,8,["class","component"]),v("span",ue,p(a(H)(e.__content)),1)],64)):g("v-if",!0),e.content.chatMessageType===a(A).FILE?(s(),f(a(x),{key:5,"wrap-item":!1},{default:u((()=>[c(a(C),{class:"icon-file",size:"40",component:a(G)},null,8,["component"]),c(a(x),{"wrap-item":!1,vertical:"",justify:"space-between",style:{"row-gap":"0"}},{default:u((()=>[v("span",null,p(e.__content),1),v("span",me,p(e.__size),1)])),_:2},1024)])),_:2},1024)):g("v-if",!0),c(a(I),{class:"quick-menu"},{default:u((()=>[a(z)(e.content)?g("v-if",!0):(s(),i(m,{key:0},[g(' <n-button quaternary size="tiny">\n\t\t\t\t\t\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<i class="chat--iconfont chat--icon-face" />\n\t\t\t\t\t\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t\t\t\t\t</n-button> '),c(a(w),{quaternary:"",size:"tiny",onClick:()=>He(e)},{icon:u((()=>[c(a(C),{size:"17",component:a(K)},null,8,["component"])])),_:2},1032,["onClick"])],64)),c(a(w),{quaternary:"",size:"tiny",onClick:t=>Le(t,e.id)},{icon:u((()=>[c(a(C),{size:"14",component:a(Y)},null,8,["component"])])),_:2},1032,["onClick"])])),_:2},1024)],42,se)])):g("v-if",!0)]))],2)):g("v-if",!0)],64)})),128))])),_:1}),c(a(W),{ref_key:"contextmenuRef",ref:he,show:Te.value,"onUpdate:show":t[0]||(t[0]=e=>Te.value=e),position:Me.value,id:we.value,onSelect:Re},null,8,["show","position","id"]),c(U,{title:(null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.44"))||"转发消息",mode:"relay",onComfirm:Be},{trigger:u((()=>{var e;return[v("span",{style:{display:"none"},ref_key:"relayTriggerRef",ref:ke},(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.45"))||"转发",512)]})),_:1})],6)}}});export{de as default};
|
@@ -1,52 +1,36 @@
|
|
1
|
-
import { PropType } from 'vue';
|
2
|
-
import { AnyObject } from '../../../../shared/types';
|
3
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
4
2
|
listRef: import("vue").Ref<any>;
|
5
3
|
inputRef: import("vue").Ref<any>;
|
6
4
|
showSearch: import("vue").Ref<boolean>;
|
7
5
|
keyword: import("vue").Ref<string>;
|
8
|
-
cssVars: import("vue").ComputedRef<AnyObject>;
|
6
|
+
cssVars: import("vue").ComputedRef<import("../../../../shared/types").AnyObject>;
|
9
7
|
state: {
|
10
8
|
orgId: string | number;
|
11
|
-
currentSessionItem: AnyObject;
|
9
|
+
currentSessionItem: import("../../../../shared/types").AnyObject;
|
12
10
|
id: string;
|
13
|
-
userInfo: AnyObject;
|
14
|
-
msgList: AnyObject[];
|
15
|
-
currentMsg: AnyObject;
|
11
|
+
userInfo: import("../../../../shared/types").AnyObject;
|
12
|
+
msgList: import("../../../../shared/types").AnyObject[];
|
13
|
+
currentMsg: import("../../../../shared/types").AnyObject;
|
16
14
|
isAppendMsg: boolean;
|
17
|
-
sessionList: AnyObject[];
|
15
|
+
sessionList: import("../../../../shared/types").AnyObject[];
|
18
16
|
isChangeSession: boolean;
|
19
|
-
updateSessionItem: AnyObject;
|
17
|
+
updateSessionItem: import("../../../../shared/types").AnyObject;
|
20
18
|
isUpdateSession: boolean;
|
21
|
-
currentReferenceMsg: AnyObject | null;
|
22
|
-
currentReEditMsg: AnyObject | null;
|
19
|
+
currentReferenceMsg: import("../../../../shared/types").AnyObject | null;
|
20
|
+
currentReEditMsg: import("../../../../shared/types").AnyObject | null;
|
23
21
|
showVideo: boolean;
|
24
|
-
currentAVMsg: AnyObject;
|
25
|
-
currentGroupUser: AnyObject[];
|
22
|
+
currentAVMsg: import("../../../../shared/types").AnyObject;
|
23
|
+
currentGroupUser: import("../../../../shared/types").AnyObject[];
|
26
24
|
showMultipleVideo: boolean;
|
27
25
|
};
|
28
|
-
|
29
|
-
userList: import("vue").Ref<AnyObject[]>;
|
26
|
+
userList: import("vue").Ref<import("../../../../shared/types").AnyObject[]>;
|
30
27
|
handleInput: () => void;
|
31
28
|
currentTabValue: import("vue").Ref<string>;
|
32
|
-
|
33
|
-
item: {
|
34
|
-
type: PropType<AnyObject>;
|
35
|
-
default: () => {};
|
36
|
-
};
|
37
|
-
}, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
38
|
-
item: {
|
39
|
-
type: PropType<AnyObject>;
|
40
|
-
default: () => {};
|
41
|
-
};
|
42
|
-
}>>, {
|
43
|
-
item: AnyObject;
|
44
|
-
}>;
|
45
|
-
groupList: import("vue").ComputedRef<AnyObject[]>;
|
29
|
+
groupList: import("vue").ComputedRef<import("../../../../shared/types").AnyObject[]>;
|
46
30
|
showNoData: import("vue").ComputedRef<boolean>;
|
47
31
|
showAllNoData: import("vue").ComputedRef<boolean>;
|
48
32
|
showGroupNoData: import("vue").ComputedRef<boolean>;
|
49
|
-
|
33
|
+
handleClose: () => void;
|
50
34
|
NPopover: any;
|
51
35
|
NButton: any;
|
52
36
|
NInput: any;
|
@@ -61,7 +45,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
61
45
|
default: string;
|
62
46
|
};
|
63
47
|
config: {
|
64
|
-
type: PropType<AnyObject>;
|
48
|
+
type: import("vue").PropType<import("../../../../shared/types").AnyObject>;
|
65
49
|
default: () => {
|
66
50
|
title: string;
|
67
51
|
content: string;
|
@@ -74,7 +58,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
74
58
|
default: string;
|
75
59
|
};
|
76
60
|
config: {
|
77
|
-
type: PropType<AnyObject>;
|
61
|
+
type: import("vue").PropType<import("../../../../shared/types").AnyObject>;
|
78
62
|
default: () => {
|
79
63
|
title: string;
|
80
64
|
content: string;
|
@@ -98,7 +82,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
98
82
|
default: string;
|
99
83
|
};
|
100
84
|
config: {
|
101
|
-
type: PropType<AnyObject>;
|
85
|
+
type: import("vue").PropType<import("../../../../shared/types").AnyObject>;
|
102
86
|
default: () => {
|
103
87
|
title: string;
|
104
88
|
content: string;
|
@@ -108,7 +92,22 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
108
92
|
onReloadPage?: ((...args: any[]) => any) | undefined;
|
109
93
|
}, {
|
110
94
|
type: string;
|
111
|
-
config: AnyObject;
|
95
|
+
config: import("../../../../shared/types").AnyObject;
|
112
96
|
}>>;
|
97
|
+
userItemRender: import("vue").DefineComponent<{
|
98
|
+
item: {
|
99
|
+
type: import("vue").PropType<import("../../../../shared/types").AnyObject>;
|
100
|
+
default: () => {};
|
101
|
+
};
|
102
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "item-click"[], "item-click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
103
|
+
item: {
|
104
|
+
type: import("vue").PropType<import("../../../../shared/types").AnyObject>;
|
105
|
+
default: () => {};
|
106
|
+
};
|
107
|
+
}>> & {
|
108
|
+
"onItem-click"?: ((...args: any[]) => any) | undefined;
|
109
|
+
}, {
|
110
|
+
item: import("../../../../shared/types").AnyObject;
|
111
|
+
}>;
|
113
112
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
114
113
|
export default _default;
|
@@ -1 +1 @@
|
|
1
|
-
import{createElementVNode as e,defineComponent as l,ref as t,computed as n,watch as a,nextTick as
|
1
|
+
import{createElementVNode as e,defineComponent as l,ref as t,computed as n,watch as a,nextTick as o,openBlock as i,createBlock as u,unref as r,normalizeStyle as s,withCtx as d,createVNode as c,createTextVNode as v,createElementBlock as p,Fragment as g,renderList as f,normalizeClass as w,createCommentVNode as m,withDirectives as y,vShow as h}from"vue";import{NPopover as k,NButton as C,NIcon as L,NInput as _,NTabs as B,NTabPane as j,NDivider as x}from"naive-ui";import{SearchOutline as I}from"@vicons/ionicons5";import{useData as b}from"../hooks/useData.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import"../api/index.js";import{isGroup as R}from"../utils/index.js";import{trim as U}from"lodash-es";import"trtc-sdk-v5";import{useSearchUserList as z}from"../hooks/useSearchUserList.js";import D from"../../../default-page/index.js";import S from"./userItemRender.js";var V,$;const q=e("div",{class:"title"},(null==(V=window.getLanguageByCode)?void 0:V.call(window,"10010.1.510"))||"联系人",-1),A=e("div",{class:"title"},(null==($=window.getLanguageByCode)?void 0:$.call(window,"10010.1.575"))||"我的群组",-1),E={class:"user-list-wrapper"};var F=l({__name:"ChatSearch",setup(l){const V=t(),$=t(),F=t(!1),G=t(""),{cssVars:H,state:J}=b(),{userList:K,handleInput:M}=z({wrapperRef:V,keywordRef:G}),N=t("all"),O=n((()=>(G.value||"").replace(/^\s+|\s+$/g,"")?J.sessionList.filter((e=>R(e)&&(null==e?void 0:e.name.includes(G.value)))):[])),P=n((()=>!K.value.length&&!!U(G.value||""))),Q=n((()=>!K.value.length&&!O.value.length&&!!U(G.value||""))),T=n((()=>!O.value.length&&!!U(G.value||"")));function W(){F.value=!1}return a((()=>F.value),(async e=>{var l;e&&(await o(),null==(l=$.value)||l.focus())})),(l,t)=>(i(),u(r(k),{raw:"","content-class":"search-content",class:"search-wrapper",style:s(r(H)),show:F.value,"onUpdate:show":t[4]||(t[4]=e=>F.value=e),placement:"top",trigger:"click","display-directive":"show","show-arrow":!1,delay:0,overlap:""},{trigger:d((()=>[c(r(C),{color:"#ffffff4D",class:"search-trigger-btn"},{icon:d((()=>[c(r(L),{component:r(I),color:"#ffffff80"},null,8,["component"])])),default:d((()=>{var e;return[v((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.80"))||"搜索联系人")]})),_:1})])),default:d((()=>[c(r(_),{ref_key:"inputRef",ref:$,size:"small",clearable:"",autofocus:"",value:G.value,"onUpdate:value":[t[0]||(t[0]=e=>G.value=e),r(M)]},{prefix:d((()=>[c(r(L),{color:"#ffffff80",component:r(I)},null,8,["component"])])),_:1},8,["value","onUpdate:value"]),c(r(B),{type:"line",animated:"",value:N.value,"onUpdate:value":t[3]||(t[3]=e=>N.value=e)},{default:d((()=>{var l,n,a;return[c(r(j),{name:"all",tab:(null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.571"))||"综合","display-directive":"show",style:{padding:"0 10px 10px"}},{default:d((()=>{var e;return[r(K).length>0?(i(),p(g,{key:0},[q,(i(!0),p(g,null,f(r(K),((e,l)=>(i(),p(g,{key:e.id},[l<3?(i(),u(r(S),{key:0,item:e,class:w({last:r(K).length<4?l===r(K).length-1:2===l}),onItemClick:W},null,8,["item","class"])):m("v-if",!0)],64)))),128)),r(K).length>3?(i(),u(r(C),{key:0,text:"",type:"primary",onClick:t[1]||(t[1]=()=>N.value="user")},{icon:d((()=>[c(r(L),{component:r(I),size:"16"},null,8,["component"])])),default:d((()=>{var e;return[v((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.573"))||"查看更多联系人")]})),_:1})):m("v-if",!0)],64)):m("v-if",!0),r(K).length&&r(O).length?(i(),u(r(x),{key:1})):m("v-if",!0),r(O).length>0?(i(),p(g,{key:2},[A,(i(!0),p(g,null,f(r(O),((e,l)=>(i(),p(g,{key:e.id},[l<3?(i(),u(r(S),{key:0,item:e,class:w({last:r(O).length<4?l===r(O).length-1:2===l}),onItemClick:W},null,8,["item","class"])):m("v-if",!0)],64)))),128)),r(O).length>3?(i(),u(r(C),{key:0,text:"",type:"primary",onClick:t[2]||(t[2]=()=>N.value="group")},{icon:d((()=>[c(r(L),{component:r(I),size:"16"},null,8,["component"])])),default:d((()=>{var e;return[v((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.574"))||"查看更多群组")]})),_:1})):m("v-if",!0)],64)):m("v-if",!0),y(c(r(D),{config:{title:" ",content:(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.81"))||"找不到相关的结果"},type:"5"},null,512),[[h,r(Q)]])]})),_:1}),c(r(j),{name:"user",tab:(null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.510"))||"联系人","display-directive":"show"},{default:d((()=>{var l;return[e("div",{class:"user-list-wrapper",ref_key:"listRef",ref:V},[(i(!0),p(g,null,f(r(K),(e=>(i(),u(r(S),{key:e.id,item:e,onItemClick:W},null,8,["item"])))),128)),y(c(r(D),{config:{title:" ",content:(null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.81"))||"找不到相关的结果"},type:"5"},null,512),[[h,r(P)]])],512)]})),_:1}),c(r(j),{name:"group",tab:(null==(a=window.getLanguageByCode)?void 0:a.call(window,"10010.1.572"))||"群组","display-directive":"show"},{default:d((()=>{var l;return[e("div",E,[(i(!0),p(g,null,f(r(O),(e=>(i(),u(r(S),{key:e.id,item:e,onItemClick:W},null,8,["item"])))),128)),y(c(r(D),{config:{title:" ",content:(null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.81"))||"找不到相关的结果"},type:"5"},null,512),[[h,r(T)]])])]})),_:1})]})),_:1},8,["value"])])),_:1},8,["style","show"]))}});export{F as default};
|
@@ -97,7 +97,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
97
97
|
currentGroupUser: AnyObject[];
|
98
98
|
showMultipleVideo: boolean;
|
99
99
|
};
|
100
|
-
openSession: (
|
100
|
+
openSession: (session: string | AnyObject) => Promise<void>;
|
101
101
|
showUserDetail: import("vue").Ref<boolean>;
|
102
102
|
showLargeAvatar: import("vue").Ref<boolean>;
|
103
103
|
showPhone: import("vue").Ref<boolean>;
|
@@ -165,6 +165,11 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
165
165
|
default: boolean;
|
166
166
|
};
|
167
167
|
}, {
|
168
|
+
initialOptions: AnyObject[];
|
169
|
+
tabList: {
|
170
|
+
key: string;
|
171
|
+
label: string;
|
172
|
+
}[];
|
168
173
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
169
174
|
title: {
|
170
175
|
type: StringConstructor;
|
@@ -217,27 +222,41 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
217
222
|
keyword: import("vue").Ref<string>;
|
218
223
|
showModal: import("vue").Ref<boolean>;
|
219
224
|
checkedOptions: import("vue").Ref<AnyObject[]>;
|
220
|
-
options: import("vue").Ref<AnyObject[]>;
|
221
225
|
groupName: import("vue").Ref<string>;
|
222
|
-
checkedSourceIds: import("vue").Ref<(string | number)[]>;
|
223
226
|
remark: import("vue").Ref<string>;
|
227
|
+
currentTab: import("vue").Ref<AnyObject[]>;
|
228
|
+
breadcrumbList: import("vue").Ref<AnyObject[]>;
|
224
229
|
userList: import("vue").Ref<AnyObject[]>;
|
225
230
|
handleInput: () => void;
|
226
231
|
_disabledIds: import("vue").ComputedRef<any[]>;
|
227
|
-
|
232
|
+
sessionList: import("vue").ComputedRef<{
|
233
|
+
id: any;
|
234
|
+
name: any;
|
235
|
+
avatar: any;
|
236
|
+
chatType: any;
|
237
|
+
}[]>;
|
238
|
+
friends: import("vue").ComputedRef<{
|
239
|
+
id: any;
|
240
|
+
name: any;
|
241
|
+
avatar: any;
|
242
|
+
chatType: any;
|
243
|
+
}[]>;
|
244
|
+
groups: import("vue").ComputedRef<{
|
228
245
|
id: any;
|
229
246
|
name: any;
|
230
247
|
avatar: any;
|
248
|
+
chatType: any;
|
231
249
|
}[]>;
|
232
250
|
checkedIds: import("vue").ComputedRef<any[]>;
|
233
251
|
btnDisabled: import("vue").ComputedRef<boolean>;
|
234
252
|
allChecked: import("vue").WritableComputedRef<boolean>;
|
253
|
+
checkedSourceIds: import("vue").WritableComputedRef<any[]>;
|
254
|
+
currentTabKey: import("vue").ComputedRef<any>;
|
255
|
+
getDisabled: (id: string | number) => boolean;
|
256
|
+
handleClickCheckbox: (option: AnyObject) => Promise<void>;
|
257
|
+
toggleTab: (item: AnyObject) => void;
|
258
|
+
handleTabBack: () => void;
|
235
259
|
handlePositiveClick: () => Promise<void>;
|
236
|
-
updateCheckedSourceIds: () => void;
|
237
|
-
handleSourceIdsUpdate: (value: (string | number)[], meta: {
|
238
|
-
actionType: "check" | "uncheck";
|
239
|
-
value: string | number;
|
240
|
-
}) => void;
|
241
260
|
closeTag: (id: string) => void;
|
242
261
|
NModal: any;
|
243
262
|
NButton: any;
|
@@ -249,8 +268,14 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
249
268
|
NCheckbox: any;
|
250
269
|
NCheckboxGroup: any;
|
251
270
|
NTooltip: any;
|
271
|
+
NBreadcrumb: any;
|
272
|
+
NBreadcrumbItem: any;
|
252
273
|
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<{}>>, {}>;
|
253
274
|
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<{}>>, {}>;
|
275
|
+
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<{}>>, {}>;
|
276
|
+
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<{}>>, {}>;
|
277
|
+
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<{}>>, {}>;
|
278
|
+
last: <T>(array: import("lodash").List<T> | null | undefined) => T | undefined;
|
254
279
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
255
280
|
title: {
|
256
281
|
type: StringConstructor;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,ref as t,computed as o,withDirectives as i,createVNode as s,vShow as n,isVNode as a}from"vue";import{NButtonGroup as l,NButton as r,NIcon as d}from"naive-ui";import{CopyOutline as c,OpenOutline as u,ChatbubbleEllipsesOutline as p,ReturnDownBack as m,DownloadOutline as w}from"@vicons/ionicons5";import{onClickOutside as g}from"@vueuse/core";import{useData as y}from"../hooks/useData.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import{STATUS as f,MESSAGE_TYPE as v}from"../constants/index.js";import{recallMessageApi as h}from"../api/index.js";import{isAudioOrVideoMessage as T,$message as b,downloadFile as I}from"../utils/index.js";import"lodash-es";import"trtc-sdk-v5";import{emojis as E}from"../utils/emoji.js";import{format as j}from"date-fns";var k=e({name:"PopupMenu",inheritAttrs:!1,props:{type:{type:String,default:"message"},show:{type:Boolean,default:!1},position:{type:Object},id:{type:String}},emits:["update:show","select"],setup(e,{attrs:k,slots:M,emit:L}){var D,x,S,A,B;const{state:C,setCurrentSessionItem:O}=y(),W=[{icon:c,label:(null==(D=window.getLanguageByCode)?void 0:D.call(window,"10010.1.97"))||"复制",key:"copy"},{icon:u,label:(null==(x=window.getLanguageByCode)?void 0:x.call(window,"10010.1.
|
1
|
+
import{defineComponent as e,ref as t,computed as o,withDirectives as i,createVNode as s,vShow as n,isVNode as a}from"vue";import{NButtonGroup as l,NButton as r,NIcon as d}from"naive-ui";import{CopyOutline as c,OpenOutline as u,ChatbubbleEllipsesOutline as p,ReturnDownBack as m,DownloadOutline as w}from"@vicons/ionicons5";import{onClickOutside as g}from"@vueuse/core";import{useData as y}from"../hooks/useData.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import{STATUS as f,MESSAGE_TYPE as v}from"../constants/index.js";import{recallMessageApi as h}from"../api/index.js";import{isAudioOrVideoMessage as T,$message as b,downloadFile as I}from"../utils/index.js";import"lodash-es";import"trtc-sdk-v5";import{emojis as E}from"../utils/emoji.js";import{format as j}from"date-fns";var k=e({name:"PopupMenu",inheritAttrs:!1,props:{type:{type:String,default:"message"},show:{type:Boolean,default:!1},position:{type:Object},id:{type:String}},emits:["update:show","select"],setup(e,{attrs:k,slots:M,emit:L}){var D,x,S,A,B;const{state:C,setCurrentSessionItem:O}=y(),W=[{icon:c,label:(null==(D=window.getLanguageByCode)?void 0:D.call(window,"10010.1.97"))||"复制",key:"copy"},{icon:u,label:(null==(x=window.getLanguageByCode)?void 0:x.call(window,"10010.1.45"))||"转发",key:"relay"},{icon:p,label:(null==(S=window.getLanguageByCode)?void 0:S.call(window,"10010.1.99"))||"回复",key:"reply"},{icon:m,label:(null==(A=window.getLanguageByCode)?void 0:A.call(window,"10010.1.101"))||"撤回",key:"withdraw"},{icon:w,label:(null==(B=window.getLanguageByCode)?void 0:B.call(window,"10010.1.102"))||"下载",key:"download"}],$=[{label:"置顶会话",key:"topping"},{label:"移除会话",key:"remove"}],H=t(null),J=o((()=>("message"===e.type?C.msgList:C.sessionList).find((({id:t})=>t===e.id)))),N=o((()=>{var t;if(!e.id)return[];if(!(null==J?void 0:J.value))return[];if("session"===e.type){const e=[...$];return e[0].label=(null==(t=J.value)?void 0:t.topping)?"取消置顶":"置顶会话",J.value.status===f.ENDED&&e.pop(),e}const{content:o={},sendTime:i,sender:s}=J.value,{chatMessageType:n}=o,a=[];return(s!==C.userInfo.id||n===v.TEMPLATE||s===C.userInfo.id&&Date.now()-new Date(i).getTime()>2592e5)&&a.push("withdraw"),[v.TEXT,v.EMOJI,v.BLEND].includes(n)?a.push("download"):T(o)?a.push("copy","relay","reply","download"):n===v.FILE?a.push("copy"):[v.FORWARD,v.TEMPLATE].includes(n)&&a.push("copy","download"),a.length?W.filter((e=>!a.includes(e.key))):W}));return g(H,(e=>{L("update:show",!1)})),()=>{let t;return e.id&&N.value?i(s("div",{class:"contextmenu-wrapper",ref:H,style:e.position},[s(l,{vertical:!0},(o=t=N.value.map((t=>s(r,{key:t.key,onClick:()=>async function(t){L("update:show",!1);const{content:o={},sendTime:i,sender:s}=J.value||{},{chatMessageType:n}=o;switch(t){case"copy":if(!o.msg)return console.log("复制内容为空!");if(!navigator||!("clipboard"in navigator))return console.log("当前浏览器版本不支持复制!");try{if(n===v.TEXT)await navigator.clipboard.writeText(o.msg);else{let e;if([v.EMOJI,v.IMAGE].includes(n)){const t=n===v.EMOJI?E.findEmoji(o.msg):o.msg;e=`<img data-msg=${o.msg} data-type=${n} class=${n===v.EMOJI?"emoji--min":""} src=${t} />`}else e=o.msg;await navigator.clipboard.write([new window.ClipboardItem({"text/html":new Blob([e],{type:"text/html"})})])}}catch(e){console.log("复制失败!")}return;case"download":{let{fileUrl:e,msg:t}=o;return n===v.IMAGE&&(e=t,t=t.match(/\/([^\/?#]+)$/)[1]),void I(e,t)}case"withdraw":try{const t=C.msgList.findIndex((({id:t})=>t===e.id)),o=0===t;if(await h({chatType:C.currentSessionItem.chatType,messageIdSet:[e.id],receiver:C.currentSessionItem.receiver,sender:C.userInfo.id,isLastMessage:o}),C.msgList[t].status="WITHDRAWN",o){const e=j(new Date,"yyyy-MM-dd HH:mm:ss");O({lastMessageStatus:"WITHDRAWN",lastMessageSendTime:e,sortTime:e,updatedTime:e})}}catch(e){b.error("撤回失败")}return}L("select",t,J.value)}(t.key),quaternary:!0},{default:()=>t.label,icon:()=>t.icon?s(d,{component:t.icon},null):null}))),"function"==typeof o||"[object Object]"===Object.prototype.toString.call(o)&&!a(o)?t:{default:()=>[t]}))]),[[n,e.show]]):null;var o}}});export{k as default};
|
@@ -31,6 +31,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
31
31
|
receiver?: string | undefined;
|
32
32
|
}) => Promise<void>;
|
33
33
|
trtc: TRTC;
|
34
|
+
trtcProxy: import("vue").Ref<any>;
|
34
35
|
voiceOpen: import("vue").Ref<boolean>;
|
35
36
|
isAudio: import("vue").ComputedRef<boolean>;
|
36
37
|
isCall: import("vue").ComputedRef<boolean>;
|
@@ -95,6 +96,11 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
95
96
|
default: boolean;
|
96
97
|
};
|
97
98
|
}, {
|
99
|
+
initialOptions: AnyObject[];
|
100
|
+
tabList: {
|
101
|
+
key: string;
|
102
|
+
label: string;
|
103
|
+
}[];
|
98
104
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
99
105
|
title: {
|
100
106
|
type: StringConstructor;
|
@@ -147,27 +153,41 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
147
153
|
keyword: import("vue").Ref<string>;
|
148
154
|
showModal: import("vue").Ref<boolean>;
|
149
155
|
checkedOptions: import("vue").Ref<AnyObject[]>;
|
150
|
-
options: import("vue").Ref<AnyObject[]>;
|
151
156
|
groupName: import("vue").Ref<string>;
|
152
|
-
checkedSourceIds: import("vue").Ref<(string | number)[]>;
|
153
157
|
remark: import("vue").Ref<string>;
|
158
|
+
currentTab: import("vue").Ref<AnyObject[]>;
|
159
|
+
breadcrumbList: import("vue").Ref<AnyObject[]>;
|
154
160
|
userList: import("vue").Ref<AnyObject[]>;
|
155
161
|
handleInput: () => void;
|
156
162
|
_disabledIds: import("vue").ComputedRef<any[]>;
|
157
|
-
|
163
|
+
sessionList: import("vue").ComputedRef<{
|
158
164
|
id: any;
|
159
165
|
name: any;
|
160
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;
|
161
180
|
}[]>;
|
162
181
|
checkedIds: import("vue").ComputedRef<any[]>;
|
163
182
|
btnDisabled: import("vue").ComputedRef<boolean>;
|
164
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;
|
165
190
|
handlePositiveClick: () => Promise<void>;
|
166
|
-
updateCheckedSourceIds: () => void;
|
167
|
-
handleSourceIdsUpdate: (value: (string | number)[], meta: {
|
168
|
-
actionType: "check" | "uncheck";
|
169
|
-
value: string | number;
|
170
|
-
}) => void;
|
171
191
|
closeTag: (id: string) => void;
|
172
192
|
NModal: any;
|
173
193
|
NButton: any;
|
@@ -179,8 +199,14 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
179
199
|
NCheckbox: any;
|
180
200
|
NCheckboxGroup: any;
|
181
201
|
NTooltip: any;
|
202
|
+
NBreadcrumb: any;
|
203
|
+
NBreadcrumbItem: any;
|
182
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<{}>>, {}>;
|
183
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;
|
184
210
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
185
211
|
title: {
|
186
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 d,unref as c,vShow as r,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 d,unref as c,vShow as r,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"},de={class:"btn"},ce=e("span",null,(null==(z=window.getLanguageByCode)?void 0:z.call(window,"10010.1.113"))||"拒接",-1),re={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"},d(c(Me)),513),[[r,Ce.value]]),u(c(h),{quaternary:"",circle:"",color:"#ffffffcc",onClick:Re},{icon:m((()=>[u(c(y),{component:c(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":c(H).userInfo.name},null,8,q),e("div",G,[e("div",F,[e("div",J,[u(c(h),{text:"",color:c(me)?"#fff":"#000",onClick:c(fe)},{icon:m((()=>[u(c(y),{component:c(me)?c(b):c(A)},null,8,["component"])])),_:1},8,["color","onClick"]),K]),e("div",Q,[u(c(h),{text:"",color:c(Ie)?"#fff":"#000",disabled:c(pe),onClick:c(ke)},{icon:m((()=>[u(c(y),{component:c(Ie)?c(C):c(V)},null,8,["component"])])),_:1},8,["color","disabled","onClick"]),W]),e("div",{class:"btn",onClick:Re},[u(c(h),{circle:"",color:"#f17568",class:"btn--rotate"},{icon:m((()=>[u(c(y),{component:c(M)},null,8,["component"])])),_:1}),X]),u(k,{onComfirm:_e},{trigger:m((()=>[e("div",Z,[u(c(h),{text:"",color:"#fff"},{icon:m((()=>[u(c(y),{component:c(_)},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,d(c(Ve))+((null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.108"))||"发起的")+d(c(he))+((null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.109"))||"会议"),1),c(ve)?g("v-if",!0):(i(),a("span",ie,((null==(f=window.getLanguageByCode)?void 0:f.call(window,"10010.1.110"))||"邀请你加入")+d(c(he))+((null==(x=window.getLanguageByCode)?void 0:x.call(window,"10010.1.109"))||"会议"),1))]),c(ve)?(i(),a("div",ae,[u(k,{onComfirm:_e,disabledIds:c(H).currentAVMsg.checkedIds},{trigger:m((()=>[u(c(h),{size:"large",circle:"",color:"#000"},{icon:m((()=>[u(c(y),{component:c(_)},null,8,["component"])])),_:1})])),_:1},8,["disabledIds"]),e("p",null,((null==(L=window.getLanguageByCode)?void 0:L.call(window,"10010.1.111"))||"已邀请共")+d(c(H).currentAVMsg.checkedIds.length)+((null==(R=window.getLanguageByCode)?void 0:R.call(window,"10010.1.40"))||"人"),1),u(c(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">\n\t\t\t\t\t\t<n-button color="#000" round>\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<n-icon :component="Mic" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t</n-button>\n\t\t\t\t\t\t<n-button color="#000" round>\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<n-icon :component="Videocam" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t</n-button>\n\t\t\t\t\t</div> ')])):(i(),a("div",se,[e("div",de,[u(c(h),{circle:"",color:"#f17568",class:"btn--rotate",onClick:t[0]||(t[0]=()=>c(H).showMultipleVideo=!1)},{icon:m((()=>[u(c(y),{size:"30",component:c(M)},null,8,["component"])])),_:1}),ce]),e("div",re,[u(c(h),{circle:"",color:"#2ac98b",onClick:Le},{icon:m((()=>[u(c(y),{size:"30",component:c(M)},null,8,["component"])])),_:1}),ue])]))],64))])}}});export{me as default};
|
@@ -42,7 +42,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
42
42
|
currentGroupUser: AnyObject[];
|
43
43
|
showMultipleVideo: boolean;
|
44
44
|
};
|
45
|
-
openSession: (
|
45
|
+
openSession: (session: string | AnyObject) => Promise<void>;
|
46
46
|
showUserDetail: import("vue").Ref<boolean>;
|
47
47
|
showLargeAvatar: import("vue").Ref<boolean>;
|
48
48
|
showPhone: import("vue").Ref<boolean>;
|