cnhis-design-vue 3.2.9-beta.2 → 3.2.9-beta.22

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 (75) hide show
  1. package/es/components/ai-chat/src/components/ChatMain.js +1 -1
  2. package/es/components/ai-chat/src/types/index.d.ts +8 -7
  3. package/es/components/base-search/index.d.ts +2 -0
  4. package/es/components/base-search/src/index.vue.d.ts +2 -0
  5. package/es/components/button-print/index.d.ts +7 -45
  6. package/es/components/button-print/src/ButtonPrint.vue.d.ts +7 -45
  7. package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
  8. package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +6 -35
  9. package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
  10. package/es/components/button-print/src/components/OldPrintComponent.vue.d.ts +1 -5
  11. package/es/components/button-print/src/components/OldPrintComponent.vue2.js +1 -1
  12. package/es/components/button-print/src/utils/print.d.ts +5 -4
  13. package/es/components/button-print/src/utils/print.js +1 -1
  14. package/es/components/classification/src/components/table-modal/index.vue.d.ts +3 -0
  15. package/es/components/expand-field/index.d.ts +1 -1
  16. package/es/components/expand-field/src/components/form.vue.d.ts +1 -1
  17. package/es/components/expand-field/src/index.vue.d.ts +1 -1
  18. package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
  19. package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
  20. package/es/components/field-set/src/FieldColor.vue.d.ts +29 -6
  21. package/es/components/field-set/src/FieldFilter.vue.d.ts +29 -6
  22. package/es/components/field-set/src/FieldSet.vue.d.ts +68 -28
  23. package/es/components/field-set/src/FieldSet.vue2.js +1 -1
  24. package/es/components/field-set/src/components/table-row.vue.d.ts +28 -1
  25. package/es/components/field-set/src/components/table-row.vue2.js +1 -1
  26. package/es/components/field-set/src/types/index.d.ts +3 -3
  27. package/es/components/field-set/src/utils/index.js +1 -1
  28. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  29. package/es/components/iho-chat/index.d.ts +269 -1
  30. package/es/components/iho-chat/src/Index.vue.d.ts +269 -1
  31. package/es/components/iho-chat/src/Index.vue2.js +1 -1
  32. package/es/components/iho-chat/src/api/index.js +1 -1
  33. package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +5 -0
  34. package/es/components/iho-chat/src/components/ChatAdd.vue2.js +1 -1
  35. package/es/components/iho-chat/src/components/ChatFile.vue.d.ts +121 -1
  36. package/es/components/iho-chat/src/components/ChatFile.vue2.js +1 -1
  37. package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +6 -0
  38. package/es/components/iho-chat/src/components/ChatFooter.vue2.js +1 -1
  39. package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +130 -1
  40. package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +122 -0
  41. package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
  42. package/es/components/iho-chat/src/components/ChatRecord.vue2.js +1 -1
  43. package/es/components/iho-chat/src/components/ChatSet.vue.d.ts +5 -0
  44. package/es/components/iho-chat/src/components/ChatSet.vue2.js +1 -1
  45. package/es/components/iho-chat/src/components/ContextMenu.js +1 -1
  46. package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +5 -0
  47. package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
  48. package/es/components/iho-chat/src/components/SiderList.vue2.js +1 -1
  49. package/es/components/iho-chat/src/constants/index.d.ts +2 -1
  50. package/es/components/iho-chat/src/constants/index.js +1 -1
  51. package/es/components/iho-chat/src/hooks/useSearchUserList.js +1 -1
  52. package/es/components/iho-chat/src/hooks/useSession.js +1 -1
  53. package/es/components/iho-chat/src/hooks/useState.d.ts +5 -0
  54. package/es/components/iho-chat/src/hooks/useState.js +1 -1
  55. package/es/components/iho-chat/src/types/index.d.ts +1 -0
  56. package/es/components/iho-chat/src/utils/chatSock.js +1 -1
  57. package/es/components/iho-chat/style/index.css +1 -1
  58. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/index.js +1 -1
  59. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useRowHeight.d.ts +2 -0
  60. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useRowHeight.js +1 -0
  61. package/es/components/iho-table/src/types/index.d.ts +3 -0
  62. package/es/components/iho-table/style/index.css +1 -1
  63. package/es/components/index.css +1 -1
  64. package/es/components/quick-search/index.d.ts +3 -0
  65. package/es/components/quick-search/src/index.vue.d.ts +3 -0
  66. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  67. package/es/components/table-filter/src/hooks/useAdvanced.d.ts +1 -0
  68. package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
  69. package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -1
  70. package/es/components/table-filter/src/types/index.d.ts +2 -0
  71. package/es/env.d.ts +25 -25
  72. package/es/shared/package.json.js +1 -1
  73. package/es/shared/utils/index.d.ts +1 -0
  74. package/es/shared/utils/index.js +1 -1
  75. package/package.json +2 -2
