cnhis-design-vue 3.3.1-beta.4 → 3.3.1-beta.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (255) hide show
  1. package/README.md +87 -87
  2. package/es/components/ai-chat/index.d.ts +394 -43
  3. package/es/components/ai-chat/src/Index.vue.d.ts +394 -43
  4. package/es/components/ai-chat/src/Index.vue2.js +1 -1
  5. package/es/components/ai-chat/src/api/index.d.ts +8 -0
  6. package/es/components/ai-chat/src/api/index.js +1 -0
  7. package/es/components/ai-chat/src/components/ChatAudio.vue.d.ts +38 -0
  8. package/es/components/ai-chat/src/components/ChatAudio.vue.js +1 -0
  9. package/es/components/ai-chat/src/components/ChatAudio.vue2.js +1 -0
  10. package/es/components/ai-chat/src/components/ChatBI.vue.d.ts +2 -2
  11. package/es/components/ai-chat/src/components/ChatBI.vue2.js +1 -1
  12. package/es/components/ai-chat/src/components/ChatCard.js +1 -1
  13. package/es/components/ai-chat/src/components/ChatFooter.vue.d.ts +75 -31
  14. package/es/components/ai-chat/src/components/ChatFooter.vue2.js +1 -1
  15. package/es/components/ai-chat/src/components/ChatMain.d.ts +1 -7
  16. package/es/components/ai-chat/src/components/ChatMain.js +1 -1
  17. package/es/components/ai-chat/src/components/ChatMainDefault.d.ts +2 -0
  18. package/es/components/ai-chat/src/components/ChatMainDefault.js +1 -0
  19. package/es/components/ai-chat/src/components/ChatPatient.vue.d.ts +2 -2
  20. package/es/components/ai-chat/src/components/ChatPatient.vue2.js +1 -1
  21. package/es/components/ai-chat/src/components/ChatPrompt.vue.d.ts +2 -2
  22. package/es/components/ai-chat/src/components/ChatPrompt.vue2.js +1 -1
  23. package/es/components/ai-chat/src/components/ChatRight.vue.d.ts +57 -0
  24. package/es/components/ai-chat/src/components/ChatRight.vue.js +1 -0
  25. package/es/components/ai-chat/src/components/ChatRight.vue2.js +1 -0
  26. package/es/components/ai-chat/src/components/card/JsonCard.d.ts +25 -0
  27. package/es/components/ai-chat/src/components/card/JsonCard.js +1 -0
  28. package/es/components/ai-chat/src/components/message-render/CardRender.d.ts +16 -0
  29. package/es/components/ai-chat/src/components/message-render/CardRender.js +1 -0
  30. package/es/components/ai-chat/src/components/message-render/FormRender.d.ts +16 -0
  31. package/es/components/ai-chat/src/components/message-render/FormRender.js +1 -0
  32. package/es/components/ai-chat/src/components/mobile/MobileChatAudio.vue.d.ts +36 -0
  33. package/es/components/ai-chat/src/components/mobile/MobileChatAudio.vue.js +1 -0
  34. package/es/components/ai-chat/src/components/mobile/MobileChatAudio.vue2.js +1 -0
  35. package/es/components/ai-chat/src/components/mobile/MobileChatFooter.vue.d.ts +105 -0
  36. package/es/components/ai-chat/src/components/mobile/MobileChatFooter.vue.js +1 -0
  37. package/es/components/ai-chat/src/components/mobile/MobileChatFooter.vue2.js +1 -0
  38. package/es/components/ai-chat/src/components/svgs/AddIcon.vue.js +1 -0
  39. package/es/components/ai-chat/src/components/svgs/AudioIcon.vue.js +1 -0
  40. package/es/components/ai-chat/src/components/svgs/KeyboardIcon.vue.js +1 -0
  41. package/es/components/ai-chat/src/components/svgs/MicroPhone.vue.js +1 -0
  42. package/es/components/ai-chat/src/hooks/index.d.ts +2 -0
  43. package/es/components/ai-chat/src/hooks/index.js +1 -0
  44. package/es/components/ai-chat/src/hooks/useChartAudioContext.d.ts +18 -0
  45. package/es/components/ai-chat/src/hooks/useChartAudioContext.js +1 -0
  46. package/es/components/ai-chat/src/hooks/useData.d.ts +77 -0
  47. package/es/components/ai-chat/src/hooks/useData.js +1 -0
  48. package/es/components/ai-chat/src/hooks/useFooterContext.d.ts +38 -0
  49. package/es/components/ai-chat/src/hooks/useFooterContext.js +1 -0
  50. package/es/components/ai-chat/src/hooks/useProgram.d.ts +14 -0
  51. package/es/components/ai-chat/src/hooks/useProgram.js +1 -0
  52. package/es/components/ai-chat/src/hooks/useSSE.d.ts +9 -0
  53. package/es/components/ai-chat/src/hooks/useSSE.js +1 -0
  54. package/es/components/ai-chat/src/hooks/useWebsocket.d.ts +4 -0
  55. package/es/components/ai-chat/src/hooks/useWebsocket.js +1 -0
  56. package/es/components/ai-chat/src/types/index.d.ts +1 -3
  57. package/es/components/ai-chat/src/types/index.js +1 -1
  58. package/es/components/ai-chat/src/utils/index.d.ts +6 -0
  59. package/es/components/ai-chat/src/utils/index.js +1 -1
  60. package/es/components/ai-chat/style/index.css +1 -1
  61. package/es/components/audio-sdk/index.d.ts +274 -2
  62. package/es/components/audio-sdk/index.js +1 -1
  63. package/es/components/audio-sdk/src/Index.vue.d.ts +274 -0
  64. package/es/components/audio-sdk/src/Index.vue.js +1 -0
  65. package/es/components/audio-sdk/src/Index.vue2.js +1 -0
  66. package/es/components/audio-sdk/src/audioSDK.d.ts +60 -28
  67. package/es/components/audio-sdk/src/audioSDK.js +1 -1
  68. package/es/components/audio-sdk/src/components/form.vue.d.ts +51 -0
  69. package/es/components/audio-sdk/src/components/recording-modal.vue.d.ts +100 -0
  70. package/es/components/audio-sdk/src/components/recording-modal.vue.js +1 -0
  71. package/es/components/audio-sdk/src/components/recording-modal.vue2.js +1 -0
  72. package/es/components/audio-sdk/src/components/recording.vue.d.ts +53 -4
  73. package/es/components/audio-sdk/src/components/recording.vue2.js +1 -1
  74. package/es/components/audio-sdk/src/utils/index.d.ts +7 -0
  75. package/es/components/audio-sdk/src/utils/index.js +1 -0
  76. package/es/components/audio-sdk/src/utils/recordingModal.d.ts +7 -3
  77. package/es/components/audio-sdk/src/utils/recordingModal.js +1 -1
  78. package/es/components/audio-sdk/style/index.css +1 -1
  79. package/es/components/button-print/index.d.ts +30 -0
  80. package/es/components/button-print/src/ButtonPrint.vue.d.ts +30 -0
  81. package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
  82. package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +9 -0
  83. package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
  84. package/es/components/button-print/src/components/OldPrintComponent.vue.d.ts +9 -0
  85. package/es/components/button-print/src/components/OldPrintComponent.vue2.js +1 -1
  86. package/es/components/button-print/src/utils/print.d.ts +2 -2
  87. package/es/components/button-print/src/utils/print.js +1 -1
  88. package/es/components/calendar/index.d.ts +126 -3
  89. package/es/components/calendar/src/Calendar.vue.d.ts +126 -2
  90. package/es/components/card-reader-sdk/src/cardReaderSDK.d.ts +4 -8
  91. package/es/components/card-reader-sdk/src/cardReaderSDK.js +1 -1
  92. package/es/components/card-render/src/components/Button.vue.d.ts +3 -0
  93. package/es/components/card-render/src/components/Button.vue2.js +1 -1
  94. package/es/components/card-render/src/components/ScaleView.vue.d.ts +39 -0
  95. package/es/components/card-render/src/components/ScaleView.vue.js +1 -0
  96. package/es/components/card-render/src/components/ScaleView.vue2.js +1 -0
  97. package/es/components/card-render/src/components/Table.vue.d.ts +104 -0
  98. package/es/components/card-render/src/components/Table.vue.js +1 -0
  99. package/es/components/card-render/src/components/Table.vue2.js +1 -0
  100. package/es/components/card-render/src/components/Text.vue.d.ts +1 -0
  101. package/es/components/card-render/src/components/Text.vue2.js +1 -1
  102. package/es/components/card-render/src/components/index.d.ts +162 -23
  103. package/es/components/card-render/src/components/index.js +1 -1
  104. package/es/components/card-render/src/constants/index.d.ts +4 -1
  105. package/es/components/card-render/src/constants/index.js +1 -1
  106. package/es/components/card-render/style/index.css +1 -1
  107. package/es/components/classification/src/components/table-modal/index.vue.d.ts +3 -0
  108. package/es/components/editor/src/Editor.js +1 -1
  109. package/es/components/editor/style/index.css +1 -0
  110. package/es/components/fabric-chart/index.d.ts +6 -2
  111. package/es/components/fabric-chart/src/FabricChart.vue.d.ts +6 -2
  112. package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -1
  113. package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
  114. package/es/components/field-set/src/FieldColor.vue.d.ts +1 -1
  115. package/es/components/field-set/src/FieldFilter.vue.d.ts +1 -1
  116. package/es/components/field-set/src/FieldSet.vue.d.ts +1 -1
  117. package/es/components/field-set/src/components/table-row.vue.d.ts +1 -1
  118. package/es/components/form-config/index.d.ts +40 -10
  119. package/es/components/form-config/src/FormConfig.vue.d.ts +40 -10
  120. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +32 -8
  121. package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +8 -2
  122. package/es/components/form-render/src/components/renderer/date.d.ts +2 -2
  123. package/es/components/form-render/src/components/renderer/formItem.d.ts +2 -0
  124. package/es/components/form-render/src/components/renderer/formItem.js +1 -1
  125. package/es/components/form-render/src/components/renderer/levelSearchCascader/index.d.ts +9 -0
  126. package/es/components/form-render/src/components/renderer/levelSearchCascader/index.js +1 -1
  127. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +12 -1
  128. package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +12 -1
  129. package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
  130. package/es/components/form-render/src/components/renderer/select.js +1 -1
  131. package/es/components/form-render/src/components/tooltipMessage.vue.d.ts +12 -1
  132. package/es/components/form-render/src/components/tooltipMessage.vue2.js +1 -1
  133. package/es/components/form-render/src/hooks/useBusinessBinding.js +1 -1
  134. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  135. package/es/components/form-render/src/hooks/useLowCodeReactions.js +1 -1
  136. package/es/components/form-render/src/types/fieldItem.d.ts +9 -3
  137. package/es/components/guide/src/renderer.d.ts +2 -2
  138. package/es/components/iho-chat/index.d.ts +206 -4
  139. package/es/components/iho-chat/src/Index.vue.d.ts +206 -4
  140. package/es/components/iho-chat/src/api/index.d.ts +1 -0
  141. package/es/components/iho-chat/src/api/index.js +1 -1
  142. package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +8 -0
  143. package/es/components/iho-chat/src/components/ChatAdd.vue2.js +1 -1
  144. package/es/components/iho-chat/src/components/ChatFile.vue.d.ts +11 -3
  145. package/es/components/iho-chat/src/components/ChatFile.vue2.js +1 -1
  146. package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +7 -0
  147. package/es/components/iho-chat/src/components/ChatFooter.vue2.js +1 -1
  148. package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +96 -2
  149. package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +77 -0
  150. package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
  151. package/es/components/iho-chat/src/components/ChatRecord.vue.d.ts +71 -1
  152. package/es/components/iho-chat/src/components/ChatRecord.vue2.js +1 -1
  153. package/es/components/iho-chat/src/components/ChatSearch.vue.d.ts +8 -2
  154. package/es/components/iho-chat/src/components/ChatSearch.vue2.js +1 -1
  155. package/es/components/iho-chat/src/components/ChatSet.vue.d.ts +10 -0
  156. package/es/components/iho-chat/src/components/ChatSet.vue2.js +1 -1
  157. package/es/components/iho-chat/src/components/MessageMergeForward.vue.d.ts +70 -1
  158. package/es/components/iho-chat/src/components/MessageMergeForward.vue2.js +1 -1
  159. package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +7 -0
  160. package/es/components/iho-chat/src/components/PersonProfile.vue.d.ts +3 -0
  161. package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
  162. package/es/components/iho-chat/src/components/SiderList.vue.d.ts +3 -1
  163. package/es/components/iho-chat/src/components/SiderList.vue2.js +1 -1
  164. package/es/components/iho-chat/src/constants/index.d.ts +9 -2
  165. package/es/components/iho-chat/src/constants/index.js +1 -1
  166. package/es/components/iho-chat/src/hooks/useSearchPatientList.d.ts +11 -0
  167. package/es/components/iho-chat/src/hooks/useSearchPatientList.js +1 -0
  168. package/es/components/iho-chat/src/utils/chatSock.js +1 -1
  169. package/es/components/iho-chat/src/utils/index.d.ts +6 -0
  170. package/es/components/iho-chat/src/utils/index.js +1 -1
  171. package/es/components/iho-chat/style/index.css +1 -1
  172. package/es/components/iho-table/index.d.ts +3 -0
  173. package/es/components/iho-table/index.js +1 -1
  174. package/es/components/iho-table/src/IhoTable.vue2.js +1 -1
  175. package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +1 -1
  176. package/es/components/iho-table/src/hooks/tapHooks/index.js +1 -1
  177. package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.d.ts +3 -3
  178. package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.js +1 -1
  179. package/es/components/iho-table/src/hooks/useTablePlugin.js +1 -1
  180. package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +1 -1
  181. package/es/components/iho-table/src/plugins/headerPlugin/index.d.ts +1 -1
  182. package/es/components/iho-table/src/plugins/headerPlugin/index.js +1 -1
  183. package/es/components/iho-table/src/plugins/highLightSetPlugin.js +1 -1
  184. package/es/components/iho-table/src/plugins/index.d.ts +79 -3
  185. package/es/components/iho-table/src/plugins/index.js +1 -1
  186. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
  187. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -1
  188. package/es/components/iho-table/src/plugins/stickyFixedPlugin.js +1 -1
  189. package/es/components/iho-table/src/plugins/varialbleHeightPlugin.js +1 -1
  190. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/utils.js +1 -1
  191. package/es/components/iho-table/src/types/pluginType.d.ts +2 -2
  192. package/es/components/iho-table/src/utils/index.js +1 -1
  193. package/es/components/index.css +1 -1
  194. package/es/components/index.d.ts +2 -1
  195. package/es/components/index.js +1 -1
  196. package/es/components/scale-view/index.d.ts +17 -3
  197. package/es/components/scale-view/src/ScaleView.vue.d.ts +17 -3
  198. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  199. package/es/components/scale-view/src/components/EvaluateCountdown.vue.d.ts +1 -1
  200. package/es/components/scale-view/src/hooks/scaleview-computed.js +1 -1
  201. package/es/components/scale-view/src/hooks/scaleview-init.d.ts +3 -1
  202. package/es/components/scale-view/src/hooks/scaleview-init.js +1 -1
  203. package/es/components/scale-view/src/hooks/scaleview-props.d.ts +4 -0
  204. package/es/components/scale-view/src/hooks/scaleview-props.js +1 -1
  205. package/es/components/scale-view/src/hooks/use-component.d.ts +1 -2189
  206. package/es/components/shortcut-provider/src/ShortcutProvider.vue2.js +1 -1
  207. package/es/components/shortcut-setter/index.d.ts +8 -2
  208. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +8 -2
  209. package/es/components/steps-wheel/index.d.ts +18 -0
  210. package/es/components/steps-wheel/src/StepsWheel.vue.d.ts +18 -0
  211. package/es/components/steps-wheel/src/StepsWheel.vue2.js +1 -1
  212. package/es/env.d.ts +25 -25
  213. package/es/shared/assets/img/ai__avatar.png.js +1 -1
  214. package/es/shared/assets/img/defaultCover/10review_successful.png.js +1 -1
  215. package/es/shared/assets/img/defaultCover/11review_fail.png.js +1 -1
  216. package/es/shared/assets/img/defaultCover/12no_setting.png.js +1 -1
  217. package/es/shared/assets/img/defaultCover/13no_menu_setting.png.js +1 -1
  218. package/es/shared/assets/img/defaultCover/14no_call_setting.png.js +1 -1
  219. package/es/shared/assets/img/defaultCover/15no_use_tag.png.js +1 -1
  220. package/es/shared/assets/img/defaultCover/16no_table_data.png.js +1 -1
  221. package/es/shared/assets/img/defaultCover/1location.png.js +1 -1
  222. package/es/shared/assets/img/defaultCover/2notfound.png.js +1 -1
  223. package/es/shared/assets/img/defaultCover/3loading.png.js +1 -1
  224. package/es/shared/assets/img/defaultCover/4no_permission.png.js +1 -1
  225. package/es/shared/assets/img/defaultCover/5no_data.png.js +1 -1
  226. package/es/shared/assets/img/defaultCover/6no_network.png.js +1 -1
  227. package/es/shared/assets/img/defaultCover/7no_doctor.png.js +1 -1
  228. package/es/shared/assets/img/defaultCover/8system_error.png.js +1 -1
  229. package/es/shared/assets/img/defaultCover/9system_upgrade.png.js +1 -1
  230. package/es/shared/assets/img/failure.png.js +1 -1
  231. package/es/shared/assets/img/file-emr.png.js +1 -0
  232. package/es/shared/assets/img/file.png.js +1 -0
  233. package/es/shared/assets/img/logo.png.js +1 -1
  234. package/es/shared/assets/img/no-permission.png.js +1 -1
  235. package/es/shared/assets/img/nodata.png.js +1 -1
  236. package/es/shared/assets/img/notfound.png.js +1 -1
  237. package/es/shared/assets/img/qr.png.js +1 -1
  238. package/es/shared/assets/img/success.png.js +1 -1
  239. package/es/shared/assets/img/table_style_2.png.js +1 -1
  240. package/es/shared/assets/img/use.png.js +1 -0
  241. package/es/shared/assets/img/video.png.js +1 -1
  242. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  243. package/es/shared/assets/img/xb_big.png.js +1 -1
  244. package/es/shared/assets/img/xb_small.png.js +1 -1
  245. package/es/shared/hooks/useLevelSearchCascader.d.ts +1 -0
  246. package/es/shared/hooks/useLevelSearchCascader.js +1 -1
  247. package/es/shared/package.json.js +1 -1
  248. package/package.json +5 -3
  249. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  250. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
  251. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
  252. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
  253. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
  254. package/es/shared/utils/fabricjs/index.d.ts +0 -6823
  255. package/es/shared/utils/tapable/index.d.ts +0 -139
