cnhis-design-vue 3.3.1-beta.14 → 3.3.1-beta.17

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 (153) hide show
  1. package/es/components/ai-chat/index.d.ts +17 -17
  2. package/es/components/ai-chat/src/Index.vue.d.ts +17 -17
  3. package/es/components/ai-chat/src/Index.vue2.js +1 -1
  4. package/es/components/ai-chat/src/api/index.d.ts +1 -2
  5. package/es/components/ai-chat/src/api/index.js +1 -1
  6. package/es/components/ai-chat/src/components/ChatAudio.vue.d.ts +0 -1
  7. package/es/components/ai-chat/src/components/ChatAudio.vue2.js +1 -1
  8. package/es/components/ai-chat/src/components/ChatCard.js +1 -1
  9. package/es/components/ai-chat/src/components/ChatFooter.vue.d.ts +9 -11
  10. package/es/components/ai-chat/src/components/ChatFooter.vue2.js +1 -1
  11. package/es/components/ai-chat/src/components/ChatMain.js +1 -1
  12. package/es/components/ai-chat/src/components/ChatMainDefault.js +1 -0
  13. package/es/components/ai-chat/src/components/ChatRight.vue.d.ts +0 -2
  14. package/es/components/ai-chat/src/components/ChatRight.vue2.js +1 -1
  15. package/es/components/ai-chat/src/components/card/JsonCard.js +1 -1
  16. package/es/components/ai-chat/src/hooks/useWebsocket.js +1 -1
  17. package/es/components/ai-chat/style/index.css +1 -1
  18. package/es/components/audio-sdk/index.d.ts +304 -2
  19. package/es/components/audio-sdk/index.js +1 -1
  20. package/es/components/audio-sdk/src/Index.vue.d.ts +304 -0
  21. package/es/components/audio-sdk/src/Index.vue.js +1 -0
  22. package/es/components/audio-sdk/src/Index.vue2.js +1 -0
  23. package/es/components/audio-sdk/src/audioSDK.d.ts +5 -7
  24. package/es/components/audio-sdk/src/audioSDK.js +1 -1
  25. package/es/components/audio-sdk/src/components/form.vue.d.ts +51 -0
  26. package/es/components/audio-sdk/src/components/form.vue.js +1 -0
  27. package/es/components/audio-sdk/src/components/form.vue2.js +1 -0
  28. package/es/components/audio-sdk/src/components/recording-modal.vue.d.ts +91 -0
  29. package/es/components/audio-sdk/src/components/recording-modal.vue.js +1 -0
  30. package/es/components/audio-sdk/src/components/recording-modal.vue2.js +1 -0
  31. package/es/components/audio-sdk/src/components/recording.vue.d.ts +43 -4
  32. package/es/components/audio-sdk/src/components/recording.vue2.js +1 -1
  33. package/es/components/audio-sdk/src/utils/index.d.ts +4 -0
  34. package/es/components/audio-sdk/src/utils/index.js +1 -0
  35. package/es/components/audio-sdk/src/utils/recordingModal.d.ts +7 -4
  36. package/es/components/audio-sdk/src/utils/recordingModal.js +1 -1
  37. package/es/components/audio-sdk/style/index.css +1 -1
  38. package/es/components/callback/src/components/render/popupMaps.d.ts +7 -1
  39. package/es/components/date-picker/src/DatePicker.vue2.js +1 -1
  40. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -1
  41. package/es/components/field-editor/index.d.ts +7 -1
  42. package/es/components/field-editor/src/FieldEditor.vue.d.ts +7 -1
  43. package/es/components/form-config/index.d.ts +38 -3
  44. package/es/components/form-config/src/FormConfig.vue.d.ts +38 -3
  45. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +7 -1
  46. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +17 -1
  47. package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +8 -1
  48. package/es/components/form-render/index.d.ts +7 -1
  49. package/es/components/form-render/index.js +1 -1
  50. package/es/components/form-render/src/FormRender.vue.d.ts +7 -1
  51. package/es/components/form-render/src/FormRender.vue2.js +1 -1
  52. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +7 -1
  53. package/es/components/form-render/src/components/renderer/date.d.ts +2 -0
  54. package/es/components/form-render/src/components/renderer/date.js +1 -1
  55. package/es/components/form-render/src/components/renderer/formItem.d.ts +2 -0
  56. package/es/components/form-render/src/components/renderer/formItem.js +1 -1
  57. package/es/components/form-render/src/components/renderer/input.d.ts +5 -0
  58. package/es/components/form-render/src/components/renderer/input.js +1 -1
  59. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +14 -1
  60. package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +14 -1
  61. package/es/components/form-render/src/components/renderer/select.d.ts +5 -0
  62. package/es/components/form-render/src/components/renderer/select.js +1 -1
  63. package/es/components/form-render/src/components/tooltipMessage.vue.d.ts +12 -1
  64. package/es/components/form-render/src/components/tooltipMessage.vue2.js +1 -1
  65. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  66. package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +4 -0
  67. package/es/components/form-render/src/types/fieldItem.d.ts +1 -0
  68. package/es/components/form-render/src/types/index.d.ts +2 -0
  69. package/es/components/form-render/src/utils/index.d.ts +1 -0
  70. package/es/components/form-render/src/utils/index.js +1 -1
  71. package/es/components/form-render/style/index.css +1 -1
  72. package/es/components/iho-chat/index.d.ts +56 -0
  73. package/es/components/iho-chat/src/Index.vue.d.ts +56 -0
  74. package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +7 -0
  75. package/es/components/iho-chat/src/components/ChatAdd.vue2.js +1 -1
  76. package/es/components/iho-chat/src/components/ChatFile.vue.d.ts +7 -0
  77. package/es/components/iho-chat/src/components/ChatFile.vue2.js +1 -1
  78. package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +6 -0
  79. package/es/components/iho-chat/src/components/ChatFooter.vue2.js +1 -1
  80. package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +27 -0
  81. package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +7 -0
  82. package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
  83. package/es/components/iho-chat/src/components/ChatRecord.vue.d.ts +7 -1
  84. package/es/components/iho-chat/src/components/ChatRecord.vue2.js +1 -1
  85. package/es/components/iho-chat/src/components/ChatSearch.vue2.js +1 -1
  86. package/es/components/iho-chat/src/components/ChatSet.vue.d.ts +9 -0
  87. package/es/components/iho-chat/src/components/ChatSet.vue2.js +1 -1
  88. package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +6 -0
  89. package/es/components/iho-chat/src/components/PersonProfile.vue.d.ts +3 -0
  90. package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
  91. package/es/components/iho-chat/src/components/SiderList.vue.d.ts +3 -1
  92. package/es/components/iho-chat/src/components/SiderList.vue2.js +1 -1
  93. package/es/components/iho-chat/src/constants/index.d.ts +7 -0
  94. package/es/components/iho-chat/src/constants/index.js +1 -1
  95. package/es/components/iho-chat/src/utils/index.d.ts +2 -0
  96. package/es/components/iho-chat/src/utils/index.js +1 -1
  97. package/es/components/iho-chat/style/index.css +1 -1
  98. package/es/components/iho-table/index.d.ts +3 -0
  99. package/es/components/iho-table/index.js +1 -1
  100. package/es/components/iho-table/src/IhoTable.vue2.js +1 -1
  101. package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +1 -1
  102. package/es/components/iho-table/src/hooks/tapHooks/index.js +1 -1
  103. package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.d.ts +3 -3
  104. package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.js +1 -1
  105. package/es/components/iho-table/src/hooks/useTablePlugin.js +1 -1
  106. package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +1 -1
  107. package/es/components/iho-table/src/plugins/headerPlugin/index.d.ts +1 -1
  108. package/es/components/iho-table/src/plugins/headerPlugin/index.js +1 -1
  109. package/es/components/iho-table/src/plugins/highLightSetPlugin.js +1 -1
  110. package/es/components/iho-table/src/plugins/index.d.ts +79 -3
  111. package/es/components/iho-table/src/plugins/index.js +1 -1
  112. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useSelectOption.d.ts +7 -0
  113. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useSelectOption.js +1 -1
  114. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
  115. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.d.ts +1 -2
  116. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js +1 -1
  117. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -1
  118. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/checkRendererPlugin.js +1 -1
  119. package/es/components/iho-table/src/plugins/stickyFixedPlugin.js +1 -1
  120. package/es/components/iho-table/src/plugins/varialbleHeightPlugin.js +1 -1
  121. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/utils.js +1 -1
  122. package/es/components/iho-table/src/types/index.d.ts +1 -0
  123. package/es/components/iho-table/src/types/pluginType.d.ts +2 -2
  124. package/es/components/iho-table/src/utils/index.js +1 -1
  125. package/es/components/index.css +1 -1
  126. package/es/components/index.d.ts +2 -1
  127. package/es/components/index.js +1 -1
  128. package/es/components/info-header/index.d.ts +24 -2
  129. package/es/components/info-header/src/InfoHeader.vue.d.ts +24 -2
  130. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +2 -0
  131. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +2 -0
  132. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +9 -1
  133. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +7 -1
  134. package/es/components/scale-view/index.d.ts +3 -2
  135. package/es/components/scale-view/src/ScaleView.vue.d.ts +3 -2
  136. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  137. package/es/components/scale-view/src/hooks/scaleview-init.d.ts +3 -1
  138. package/es/components/scale-view/src/hooks/scaleview-init.js +1 -1
  139. package/es/components/scale-view/src/hooks/use-component.d.ts +1 -2189
  140. package/es/components/shortcut-setter/index.d.ts +8 -1
  141. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +8 -1
  142. package/es/shared/components/ArrowIcon/ArrowIcon.vue.js +1 -0
  143. package/es/shared/components/ArrowIcon/index.d.ts +2 -0
  144. package/es/shared/components/ArrowIcon/index.js +1 -0
  145. package/es/shared/components/DateIcon/DateIcon.vue.js +1 -0
  146. package/es/shared/components/DateIcon/index.d.ts +2 -0
  147. package/es/shared/components/DateIcon/index.js +1 -0
  148. package/es/shared/package.json.js +1 -1
  149. package/package.json +2 -2
  150. package/es/components/ai-chat/src/components/ChatMainInner.js +0 -1
  151. package/es/components/ai-chat/src/hooks/useProgram.d.ts +0 -6
  152. package/es/components/ai-chat/src/hooks/useProgram.js +0 -1
  153. /package/es/components/ai-chat/src/components/{ChatMainInner.d.ts → ChatMainDefault.d.ts} +0 -0