@@ -74,6 +74,7 @@ declare const _default: import("vue").DefineComponent<{
74
74
  updateSessionItem: AnyObject;
75
75
  isUpdateSession: boolean;
76
76
  currentReferenceMsg: AnyObject | null;
77
+ currentReEditMsg: AnyObject | null;
77
78
  showVideo: boolean;
78
79
  currentAVMsg: AnyObject;
79
80
  currentGroupUser: AnyObject[];
@@ -347,6 +348,7 @@ declare const _default: import("vue").DefineComponent<{
347
348
  };
348
349
  defaultValue: {
349
350
  type: PropType<AnyObject[]>;
351
+ default: () => never[];
350
352
  };
351
353
  }, {
352
354
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
@@ -367,6 +369,7 @@ declare const _default: import("vue").DefineComponent<{
367
369
  };
368
370
  defaultValue: {
369
371
  type: PropType<AnyObject[]>;
372
+ default: () => never[];
370
373
  };
371
374
  }>> & {
372
375
  onComfirm?: ((...args: any[]) => any) | undefined;
@@ -381,6 +384,7 @@ declare const _default: import("vue").DefineComponent<{
381
384
  options: import("vue").Ref<AnyObject[]>;
382
385
  groupName: import("vue").Ref<string>;
383
386
  checkedSourceIds: import("vue").Ref<(string | number)[]>;
387
+ remark: import("vue").Ref<string>;
384
388
  userList: import("vue").Ref<AnyObject[]>;
385
389
  handleInput: () => void;
386
390
  _disabledIds: import("vue").ComputedRef<any[]>;
@@ -429,10 +433,12 @@ declare const _default: import("vue").DefineComponent<{
429
433
  };
430
434
  defaultValue: {
431
435
  type: PropType<AnyObject[]>;
436
+ default: () => never[];
432
437
  };
433
438
  }>> & {
434
439
  onComfirm?: ((...args: any[]) => any) | undefined;
435
440
  }, {
441
+ defaultValue: AnyObject[];
436
442
  mode: string;
437
443
  title: string;
438
444
  disabledIds: string[];
@@ -458,6 +464,11 @@ declare const _default: import("vue").DefineComponent<{
458
464
  };
459
465
  }>> & {}>>;
460
466
  state: IState;
467
+ relayMessage: (param: {
468
+ checkedIds: string[];
469
+ remark: string;
470
+ content: AnyObject;
471
+ }) => Promise<void>;
461
472
  imageList: import("vue").Ref<AnyObject[]>;
462
473
  fileList: import("vue").Ref<AnyObject[]>;
463
474
  imageRef: import("vue").Ref<any>;
@@ -472,7 +483,7 @@ declare const _default: import("vue").DefineComponent<{
472
483
  handleSearch: () => Promise<void>;
473
484
  formatImageList: (data: AnyObject[]) => {
474
485
  label: string;
475
- list: unknown;
486
+ list: any;
476
487
  }[];
477
488
  resetAndSearch: () => void;
478
489
  title: import("vue").ComputedRef<"聊天图片" | "聊天文件">;
@@ -485,8 +496,122 @@ declare const _default: import("vue").DefineComponent<{
485
496
  NIcon: any;
486
497
  NTooltip: any;
487
498
  SearchOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
499
+ OpenOutline: 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<{}>>, {}>;
488
500
  DownloadOutline: 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<{}>>, {}>;
489
501
  downloadFile: typeof import("./utils").downloadFile;
502
+ ChatAdd: import("vue").DefineComponent<{
503
+ title: {
504
+ type: StringConstructor;
505
+ default: string;
506
+ };
507
+ mode: {
508
+ type: StringConstructor;
509
+ default: string;
510
+ };
511
+ options: {
512
+ type: PropType<AnyObject[]>;
513
+ };
514
+ disabledIds: {
515
+ type: PropType<string[]>;
516
+ default: () => never[];
517
+ };
518
+ defaultValue: {
519
+ type: PropType<AnyObject[]>;
520
+ default: () => never[];
521
+ };
522
+ }, {
523
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
524
+ title: {
525
+ type: StringConstructor;
526
+ default: string;
527
+ };
528
+ mode: {
529
+ type: StringConstructor;
530
+ default: string;
531
+ };
532
+ options: {
533
+ type: PropType<AnyObject[]>;
534
+ };
535
+ disabledIds: {
536
+ type: PropType<string[]>;
537
+ default: () => never[];
538
+ };
539
+ defaultValue: {
540
+ type: PropType<AnyObject[]>;
541
+ default: () => never[];
542
+ };
543
+ }>> & {
544
+ onComfirm?: ((...args: any[]) => any) | undefined;
545
+ }>>;
546
+ emit: (event: "comfirm", ...args: any[]) => void;
547
+ state: IState;
548
+ setCurrentSessionItem: (item: AnyObject) => void;
549
+ listRef: import("vue").Ref<any>;
550
+ keyword: import("vue").Ref<string>;
551
+ showModal: import("vue").Ref<boolean>;
552
+ checkedOptions: import("vue").Ref<AnyObject[]>;
553
+ options: import("vue").Ref<AnyObject[]>;
554
+ groupName: import("vue").Ref<string>;
555
+ checkedSourceIds: import("vue").Ref<(string | number)[]>;
556
+ remark: import("vue").Ref<string>;
557
+ userList: import("vue").Ref<AnyObject[]>;
558
+ handleInput: () => void;
559
+ _disabledIds: import("vue").ComputedRef<any[]>;
560
+ defaultOptions: import("vue").ComputedRef<{
561
+ id: any;
562
+ name: any;
563
+ avatar: any;
564
+ }[]>;
565
+ checkedIds: import("vue").ComputedRef<any[]>;
566
+ btnDisabled: import("vue").ComputedRef<boolean>;
567
+ allChecked: import("vue").WritableComputedRef<boolean>;
568
+ handlePositiveClick: () => Promise<void>;
569
+ updateCheckedSourceIds: () => void;
570
+ handleSourceIdsUpdate: (value: (string | number)[], meta: {
571
+ actionType: "check" | "uncheck";
572
+ value: string | number;
573
+ }) => void;
574
+ closeTag: (id: string) => void;
575
+ NModal: any;
576
+ NButton: any;
577
+ NSpace: any;
578
+ NAvatar: any;
579
+ NIcon: any;
580
+ NTag: any;
581
+ NInput: any;
582
+ NCheckbox: any;
583
+ NCheckboxGroup: any;
584
+ NTooltip: any;
585
+ SearchOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
586
+ AddOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
587
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
588
+ title: {
589
+ type: StringConstructor;
590
+ default: string;
591
+ };
592
+ mode: {
593
+ type: StringConstructor;
594
+ default: string;
595
+ };
596
+ options: {
597
+ type: PropType<AnyObject[]>;
598
+ };
599
+ disabledIds: {
600
+ type: PropType<string[]>;
601
+ default: () => never[];
602
+ };
603
+ defaultValue: {
604
+ type: PropType<AnyObject[]>;
605
+ default: () => never[];
606
+ };
607
+ }>> & {
608
+ onComfirm?: ((...args: any[]) => any) | undefined;
609
+ }, {
610
+ defaultValue: AnyObject[];
611
+ mode: string;
612
+ title: string;
613
+ disabledIds: string[];
614
+ }>;
490
615
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
491
616
  type: {
492
617
  type: StringConstructor;
@@ -663,6 +788,7 @@ declare const _default: import("vue").DefineComponent<{
663
788
  };
664
789
  defaultValue: {
665
790
  type: PropType<AnyObject[]>;
791
+ default: () => never[];
666
792
  };
667
793
  }, {
668
794
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
@@ -683,6 +809,7 @@ declare const _default: import("vue").DefineComponent<{
683
809
  };
684
810
  defaultValue: {
685
811
  type: PropType<AnyObject[]>;
812
+ default: () => never[];
686
813
  };
687
814
  }>> & {
688
815
  onComfirm?: ((...args: any[]) => any) | undefined;
@@ -697,6 +824,7 @@ declare const _default: import("vue").DefineComponent<{
697
824
  options: import("vue").Ref<AnyObject[]>;
698
825
  groupName: import("vue").Ref<string>;
699
826
  checkedSourceIds: import("vue").Ref<(string | number)[]>;
827
+ remark: import("vue").Ref<string>;
700
828
  userList: import("vue").Ref<AnyObject[]>;
701
829
  handleInput: () => void;
702
830
  _disabledIds: import("vue").ComputedRef<any[]>;
@@ -745,10 +873,12 @@ declare const _default: import("vue").DefineComponent<{
745
873
  };
746
874
  defaultValue: {
747
875
  type: PropType<AnyObject[]>;
876
+ default: () => never[];
748
877
  };
749
878
  }>> & {
750
879
  onComfirm?: ((...args: any[]) => any) | undefined;
751
880
  }, {
881
+ defaultValue: AnyObject[];
752
882
  mode: string;
753
883
  title: string;
754
884
  disabledIds: string[];
@@ -759,12 +889,18 @@ declare const _default: import("vue").DefineComponent<{
759
889
  chatMainRef: import("vue").Ref<HTMLElement | undefined>;
760
890
  state: IState;
761
891
  setMsgList: (list?: AnyObject[]) => void;
892
+ relayMessage: (param: {
893
+ checkedIds: string[];
894
+ remark: string;
895
+ content: AnyObject;
896
+ }) => Promise<void>;
762
897
  setCurrentSessionItem: (item: AnyObject) => void;
763
898
  isGroupChat: import("vue").ComputedRef<boolean>;
764
899
  contextmenuRef: import("vue").Ref<any>;
765
900
  showMenu: import("vue").Ref<boolean>;
766
901
  menuPosition: any;
767
902
  menuMsgId: import("vue").Ref<any>;
903
+ relayTriggerRef: import("vue").Ref<any>;
768
904
  pageInfo: {
769
905
  page: number;
770
906
  hasMore: boolean;
@@ -781,6 +917,7 @@ declare const _default: import("vue").DefineComponent<{
781
917
  handleContextmenu: (event: MouseEvent, msgId: string) => Promise<void>;
782
918
  setMenuPosition: (event: MouseEvent) => Promise<void>;
783
919
  showMessage: (item: AnyObject) => boolean;
920
+ showReEdit: (item: AnyObject) => boolean;
784
921
  showReferenceMsg: (item: AnyObject) => any;
785
922
  showBlendMsg: (item: AnyObject) => any;
786
923
  showTemplateMsg: (item: AnyObject, type: "template" | "system") => boolean | undefined;
@@ -790,6 +927,8 @@ declare const _default: import("vue").DefineComponent<{
790
927
  resetInfo: () => void;
791
928
  setReferenceMsg: (msgItem: AnyObject) => void;
792
929
  handleSelect: (key: string, msgItem: AnyObject) => void;
930
+ handleRelay: (checkedIds: string[], remark: string) => void;
931
+ reEdit: (item: AnyObject) => void;
793
932
  NAvatar: any;
794
933
  NImageGroup: any;
795
934
  NImage: any;
@@ -974,6 +1113,119 @@ declare const _default: import("vue").DefineComponent<{
974
1113
  }, {
975
1114
  show: boolean;
976
1115
  }>;
1116
+ ChatAdd: import("vue").DefineComponent<{
1117
+ title: {
1118
+ type: StringConstructor;
1119
+ default: string;
1120
+ };
1121
+ mode: {
1122
+ type: StringConstructor;
1123
+ default: string;
1124
+ };
1125
+ options: {
1126
+ type: PropType<AnyObject[]>;
1127
+ };
1128
+ disabledIds: {
1129
+ type: PropType<string[]>;
1130
+ default: () => never[];
1131
+ };
1132
+ defaultValue: {
1133
+ type: PropType<AnyObject[]>;
1134
+ default: () => never[];
1135
+ };
1136
+ }, {
1137
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
1138
+ title: {
1139
+ type: StringConstructor;
1140
+ default: string;
1141
+ };
1142
+ mode: {
1143
+ type: StringConstructor;
1144
+ default: string;
1145
+ };
1146
+ options: {
1147
+ type: PropType<AnyObject[]>;
1148
+ };
1149
+ disabledIds: {
1150
+ type: PropType<string[]>;
1151
+ default: () => never[];
1152
+ };
1153
+ defaultValue: {
1154
+ type: PropType<AnyObject[]>;
1155
+ default: () => never[];
1156
+ };
1157
+ }>> & {
1158
+ onComfirm?: ((...args: any[]) => any) | undefined;
1159
+ }>>;
1160
+ emit: (event: "comfirm", ...args: any[]) => void;
1161
+ state: IState;
1162
+ setCurrentSessionItem: (item: AnyObject) => void;
1163
+ listRef: import("vue").Ref<any>;
1164
+ keyword: import("vue").Ref<string>;
1165
+ showModal: import("vue").Ref<boolean>;
1166
+ checkedOptions: import("vue").Ref<AnyObject[]>;
1167
+ options: import("vue").Ref<AnyObject[]>;
1168
+ groupName: import("vue").Ref<string>;
1169
+ checkedSourceIds: import("vue").Ref<(string | number)[]>;
1170
+ remark: import("vue").Ref<string>;
1171
+ userList: import("vue").Ref<AnyObject[]>;
1172
+ handleInput: () => void;
1173
+ _disabledIds: import("vue").ComputedRef<any[]>;
1174
+ defaultOptions: import("vue").ComputedRef<{
1175
+ id: any;
1176
+ name: any;
1177
+ avatar: any;
1178
+ }[]>;
1179
+ checkedIds: import("vue").ComputedRef<any[]>;
1180
+ btnDisabled: import("vue").ComputedRef<boolean>;
1181
+ allChecked: import("vue").WritableComputedRef<boolean>;
1182
+ handlePositiveClick: () => Promise<void>;
1183
+ updateCheckedSourceIds: () => void;
1184
+ handleSourceIdsUpdate: (value: (string | number)[], meta: {
1185
+ actionType: "check" | "uncheck";
1186
+ value: string | number;
1187
+ }) => void;
1188
+ closeTag: (id: string) => void;
1189
+ NModal: any;
1190
+ NButton: any;
1191
+ NSpace: any;
1192
+ NAvatar: any;
1193
+ NIcon: any;
1194
+ NTag: any;
1195
+ NInput: any;
1196
+ NCheckbox: any;
1197
+ NCheckboxGroup: any;
1198
+ NTooltip: any;
1199
+ SearchOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
1200
+ AddOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
1201
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1202
+ title: {
1203
+ type: StringConstructor;
1204
+ default: string;
1205
+ };
1206
+ mode: {
1207
+ type: StringConstructor;
1208
+ default: string;
1209
+ };
1210
+ options: {
1211
+ type: PropType<AnyObject[]>;
1212
+ };
1213
+ disabledIds: {
1214
+ type: PropType<string[]>;
1215
+ default: () => never[];
1216
+ };
1217
+ defaultValue: {
1218
+ type: PropType<AnyObject[]>;
1219
+ default: () => never[];
1220
+ };
1221
+ }>> & {
1222
+ onComfirm?: ((...args: any[]) => any) | undefined;
1223
+ }, {
1224
+ defaultValue: AnyObject[];
1225
+ mode: string;
1226
+ title: string;
1227
+ disabledIds: string[];
1228
+ }>;
977
1229
  simplifyMessage: typeof import("./utils").simplifyMessage;
978
1230
  isAudioOrVideoMessage: typeof isAudioOrVideoMessage;
979
1231
  getAVTime: typeof import("./utils").getAVTime;
@@ -1010,6 +1262,7 @@ declare const _default: import("vue").DefineComponent<{
1010
1262
  fileChange: (options: import("./types").FileOptions, chatMessageType: import("./constants").MESSAGE_TYPE) => Promise<void>;
1011
1263
  handleMsgSend: () => Promise<void>;
1012
1264
  doSendMessage: (contentInfo: AnyObject) => Promise<void>;
1265
+ clearInput: () => void;
1013
1266
  NButton: any;
1014
1267
  NPopover: any;
1015
1268
  NTooltip: any;
@@ -1034,6 +1287,7 @@ declare const _default: import("vue").DefineComponent<{
1034
1287
  };
1035
1288
  defaultValue: {
1036
1289
  type: PropType<AnyObject[]>;
1290
+ default: () => never[];
1037
1291
  };
1038
1292
  }, {
1039
1293
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
@@ -1054,6 +1308,7 @@ declare const _default: import("vue").DefineComponent<{
1054
1308
  };
1055
1309
  defaultValue: {
1056
1310
  type: PropType<AnyObject[]>;
1311
+ default: () => never[];
1057
1312
  };
1058
1313
  }>> & {
1059
1314
  onComfirm?: ((...args: any[]) => any) | undefined;
@@ -1068,6 +1323,7 @@ declare const _default: import("vue").DefineComponent<{
1068
1323
  options: import("vue").Ref<AnyObject[]>;
1069
1324
  groupName: import("vue").Ref<string>;
1070
1325
  checkedSourceIds: import("vue").Ref<(string | number)[]>;
1326
+ remark: import("vue").Ref<string>;
1071
1327
  userList: import("vue").Ref<AnyObject[]>;
1072
1328
  handleInput: () => void;
1073
1329
  _disabledIds: import("vue").ComputedRef<any[]>;
@@ -1116,10 +1372,12 @@ declare const _default: import("vue").DefineComponent<{
1116
1372
  };
1117
1373
  defaultValue: {
1118
1374
  type: PropType<AnyObject[]>;
1375
+ default: () => never[];
1119
1376
  };
1120
1377
  }>> & {
1121
1378
  onComfirm?: ((...args: any[]) => any) | undefined;
1122
1379
  }, {
1380
+ defaultValue: AnyObject[];
1123
1381
  mode: string;
1124
1382
  title: string;
1125
1383
  disabledIds: string[];
@@ -1226,6 +1484,7 @@ declare const _default: import("vue").DefineComponent<{
1226
1484
  };
1227
1485
  defaultValue: {
1228
1486
  type: PropType<AnyObject[]>;
1487
+ default: () => never[];
1229
1488
  };
1230
1489
  }, {
1231
1490
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
@@ -1246,6 +1505,7 @@ declare const _default: import("vue").DefineComponent<{
1246
1505
  };
1247
1506
  defaultValue: {
1248
1507
  type: PropType<AnyObject[]>;
1508
+ default: () => never[];
1249
1509
  };
1250
1510
  }>> & {
1251
1511
  onComfirm?: ((...args: any[]) => any) | undefined;
@@ -1260,6 +1520,7 @@ declare const _default: import("vue").DefineComponent<{
1260
1520
  options: import("vue").Ref<AnyObject[]>;
1261
1521
  groupName: import("vue").Ref<string>;
1262
1522
  checkedSourceIds: import("vue").Ref<(string | number)[]>;
1523
+ remark: import("vue").Ref<string>;
1263
1524
  userList: import("vue").Ref<AnyObject[]>;
1264
1525
  handleInput: () => void;
1265
1526
  _disabledIds: import("vue").ComputedRef<any[]>;
@@ -1308,10 +1569,12 @@ declare const _default: import("vue").DefineComponent<{
1308
1569
  };
1309
1570
  defaultValue: {
1310
1571
  type: PropType<AnyObject[]>;
1572
+ default: () => never[];
1311
1573
  };
1312
1574
  }>> & {
1313
1575
  onComfirm?: ((...args: any[]) => any) | undefined;
1314
1576
  }, {
1577
+ defaultValue: AnyObject[];
1315
1578
  mode: string;
1316
1579
  title: string;
1317
1580
  disabledIds: string[];
@@ -1449,6 +1712,7 @@ declare const _default: import("vue").DefineComponent<{
1449
1712
  };
1450
1713
  defaultValue: {
1451
1714
  type: PropType<AnyObject[]>;
1715
+ default: () => never[];
1452
1716
  };
1453
1717
  }, {
1454
1718
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
@@ -1469,6 +1733,7 @@ declare const _default: import("vue").DefineComponent<{
1469
1733
  };
1470
1734
  defaultValue: {
1471
1735
  type: PropType<AnyObject[]>;
1736
+ default: () => never[];
1472
1737
  };
1473
1738
  }>> & {
1474
1739
  onComfirm?: ((...args: any[]) => any) | undefined;
@@ -1483,6 +1748,7 @@ declare const _default: import("vue").DefineComponent<{
1483
1748
  options: import("vue").Ref<AnyObject[]>;
1484
1749
  groupName: import("vue").Ref<string>;
1485
1750
  checkedSourceIds: import("vue").Ref<(string | number)[]>;
1751
+ remark: import("vue").Ref<string>;
1486
1752
  userList: import("vue").Ref<AnyObject[]>;
1487
1753
  handleInput: () => void;
1488
1754
  _disabledIds: import("vue").ComputedRef<any[]>;
@@ -1531,10 +1797,12 @@ declare const _default: import("vue").DefineComponent<{
1531
1797
  };
1532
1798
  defaultValue: {
1533
1799
  type: PropType<AnyObject[]>;
1800
+ default: () => never[];
1534
1801
  };
1535
1802
  }>> & {
1536
1803
  onComfirm?: ((...args: any[]) => any) | undefined;
1537
1804
  }, {
1805
+ defaultValue: AnyObject[];
1538
1806
  mode: string;
1539
1807
  title: string;
1540
1808
  disabledIds: string[];
@@ -1 +1 @@
1
- import{defineComponent as e,ref as s,reactive as o,provide as t,onBeforeUnmount as n,openBlock as r,createElementBlock as i,normalizeStyle as a,unref as c,createVNode as d,withCtx as u,createBlock as l,Fragment as p,createElementVNode as m,renderSlot as h,createCommentVNode as f}from"vue";import{NConfigProvider as g,NSpin as y,NLayout as v,NLayoutContent as S}from"naive-ui";import b from"./components/SiderList.vue.js";import M from"./components/ChatHeader.vue.js";import I from"./components/ChatMain.vue.js";import k from"./components/ChatFooter.vue.js";import T from"./components/ChatSearch.vue.js";import V from"./components/ChatAdd.vue.js";import j from"./components/Video.vue.js";import L from"./components/MultipleVideo.vue.js";import{ChatSock as N}from"./utils/chatSock.js";import{instanceAxios as w,readMessageApi as U}from"./api/index.js";import{useTheme as A}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{remove as _,isNumber as C}from"lodash-es";import"@vue/shared";import"../../../shared/utils/index.js";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import"../../../shared/hooks/useScrollLoading.js";import{CHAT_TYPE as O,SUBSCRIBE_MESSAGE_TYPE as x,AV_STATUS as K}from"./constants/index.js";import{InjectionIChatState as R,InjectionIChatStompClient as E,InjectionIChatEmits as G}from"./types/index.js";import{isAudioOrVideoMessage as B}from"./utils/index.js";import{useSession as J}from"./hooks/useSession.js";import"trtc-sdk-v5";const P={key:0,class:"iho-chat__header"},$={class:"toolbar"};var q=e({__name:"Index",props:{token:{type:String,required:!0},orgId:{type:[String,Number],required:!0},userId:{type:String,required:!0},baseURL:{type:String,default:"/fdp-chat"},chatBox:{type:Boolean,default:!1},defaultSessionKey:{type:String}},emits:["template-click","unread-message-update"],setup(e,{expose:q,emit:F}){const H=e;w.defaults.baseURL=H.baseURL,w.defaults.headers.Authorization="bearer "+H.token;const z=A(),D=s(!1),W=s(),Y=o({orgId:H.orgId,currentSessionItem:{},id:"",userInfo:{id:H.userId},msgList:[],currentMsg:{},isAppendMsg:!1,sessionList:[],isChangeSession:!1,updateSessionItem:{},isUpdateSession:!1,currentReferenceMsg:null,showVideo:!1,currentAVMsg:{},currentGroupUser:[],showMultipleVideo:!1});t(R,Y),t(E,W),t(G,F);const{openSession:Q,closeSession:X,getCurrentSession:Z,setSessionList:ee,setUpdateSessionItem:se,setCurrentSessionItem:oe}=J(Y),te=[];function ne(){const e={headers:{AccessToken:H.token,UserId:H.userId},heartbeatFn(){try{W.value.send("test")}catch(e){W.value.disconnect(),ne()}},connectCb(){console.log("连接成功"),W.value.subscribe("/user/topic/single",(({body:e})=>ie({body:e,chatType:O.SINGLE}))),W.value.subscribe("/app/sessionList",(({body:e})=>{try{const s=JSON.parse(e),{authentication:o,currentUser:t,sessionVos:n}=s;if(console.log("body",s),Object.assign(Y.userInfo,t,o),!(null==n?void 0:n.length))return;ee(n),te.splice(0,te.length),te.push(...n.filter((e=>e.chatType===O.GROUP))),te.forEach((e=>{W.value.subscribe(`/topic/group/${e.receiver}`,(({body:e})=>ie({body:e,chatType:O.GROUP})))})),function(){const e=Y.sessionList.find((e=>e.sessionKey===H.defaultSessionKey));e&&Q(e)}()}catch(e){console.log(e)}}))},errorCb(e,s){console.log("断线了,正在重连...")}};W.value=new N("/fdp-chat/websocket",e)}async function re(e,s){if(Y.currentMsg=e,e.sessionKey===Y.currentSessionItem.sessionKey)return Y.isAppendMsg=!0,e.sender!==Y.userInfo.id&&await U({chatType:s,messageIdSet:[e.id],receiver:Y.userInfo.id,sender:e.sender}),void oe({lastMessageSendTime:e.sendTime,lastMessage:e.content,sortTime:e.sendTime,unreadNum:0,lastSenderName:e.senderName});const o={lastMessageSendTime:e.sendTime,sortTime:e.sendTime,lastMessage:e.content,sessionKey:e.sessionKey,lastSenderName:e.senderName};se(o)}async function ie({body:e,chatType:s}){try{console.log(JSON.parse(e),"订阅新增消息");const o=JSON.parse(e),{messageVo:t,sessionVo:n,chatAvStatusVo:r}=o;switch(o.event){case x.MESSAGE:B(t.content)?!Y.showVideo&&!Y.showMultipleVideo||t.content.avStatus!==K.IN_CALL?(Y.currentMsg=t,Object.assign(Y.currentAVMsg,{strRoomId:t.sessionKey,chatMessageType:t.content.chatMessageType,callMode:t.sender===Y.userInfo.id?"call":"invite",currentMsg:t}),Y.showVideo||Y.showMultipleVideo?re(t,s):Y.showVideo=!0):(W.value.send("/app/chat/send",{},JSON.stringify({chatType:O.SINGLE,receiver:t.sender,content:{chatMessageType:t.content.chatMessageType,avStatus:K.CALL_BUSY}})),console.log("用户忙!")):re(t,s);break;case x.AV_STATUS:Object.assign(Y.currentAVMsg,r,{callMode:r.sender===Y.userInfo.id?"call":"invite",checkedIds:[]}),Y.showVideo||Y.showMultipleVideo?console.log("用户忙!"):Y.showMultipleVideo=!0;break;case x.NEW_SESSION:if(s===O.GROUP)return;se(n);break;case x.JOIN:if(s===O.GROUP)return;se(n),W.value.subscribe(`/topic/group/${n.receiver}`,(({body:e})=>ie({body:e,chatType:O.GROUP})));break;case x.LEAVE:X(),_(Y.sessionList,(e=>e.sessionKey===n.sessionKey))}}catch(e){console.log(e)}}return async function(){ne()}(),n((()=>{var e;null==(e=W.value)||e.disconnect()})),q({getUnreadData:function(){return Y.sessionList.filter((e=>C(e.unreadNum)&&e.unreadNum>0))},openSession:Q,closeSession:X,getCurrentSession:Z}),(s,o)=>(r(),i("div",{class:"iho-chat",style:a(c(z))},[d(c(g),{abstract:"",namespace:"iho-chat__popover"},{default:u((()=>[D.value?(r(),l(c(y),{key:0,stroke:"#5585f5"})):(r(),i(p,{key:1},[e.chatBox?f("v-if",!0):(r(),i("div",P,[d(T),d(V,{title:"发起群聊",mode:"create","default-value":[Y.userInfo]},null,8,["default-value"]),m("div",$,[h(s.$slots,"toolbar")])])),d(c(v),{class:"iho-chat__body","has-sider":""},{default:u((()=>[e.chatBox?f("v-if",!0):(r(),l(b,{key:0})),d(c(S),{class:"chat-content"},{default:u((()=>[d(M),d(I),d(k)])),_:1}),h(s.$slots,"external")])),_:3}),Y.showVideo?(r(),l(j,{key:1})):f("v-if",!0),Y.showMultipleVideo?(r(),l(L,{key:2})):f("v-if",!0)],64))])),_:3})],4))}});export{q as default};
1
+ import{defineComponent as e,ref as s,reactive as t,provide as o,onBeforeUnmount as n,openBlock as r,createElementBlock as i,normalizeStyle as a,unref as c,createVNode as d,withCtx as u,createBlock as l,Fragment as p,createElementVNode as m,renderSlot as h,createCommentVNode as f}from"vue";import{NConfigProvider as y,NSpin as g,NLayout as S,NLayoutContent as v}from"naive-ui";import b from"./components/SiderList.vue.js";import M from"./components/ChatHeader.vue.js";import I from"./components/ChatMain.vue.js";import k from"./components/ChatFooter.vue.js";import T from"./components/ChatSearch.vue.js";import V from"./components/ChatAdd.vue.js";import j from"./components/Video.vue.js";import L from"./components/MultipleVideo.vue.js";import{ChatSock as A}from"./utils/chatSock.js";import{instanceAxios as N,readMessageApi as w}from"./api/index.js";import{useTheme as U}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{remove as _,isNumber as C}from"lodash-es";import"@vue/shared";import"../../../shared/utils/index.js";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import"../../../shared/hooks/useScrollLoading.js";import{CHAT_TYPE as E,SUBSCRIBE_MESSAGE_TYPE as O,AV_STATUS as x}from"./constants/index.js";import{InjectionIChatState as R,InjectionIChatStompClient as G,InjectionIChatEmits as K}from"./types/index.js";import{isAudioOrVideoMessage as B}from"./utils/index.js";import{useSession as P}from"./hooks/useSession.js";import"trtc-sdk-v5";const J={key:0,class:"iho-chat__header"},$={class:"toolbar"};var q=e({__name:"Index",props:{token:{type:String,required:!0},orgId:{type:[String,Number],required:!0},userId:{type:String,required:!0},baseURL:{type:String,default:"/fdp-chat"},chatBox:{type:Boolean,default:!1},defaultSessionKey:{type:String}},emits:["template-click","unread-message-update"],setup(e,{expose:q,emit:F}){const H=e;N.defaults.baseURL=H.baseURL,N.defaults.headers.Authorization="bearer "+H.token;const z=U(),D=s(!1),W=s(),Y=t({orgId:H.orgId,currentSessionItem:{},id:"",userInfo:{id:H.userId},msgList:[],currentMsg:{},isAppendMsg:!1,sessionList:[],isChangeSession:!1,updateSessionItem:{},isUpdateSession:!1,currentReferenceMsg:null,currentReEditMsg:null,showVideo:!1,currentAVMsg:{},currentGroupUser:[],showMultipleVideo:!1});o(R,Y),o(G,W),o(K,F);const{openSession:Q,closeSession:X,getCurrentSession:Z,setSessionList:ee,setUpdateSessionItem:se,setCurrentSessionItem:te}=P(Y),oe=[];function ne(){const e={headers:{AccessToken:H.token,UserId:H.userId},heartbeatFn(){try{W.value.send("test")}catch(e){W.value.disconnect(),ne()}},connectCb(){console.log("连接成功"),W.value.subscribe("/user/topic/single",(({body:e})=>ie({body:e,chatType:E.SINGLE}))),W.value.subscribe("/app/sessionList",(({body:e})=>{try{const s=JSON.parse(e),{authentication:t,currentUser:o,sessionVos:n}=s;if(Object.assign(Y.userInfo,o,t),!(null==n?void 0:n.length))return;ee(n),oe.splice(0,oe.length),oe.push(...n.filter((e=>e.chatType===E.GROUP))),oe.forEach((e=>{W.value.subscribe(`/topic/group/${e.receiver}`,(({body:e})=>ie({body:e,chatType:E.GROUP})))})),function(){const e=Y.sessionList.find((e=>e.sessionKey===H.defaultSessionKey));e&&Q(e)}()}catch(e){console.log(e)}}))},errorCb(e,s){}};W.value=new A("/fdp-chat/websocket",e)}async function re(e,s){if(Y.currentMsg=e,e.sessionKey===Y.currentSessionItem.sessionKey)return Y.isAppendMsg=!0,e.sender!==Y.userInfo.id&&await w({chatType:s,messageIdSet:[e.id],receiver:Y.userInfo.id,sender:e.sender}),void te({lastMessageSendTime:e.sendTime,lastMessage:e.content,sortTime:e.sendTime,unreadNum:0,lastSenderName:e.senderName});const t={lastMessageSendTime:e.sendTime,sortTime:e.sendTime,lastMessage:e.content,sessionKey:e.sessionKey,lastSenderName:e.senderName,sender:e.sender};se(t)}async function ie({body:e,chatType:s}){try{const t=JSON.parse(e),{messageVo:o,sessionVo:n,chatAvStatusVo:r}=t;switch(t.event){case O.MESSAGE:B(o.content)?!Y.showVideo&&!Y.showMultipleVideo||o.content.avStatus!==x.IN_CALL?(Y.currentMsg=o,Object.assign(Y.currentAVMsg,{strRoomId:o.sessionKey,chatMessageType:o.content.chatMessageType,callMode:o.sender===Y.userInfo.id?"call":"invite",currentMsg:o}),Y.showVideo||Y.showMultipleVideo?re(o,s):Y.showVideo=!0):(W.value.send("/app/chat/send",{},JSON.stringify({chatType:E.SINGLE,receiver:o.sender,content:{chatMessageType:o.content.chatMessageType,avStatus:x.CALL_BUSY}})),console.log("用户忙!")):re(o,s);break;case O.RECALL_MESSAGE:break;case O.AV_STATUS:Object.assign(Y.currentAVMsg,r,{callMode:r.sender===Y.userInfo.id?"call":"invite",checkedIds:[]}),Y.showVideo||Y.showMultipleVideo?console.log("用户忙!"):Y.showMultipleVideo=!0;break;case O.NEW_SESSION:if(s===E.GROUP)return;se(n);break;case O.JOIN:if(s===E.GROUP)return;se(n),W.value.subscribe(`/topic/group/${n.receiver}`,(({body:e})=>ie({body:e,chatType:E.GROUP})));break;case O.LEAVE:X(),_(Y.sessionList,(e=>e.sessionKey===n.sessionKey))}}catch(e){console.log(e)}}return async function(){ne()}(),n((()=>{var e;null==(e=W.value)||e.disconnect()})),q({getUnreadData:function(){return Y.sessionList.filter((e=>C(e.unreadNum)&&e.unreadNum>0))},openSession:Q,closeSession:X,getCurrentSession:Z}),(s,t)=>(r(),i("div",{class:"iho-chat",style:a(c(z))},[d(c(y),{abstract:"",namespace:"iho-chat__popover"},{default:u((()=>[D.value?(r(),l(c(g),{key:0,stroke:"#5585f5"})):(r(),i(p,{key:1},[e.chatBox?f("v-if",!0):(r(),i("div",J,[d(T),d(V,{title:"发起群聊",mode:"create","default-value":[Y.userInfo]},null,8,["default-value"]),m("div",$,[h(s.$slots,"toolbar")])])),d(c(S),{class:"iho-chat__body","has-sider":""},{default:u((()=>[e.chatBox?f("v-if",!0):(r(),l(b,{key:0})),d(c(v),{class:"chat-content"},{default:u((()=>[d(M),d(I),d(k)])),_:1}),h(s.$slots,"external")])),_:3}),Y.showVideo?(r(),l(j,{key:1})):f("v-if",!0),Y.showMultipleVideo?(r(),l(L,{key:2})):f("v-if",!0)],64))])),_:3})],4))}});export{q as default};
@@ -1 +1 @@
1
- import t from"axios";import{createDiscreteApi as e}from"naive-ui";const{message:o}=e(["message"]);function r(t){const e=[];for(const o in t){const r=t[o];Array.isArray(r)?r.forEach((t=>{e.push(`${encodeURIComponent(o)}=${encodeURIComponent(t)}`)})):e.push(`${encodeURIComponent(o)}=${encodeURIComponent(r)}`)}return e.join("&")}const n=t.create({withCredentials:!0,timeout:5e3});function a(t){return n({headers:{"Content-Type":"application/x-www-form-urlencoded"},method:"post",url:"/session/openSession",data:r(t)})}function u(t){return n({method:"get",url:"/chat/recordList",params:t})}function s(t){return n({headers:{"Content-Type":"application/x-www-form-urlencoded"},method:"post",url:"/session/toppingSession",data:r(t)})}function d(t){return n({headers:{"Content-Type":"multipart/form-data"},method:"post",url:"/chat/uploadFile",data:t})}function i(t){return n({method:"get",url:"/user/listUser",params:t})}function p(t){return n({method:"get",url:"/user/getUserDetail",params:t})}function c(t){return n({method:"post",url:"/chat/readMessage",data:t})}function l(t){return n({method:"post",url:"/chat/recallMessage",data:t})}function m(t){return n({method:"post",url:"/chat/searchChatRecord",data:t})}function h(t){return n({method:"post",url:"/group/create",data:t})}function f(t){return n({method:"get",url:"/group/user",params:t})}function g(t){return n({method:"post",url:"/group/join",data:t})}function C(t){return n({method:"post",url:"/group/leave",data:t})}function v(t){return n({method:"post",url:"/av/finish",data:t})}function w(t){return n({headers:{"Content-Type":"multipart/form-data"},method:"post",url:"/group/update",data:t})}n.interceptors.response.use((t=>{var e,r,n;if(null==(e=t.data)?void 0:e.result)return null==(r=t.data)?void 0:r.data;500==(null==(n=t.data)?void 0:n.code)&&t.data.msg?o.error(t.data.msg):console.log("请求错误")}));export{v as avFinishApi,u as getHistoryRecordApi,p as getUserDetailApi,h as groupCreateApi,g as groupJoinApi,C as groupLeaveApi,w as groupUpdateApi,f as groupUserApi,n as instanceAxios,i as listUserApi,a as openSessionApi,c as readMessageApi,l as recallMessageApi,m as searchChatRecordApi,s as toppingSessionApi,d as uploadFileApi};
1
+ import t from"axios";import{createDiscreteApi as e}from"naive-ui";const{message:o}=e(["message"]);function r(t){const e=[];for(const o in t){const r=t[o];Array.isArray(r)?r.forEach((t=>{e.push(`${encodeURIComponent(o)}=${encodeURIComponent(t)}`)})):e.push(`${encodeURIComponent(o)}=${encodeURIComponent(r)}`)}return e.join("&")}const n=t.create({withCredentials:!0,timeout:5e3});function a(t){return n({headers:{"Content-Type":"application/x-www-form-urlencoded"},method:"post",url:"/session/openSession",data:r(t)})}function u(t){return n({method:"get",url:"/chat/recordList",params:t})}function s(t){return n({headers:{"Content-Type":"application/x-www-form-urlencoded"},method:"post",url:"/session/toppingSession",data:r(t)})}function d(t){return n({headers:{"Content-Type":"multipart/form-data"},method:"post",url:"/chat/uploadFile",data:t})}function i(t){return n({method:"get",url:"/user/listUser",params:t})}function p(t){return n({method:"get",url:"/user/getUserDetail",params:t})}function c(t){return n({method:"post",url:"/chat/readMessage",data:t})}function m(t){return n({method:"post",url:"/chat/recallMessage",data:t})}function l(t){return n({method:"post",url:"/chat/searchChatRecord",data:t})}function h(t){return n({method:"post",url:"/group/create",data:t})}function f(t){return n({method:"get",url:"/group/user",params:t})}function g(t){return n({method:"post",url:"/group/join",data:t})}function C(t){return n({method:"post",url:"/group/leave",data:t})}function v(t){return n({method:"post",url:"/av/finish",data:t})}function w(t){return n({headers:{"Content-Type":"multipart/form-data"},method:"post",url:"/group/update",data:t})}n.interceptors.response.use((t=>{var e,r,n;if(null==(e=t.data)?void 0:e.result)return null==(r=t.data)?void 0:r.data;500==(null==(n=t.data)?void 0:n.code)&&t.data.msg&&o.error(t.data.msg)}));export{v as avFinishApi,u as getHistoryRecordApi,p as getUserDetailApi,h as groupCreateApi,g as groupJoinApi,C as groupLeaveApi,w as groupUpdateApi,f as groupUserApi,n as instanceAxios,i as listUserApi,a as openSessionApi,c as readMessageApi,m as recallMessageApi,l as searchChatRecordApi,s as toppingSessionApi,d as uploadFileApi};
@@ -18,6 +18,7 @@ declare const _default: import("vue").DefineComponent<{
18
18
  };
19
19
  defaultValue: {
20
20
  type: PropType<AnyObject[]>;
21
+ default: () => never[];
21
22
  };
22
23
  }, {
23
24
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
@@ -38,6 +39,7 @@ declare const _default: import("vue").DefineComponent<{
38
39
  };
39
40
  defaultValue: {
40
41
  type: PropType<AnyObject[]>;
42
+ default: () => never[];
41
43
  };
42
44
  }>> & {
43
45
  onComfirm?: ((...args: any[]) => any) | undefined;
@@ -52,6 +54,7 @@ declare const _default: import("vue").DefineComponent<{
52
54
  options: import("vue").Ref<AnyObject[]>;
53
55
  groupName: import("vue").Ref<string>;
54
56
  checkedSourceIds: import("vue").Ref<(string | number)[]>;
57
+ remark: import("vue").Ref<string>;
55
58
  userList: import("vue").Ref<AnyObject[]>;
56
59
  handleInput: () => void;
57
60
  _disabledIds: import("vue").ComputedRef<any[]>;
@@ -100,10 +103,12 @@ declare const _default: import("vue").DefineComponent<{
100
103
  };
101
104
  defaultValue: {
102
105
  type: PropType<AnyObject[]>;
106
+ default: () => never[];
103
107
  };
104
108
  }>> & {
105
109
  onComfirm?: ((...args: any[]) => any) | undefined;
106
110
  }, {
111
+ defaultValue: AnyObject[];
107
112
  mode: string;
108
113
  title: string;
109
114
  disabledIds: string[];
@@ -1 +1 @@
1
- import{defineComponent as e,ref as a,computed as l,watch as t,openBlock as i,createElementBlock as o,Fragment as r,createVNode as s,unref as u,withCtx as n,createElementVNode as d,createCommentVNode as v,isRef as c,renderList as p,createBlock as m,toDisplayString as f,createTextVNode as h,renderSlot as b}from"vue";import{NModal as g,NInput as I,NIcon as k,NCheckbox as y,NCheckboxGroup as w,NSpace as _,NAvatar as S,NTag as x,NTooltip as j,NButton as U}from"naive-ui";import{SearchOutline as C,AddOutline as L}from"@vicons/ionicons5";import{useState as A}from"../hooks/useState.js";import{useSession as R}from"../hooks/useSession.js";import{CHAT_TYPE as V}from"../constants/index.js";import"trtc-sdk-v5";import{listSort as E}from"../utils/index.js";import{groupLeaveApi as G,groupJoinApi as N,groupCreateApi as $}from"../api/index.js";import{cloneDeep as M,union as T,unionBy as z,remove as D,isArray as P,uniqBy as q,trim as B}from"lodash-es";import{useSearchUserList as F}from"../hooks/useSearchUserList.js";const H={class:"iho-chat-dialog__content iho-chat-add-wrapper"},J={key:0,class:"input-box"},K=d("span",null,"群名称:",-1),O={class:"transfer-box"},Q={class:"transfer-box__left"},W={class:"user-list-box"},X={key:1,class:"no-data"},Y={class:"transfer-box__right"},Z={class:"checked-tag-box"};var ee=e({__name:"ChatAdd",props:{title:{type:String,default:"添加新成员"},mode:{type:String,default:"select"},options:{type:Array},disabledIds:{type:Array,default:()=>[]},defaultValue:{type:Array}},emits:["comfirm"],setup(e,{emit:ee}){const ae=e,{state:le}=A(),{setCurrentSessionItem:te}=R(le),ie=a(),oe=a(""),re=a(!1),se=a([]),ue=a([]),ne=a(""),de=a([]),{userList:ve,handleInput:ce}=F({wrapperRef:ie,keywordRef:oe,before:()=>{ve.value=M(ue.value),Ie()},after:()=>{ve.value.forEach((e=>{var a;e.disabled=null==(a=pe.value)?void 0:a.includes(e.id)})),Ie()}}),pe=l((()=>T(ae.disabledIds,[le.userInfo.id]))),me=l((()=>{var e,a;return(null==(e=le.sessionList)?void 0:e.length)?null==(a=E(le.sessionList).filter((e=>e.chatType===V.SINGLE)))?void 0:a.map((e=>({id:e.receiver,name:e.name,avatar:e.avatar}))):[]})),fe=l((()=>se.value.length?se.value.map((e=>e.id)):[])),he=l((()=>"create"===ae.mode?fe.value.length<3:fe.value.length<1)),be=l({get:()=>de.value.length===ve.value.filter((e=>!e.disabled)).length,set(e){const a=ve.value.filter((e=>!e.disabled));de.value=e?a.map((e=>e.id)):[],e?se.value=z(se.value,a,"id"):D(se.value,(e=>a.map((e=>e.id)).includes(e.id)))}});async function ge(){switch(ae.mode){case"create":await $({creator:le.userInfo.id,memberIdSet:fe.value,name:B(ne.value),orgId:le.orgId});break;case"join":if(await N({groupId:le.currentSessionItem.receiver,operator:le.userInfo.id,memberIdSet:fe.value}),!le.currentSessionItem.defaultName){const e=se.value.map((e=>e.name)).join(",");te({name:`${le.currentSessionItem.name},${e}`})}le.currentGroupUser.push(...ve.value.filter((e=>fe.value.includes(e.id))));break;case"remove":if(await G({dissolution:!1,groupId:le.currentSessionItem.receiver,operator:le.userInfo.id,memberIdSet:fe.value}),!le.currentSessionItem.defaultName){const e=se.value.map((e=>e.name)).join(","),a=new RegExp(e,"g");te({name:le.currentSessionItem.name.replace(a,"")})}D(le.currentGroupUser,(e=>fe.value.includes(e.id)));break;default:ee("comfirm",fe.value)}re.value=!1}function Ie(){var e,a;de.value=null!=(a=null==(e=ve.value.filter((e=>fe.value.includes(e.id))))?void 0:e.map((e=>e.id)))?a:[]}function ke(e,a){if("check"===a.actionType){const e=ve.value.find((e=>e.id===a.value));se.value.push(e)}else D(se.value,(e=>e.id===a.value))}return t((()=>re.value),(e=>{if(!e)return;oe.value="",ne.value="";const a=P(ae.options)&&ae.options.length?ae.options:me.value;ue.value=q(a,"id").map((e=>{var a;return{...e,disabled:null==(a=pe.value)?void 0:a.includes(e.id)}})),ve.value=M(ue.value),P(ae.defaultValue)&&ae.defaultValue.length?(se.value=M(ae.defaultValue),Ie()):(se.value=[],de.value=[])})),(a,l)=>(i(),o(r,null,[s(u(g),{preset:"dialog",title:e.title,"show-icon":!1,"auto-focus":!1,"trap-focus":!1,class:"iho-chat-dialog",show:re.value,"onUpdate:show":l[4]||(l[4]=e=>re.value=e),"negative-text":"取消","positive-text":"确定","display-directive":"show","positive-button-props":{disabled:u(he)},onPositiveClick:ge},{default:n((()=>[d("div",H,["create"===e.mode?(i(),o("div",J,[K,s(u(I),{clearable:"",placeholder:"取个群名称方便后续搜索",value:ne.value,"onUpdate:value":l[0]||(l[0]=e=>ne.value=e),valueModifiers:{trim:!0}},null,8,["value"])])):v("v-if",!0),d("div",O,[d("div",Q,[s(u(I),{placeholder:"搜索",clearable:"",value:oe.value,"onUpdate:value":[l[1]||(l[1]=e=>oe.value=e),u(ce)],valueModifiers:{trim:!0}},{prefix:n((()=>[s(u(k),{component:u(C)},null,8,["component"])])),_:1},8,["value","onUpdate:value"]),d("div",W,[u(ve).length>0?(i(),o(r,{key:0},[s(u(y),{label:"全选",checked:u(be),"onUpdate:checked":l[2]||(l[2]=e=>c(be)?be.value=e:null)},null,8,["checked"]),s(u(w),{ref_key:"listRef",ref:ie,value:de.value,"onUpdate:value":[l[3]||(l[3]=e=>de.value=e),ke]},{default:n((()=>[(i(!0),o(r,null,p(u(ve),(e=>(i(),m(u(y),{key:e.id,value:e.id,disabled:e.disabled},{default:n((()=>[s(u(_),{align:"center","wrap-item":!1},{default:n((()=>[s(u(S),{src:e.avatar,round:"",size:32},null,8,["src"]),d("span",null,f(e.name),1)])),_:2},1024)])),_:2},1032,["value","disabled"])))),128))])),_:1},8,["value"])],64)):(i(),o("div",X,"找不到相关结果"))])]),d("div",Y,[d("span",null,"已选择 "+f(u(fe).length)+" 人",1),d("div",Z,[(i(!0),o(r,null,p(se.value,(e=>(i(),m(u(x),{key:e.id,bordered:!1,closable:e.id!==u(le).userInfo.id,disabled:u(pe).includes(e.id),onClose:()=>{return a=e.id,D(se.value,(e=>e.id===a)),void D(de.value,(e=>e===a));var a}},{avatar:n((()=>[s(u(S),{round:"",src:e.avatar},null,8,["src"])])),default:n((()=>[h(" "+f(e.name),1)])),_:2},1032,["closable","disabled","onClose"])))),128))])])])])])),_:1},8,["title","show","positive-button-props"]),d("span",{class:"btn-wrapper",onClick:l[5]||(l[5]=e=>re.value=!0)},[b(a.$slots,"trigger",{},(()=>[s(u(j),{"show-arrow":!1,placement:"bottom"},{trigger:n((()=>[s(u(U),{color:"#ffffff4D",class:"add-btn"},{icon:n((()=>[s(u(k),{component:u(L),color:"#fff"},null,8,["component"])])),_:1})])),default:n((()=>[h(" "+f(e.title),1)])),_:1})]))])],64))}});export{ee as default};
1
+ import{defineComponent as e,ref as a,computed as l,watch as t,openBlock as i,createElementBlock as u,Fragment as o,createVNode as r,unref as s,withCtx as n,createElementVNode as d,createCommentVNode as v,isRef as c,renderList as p,createBlock as m,toDisplayString as f,createTextVNode as h,renderSlot as b}from"vue";import{NModal as g,NInput as y,NIcon as I,NCheckbox as k,NCheckboxGroup as w,NSpace as _,NAvatar as x,NTag as S,NTooltip as U,NButton as j}from"naive-ui";import{SearchOutline as C,AddOutline as R}from"@vicons/ionicons5";import{useState as L}from"../hooks/useState.js";import{useSession as V}from"../hooks/useSession.js";import{CHAT_TYPE as A}from"../constants/index.js";import"trtc-sdk-v5";import{listSort as E}from"../utils/index.js";import{groupLeaveApi as G,groupJoinApi as N,groupCreateApi as $}from"../api/index.js";import{cloneDeep as z,union as M,intersection as T,unionBy as D,remove as P,isArray as q,uniqBy as B,trim as F}from"lodash-es";import{useSearchUserList as H}from"../hooks/useSearchUserList.js";const J={class:"iho-chat-dialog__content iho-chat-add-wrapper"},K={key:0,class:"input-box"},O=d("span",null,"群名称:",-1),Q={class:"transfer-box"},W={class:"transfer-box__left"},X={class:"user-list-box"},Y={key:1,class:"no-data"},Z={class:"transfer-box__right"},ee={class:"checked-tag-box"},ae={key:0,class:"input-wrapper"};var le=e({__name:"ChatAdd",props:{title:{type:String,default:"添加新成员"},mode:{type:String,default:"select"},options:{type:Array},disabledIds:{type:Array,default:()=>[]},defaultValue:{type:Array,default:()=>[]}},emits:["comfirm"],setup(e,{emit:le}){const te=e,{state:ie}=L(),{setCurrentSessionItem:ue}=V(ie),oe=a(),re=a(""),se=a(!1),ne=a([]),de=a([]),ve=a(""),ce=a([]),pe=a(""),{userList:me,handleInput:fe}=H({wrapperRef:oe,keywordRef:re,before:()=>{me.value=z(de.value),we()},after:()=>{he.value.length&&me.value.forEach((e=>{var a;e.disabled=null==(a=he.value)?void 0:a.includes(e.id)})),we()}}),he=l((()=>"relay"===te.mode?[]:M(te.disabledIds,[ie.userInfo.id]))),be=l((()=>{var e,a;if(!(null==(e=ie.sessionList)?void 0:e.length))return[];const l=E(ie.sessionList);return null==(a="relay"===te.mode?l:l.filter((e=>e.chatType===A.SINGLE)))?void 0:a.map((e=>({id:e.receiver,name:e.name,avatar:e.avatar})))})),ge=l((()=>ne.value.length?ne.value.map((e=>e.id)):[])),ye=l((()=>"create"===te.mode?ge.value.length<3:ge.value.length<1)),Ie=l({get:()=>ce.value.filter((e=>!he.value.includes(e))).length===me.value.filter((e=>!e.disabled)).length,set(e){const a=te.defaultValue.map((e=>e.id)),l=T(a,he.value,me.value.map((e=>e.id))),t=me.value.filter((e=>!e.disabled));ce.value=l.concat(e?t.map((e=>e.id)):[]),e?ne.value=D(ne.value,t,"id"):P(ne.value,(e=>t.map((e=>e.id)).includes(e.id)))}});async function ke(){switch(te.mode){case"create":await $({creator:ie.userInfo.id,memberIdSet:ge.value,name:F(ve.value),orgId:ie.orgId});break;case"join":if(await N({groupId:ie.currentSessionItem.receiver,operator:ie.userInfo.id,memberIdSet:ge.value}),!ie.currentSessionItem.defaultName){const e=ne.value.map((e=>e.name)).join(",");ue({name:`${ie.currentSessionItem.name},${e}`})}ie.currentGroupUser.push(...me.value.filter((e=>ge.value.includes(e.id))));break;case"remove":if(await G({dissolution:!1,groupId:ie.currentSessionItem.receiver,operator:ie.userInfo.id,memberIdSet:ge.value}),!ie.currentSessionItem.defaultName){const e=ne.value.map((e=>e.name)).join(","),a=new RegExp(e,"g");ue({name:ie.currentSessionItem.name.replace(a,"")})}P(ie.currentGroupUser,(e=>ge.value.includes(e.id)));break;default:le("comfirm",ge.value,pe.value)}se.value=!1}function we(){var e,a;ce.value=null!=(a=null==(e=me.value.filter((e=>ge.value.includes(e.id))))?void 0:e.map((e=>e.id)))?a:[]}function _e(e,a){if("check"===a.actionType){const e=me.value.find((e=>e.id===a.value));ne.value.push(e)}else P(ne.value,(e=>e.id===a.value))}return t((()=>se.value),(e=>{if(!e)return;re.value="",ve.value="";const a=q(te.options)&&te.options.length?te.options:be.value;de.value=B(a,"id").map((e=>{var a;return{...e,disabled:null==(a=he.value)?void 0:a.includes(e.id)}})),me.value=z(de.value),q(te.defaultValue)&&te.defaultValue.length?(ne.value=z(te.defaultValue),we()):(ne.value=[],ce.value=[])})),(a,l)=>(i(),u(o,null,[r(s(g),{preset:"dialog",title:e.title,"show-icon":!1,"auto-focus":!1,"trap-focus":!1,class:"iho-chat-dialog",show:se.value,"onUpdate:show":l[5]||(l[5]=e=>se.value=e),"negative-text":"取消","positive-text":"确定","display-directive":"show","positive-button-props":{disabled:s(ye)},onPositiveClick:ke},{default:n((()=>[d("div",J,["create"===e.mode?(i(),u("div",K,[O,r(s(y),{clearable:"",placeholder:"取个群名称方便后续搜索",value:ve.value,"onUpdate:value":l[0]||(l[0]=e=>ve.value=e),valueModifiers:{trim:!0}},null,8,["value"])])):v("v-if",!0),d("div",Q,[d("div",W,[r(s(y),{placeholder:"搜索",clearable:"",value:re.value,"onUpdate:value":[l[1]||(l[1]=e=>re.value=e),s(fe)],valueModifiers:{trim:!0}},{prefix:n((()=>[r(s(I),{component:s(C)},null,8,["component"])])),_:1},8,["value","onUpdate:value"]),d("div",X,[s(me).length>0?(i(),u(o,{key:0},[r(s(k),{label:"全选",checked:s(Ie),"onUpdate:checked":l[2]||(l[2]=e=>c(Ie)?Ie.value=e:null)},null,8,["checked"]),r(s(w),{ref_key:"listRef",ref:oe,value:ce.value,"onUpdate:value":[l[3]||(l[3]=e=>ce.value=e),_e]},{default:n((()=>[(i(!0),u(o,null,p(s(me),(e=>(i(),m(s(k),{key:e.id,value:e.id,disabled:e.disabled},{default:n((()=>[r(s(_),{align:"center","wrap-item":!1},{default:n((()=>[r(s(x),{src:e.avatar,round:"",size:32},null,8,["src"]),d("span",null,f(e.name),1)])),_:2},1024)])),_:2},1032,["value","disabled"])))),128))])),_:1},8,["value"])],64)):(i(),u("div",Y,"找不到相关结果"))])]),d("div",Z,[d("span",null,"已选择 "+f(s(ge).length)+" 人",1),d("div",ee,[(i(!0),u(o,null,p(ne.value,(a=>(i(),m(s(S),{key:a.id,bordered:!1,closable:"relay"===e.mode||a.id!==s(ie).userInfo.id,disabled:s(he).includes(a.id),onClose:()=>{return e=a.id,P(ne.value,(a=>a.id===e)),void P(ce.value,(a=>a===e));var e}},{avatar:n((()=>[r(s(x),{round:"",src:a.avatar},null,8,["src"])])),default:n((()=>[h(" "+f(a.name),1)])),_:2},1032,["closable","disabled","onClose"])))),128))]),"relay"===e.mode?(i(),u("div",ae,[r(s(y),{clearable:"",value:pe.value,"onUpdate:value":l[4]||(l[4]=e=>pe.value=e),type:"textarea",placeholder:"留言",autosize:{minRows:2,maxRows:2}},null,8,["value"])])):v("v-if",!0)])])])])),_:1},8,["title","show","positive-button-props"]),d("span",{class:"btn-wrapper",onClick:l[6]||(l[6]=e=>se.value=!0)},[b(a.$slots,"trigger",{},(()=>[r(s(U),{"show-arrow":!1,placement:"bottom"},{trigger:n((()=>[r(s(j),{color:"#ffffff4D",class:"add-btn"},{icon:n((()=>[r(s(I),{component:s(R),color:"#fff"},null,8,["component"])])),_:1})])),default:n((()=>[h(" "+f(e.title),1)])),_:1})]))])],64))}});export{le as default};