@@ -1,5 +1,5 @@
1
1
  import { AnyObject } from '../../../../shared/types';
2
- import { formatTime, getForwardTitle } from '../utils';
2
+ import { formatTime, getForwardTitle, isDoctorRole, getRoleName, getFileDetails, getFileType, getDetail, showAudioAndVideoRecord, simplifyMessage } from '../utils';
3
3
  import { MESSAGE_TYPE } from '../constants';
4
4
  declare const _default: import("vue").DefineComponent<{
5
5
  id: {
@@ -40,17 +40,86 @@ declare const _default: import("vue").DefineComponent<{
40
40
  };
41
41
  isForward: boolean;
42
42
  };
43
+ cssVars: import("vue").ComputedRef<AnyObject>;
43
44
  msgItem: import("vue").ComputedRef<AnyObject>;
44
45
  msgList: import("vue").ComputedRef<any>;
45
46
  NModal: any;
46
47
  NAvatar: any;
48
+ NIcon: any;
49
+ isArray: {
50
+ (value?: any): value is any[];
51
+ <T>(value?: any): value is any[];
52
+ };
47
53
  formatTime: typeof formatTime;
48
54
  getForwardTitle: typeof getForwardTitle;
55
+ isDoctorRole: typeof isDoctorRole;
56
+ getRoleName: typeof getRoleName;
57
+ getFileDetails: typeof getFileDetails;
58
+ getFileType: typeof getFileType;
59
+ getDetail: typeof getDetail;
60
+ showAudioAndVideoRecord: typeof showAudioAndVideoRecord;
61
+ simplifyMessage: typeof simplifyMessage;
49
62
  MESSAGE_TYPE: typeof MESSAGE_TYPE;
50
63
  emojis: {
51
64
  default: string[][];
52
65
  findEmoji(name: string): any;
53
66
  };
67
+ MessageEvent: import("vue").DefineComponent<{
68
+ data: {
69
+ type: import("vue").PropType<AnyObject>;
70
+ required: true;
71
+ };
72
+ }, {
73
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
74
+ data: {
75
+ type: import("vue").PropType<AnyObject>;
76
+ required: true;
77
+ };
78
+ }>> & {}>>;
79
+ state: {
80
+ orgId: string | number;
81
+ currentSessionItem: AnyObject;
82
+ id: string;
83
+ userInfo: AnyObject;
84
+ msgList: AnyObject[];
85
+ currentMsg: AnyObject;
86
+ isAppendMsg: boolean;
87
+ sessionList: AnyObject[];
88
+ isChangeSession: boolean;
89
+ updateSessionItem: AnyObject;
90
+ isUpdateSession: boolean;
91
+ currentReferenceMsg: AnyObject | null;
92
+ currentReEditMsg: AnyObject | null;
93
+ showVideo: boolean;
94
+ currentAVMsg: AnyObject;
95
+ currentGroupUser: AnyObject[];
96
+ showMultipleVideo: boolean;
97
+ userDetail: {
98
+ show: boolean;
99
+ position: {
100
+ x: number;
101
+ y: number;
102
+ };
103
+ userId: string;
104
+ info: AnyObject | null;
105
+ };
106
+ isForward: boolean;
107
+ };
108
+ setUserDetail: (event: MouseEvent, userDetail: AnyObject) => void;
109
+ inviter: import("vue").Ref<any>;
110
+ invitee: import("vue").Ref<any[]>;
111
+ isValidJSON: (str: string) => boolean;
112
+ getTask: (_id: string | number, arrRes: AnyObject[]) => () => Promise<unknown>;
113
+ getEventContent: (data: AnyObject) => Promise<void>;
114
+ NButton: any;
115
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
116
+ data: {
117
+ type: import("vue").PropType<AnyObject>;
118
+ required: true;
119
+ };
120
+ }>>, {}>;
121
+ CallOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
122
+ VideocamOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
54
123
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
55
124
  id: {
56
125
  type: StringConstructor;
@@ -1 +1 @@
1
- import{defineComponent as t,computed as e,openBlock as s,createBlock as o,unref as n,withCtx as i,createElementVNode as r,createElementBlock as a,Fragment as c,renderList as d,createVNode as m,toDisplayString as l}from"vue";import{NModal as p,NAvatar as u}from"naive-ui";import{useData as f}from"../hooks/useData.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import{MESSAGE_TYPE as g}from"../constants/index.js";import"../api/index.js";import{transformMessage as h,getForwardTitle as _,formatTime as j}from"../utils/index.js";import{isArray as v}from"lodash-es";import"trtc-sdk-v5";import{emojis as M}from"../utils/emoji.js";const k={class:"iho-chat-dialog__content iho-chat-record-wrapper iho-chat-record-wrapper--forward"},w={class:"msg-box"},y={class:"name-and-time"},T={class:"content"},x=["src"],L=["src"],E=["innerHTML"];var A=t({__name:"MessageMergeForward",props:{id:{type:String}},setup(t){const A=t,{state:H}=f(),I=e((()=>A.id&&H.msgList.find((({id:t})=>t===A.id))||{})),b=e((()=>{if(!I.value)return[];const{content:t={}}=I.value;return v(t.forwardMessageList)?t.forwardMessageList.map((t=>({...t,__content:h(t.content)}))):[]}));return(t,e)=>(s(),o(n(p),{preset:"dialog",title:n(_)(n(I).content),"show-icon":!1,"auto-focus":!1,class:"iho-chat-dialog"},{default:i((()=>[r("div",k,[(s(!0),a(c,null,d(n(b),(t=>(s(),a("div",{class:"content-item",key:t.id},[m(n(u),{round:"",size:38,src:t.senderAvatar},null,8,["src"]),r("div",w,[r("div",y,[r("span",null,l(t.senderName),1),r("span",null,l(n(j)(t.sendTime).recordTime),1)]),r("div",T,[t.content.chatMessageType===n(g).IMAGE?(s(),a("img",{key:0,src:t.__content},null,8,x)):t.content.chatMessageType===n(g).EMOJI?(s(),a("img",{key:1,class:"emoji",src:n(M).findEmoji(t.__content)},null,8,L)):(s(),a("p",{key:2,innerHTML:t.__content},null,8,E))])])])))),128))])])),_:1},8,["title"]))}});export{A as default};
1
+ import{defineComponent as e,computed as s,openBlock as t,createBlock as n,unref as o,withCtx as a,createElementVNode as i,normalizeStyle as c,createElementBlock as r,Fragment as l,renderList as m,createVNode as p,toDisplayString as d,withDirectives as g,normalizeClass as u,vShow as f,createCommentVNode as h}from"vue";import{NModal as y,NAvatar as M,NIcon as v}from"naive-ui";import{useData as _}from"../hooks/useData.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import{MESSAGE_TYPE as T}from"../constants/index.js";import"../api/index.js";import{transformMessage as j,getForwardTitle as k,isDoctorRole as w,getRoleName as x,formatTime as L,getFileDetails as I,getFileType as E,getDetail as D,showAudioAndVideoRecord as A,simplifyMessage as O}from"../utils/index.js";import{isArray as b}from"lodash-es";import"trtc-sdk-v5";import{emojis as H}from"../utils/emoji.js";import N from"./MessageEvent.vue.js";import{CallOutline as F,VideocamOutline as R}from"@vicons/ionicons5";const U={class:"msg-box"},V={class:"name-and-time"},z={class:"role-name"},G={class:"name"},J={class:"content"},S=["src"],W={class:"file-type"},q={class:"text"},B={class:"name text-ellipsis"},C={class:"detail text-ellipsis"},K=["src"],P={class:"merge-msg-box"},Q={class:"forward-title"},X={class:"merge-msg-contents"},Y={class:"label-name"},Z=["innerHTML"],$=["innerHTML"];var ee=e({__name:"MessageMergeForward",props:{id:{type:String}},setup(e){const ee=e,{state:se,cssVars:te}=_(),ne=s((()=>ee.id&&se.msgList.find((({id:e})=>e===ee.id))||{})),oe=s((()=>{if(!ne.value)return[];const{content:e={}}=ne.value;return b(e.forwardMessageList)?e.forwardMessageList.map((e=>({...e,__content:j(e.content)}))):[]}));return(e,s)=>(t(),n(o(y),{preset:"dialog",title:o(k)(o(ne).content),"show-icon":!1,"auto-focus":!1,class:"iho-chat-dialog"},{default:a((()=>[i("div",{class:"iho-chat-dialog__content iho-chat-record-wrapper iho-chat-record-wrapper--forward",style:c(o(te))},[(t(!0),r(l,null,m(o(oe),(e=>(t(),r("div",{class:"content-item",key:e.id},[p(o(M),{round:"",size:38,src:e.senderAvatar},null,8,["src"]),i("div",U,[i("div",V,[i("div",z,[i("span",G,d(e.senderName),1),g(i("label",{class:u(["iho-chatRole",o(w)(e.roleInfo)?"isDoctor":""]),style:{"margin-right":"6px"}},d(o(x)(e.roleInfo)),3),[[f,o(x)(e.roleInfo)]])]),i("span",null,d(o(L)(e.sendTime).recordTime),1)]),i("div",J,[e.content.chatMessageType===o(T).IMAGE?(t(),r("img",{key:0,src:o(I)(e.__content,"fileUrl")},null,8,S)):e.content.chatMessageType===o(T).FILE?(t(),r(l,{key:1},[i("span",W,d(o(E)(e.__content)),1),i("div",q,[i("span",B,d(o(I)(e.__content,"fileName")),1),i("span",C,d(o(D)(e)),1)])],64)):e.content.chatMessageType===o(T).EMOJI?(t(),r("img",{key:2,class:"emoji",src:o(H).findEmoji(e.__content)},null,8,K)):e.content.chatMessageType===o(T).EVENT?(t(),n(N,{key:3,data:e},null,8,["data"])):e.content.chatMessageType===o(T).AUDIO||e.content.chatMessageType===o(T).VIDEO?(t(),r(l,{key:4},[h(" 语音通话和视频通话 "),p(o(v),{class:"is-video-call",component:e.content.chatMessageType===o(T).AUDIO?o(F):o(R)},null,8,["component"]),i("span",null,d(o(A)(e.content.chatMessageType)),1)],64)):e.content.chatMessageType===o(T).FORWARD&&o(b)(e.content.forwardMessageList)?(t(),r(l,{key:5},[h(" 消息转发 "),i("div",P,[i("h4",Q,d(o(k)(e.content)),1),i("div",X,[(t(!0),r(l,null,m(e.content.forwardMessageList,(e=>(t(),r("div",{key:e.id,class:"merge-msg-contents-item"},[i("span",Y,d(e.senderName)+":",1),i("pre",{innerHTML:o(O)(e.content)},null,8,Z)])))),128))])])],64)):(t(),r("p",{key:6,innerHTML:e.__content},null,8,$))])])])))),128))],4)])),_:1},8,["title"]))}});export{ee as default};
@@ -181,6 +181,7 @@ declare const _default: import("vue").DefineComponent<{}, {
181
181
  remark: import("vue").Ref<string>;
182
182
  currentTab: import("vue").Ref<AnyObject[]>;
183
183
  breadcrumbList: import("vue").Ref<AnyObject[]>;
184
+ breadcrumbRef: import("vue").Ref<any>;
184
185
  userList: import("vue").Ref<AnyObject[]>;
185
186
  handleInput: () => void;
186
187
  _disabledIds: import("vue").ComputedRef<any[]>;
@@ -189,18 +190,21 @@ declare const _default: import("vue").DefineComponent<{}, {
189
190
  name: any;
190
191
  avatar: any;
191
192
  chatType: any;
193
+ roleInfo: any;
192
194
  }[]>;
193
195
  friends: import("vue").ComputedRef<{
194
196
  id: any;
195
197
  name: any;
196
198
  avatar: any;
197
199
  chatType: any;
200
+ roleInfo: any;
198
201
  }[]>;
199
202
  groups: import("vue").ComputedRef<{
200
203
  id: any;
201
204
  name: any;
202
205
  avatar: any;
203
206
  chatType: any;
207
+ roleInfo: any;
204
208
  }[]>;
205
209
  checkedIds: import("vue").ComputedRef<any[]>;
206
210
  btnDisabled: import("vue").ComputedRef<boolean>;
@@ -209,6 +213,7 @@ declare const _default: import("vue").DefineComponent<{}, {
209
213
  currentTabKey: import("vue").ComputedRef<any>;
210
214
  showAllCheckbox: import("vue").ComputedRef<boolean>;
211
215
  getOrgList: () => Promise<void>;
216
+ handleSearchInput: () => void;
212
217
  setUserTotal: (tree: AnyObject[]) => void;
213
218
  getDisabled: (id: string | number) => boolean;
214
219
  handleClickCheckbox: (option: AnyObject) => Promise<void>;
@@ -238,6 +243,8 @@ declare const _default: import("vue").DefineComponent<{}, {
238
243
  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<{}>>, {}>;
239
244
  ChevronForwardOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
240
245
  last: <T>(array: import("lodash").List<T> | null | undefined) => T | undefined;
246
+ isDoctorRole: typeof import("../utils").isDoctorRole;
247
+ getRoleName: typeof import("../utils").getRoleName;
241
248
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
242
249
  title: {
243
250
  type: StringConstructor;
@@ -1,5 +1,6 @@
1
1
  import { UploadFileInfo } from 'naive-ui';
2
2
  import { AnyObject } from '../../../../shared/types';
3
+ import { isDoctorRole, getRoleName } from '../utils';
3
4
  declare const _default: import("vue").DefineComponent<{}, {
4
5
  state: {
5
6
  orgId: string | number;
@@ -58,5 +59,7 @@ declare const _default: import("vue").DefineComponent<{}, {
58
59
  Close: 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<{}>>, {}>;
59
60
  EyeOutline: 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<{}>>, {}>;
60
61
  EyeOffOutline: 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<{}>>, {}>;
62
+ isDoctorRole: typeof isDoctorRole;
63
+ getRoleName: typeof getRoleName;
61
64
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
62
65
  export default _default;
@@ -1 +1 @@
1
- import{defineComponent as t,ref as e,reactive as l,computed as o,watch as n,openBlock as a,createBlock as i,unref as s,withCtx as r,createElementBlock as u,Fragment as d,withDirectives as c,createElementVNode as p,createVNode as v,createCommentVNode as w,toDisplayString as g,createTextVNode as m,renderList as f,vShow as y}from"vue";import{NPopover as h,NAvatar as k,NButton as b,NIcon as C}from"naive-ui";import{ChatbubbleEllipses as D,EyeOffOutline as j,EyeOutline as x,Close as L}from"@vicons/ionicons5";import{useData as _}from"../hooks/useData.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import{CHAT_TYPE as B}from"../constants/index.js";import{openSessionApi as I,getUserDetailApi as z}from"../api/index.js";import"../utils/index.js";import"lodash-es";import"trtc-sdk-v5";const N={class:"person-profile-main"},E={class:"left"},P={class:"profile"},S={class:"profile__text"},$={class:"right"},G={class:"right__content"},O={class:"label"},T={class:"content"};var q=t({__name:"PersonProfile",setup(t){var q,A,F,H,J,K,M,Q;const{state:R,openSession:U}=_(),V=e(!1),W=e(!1),X=l({}),Y=[{label:(null==(q=window.getLanguageByCode)?void 0:q.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"}],Z=o((()=>(X.id&&Y.forEach((t=>{const{key:e}=t;t.value=X[e]})),Y)));async function tt(){var t;R.userDetail.show=!1;const e=R.userDetail.userId||(null==(t=R.userDetail.info)?void 0:t.id);let l=R.sessionList.find((t=>t.receiver===e));if(!l)try{l=await I({chatType:B.SINGLE,receiver:e,sender:R.userInfo.id})}catch(t){console.log("error :>> ",t)}l&&U(l)}function et(t){const{key:e,value:l}=t;return"phone"!==e||W.value?l:(l||"").replace(/(\d{3})\d{4}(\d{4})/,"$1****$2")}return n((()=>R.userDetail.show),(t=>{if(!t)return R.userDetail.userId="",void(R.userDetail.info=null);!async function(){const{userId:t,info:e}=R.userDetail;if(!t&&!e)return;let l={};t?l=await z({userId:t}):e&&(l=e),(null==l?void 0:l.id)?Object.assign(X,l):X.id=""}()})),(t,e)=>(a(),i(s(h),{raw:"",class:"person-profile-wrapper",show:s(R).userDetail.show,x:s(R).userDetail.position.x,y:s(R).userDetail.position.y,trigger:"manual","show-arrow":!1,"display-directive":"show",to:"body",shift:"",onClickoutside:e[3]||(e[3]=()=>s(R).userDetail.show=!1)},{default:r((()=>[X.id?(a(),u(d,{key:0},[c(p("div",N,[p("div",E,[p("div",P,[v(s(k),{src:X.avatar,bordered:"",round:"",size:100,onClickCapture:e[0]||(e[0]=t=>V.value=!0)},null,8,["src"]),w(' <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",S,[p("h4",null,g(X.name),1),p("p",null,g(X.orgName),1)]),v(s(b),{strong:"",secondary:"",onClick:tt},{default:r((()=>[v(s(C),{size:"13",color:"#666666",component:s(D),style:{"margin-right":"6px"}},null,8,["component"]),m(" 发消息 ")])),_:1})])]),p("div",$,[p("div",G,[(a(!0),u(d,null,f(s(Z),((t,l)=>(a(),u("div",{class:"info-item",key:l},[p("span",O,g(t.label),1),p("div",T,[p("span",null,g(et(t)),1),"phone"===t.key&&et(t)?(a(),i(s(C),{key:0,size:"16",color:"#666666",component:W.value?s(j):s(x),style:{"margin-left":"10px"},onClick:e[1]||(e[1]=t=>W.value=!W.value)},null,8,["component"])):w("v-if",!0)])])))),128))])])],512),[[y,!V.value]]),c(p("div",{class:"large-avatar",onClick:e[2]||(e[2]=t=>V.value=!1)},[v(s(b),{circle:"",size:"small",secondary:""},{icon:r((()=>[v(s(C),{size:24,component:s(L),color:"#fff"},null,8,["component"])])),_:1}),v(s(k),{size:310,round:"",src:X.avatar},null,8,["src"])],512),[[y,V.value]])],64)):w("v-if",!0)])),_:1},8,["show","x","y"]))}});export{q as default};
1
+ import{defineComponent as t,ref as e,reactive as o,computed as l,watch as n,openBlock as a,createBlock as i,unref as s,withCtx as r,createElementBlock as c,Fragment as u,withDirectives as d,createElementVNode as p,createVNode as v,createCommentVNode as m,toDisplayString as w,normalizeClass as g,vShow as f,createTextVNode as y,renderList as h}from"vue";import{NPopover as k,NAvatar as b,NButton as C,NIcon as D}from"naive-ui";import{ChatbubbleEllipses as I,EyeOffOutline as _,EyeOutline as j,Close as x}from"@vicons/ionicons5";import{useData as L}from"../hooks/useData.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import{CHAT_TYPE as B}from"../constants/index.js";import{openSessionApi as z,getUserDetailApi as N}from"../api/index.js";import{isDoctorRole as E,getRoleName as P}from"../utils/index.js";import"lodash-es";import"trtc-sdk-v5";const S={class:"person-profile-main"},$={class:"left"},G={class:"profile"},O={class:"profile__text"},R={class:"user__name"},T={class:"right"},q={class:"right__content"},A={class:"label"},F={class:"content"};var H=t({__name:"PersonProfile",setup(t){var H,J,K,M,Q,U,V,W;const{state:X,openSession:Y}=L(),Z=e(!1),tt=e(!1),et=o({}),ot=[{label:(null==(H=window.getLanguageByCode)?void 0:H.call(window,"10010.1.115"))||"机构",value:"",key:"orgName"},{label:(null==(J=window.getLanguageByCode)?void 0:J.call(window,"10010.1.116"))||"姓名",value:"",key:"name"},{label:(null==(K=window.getLanguageByCode)?void 0:K.call(window,"10010.1.117"))||"归属科室",value:"",key:"deptName"},{label:(null==(M=window.getLanguageByCode)?void 0:M.call(window,"10010.1.118"))||"业务科室",value:"",key:"businessDeptNames"},{label:(null==(Q=window.getLanguageByCode)?void 0:Q.call(window,"10010.1.119"))||"手机号",value:"",key:"phone"},{label:(null==(U=window.getLanguageByCode)?void 0:U.call(window,"10010.1.120"))||"岗位",value:"",key:"post"},{label:(null==(V=window.getLanguageByCode)?void 0:V.call(window,"10010.1.121"))||"工号",value:"",key:"jobId"},{label:(null==(W=window.getLanguageByCode)?void 0:W.call(window,"10010.1.122"))||"性别",value:"",key:"orgName"}],lt=l((()=>(et.id&&ot.forEach((t=>{const{key:e}=t;t.value=et[e]})),ot)));async function nt(){var t;X.userDetail.show=!1;const e=X.userDetail.userId||(null==(t=X.userDetail.info)?void 0:t.id);let o=X.sessionList.find((t=>t.receiver===e));if(!o)try{o=await z({chatType:B.SINGLE,receiver:e,sender:X.userInfo.id})}catch(t){console.log("error :>> ",t)}o&&Y(o)}function at(t){const{key:e,value:o}=t;return"phone"!==e||tt.value?o:(o||"").replace(/(\d{3})\d{4}(\d{4})/,"$1****$2")}return n((()=>X.userDetail.show),(t=>{if(!t)return X.userDetail.userId="",void(X.userDetail.info=null);!async function(){const{userId:t,info:e}=X.userDetail;if(!t&&!e)return;let o={};t?o=await N({userId:t}):e&&(o=e),(null==o?void 0:o.id)?Object.assign(et,o):et.id=""}()})),(t,e)=>(a(),i(s(k),{raw:"",class:"person-profile-wrapper",show:s(X).userDetail.show,x:s(X).userDetail.position.x,y:s(X).userDetail.position.y,trigger:"manual","show-arrow":!1,"display-directive":"show",to:"body",shift:"",onClickoutside:e[3]||(e[3]=()=>s(X).userDetail.show=!1)},{default:r((()=>[et.id?(a(),c(u,{key:0},[d(p("div",S,[p("div",$,[p("div",G,[v(s(b),{src:et.avatar,bordered:"",round:"",size:100,onClickCapture:e[0]||(e[0]=t=>Z.value=!0)},null,8,["src"]),m(' <n-upload abstract accept="image/*" @change="onChange">\r\n\t\t\t\t\t\t\t<n-upload-trigger #="{ handleClick }" abstract>\r\n\t\t\t\t\t\t\t\t<n-button\r\n\t\t\t\t\t\t\t\t\tcircle\r\n\t\t\t\t\t\t\t\t\tsecondary\r\n\t\t\t\t\t\t\t\t\tclass="edit-avatar"\r\n\t\t\t\t\t\t\t\t\tv-show="userDetail.id === state.userInfo.id"\r\n\t\t\t\t\t\t\t\t\t@click="handleClick"\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t<template #icon>\r\n\t\t\t\t\t\t\t\t\t\t<n-icon size="16" color="#666666" :component="Camera" />\r\n\t\t\t\t\t\t\t\t\t</template>\r\n\t\t\t\t\t\t\t\t</n-button>\r\n\t\t\t\t\t\t\t</n-upload-trigger>\r\n\t\t\t\t\t\t</n-upload> '),p("div",O,[p("h4",null,[p("label",R,w(et.name),1),d(p("label",{class:g(["iho-chatRole",s(E)(et.roleInfo)?"isDoctor":""])},w(s(P)(et.roleInfo)),3),[[f,s(P)(et.roleInfo)]])]),p("p",null,w(et.orgName),1)]),v(s(C),{strong:"",secondary:"",onClick:nt},{default:r((()=>[v(s(D),{size:"13",color:"#666666",component:s(I),style:{"margin-right":"6px"}},null,8,["component"]),y(" 发消息 ")])),_:1})])]),p("div",T,[p("div",q,[(a(!0),c(u,null,h(s(lt),((t,o)=>(a(),c("div",{class:"info-item",key:o},[p("span",A,w(t.label),1),p("div",F,[p("span",null,w(at(t)),1),"phone"===t.key&&at(t)?(a(),i(s(D),{key:0,size:"16",color:"#666666",component:tt.value?s(_):s(j),style:{"margin-left":"10px"},onClick:e[1]||(e[1]=t=>tt.value=!tt.value)},null,8,["component"])):m("v-if",!0)])])))),128))])])],512),[[f,!Z.value]]),d(p("div",{class:"large-avatar",onClick:e[2]||(e[2]=t=>Z.value=!1)},[v(s(C),{circle:"",size:"small",secondary:""},{icon:r((()=>[v(s(D),{size:24,component:s(x),color:"#fff"},null,8,["component"])])),_:1}),v(s(b),{size:310,round:"",src:et.avatar},null,8,["src"])],512),[[f,Z.value]])],64)):m("v-if",!0)])),_:1},8,["show","x","y"]))}});export{H as default};
@@ -1,6 +1,6 @@
1
1
  import { CSSProperties } from 'vue';
2
2
  import { AnyObject } from '../../../../shared/types';
3
- import { formatTime } from '../utils';
3
+ import { formatTime, isDoctorRole, getRoleName } from '../utils';
4
4
  import { STATUS } from '../constants';
5
5
  declare const _default: import("vue").DefineComponent<{}, {
6
6
  filterKey: {
@@ -121,6 +121,8 @@ declare const _default: import("vue").DefineComponent<{}, {
121
121
  beforeUnmount(el: any): void;
122
122
  };
123
123
  formatTime: typeof formatTime;
124
+ isDoctorRole: typeof isDoctorRole;
125
+ getRoleName: typeof getRoleName;
124
126
  STATUS: typeof STATUS;
125
127
  CDatePicker: import("../../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{
126
128
  updateUnchangedValue: {
@@ -1 +1 @@
1
- import{defineComponent as e,ref as t,computed as l,withDirectives as n,openBlock as i,createElementBlock as a,normalizeStyle as o,unref as s,createVNode as u,withCtx as r,createElementVNode as d,Fragment as v,renderList as c,createBlock as p,vShow as m,createCommentVNode as f,createTextVNode as g,toDisplayString as w,withModifiers as y,normalizeClass as k,nextTick as h}from"vue";import{NPopover as _,NInput as x,NIcon as C,NTag as M,NAvatar as R,NBadge as b}from"naive-ui";import j from"./ContextMenu.js";import{useData as D}from"../hooks/useData.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import{STATUS as E}from"../constants/index.js";import{toppingSessionApi as L,updateStatusApi as B}from"../api/index.js";import{listSort as I,formatTime as T}from"../utils/index.js";import"lodash-es";import"trtc-sdk-v5";import{vFlexibleResize as N}from"../../../../shared/directive/flexibleResize.js";import S from"../../../date-picker/index.js";import{SearchOutline as V}from"@vicons/ionicons5";import $ from"./userItemRender.js";import O from"../../../default-page/index.js";import{useDebounceFn as U}from"@vueuse/core";import{isBefore as H,isAfter as z}from"date-fns";const K={key:0,class:"sider-list__filter"},P={class:"user-list-wrapper"},W={class:"sider-list__tags box-shadow"},A=["onClick","onContextmenu"],X={class:"avatar-right"},Y={class:"name"},q={class:"msg-tip"},F={class:"msg-tip__content"},G={key:0},J=["innerHTML"];var Q=e({__name:"SiderList",setup(e){var Q,Z,ee;const te="all",le="unread",ne="ended";let ie=[];const ae=t(300),oe=t(),se=t([{label:(null==(Q=window.getLanguageByCode)?void 0:Q.call(window,"10010.1.123"))||"全部",key:te},{label:(null==(Z=window.getLanguageByCode)?void 0:Z.call(window,"10010.1.124"))||"未读",key:le},{label:(null==(ee=window.getLanguageByCode)?void 0:ee.call(window,"10010.1.77"))||"结束",key:ne}]),ue=t(),re=t(!1),de=t({left:0,top:0}),ve=t(),ce=t("all"),pe=t(),me=t(),fe=t(),ge=t(""),we=t(!1),ye=t([]),ke=U(Ne,500),{state:he,unreadTotal:_e,filterable:xe,openSession:Ce,setUpdateSessionItem:Me,setCurrentSessionItem:Re}=D(),be=l((()=>Math.min(Math.max(ae.value,240),360))),je=l((()=>I(he.sessionList)));function De({distance:e}){ae.value=ae.value+e}function Ee(e,t=s(ce)){var l;return t===te||(t===le?ie.includes(e.sessionKey)||(null!=(l=e.unreadNum)?l:0)>0:t===ne?e.status===E.ENDED:void 0)}async function Le(e,t){try{if("topping"===e)return await L({id:t.id,topping:!(null==t?void 0:t.topping)}),void(he.id===t.id?Re({topping:!(null==t?void 0:t.topping)}):Me({...t,topping:!(null==t?void 0:t.topping)}));"remove"===e&&(await B({id:t.id,status:E.REMOVED}),he.id===t.id?Re({status:E.REMOVED}):Me({...t,status:E.REMOVED}))}catch(e){}}function Be(e){we.value=e,e||(ge.value="",fe.value=null,ye.value=[])}function Ie(e){var t,l,n,i,a;const o=null==(n=null==(l=null==(t=pe.value)?void 0:t.$datePicker)?void 0:l.panelInstRef)?void 0:n.$el;Be(!(!e.target||!(o&&o.contains(e.target)||(null==(i=me.value)?void 0:i.$el)&&(null==(a=me.value)?void 0:a.$el.contains(e.target)))))}function Te(e){fe.value=e,Ne()}function Ne(){ge.value||fe.value?ye.value=je.value.filter((e=>{const t=e.name.includes(ge.value);if(!fe.value)return t;const[l,n]=fe.value,i=new Date(e.createdTime);return t&&H(i,new Date(n+" 23:59:59"))&&z(i,new Date(l+" 00:00:00"))})):ye.value=[]}return(e,t)=>n((i(),a("section",{class:"sider-list",style:o({width:s(be)+"px"})},[s(xe)?(i(),a("div",K,[u(s(_),{raw:"","content-class":"search-content__sider",class:"search-wrapper",show:we.value,placement:"bottom-start","display-directive":"show","show-arrow":!1,onClickoutside:Ie},{trigger:r((()=>[u(s(x),{ref_key:"inputRef",ref:me,placeholder:"请输入名称模糊搜索",value:ge.value,"onUpdate:value":t[0]||(t[0]=e=>ge.value=e),onInput:s(ke),onClick:t[1]||(t[1]=()=>Be(!0))},{prefix:r((()=>[u(s(C),{component:s(V)},null,8,["component"])])),_:1},8,["value","onInput"])])),default:r((()=>{var e;return[u(s(S),{ref_key:"datePickerRef",ref:pe,"formatted-value":fe.value,type:"daterange",clearable:"","onUpdate:formattedValue":Te},null,8,["formatted-value"]),d("div",P,[(i(!0),a(v,null,c(ye.value,(e=>(i(),p(s($),{key:e.id,item:e,onItemClick:t[2]||(t[2]=()=>Be(!1))},null,8,["item"])))),128)),n(u(s(O),{config:{title:" ",content:(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.81"))||"找不到相关的结果"},type:"5"},null,512),[[m,ye.value.length<1]])])]})),_:1},8,["show"])])):f("v-if",!0),d("div",W,[(i(!0),a(v,null,c(se.value,(e=>(i(),p(s(M),{type:ce.value===e.key?"primary":"default",round:"",bordered:!1,key:e.key,onClick:()=>{return t=e.key,ce.value=t,void(t===le&&(ie=(je.value.filter((e=>{var t;return(null!=(t=e.unreadNum)?t:0)>0}))||[]).map((e=>e.sessionKey))));var t}},{default:r((()=>{return[g(w(e.label)+"("+w((t=e,t.key===ne?je.value.filter((e=>e.status===E.ENDED)).length:_e.value))+") ",1)];var t})),_:2},1032,["type","onClick"])))),128))]),d("div",{class:"sider-list__box",ref_key:"listBoxRef",ref:oe},[(i(!0),a(v,null,c(s(je),(e=>{var t;return i(),a(v,{key:e.id},[e.status!==s(E).REMOVED?n((i(),a("div",{key:0,onClick:()=>s(Ce)(e),onContextmenu:y((t=>async function(e,t){var l,n,i,a,o;ve.value=t,re.value=!0,await h();const{clientX:s,clientY:u}=e,{width:r=0,height:d=0,left:v=0,top:c=0}=(null==(l=oe.value)?void 0:l.getBoundingClientRect())||{},{width:p=100,height:m=80}=(null==(i=null==(n=ue.value)?void 0:n.$el)?void 0:i.getBoundingClientRect())||{},f=null!=(o=null==(a=oe.value)?void 0:a.scrollTop)?o:0,g={};s<v+r-(p+2)-5?g.left=s-v+5+"px":g.right=v+r-s+5+"px",c+d-u<=m+5?g.bottom=5-f+"px":g.top=u-c+f+5+"px",de.value=g}(t,e.id)),["prevent"]),class:k(["sider-list__box__item",{active:e.id===s(he).id},e.topping?"sider-list__box__item--top":""])},[u(s(R),{round:"",size:"large",src:e.avatar},null,8,["src"]),d("div",X,[d("div",Y,[d("h4",null,w(e.name),1),d("span",null,w(e.lastMessage?s(T)(e.lastMessageSendTime).siderMsgTime:""),1)]),d("div",q,[d("div",F,["WITHDRAWN"===e.lastMessageStatus?(i(),a("div",G,(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.68"))||"撤回了一条消息")):(i(),a("div",{key:1,innerHTML:e.lastMessageContent},null,8,J))]),u(s(b),{value:e.unreadNum>99?"99+":e.unreadNum},null,8,["value"])])])],42,A)),[[m,Ee(e)]]):f("v-if",!0)],64)})),128)),u(s(j),{ref_key:"contextmenuRef",ref:ue,show:re.value,"onUpdate:show":t[3]||(t[3]=e=>re.value=e),type:"session",position:de.value,id:ve.value,onSelect:Le},null,8,["show","position","id"])],512)],4)),[[s(N),{mode:"VR",onMove:De}]])}});export{Q as default};
1
+ import{defineComponent as e,ref as t,computed as l,withDirectives as n,openBlock as i,createElementBlock as a,normalizeStyle as o,unref as s,createVNode as u,withCtx as r,createElementVNode as d,Fragment as v,renderList as c,createBlock as p,vShow as m,createCommentVNode as f,createTextVNode as g,toDisplayString as w,withModifiers as y,normalizeClass as h,nextTick as k}from"vue";import{NPopover as _,NInput as x,NIcon as C,NTag as b,NAvatar as R,NBadge as M}from"naive-ui";import D from"./ContextMenu.js";import{useData as j}from"../hooks/useData.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import{STATUS as E}from"../constants/index.js";import{toppingSessionApi as I,updateStatusApi as L}from"../api/index.js";import{listSort as B,isDoctorRole as T,getRoleName as N,formatTime as S}from"../utils/index.js";import"lodash-es";import"trtc-sdk-v5";import{vFlexibleResize as V}from"../../../../shared/directive/flexibleResize.js";import $ from"../../../date-picker/index.js";import{SearchOutline as O}from"@vicons/ionicons5";import U from"./userItemRender.js";import H from"../../../default-page/index.js";import{useDebounceFn as z}from"@vueuse/core";import{isBefore as K,isAfter as P}from"date-fns";const W={key:0,class:"sider-list__filter"},A={class:"user-list-wrapper"},X={class:"sider-list__tags box-shadow"},Y=["onClick","onContextmenu"],q={class:"avatar-right"},F={class:"name"},G={class:"chat-name"},J={class:"msg-tip"},Q={class:"msg-tip__content"},Z={key:0},ee=["innerHTML"];var te=e({__name:"SiderList",setup(e){var te,le,ne;const ie="all",ae="unread",oe="ended";let se=[];const ue=t(300),re=t(),de=t([{label:(null==(te=window.getLanguageByCode)?void 0:te.call(window,"10010.1.123"))||"全部",key:ie},{label:(null==(le=window.getLanguageByCode)?void 0:le.call(window,"10010.1.124"))||"未读",key:ae},{label:(null==(ne=window.getLanguageByCode)?void 0:ne.call(window,"10010.1.77"))||"结束",key:oe}]),ve=t(),ce=t(!1),pe=t({left:0,top:0}),me=t(),fe=t("all"),ge=t(),we=t(),ye=t(),he=t(""),ke=t(!1),_e=t([]),xe=z($e,500),{state:Ce,unreadTotal:be,filterable:Re,openSession:Me,setUpdateSessionItem:De,setCurrentSessionItem:je}=j(),Ee=l((()=>Math.min(Math.max(ue.value,240),360))),Ie=l((()=>B(Ce.sessionList)));function Le({distance:e}){ue.value=ue.value+e}function Be(e,t=s(fe)){var l;return t===ie||(t===ae?se.includes(e.sessionKey)||(null!=(l=e.unreadNum)?l:0)>0:t===oe?e.status===E.ENDED:void 0)}async function Te(e,t){try{if("topping"===e)return await I({id:t.id,topping:!(null==t?void 0:t.topping)}),void(Ce.id===t.id?je({topping:!(null==t?void 0:t.topping)}):De({...t,topping:!(null==t?void 0:t.topping)}));"remove"===e&&(await L({id:t.id,status:E.REMOVED}),Ce.id===t.id?je({status:E.REMOVED}):De({...t,status:E.REMOVED}))}catch(e){}}function Ne(e){ke.value=e,e||(he.value="",ye.value=null,_e.value=[])}function Se(e){var t,l,n,i,a;const o=null==(n=null==(l=null==(t=ge.value)?void 0:t.$datePicker)?void 0:l.panelInstRef)?void 0:n.$el;Ne(!(!e.target||!(o&&o.contains(e.target)||(null==(i=we.value)?void 0:i.$el)&&(null==(a=we.value)?void 0:a.$el.contains(e.target)))))}function Ve(e){ye.value=e,$e()}function $e(){he.value||ye.value?_e.value=Ie.value.filter((e=>{const t=e.name.includes(he.value);if(!ye.value)return t;const[l,n]=ye.value,i=new Date(e.createdTime);return t&&K(i,new Date(n+" 23:59:59"))&&P(i,new Date(l+" 00:00:00"))})):_e.value=[]}return(e,t)=>n((i(),a("section",{class:"sider-list",style:o({width:s(Ee)+"px"})},[s(Re)?(i(),a("div",W,[u(s(_),{raw:"","content-class":"search-content__sider",class:"search-wrapper",show:ke.value,placement:"bottom-start","display-directive":"show","show-arrow":!1,onClickoutside:Se},{trigger:r((()=>[u(s(x),{ref_key:"inputRef",ref:we,placeholder:"请输入名称模糊搜索",value:he.value,"onUpdate:value":t[0]||(t[0]=e=>he.value=e),onInput:s(xe),onClick:t[1]||(t[1]=()=>Ne(!0))},{prefix:r((()=>[u(s(C),{component:s(O)},null,8,["component"])])),_:1},8,["value","onInput"])])),default:r((()=>{var e;return[u(s($),{ref_key:"datePickerRef",ref:ge,"formatted-value":ye.value,type:"daterange",clearable:"","onUpdate:formattedValue":Ve},null,8,["formatted-value"]),d("div",A,[(i(!0),a(v,null,c(_e.value,(e=>(i(),p(s(U),{key:e.id,item:e,onItemClick:t[2]||(t[2]=()=>Ne(!1))},null,8,["item"])))),128)),n(u(s(H),{config:{title:" ",content:(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.81"))||"找不到相关的结果"},type:"5"},null,512),[[m,_e.value.length<1]])])]})),_:1},8,["show"])])):f("v-if",!0),d("div",X,[(i(!0),a(v,null,c(de.value,(e=>(i(),p(s(b),{type:fe.value===e.key?"primary":"default",round:"",bordered:!1,key:e.key,onClick:()=>{return t=e.key,fe.value=t,void(t===ae&&(se=(Ie.value.filter((e=>{var t;return(null!=(t=e.unreadNum)?t:0)>0}))||[]).map((e=>e.sessionKey))));var t}},{default:r((()=>{return[g(w(e.label)+"("+w((t=e,t.key===oe?Ie.value.filter((e=>e.status===E.ENDED)).length:be.value))+") ",1)];var t})),_:2},1032,["type","onClick"])))),128))]),d("div",{class:"sider-list__box",ref_key:"listBoxRef",ref:re},[(i(!0),a(v,null,c(s(Ie),(e=>{var t;return i(),a(v,{key:e.id},[e.status!==s(E).REMOVED?n((i(),a("div",{key:0,onClick:()=>s(Me)(e),onContextmenu:y((t=>async function(e,t){var l,n,i,a,o;me.value=t,ce.value=!0,await k();const{clientX:s,clientY:u}=e,{width:r=0,height:d=0,left:v=0,top:c=0}=(null==(l=re.value)?void 0:l.getBoundingClientRect())||{},{width:p=100,height:m=80}=(null==(i=null==(n=ve.value)?void 0:n.$el)?void 0:i.getBoundingClientRect())||{},f=null!=(o=null==(a=re.value)?void 0:a.scrollTop)?o:0,g={};s<v+r-(p+2)-5?g.left=s-v+5+"px":g.right=v+r-s+5+"px",c+d-u<=m+5?g.bottom=5-f+"px":g.top=u-c+f+5+"px",pe.value=g}(t,e.id)),["prevent"]),class:h(["sider-list__box__item",{active:e.id===s(Ce).id},e.topping?"sider-list__box__item--top":""])},[u(s(R),{round:"",size:"large",src:e.avatar},null,8,["src"]),d("div",q,[d("div",F,[d("h4",null,[d("label",G,w(e.name),1),n(d("label",{class:h(["iho-chatRole",s(T)(e.roleInfo)?"isDoctor":""])},w(s(N)(e.roleInfo)),3),[[m,s(N)(e.roleInfo)]])]),d("span",null,w(e.lastMessage?s(S)(e.lastMessageSendTime).siderMsgTime:""),1)]),d("div",J,[d("div",Q,["WITHDRAWN"===e.lastMessageStatus?(i(),a("div",Z,(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.68"))||"撤回了一条消息")):(i(),a("div",{key:1,innerHTML:e.lastMessageContent},null,8,ee))]),u(s(M),{value:e.unreadNum>99?"99+":e.unreadNum},null,8,["value"])])])],42,Y)),[[m,Be(e)]]):f("v-if",!0)],64)})),128)),u(s(D),{ref_key:"contextmenuRef",ref:ve,show:ce.value,"onUpdate:show":t[3]||(t[3]=e=>ce.value=e),type:"session",position:pe.value,id:me.value,onSelect:Te},null,8,["show","position","id"])],512)],4)),[[s(V),{mode:"VR",onMove:Le}]])}});export{te as default};
@@ -17,8 +17,8 @@ export declare enum MESSAGE_TYPE {
17
17
  BLEND = "BLEND",
18
18
  FORWARD = "FORWARD",
19
19
  QUICK_REPLY = "QUICK_REPLY",
20
- AUDIO = "AUDIO",
21
- VIDEO = "VIDEO",
20
+ AUDIO = "AUDIO",// 语音通话
21
+ VIDEO = "VIDEO",// 视频通话
22
22
  EVENT = "EVENT"
23
23
  }
24
24
  /**
@@ -52,3 +52,10 @@ export declare enum STATUS {
52
52
  ENABLED = "ENABLED",
53
53
  ENDED = "ENDED"
54
54
  }
55
+ /**
56
+ * 角色枚举
57
+ */
58
+ export declare enum ROLE_TYPE {
59
+ DOCTOR = "DOCTOR",
60
+ PATIENT = "PATIENT"
61
+ }
@@ -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.EVENT="EVENT",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
+ 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.EVENT="EVENT",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||{}),I=(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))(I||{}),L=(E=>(E.REMOVED="REMOVED",E.ENABLED="ENABLED",E.ENDED="ENDED",E))(L||{}),N=(E=>(E.DOCTOR="DOCTOR",E.PATIENT="PATIENT",E))(N||{});export{I as AV_STATUS,E as CHAT_TYPE,S as MESSAGE_TYPE,N as ROLE_TYPE,L as STATUS,A as SUBSCRIBE_MESSAGE_TYPE};
@@ -0,0 +1,11 @@
1
+ import { Ref } from 'vue';
2
+ import { AnyFn, AnyObject } from '../../../../shared/types';
3
+ export declare function useSearchPatientList({ wrapperRef, keywordRef, before, after }: {
4
+ wrapperRef: Ref<HTMLElement>;
5
+ keywordRef: Ref<string>;
6
+ before?: AnyFn;
7
+ after?: AnyFn;
8
+ }): {
9
+ patientList: Ref<AnyObject[]>;
10
+ handlePatientInput: () => void;
11
+ };
@@ -0,0 +1 @@
1
+ import{ref as e}from"vue";import{isArray as o}from"lodash-es";import{listPatientApi as r}from"../api/index.js";import{useDebounceFn as t}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 s}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=t((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 t=await r({orgId:c.orgId,keyword:e,page:m.page,pageSize:15});o(t.records)&&d.value.length<=+t.total&&(d.value=m.page>1?d.value.concat(t.records):t.records,null==u||u(),d.value.length>=+t.total&&(m.hasMore=!1))}return s(i,(()=>{f()})),{patientList:d,handlePatientInput:l}}export{i as useSearchPatientList};
@@ -1 +1 @@
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
+ 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=10}=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};
@@ -16,3 +16,9 @@ export declare function isAudioOrVideoMessage(message: AnyObject): boolean;
16
16
  export declare function formatSeconds(seconds: number): string;
17
17
  export declare function isGroup(session: AnyObject): boolean;
18
18
  export declare function getForwardTitle(content: AnyObject): string | undefined;
19
+ export declare function isDoctorRole(type: string): boolean;
20
+ export declare function getRoleName(type: string): string;
21
+ export declare function getFileDetails(msg: string, type: string): any;
22
+ export declare function getFileType(msg: string): string;
23
+ export declare function getDetail(item: AnyObject, isShowSize?: boolean): string;
24
+ export declare function showAudioAndVideoRecord(chatMessageType: string): "语音通话" | "视频通话";
@@ -1 +1 @@
1
- import{isToday as e,format as t,isYesterday as n,startOfDay as r}from"date-fns";import{cloneDeep as o,isNumber as a,isNaN as i,isArray as s,uniqBy as l}from"lodash-es";import{MESSAGE_TYPE as c,CHAT_TYPE as u}from"../constants/index.js";import{emojis as d}from"./emoji.js";import{uuidGenerator as g}from"../../../../shared/utils/index.js";import{createDiscreteApi as m}from"naive-ui";const{message:p}=m(["message"]);function w(r){var o;const a=new Date(r);let i,s;if(e(a))i=s=t(a,"HH:mm");else{i=n(a)?(null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.132"))||"昨天":t(a,"MM-dd");const e=a.getFullYear(),r=(new Date).getFullYear();s=t(a,e<r?"yyyy年M月d日 HH:mm":"M月d日 HH:mm")}return{siderMsgTime:i,msgTime:s,recordTime:function(r){var o,a,i,s;const l=new Date(r),c=Date.now()-l.getTime();if(c<6e4)return(null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.133"))||"刚刚";if(c<36e5)return Math.ceil(c/1e3/60)+((null==(a=window.getLanguageByCode)?void 0:a.call(window,"10010.1.136"))||"分钟前");if(e(l))return((null==(i=window.getLanguageByCode)?void 0:i.call(window,"10010.1.134"))||"今天")+t(l,"HH:mm");if(n(l))return((null==(s=window.getLanguageByCode)?void 0:s.call(window,"10010.1.132"))||"昨天")+t(l,"HH:mm");{const e=l.getFullYear(),n=(new Date).getFullYear();return t(l,e<n?"yyyy年M月d日 HH:mm":"M月d日 HH:mm")}}(r)}}function f(e){return o(e||[]).sort(((e,t)=>e.topping&&!t.topping?-1:!e.topping&&t.topping?1:new Date(t.sortTime).getTime()-new Date(e.sortTime).getTime()))}function y(e){if(!(null==e?void 0:e.msg))return"";const{chatMessageType:t="",msg:n=""}=e;let r=n.toString();if(t===c.BLEND){const e=r.match(/\[([^\]]+)\]/g);return null==e||e.forEach((e=>{const n=e.match(/\[([^\]]+)\]/);if(n&&n.length>1){const o=d.findEmoji(n[1]);o&&(r=r.replace(e,`<img data-msg=${n[1]} data-type=${t} class="emoji--min" src=${o} />`))}})),r}if(t===c.TEXT){const e=e=>new RegExp("\\n*\\["+(e||"")+"(code|pre|div|span|p|table|thead|th|tbody|tr|td|ul|li|ol|li|dl|dt|dd|h2|h3|h4|h5)([\\s\\S]*?)]\\n*","g");return r=r.replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&#39;").replace(/"/g,"&quot;").replace(/@(\S+)(\s+?|$)/g,'@<a href="javascript:;">$1</a>$2').replace(e(),"<$1 $2>").replace(e("/"),"</$1>").replace(/\n/g,"<br>"),r}return n}function h(e){var t,n;if(e&&a(+e)&&!i(+e)){const n=L(+e),r=n.split(":");let o=n;return 3===r.length&&"00"===r[0]&&(o=`${r[1]}:${r[2]}`),((null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.137"))||"通话时长")+o}return(null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.138"))||"已取消"}function v(e){var t;if(!e)return"";const{chatMessageType:n,msg:r,messageTemplate:o}=e,a=E(e)?h(r):"";switch(n){case c.TEXT:return y(e);case c.IMAGE:return"[图片]";case c.FILE:return"[文件]";case c.EMOJI:return`<img class="emoji--min" alt=${r} src=${d.findEmoji(r)}>`;case c.TEMPLATE:return null==(t=null==o?void 0:o.setting)?void 0:t.title;case c.VIDEO:return`[视频通话]${a}`;case c.AUDIO:return`[语音通话]${a}`;default:return"[消息]"}}function T(e,t){const n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="blob",n.onload=function(e){if(200===n.status){const e=window.URL.createObjectURL(n.response),r=document.createElement("a");r.href=e,r.download=t,r.dispatchEvent(new MouseEvent("click")),window.URL.revokeObjectURL(e)}},n.send()}function H(e){return new Promise(((t,n)=>{const r=new XMLHttpRequest;r.open("HEAD",e,!0),r.onreadystatechange=()=>{var e;if(4===r.readyState&&200===r.status){let n=null!=(e=r.getResponseHeader("Content-Length"))?e:0;const o=+n;o>1048576?n=(o/1048576).toFixed(2)+"M":o>1024?n=(o/1024).toFixed(2)+"K":n+="B",t(n)}},r.send()}))}async function M(e){try{const t=await fetch(e),n=await t.blob();return new File([n],`${g()}.${n.type.split("/")[1]}`,{type:n.type})}catch(e){return}}function E(e){return e&&[c.AUDIO,c.VIDEO].includes(e.chatMessageType)}function L(e){const n=r(new Date);return n.setSeconds(e),t(n,"HH:mm:ss")}function $(e){return e.chatType===u.GROUP}function D(e){if(!s(null==e?void 0:e.forwardMessageList))return;const t=l(e.forwardMessageList,"sender").map((e=>e.senderName)),n="的聊天记录";return t.length>2?"群聊的聊天记录":1===t.length?t[0]+n:t[0]+"和"+t[1]+n}export{p as $message,M as base64ToFile,T as downloadFile,L as formatSeconds,w as formatTime,h as getAVTime,H as getFileSize,D as getForwardTitle,E as isAudioOrVideoMessage,$ as isGroup,f as listSort,v as simplifyMessage,y as transformMessage};
1
+ import{isToday as e,format as n,isYesterday as t,startOfDay as r}from"date-fns";import{cloneDeep as o,isNumber as a,isNaN as i,isArray as s,uniqBy as c}from"lodash-es";import{MESSAGE_TYPE as l,CHAT_TYPE as u,ROLE_TYPE as d}from"../constants/index.js";import{emojis as g}from"./emoji.js";import{uuidGenerator as m}from"../../../../shared/utils/index.js";import{createDiscreteApi as w}from"naive-ui";const{message:p}=w(["message"]);function f(r){var o;const a=new Date(r);let i,s;if(e(a))i=s=n(a,"HH:mm");else{i=t(a)?(null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.132"))||"昨天":n(a,"MM-dd");const e=a.getFullYear(),r=(new Date).getFullYear();s=n(a,e<r?"yyyy年M月d日 HH:mm":"M月d日 HH:mm")}return{siderMsgTime:i,msgTime:s,recordTime:function(r){var o,a,i,s;const c=new Date(r),l=Date.now()-c.getTime();if(l<6e4)return(null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.133"))||"刚刚";if(l<36e5)return Math.ceil(l/1e3/60)+((null==(a=window.getLanguageByCode)?void 0:a.call(window,"10010.1.136"))||"分钟前");if(e(c))return((null==(i=window.getLanguageByCode)?void 0:i.call(window,"10010.1.134"))||"今天")+n(c,"HH:mm");if(t(c))return((null==(s=window.getLanguageByCode)?void 0:s.call(window,"10010.1.132"))||"昨天")+n(c,"HH:mm");{const e=c.getFullYear(),t=(new Date).getFullYear();return n(c,e<t?"yyyy年M月d日 HH:mm":"M月d日 HH:mm")}}(r)}}function y(e){return o(e||[]).sort(((e,n)=>e.topping&&!n.topping?-1:!e.topping&&n.topping?1:new Date(n.sortTime).getTime()-new Date(e.sortTime).getTime()))}function h(e){if(!(null==e?void 0:e.msg))return"";const{chatMessageType:n="",msg:t=""}=e;let r=t.toString();if(n===l.BLEND){const e=r.match(/\[([^\]]+)\]/g);return null==e||e.forEach((e=>{const t=e.match(/\[([^\]]+)\]/);if(t&&t.length>1){const o=g.findEmoji(t[1]);o&&(r=r.replace(e,`<img data-msg=${t[1]} data-type=${n} class="emoji--min" src=${o} />`))}})),r}if(n===l.TEXT){const e=e=>new RegExp("\\n*\\["+(e||"")+"(code|pre|div|span|p|table|thead|th|tbody|tr|td|ul|li|ol|li|dl|dt|dd|h2|h3|h4|h5)([\\s\\S]*?)]\\n*","g");return r=r.replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&#39;").replace(/"/g,"&quot;").replace(/@(\S+)(\s+?|$)/g,'@<a href="javascript:;">$1</a>$2').replace(e(),"<$1 $2>").replace(e("/"),"</$1>").replace(/\n/g,"<br>"),r}return t}function v(e){var n,t;if(e&&a(+e)&&!i(+e)){const t=E(+e),r=t.split(":");let o=t;return 3===r.length&&"00"===r[0]&&(o=`${r[1]}:${r[2]}`),((null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.137"))||"通话时长")+o}return(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.138"))||"已取消"}function T(e){var n;if(!e)return"";const{chatMessageType:t,msg:r,messageTemplate:o}=e,a=$(e)?v(r):"";switch(t){case l.TEXT:return h(e);case l.IMAGE:return"[图片]";case l.FILE:return"[文件]";case l.EMOJI:return`<img class="emoji--min" alt=${r} src=${g.findEmoji(r)}>`;case l.TEMPLATE:return null==(n=null==o?void 0:o.setting)?void 0:n.title;case l.VIDEO:return`[视频通话]${a}`;case l.AUDIO:return`[语音通话]${a}`;default:return"[消息]"}}function H(e,n){const t=new XMLHttpRequest;t.open("GET",e,!0),t.responseType="blob",t.onload=function(e){if(200===t.status){const e=window.URL.createObjectURL(t.response),r=document.createElement("a");r.href=e,r.download=n,r.dispatchEvent(new MouseEvent("click")),window.URL.revokeObjectURL(e)}},t.send()}function L(e){return new Promise(((n,t)=>{const r=new XMLHttpRequest;r.open("HEAD",e,!0),r.onreadystatechange=()=>{var e;if(4===r.readyState&&200===r.status){let t=null!=(e=r.getResponseHeader("Content-Length"))?e:0;const o=+t;o>1048576?t=(o/1048576).toFixed(2)+"M":o>1024?t=(o/1024).toFixed(2)+"K":t+="B",n(t)}},r.send()}))}async function M(e){try{const n=await fetch(e),t=await n.blob();return new File([t],`${m()}.${t.type.split("/")[1]}`,{type:t.type})}catch(e){return}}function $(e){return e&&[l.AUDIO,l.VIDEO].includes(e.chatMessageType)}function E(e){const t=r(new Date);return t.setSeconds(e),n(t,"HH:mm:ss")}function D(e){return e.chatType===u.GROUP}function O(e){if(!s(null==e?void 0:e.forwardMessageList))return;const n=c(e.forwardMessageList,"sender").map((e=>e.senderName)),t="的聊天记录";return n.length>2?"群聊的聊天记录":1===n.length?n[0]+t:n[0]+"和"+n[1]+t}function C(e){return e===d.DOCTOR}function B(e){var n;let t="";switch(e){case d.DOCTOR:t="医护";break;case d.PATIENT:t=(null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.200"))||"患者"}return t}function j(e,n){try{const t=JSON.parse(e);return t?t[n]:""}catch(n){return e||""}}function R(e){const n=e.lastIndexOf(".");if(-1!==n){return e.charAt(n+1).toUpperCase()}return"?"}function b(e,t){const{size:r,sendTime:o,senderName:a}=e,i=`${n(new Date(o),"yyyy/MM/dd HH:mm")} ${a}`;return t?`${r} · ${i}`:i}function I(e){var n,t;return e===l.AUDIO?(null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.57"))||"语音通话":(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.59"))||"视频通话"}export{p as $message,M as base64ToFile,H as downloadFile,E as formatSeconds,f as formatTime,v as getAVTime,b as getDetail,j as getFileDetails,L as getFileSize,R as getFileType,O as getForwardTitle,B as getRoleName,$ as isAudioOrVideoMessage,C as isDoctorRole,D as isGroup,y as listSort,I as showAudioAndVideoRecord,T as simplifyMessage,h as transformMessage};