cnhis-design-vue 3.3.1-beta.13 → 3.3.1-beta.15

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 (100) hide show
  1. package/README.md +87 -87
  2. package/es/components/ai-chat/index.d.ts +141 -11
  3. package/es/components/ai-chat/src/Index.vue.d.ts +141 -11
  4. package/es/components/ai-chat/src/Index.vue2.js +1 -1
  5. package/es/components/ai-chat/src/api/index.d.ts +5 -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 +43 -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/ChatFooter.vue.d.ts +46 -1
  11. package/es/components/ai-chat/src/components/ChatFooter.vue2.js +1 -1
  12. package/es/components/ai-chat/src/components/ChatMain.js +1 -1
  13. package/es/components/ai-chat/src/components/ChatMainDefault.d.ts +2 -0
  14. package/es/components/ai-chat/src/components/ChatMainDefault.js +1 -0
  15. package/es/components/ai-chat/src/components/ChatRight.vue.d.ts +53 -0
  16. package/es/components/ai-chat/src/components/ChatRight.vue.js +1 -0
  17. package/es/components/ai-chat/src/components/ChatRight.vue2.js +1 -0
  18. package/es/components/ai-chat/src/components/card/JsonCard.d.ts +25 -0
  19. package/es/components/ai-chat/src/components/card/JsonCard.js +1 -0
  20. package/es/components/ai-chat/src/components/card/SelectIcon.d.ts +14 -0
  21. package/es/components/ai-chat/src/components/card/SelectIcon.js +1 -0
  22. package/es/components/ai-chat/src/hooks/useWebsocket.d.ts +2 -0
  23. package/es/components/ai-chat/src/hooks/useWebsocket.js +1 -0
  24. package/es/components/ai-chat/src/utils/index.d.ts +1 -0
  25. package/es/components/ai-chat/src/utils/index.js +1 -1
  26. package/es/components/ai-chat/style/index.css +1 -1
  27. package/es/components/audio-sdk/src/audioSDK.d.ts +2 -1
  28. package/es/components/audio-sdk/src/audioSDK.js +1 -1
  29. package/es/components/card-render/src/components/index.d.ts +23 -23
  30. package/es/components/classification/src/components/table-modal/index.vue.d.ts +3 -0
  31. package/es/components/editor/src/Editor.js +1 -1
  32. package/es/components/editor/style/index.css +1 -0
  33. package/es/components/iho-chat/index.d.ts +46 -0
  34. package/es/components/iho-chat/src/Index.vue.d.ts +46 -0
  35. package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +6 -0
  36. package/es/components/iho-chat/src/components/ChatAdd.vue2.js +1 -1
  37. package/es/components/iho-chat/src/components/ChatFile.vue.d.ts +6 -0
  38. package/es/components/iho-chat/src/components/ChatFile.vue2.js +1 -1
  39. package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +5 -0
  40. package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +22 -0
  41. package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +5 -0
  42. package/es/components/iho-chat/src/components/ChatRecord.vue.d.ts +4 -0
  43. package/es/components/iho-chat/src/components/ChatRecord.vue2.js +1 -1
  44. package/es/components/iho-chat/src/components/ChatSearch.vue2.js +1 -1
  45. package/es/components/iho-chat/src/components/ChatSet.vue.d.ts +8 -0
  46. package/es/components/iho-chat/src/components/ChatSet.vue2.js +1 -1
  47. package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +5 -0
  48. package/es/components/iho-chat/src/components/PersonProfile.vue.d.ts +3 -0
  49. package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
  50. package/es/components/iho-chat/src/components/SiderList.vue.d.ts +3 -1
  51. package/es/components/iho-chat/src/components/SiderList.vue2.js +1 -1
  52. package/es/components/iho-chat/src/constants/index.d.ts +7 -0
  53. package/es/components/iho-chat/src/constants/index.js +1 -1
  54. package/es/components/iho-chat/src/utils/index.d.ts +2 -0
  55. package/es/components/iho-chat/src/utils/index.js +1 -1
  56. package/es/components/iho-chat/style/index.css +1 -1
  57. package/es/components/index.css +1 -1
  58. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  59. package/es/env.d.ts +25 -25
  60. package/es/shared/assets/img/ai__avatar.png.js +1 -1
  61. package/es/shared/assets/img/defaultCover/10review_successful.png.js +1 -1
  62. package/es/shared/assets/img/defaultCover/11review_fail.png.js +1 -1
  63. package/es/shared/assets/img/defaultCover/12no_setting.png.js +1 -1
  64. package/es/shared/assets/img/defaultCover/13no_menu_setting.png.js +1 -1
  65. package/es/shared/assets/img/defaultCover/14no_call_setting.png.js +1 -1
  66. package/es/shared/assets/img/defaultCover/15no_use_tag.png.js +1 -1
  67. package/es/shared/assets/img/defaultCover/16no_table_data.png.js +1 -1
  68. package/es/shared/assets/img/defaultCover/1location.png.js +1 -1
  69. package/es/shared/assets/img/defaultCover/2notfound.png.js +1 -1
  70. package/es/shared/assets/img/defaultCover/3loading.png.js +1 -1
  71. package/es/shared/assets/img/defaultCover/4no_permission.png.js +1 -1
  72. package/es/shared/assets/img/defaultCover/5no_data.png.js +1 -1
  73. package/es/shared/assets/img/defaultCover/6no_network.png.js +1 -1
  74. package/es/shared/assets/img/defaultCover/7no_doctor.png.js +1 -1
  75. package/es/shared/assets/img/defaultCover/8system_error.png.js +1 -1
  76. package/es/shared/assets/img/defaultCover/9system_upgrade.png.js +1 -1
  77. package/es/shared/assets/img/failure.png.js +1 -1
  78. package/es/shared/assets/img/file-emr.png.js +1 -0
  79. package/es/shared/assets/img/file.png.js +1 -0
  80. package/es/shared/assets/img/logo.png.js +1 -1
  81. package/es/shared/assets/img/no-permission.png.js +1 -1
  82. package/es/shared/assets/img/nodata.png.js +1 -1
  83. package/es/shared/assets/img/notfound.png.js +1 -1
  84. package/es/shared/assets/img/qr.png.js +1 -1
  85. package/es/shared/assets/img/success.png.js +1 -1
  86. package/es/shared/assets/img/table_style_2.png.js +1 -1
  87. package/es/shared/assets/img/use.png.js +1 -0
  88. package/es/shared/assets/img/video.png.js +1 -1
  89. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  90. package/es/shared/assets/img/xb_big.png.js +1 -1
  91. package/es/shared/assets/img/xb_small.png.js +1 -1
  92. package/es/shared/package.json.js +1 -1
  93. package/package.json +2 -2
  94. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  95. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
  96. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
  97. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
  98. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
  99. package/es/shared/utils/fabricjs/index.d.ts +0 -6823
  100. package/es/shared/utils/tapable/index.d.ts +0 -139
