cnhis-design-vue 3.2.14-release.1 → 3.2.15-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/ai-chat/index.d.ts +1 -0
- package/es/components/ai-chat/src/Index.vue.d.ts +1 -0
- package/es/components/ai-chat/src/components/ChatCard.js +1 -1
- package/es/components/ai-chat/src/components/ChatFooter.vue.d.ts +1 -0
- package/es/components/ai-chat/src/components/ChatFooter.vue2.js +1 -1
- package/es/components/ai-chat/src/components/ChatMain.js +1 -1
- package/es/components/ai-chat/src/components/ChatPatient.vue2.js +1 -1
- package/es/components/ai-chat/src/components/ChatPrompt.vue2.js +1 -1
- package/es/components/ai-chat/style/index.css +1 -1
- package/es/components/audio-sdk/src/components/recording.vue2.js +1 -1
- package/es/components/base-search/index.d.ts +8 -3
- package/es/components/base-search/src/index.vue.d.ts +8 -3
- package/es/components/base-search/src/index.vue2.js +1 -1
- package/es/components/big-table/src/BigTable.vue2.js +1 -1
- package/es/components/big-table/src/components/NoData.vue2.js +1 -1
- package/es/components/big-table/src/components/edit-form/edit-date.js +1 -1
- package/es/components/big-table/src/components/edit-form/edit-input.js +1 -1
- package/es/components/big-table/src/components/edit-form/edit-select.js +1 -1
- package/es/components/big-table/src/components/edit-form/edit-time.js +1 -1
- package/es/components/big-table/src/components/input-button.vue2.js +1 -1
- package/es/components/big-table/src/hooks/useNestTable.js +1 -1
- package/es/components/big-table/src/hooks/useTableParse.js +1 -1
- package/es/components/body-select/src/index.vue2.js +1 -1
- package/es/components/branch-notice/index.d.ts +63 -0
- package/es/components/branch-notice/index.js +1 -0
- package/es/components/branch-notice/src/BranchNotice.vue.d.ts +64 -0
- package/es/components/branch-notice/src/BranchNotice.vue.js +1 -0
- package/es/components/branch-notice/src/BranchNotice.vue2.js +1 -0
- package/es/components/branch-notice/src/canstants.d.ts +7 -0
- package/es/components/branch-notice/src/canstants.js +1 -0
- package/es/components/branch-notice/src/components/NoticeItem.vue.d.ts +151 -0
- package/es/components/branch-notice/src/components/NoticeItemAside.vue.d.ts +35 -0
- package/es/components/branch-notice/src/components/NoticeOperationList.vue.d.ts +49 -0
- package/es/components/branch-notice/src/drawLine.d.ts +2 -0
- package/es/components/branch-notice/src/drawLine.js +1 -0
- package/es/components/branch-notice/src/types.d.ts +14 -0
- package/es/components/branch-notice/src/types.js +1 -0
- package/es/components/branch-notice/style/index.css +1 -0
- package/es/components/button-print/index.d.ts +4 -0
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +4 -0
- package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
- package/es/components/button-print/src/components/EditFormat.vue2.js +1 -1
- package/es/components/button-print/src/components/IdentityVerification.vue2.js +1 -1
- package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +4 -0
- 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/button-print/src/components/Preview.vue2.js +1 -1
- package/es/components/button-print/src/utils/dialog.js +1 -1
- package/es/components/button-print/src/utils/print.js +1 -1
- package/es/components/calendar/index.d.ts +4 -4
- package/es/components/calendar/src/Calendar.vue.d.ts +4 -4
- package/es/components/card-reader-sdk/src/components/readCardDialog.vue2.js +1 -1
- package/es/components/card-reader-sdk/src/utils/readHealthCard.js +1 -1
- package/es/components/classification/index.d.ts +1 -0
- package/es/components/classification/src/components/search-filter/index.vue2.js +1 -1
- package/es/components/classification/src/components/set-classification/index.vue2.js +1 -1
- package/es/components/classification/src/components/table-modal/index.vue2.js +1 -1
- package/es/components/classification/src/index.vue.d.ts +1 -0
- package/es/components/classification/src/index.vue2.js +1 -1
- package/es/components/classification/style/index.css +1 -1
- package/es/components/default-page/src/constants/index.js +1 -1
- package/es/components/default-page/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/FormItemPerson.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/expand-field/src/utils/constant.js +1 -1
- package/es/components/fabric-chart/index.d.ts +23 -4
- package/es/components/fabric-chart/src/FabricChart.vue.d.ts +23 -4
- package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -1
- package/es/components/fabric-chart/src/components/PopupMenu.js +1 -1
- package/es/components/fabric-chart/src/components/PopupTip.vue.d.ts +13 -0
- package/es/components/fabric-chart/src/components/PopupTip.vue2.js +1 -1
- package/es/components/fabric-chart/src/components/useStyle.js +1 -1
- package/es/components/fabric-chart/src/constants/index.d.ts +1 -1
- package/es/components/fabric-chart/src/constants/index.js +1 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.d.ts +1 -0
- 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.d.ts +1 -0
- 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/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.d.ts +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.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.d.ts +1 -0
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.d.ts +7 -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.d.ts +1 -0
- 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.js +1 -1
- package/es/components/fabric-chart/src/interface.d.ts +3 -0
- package/es/components/fabric-chart/src/utils/index.d.ts +1 -1
- package/es/components/fabric-chart/src/utils/index.js +1 -1
- package/es/components/field-set/src/FieldColor.vue.d.ts +3 -3
- package/es/components/field-set/src/FieldColor.vue2.js +1 -1
- package/es/components/field-set/src/FieldFilter.vue.d.ts +5 -4
- package/es/components/field-set/src/FieldFilter.vue2.js +1 -1
- package/es/components/field-set/src/FieldSet.vue.d.ts +2 -2
- package/es/components/field-set/src/FieldSet.vue2.js +1 -1
- package/es/components/field-set/src/Index.vue2.js +1 -1
- package/es/components/field-set/src/TableStyle.vue2.js +1 -1
- package/es/components/field-set/src/components/condition.vue2.js +1 -1
- package/es/components/field-set/src/components/edit-dialog.vue.d.ts +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 +2 -2
- package/es/components/field-set/src/components/table-row.vue2.js +1 -1
- package/es/components/field-set/src/constants/filter.d.ts +21 -12
- 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/types/index.d.ts +1 -1
- package/es/components/form-config/index.d.ts +108 -3
- package/es/components/form-config/src/FormConfig.vue.d.ts +108 -3
- package/es/components/form-config/src/FormConfig.vue2.js +1 -1
- package/es/components/form-config/src/components/FormConfigEventSetting.vue.js +1 -0
- package/es/components/form-config/src/components/FormConfigEventSetting.vue2.js +1 -0
- 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-render/src/components/renderer/combination/hooks/useCombination.js +1 -1
- package/es/components/form-render/src/components/renderer/combination/jsonCombination.js +1 -1
- package/es/components/form-render/src/components/renderer/combination/tableCombination.js +1 -1
- package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
- package/es/components/form-render/src/components/renderer/remoteSearch.js +1 -1
- package/es/components/form-render/src/components/renderer/switch.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/hooks/useFormEvent.js +1 -1
- package/es/components/form-render/src/hooks/usePresetScope.d.ts +1 -1
- package/es/components/form-render/src/hooks/usePresetScope.js +1 -1
- package/es/components/iho-chat/index.d.ts +635 -54
- package/es/components/iho-chat/src/Index.vue.d.ts +638 -61
- package/es/components/iho-chat/src/Index.vue2.js +1 -1
- 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 +32 -1
- package/es/components/iho-chat/src/components/ChatAdd.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatFile.vue.d.ts +52 -3
- package/es/components/iho-chat/src/components/ChatFile.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +52 -2
- package/es/components/iho-chat/src/components/ChatFooter.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +221 -11
- package/es/components/iho-chat/src/components/ChatHeader.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +82 -6
- package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatRecord.vue.d.ts +19 -1
- package/es/components/iho-chat/src/components/ChatRecord.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatSearch.vue.d.ts +49 -10
- package/es/components/iho-chat/src/components/ChatSearch.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatSet.vue.d.ts +71 -4
- package/es/components/iho-chat/src/components/ChatSet.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ContextMenu.d.ts +11 -2
- package/es/components/iho-chat/src/components/ContextMenu.js +1 -1
- package/es/components/iho-chat/src/components/MessageTemplate.vue.d.ts +1 -1
- package/es/components/iho-chat/src/components/MessageTemplate.vue2.js +1 -1
- package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +51 -2
- package/es/components/iho-chat/src/components/MultipleVideo.vue2.js +1 -1
- package/es/components/iho-chat/src/components/PersonProfile.vue.d.ts +19 -1
- package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
- package/es/components/iho-chat/src/components/SiderList.vue.d.ts +69 -1
- package/es/components/iho-chat/src/components/SiderList.vue2.js +1 -1
- package/es/components/iho-chat/src/components/Video.vue.d.ts +19 -1
- package/es/components/iho-chat/src/components/Video.vue2.js +1 -1
- package/es/components/iho-chat/src/constants/index.d.ts +12 -3
- package/es/components/iho-chat/src/constants/index.js +1 -1
- package/es/components/iho-chat/src/hooks/index.d.ts +2 -2
- package/es/components/iho-chat/src/hooks/index.js +1 -1
- package/es/components/iho-chat/src/hooks/useData.d.ts +94 -0
- package/es/components/iho-chat/src/hooks/useData.js +1 -0
- package/es/components/iho-chat/src/hooks/useSearchUserList.js +1 -1
- package/es/components/iho-chat/src/hooks/useVideo.d.ts +19 -1
- package/es/components/iho-chat/src/hooks/useVideo.js +1 -1
- package/es/components/iho-chat/src/hooks/useWebSocket.d.ts +3 -0
- package/es/components/iho-chat/src/hooks/useWebSocket.js +1 -0
- package/es/components/iho-chat/src/types/index.d.ts +0 -6
- package/es/components/iho-chat/src/types/index.js +1 -1
- package/es/components/iho-chat/src/utils/chatSock.js +1 -1
- package/es/components/iho-chat/src/utils/index.d.ts +2 -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/src/hooks/useColumnConfigAdaptor.js +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/filterRenderPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/filterTextPlugin/filter.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -1
- 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/src/components/patientInfo/index.vue2.js +1 -1
- package/es/components/keyboard/src/Keyboard.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/picture-clipper/src/PictureClipper.vue2.js +1 -1
- package/es/components/quick-search/index.d.ts +3 -1
- package/es/components/quick-search/src/index.vue.d.ts +3 -1
- package/es/components/quick-search/src/index.vue2.js +1 -1
- package/es/components/quick-search/style/index.css +1 -1
- package/es/components/recommend-search/src/components/BaseSearch.js +1 -1
- package/es/components/recommend-search/src/components/RecommendInput.vue2.js +1 -1
- package/es/components/recommend-search/src/components/RecommendSelect.vue2.js +1 -1
- package/es/components/scale-view/index.d.ts +31 -0
- package/es/components/scale-view/src/ScaleView.vue.d.ts +13 -0
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/scale-view/src/components/NoData.vue2.js +1 -1
- package/es/components/scale-view/src/components/composables/choose-common.js +1 -1
- package/es/components/scale-view/src/components/formitem/r-cascader.js +1 -1
- package/es/components/scale-view/src/components/formitem/r-checkbox.d.ts +9 -0
- package/es/components/scale-view/src/components/formitem/r-checkbox.js +1 -1
- package/es/components/scale-view/src/components/formitem/r-input.d.ts +9 -0
- package/es/components/scale-view/src/components/formitem/r-input.js +1 -1
- package/es/components/scale-view/src/components/formitem/r-map.js +1 -1
- package/es/components/scale-view/src/components/formitem/r-radio.d.ts +9 -0
- package/es/components/scale-view/src/components/formitem/r-radio.js +1 -1
- package/es/components/scale-view/src/components/formitem/r-select.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-computed.js +1 -1
- package/es/components/scale-view/src/hooks/scaleview-methods.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/scaleview-submit.js +1 -1
- package/es/components/scale-view/src/hooks/scaleview-validate.js +1 -1
- package/es/components/scale-view/src/hooks/use-component.d.ts +72 -0
- package/es/components/scale-view/style/index.css +1 -1
- package/es/components/search-cascader/src/SearchCascader.vue2.js +1 -1
- package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
- package/es/components/select-label/src/SelectLabel.vue2.js +1 -1
- package/es/components/select-label/src/components/label-classify.vue2.js +1 -1
- package/es/components/select-label/src/ihoLabel/IhoLabelFormContent.vue2.js +1 -1
- package/es/components/select-label/src/ihoLabel/IhoSelectLabel.vue2.js +1 -1
- package/es/components/select-label/src/ihoLabel/iho-label-classify.vue2.js +1 -1
- package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
- package/es/components/select-person/src/SelectPersonType.vue2.js +1 -1
- package/es/components/select-person/src/components/SearchOrgAndStaff.vue2.js +1 -1
- package/es/components/select-person/src/index.vue2.js +1 -1
- package/es/components/slider-tree/src/index.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-export-field/src/index.vue2.js +1 -1
- package/es/components/table-filter/src/components/bi-filter/ValueCfg.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/bi-filter/index.vue2.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue2.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue2.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue2.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/InputFilter.vue2.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/InputNumberGroup.vue2.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/helpers/options.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/hooks/useDisplayCategory.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/index.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateInner.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateOut.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/InputCustom.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/InputNumberGroup.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/LabelInner.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/SelectDynamicOption/index.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/helpers/dateExtraMap.js +1 -1
- package/es/components/table-filter/src/components/render-widget/helpers/selectExtraMap.js +1 -1
- package/es/components/table-filter/src/components/render-widget/index.vue.d.ts +3 -1
- package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
- package/es/components/table-filter/src/tool/baseOptions.js +1 -1
- package/es/components/tooth-bitmap/src/ToothBitmap.vue2.js +1 -1
- package/es/components/vod-chunk-upload/src/hooks/upload-computed.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/package.json.js +1 -1
- package/package.json +2 -2
- package/es/components/iho-chat/src/hooks/useSession.d.ts +0 -12
- package/es/components/iho-chat/src/hooks/useSession.js +0 -1
- package/es/components/iho-chat/src/hooks/useState.d.ts +0 -18
- package/es/components/iho-chat/src/hooks/useState.js +0 -1
@@ -1 +1 @@
|
|
1
|
-
import{
|
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 L}from"../api/index.js";import"@vueuse/core";import{$message as x}from"../utils/index.js";import{xorBy as R}from"lodash-es";import{CHAT_TYPE as E,SUBSCRIBE_MESSAGE_TYPE as T}from"../constants/index.js";import"../../../../shared/utils/index.js";import"date-fns";import"@vue/shared";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import"../../../../shared/hooks/useScrollLoading.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import{useVideo as B}from"../hooks/useVideo.js";import j from"trtc-sdk-v5";var S,$,H,U,z,N;const D={class:"video-wrapper video-wrapper--multiple"},O={class:"video-header"},P={key:0,class:"video-main"},Y={class:"video-main__left"},q=["data-name"],G={class:"video-bottom"},F={class:"btn-group"},J={class:"btn"},K=e("span",{class:"text"},(null==(S=window.getLanguageByCode)?void 0:S.call(window,"10010.1.104"))||"静音",-1),Q={class:"btn"},W=e("span",{class:"text"},(null==($=window.getLanguageByCode)?void 0:$.call(window,"10010.1.105"))||"摄像头",-1),X=e("span",{class:"text"},(null==(H=window.getLanguageByCode)?void 0:H.call(window,"10010.1.106"))||"结束会诊",-1),Z={class:"btn"},ee=e("span",{class:"text"},(null==(U=window.getLanguageByCode)?void 0:U.call(window,"10010.1.107"))||"添加参会人",-1),oe={class:"video-main__right"},te=["id","data-name"],ne={class:"user"},le={class:"name"},ie={key:0,class:"tip"},ae={key:0,class:"calling-box"},se={key:1,class:"opt-btn"},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.126"))||"接听",-1);var me=o({__name:"MultipleVideo",setup(o){const S=t(),$=t([]),{state:H,sendMessage:U,trtc:z,voiceOpen:N,isAudio:me,isCall:pe,startTimer:ve,resetTimer:ge,toggleAudio:we,messageTypeText:fe,timing:he,toggleVideo:ye,videocamOpen:ke,installEventHandlers:Ie,uninstallEventHandlers:be}=B(),Ae=t(!1),Ce=n((()=>pe.value?H.userInfo.name:H.currentAVMsg.sendName)),Ve=n((()=>{if(!Ae.value)return"";const e=pe.value?`(${$.value.length+1}/${H.currentAVMsg.checkedIds.length+1})`:"";return`${Ce.value}发起的${fe.value}会诊${e} ${he.value}`}));function Me(e){console.log("checkedIds :>> ",e),H.currentAVMsg.checkedIds.push(...e),_e()}function _e(){var e;(null==(e=H.currentAVMsg.checkedIds)?void 0:e.length)&&H.currentAVMsg.checkedIds.forEach((e=>{U({chatType:E.SINGLE,content:{msg:H.currentAVMsg.chatMessageType+","+H.currentAVMsg.strRoomId,chatMessageType:T.AV_STATUS},receiver:e})})),Ae.value||Le()}async function Le(){const e=await j.isSupported();if(!e.result||!e.detail.isH264EncodeSupported||!e.detail.isH264DecodeSupported)return console.log("checkResult :>> ",e),void(H.showMultipleVideo=!1);try{if(await z.enterRoom({strRoomId:H.currentAVMsg.strRoomId,sdkAppId:parseInt(H.userInfo.sdkAppID),userId:H.userInfo.id,userSig:H.userInfo.userSig}),Ae.value=!0,ve(),Ie({handleError:Se,handleRemoteUserEnter:Te,handleRemoteAudioAvailable:Ee,handleRemoteUserExit:je,handleRemoteVideoAvailable:Re}),await z.startLocalAudio(),me.value)return;await z.startLocalVideo({view:S.value})}catch(e){console.log("error :>> ",e),x.error(e),H.showMultipleVideo=!1}}async function xe(){try{if(H.showMultipleVideo=!1,be({handleError:Se,handleRemoteUserEnter:Te,handleRemoteAudioAvailable:Ee,handleRemoteUserExit:je,handleRemoteVideoAvailable:Re}),await z.exitRoom(),await z.stopLocalAudio(),me.value)return;await z.stopLocalVideo()}catch(e){console.log("error :>> ",e)}}async function Re(e){const{userId:o,streamType:t}=e;try{t===j.TYPE.STREAM_TYPE_MAIN&&(await f(),await z.startRemoteVideo({userId:o,streamType:t,view:o}))}catch(e){console.log("error :>> ",e)}}async function Ee(e){var o;const{userId:t}=e;if(t&&!(null==(o=$.value.map((e=>e.id)))?void 0:o.includes(t))){const e=await Be(t);$.value.push({id:t,name:e})}}async function Te(e){const{userId:o}=e,t=await Be(o);$.value.push({id:o,name:t}),ve()}async function Be(e){const o=await L({userId:e});return(null==o?void 0:o.name)||""}function je(e){console.log("event :>> 退房",e);const{userId:o}=e;$.value=R($.value,[{id:o,name:""}],"id")}function Se(e){console.log("error :>> ",e),H.showMultipleVideo=!1}return l((()=>{xe()})),(o,t)=>{var n,l,f,L,x,R;return i(),a("div",D,[e("div",O,[s(e("span",{class:"title"},d(c(Ve)),513),[[r,Ae.value]]),u(c(h),{quaternary:"",circle:"",color:"#ffffffcc",onClick:xe},{icon:m((()=>[u(c(y),{component:c(I)},null,8,["component"])])),_:1})]),Ae.value?(i(),a("div",P,[e("div",Y,[e("div",{ref_key:"selfVideoRef",ref:S,class:"video-view","data-name":c(H).userInfo.name},null,8,q),e("div",G,[e("div",F,[e("div",J,[u(c(h),{text:"",color:c(N)?"#fff":"#000",onClick:c(we)},{icon:m((()=>[u(c(y),{component:c(N)?c(b):c(A)},null,8,["component"])])),_:1},8,["color","onClick"]),K]),e("div",Q,[u(c(h),{text:"",color:c(ke)?"#fff":"#000",disabled:c(me),onClick:c(ye)},{icon:m((()=>[u(c(y),{component:c(ke)?c(C):c(V)},null,8,["component"])])),_:1},8,["color","disabled","onClick"]),W]),e("div",{class:"btn",onClick:xe},[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:Me},{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(Ce))+((null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.108"))||"发起的")+d(c(fe))+((null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.109"))||"会议"),1),c(pe)?g("v-if",!0):(i(),a("span",ie,((null==(f=window.getLanguageByCode)?void 0:f.call(window,"10010.1.110"))||"邀请你加入")+d(c(fe))+((null==(L=window.getLanguageByCode)?void 0:L.call(window,"10010.1.109"))||"会议"),1))]),c(pe)?(i(),a("div",ae,[u(k,{onComfirm:Me,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==(x=window.getLanguageByCode)?void 0:x.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:_e},{default:m((()=>{var e;return[w((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.112"))||"开始会诊")]})),_:1}),g(' <div class="btn-box">\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};
|
@@ -23,7 +23,25 @@ declare const _default: import("vue").DefineComponent<{
|
|
23
23
|
onClose?: ((...args: any[]) => any) | undefined;
|
24
24
|
}>>;
|
25
25
|
emit: (event: "close", ...args: any[]) => void;
|
26
|
-
state:
|
26
|
+
state: {
|
27
|
+
orgId: string | number;
|
28
|
+
currentSessionItem: AnyObject;
|
29
|
+
id: string;
|
30
|
+
userInfo: AnyObject;
|
31
|
+
msgList: AnyObject[];
|
32
|
+
currentMsg: AnyObject;
|
33
|
+
isAppendMsg: boolean;
|
34
|
+
sessionList: AnyObject[];
|
35
|
+
isChangeSession: boolean;
|
36
|
+
updateSessionItem: AnyObject;
|
37
|
+
isUpdateSession: boolean;
|
38
|
+
currentReferenceMsg: AnyObject | null;
|
39
|
+
currentReEditMsg: AnyObject | null;
|
40
|
+
showVideo: boolean;
|
41
|
+
currentAVMsg: AnyObject;
|
42
|
+
currentGroupUser: AnyObject[];
|
43
|
+
showMultipleVideo: boolean;
|
44
|
+
};
|
27
45
|
openSession: (item: AnyObject) => Promise<void>;
|
28
46
|
showUserDetail: import("vue").Ref<boolean>;
|
29
47
|
showLargeAvatar: import("vue").Ref<boolean>;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as t,ref as e,reactive as
|
1
|
+
import{defineComponent as t,ref as e,reactive as l,computed as n,openBlock as o,createBlock as a,unref as i,withCtx as s,renderSlot as r,createElementBlock as d,Fragment as c,withDirectives as u,createElementVNode as p,createVNode as v,createCommentVNode as g,toDisplayString as m,createTextVNode as w,renderList as y,vShow as f}from"vue";import{NPopover as k,NAvatar as h,NButton as b,NIcon as C}from"naive-ui";import{ChatbubbleEllipses as j,EyeOffOutline as L,EyeOutline as B,Close as I}from"@vicons/ionicons5";import{useData as _}from"../hooks/useData.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import{CHAT_TYPE as x}from"../constants/index.js";import{openSessionApi as z,getUserDetailApi as N}from"../api/index.js";import"../utils/index.js";import"lodash-es";import"trtc-sdk-v5";const D={class:"person-profile-main"},S={class:"left"},$={class:"profile"},E={class:"profile__text"},P={class:"right"},q={class:"right__content"},G={class:"label"},O={class:"content"};var T=t({__name:"PersonProfile",props:{userId:{type:String,required:!0},disabled:{type:Boolean,default:!1}},emits:["close"],setup(t,{emit:T}){var U,A,F,H,J,K,M,Q;const R=t,{state:V,openSession:W}=_(),X=e(!1),Y=e(!1),Z=e(!1),tt=l({}),et=[{label:(null==(U=window.getLanguageByCode)?void 0:U.call(window,"10010.1.115"))||"机构",value:"",key:"orgName"},{label:(null==(A=window.getLanguageByCode)?void 0:A.call(window,"10010.1.116"))||"姓名",value:"",key:"name"},{label:(null==(F=window.getLanguageByCode)?void 0:F.call(window,"10010.1.117"))||"归属科室",value:"",key:"deptName"},{label:(null==(H=window.getLanguageByCode)?void 0:H.call(window,"10010.1.118"))||"业务科室",value:"",key:"businessDeptNames"},{label:(null==(J=window.getLanguageByCode)?void 0:J.call(window,"10010.1.119"))||"手机号",value:"",key:"phone"},{label:(null==(K=window.getLanguageByCode)?void 0:K.call(window,"10010.1.120"))||"岗位",value:"",key:"post"},{label:(null==(M=window.getLanguageByCode)?void 0:M.call(window,"10010.1.121"))||"工号",value:"",key:"jobId"},{label:(null==(Q=window.getLanguageByCode)?void 0:Q.call(window,"10010.1.122"))||"性别",value:"",key:"orgName"}],lt=n((()=>(tt.id&&et.forEach((t=>{const{key:e}=t;t.value=tt[e]})),et)));async function nt(){X.value=!1;let t=V.sessionList.find((t=>t.receiver===R.userId));if(!t)try{t=await z({chatType:x.SINGLE,receiver:R.userId,sender:V.userInfo.id})}catch(t){console.log("error :>> ",t)}t&&W(t),T("close")}async function ot(t){if(!t)return;const e=await N({userId:R.userId});(null==e?void 0:e.id)?Object.assign(tt,e):tt.id=""}function at(t){const{key:e,value:l}=t;return"phone"!==e||Z.value?l:(l||"").replace(/(\d{3})\d{4}(\d{4})/,"$1****$2")}return(e,l)=>(o(),a(i(k),{raw:"",class:"person-profile-wrapper",show:X.value,"onUpdate:show":[l[3]||(l[3]=t=>X.value=t),ot],trigger:t.disabled?"manual":"click","show-arrow":!1,to:"body",shift:""},{trigger:s((()=>[r(e.$slots,"trigger")])),default:s((()=>[tt.id?(o(),d(c,{key:0},[u(p("div",D,[p("div",S,[p("div",$,[v(i(h),{src:tt.avatar,bordered:"",round:"",size:100,onClickCapture:l[0]||(l[0]=t=>Y.value=!0)},null,8,["src"]),g(' <n-upload abstract accept="image/*" @change="onChange">\n\t\t\t\t\t\t\t<n-upload-trigger #="{ handleClick }" abstract>\n\t\t\t\t\t\t\t\t<n-button\n\t\t\t\t\t\t\t\t\tcircle\n\t\t\t\t\t\t\t\t\tsecondary\n\t\t\t\t\t\t\t\t\tclass="edit-avatar"\n\t\t\t\t\t\t\t\t\tv-show="userDetail.id === state.userInfo.id"\n\t\t\t\t\t\t\t\t\t@click="handleClick"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t\t\t<n-icon size="16" color="#666666" :component="Camera" />\n\t\t\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t\t</n-button>\n\t\t\t\t\t\t\t</n-upload-trigger>\n\t\t\t\t\t\t</n-upload> '),p("div",E,[p("h4",null,m(tt.name),1),p("p",null,m(tt.orgName),1)]),v(i(b),{strong:"",secondary:"",onClick:nt},{default:s((()=>[v(i(C),{size:"13",color:"#666666",component:i(j),style:{"margin-right":"6px"}},null,8,["component"]),w(" 发消息 ")])),_:1})])]),p("div",P,[p("div",q,[(o(!0),d(c,null,y(i(lt),((t,e)=>(o(),d("div",{class:"info-item",key:e},[p("span",G,m(t.label),1),p("div",O,[p("span",null,m(at(t)),1),"phone"===t.key&&at(t)?(o(),a(i(C),{key:0,size:"16",color:"#666666",component:Z.value?i(L):i(B),style:{"margin-left":"10px"},onClick:l[1]||(l[1]=t=>Z.value=!Z.value)},null,8,["component"])):g("v-if",!0)])])))),128))])])],512),[[f,!Y.value]]),u(p("div",{class:"large-avatar",onClick:l[2]||(l[2]=t=>Y.value=!1)},[v(i(b),{circle:"",size:"small",secondary:""},{icon:s((()=>[v(i(C),{size:24,component:i(I),color:"#fff"},null,8,["component"])])),_:1}),v(i(h),{size:310,round:"",src:tt.avatar},null,8,["src"])],512),[[f,Y.value]])],64)):g("v-if",!0)])),_:3},8,["show","trigger"]))}});export{T as default};
|
@@ -1,9 +1,12 @@
|
|
1
|
+
import { CSSProperties } from 'vue';
|
1
2
|
import { AnyObject } from '../../../../shared/types';
|
2
3
|
import { formatTime } from '../utils';
|
4
|
+
import { STATUS } from '../constants';
|
3
5
|
declare const _default: import("vue").DefineComponent<{}, {
|
4
6
|
filterKey: {
|
5
7
|
all: string;
|
6
8
|
unread: string;
|
9
|
+
ended: string;
|
7
10
|
};
|
8
11
|
unreadSessionKeys: string[];
|
9
12
|
flexWidth: import("vue").Ref<number>;
|
@@ -13,23 +16,88 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
13
16
|
label: string;
|
14
17
|
key: string;
|
15
18
|
}[]>;
|
19
|
+
contextmenuRef: import("vue").Ref<any>;
|
20
|
+
showMenu: import("vue").Ref<boolean>;
|
21
|
+
menuPosition: any;
|
22
|
+
sessionId: import("vue").Ref<any>;
|
16
23
|
currentFilterKey: import("vue").Ref<string>;
|
17
|
-
state:
|
24
|
+
state: {
|
25
|
+
orgId: string | number;
|
26
|
+
currentSessionItem: AnyObject;
|
27
|
+
id: string;
|
28
|
+
userInfo: AnyObject;
|
29
|
+
msgList: AnyObject[];
|
30
|
+
currentMsg: AnyObject;
|
31
|
+
isAppendMsg: boolean;
|
32
|
+
sessionList: AnyObject[];
|
33
|
+
isChangeSession: boolean;
|
34
|
+
updateSessionItem: AnyObject;
|
35
|
+
isUpdateSession: boolean;
|
36
|
+
currentReferenceMsg: AnyObject | null;
|
37
|
+
currentReEditMsg: AnyObject | null;
|
38
|
+
showVideo: boolean;
|
39
|
+
currentAVMsg: AnyObject;
|
40
|
+
currentGroupUser: AnyObject[];
|
41
|
+
showMultipleVideo: boolean;
|
42
|
+
};
|
18
43
|
unreadTotal: import("vue").ComputedRef<number>;
|
19
44
|
openSession: (item: AnyObject) => Promise<void>;
|
45
|
+
setUpdateSessionItem: (item: AnyObject) => void;
|
46
|
+
setCurrentSessionItem: (item: AnyObject) => void;
|
20
47
|
currentWidth: import("vue").ComputedRef<number>;
|
21
48
|
sessionList: import("vue").ComputedRef<AnyObject[]>;
|
49
|
+
getLabelNum: (session: AnyObject) => number;
|
22
50
|
changeWidth: ({ distance }: AnyObject) => void;
|
23
51
|
handleFilter: (key: string) => void;
|
24
52
|
showSession: (item: AnyObject, currentKey?: string) => boolean | undefined;
|
53
|
+
handleContextmenu: (event: MouseEvent, id: string) => Promise<void>;
|
54
|
+
handleSelect: (key: string, session: AnyObject) => Promise<void>;
|
25
55
|
NSpin: any;
|
26
56
|
NBadge: any;
|
27
57
|
NAvatar: any;
|
28
58
|
NTag: any;
|
59
|
+
ContextMenu: import("vue").DefineComponent<{
|
60
|
+
type: {
|
61
|
+
type: StringConstructor;
|
62
|
+
default: string;
|
63
|
+
};
|
64
|
+
show: {
|
65
|
+
type: BooleanConstructor;
|
66
|
+
default: boolean;
|
67
|
+
};
|
68
|
+
position: {
|
69
|
+
type: import("vue").PropType<CSSProperties>;
|
70
|
+
};
|
71
|
+
id: {
|
72
|
+
type: StringConstructor;
|
73
|
+
};
|
74
|
+
}, () => JSX.Element | null, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "update:show")[], "select" | "update:show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
75
|
+
type: {
|
76
|
+
type: StringConstructor;
|
77
|
+
default: string;
|
78
|
+
};
|
79
|
+
show: {
|
80
|
+
type: BooleanConstructor;
|
81
|
+
default: boolean;
|
82
|
+
};
|
83
|
+
position: {
|
84
|
+
type: import("vue").PropType<CSSProperties>;
|
85
|
+
};
|
86
|
+
id: {
|
87
|
+
type: StringConstructor;
|
88
|
+
};
|
89
|
+
}>> & {
|
90
|
+
onSelect?: ((...args: any[]) => any) | undefined;
|
91
|
+
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
92
|
+
}, {
|
93
|
+
type: string;
|
94
|
+
show: boolean;
|
95
|
+
}>;
|
29
96
|
vFlexibleResize: {
|
30
97
|
mounted(el: any, { value }: any): void;
|
31
98
|
beforeUnmount(el: any): void;
|
32
99
|
};
|
33
100
|
formatTime: typeof formatTime;
|
101
|
+
STATUS: typeof STATUS;
|
34
102
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
35
103
|
export default _default;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,ref as
|
1
|
+
import{defineComponent as e,ref as t,computed as i,withDirectives as l,openBlock as n,createElementBlock as o,normalizeStyle as s,unref as a,createBlock as u,createCommentVNode as d,createElementVNode as r,Fragment as v,renderList as p,withCtx as c,createTextVNode as m,toDisplayString as g,withModifiers as f,normalizeClass as y,createVNode as w,vShow as k,nextTick as h}from"vue";import{NSpin as x,NTag as _,NAvatar as C,NBadge as M}from"naive-ui";import E from"./ContextMenu.js";import{useData as b}from"../hooks/useData.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import{STATUS as R}from"../constants/index.js";import{toppingSessionApi as j,updateStatusApi as D}from"../api/index.js";import{listSort as L,formatTime as S}from"../utils/index.js";import"lodash-es";import"trtc-sdk-v5";import{vFlexibleResize as B}from"../../../../shared/directive/flexibleResize.js";const N={class:"sider-list__filter box-shadow"},T=["onClick","onContextmenu"],V={class:"avatar-right"},O={class:"name"},H={class:"msg-tip"},I={class:"msg-tip__content"},z={key:0},K=["innerHTML"];var U=e({__name:"SiderList",setup(e){var U,W,A;const X="all",Y="unread",$="ended";let q=[];const F=t(300),G=t(),J=t(!1),P=t([{label:(null==(U=window.getLanguageByCode)?void 0:U.call(window,"10010.1.123"))||"全部",key:X},{label:(null==(W=window.getLanguageByCode)?void 0:W.call(window,"10010.1.124"))||"未读",key:Y},{label:(null==(A=window.getLanguageByCode)?void 0:A.call(window,"10010.1.77"))||"结束",key:$}]),Q=t(),Z=t(!1),ee=t({left:0,top:0}),te=t(),ie=t("all"),{state:le,unreadTotal:ne,openSession:oe,setUpdateSessionItem:se,setCurrentSessionItem:ae}=b(),ue=i((()=>Math.min(Math.max(F.value,240),360))),de=i((()=>L(le.sessionList)));function re({distance:e}){F.value=F.value+e}function ve(e,t=a(ie)){var i;return t===X||(t===Y?q.includes(e.sessionKey)||(null!=(i=e.unreadNum)?i:0)>0:t===$?e.status===R.ENDED:void 0)}async function pe(e,t){try{if("topping"===e)return await j({id:t.id,topping:!(null==t?void 0:t.topping)}),void(le.id===t.id?ae({topping:!(null==t?void 0:t.topping)}):se({...t,topping:!(null==t?void 0:t.topping)}));"remove"===e&&(await D({id:t.id,status:R.REMOVED}),le.id===t.id?ae({status:R.REMOVED}):se({...t,status:R.REMOVED}))}catch(e){}}return(e,t)=>l((n(),o("section",{class:"sider-list",style:s({width:a(ue)+"px"})},[J.value?(n(),u(a(x),{key:0,stroke:"#5585f5"})):d("v-if",!0),d(' <n-input v-else placeholder="输入用户名模糊搜索" v-model:value="keyword" @keyup.enter="handleSearch"></n-input> '),r("div",N,[(n(!0),o(v,null,p(P.value,(e=>(n(),u(a(_),{type:ie.value===e.key?"primary":"default",round:"",bordered:!1,key:e.key,onClick:()=>{return t=e.key,ie.value=t,void(t===Y&&(q=(de.value.filter((e=>{var t;return(null!=(t=e.unreadNum)?t:0)>0}))||[]).map((e=>e.sessionKey))));var t}},{default:c((()=>{return[m(g(e.label)+"("+g((t=e,t.key===$?de.value.filter((e=>e.status===R.ENDED)).length:ne.value))+") ",1)];var t})),_:2},1032,["type","onClick"])))),128))]),r("div",{class:"sider-list__box",ref_key:"listBoxRef",ref:G},[(n(!0),o(v,null,p(a(de),(e=>{var t;return n(),o(v,{key:e.id},[e.status!==a(R).REMOVED?l((n(),o("div",{key:0,onClick:()=>a(oe)(e),onContextmenu:f((t=>async function(e,t){var i,l,n,o,s;te.value=t,Z.value=!0,await h();const{clientX:a,clientY:u}=e,{width:d=0,height:r=0,left:v=0,top:p=0}=(null==(i=G.value)?void 0:i.getBoundingClientRect())||{},{width:c=100,height:m=80}=(null==(n=null==(l=Q.value)?void 0:l.$el)?void 0:n.getBoundingClientRect())||{},g=null!=(s=null==(o=G.value)?void 0:o.scrollTop)?s:0,f={};a<v+d-(c+2)-5?f.left=a-v+5+"px":f.right=v+d-a+5+"px",p+r-u<=m+5?f.bottom=5-g+"px":f.top=u-p+g+5+"px",ee.value=f}(t,e.id)),["prevent"]),class:y(["sider-list__box__item",{active:e.id===a(le).id},e.topping?"sider-list__box__item--top":""])},[w(a(C),{round:"",size:"large",src:e.avatar},null,8,["src"]),r("div",V,[r("div",O,[r("h4",null,g(e.name),1),r("span",null,g(e.lastMessage?a(S)(e.lastMessageSendTime).siderMsgTime:""),1)]),r("div",H,[r("div",I,["WITHDRAWN"===e.lastMessageStatus?(n(),o("div",z,(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.68"))||"撤回了一条消息")):(n(),o("div",{key:1,innerHTML:e.lastMessageContent},null,8,K))]),w(a(M),{value:e.unreadNum>99?"99+":e.unreadNum},null,8,["value"])])])],42,T)),[[k,ve(e)]]):d("v-if",!0)],64)})),128)),w(a(E),{ref_key:"contextmenuRef",ref:Q,show:Z.value,"onUpdate:show":t[0]||(t[0]=e=>Z.value=e),type:"session",position:ee.value,id:te.value,onSelect:pe},null,8,["show","position","id"])],512)],4)),[[a(B),{mode:"VR",onMove:re}]])}});export{U as default};
|
@@ -6,7 +6,25 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
6
6
|
content: import("../../../../shared/types").AnyObject;
|
7
7
|
receiver?: string | undefined;
|
8
8
|
}) => Promise<void>;
|
9
|
-
state:
|
9
|
+
state: {
|
10
|
+
orgId: string | number;
|
11
|
+
currentSessionItem: import("../../../../shared/types").AnyObject;
|
12
|
+
id: string;
|
13
|
+
userInfo: import("../../../../shared/types").AnyObject;
|
14
|
+
msgList: import("../../../../shared/types").AnyObject[];
|
15
|
+
currentMsg: import("../../../../shared/types").AnyObject;
|
16
|
+
isAppendMsg: boolean;
|
17
|
+
sessionList: import("../../../../shared/types").AnyObject[];
|
18
|
+
isChangeSession: boolean;
|
19
|
+
updateSessionItem: import("../../../../shared/types").AnyObject;
|
20
|
+
isUpdateSession: boolean;
|
21
|
+
currentReferenceMsg: import("../../../../shared/types").AnyObject | null;
|
22
|
+
currentReEditMsg: import("../../../../shared/types").AnyObject | null;
|
23
|
+
showVideo: boolean;
|
24
|
+
currentAVMsg: import("../../../../shared/types").AnyObject;
|
25
|
+
currentGroupUser: import("../../../../shared/types").AnyObject[];
|
26
|
+
showMultipleVideo: boolean;
|
27
|
+
};
|
10
28
|
trtc: TRTC;
|
11
29
|
timing: import("vue").Ref<string>;
|
12
30
|
voiceOpen: import("vue").Ref<boolean>;
|
@@ -1 +1 @@
|
|
1
|
-
import{
|
1
|
+
import{createElementVNode as e,defineComponent as o,ref as n,computed as s,watch as t,onBeforeUnmount as r,openBlock as a,createElementBlock as l,withDirectives as i,vShow as c,createVNode as u,unref as d,toDisplayString as v,Fragment as m,normalizeClass as p,withCtx as g}from"vue";import{NAvatar as f,NButton as w,NIcon as h}from"naive-ui";import{Mic as I,MicOffCircle as y,Call as A}from"@vicons/ionicons5";import{avFinishApi as k}from"../api/index.js";import"@vueuse/core";import{$message as E}from"../utils/index.js";import"lodash-es";import{AV_STATUS as V,CHAT_TYPE as R}from"../constants/index.js";import"../../../../shared/utils/index.js";import"date-fns";import"@vue/shared";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import"../../../../shared/hooks/useScrollLoading.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import{useVideo as S}from"../hooks/useVideo.js";import C from"trtc-sdk-v5";var M,b,L,T;const j={class:"video-wrapper"},x={class:"user"},_={class:"name"},N={class:"tip"},H={class:"opt-btn"},D={class:"btn"},z=e("span",null,(null==(M=window.getLanguageByCode)?void 0:M.call(window,"10010.1.104"))||"静音",-1),B=e("span",null,(null==(b=window.getLanguageByCode)?void 0:b.call(window,"10010.1.113"))||"拒接",-1),U={class:"btn"},F=e("span",null,(null==(L=window.getLanguageByCode)?void 0:L.call(window,"10010.1.125"))||"挂断",-1),O=e("span",null,(null==(T=window.getLanguageByCode)?void 0:T.call(window,"10010.1.126"))||"接听",-1);var G=o({__name:"Video",setup(o){const{sendMessage:M,state:b,trtc:L,timing:T,voiceOpen:G,isAudio:J,isCall:P,startTimer:$,resetTimer:q,toggleAudio:K,messageTypeText:Q,time:W,installEventHandlers:X,uninstallEventHandlers:Y}=S(),Z=n(),ee=n(),oe=n(!1);let ne=null;const se=s((()=>{var e,o,n;return P.value?{avatar:b.currentSessionItem.avatar,name:b.currentSessionItem.name,userId:b.currentSessionItem.receiver}:{avatar:null==(e=b.currentAVMsg.currentMsg)?void 0:e.senderAvatar,name:null==(o=b.currentAVMsg.currentMsg)?void 0:o.senderName,userId:null==(n=b.currentAVMsg.currentMsg)?void 0:n.sender}})),te=s((()=>oe.value?J.value?T.value:"":P.value?"正在呼叫...":`邀请你${Q.value}问诊...`)),re=s((()=>{var e,o;return null==(o=null==(e=b.currentAVMsg.currentMsg)?void 0:e.content)?void 0:o.avStatus}));async function ae(e=V.FINISHED){M({chatType:R.SINGLE,content:{msg:e===V.FINISHED?""+W.seconds:"s",chatMessageType:b.currentAVMsg.chatMessageType,avStatus:e},receiver:se.value.userId}),await k({recordId:b.currentAVMsg.currentMsg.id,status:e,duration:e===V.FINISHED?W.seconds:0})}async function le(){const e=await C.isSupported();if(!e.result||!e.detail.isH264EncodeSupported||!e.detail.isH264DecodeSupported)return console.log("checkResult :>> ",e),void(b.showVideo=!1);try{if(await L.enterRoom({strRoomId:b.currentAVMsg.strRoomId,sdkAppId:parseInt(b.userInfo.sdkAppID),userId:b.userInfo.id,userSig:b.userInfo.userSig}),P.value||(oe.value=!0,$()),X({handleError:pe,handleRemoteUserEnter:ve,handleRemoteAudioAvailable:de,handleRemoteUserExit:me,handleRemoteVideoAvailable:ue}),await L.startLocalAudio(),J.value)return;await L.startLocalVideo({view:ee.value})}catch(e){console.log("error :>> ",e),E.error(e),b.showVideo=!1}}function ie(){P.value&&!oe.value?ae(V.CANCELED):ae()}async function ce(){try{if(b.showVideo=!1,Y({handleError:pe,handleRemoteUserEnter:ve,handleRemoteAudioAvailable:de,handleRemoteUserExit:me,handleRemoteVideoAvailable:ue}),await L.exitRoom(),await L.stopLocalAudio(),J.value)return;await L.stopLocalVideo()}catch(e){console.log("error :>> ",e)}}async function ue(e){const{userId:o,streamType:n}=e;try{await L.startRemoteVideo({userId:o,streamType:n,view:Z.value})}catch(e){console.log("error :>> ",e)}}function de(e){}function ve(){oe.value=!0,$()}function me(e){console.log("event :>> 对方已挂断",e),ce()}function pe(e){console.log("error :>> ",e),b.showVideo=!1}return t((()=>re.value),(e=>{b.showVideo&&(e===V.IN_CALL?async function(){P.value?le():(ne&&clearTimeout(ne),ne=setTimeout((async()=>{oe.value||ae(V.NO_RESPONSE)}),6e4))}():ce())}),{immediate:!0}),r((()=>{ce()})),(o,n)=>(a(),l("div",j,[i(e("div",{class:"video-box",ref_key:"videoRef",ref:Z},null,512),[[c,oe.value]]),i(e("div",{class:"video-box--self",ref_key:"selfVideoRef",ref:ee},null,512),[[c,oe.value]]),i(e("div",x,[u(d(f),{size:58,round:"",src:d(se).avatar},null,8,["src"]),e("span",_,v(d(se).name),1),e("span",N,v(d(te)),1)],512),[[c,d(J)||!oe.value]]),e("div",H,[e("div",D,[d(P)&&!oe.value||oe.value?(a(),l(m,{key:0},[u(d(w),{circle:"",onClick:d(K),class:p({bordered:d(G)})},{icon:g((()=>[u(d(h),{size:"30",color:d(G)?"#fff":"#626262",component:d(G)?d(I):d(y)},null,8,["color","component"])])),_:1},8,["onClick","class"]),z],64)):(a(),l(m,{key:1},[u(d(w),{circle:"",color:"#f17568",class:"btn--rotate",onClick:n[0]||(n[0]=()=>ae(d(V).REJECTED))},{icon:g((()=>[u(d(h),{size:"30",component:d(A)},null,8,["component"])])),_:1}),B],64))]),e("div",U,[d(P)&&!oe.value||oe.value?(a(),l(m,{key:0},[u(d(w),{circle:"",color:"#f17568",class:"btn--rotate",onClick:ie},{icon:g((()=>[u(d(h),{size:"30",component:d(A)},null,8,["component"])])),_:1}),F],64)):(a(),l(m,{key:1},[u(d(w),{circle:"",color:"#2ac98b",onClick:le},{icon:g((()=>[u(d(h),{size:"30",component:d(A)},null,8,["component"])])),_:1}),O],64))])])]))}});export{G as default};
|
@@ -24,12 +24,13 @@ export declare enum MESSAGE_TYPE {
|
|
24
24
|
* 订阅消息类别
|
25
25
|
*/
|
26
26
|
export declare enum SUBSCRIBE_MESSAGE_TYPE {
|
27
|
-
|
28
|
-
|
27
|
+
JOIN_GROUP = "JOIN_GROUP",
|
28
|
+
LEAVE_GROUP = "LEAVE_GROUP",
|
29
29
|
NEW_SESSION = "NEW_SESSION",
|
30
30
|
MESSAGE = "MESSAGE",
|
31
31
|
AV_STATUS = "AV_STATUS",
|
32
|
-
RECALL_MESSAGE = "RECALL_MESSAGE"
|
32
|
+
RECALL_MESSAGE = "RECALL_MESSAGE",
|
33
|
+
DISABLE_SESSION = "DISABLE_SESSION"
|
33
34
|
}
|
34
35
|
/**
|
35
36
|
* 音视频接通状态
|
@@ -42,3 +43,11 @@ export declare enum AV_STATUS {
|
|
42
43
|
REJECTED = "REJECTED",
|
43
44
|
CANCELED = "CANCELED"
|
44
45
|
}
|
46
|
+
/**
|
47
|
+
* 会话状态
|
48
|
+
*/
|
49
|
+
export declare enum STATUS {
|
50
|
+
REMOVED = "REMOVED",
|
51
|
+
ENABLED = "ENABLED",
|
52
|
+
ENDED = "ENDED"
|
53
|
+
}
|
@@ -1 +1 @@
|
|
1
|
-
var E=(E=>(E.SINGLE="SINGLE",E.GROUP="GROUP",E))(E||{}),S=(E=>(E.TEXT="TEXT",E.FILE="FILE",E.EMOJI="EMOJI",E.IMAGE="IMAGE",E.TEMPLATE="TEMPLATE",E.BLEND="BLEND",E.FORWARD="FORWARD",E.QUICK_REPLY="QUICK_REPLY",E.AUDIO="AUDIO",E.VIDEO="VIDEO",E))(S||{}),A=(E=>(E.
|
1
|
+
var E=(E=>(E.SINGLE="SINGLE",E.GROUP="GROUP",E))(E||{}),S=(E=>(E.TEXT="TEXT",E.FILE="FILE",E.EMOJI="EMOJI",E.IMAGE="IMAGE",E.TEMPLATE="TEMPLATE",E.BLEND="BLEND",E.FORWARD="FORWARD",E.QUICK_REPLY="QUICK_REPLY",E.AUDIO="AUDIO",E.VIDEO="VIDEO",E))(S||{}),A=(E=>(E.JOIN_GROUP="JOIN_GROUP",E.LEAVE_GROUP="LEAVE_GROUP",E.NEW_SESSION="NEW_SESSION",E.MESSAGE="MESSAGE",E.AV_STATUS="AV_STATUS",E.RECALL_MESSAGE="RECALL_MESSAGE",E.DISABLE_SESSION="DISABLE_SESSION",E))(A||{}),L=(E=>(E.IN_CALL="IN_CALL",E.CALL_BUSY="CALL_BUSY",E.NO_RESPONSE="NO_RESPONSE",E.FINISHED="FINISHED",E.REJECTED="REJECTED",E.CANCELED="CANCELED",E))(L||{}),I=(E=>(E.REMOVED="REMOVED",E.ENABLED="ENABLED",E.ENDED="ENDED",E))(I||{});export{L as AV_STATUS,E as CHAT_TYPE,S as MESSAGE_TYPE,I as STATUS,A as SUBSCRIBE_MESSAGE_TYPE};
|
@@ -1,3 +1,3 @@
|
|
1
|
-
export * from './
|
2
|
-
export * from './
|
1
|
+
export * from './useData';
|
2
|
+
export * from './useWebSocket';
|
3
3
|
export * from './useVideo';
|
@@ -1 +1 @@
|
|
1
|
-
export{
|
1
|
+
export{InjectionIChatData,initData,useData}from"./useData.js";export{useWebSocket}from"./useWebSocket.js";export{useVideo}from"./useVideo.js";
|
@@ -0,0 +1,94 @@
|
|
1
|
+
import { InjectionKey } from 'vue';
|
2
|
+
import { ChatSock } from '../utils/chatSock';
|
3
|
+
import { AnyObject } from '../../../../shared/types';
|
4
|
+
export declare const InjectionIChatData: InjectionKey<ReturnType<typeof initData>>;
|
5
|
+
export declare function initData(props: AnyObject, emit: (event: 'template-click' | 'unread-message-update' | 'session-change' | 'session-close', ...args: any[]) => void): {
|
6
|
+
cssVars: import("vue").ComputedRef<AnyObject>;
|
7
|
+
stompClient: import("vue").Ref<ChatSock | undefined>;
|
8
|
+
state: {
|
9
|
+
orgId: string | number;
|
10
|
+
currentSessionItem: AnyObject;
|
11
|
+
id: string;
|
12
|
+
userInfo: AnyObject;
|
13
|
+
msgList: AnyObject[];
|
14
|
+
currentMsg: AnyObject;
|
15
|
+
isAppendMsg: boolean;
|
16
|
+
sessionList: AnyObject[];
|
17
|
+
isChangeSession: boolean;
|
18
|
+
updateSessionItem: AnyObject;
|
19
|
+
isUpdateSession: boolean;
|
20
|
+
currentReferenceMsg: AnyObject | null;
|
21
|
+
currentReEditMsg: AnyObject | null;
|
22
|
+
showVideo: boolean;
|
23
|
+
currentAVMsg: AnyObject;
|
24
|
+
currentGroupUser: AnyObject[];
|
25
|
+
showMultipleVideo: boolean;
|
26
|
+
};
|
27
|
+
unreadTotal: import("vue").ComputedRef<number>;
|
28
|
+
isGroupChat: import("vue").ComputedRef<boolean>;
|
29
|
+
isGroupLeader: import("vue").ComputedRef<boolean>;
|
30
|
+
isEnded: import("vue").ComputedRef<boolean>;
|
31
|
+
setMsgList: (list?: AnyObject[]) => void;
|
32
|
+
sendMessage: (message: {
|
33
|
+
chatType?: string;
|
34
|
+
content: AnyObject;
|
35
|
+
receiver?: string;
|
36
|
+
}) => Promise<void>;
|
37
|
+
relayMessage: (param: {
|
38
|
+
checkedIds: string[];
|
39
|
+
remark: string;
|
40
|
+
content: AnyObject;
|
41
|
+
}) => Promise<void>;
|
42
|
+
openSession: (item: AnyObject) => Promise<void>;
|
43
|
+
closeSession: () => AnyObject | null;
|
44
|
+
getCurrentSession: () => AnyObject | null;
|
45
|
+
setCurrentSessionItem: (item: AnyObject) => void;
|
46
|
+
setUpdateSessionItem: (item: AnyObject) => void;
|
47
|
+
setSessionList: (list: AnyObject[]) => void;
|
48
|
+
emit: (event: 'template-click' | 'unread-message-update' | 'session-change' | 'session-close', ...args: any[]) => void;
|
49
|
+
};
|
50
|
+
export declare const useData: () => {
|
51
|
+
cssVars: import("vue").ComputedRef<AnyObject>;
|
52
|
+
stompClient: import("vue").Ref<ChatSock | undefined>;
|
53
|
+
state: {
|
54
|
+
orgId: string | number;
|
55
|
+
currentSessionItem: AnyObject;
|
56
|
+
id: string;
|
57
|
+
userInfo: AnyObject;
|
58
|
+
msgList: AnyObject[];
|
59
|
+
currentMsg: AnyObject;
|
60
|
+
isAppendMsg: boolean;
|
61
|
+
sessionList: AnyObject[];
|
62
|
+
isChangeSession: boolean;
|
63
|
+
updateSessionItem: AnyObject;
|
64
|
+
isUpdateSession: boolean;
|
65
|
+
currentReferenceMsg: AnyObject | null;
|
66
|
+
currentReEditMsg: AnyObject | null;
|
67
|
+
showVideo: boolean;
|
68
|
+
currentAVMsg: AnyObject;
|
69
|
+
currentGroupUser: AnyObject[];
|
70
|
+
showMultipleVideo: boolean;
|
71
|
+
};
|
72
|
+
unreadTotal: import("vue").ComputedRef<number>;
|
73
|
+
isGroupChat: import("vue").ComputedRef<boolean>;
|
74
|
+
isGroupLeader: import("vue").ComputedRef<boolean>;
|
75
|
+
isEnded: import("vue").ComputedRef<boolean>;
|
76
|
+
setMsgList: (list?: AnyObject[]) => void;
|
77
|
+
sendMessage: (message: {
|
78
|
+
chatType?: string;
|
79
|
+
content: AnyObject;
|
80
|
+
receiver?: string;
|
81
|
+
}) => Promise<void>;
|
82
|
+
relayMessage: (param: {
|
83
|
+
checkedIds: string[];
|
84
|
+
remark: string;
|
85
|
+
content: AnyObject;
|
86
|
+
}) => Promise<void>;
|
87
|
+
openSession: (item: AnyObject) => Promise<void>;
|
88
|
+
closeSession: () => AnyObject | null;
|
89
|
+
getCurrentSession: () => AnyObject | null;
|
90
|
+
setCurrentSessionItem: (item: AnyObject) => void;
|
91
|
+
setUpdateSessionItem: (item: AnyObject) => void;
|
92
|
+
setSessionList: (list: AnyObject[]) => void;
|
93
|
+
emit: (event: 'template-click' | 'unread-message-update' | 'session-change' | 'session-close', ...args: any[]) => void;
|
94
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{ref as e,reactive as s,computed as t,watch as n,inject as i,toRaw as r}from"vue";import{openSessionApi as o,updateStatusApi as a,groupUserApi as c}from"../api/index.js";import{promiseTimeout as u,useIntervalFn as m}from"@vueuse/core";import{isGroup as d,listSort as l,formatTime as p,transformMessage as g,getFileSize as h,simplifyMessage as f}from"../utils/index.js";import{cloneDeep as S,isArray as I,uniqBy as T}from"lodash-es";import{STATUS as y,MESSAGE_TYPE as v,CHAT_TYPE as L}from"../constants/index.js";import{useTheme as M}from"../../../../shared/hooks/useTheme.js";import"date-fns";import"@vue/shared";import"../../../../shared/utils/index.js";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import"naive-ui";import"../../../../shared/hooks/useScrollLoading.js";const E=Symbol("InjectionIChatData");function C(e){const{lastMessage:s,lastSenderName:t=""}=e,n=f(s)||"";return d(e)&&t?t+": "+n:n}function N(i,f){const E=e(),N=s({orgId:i.orgId,currentSessionItem:{},id:"",userInfo:{id:i.userId},msgList:[],currentMsg:{},isAppendMsg:!1,sessionList:[],isChangeSession:!1,updateSessionItem:{},isUpdateSession:!1,currentReferenceMsg:null,currentReEditMsg:null,showVideo:!1,currentAVMsg:{},currentGroupUser:[],showMultipleVideo:!1}),D=M(),w=t((()=>N.sessionList.reduce(((e,s)=>e+ +s.unreadNum),0))),j=t((()=>d(N.currentSessionItem))),U=t((()=>{var e,s,t;return(null==(e=N.userInfo)?void 0:e.id)===(null==(t=null==(s=N.currentGroupUser)?void 0:s[0])?void 0:t.id)})),_=t((()=>{var e;return(null==(e=N.currentSessionItem)?void 0:e.status)===y.ENDED}));n((()=>w.value),(e=>{!async function s(t=0){if(t>2)return;const n=N.sessionList.filter((e=>{var s;return+(null!=(s=e.unreadNum)?s:0)>0}));n.every((e=>!!e.name))?f("unread-message-update",e,l(n)):(await u(300),s(++t))}()})),n([()=>N.isChangeSession,()=>N.isUpdateSession],(([e,s])=>{e&&(B(N.currentSessionItem),N.currentSessionItem.status===y.REMOVED&&V(),N.isChangeSession=!1),s&&(B(N.updateSessionItem),N.isUpdateSession=!1)}),{immediate:!0});const{pause:G,resume:R,isActive:K}=m((()=>{const e=S(N.msgList);e.some((e=>{const{sendTime:s}=e;return!(Date.now()-new Date(s).getTime()>=36e5)&&(e.__sendTime=p(s).recordTime,!0)})),N.msgList=e,O()||G()}),6e4,{immediate:!1});function O(){return!!N.msgList.length&&N.msgList.some((e=>Date.now()-new Date(e.sendTime).getTime()<36e5))}async function k(e){var s;try{null==(s=E.value)||s.send("/app/chat/send",{},JSON.stringify({chatType:N.currentSessionItem.chatType,receiver:N.currentSessionItem.receiver,...e}))}catch(e){}}function x(e){Object.assign(N.currentSessionItem,e,{lastMessageContent:Reflect.has(e,"lastMessageContent")?e.lastMessageContent:Reflect.has(e,"lastMessage")?C({...e,chatType:e.chatType||N.currentSessionItem.chatType}):N.currentSessionItem.lastMessageContent}),N.isChangeSession=!0,N.id!==N.currentSessionItem.id&&(N.msgList=[],N.id=N.currentSessionItem.id)}function A(e){const s=N.sessionList.find((s=>s.sessionKey===e.sessionKey)),t={...e,lastMessageContent:C({...e,chatType:e.chatType||(null==s?void 0:s.chatType)})};N.updateSessionItem=s?{...S(s),...t}:t,N.isUpdateSession=!0}function V(){if(!N.id)return null;const{currentSessionItem:e}=N;return N.currentSessionItem={},N.msgList=[],N.id="",N.currentGroupUser=[],e}function b(e){N.sessionList=S(T(e,"id")),N.sessionList.forEach((e=>{Object.assign(e,{defaultName:Reflect.has(e,"defaultName")?e.defaultName:e.name||"",lastMessageContent:Reflect.has(e,"lastMessageContent")?e.lastMessageContent:C(e)}),e.receiver===N.userInfo.id&&(e.unreadNum=0),e.chatType!==L.GROUP||e.name||c({id:e.receiver}).then((s=>{I(s)&&(e.name=s.map((e=>e.name)).join(","))}))}))}function B(e){!e.id||N.sessionList.map((e=>e.id)).includes(e.id)?N.sessionList.some((s=>{if(s.sessionKey===e.sessionKey){let{unreadNum:t=0}=s;return Object.assign(s,e),e.sessionKey!==N.currentSessionItem.sessionKey&&s.sender&&s.sender!==N.userInfo.id&&(s.unreadNum=++t),!0}})):b([...N.sessionList,e])}return{cssVars:D,stompClient:E,state:N,unreadTotal:w,isGroupChat:j,isGroupLeader:U,isEnded:_,setMsgList:function(e=[]){G(),N.msgList=S(e).sort(((e,s)=>new Date(s.sendTime).getTime()-new Date(e.sendTime).getTime())),N.msgList.forEach((e=>{var s,t;Object.assign(e,{__time:p(e.sendTime).msgTime,__content:(t=e.content.chatMessageType,[v.TEXT,v.TEXT,v.BLEND].includes(t)?g(e.content):null==(s=e.content)?void 0:s.msg),__sendTime:p(e.sendTime).recordTime}),e.content.chatMessageType!==v.FILE||e.__size||h(e.content.fileUrl).then((s=>{e.__size=s}))})),O()&&R()},sendMessage:k,relayMessage:async function(e){const{checkedIds:s,remark:t,content:n}=e;for(let e=0;e<s.length;e++){const i=s[e],r=N.sessionList.find((e=>e.receiver===i));r||await o({chatType:L.SINGLE,receiver:i,sender:N.userInfo.id});const a=(null==r?void 0:r.chatType)||L.SINGLE;k({chatType:a,receiver:i,content:n}),await u(100),t&&k({chatType:a,receiver:i,content:{chatMessageType:v.TEXT,msg:t}}),await u(100)}},openSession:async function(e){try{e.status===y.REMOVED&&(await a({id:e.id,status:y.ENABLED}),A({...e,status:y.ENABLED}),e.status=y.ENABLED);const s=N.currentSessionItem.sessionKey;if(x(e),s===N.currentSessionItem.sessionKey)return;if(j.value){const s=await c({id:e.receiver});N.currentGroupUser=I(s)?s:[]}else N.currentGroupUser=T([N.userInfo,{...S(e),id:e.receiver}],"id");f("session-change",{...r(N.currentSessionItem),userList:N.currentGroupUser.map((e=>r(e)))})}catch(e){console.log("error---\x3e",e)}},closeSession:V,getCurrentSession:function(){return N.id?N.currentSessionItem:null},setCurrentSessionItem:x,setUpdateSessionItem:A,setSessionList:b,emit:f}}const D=()=>i(E);export{E as InjectionIChatData,N as initData,D as useData};
|
@@ -1 +1 @@
|
|
1
|
-
import{ref as e}from"vue";import{isArray as o}from"lodash-es";import{listUserApi as r}from"../api/index.js";import{useDebounceFn as
|
1
|
+
import{ref as e}from"vue";import{isArray as o}from"lodash-es";import{listUserApi as r}from"../api/index.js";import{useDebounceFn as s}from"@vueuse/core";import"../../../../shared/utils/index.js";import"naive-ui";import"date-fns";import"@vue/shared";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{useScrollLoading as t}from"../../../../shared/hooks/useScrollLoading.js";import{useData as a}from"./useData.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import"../utils/index.js";import"trtc-sdk-v5";function i({wrapperRef:i,keywordRef:n,before:p,after:u}){const m={page:0,hasMore:!0},{state:c}=a(),d=e([]),l=s((function(){Object.assign(m,{page:0,hasMore:!0}),f()}),300);async function f(){const e=(n.value||"").replace(/^\s+|\s+$/g,"");if(!e)return void(p?p():d.value=[]);if(!m.hasMore)return;m.page++,1==m.page&&(d.value=[]);const s=await r({orgId:c.orgId,keyword:e,page:m.page,pageSize:15});o(s.records)&&d.value.length<=+s.total&&(d.value=m.page>1?d.value.concat(s.records):s.records,null==u||u(),d.value.length>=+s.total&&(m.hasMore=!1))}return t(i,(()=>{f()})),{userList:d,handleInput:l}}export{i as useSearchUserList};
|
@@ -8,7 +8,25 @@ type EventHandlers = {
|
|
8
8
|
handleRemoteVideoAvailable: AnyFn;
|
9
9
|
};
|
10
10
|
export declare function useVideo(): {
|
11
|
-
state:
|
11
|
+
state: {
|
12
|
+
orgId: string | number;
|
13
|
+
currentSessionItem: import("../../../../shared/types").AnyObject;
|
14
|
+
id: string;
|
15
|
+
userInfo: import("../../../../shared/types").AnyObject;
|
16
|
+
msgList: import("../../../../shared/types").AnyObject[];
|
17
|
+
currentMsg: import("../../../../shared/types").AnyObject;
|
18
|
+
isAppendMsg: boolean;
|
19
|
+
sessionList: import("../../../../shared/types").AnyObject[];
|
20
|
+
isChangeSession: boolean;
|
21
|
+
updateSessionItem: import("../../../../shared/types").AnyObject;
|
22
|
+
isUpdateSession: boolean;
|
23
|
+
currentReferenceMsg: import("../../../../shared/types").AnyObject | null;
|
24
|
+
currentReEditMsg: import("../../../../shared/types").AnyObject | null;
|
25
|
+
showVideo: boolean;
|
26
|
+
currentAVMsg: import("../../../../shared/types").AnyObject;
|
27
|
+
currentGroupUser: import("../../../../shared/types").AnyObject[];
|
28
|
+
showMultipleVideo: boolean;
|
29
|
+
};
|
12
30
|
sendMessage: (message: {
|
13
31
|
chatType?: string | undefined;
|
14
32
|
content: import("../../../../shared/types").AnyObject;
|
@@ -1 +1 @@
|
|
1
|
-
import{ref as e,computed as t,onBeforeUnmount as
|
1
|
+
import{ref as e,computed as t,onBeforeUnmount as o}from"vue";import{useData as n}from"./useData.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import{MESSAGE_TYPE as a}from"../constants/index.js";import"../api/index.js";import{formatSeconds as i}from"../utils/index.js";import"lodash-es";import l from"trtc-sdk-v5";function E(){const E={timer:null,seconds:0},{state:s,sendMessage:r}=n(),d=e(""),u=e(!0),m=e(!0),c=t((()=>s.currentAVMsg.chatMessageType===a.AUDIO)),R=t((()=>"call"===s.currentAVMsg.callMode)),T=t((()=>{var e,t;return c.value?(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.130"))||"语音":(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.131"))||"视频"})),v=l.create();function A(){d.value="00:00:00",E.timer&&clearInterval(E.timer),E.timer=null,E.seconds=0}return o((()=>{A()})),{state:s,sendMessage:r,trtc:v,timing:d,voiceOpen:u,videocamOpen:m,isAudio:c,isCall:R,startTimer:function(){A(),E.timer=setInterval((()=>{E.seconds++,d.value=i(E.seconds)}),1e3)},resetTimer:A,toggleAudio:async function(){await v.updateLocalAudio({mute:!u.value}),u.value=!u.value},toggleVideo:async function(){await v.updateLocalVideo({mute:!m.value}),m.value=!m.value},messageTypeText:T,time:E,installEventHandlers:function({handleError:e,handleRemoteUserEnter:t,handleRemoteAudioAvailable:o,handleRemoteUserExit:n,handleRemoteVideoAvailable:a}){v.on(l.EVENT.ERROR,e),v.on(l.EVENT.REMOTE_USER_ENTER,t),v.on(l.EVENT.REMOTE_AUDIO_AVAILABLE,o),v.on(l.EVENT.REMOTE_USER_EXIT,n),c.value||v.on(l.EVENT.REMOTE_VIDEO_AVAILABLE,a)},uninstallEventHandlers:function({handleError:e,handleRemoteUserEnter:t,handleRemoteAudioAvailable:o,handleRemoteUserExit:n,handleRemoteVideoAvailable:a}){v.off(l.EVENT.ERROR,e),v.off(l.EVENT.REMOTE_USER_ENTER,t),v.off(l.EVENT.REMOTE_AUDIO_AVAILABLE,o),v.off(l.EVENT.REMOTE_USER_EXIT,n),c.value||v.off(l.EVENT.REMOTE_VIDEO_AVAILABLE,a)}}}export{E as useVideo};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{onBeforeUnmount as e}from"vue";import{ChatSock as s}from"../utils/chatSock.js";import{CHAT_TYPE as t,SUBSCRIBE_MESSAGE_TYPE as n,AV_STATUS as o}from"../constants/index.js";import{readMessageApi as i}from"../api/index.js";import{isAudioOrVideoMessage as r}from"../utils/index.js";import{remove as a}from"lodash-es";function c(c,d){const{stompClient:l,state:u,openSession:p,closeSession:h,setSessionList:S,setUpdateSessionItem:y,setCurrentSessionItem:m}=d,g=[];async function b(e,s){if(u.currentMsg=e,e.sessionKey===u.currentSessionItem.sessionKey)return u.isAppendMsg=!0,e.sender!==u.userInfo.id&&await i({chatType:s,messageIdSet:[e.id],receiver:u.userInfo.id,sender:e.sender}),void m({lastMessageSendTime:e.sendTime,lastMessage:e.content,sortTime:e.sendTime,unreadNum:0,lastSenderName:e.senderName});const t={lastMessageSendTime:e.sendTime,sortTime:e.sendTime,lastMessage:e.content,sessionKey:e.sessionKey,lastSenderName:e.senderName,sender:e.sender};y(t)}async function f({body:e,chatType:s}){try{const i=JSON.parse(e),{messageVo:c,sessionVo:d,chatAvStatusVo:p}=i;switch(i.event){case n.MESSAGE:r(c.content)?!u.showVideo&&!u.showMultipleVideo||c.content.avStatus!==o.IN_CALL?(u.currentMsg=c,Object.assign(u.currentAVMsg,{strRoomId:c.sessionKey,chatMessageType:c.content.chatMessageType,callMode:c.sender===u.userInfo.id?"call":"invite",currentMsg:c}),u.showVideo||u.showMultipleVideo?b(c,s):u.showVideo=!0):(l.value.send("/app/chat/send",{},JSON.stringify({chatType:t.SINGLE,receiver:c.sender,content:{chatMessageType:c.content.chatMessageType,avStatus:o.CALL_BUSY}})),console.log("用户忙!")):b(c,s);break;case n.RECALL_MESSAGE:break;case n.AV_STATUS:Object.assign(u.currentAVMsg,p,{callMode:p.sender===u.userInfo.id?"call":"invite",checkedIds:[]}),u.showVideo||u.showMultipleVideo?console.log("用户忙!"):u.showMultipleVideo=!0;break;case n.NEW_SESSION:if(s===t.GROUP)return;y(d);break;case n.JOIN_GROUP:if(s===t.GROUP)return;y(d),l.value.subscribe(`/topic/group/${d.receiver}`,(({body:e})=>f({body:e,chatType:t.GROUP})));break;case n.LEAVE_GROUP:h(),a(u.sessionList,(e=>e.sessionKey===d.sessionKey));case n.DISABLE_SESSION:}}catch(e){console.log(e)}}!function e(){const n={headers:{AccessToken:c.token,UserId:c.userId},heartbeatFn(){try{l.value.send("test")}catch(s){l.value.disconnect(),e()}},connectCb(){console.log("连接成功"),l.value.subscribe("/user/topic/single",(({body:e})=>f({body:e,chatType:t.SINGLE}))),l.value.subscribe("/app/sessionList",(({body:e})=>{try{const s=JSON.parse(e),{authentication:n,currentUser:o,sessionVos:i}=s;if(Object.assign(u.userInfo,o,n),!(null==i?void 0:i.length))return;S(i),g.splice(0,g.length),g.push(...i.filter((e=>e.chatType===t.GROUP))),g.forEach((e=>{l.value.subscribe(`/topic/group/${e.receiver}`,(({body:e})=>f({body:e,chatType:t.GROUP})))})),function(){const e=u.sessionList.find((e=>e.sessionKey===c.defaultSessionKey));e&&p(e)}()}catch(e){console.log(e)}}),{extraConfig:JSON.stringify(c.extraParams)})},errorCb(e,s){}};l.value=new s("/fdp-chat/websocket",n)}(),e((()=>{var e;null==(e=l.value)||e.disconnect()}))}export{c as useWebSocket};
|
@@ -1,6 +1,4 @@
|
|
1
|
-
import { InjectionKey, Ref, ComputedRef } from 'vue';
|
2
1
|
import { AnyObject } from '../../../../shared/types';
|
3
|
-
import { ChatSock } from '../utils/chatSock';
|
4
2
|
import { UploadFileInfo } from 'naive-ui';
|
5
3
|
export type IState = {
|
6
4
|
orgId: number | string;
|
@@ -25,7 +23,3 @@ export type FileOptions = {
|
|
25
23
|
file: UploadFileInfo;
|
26
24
|
fileList: Array<UploadFileInfo>;
|
27
25
|
};
|
28
|
-
export declare const InjectionIChatState: InjectionKey<IState>;
|
29
|
-
export declare const InjectionIChatStompClient: InjectionKey<Ref<ChatSock>>;
|
30
|
-
export declare const InjectionIChatEmits: InjectionKey<(event: string, ...args: any[]) => void>;
|
31
|
-
export declare const InjectionIChatUnreadTotal: InjectionKey<ComputedRef<number>>;
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
|
@@ -1 +1 @@
|
|
1
|
-
import t from"stompjs";import
|
1
|
+
import t from"stompjs";import s from"sockjs-client/dist/sockjs.min.js";class i{constructor(t,s){this.reconnectionCount=0,this.options={},this.url="",this.url=t,this.options=s,this.connection()}connection(){if(!this.url)return;const i=new s(this.url);this.stompClient=t.over(i),this.stompClient.debug=null,this.stompClient.connect(this.options.headers||{},(()=>{const{connectCb:t}=this.options;t&&t(this.reconnectionCount>0),this.startHeartbeat(),this.subscribe(this.options.subscribeCbs),this.reconnectionCount=0}),(t=>{const s=this.reconnectionCount,{errorCb:i,reconnectMaxCount:e=60}=this.options;i&&i(t,s),s<=e&&this.reconnect()}))}disconnect(){var t;this.heartbeatTimer&&clearTimeout(this.heartbeatTimer),this.reconnectTimer&&clearTimeout(this.reconnectTimer),null==(t=this.stompClient)||t.disconnect(),this.stompClient=void 0}reconnect(){this.reconnectionCount++,this.disconnect(),this.reconnectTimer=setTimeout((()=>{this.connection()}),1e3)}subscribe(...t){const s=this.stompClient;if(s&&!(t.length<1))return 1===t.length&&Array.isArray(t[0])?void t[0].forEach((t=>{this.subscribe(t.action,t.cb)})):s.subscribe(...t)}startHeartbeat(){const t=this.options.heartbeatFn;if(!t)return;const s=this.options.heartbeatRate||1e4;this.heartbeatTimer=setTimeout((()=>{t(),this.startHeartbeat()}),s)}send(...t){var s;return null==(s=this.stompClient)?void 0:s.send(...t)}}export{i as ChatSock};
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { AnyObject } from '../../../../shared/types';
|
2
|
+
export declare const $message: import("naive-ui").MessageApi;
|
2
3
|
export declare function formatTime(dateStr: string): {
|
3
4
|
siderMsgTime: any;
|
4
5
|
msgTime: any;
|
@@ -13,3 +14,4 @@ export declare function getFileSize(url: string): Promise<unknown>;
|
|
13
14
|
export declare function base64ToFile(base64: string): Promise<File | undefined>;
|
14
15
|
export declare function isAudioOrVideoMessage(message: AnyObject): boolean;
|
15
16
|
export declare function formatSeconds(seconds: number): string;
|
17
|
+
export declare function isGroup(session: AnyObject): boolean;
|