@@ -328,6 +328,8 @@ declare const _default: import("vue").DefineComponent<{
328
328
  beforeUnmount(el: any): void;
329
329
  };
330
330
  formatTime: typeof import("./utils").formatTime;
331
+ isDoctorRole: typeof import("./utils").isDoctorRole;
332
+ getRoleName: typeof import("./utils").getRoleName;
331
333
  STATUS: typeof import("./constants").STATUS;
332
334
  CDatePicker: import("../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{
333
335
  updateUnchangedValue: {
@@ -751,6 +753,7 @@ declare const _default: import("vue").DefineComponent<{
751
753
  remark: import("vue").Ref<string>;
752
754
  currentTab: import("vue").Ref<AnyObject[]>;
753
755
  breadcrumbList: import("vue").Ref<AnyObject[]>;
756
+ breadcrumbRef: import("vue").Ref<any>;
754
757
  userList: import("vue").Ref<AnyObject[]>;
755
758
  handleInput: () => void;
756
759
  _disabledIds: import("vue").ComputedRef<any[]>;
@@ -759,18 +762,21 @@ declare const _default: import("vue").DefineComponent<{
759
762
  name: any;
760
763
  avatar: any;
761
764
  chatType: any;
765
+ roleInfo: any;
762
766
  }[]>;
763
767
  friends: import("vue").ComputedRef<{
764
768
  id: any;
765
769
  name: any;
766
770
  avatar: any;
767
771
  chatType: any;
772
+ roleInfo: any;
768
773
  }[]>;
769
774
  groups: import("vue").ComputedRef<{
770
775
  id: any;
771
776
  name: any;
772
777
  avatar: any;
773
778
  chatType: any;
779
+ roleInfo: any;
774
780
  }[]>;
775
781
  checkedIds: import("vue").ComputedRef<any[]>;
776
782
  btnDisabled: import("vue").ComputedRef<boolean>;
@@ -808,6 +814,8 @@ declare const _default: import("vue").DefineComponent<{
808
814
  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<{}>>, {}>;
809
815
  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<{}>>, {}>;
810
816
  last: <T>(array: import("lodash").List<T> | null | undefined) => T | undefined;
817
+ isDoctorRole: typeof import("./utils").isDoctorRole;
818
+ getRoleName: typeof import("./utils").getRoleName;
811
819
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
812
820
  title: {
813
821
  type: StringConstructor;
@@ -841,6 +849,8 @@ declare const _default: import("vue").DefineComponent<{
841
849
  mode: string;
842
850
  disabledIds: string[];
843
851
  }>;
852
+ isDoctorRole: typeof import("./utils").isDoctorRole;
853
+ getRoleName: typeof import("./utils").getRoleName;
844
854
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
845
855
  ChatFile: import("vue").DefineComponent<{
846
856
  type: {
@@ -913,6 +923,7 @@ declare const _default: import("vue").DefineComponent<{
913
923
  }[];
914
924
  resetAndSearch: () => void;
915
925
  title: import("vue").ComputedRef<"聊天图片" | "聊天文件">;
926
+ getFileDetails: (msg: string, type: string) => any;
916
927
  getDetail: (item: AnyObject) => string;
917
928
  getFileType: (item: AnyObject) => any;
918
929
  NModal: any;
@@ -1022,6 +1033,7 @@ declare const _default: import("vue").DefineComponent<{
1022
1033
  remark: import("vue").Ref<string>;
1023
1034
  currentTab: import("vue").Ref<AnyObject[]>;
1024
1035
  breadcrumbList: import("vue").Ref<AnyObject[]>;
1036
+ breadcrumbRef: import("vue").Ref<any>;
1025
1037
  userList: import("vue").Ref<AnyObject[]>;
1026
1038
  handleInput: () => void;
1027
1039
  _disabledIds: import("vue").ComputedRef<any[]>;
@@ -1030,18 +1042,21 @@ declare const _default: import("vue").DefineComponent<{
1030
1042
  name: any;
1031
1043
  avatar: any;
1032
1044
  chatType: any;
1045
+ roleInfo: any;
1033
1046
  }[]>;
1034
1047
  friends: import("vue").ComputedRef<{
1035
1048
  id: any;
1036
1049
  name: any;
1037
1050
  avatar: any;
1038
1051
  chatType: any;
1052
+ roleInfo: any;
1039
1053
  }[]>;
1040
1054
  groups: import("vue").ComputedRef<{
1041
1055
  id: any;
1042
1056
  name: any;
1043
1057
  avatar: any;
1044
1058
  chatType: any;
1059
+ roleInfo: any;
1045
1060
  }[]>;
1046
1061
  checkedIds: import("vue").ComputedRef<any[]>;
1047
1062
  btnDisabled: import("vue").ComputedRef<boolean>;
@@ -1079,6 +1094,8 @@ declare const _default: import("vue").DefineComponent<{
1079
1094
  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<{}>>, {}>;
1080
1095
  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<{}>>, {}>;
1081
1096
  last: <T>(array: import("lodash").List<T> | null | undefined) => T | undefined;
1097
+ isDoctorRole: typeof import("./utils").isDoctorRole;
1098
+ getRoleName: typeof import("./utils").getRoleName;
1082
1099
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1083
1100
  title: {
1084
1101
  type: StringConstructor;
@@ -1167,6 +1184,7 @@ declare const _default: import("vue").DefineComponent<{
1167
1184
  };
1168
1185
  isForward: boolean;
1169
1186
  };
1187
+ cssVars: import("vue").ComputedRef<AnyObject>;
1170
1188
  recordRef: import("vue").Ref<any>;
1171
1189
  recordList: import("vue").Ref<AnyObject[]>;
1172
1190
  keyword: import("vue").Ref<any>;
@@ -1179,6 +1197,9 @@ declare const _default: import("vue").DefineComponent<{
1179
1197
  hasMore: boolean;
1180
1198
  lastSendTime: string;
1181
1199
  };
1200
+ getFileDetails: (msg: string, type: string) => any;
1201
+ getDetail: (item: AnyObject) => string;
1202
+ getFileType: (msg: string) => string;
1182
1203
  handleSearch: () => Promise<void>;
1183
1204
  resetAndSearch: () => void;
1184
1205
  startDateDisabled: (ts: number) => boolean;
@@ -1325,6 +1346,8 @@ declare const _default: import("vue").DefineComponent<{
1325
1346
  holidays: Date[];
1326
1347
  }>>;
1327
1348
  formatTime: typeof import("./utils").formatTime;
1349
+ isDoctorRole: typeof import("./utils").isDoctorRole;
1350
+ getRoleName: typeof import("./utils").getRoleName;
1328
1351
  MESSAGE_TYPE: typeof import("./constants").MESSAGE_TYPE;
1329
1352
  emojis: {
1330
1353
  default: string[][];
@@ -1434,6 +1457,7 @@ declare const _default: import("vue").DefineComponent<{
1434
1457
  remark: import("vue").Ref<string>;
1435
1458
  currentTab: import("vue").Ref<AnyObject[]>;
1436
1459
  breadcrumbList: import("vue").Ref<AnyObject[]>;
1460
+ breadcrumbRef: import("vue").Ref<any>;
1437
1461
  userList: import("vue").Ref<AnyObject[]>;
1438
1462
  handleInput: () => void;
1439
1463
  _disabledIds: import("vue").ComputedRef<any[]>;
@@ -1442,18 +1466,21 @@ declare const _default: import("vue").DefineComponent<{
1442
1466
  name: any;
1443
1467
  avatar: any;
1444
1468
  chatType: any;
1469
+ roleInfo: any;
1445
1470
  }[]>;
1446
1471
  friends: import("vue").ComputedRef<{
1447
1472
  id: any;
1448
1473
  name: any;
1449
1474
  avatar: any;
1450
1475
  chatType: any;
1476
+ roleInfo: any;
1451
1477
  }[]>;
1452
1478
  groups: import("vue").ComputedRef<{
1453
1479
  id: any;
1454
1480
  name: any;
1455
1481
  avatar: any;
1456
1482
  chatType: any;
1483
+ roleInfo: any;
1457
1484
  }[]>;
1458
1485
  checkedIds: import("vue").ComputedRef<any[]>;
1459
1486
  btnDisabled: import("vue").ComputedRef<boolean>;
@@ -1491,6 +1518,8 @@ declare const _default: import("vue").DefineComponent<{
1491
1518
  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<{}>>, {}>;
1492
1519
  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<{}>>, {}>;
1493
1520
  last: <T>(array: import("lodash").List<T> | null | undefined) => T | undefined;
1521
+ isDoctorRole: typeof import("./utils").isDoctorRole;
1522
+ getRoleName: typeof import("./utils").getRoleName;
1494
1523
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1495
1524
  title: {
1496
1525
  type: StringConstructor;
@@ -1595,6 +1624,7 @@ declare const _default: import("vue").DefineComponent<{
1595
1624
  renderToolbar: ({ nodes }: import("naive-ui").ImageRenderToolbarProps) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
1596
1625
  [key: string]: any;
1597
1626
  }>[];
1627
+ formatImage: (obj: string | AnyObject, type: string) => any;
1598
1628
  getHistoryRecord: () => Promise<void>;
1599
1629
  handleSelectLabel: (event: MouseEvent, msgId: string) => void;
1600
1630
  handleContextmenu: (event: MouseEvent, msgId: string) => Promise<void>;
@@ -2006,6 +2036,7 @@ declare const _default: import("vue").DefineComponent<{
2006
2036
  remark: import("vue").Ref<string>;
2007
2037
  currentTab: import("vue").Ref<AnyObject[]>;
2008
2038
  breadcrumbList: import("vue").Ref<AnyObject[]>;
2039
+ breadcrumbRef: import("vue").Ref<any>;
2009
2040
  userList: import("vue").Ref<AnyObject[]>;
2010
2041
  handleInput: () => void;
2011
2042
  _disabledIds: import("vue").ComputedRef<any[]>;
@@ -2014,18 +2045,21 @@ declare const _default: import("vue").DefineComponent<{
2014
2045
  name: any;
2015
2046
  avatar: any;
2016
2047
  chatType: any;
2048
+ roleInfo: any;
2017
2049
  }[]>;
2018
2050
  friends: import("vue").ComputedRef<{
2019
2051
  id: any;
2020
2052
  name: any;
2021
2053
  avatar: any;
2022
2054
  chatType: any;
2055
+ roleInfo: any;
2023
2056
  }[]>;
2024
2057
  groups: import("vue").ComputedRef<{
2025
2058
  id: any;
2026
2059
  name: any;
2027
2060
  avatar: any;
2028
2061
  chatType: any;
2062
+ roleInfo: any;
2029
2063
  }[]>;
2030
2064
  checkedIds: import("vue").ComputedRef<any[]>;
2031
2065
  btnDisabled: import("vue").ComputedRef<boolean>;
@@ -2063,6 +2097,8 @@ declare const _default: import("vue").DefineComponent<{
2063
2097
  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<{}>>, {}>;
2064
2098
  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<{}>>, {}>;
2065
2099
  last: <T>(array: import("lodash").List<T> | null | undefined) => T | undefined;
2100
+ isDoctorRole: typeof import("./utils").isDoctorRole;
2101
+ getRoleName: typeof import("./utils").getRoleName;
2066
2102
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
2067
2103
  title: {
2068
2104
  type: StringConstructor;
@@ -2278,6 +2314,7 @@ declare const _default: import("vue").DefineComponent<{
2278
2314
  remark: import("vue").Ref<string>;
2279
2315
  currentTab: import("vue").Ref<AnyObject[]>;
2280
2316
  breadcrumbList: import("vue").Ref<AnyObject[]>;
2317
+ breadcrumbRef: import("vue").Ref<any>;
2281
2318
  userList: import("vue").Ref<AnyObject[]>;
2282
2319
  handleInput: () => void;
2283
2320
  _disabledIds: import("vue").ComputedRef<any[]>;
@@ -2286,18 +2323,21 @@ declare const _default: import("vue").DefineComponent<{
2286
2323
  name: any;
2287
2324
  avatar: any;
2288
2325
  chatType: any;
2326
+ roleInfo: any;
2289
2327
  }[]>;
2290
2328
  friends: import("vue").ComputedRef<{
2291
2329
  id: any;
2292
2330
  name: any;
2293
2331
  avatar: any;
2294
2332
  chatType: any;
2333
+ roleInfo: any;
2295
2334
  }[]>;
2296
2335
  groups: import("vue").ComputedRef<{
2297
2336
  id: any;
2298
2337
  name: any;
2299
2338
  avatar: any;
2300
2339
  chatType: any;
2340
+ roleInfo: any;
2301
2341
  }[]>;
2302
2342
  checkedIds: import("vue").ComputedRef<any[]>;
2303
2343
  btnDisabled: import("vue").ComputedRef<boolean>;
@@ -2335,6 +2375,8 @@ declare const _default: import("vue").DefineComponent<{
2335
2375
  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<{}>>, {}>;
2336
2376
  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<{}>>, {}>;
2337
2377
  last: <T>(array: import("lodash").List<T> | null | undefined) => T | undefined;
2378
+ isDoctorRole: typeof import("./utils").isDoctorRole;
2379
+ getRoleName: typeof import("./utils").getRoleName;
2338
2380
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
2339
2381
  title: {
2340
2382
  type: StringConstructor;
@@ -2605,6 +2647,7 @@ declare const _default: import("vue").DefineComponent<{
2605
2647
  remark: import("vue").Ref<string>;
2606
2648
  currentTab: import("vue").Ref<AnyObject[]>;
2607
2649
  breadcrumbList: import("vue").Ref<AnyObject[]>;
2650
+ breadcrumbRef: import("vue").Ref<any>;
2608
2651
  userList: import("vue").Ref<AnyObject[]>;
2609
2652
  handleInput: () => void;
2610
2653
  _disabledIds: import("vue").ComputedRef<any[]>;
@@ -2613,18 +2656,21 @@ declare const _default: import("vue").DefineComponent<{
2613
2656
  name: any;
2614
2657
  avatar: any;
2615
2658
  chatType: any;
2659
+ roleInfo: any;
2616
2660
  }[]>;
2617
2661
  friends: import("vue").ComputedRef<{
2618
2662
  id: any;
2619
2663
  name: any;
2620
2664
  avatar: any;
2621
2665
  chatType: any;
2666
+ roleInfo: any;
2622
2667
  }[]>;
2623
2668
  groups: import("vue").ComputedRef<{
2624
2669
  id: any;
2625
2670
  name: any;
2626
2671
  avatar: any;
2627
2672
  chatType: any;
2673
+ roleInfo: any;
2628
2674
  }[]>;
2629
2675
  checkedIds: import("vue").ComputedRef<any[]>;
2630
2676
  btnDisabled: import("vue").ComputedRef<boolean>;
@@ -2662,6 +2708,8 @@ declare const _default: import("vue").DefineComponent<{
2662
2708
  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<{}>>, {}>;
2663
2709
  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<{}>>, {}>;
2664
2710
  last: <T>(array: import("lodash").List<T> | null | undefined) => T | undefined;
2711
+ isDoctorRole: typeof import("./utils").isDoctorRole;
2712
+ getRoleName: typeof import("./utils").getRoleName;
2665
2713
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
2666
2714
  title: {
2667
2715
  type: StringConstructor;
@@ -2968,6 +3016,7 @@ declare const _default: import("vue").DefineComponent<{
2968
3016
  remark: import("vue").Ref<string>;
2969
3017
  currentTab: import("vue").Ref<AnyObject[]>;
2970
3018
  breadcrumbList: import("vue").Ref<AnyObject[]>;
3019
+ breadcrumbRef: import("vue").Ref<any>;
2971
3020
  userList: import("vue").Ref<AnyObject[]>;
2972
3021
  handleInput: () => void;
2973
3022
  _disabledIds: import("vue").ComputedRef<any[]>;
@@ -2976,18 +3025,21 @@ declare const _default: import("vue").DefineComponent<{
2976
3025
  name: any;
2977
3026
  avatar: any;
2978
3027
  chatType: any;
3028
+ roleInfo: any;
2979
3029
  }[]>;
2980
3030
  friends: import("vue").ComputedRef<{
2981
3031
  id: any;
2982
3032
  name: any;
2983
3033
  avatar: any;
2984
3034
  chatType: any;
3035
+ roleInfo: any;
2985
3036
  }[]>;
2986
3037
  groups: import("vue").ComputedRef<{
2987
3038
  id: any;
2988
3039
  name: any;
2989
3040
  avatar: any;
2990
3041
  chatType: any;
3042
+ roleInfo: any;
2991
3043
  }[]>;
2992
3044
  checkedIds: import("vue").ComputedRef<any[]>;
2993
3045
  btnDisabled: import("vue").ComputedRef<boolean>;
@@ -3025,6 +3077,8 @@ declare const _default: import("vue").DefineComponent<{
3025
3077
  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<{}>>, {}>;
3026
3078
  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<{}>>, {}>;
3027
3079
  last: <T>(array: import("lodash").List<T> | null | undefined) => T | undefined;
3080
+ isDoctorRole: typeof import("./utils").isDoctorRole;
3081
+ getRoleName: typeof import("./utils").getRoleName;
3028
3082
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
3029
3083
  title: {
3030
3084
  type: StringConstructor;
@@ -3124,6 +3178,8 @@ declare const _default: import("vue").DefineComponent<{
3124
3178
  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<{}>>, {}>;
3125
3179
  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<{}>>, {}>;
3126
3180
  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<{}>>, {}>;
3181
+ isDoctorRole: typeof import("./utils").isDoctorRole;
3182
+ getRoleName: typeof import("./utils").getRoleName;
3127
3183
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
3128
3184
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("template-click" | "unread-message-update" | "session-change" | "session-close")[], "template-click" | "unread-message-update" | "session-change" | "session-close", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
3129
3185
  token: {
@@ -1,5 +1,6 @@
1
1
  import { PropType } from 'vue';
2
2
  import { AnyObject } from '../../../../shared/types';
3
+ import { isDoctorRole, getRoleName } from '../utils';
3
4
  declare const _default: import("vue").DefineComponent<{
4
5
  title: {
5
6
  type: StringConstructor;
@@ -97,6 +98,7 @@ declare const _default: import("vue").DefineComponent<{
97
98
  remark: import("vue").Ref<string>;
98
99
  currentTab: import("vue").Ref<AnyObject[]>;
99
100
  breadcrumbList: import("vue").Ref<AnyObject[]>;
101
+ breadcrumbRef: import("vue").Ref<any>;
100
102
  userList: import("vue").Ref<AnyObject[]>;
101
103
  handleInput: () => void;
102
104
  _disabledIds: import("vue").ComputedRef<any[]>;
@@ -105,18 +107,21 @@ declare const _default: import("vue").DefineComponent<{
105
107
  name: any;
106
108
  avatar: any;
107
109
  chatType: any;
110
+ roleInfo: any;
108
111
  }[]>;
109
112
  friends: import("vue").ComputedRef<{
110
113
  id: any;
111
114
  name: any;
112
115
  avatar: any;
113
116
  chatType: any;
117
+ roleInfo: any;
114
118
  }[]>;
115
119
  groups: import("vue").ComputedRef<{
116
120
  id: any;
117
121
  name: any;
118
122
  avatar: any;
119
123
  chatType: any;
124
+ roleInfo: any;
120
125
  }[]>;
121
126
  checkedIds: import("vue").ComputedRef<any[]>;
122
127
  btnDisabled: import("vue").ComputedRef<boolean>;
@@ -154,6 +159,8 @@ declare const _default: import("vue").DefineComponent<{
154
159
  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<{}>>, {}>;
155
160
  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<{}>>, {}>;
156
161
  last: <T>(array: import("lodash").List<T> | null | undefined) => T | undefined;
162
+ isDoctorRole: typeof isDoctorRole;
163
+ getRoleName: typeof getRoleName;
157
164
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
158
165
  title: {
159
166
  type: StringConstructor;
@@ -1 +1 @@
1
- import{createElementVNode as e,defineComponent as l,ref as a,computed as n,watch as t,openBlock as o,createElementBlock as i,Fragment as u,createVNode as r,unref as d,withCtx as s,createCommentVNode as c,createBlock as v,renderList as p,toDisplayString as g,createTextVNode as f,withDirectives as m,isRef as h,vShow as y,withModifiers as w,normalizeClass as k,renderSlot as b}from"vue";import{NModal as I,NInput as C,NIcon as _,NSpace as x,NButton as L,NBreadcrumb as j,NBreadcrumbItem as S,NCheckbox as B,NCheckboxGroup as U,NAvatar as E,NTag as R,NTooltip as N}from"naive-ui";import{SearchOutline as z,PersonOutline as A,PeopleOutline as G,ChevronBackOutline as T,ChevronForwardOutline as V,AddOutline as $}from"@vicons/ionicons5";import{useData as D}from"../hooks/useData.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import{CHAT_TYPE as M}from"../constants/index.js";import{getOrgUserTreeApi as O,groupUserApi as P,groupLeaveApi as q,groupJoinApi as F,groupCreateApi as H}from"../api/index.js";import{listSort as J}from"../utils/index.js";import{union as K,unionBy as Q,remove as W,intersection as X,last as Y,isArray as Z,uniqBy as ee,cloneDeep as le,trim as ae}from"lodash-es";import"trtc-sdk-v5";import{useSearchUserList as ne}from"../hooks/useSearchUserList.js";var te,oe;const ie={class:"iho-chat-dialog__content iho-chat-add-wrapper"},ue={key:0,class:"input-box"},re=e("span",null,(null==(te=window.getLanguageByCode)?void 0:te.call(window,"10010.1.34"))||"群名称:",-1),de={class:"transfer-box"},se={class:"transfer-box__left"},ce={key:0,class:"nav-wrapper"},ve={key:0,class:"chat--iconfont chat--icon-map-site"},pe={style:{"font-size":"12px"}},ge={key:1,class:"header"},fe={class:"user-list-box"},me={key:0,class:"org-list"},he={class:"ellipsis"},ye={key:0,style:{"font-size":"12px",color:"#666","margin-right":"10px"}},we={key:1,class:"no-data"},ke={class:"transfer-box__right"},be={class:"checked-tag-box"},Ie={key:0,class:"input-wrapper"};var Ce=l({__name:"ChatAdd",props:{title:{type:String,default:(null==(oe=window.getLanguageByCode)?void 0:oe.call(window,"10010.1.42"))||"添加新成员"},mode:{type:String,default:"select"},options:{type:Array},disabledIds:{type:Array,default:()=>[]},defaultValue:{type:Array,default:()=>[]},disabled:{type:Boolean,default:!1}},emits:["comfirm"],setup(l,{emit:te}){const oe=l;let Ce=[];const _e=[{key:"single",label:"按好友选"},{key:"group",label:"按群聊选"},{key:"org",label:"按架构选"}];let xe=[];const{state:Le,setCurrentSessionItem:je}=D(),Se=a(),Be=a(""),Ue=a(!1),Ee=a([]),Re=a(""),Ne=a(""),ze=a([]),Ae=a([]),{userList:Ge,handleInput:Te}=ne({wrapperRef:Se,keywordRef:Be,before:()=>{ze.value.length>0||(Ge.value=Ce)}}),Ve=n((()=>"relay"===oe.mode?[]:K(oe.disabledIds,[Le.userInfo.id]))),$e=n((()=>{var e;return(null==(e=Le.sessionList)?void 0:e.length)?J(Le.sessionList).map((e=>({id:e.receiver,name:e.name,avatar:e.avatar,chatType:e.chatType}))):[]})),De=n((()=>$e.value.filter((e=>e.chatType===M.SINGLE)))),Me=n((()=>$e.value.filter((e=>e.chatType===M.GROUP)))),Oe=n((()=>Ee.value.length?Ee.value.map((e=>e.id)):[])),Pe=n((()=>"create"===oe.mode?Oe.value.length<3:Oe.value.length<1)),qe=n({get:()=>Fe.value.filter((e=>!Qe(e))).length===Ge.value.filter((e=>!Qe(e.id))).length,set(e){const l=[];if(Ge.value.forEach((e=>{var a;if(1==e.type&&(null==(a=e.children)?void 0:a.length)){const a=Ze(e.children||[]).filter((e=>!Qe(e.id)));l.push(...a)}else Qe(e.id)||l.push(e)})),e)Ee.value=Q(Ee.value,l,"id");else{const e=l.map((e=>e.id));W(Ee.value,(l=>e.includes(l.id)))}}}),Fe=n({get(){var e,l,a;return null!=(a=null==(l=null==(e=Ge.value)?void 0:e.filter((e=>{var l;if(1==e.type&&(null==(l=e.children)?void 0:l.length)){const l=Ze(e.children||[]).map((e=>e.id)).filter((e=>!Qe(e)));return X(l,Oe.value).length===l.length}return Oe.value.includes(e.id)})))?void 0:l.map((e=>e.id)))?a:[]},set(e){Ge.value.forEach((l=>{var a;const n=[];1==l.type&&(null==(a=l.children)?void 0:a.length)?n.push(...Ze(l.children||[]).filter((e=>!Qe(e.id)))):n.push(l),e.includes(l.id)?Ee.value=Q(Ee.value,n,"id"):W(Ee.value,(e=>n.some((l=>l.id===e.id))))}))}}),He=n((()=>{var e;return ze.value.length>0?null==(e=Y(ze.value))?void 0:e.key:""})),Je=n((()=>!("relay"!==oe.mode&&["group","org"].includes(He.value)&&1===ze.value.length)));function Ke(e){e.forEach((e=>{var l;1==e.type&&(null==(l=e.children)?void 0:l.length)?(e.total=Ze(e.children).length,Ke(e.children)):2==e.type&&(e.total=0)}))}function Qe(e){var l,a;return"group"===He.value?"relay"!==oe.mode&&(1===ze.value.length||(null==(l=Ve.value)?void 0:l.includes(e))):null==(a=Ve.value)?void 0:a.includes(e)}function We(){ze.value.length>1?"group"===He.value?Ge.value=Me.value:"org"===He.value&&(Ge.value=xe.map((e=>({id:e.orgId,name:e.orgName}))),Ae.value=[]):Ge.value=Ce,ze.value.pop()}function Xe(e,l){const{id:a,children:n=[],type:t}=e;if("breadcrumb"!==l||Y(Ae.value).id!==a)if(t){const l=Ae.value.findIndex((e=>e.id===a));l>-1?Ae.value=Ae.value.slice(0,l+1):Ae.value.push(e),Ge.value=n}else{const n=xe.find((e=>e.orgId===a));Ae.value=[e],Ge.value=n.userList||[],l||ze.value.push({key:He.value,label:n.orgName})}}function Ye(e){const{children:l=[]}=e;if(!l.length)return!0;const a=Ze(l).map((e=>e.id)).filter((e=>!Ve.value.includes(e)));return X(a,Oe.value).length===a.length}function Ze(e){const l=[];return e.forEach((e=>{var a;1==e.type&&(null==(a=e.children)?void 0:a.length)?l.push(...Ze(e.children)):2==e.type&&l.push(e)})),l}async function el(){const e=d(Oe);switch(oe.mode){case"create":await H({creator:Le.userInfo.id,memberIdSet:e,name:ae(Re.value),orgId:Le.orgId});break;case"join":if(await F({groupId:Le.currentSessionItem.receiver,operator:Le.userInfo.id,memberIdSet:e}),!Le.currentSessionItem.defaultName){const e=Ee.value.map((e=>e.name)).join(",");je({name:`${Le.currentSessionItem.name},${e}`})}Le.currentGroupUser.push(...Ge.value.filter((l=>e.includes(l.id))));break;case"remove":if(await q({dissolution:!1,groupId:Le.currentSessionItem.receiver,operator:Le.userInfo.id,memberIdSet:e}),!Le.currentSessionItem.defaultName){const e=Ee.value.map((e=>e.name)).join(","),l=new RegExp(e,"g");je({name:Le.currentSessionItem.name.replace(l,"")})}W(Le.currentGroupUser,(l=>e.includes(l.id)));break;default:te("comfirm",{checkedIds:e,checkedOptions:Ee.value,remark:Ne.value})}Ue.value=!1}return async function(){try{const e=await O();xe=Z(e)?e:[],xe.forEach((e=>Ke(e.userList||[])))}catch(e){console.log("error ==>",e)}}(),t((()=>Ue.value),(e=>{if(!e)return;Be.value="",Re.value="",ze.value=[],Ae.value=[];const l="relay"===oe.mode?$e.value:De.value,a=Z(oe.options)&&oe.options.length?oe.options:l;Ce=ee(a,"id"),Ge.value=Ce,Ee.value=Z(oe.defaultValue)&&oe.defaultValue.length?le(oe.defaultValue):[]})),(a,n)=>{var t,D;return o(),i(u,null,[r(d(I),{preset:"dialog",title:l.title,"show-icon":!1,"auto-focus":!1,"trap-focus":!1,class:"iho-chat-dialog",show:Ue.value,"onUpdate:show":n[5]||(n[5]=e=>Ue.value=e),"negative-text":(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.28"))||"取消","positive-text":(null==(D=window.getLanguageByCode)?void 0:D.call(window,"10010.1.27"))||"确定","display-directive":"show","positive-button-props":{disabled:d(Pe)},onPositiveClick:el},{default:s((()=>{var a,t,k,b,I,N,$,D,M;return[e("div",ie,["create"===l.mode?(o(),i("div",ue,[re,r(d(C),{clearable:"",placeholder:(null==(a=window.getLanguageByCode)?void 0:a.call(window,"10010.1.35"))||"取个群名称方便后续搜索",value:Re.value,"onUpdate:value":n[0]||(n[0]=e=>Re.value=e),valueModifiers:{trim:!0}},null,8,["value"])])):c("v-if",!0),e("div",de,[e("div",se,[r(d(C),{placeholder:(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.36"))||"搜索",clearable:"",value:Be.value,"onUpdate:value":[n[1]||(n[1]=e=>Be.value=e),d(Te)],valueModifiers:{trim:!0}},{prefix:s((()=>[r(d(_),{component:d(z)},null,8,["component"])])),_:1},8,["value","onUpdate:value"]),Be.value||"remove"===l.mode?c("v-if",!0):(o(),i("div",ce,[0===ze.value.length?(o(),v(d(x),{key:0,justify:"space-around","wrap-item":!1},{default:s((()=>[(o(),i(u,null,p(_e,(l=>r(d(x),{vertical:"",align:"center","wrap-item":!1,key:l.key,onClick:()=>function(e){switch(Be.value="",ze.value=[e],e.key){case"single":Ge.value=De.value;break;case"group":Ge.value=Me.value;break;case"org":Ge.value=xe.map((e=>({id:e.orgId,name:e.orgName})))}}(l)},{default:s((()=>[r(d(L),{tertiary:""},{icon:s((()=>["org"===l.key?(o(),i("i",ve)):(o(),v(d(_),{key:1,component:"single"===l.key?d(A):d(G)},null,8,["component"]))])),_:2},1024),e("span",pe,g(l.label),1)])),_:2},1032,["onClick"]))),64))])),_:1})):c("v-if",!0),ze.value.length>0?(o(),i("div",ge,[r(d(L),{text:"",onClick:We},{icon:s((()=>[r(d(_),{component:d(T)},null,8,["component"])])),_:1}),e("h4",null,g(null==(k=d(Y)(ze.value))?void 0:k.label),1)])):c("v-if",!0),ze.value.length>0&&"org"===(null==(b=d(Y)(ze.value))?void 0:b.key)&&Ae.value.length>0?(o(),v(d(j),{key:2,separator:">"},{default:s((()=>[(o(!0),i(u,null,p(Ae.value,(e=>(o(),v(d(S),{key:e.id,onClick:l=>Xe(e,"breadcrumb")},{default:s((()=>[f(g(e.name),1)])),_:2},1032,["onClick"])))),128))])),_:1})):c("v-if",!0)])),e("div",fe,[d(Ge).length>0?(o(),i(u,{key:0},[m(r(d(B),{label:(null==(I=window.getLanguageByCode)?void 0:I.call(window,"10010.1.37"))||"全选",checked:d(qe),"onUpdate:checked":n[2]||(n[2]=e=>h(qe)?qe.value=e:null)},null,8,["checked"]),[[y,d(Je)]]),"org"===d(He)&&1===ze.value.length?(o(),i("div",me,[(o(!0),i(u,null,p(d(Ge),(l=>(o(),v(d(x),{"wrap-item":!1,align:"center",justify:"space-between",key:l.Id,onClick:e=>Xe(l)},{default:s((()=>[e("span",null,g(l.name),1),r(d(_),{size:"16",component:d(V)},null,8,["component"])])),_:2},1032,["onClick"])))),128))])):(o(),v(d(U),{key:1,ref_key:"listRef",ref:Se,value:d(Fe),"onUpdate:value":n[3]||(n[3]=e=>h(Fe)?Fe.value=e:null)},{default:s((()=>[(o(!0),i(u,null,p(d(Ge),(l=>(o(),v(d(B),{key:l.id,value:l.id,disabled:Qe(l.id),onClick:()=>async function(e){const l=d(He);if(l&&"relay"!==oe.mode&&"group"===l&&1===ze.value.length)try{ze.value.push({key:l,label:e.name});const a=await P({id:e.id});Ge.value=Z(a)?a:[]}catch(e){console.log("error ==>",e)}}(l)},{default:s((()=>[r(d(x),{align:"center","wrap-item":!1,wrap:!1},{default:s((()=>[r(d(E),{src:l.avatar,round:"",size:32},null,8,["src"]),e("span",he,g(l.name),1),l.total?(o(),i("span",ye," ("+g(l.total)+"人) ",1)):c("v-if",!0),1==l.type&&l.children.length>0?(o(),v(d(L),{key:1,type:"primary",text:"",disabled:Ye(l),style:{"margin-left":"auto"},onClick:w((e=>Xe(l)),["stop"])},{default:s((()=>[f(" 下级 ")])),_:2},1032,["disabled","onClick"])):c("v-if",!0)])),_:2},1024)])),_:2},1032,["value","disabled","onClick"])))),128))])),_:1},8,["value"]))],64)):(o(),i("div",we,(null==(N=window.getLanguageByCode)?void 0:N.call(window,"10010.1.38"))||"找不到相关结果"))])]),e("div",ke,[e("span",null,((null==($=window.getLanguageByCode)?void 0:$.call(window,"10010.1.39"))||"已选择")+g(d(Oe).length)+((null==(D=window.getLanguageByCode)?void 0:D.call(window,"10010.1.40"))||"人"),1),e("div",be,[(o(!0),i(u,null,p(Ee.value,(e=>(o(),v(d(R),{key:e.id,bordered:!1,closable:"relay"===l.mode||e.id!==d(Le).userInfo.id,disabled:d(Ve).includes(e.id),onClose:()=>{return l=e.id,void W(Ee.value,(e=>e.id===l));var l}},{avatar:s((()=>[r(d(E),{round:"",src:e.avatar},null,8,["src"])])),default:s((()=>[f(" "+g(e.name),1)])),_:2},1032,["closable","disabled","onClose"])))),128))]),"relay"===l.mode?(o(),i("div",Ie,[r(d(C),{clearable:"",value:Ne.value,"onUpdate:value":n[4]||(n[4]=e=>Ne.value=e),type:"textarea",placeholder:(null==(M=window.getLanguageByCode)?void 0:M.call(window,"10010.1.41"))||"留言",autosize:{minRows:2,maxRows:2}},null,8,["value"])])):c("v-if",!0)])])])]})),_:1},8,["title","show","positive-button-props"]),e("span",{class:k(["btn-wrapper",{disabled:l.disabled}]),onClick:n[6]||(n[6]=e=>Ue.value=!0)},[b(a.$slots,"trigger",{},(()=>[r(d(N),{"show-arrow":!1,placement:"bottom"},{trigger:s((()=>[r(d(L),{color:"#ffffff4D",class:"add-btn"},{icon:s((()=>[r(d(_),{component:d($),color:"#fff"},null,8,["component"])])),_:1})])),default:s((()=>[f(" "+g(l.title),1)])),_:1})]))],2)],64)}}});export{Ce as default};
1
+ import{createElementVNode as e,defineComponent as l,ref as a,computed as n,watch as o,openBlock as t,createElementBlock as i,Fragment as r,createVNode as u,unref as s,withCtx as d,createCommentVNode as c,createBlock as v,renderList as p,toDisplayString as f,createTextVNode as g,withDirectives as m,isRef as h,vShow as y,normalizeClass as w,withModifiers as k,renderSlot as b,nextTick as I}from"vue";import{NModal as C,NInput as _,NIcon as x,NSpace as L,NButton as j,NBreadcrumb as S,NBreadcrumbItem as B,NCheckbox as U,NCheckboxGroup as R,NAvatar as E,NTag as N,NTooltip as T}from"naive-ui";import{SearchOutline as z,PersonOutline as A,PeopleOutline as D,ChevronBackOutline as G,ChevronForwardOutline as V,AddOutline as $}from"@vicons/ionicons5";import{useData as M}from"../hooks/useData.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import{CHAT_TYPE as O}from"../constants/index.js";import{getOrgUserTreeApi as P,groupUserApi as q,groupLeaveApi as F,groupJoinApi as H,groupCreateApi as J}from"../api/index.js";import{listSort as K,isDoctorRole as Q,getRoleName as W}from"../utils/index.js";import{union as X,unionBy as Y,remove as Z,intersection as ee,last as le,isArray as ae,uniqBy as ne,cloneDeep as oe,trim as te}from"lodash-es";import"trtc-sdk-v5";import{useSearchUserList as ie}from"../hooks/useSearchUserList.js";var re,ue;const se={class:"iho-chat-dialog__content iho-chat-add-wrapper"},de={key:0,class:"input-box"},ce=e("span",null,(null==(re=window.getLanguageByCode)?void 0:re.call(window,"10010.1.34"))||"群名称:",-1),ve={class:"transfer-box"},pe={class:"transfer-box__left"},fe={key:0,class:"nav-wrapper"},ge={key:0,class:"chat--iconfont chat--icon-map-site"},me={style:{"font-size":"12px"}},he={key:1,class:"header"},ye={class:"user-list-box"},we={key:0,class:"org-list"},ke={class:"seach-box"},be={class:"ellipsis"},Ie={key:0,style:{"font-size":"12px",color:"#666","margin-right":"10px","white-space":"nowrap"}},Ce={key:1,class:"no-data"},_e={class:"transfer-box__right"},xe={class:"checked-tag-box"},Le={class:"seach-box"},je={class:"ellipsis"},Se={key:0,class:"input-wrapper"};var Be=l({__name:"ChatAdd",props:{title:{type:String,default:(null==(ue=window.getLanguageByCode)?void 0:ue.call(window,"10010.1.42"))||"添加新成员"},mode:{type:String,default:"select"},options:{type:Array},disabledIds:{type:Array,default:()=>[]},defaultValue:{type:Array,default:()=>[]},disabled:{type:Boolean,default:!1}},emits:["comfirm"],setup(l,{emit:re}){const ue=l;let Be=[];const Ue=[{key:"single",label:"按好友选"},{key:"group",label:"按群聊选"},{key:"org",label:"按架构选"}];let Re=[];const{state:Ee,setCurrentSessionItem:Ne}=M(),Te=a(),ze=a(""),Ae=a(!1),De=a([]),Ge=a(""),Ve=a(""),$e=a([]),Me=a([]),Oe=a(),{userList:Pe,handleInput:qe}=ie({wrapperRef:Te,keywordRef:ze,before:()=>{$e.value.length>0||(Pe.value=Be)}}),Fe=n((()=>"relay"===ue.mode?[]:X(ue.disabledIds,[Ee.userInfo.id]))),He=n((()=>{var e;return(null==(e=Ee.sessionList)?void 0:e.length)?K(Ee.sessionList).map((e=>({id:e.receiver,name:e.name,avatar:e.avatar,chatType:e.chatType,roleInfo:e.roleInfo||""}))):[]})),Je=n((()=>He.value.filter((e=>e.chatType===O.SINGLE)))),Ke=n((()=>He.value.filter((e=>e.chatType===O.GROUP)))),Qe=n((()=>De.value.length?De.value.map((e=>e.id)):[])),We=n((()=>"create"===ue.mode?Qe.value.length<3:Qe.value.length<1)),Xe=n({get:()=>Ye.value.filter((e=>!al(e))).length===Pe.value.filter((e=>!al(e.id))).length,set(e){const l=[];if(Pe.value.forEach((e=>{var a;if(1==e.type&&(null==(a=e.children)?void 0:a.length)){const a=il(e.children||[]).filter((e=>!al(e.id)));l.push(...a)}else al(e.id)||l.push(e)})),e)De.value=Y(De.value,l,"id");else{const e=l.map((e=>e.id));Z(De.value,(l=>e.includes(l.id)))}}}),Ye=n({get(){var e,l,a;return null!=(a=null==(l=null==(e=Pe.value)?void 0:e.filter((e=>{var l;if(1==e.type&&(null==(l=e.children)?void 0:l.length)){const l=il(e.children||[]).map((e=>e.id)).filter((e=>!al(e)));return ee(l,Qe.value).length===l.length}return Qe.value.includes(e.id)})))?void 0:l.map((e=>e.id)))?a:[]},set(e){Pe.value.forEach((l=>{var a;const n=[];1==l.type&&(null==(a=l.children)?void 0:a.length)?n.push(...il(l.children||[]).filter((e=>!al(e.id)))):n.push(l),e.includes(l.id)?De.value=Y(De.value,n,"id"):Z(De.value,(e=>n.some((l=>l.id===e.id))))}))}}),Ze=n((()=>{var e;return $e.value.length>0?null==(e=le($e.value))?void 0:e.key:""})),el=n((()=>!("relay"!==ue.mode&&["group","org"].includes(Ze.value)&&1===$e.value.length)));function ll(e){e.forEach((e=>{var l;1==e.type&&(null==(l=e.children)?void 0:l.length)?(e.total=il(e.children).length,ll(e.children)):2==e.type&&(e.total=0)}))}function al(e){var l,a;return"group"===Ze.value?"relay"!==ue.mode&&(1===$e.value.length||(null==(l=Fe.value)?void 0:l.includes(e))):null==(a=Fe.value)?void 0:a.includes(e)}function nl(){$e.value.length>1?"group"===Ze.value?Pe.value=Ke.value:"org"===Ze.value&&(Pe.value=Re.map((e=>({id:e.orgId,name:e.orgName}))),Me.value=[]):Pe.value=Be,$e.value.pop()}function ol(e,l){const{id:a,children:n=[],type:o}=e;if("breadcrumb"!==l||le(Me.value).id!==a)if(o){const l=Me.value.findIndex((e=>e.id===a));l>-1?Me.value=Me.value.slice(0,l+1):Me.value.push(e),Pe.value=n,I((()=>{const e=Oe.value.$el.getElementsByTagName("ul")[0];e&&e.scrollTo(1e7,0)}))}else{const n=Re.find((e=>e.orgId===a));Me.value=[e],Pe.value=n.userList||[],l||$e.value.push({key:Ze.value,label:n.orgName})}}function tl(e){const{children:l=[]}=e;if(!l.length)return!0;const a=il(l).map((e=>e.id)).filter((e=>!Fe.value.includes(e)));return ee(a,Qe.value).length===a.length}function il(e){const l=[];return e.forEach((e=>{var a;1==e.type&&(null==(a=e.children)?void 0:a.length)?l.push(...il(e.children)):2==e.type&&l.push(e)})),l}async function rl(){const e=s(Qe);switch(ue.mode){case"create":await J({creator:Ee.userInfo.id,memberIdSet:e,name:te(Ge.value),orgId:Ee.orgId});break;case"join":if(await H({groupId:Ee.currentSessionItem.receiver,operator:Ee.userInfo.id,memberIdSet:e}),!Ee.currentSessionItem.defaultName){const e=De.value.map((e=>e.name)).join(",");Ne({name:`${Ee.currentSessionItem.name},${e}`})}Ee.currentGroupUser.push(...Pe.value.filter((l=>e.includes(l.id))));break;case"remove":if(await F({dissolution:!1,groupId:Ee.currentSessionItem.receiver,operator:Ee.userInfo.id,memberIdSet:e}),!Ee.currentSessionItem.defaultName){const e=De.value.map((e=>e.name)).join(","),l=new RegExp(e,"g");Ne({name:Ee.currentSessionItem.name.replace(l,"")})}Z(Ee.currentGroupUser,(l=>e.includes(l.id)));break;default:re("comfirm",{checkedIds:e,checkedOptions:De.value,remark:Ve.value})}Ae.value=!1}return async function(){try{const e=await P();Re=ae(e)?e:[],Re.forEach((e=>ll(e.userList||[])))}catch(e){console.log("error ==>",e)}}(),o((()=>Ae.value),(e=>{if(!e)return;ze.value="",Ge.value="",$e.value=[],Me.value=[];const l="relay"===ue.mode?He.value:Je.value,a=ae(ue.options)&&ue.options.length?ue.options:l;Be=ne(a,"id"),Pe.value=Be,De.value=ae(ue.defaultValue)&&ue.defaultValue.length?oe(ue.defaultValue):[]})),(a,n)=>{var o,I;return t(),i(r,null,[u(s(C),{preset:"dialog",title:l.title,"show-icon":!1,"auto-focus":!1,"trap-focus":!1,class:"iho-chat-dialog",show:Ae.value,"onUpdate:show":n[5]||(n[5]=e=>Ae.value=e),"negative-text":(null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.28"))||"取消","positive-text":(null==(I=window.getLanguageByCode)?void 0:I.call(window,"10010.1.27"))||"确定","display-directive":"show","positive-button-props":{disabled:s(We)},onPositiveClick:rl},{default:d((()=>{var a,o,b,I,C,T,$,M,O;return[e("div",se,["create"===l.mode?(t(),i("div",de,[ce,u(s(_),{clearable:"",placeholder:(null==(a=window.getLanguageByCode)?void 0:a.call(window,"10010.1.35"))||"取个群名称方便后续搜索",value:Ge.value,"onUpdate:value":n[0]||(n[0]=e=>Ge.value=e),valueModifiers:{trim:!0}},null,8,["value"])])):c("v-if",!0),e("div",ve,[e("div",pe,[u(s(_),{placeholder:(null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.36"))||"搜索",clearable:"",value:ze.value,"onUpdate:value":[n[1]||(n[1]=e=>ze.value=e),s(qe)],valueModifiers:{trim:!0}},{prefix:d((()=>[u(s(x),{component:s(z)},null,8,["component"])])),_:1},8,["value","onUpdate:value"]),ze.value||"remove"===l.mode?c("v-if",!0):(t(),i("div",fe,[0===$e.value.length?(t(),v(s(L),{key:0,justify:"space-around","wrap-item":!1},{default:d((()=>[(t(),i(r,null,p(Ue,(l=>u(s(L),{vertical:"",align:"center","wrap-item":!1,key:l.key,onClick:()=>function(e){switch(ze.value="",$e.value=[e],e.key){case"single":Pe.value=Je.value;break;case"group":Pe.value=Ke.value;break;case"org":Pe.value=Re.map((e=>({id:e.orgId,name:e.orgName})))}}(l)},{default:d((()=>[u(s(j),{tertiary:""},{icon:d((()=>["org"===l.key?(t(),i("i",ge)):(t(),v(s(x),{key:1,component:"single"===l.key?s(A):s(D)},null,8,["component"]))])),_:2},1024),e("span",me,f(l.label),1)])),_:2},1032,["onClick"]))),64))])),_:1})):c("v-if",!0),$e.value.length>0?(t(),i("div",he,[u(s(j),{text:"",onClick:nl},{icon:d((()=>[u(s(x),{component:s(G)},null,8,["component"])])),_:1}),e("h4",null,f(null==(b=s(le)($e.value))?void 0:b.label),1)])):c("v-if",!0),$e.value.length>0&&"org"===(null==(I=s(le)($e.value))?void 0:I.key)&&Me.value.length>0?(t(),v(s(S),{key:2,ref_key:"breadcrumbRef",ref:Oe,separator:">"},{default:d((()=>[(t(!0),i(r,null,p(Me.value,(e=>(t(),v(s(B),{key:e.id,onClick:l=>ol(e,"breadcrumb")},{default:d((()=>[g(f(e.name),1)])),_:2},1032,["onClick"])))),128))])),_:1},512)):c("v-if",!0)])),e("div",ye,[s(Pe).length>0?(t(),i(r,{key:0},[m(u(s(U),{label:(null==(C=window.getLanguageByCode)?void 0:C.call(window,"10010.1.37"))||"全选",checked:s(Xe),"onUpdate:checked":n[2]||(n[2]=e=>h(Xe)?Xe.value=e:null)},null,8,["checked"]),[[y,s(el)]]),"org"===s(Ze)&&1===$e.value.length?(t(),i("div",we,[(t(!0),i(r,null,p(s(Pe),(l=>(t(),v(s(L),{"wrap-item":!1,align:"center",justify:"space-between",key:l.Id,onClick:e=>ol(l)},{default:d((()=>[e("span",null,f(l.name),1),u(s(x),{size:"16",component:s(V)},null,8,["component"])])),_:2},1032,["onClick"])))),128))])):(t(),v(s(R),{key:1,ref_key:"listRef",ref:Te,value:s(Ye),"onUpdate:value":n[3]||(n[3]=e=>h(Ye)?Ye.value=e:null)},{default:d((()=>[(t(!0),i(r,null,p(s(Pe),(l=>(t(),v(s(U),{key:l.id,value:l.id,disabled:al(l.id),onClick:()=>async function(e){const l=s(Ze);if(l&&"relay"!==ue.mode&&"group"===l&&1===$e.value.length)try{$e.value.push({key:l,label:e.name});const a=await q({id:e.id});Pe.value=ae(a)?a:[]}catch(e){console.log("error ==>",e)}}(l)},{default:d((()=>[u(s(L),{align:"center","wrap-item":!1,wrap:!1},{default:d((()=>[u(s(E),{src:l.avatar,round:"",size:32},null,8,["src"]),e("div",ke,[e("span",be,f(l.name),1),m(e("label",{class:w(["iho-chatRole",s(Q)(l.roleInfo)?"isDoctor":""])},f(s(W)(l.roleInfo)),3),[[y,s(W)(l.roleInfo)]])]),l.total?(t(),i("span",Ie," ("+f(l.total)+"人) ",1)):c("v-if",!0),1==l.type&&l.children.length>0?(t(),v(s(j),{key:1,type:"primary",text:"",disabled:tl(l),style:{"margin-left":"auto"},onClick:k((e=>ol(l)),["stop"])},{default:d((()=>[g(" 下级 ")])),_:2},1032,["disabled","onClick"])):c("v-if",!0)])),_:2},1024)])),_:2},1032,["value","disabled","onClick"])))),128))])),_:1},8,["value"]))],64)):(t(),i("div",Ce,(null==(T=window.getLanguageByCode)?void 0:T.call(window,"10010.1.38"))||"找不到相关结果"))])]),e("div",_e,[e("span",null,((null==($=window.getLanguageByCode)?void 0:$.call(window,"10010.1.39"))||"已选择")+f(s(Qe).length)+((null==(M=window.getLanguageByCode)?void 0:M.call(window,"10010.1.40"))||"人"),1),e("div",xe,[(t(!0),i(r,null,p(De.value,(a=>(t(),v(s(N),{key:a.id,bordered:!1,closable:"relay"===l.mode||a.id!==s(Ee).userInfo.id,disabled:s(Fe).includes(a.id),onClose:()=>{return e=a.id,void Z(De.value,(l=>l.id===e));var e}},{avatar:d((()=>[u(s(E),{round:"",src:a.avatar},null,8,["src"])])),default:d((()=>[e("div",Le,[e("span",je,f(a.name),1),m(e("label",{class:w(["iho-chatRole",s(Q)(a.roleInfo)?"isDoctor":""])},f(s(W)(a.roleInfo)),3),[[y,s(W)(a.roleInfo)]])])])),_:2},1032,["closable","disabled","onClose"])))),128))]),"relay"===l.mode?(t(),i("div",Se,[u(s(_),{clearable:"",value:Ve.value,"onUpdate:value":n[4]||(n[4]=e=>Ve.value=e),type:"textarea",placeholder:(null==(O=window.getLanguageByCode)?void 0:O.call(window,"10010.1.41"))||"留言",autosize:{minRows:2,maxRows:2}},null,8,["value"])])):c("v-if",!0)])])])]})),_:1},8,["title","show","positive-button-props"]),e("span",{class:w(["btn-wrapper",{disabled:l.disabled}]),onClick:n[6]||(n[6]=e=>Ae.value=!0)},[b(a.$slots,"trigger",{},(()=>[u(s(T),{"show-arrow":!1,placement:"bottom"},{trigger:d((()=>[u(s(j),{color:"#ffffff4D",class:"add-btn"},{icon:d((()=>[u(s(x),{component:s($),color:"#fff"},null,8,["component"])])),_:1})])),default:d((()=>[g(" "+f(l.title),1)])),_:1})]))],2)],64)}}});export{Be as default};
@@ -72,6 +72,7 @@ declare const _default: import("vue").DefineComponent<{
72
72
  }[];
73
73
  resetAndSearch: () => void;
74
74
  title: import("vue").ComputedRef<"聊天图片" | "聊天文件">;
75
+ getFileDetails: (msg: string, type: string) => any;
75
76
  getDetail: (item: AnyObject) => string;
76
77
  getFileType: (item: AnyObject) => any;
77
78
  NModal: any;
@@ -181,6 +182,7 @@ declare const _default: import("vue").DefineComponent<{
181
182
  remark: import("vue").Ref<string>;
182
183
  currentTab: import("vue").Ref<AnyObject[]>;
183
184
  breadcrumbList: import("vue").Ref<AnyObject[]>;
185
+ breadcrumbRef: import("vue").Ref<any>;
184
186
  userList: import("vue").Ref<AnyObject[]>;
185
187
  handleInput: () => void;
186
188
  _disabledIds: import("vue").ComputedRef<any[]>;
@@ -189,18 +191,21 @@ declare const _default: import("vue").DefineComponent<{
189
191
  name: any;
190
192
  avatar: any;
191
193
  chatType: any;
194
+ roleInfo: any;
192
195
  }[]>;
193
196
  friends: import("vue").ComputedRef<{
194
197
  id: any;
195
198
  name: any;
196
199
  avatar: any;
197
200
  chatType: any;
201
+ roleInfo: any;
198
202
  }[]>;
199
203
  groups: import("vue").ComputedRef<{
200
204
  id: any;
201
205
  name: any;
202
206
  avatar: any;
203
207
  chatType: any;
208
+ roleInfo: any;
204
209
  }[]>;
205
210
  checkedIds: import("vue").ComputedRef<any[]>;
206
211
  btnDisabled: import("vue").ComputedRef<boolean>;
@@ -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 +1 @@
1
- import{defineComponent as e,ref as t,computed as o,watch as a,openBlock as n,createBlock as i,unref as r,withCtx as s,withDirectives as l,createElementVNode as d,createVNode as c,createElementBlock as m,Fragment as u,renderList as p,toDisplayString as g,vShow as v,normalizeStyle as w,createTextVNode as y}from"vue";import{NModal as f,NImageGroup as h,NImage as k,NInput as C,NIcon as M,NTooltip as b}from"naive-ui";import{SearchOutline as _,OpenOutline as j,DownloadOutline as I}from"@vicons/ionicons5";import{searchChatRecordApi as L}from"../api/index.js";import"../../../../shared/utils/index.js";import{useDebounceFn as T}from"@vueuse/core";import{format as x,isSameWeek as S,isSameMonth as A}from"date-fns";import{last as B}from"lodash-es";import"@vue/shared";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import{useScrollLoading as D}from"../../../../shared/hooks/useScrollLoading.js";import{useData as H}from"../hooks/useData.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import{getFileSize as z,downloadFile as U}from"../utils/index.js";import"trtc-sdk-v5";import E from"./ChatAdd.vue.js";const O={class:"label"},$={class:"image-box"},F={class:"file-type"},P={class:"text"},R={class:"name"},G={class:"detail"},N={class:"opt-box"};var V=e({__name:"ChatFile",props:{type:{type:String,default:"image"},visible:{type:Boolean}},setup(e){const V=e,{cssVars:q,state:J,relayMessage:K}=H(),Q=t([]),W=t([]),X=t(),Y=t(),Z=t(),ee=T(ae,500),te={page:0,hasMore:!0,lastSendTime:x(new Date,"yyyy-MM-dd HH:mm:ss")};async function oe(){var e;try{if(!te.hasMore)return;te.page++;const t=await L({orgId:J.orgId,keyword:Z.value,endTime:"",startTime:"",lastSendTime:te.lastSendTime,memberIdSet:[],page:te.page,recordType:"image"===V.type?"IMAGE":"FILE",receiver:J.currentSessionItem.receiver,userId:J.userInfo.id});Array.isArray(t)&&0!==t.length&&Array.isArray(t[0].recordList)||(te.hasMore=!1);let o=t||[];if(Array.isArray(t)&&t.length>0&&(o=t[0].recordList),te.lastSendTime=null==(e=B(o))?void 0:e.sendTime,"image"===V.type){const e=function(e){const t={};e.forEach((e=>{var o,a;const n=new Date(e.sendTime);let i=x(n,"yyyy年MM月");S(n,new Date)?i=(null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.47"))||"本周":A(n,new Date)&&(i=(null==(a=window.getLanguageByCode)?void 0:a.call(window,"10010.1.404"))||"本月"),t[i]||(t[i]=[]),t[i].push(e.content.msg)}));return Object.entries(t).map((([e,t])=>({label:e,list:t})))}(o);Q.value=te.page>1?Q.value.concat(e):e}else{const e=o.map((e=>new Promise((async t=>{const o=await z(e.content.fileUrl);t({...e,size:o})})))),t=await Promise.all(e);W.value=te.page>1?W.value.concat(t):t}}catch(e){}}function ae(){Object.assign(te,{page:0,hasMore:!0,lastSendTime:x(new Date,"yyyy-MM-dd HH:mm:ss")}),oe()}D(X,(()=>{oe()})),D(Y,(()=>{oe()}));const ne=o((()=>{var e,t;return"image"===V.type?(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.49"))||"聊天图片":(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.50"))||"聊天文件"}));function ie(e){const{size:t,sendTime:o,senderName:a}=e;return`${t} · ${x(new Date(o),"yyyy/MM/dd HH:mm")} ${a}`}function re(e){var t;const o=(null==(t=e.content)?void 0:t.msg)||"",a=o.lastIndexOf(".");if(-1!==a){return o.charAt(a+1).toUpperCase()}return"?"}return a((()=>V.visible),(e=>{e?ae():Z.value=""})),(t,o)=>(n(),i(r(f),{preset:"dialog",title:r(ne),"show-icon":!1,"auto-focus":!1,"trap-focus":!1,class:"iho-chat-dialog"},{default:s((()=>{var t;return[l(d("div",{class:"iho-chat-dialog__content iho-chat-image-wrapper",ref_key:"imageRef",ref:X},[c(r(h),{"show-toolbar-tooltip":""},{default:s((()=>[(n(!0),m(u,null,p(Q.value,(e=>(n(),m("div",{class:"image-item",key:e.label},[d("span",O,g(e.label),1),d("div",$,[(n(!0),m(u,null,p(e.list,(e=>(n(),i(r(k),{key:e,width:"80",height:"80",src:e},null,8,["src"])))),128))])])))),128))])),_:1})],512),[[v,"image"===e.type]]),l(d("div",{class:"iho-chat-dialog__content iho-chat-file-wrapper",style:w(r(q))},[c(r(C),{clearable:"",placeholder:(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.43"))||"搜索文件",value:Z.value,"onUpdate:value":o[0]||(o[0]=e=>Z.value=e),valueModifiers:{trim:!0},onInput:r(ee)},{prefix:s((()=>[c(r(M),{component:r(_)},null,8,["component"])])),_:1},8,["value","onInput"]),d("div",{class:"file-list-box",ref_key:"fileRef",ref:Y},[(n(!0),m(u,null,p(W.value,((e,t)=>{var o;return n(),m("div",{class:"file-item",key:t},[d("span",F,g(re(e)),1),d("div",P,[d("span",R,g(e.content.msg),1),d("span",G,g(ie(e)),1)]),d("div",N,[c(E,{title:(null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.44"))||"转发消息",mode:"relay",onComfirm:t=>r(K)({contents:[e.content],checkedIds:t.checkedIds,remark:t.remark})},{trigger:s((()=>[c(r(b),{"show-arrow":!1},{trigger:s((()=>[c(r(M),{size:16,component:r(j)},null,8,["component"])])),default:s((()=>{var e;return[y((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.45"))||"转发")]})),_:1})])),_:2},1032,["onComfirm"]),c(r(b),{"show-arrow":!1},{trigger:s((()=>[c(r(M),{size:16,component:r(I),onClick:()=>r(U)(e.content.fileUr,e.content.msg)},null,8,["component","onClick"])])),default:s((()=>{var e;return[y((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.102"))||"下载")]})),_:2},1024)])])})),128))],512)],4),[[v,"image"!==e.type]])]})),_:1},8,["title"]))}});export{V as default};
1
+ import{defineComponent as e,ref as t,computed as a,watch as o,openBlock as n,createBlock as i,unref as r,withCtx as s,withDirectives as l,createElementVNode as c,createVNode as d,createElementBlock as m,Fragment as u,renderList as p,toDisplayString as g,vShow as v,normalizeStyle as y,createTextVNode as w}from"vue";import{NModal as f,NImageGroup as h,NImage as k,NInput as C,NIcon as M,NTooltip as b}from"naive-ui";import{SearchOutline as _,OpenOutline as j,DownloadOutline as I}from"@vicons/ionicons5";import{searchChatRecordApi as L}from"../api/index.js";import"../../../../shared/utils/index.js";import{useDebounceFn as S}from"@vueuse/core";import{format as T,isSameWeek as x,isSameMonth as A}from"date-fns";import{last as B}from"lodash-es";import"@vue/shared";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import{useScrollLoading as D}from"../../../../shared/hooks/useScrollLoading.js";import{useData as H}from"../hooks/useData.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import{getFileSize as U,downloadFile as z}from"../utils/index.js";import"trtc-sdk-v5";import O from"./ChatAdd.vue.js";const E={class:"label"},N={class:"image-box"},$={class:"file-type"},F={class:"text"},P={class:"name"},R={class:"detail"},G={class:"opt-box"};var J=e({__name:"ChatFile",props:{type:{type:String,default:"image"},visible:{type:Boolean}},setup(e){const J=e,{cssVars:V,state:q,relayMessage:K}=H(),Q=t([]),W=t([]),X=t(),Y=t(),Z=t(),ee=S(oe,500),te={page:0,hasMore:!0,lastSendTime:T(new Date,"yyyy-MM-dd HH:mm:ss")};async function ae(){var e;try{if(!te.hasMore)return;te.page++;const t=await L({orgId:q.orgId,keyword:Z.value,endTime:"",startTime:"",lastSendTime:te.lastSendTime,memberIdSet:[],page:te.page,recordType:"image"===J.type?"IMAGE":"FILE",receiver:q.currentSessionItem.receiver,userId:q.userInfo.id});Array.isArray(t)&&0!==t.length&&Array.isArray(t[0].recordList)||(te.hasMore=!1);let a=t||[];if(Array.isArray(t)&&t.length>0&&(a=t[0].recordList),te.lastSendTime=null==(e=B(a))?void 0:e.sendTime,"image"===J.type){const e=function(e){const t={};e.forEach((e=>{var a,o;const n=new Date(e.sendTime);let i=T(n,"yyyy年MM月");x(n,new Date)?i=(null==(a=window.getLanguageByCode)?void 0:a.call(window,"10010.1.47"))||"本周":A(n,new Date)&&(i=(null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.404"))||"本月"),t[i]||(t[i]=[]),t[i].push(e.content.msg)}));return Object.entries(t).map((([e,t])=>({label:e,list:t})))}(a);Q.value=te.page>1?Q.value.concat(e):e}else{const e=a.map((e=>new Promise((async t=>{const a=await U(e.content.fileUrl);t({...e,size:a})})))),t=await Promise.all(e);W.value=te.page>1?W.value.concat(t):t}}catch(e){}}function oe(){Object.assign(te,{page:0,hasMore:!0,lastSendTime:T(new Date,"yyyy-MM-dd HH:mm:ss")}),ae()}D(X,(()=>{ae()})),D(Y,(()=>{ae()}));const ne=a((()=>{var e,t;return"image"===J.type?(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.49"))||"聊天图片":(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.50"))||"聊天文件"}));function ie(e,t){try{const a=JSON.parse(e);return a?a[t]:""}catch(t){return e||""}}function re(e){const{size:t,sendTime:a,senderName:o}=e;return`${t} · ${T(new Date(a),"yyyy/MM/dd HH:mm")} ${o}`}function se(e){var t;const a=(null==(t=e.content)?void 0:t.msg)||"",o=a.lastIndexOf(".");if(-1!==o){return a.charAt(o+1).toUpperCase()}return"?"}return o((()=>J.visible),(e=>{e?oe():Z.value=""})),(t,a)=>(n(),i(r(f),{preset:"dialog",title:r(ne),"show-icon":!1,"auto-focus":!1,"trap-focus":!1,class:"iho-chat-dialog"},{default:s((()=>{var t;return[l(c("div",{class:"iho-chat-dialog__content iho-chat-image-wrapper",ref_key:"imageRef",ref:X},[d(r(h),{"show-toolbar-tooltip":""},{default:s((()=>[(n(!0),m(u,null,p(Q.value,(e=>(n(),m("div",{class:"image-item",key:e.label},[c("span",E,g(e.label),1),c("div",N,[(n(!0),m(u,null,p(e.list,(e=>(n(),i(r(k),{key:e,width:"80",height:"80",src:ie(e,"fileUrl")},null,8,["src"])))),128))])])))),128))])),_:1})],512),[[v,"image"===e.type]]),l(c("div",{class:"iho-chat-dialog__content iho-chat-file-wrapper",style:y(r(V))},[d(r(C),{clearable:"",placeholder:(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.43"))||"搜索文件",value:Z.value,"onUpdate:value":a[0]||(a[0]=e=>Z.value=e),valueModifiers:{trim:!0},onInput:r(ee)},{prefix:s((()=>[d(r(M),{component:r(_)},null,8,["component"])])),_:1},8,["value","onInput"]),c("div",{class:"file-list-box",ref_key:"fileRef",ref:Y},[(n(!0),m(u,null,p(W.value,((e,t)=>{var a;return n(),m("div",{class:"file-item",key:t},[c("span",$,g(se(e)),1),c("div",F,[c("span",P,g(ie(e.content.msg,"fileName")),1),c("span",R,g(re(e)),1)]),c("div",G,[d(O,{title:(null==(a=window.getLanguageByCode)?void 0:a.call(window,"10010.1.44"))||"转发消息",mode:"relay",onComfirm:t=>r(K)({contents:[e.content],checkedIds:t.checkedIds,remark:t.remark})},{trigger:s((()=>[d(r(b),{"show-arrow":!1},{trigger:s((()=>[d(r(M),{size:16,component:r(j)},null,8,["component"])])),default:s((()=>{var e;return[w((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.45"))||"转发")]})),_:1})])),_:2},1032,["onComfirm"]),d(r(b),{"show-arrow":!1},{trigger:s((()=>[d(r(M),{size:16,component:r(I),onClick:()=>r(z)(e.content.fileUr,e.content.msg)},null,8,["component","onClick"])])),default:s((()=>{var e;return[w((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.102"))||"下载")]})),_:2},1024)])])})),128))],512)],4),[[v,"image"!==e.type]])]})),_:1},8,["title"]))}});export{J as default};
@@ -173,6 +173,7 @@ declare const _default: import("vue").DefineComponent<{}, {
173
173
  remark: Ref<string>;
174
174
  currentTab: Ref<AnyObject[]>;
175
175
  breadcrumbList: Ref<AnyObject[]>;
176
+ breadcrumbRef: Ref<any>;
176
177
  userList: Ref<AnyObject[]>;
177
178
  handleInput: () => void;
178
179
  _disabledIds: import("vue").ComputedRef<any[]>;
@@ -181,18 +182,21 @@ declare const _default: import("vue").DefineComponent<{}, {
181
182
  name: any;
182
183
  avatar: any;
183
184
  chatType: any;
185
+ roleInfo: any;
184
186
  }[]>;
185
187
  friends: import("vue").ComputedRef<{
186
188
  id: any;
187
189
  name: any;
188
190
  avatar: any;
189
191
  chatType: any;
192
+ roleInfo: any;
190
193
  }[]>;
191
194
  groups: import("vue").ComputedRef<{
192
195
  id: any;
193
196
  name: any;
194
197
  avatar: any;
195
198
  chatType: any;
199
+ roleInfo: any;
196
200
  }[]>;
197
201
  checkedIds: import("vue").ComputedRef<any[]>;
198
202
  btnDisabled: import("vue").ComputedRef<boolean>;
@@ -230,6 +234,8 @@ declare const _default: import("vue").DefineComponent<{}, {
230
234
  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<{}>>, {}>;
231
235
  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<{}>>, {}>;
232
236
  last: <T>(array: import("lodash").List<T> | null | undefined) => T | undefined;
237
+ isDoctorRole: typeof import("../utils").isDoctorRole;
238
+ getRoleName: typeof import("../utils").getRoleName;
233
239
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
234
240
  title: {
235
241
  type: StringConstructor;