@@ -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: {
@@ -759,18 +761,21 @@ declare const _default: import("vue").DefineComponent<{
759
761
  name: any;
760
762
  avatar: any;
761
763
  chatType: any;
764
+ roleInfo: any;
762
765
  }[]>;
763
766
  friends: import("vue").ComputedRef<{
764
767
  id: any;
765
768
  name: any;
766
769
  avatar: any;
767
770
  chatType: any;
771
+ roleInfo: any;
768
772
  }[]>;
769
773
  groups: import("vue").ComputedRef<{
770
774
  id: any;
771
775
  name: any;
772
776
  avatar: any;
773
777
  chatType: any;
778
+ roleInfo: any;
774
779
  }[]>;
775
780
  checkedIds: import("vue").ComputedRef<any[]>;
776
781
  btnDisabled: import("vue").ComputedRef<boolean>;
@@ -808,6 +813,8 @@ declare const _default: import("vue").DefineComponent<{
808
813
  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
814
  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
815
  last: <T>(array: import("lodash").List<T> | null | undefined) => T | undefined;
816
+ isDoctorRole: typeof import("./utils").isDoctorRole;
817
+ getRoleName: typeof import("./utils").getRoleName;
811
818
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
812
819
  title: {
813
820
  type: StringConstructor;
@@ -841,6 +848,8 @@ declare const _default: import("vue").DefineComponent<{
841
848
  mode: string;
842
849
  disabledIds: string[];
843
850
  }>;
851
+ isDoctorRole: typeof import("./utils").isDoctorRole;
852
+ getRoleName: typeof import("./utils").getRoleName;
844
853
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
845
854
  ChatFile: import("vue").DefineComponent<{
846
855
  type: {
@@ -913,6 +922,7 @@ declare const _default: import("vue").DefineComponent<{
913
922
  }[];
914
923
  resetAndSearch: () => void;
915
924
  title: import("vue").ComputedRef<"聊天图片" | "聊天文件">;
925
+ getFileDetails: (msg: string, type: string) => any;
916
926
  getDetail: (item: AnyObject) => string;
917
927
  getFileType: (item: AnyObject) => any;
918
928
  NModal: any;
@@ -1030,18 +1040,21 @@ declare const _default: import("vue").DefineComponent<{
1030
1040
  name: any;
1031
1041
  avatar: any;
1032
1042
  chatType: any;
1043
+ roleInfo: any;
1033
1044
  }[]>;
1034
1045
  friends: import("vue").ComputedRef<{
1035
1046
  id: any;
1036
1047
  name: any;
1037
1048
  avatar: any;
1038
1049
  chatType: any;
1050
+ roleInfo: any;
1039
1051
  }[]>;
1040
1052
  groups: import("vue").ComputedRef<{
1041
1053
  id: any;
1042
1054
  name: any;
1043
1055
  avatar: any;
1044
1056
  chatType: any;
1057
+ roleInfo: any;
1045
1058
  }[]>;
1046
1059
  checkedIds: import("vue").ComputedRef<any[]>;
1047
1060
  btnDisabled: import("vue").ComputedRef<boolean>;
@@ -1079,6 +1092,8 @@ declare const _default: import("vue").DefineComponent<{
1079
1092
  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
1093
  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
1094
  last: <T>(array: import("lodash").List<T> | null | undefined) => T | undefined;
1095
+ isDoctorRole: typeof import("./utils").isDoctorRole;
1096
+ getRoleName: typeof import("./utils").getRoleName;
1082
1097
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1083
1098
  title: {
1084
1099
  type: StringConstructor;
@@ -1167,6 +1182,7 @@ declare const _default: import("vue").DefineComponent<{
1167
1182
  };
1168
1183
  isForward: boolean;
1169
1184
  };
1185
+ cssVars: import("vue").ComputedRef<AnyObject>;
1170
1186
  recordRef: import("vue").Ref<any>;
1171
1187
  recordList: import("vue").Ref<AnyObject[]>;
1172
1188
  keyword: import("vue").Ref<any>;
@@ -1179,6 +1195,9 @@ declare const _default: import("vue").DefineComponent<{
1179
1195
  hasMore: boolean;
1180
1196
  lastSendTime: string;
1181
1197
  };
1198
+ getFileDetails: (msg: string, type: string) => any;
1199
+ getDetail: (item: AnyObject) => string;
1200
+ getFileType: (msg: string) => string;
1182
1201
  handleSearch: () => Promise<void>;
1183
1202
  resetAndSearch: () => void;
1184
1203
  startDateDisabled: (ts: number) => boolean;
@@ -1442,18 +1461,21 @@ declare const _default: import("vue").DefineComponent<{
1442
1461
  name: any;
1443
1462
  avatar: any;
1444
1463
  chatType: any;
1464
+ roleInfo: any;
1445
1465
  }[]>;
1446
1466
  friends: import("vue").ComputedRef<{
1447
1467
  id: any;
1448
1468
  name: any;
1449
1469
  avatar: any;
1450
1470
  chatType: any;
1471
+ roleInfo: any;
1451
1472
  }[]>;
1452
1473
  groups: import("vue").ComputedRef<{
1453
1474
  id: any;
1454
1475
  name: any;
1455
1476
  avatar: any;
1456
1477
  chatType: any;
1478
+ roleInfo: any;
1457
1479
  }[]>;
1458
1480
  checkedIds: import("vue").ComputedRef<any[]>;
1459
1481
  btnDisabled: import("vue").ComputedRef<boolean>;
@@ -1491,6 +1513,8 @@ declare const _default: import("vue").DefineComponent<{
1491
1513
  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
1514
  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
1515
  last: <T>(array: import("lodash").List<T> | null | undefined) => T | undefined;
1516
+ isDoctorRole: typeof import("./utils").isDoctorRole;
1517
+ getRoleName: typeof import("./utils").getRoleName;
1494
1518
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1495
1519
  title: {
1496
1520
  type: StringConstructor;
@@ -2015,18 +2039,21 @@ declare const _default: import("vue").DefineComponent<{
2015
2039
  name: any;
2016
2040
  avatar: any;
2017
2041
  chatType: any;
2042
+ roleInfo: any;
2018
2043
  }[]>;
2019
2044
  friends: import("vue").ComputedRef<{
2020
2045
  id: any;
2021
2046
  name: any;
2022
2047
  avatar: any;
2023
2048
  chatType: any;
2049
+ roleInfo: any;
2024
2050
  }[]>;
2025
2051
  groups: import("vue").ComputedRef<{
2026
2052
  id: any;
2027
2053
  name: any;
2028
2054
  avatar: any;
2029
2055
  chatType: any;
2056
+ roleInfo: any;
2030
2057
  }[]>;
2031
2058
  checkedIds: import("vue").ComputedRef<any[]>;
2032
2059
  btnDisabled: import("vue").ComputedRef<boolean>;
@@ -2064,6 +2091,8 @@ declare const _default: import("vue").DefineComponent<{
2064
2091
  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<{}>>, {}>;
2065
2092
  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<{}>>, {}>;
2066
2093
  last: <T>(array: import("lodash").List<T> | null | undefined) => T | undefined;
2094
+ isDoctorRole: typeof import("./utils").isDoctorRole;
2095
+ getRoleName: typeof import("./utils").getRoleName;
2067
2096
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
2068
2097
  title: {
2069
2098
  type: StringConstructor;
@@ -2287,18 +2316,21 @@ declare const _default: import("vue").DefineComponent<{
2287
2316
  name: any;
2288
2317
  avatar: any;
2289
2318
  chatType: any;
2319
+ roleInfo: any;
2290
2320
  }[]>;
2291
2321
  friends: import("vue").ComputedRef<{
2292
2322
  id: any;
2293
2323
  name: any;
2294
2324
  avatar: any;
2295
2325
  chatType: any;
2326
+ roleInfo: any;
2296
2327
  }[]>;
2297
2328
  groups: import("vue").ComputedRef<{
2298
2329
  id: any;
2299
2330
  name: any;
2300
2331
  avatar: any;
2301
2332
  chatType: any;
2333
+ roleInfo: any;
2302
2334
  }[]>;
2303
2335
  checkedIds: import("vue").ComputedRef<any[]>;
2304
2336
  btnDisabled: import("vue").ComputedRef<boolean>;
@@ -2336,6 +2368,8 @@ declare const _default: import("vue").DefineComponent<{
2336
2368
  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<{}>>, {}>;
2337
2369
  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<{}>>, {}>;
2338
2370
  last: <T>(array: import("lodash").List<T> | null | undefined) => T | undefined;
2371
+ isDoctorRole: typeof import("./utils").isDoctorRole;
2372
+ getRoleName: typeof import("./utils").getRoleName;
2339
2373
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
2340
2374
  title: {
2341
2375
  type: StringConstructor;
@@ -2614,18 +2648,21 @@ declare const _default: import("vue").DefineComponent<{
2614
2648
  name: any;
2615
2649
  avatar: any;
2616
2650
  chatType: any;
2651
+ roleInfo: any;
2617
2652
  }[]>;
2618
2653
  friends: import("vue").ComputedRef<{
2619
2654
  id: any;
2620
2655
  name: any;
2621
2656
  avatar: any;
2622
2657
  chatType: any;
2658
+ roleInfo: any;
2623
2659
  }[]>;
2624
2660
  groups: import("vue").ComputedRef<{
2625
2661
  id: any;
2626
2662
  name: any;
2627
2663
  avatar: any;
2628
2664
  chatType: any;
2665
+ roleInfo: any;
2629
2666
  }[]>;
2630
2667
  checkedIds: import("vue").ComputedRef<any[]>;
2631
2668
  btnDisabled: import("vue").ComputedRef<boolean>;
@@ -2663,6 +2700,8 @@ declare const _default: import("vue").DefineComponent<{
2663
2700
  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<{}>>, {}>;
2664
2701
  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<{}>>, {}>;
2665
2702
  last: <T>(array: import("lodash").List<T> | null | undefined) => T | undefined;
2703
+ isDoctorRole: typeof import("./utils").isDoctorRole;
2704
+ getRoleName: typeof import("./utils").getRoleName;
2666
2705
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
2667
2706
  title: {
2668
2707
  type: StringConstructor;
@@ -2977,18 +3016,21 @@ declare const _default: import("vue").DefineComponent<{
2977
3016
  name: any;
2978
3017
  avatar: any;
2979
3018
  chatType: any;
3019
+ roleInfo: any;
2980
3020
  }[]>;
2981
3021
  friends: import("vue").ComputedRef<{
2982
3022
  id: any;
2983
3023
  name: any;
2984
3024
  avatar: any;
2985
3025
  chatType: any;
3026
+ roleInfo: any;
2986
3027
  }[]>;
2987
3028
  groups: import("vue").ComputedRef<{
2988
3029
  id: any;
2989
3030
  name: any;
2990
3031
  avatar: any;
2991
3032
  chatType: any;
3033
+ roleInfo: any;
2992
3034
  }[]>;
2993
3035
  checkedIds: import("vue").ComputedRef<any[]>;
2994
3036
  btnDisabled: import("vue").ComputedRef<boolean>;
@@ -3026,6 +3068,8 @@ declare const _default: import("vue").DefineComponent<{
3026
3068
  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<{}>>, {}>;
3027
3069
  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<{}>>, {}>;
3028
3070
  last: <T>(array: import("lodash").List<T> | null | undefined) => T | undefined;
3071
+ isDoctorRole: typeof import("./utils").isDoctorRole;
3072
+ getRoleName: typeof import("./utils").getRoleName;
3029
3073
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
3030
3074
  title: {
3031
3075
  type: StringConstructor;
@@ -3125,6 +3169,8 @@ declare const _default: import("vue").DefineComponent<{
3125
3169
  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<{}>>, {}>;
3126
3170
  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<{}>>, {}>;
3127
3171
  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<{}>>, {}>;
3172
+ isDoctorRole: typeof import("./utils").isDoctorRole;
3173
+ getRoleName: typeof import("./utils").getRoleName;
3128
3174
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
3129
3175
  }, 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<{
3130
3176
  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;
@@ -105,18 +106,21 @@ declare const _default: import("vue").DefineComponent<{
105
106
  name: any;
106
107
  avatar: any;
107
108
  chatType: any;
109
+ roleInfo: any;
108
110
  }[]>;
109
111
  friends: import("vue").ComputedRef<{
110
112
  id: any;
111
113
  name: any;
112
114
  avatar: any;
113
115
  chatType: any;
116
+ roleInfo: any;
114
117
  }[]>;
115
118
  groups: import("vue").ComputedRef<{
116
119
  id: any;
117
120
  name: any;
118
121
  avatar: any;
119
122
  chatType: any;
123
+ roleInfo: any;
120
124
  }[]>;
121
125
  checkedIds: import("vue").ComputedRef<any[]>;
122
126
  btnDisabled: import("vue").ComputedRef<boolean>;
@@ -154,6 +158,8 @@ declare const _default: import("vue").DefineComponent<{
154
158
  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
159
  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
160
  last: <T>(array: import("lodash").List<T> | null | undefined) => T | undefined;
161
+ isDoctorRole: typeof isDoctorRole;
162
+ getRoleName: typeof getRoleName;
157
163
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
158
164
  title: {
159
165
  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}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 R,NTag as E,NTooltip as N}from"naive-ui";import{SearchOutline as z,PersonOutline as A,PeopleOutline as D,ChevronBackOutline as G,ChevronForwardOutline as T,AddOutline as V}from"@vicons/ionicons5";import{useData as $}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,isDoctorRole as K,getRoleName as Q}from"../utils/index.js";import{union as W,unionBy as X,remove as Y,intersection as Z,last as ee,isArray as le,uniqBy as ae,cloneDeep as ne,trim as oe}from"lodash-es";import"trtc-sdk-v5";import{useSearchUserList as te}from"../hooks/useSearchUserList.js";var ie,re;const ue={class:"iho-chat-dialog__content iho-chat-add-wrapper"},se={key:0,class:"input-box"},de=e("span",null,(null==(ie=window.getLanguageByCode)?void 0:ie.call(window,"10010.1.34"))||"群名称:",-1),ce={class:"transfer-box"},ve={class:"transfer-box__left"},pe={key:0,class:"nav-wrapper"},fe={key:0,class:"chat--iconfont chat--icon-map-site"},ge={style:{"font-size":"12px"}},me={key:1,class:"header"},he={class:"user-list-box"},ye={key:0,class:"org-list"},we={class:"seach-box"},ke={class:"ellipsis"},be={key:0,style:{"font-size":"12px",color:"#666","margin-right":"10px"}},Ie={key:1,class:"no-data"},Ce={class:"transfer-box__right"},_e={class:"checked-tag-box"},xe={class:"seach-box"},Le={class:"ellipsis"},je={key:0,class:"input-wrapper"};var Se=l({__name:"ChatAdd",props:{title:{type:String,default:(null==(re=window.getLanguageByCode)?void 0:re.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:ie}){const re=l;let Se=[];const Be=[{key:"single",label:"按好友选"},{key:"group",label:"按群聊选"},{key:"org",label:"按架构选"}];let Ue=[];const{state:Re,setCurrentSessionItem:Ee}=$(),Ne=a(),ze=a(""),Ae=a(!1),De=a([]),Ge=a(""),Te=a(""),Ve=a([]),$e=a([]),{userList:Me,handleInput:Oe}=te({wrapperRef:Ne,keywordRef:ze,before:()=>{Ve.value.length>0||(Me.value=Se)}}),Pe=n((()=>"relay"===re.mode?[]:W(re.disabledIds,[Re.userInfo.id]))),qe=n((()=>{var e;return(null==(e=Re.sessionList)?void 0:e.length)?J(Re.sessionList).map((e=>({id:e.receiver,name:e.name,avatar:e.avatar,chatType:e.chatType,roleInfo:e.roleInfo||""}))):[]})),Fe=n((()=>qe.value.filter((e=>e.chatType===M.SINGLE)))),He=n((()=>qe.value.filter((e=>e.chatType===M.GROUP)))),Je=n((()=>De.value.length?De.value.map((e=>e.id)):[])),Ke=n((()=>"create"===re.mode?Je.value.length<3:Je.value.length<1)),Qe=n({get:()=>We.value.filter((e=>!el(e))).length===Me.value.filter((e=>!el(e.id))).length,set(e){const l=[];if(Me.value.forEach((e=>{var a;if(1==e.type&&(null==(a=e.children)?void 0:a.length)){const a=ol(e.children||[]).filter((e=>!el(e.id)));l.push(...a)}else el(e.id)||l.push(e)})),e)De.value=X(De.value,l,"id");else{const e=l.map((e=>e.id));Y(De.value,(l=>e.includes(l.id)))}}}),We=n({get(){var e,l,a;return null!=(a=null==(l=null==(e=Me.value)?void 0:e.filter((e=>{var l;if(1==e.type&&(null==(l=e.children)?void 0:l.length)){const l=ol(e.children||[]).map((e=>e.id)).filter((e=>!el(e)));return Z(l,Je.value).length===l.length}return Je.value.includes(e.id)})))?void 0:l.map((e=>e.id)))?a:[]},set(e){Me.value.forEach((l=>{var a;const n=[];1==l.type&&(null==(a=l.children)?void 0:a.length)?n.push(...ol(l.children||[]).filter((e=>!el(e.id)))):n.push(l),e.includes(l.id)?De.value=X(De.value,n,"id"):Y(De.value,(e=>n.some((l=>l.id===e.id))))}))}}),Xe=n((()=>{var e;return Ve.value.length>0?null==(e=ee(Ve.value))?void 0:e.key:""})),Ye=n((()=>!("relay"!==re.mode&&["group","org"].includes(Xe.value)&&1===Ve.value.length)));function Ze(e){e.forEach((e=>{var l;1==e.type&&(null==(l=e.children)?void 0:l.length)?(e.total=ol(e.children).length,Ze(e.children)):2==e.type&&(e.total=0)}))}function el(e){var l,a;return"group"===Xe.value?"relay"!==re.mode&&(1===Ve.value.length||(null==(l=Pe.value)?void 0:l.includes(e))):null==(a=Pe.value)?void 0:a.includes(e)}function ll(){Ve.value.length>1?"group"===Xe.value?Me.value=He.value:"org"===Xe.value&&(Me.value=Ue.map((e=>({id:e.orgId,name:e.orgName}))),$e.value=[]):Me.value=Se,Ve.value.pop()}function al(e,l){const{id:a,children:n=[],type:o}=e;if("breadcrumb"!==l||ee($e.value).id!==a)if(o){const l=$e.value.findIndex((e=>e.id===a));l>-1?$e.value=$e.value.slice(0,l+1):$e.value.push(e),Me.value=n}else{const n=Ue.find((e=>e.orgId===a));$e.value=[e],Me.value=n.userList||[],l||Ve.value.push({key:Xe.value,label:n.orgName})}}function nl(e){const{children:l=[]}=e;if(!l.length)return!0;const a=ol(l).map((e=>e.id)).filter((e=>!Pe.value.includes(e)));return Z(a,Je.value).length===a.length}function ol(e){const l=[];return e.forEach((e=>{var a;1==e.type&&(null==(a=e.children)?void 0:a.length)?l.push(...ol(e.children)):2==e.type&&l.push(e)})),l}async function tl(){const e=s(Je);switch(re.mode){case"create":await H({creator:Re.userInfo.id,memberIdSet:e,name:oe(Ge.value),orgId:Re.orgId});break;case"join":if(await F({groupId:Re.currentSessionItem.receiver,operator:Re.userInfo.id,memberIdSet:e}),!Re.currentSessionItem.defaultName){const e=De.value.map((e=>e.name)).join(",");Ee({name:`${Re.currentSessionItem.name},${e}`})}Re.currentGroupUser.push(...Me.value.filter((l=>e.includes(l.id))));break;case"remove":if(await q({dissolution:!1,groupId:Re.currentSessionItem.receiver,operator:Re.userInfo.id,memberIdSet:e}),!Re.currentSessionItem.defaultName){const e=De.value.map((e=>e.name)).join(","),l=new RegExp(e,"g");Ee({name:Re.currentSessionItem.name.replace(l,"")})}Y(Re.currentGroupUser,(l=>e.includes(l.id)));break;default:ie("comfirm",{checkedIds:e,checkedOptions:De.value,remark:Te.value})}Ae.value=!1}return async function(){try{const e=await O();Ue=le(e)?e:[],Ue.forEach((e=>Ze(e.userList||[])))}catch(e){console.log("error ==>",e)}}(),o((()=>Ae.value),(e=>{if(!e)return;ze.value="",Ge.value="",Ve.value=[],$e.value=[];const l="relay"===re.mode?qe.value:Fe.value,a=le(re.options)&&re.options.length?re.options:l;Se=ae(a,"id"),Me.value=Se,De.value=le(re.defaultValue)&&re.defaultValue.length?ne(re.defaultValue):[]})),(a,n)=>{var o,$;return t(),i(r,null,[u(s(I),{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==($=window.getLanguageByCode)?void 0:$.call(window,"10010.1.27"))||"确定","display-directive":"show","positive-button-props":{disabled:s(Ke)},onPositiveClick:tl},{default:d((()=>{var a,o,b,I,N,V,$,M,O;return[e("div",ue,["create"===l.mode?(t(),i("div",se,[de,u(s(C),{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",ce,[e("div",ve,[u(s(C),{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(Oe)],valueModifiers:{trim:!0}},{prefix:d((()=>[u(s(_),{component:s(z)},null,8,["component"])])),_:1},8,["value","onUpdate:value"]),ze.value||"remove"===l.mode?c("v-if",!0):(t(),i("div",pe,[0===Ve.value.length?(t(),v(s(x),{key:0,justify:"space-around","wrap-item":!1},{default:d((()=>[(t(),i(r,null,p(Be,(l=>u(s(x),{vertical:"",align:"center","wrap-item":!1,key:l.key,onClick:()=>function(e){switch(ze.value="",Ve.value=[e],e.key){case"single":Me.value=Fe.value;break;case"group":Me.value=He.value;break;case"org":Me.value=Ue.map((e=>({id:e.orgId,name:e.orgName})))}}(l)},{default:d((()=>[u(s(L),{tertiary:""},{icon:d((()=>["org"===l.key?(t(),i("i",fe)):(t(),v(s(_),{key:1,component:"single"===l.key?s(A):s(D)},null,8,["component"]))])),_:2},1024),e("span",ge,f(l.label),1)])),_:2},1032,["onClick"]))),64))])),_:1})):c("v-if",!0),Ve.value.length>0?(t(),i("div",me,[u(s(L),{text:"",onClick:ll},{icon:d((()=>[u(s(_),{component:s(G)},null,8,["component"])])),_:1}),e("h4",null,f(null==(b=s(ee)(Ve.value))?void 0:b.label),1)])):c("v-if",!0),Ve.value.length>0&&"org"===(null==(I=s(ee)(Ve.value))?void 0:I.key)&&$e.value.length>0?(t(),v(s(j),{key:2,separator:">"},{default:d((()=>[(t(!0),i(r,null,p($e.value,(e=>(t(),v(s(S),{key:e.id,onClick:l=>al(e,"breadcrumb")},{default:d((()=>[g(f(e.name),1)])),_:2},1032,["onClick"])))),128))])),_:1})):c("v-if",!0)])),e("div",he,[s(Me).length>0?(t(),i(r,{key:0},[m(u(s(B),{label:(null==(N=window.getLanguageByCode)?void 0:N.call(window,"10010.1.37"))||"全选",checked:s(Qe),"onUpdate:checked":n[2]||(n[2]=e=>h(Qe)?Qe.value=e:null)},null,8,["checked"]),[[y,s(Ye)]]),"org"===s(Xe)&&1===Ve.value.length?(t(),i("div",ye,[(t(!0),i(r,null,p(s(Me),(l=>(t(),v(s(x),{"wrap-item":!1,align:"center",justify:"space-between",key:l.Id,onClick:e=>al(l)},{default:d((()=>[e("span",null,f(l.name),1),u(s(_),{size:"16",component:s(T)},null,8,["component"])])),_:2},1032,["onClick"])))),128))])):(t(),v(s(U),{key:1,ref_key:"listRef",ref:Ne,value:s(We),"onUpdate:value":n[3]||(n[3]=e=>h(We)?We.value=e:null)},{default:d((()=>[(t(!0),i(r,null,p(s(Me),(l=>(t(),v(s(B),{key:l.id,value:l.id,disabled:el(l.id),onClick:()=>async function(e){const l=s(Xe);if(l&&"relay"!==re.mode&&"group"===l&&1===Ve.value.length)try{Ve.value.push({key:l,label:e.name});const a=await P({id:e.id});Me.value=le(a)?a:[]}catch(e){console.log("error ==>",e)}}(l)},{default:d((()=>[u(s(x),{align:"center","wrap-item":!1,wrap:!1},{default:d((()=>[u(s(R),{src:l.avatar,round:"",size:32},null,8,["src"]),e("div",we,[e("span",ke,f(l.name),1),m(e("label",{class:w(["iho-chatRole",s(K)(l.roleInfo)?"isDoctor":""])},f(s(Q)(l.roleInfo)),3),[[y,s(Q)(l.roleInfo)]])]),l.total?(t(),i("span",be," ("+f(l.total)+"人) ",1)):c("v-if",!0),1==l.type&&l.children.length>0?(t(),v(s(L),{key:1,type:"primary",text:"",disabled:nl(l),style:{"margin-left":"auto"},onClick:k((e=>al(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",Ie,(null==(V=window.getLanguageByCode)?void 0:V.call(window,"10010.1.38"))||"找不到相关结果"))])]),e("div",Ce,[e("span",null,((null==($=window.getLanguageByCode)?void 0:$.call(window,"10010.1.39"))||"已选择")+f(s(Je).length)+((null==(M=window.getLanguageByCode)?void 0:M.call(window,"10010.1.40"))||"人"),1),e("div",_e,[(t(!0),i(r,null,p(De.value,(a=>(t(),v(s(E),{key:a.id,bordered:!1,closable:"relay"===l.mode||a.id!==s(Re).userInfo.id,disabled:s(Pe).includes(a.id),onClose:()=>{return e=a.id,void Y(De.value,(l=>l.id===e));var e}},{avatar:d((()=>[u(s(R),{round:"",src:a.avatar},null,8,["src"])])),default:d((()=>[e("div",xe,[e("span",Le,f(a.name),1),m(e("label",{class:w(["iho-chatRole",s(K)(a.roleInfo)?"isDoctor":""])},f(s(Q)(a.roleInfo)),3),[[y,s(Q)(a.roleInfo)]])])])),_:2},1032,["closable","disabled","onClose"])))),128))]),"relay"===l.mode?(t(),i("div",je,[u(s(C),{clearable:"",value:Te.value,"onUpdate:value":n[4]||(n[4]=e=>Te.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(N),{"show-arrow":!1,placement:"bottom"},{trigger:d((()=>[u(s(L),{color:"#ffffff4D",class:"add-btn"},{icon:d((()=>[u(s(_),{component:s(V),color:"#fff"},null,8,["component"])])),_:1})])),default:d((()=>[g(" "+f(l.title),1)])),_:1})]))],2)],64)}}});export{Se 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;
@@ -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>;
@@ -238,6 +242,8 @@ declare const _default: import("vue").DefineComponent<{
238
242
  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
243
  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
244
  last: <T>(array: import("lodash").List<T> | null | undefined) => T | undefined;
245
+ isDoctorRole: typeof import("../utils").isDoctorRole;
246
+ getRoleName: typeof import("../utils").getRoleName;
241
247
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
242
248
  title: {
243
249
  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};
@@ -181,18 +181,21 @@ declare const _default: import("vue").DefineComponent<{}, {
181
181
  name: any;
182
182
  avatar: any;
183
183
  chatType: any;
184
+ roleInfo: any;
184
185
  }[]>;
185
186
  friends: import("vue").ComputedRef<{
186
187
  id: any;
187
188
  name: any;
188
189
  avatar: any;
189
190
  chatType: any;
191
+ roleInfo: any;
190
192
  }[]>;
191
193
  groups: import("vue").ComputedRef<{
192
194
  id: any;
193
195
  name: any;
194
196
  avatar: any;
195
197
  chatType: any;
198
+ roleInfo: any;
196
199
  }[]>;
197
200
  checkedIds: import("vue").ComputedRef<any[]>;
198
201
  btnDisabled: import("vue").ComputedRef<boolean>;
@@ -230,6 +233,8 @@ declare const _default: import("vue").DefineComponent<{}, {
230
233
  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
234
  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
235
  last: <T>(array: import("lodash").List<T> | null | undefined) => T | undefined;
236
+ isDoctorRole: typeof import("../utils").isDoctorRole;
237
+ getRoleName: typeof import("../utils").getRoleName;
233
238
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
234
239
  title: {
235
240
  type: StringConstructor;
@@ -228,18 +228,21 @@ declare const _default: import("vue").DefineComponent<{}, {
228
228
  name: any;
229
229
  avatar: any;
230
230
  chatType: any;
231
+ roleInfo: any;
231
232
  }[]>;
232
233
  friends: import("vue").ComputedRef<{
233
234
  id: any;
234
235
  name: any;
235
236
  avatar: any;
236
237
  chatType: any;
238
+ roleInfo: any;
237
239
  }[]>;
238
240
  groups: import("vue").ComputedRef<{
239
241
  id: any;
240
242
  name: any;
241
243
  avatar: any;
242
244
  chatType: any;
245
+ roleInfo: any;
243
246
  }[]>;
244
247
  checkedIds: import("vue").ComputedRef<any[]>;
245
248
  btnDisabled: import("vue").ComputedRef<boolean>;
@@ -277,6 +280,8 @@ declare const _default: import("vue").DefineComponent<{}, {
277
280
  ChevronBackOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
278
281
  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<{}>>, {}>;
279
282
  last: <T>(array: import("lodash").List<T> | null | undefined) => T | undefined;
283
+ isDoctorRole: typeof import("../utils").isDoctorRole;
284
+ getRoleName: typeof import("../utils").getRoleName;
280
285
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
281
286
  title: {
282
287
  type: StringConstructor;
@@ -310,6 +315,8 @@ declare const _default: import("vue").DefineComponent<{}, {
310
315
  mode: string;
311
316
  disabledIds: string[];
312
317
  }>;
318
+ isDoctorRole: typeof import("../utils").isDoctorRole;
319
+ getRoleName: typeof import("../utils").getRoleName;
313
320
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
314
321
  ChatFile: import("vue").DefineComponent<{
315
322
  type: {
@@ -382,6 +389,7 @@ declare const _default: import("vue").DefineComponent<{}, {
382
389
  }[];
383
390
  resetAndSearch: () => void;
384
391
  title: import("vue").ComputedRef<"聊天图片" | "聊天文件">;
392
+ getFileDetails: (msg: string, type: string) => any;
385
393
  getDetail: (item: AnyObject) => string;
386
394
  getFileType: (item: AnyObject) => any;
387
395
  NModal: any;
@@ -499,18 +507,21 @@ declare const _default: import("vue").DefineComponent<{}, {
499
507
  name: any;
500
508
  avatar: any;
501
509
  chatType: any;
510
+ roleInfo: any;
502
511
  }[]>;
503
512
  friends: import("vue").ComputedRef<{
504
513
  id: any;
505
514
  name: any;
506
515
  avatar: any;
507
516
  chatType: any;
517
+ roleInfo: any;
508
518
  }[]>;
509
519
  groups: import("vue").ComputedRef<{
510
520
  id: any;
511
521
  name: any;
512
522
  avatar: any;
513
523
  chatType: any;
524
+ roleInfo: any;
514
525
  }[]>;
515
526
  checkedIds: import("vue").ComputedRef<any[]>;
516
527
  btnDisabled: import("vue").ComputedRef<boolean>;
@@ -548,6 +559,8 @@ declare const _default: import("vue").DefineComponent<{}, {
548
559
  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<{}>>, {}>;
549
560
  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<{}>>, {}>;
550
561
  last: <T>(array: import("lodash").List<T> | null | undefined) => T | undefined;
562
+ isDoctorRole: typeof import("../utils").isDoctorRole;
563
+ getRoleName: typeof import("../utils").getRoleName;
551
564
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
552
565
  title: {
553
566
  type: StringConstructor;
@@ -636,6 +649,7 @@ declare const _default: import("vue").DefineComponent<{}, {
636
649
  };
637
650
  isForward: boolean;
638
651
  };
652
+ cssVars: import("vue").ComputedRef<AnyObject>;
639
653
  recordRef: import("vue").Ref<any>;
640
654
  recordList: import("vue").Ref<AnyObject[]>;
641
655
  keyword: import("vue").Ref<any>;
@@ -648,6 +662,9 @@ declare const _default: import("vue").DefineComponent<{}, {
648
662
  hasMore: boolean;
649
663
  lastSendTime: string;
650
664
  };
665
+ getFileDetails: (msg: string, type: string) => any;
666
+ getDetail: (item: AnyObject) => string;
667
+ getFileType: (msg: string) => string;
651
668
  handleSearch: () => Promise<void>;
652
669
  resetAndSearch: () => void;
653
670
  startDateDisabled: (ts: number) => boolean;
@@ -911,18 +928,21 @@ declare const _default: import("vue").DefineComponent<{}, {
911
928
  name: any;
912
929
  avatar: any;
913
930
  chatType: any;
931
+ roleInfo: any;
914
932
  }[]>;
915
933
  friends: import("vue").ComputedRef<{
916
934
  id: any;
917
935
  name: any;
918
936
  avatar: any;
919
937
  chatType: any;
938
+ roleInfo: any;
920
939
  }[]>;
921
940
  groups: import("vue").ComputedRef<{
922
941
  id: any;
923
942
  name: any;
924
943
  avatar: any;
925
944
  chatType: any;
945
+ roleInfo: any;
926
946
  }[]>;
927
947
  checkedIds: import("vue").ComputedRef<any[]>;
928
948
  btnDisabled: import("vue").ComputedRef<boolean>;
@@ -960,6 +980,8 @@ declare const _default: import("vue").DefineComponent<{}, {
960
980
  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<{}>>, {}>;
961
981
  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<{}>>, {}>;
962
982
  last: <T>(array: import("lodash").List<T> | null | undefined) => T | undefined;
983
+ isDoctorRole: typeof import("../utils").isDoctorRole;
984
+ getRoleName: typeof import("../utils").getRoleName;
963
985
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
964
986
  title: {
965
987
  type: StringConstructor;