cnhis-design-vue 3.2.9-beta.8 → 3.2.9-release.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/ai-chat/src/components/ChatMain.js +1 -1
- package/es/components/base-search/index.d.ts +2 -0
- package/es/components/base-search/src/index.vue.d.ts +2 -0
- package/es/components/button-print/index.d.ts +30 -13
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +30 -13
- package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
- package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +9 -4
- package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
- package/es/components/button-print/src/components/OldPrintComponent.vue.d.ts +9 -4
- package/es/components/button-print/src/components/OldPrintComponent.vue2.js +1 -1
- package/es/components/button-print/src/utils/print.d.ts +8 -6
- package/es/components/button-print/src/utils/print.js +1 -1
- package/es/components/classification/index.d.ts +87 -0
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +87 -0
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +87 -0
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +3 -0
- package/es/components/classification/src/index.vue.d.ts +87 -0
- package/es/components/date-picker/index.d.ts +29 -0
- package/es/components/date-picker/src/DatePicker.vue.d.ts +30 -1
- package/es/components/date-picker/src/DatePicker.vue2.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useOther.js +1 -1
- package/es/components/field-set/index.d.ts +8 -1
- package/es/components/field-set/src/FieldColor.vue.d.ts +89 -6
- package/es/components/field-set/src/FieldColor.vue2.js +1 -1
- package/es/components/field-set/src/FieldFilter.vue.d.ts +31 -6
- package/es/components/field-set/src/FieldFilter.vue2.js +1 -1
- package/es/components/field-set/src/FieldSet.vue.d.ts +73 -30
- package/es/components/field-set/src/FieldSet.vue2.js +1 -1
- package/es/components/field-set/src/Index.vue.d.ts +8 -1
- package/es/components/field-set/src/Index.vue2.js +1 -1
- package/es/components/field-set/src/TableStyle.vue2.js +1 -1
- package/es/components/field-set/src/components/condition.vue.d.ts +29 -0
- package/es/components/field-set/src/components/edit-dialog.vue.d.ts +58 -0
- package/es/components/field-set/src/components/edit-filter.vue.d.ts +29 -0
- package/es/components/field-set/src/components/table-row.vue.d.ts +28 -1
- package/es/components/field-set/src/components/table-row.vue2.js +1 -1
- package/es/components/field-set/src/types/index.d.ts +4 -3
- package/es/components/field-set/src/utils/index.js +1 -1
- package/es/components/field-set/style/index.css +1 -1
- package/es/components/form-render/src/components/renderer/select.d.ts +2 -1
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/iho-chat/index.d.ts +316 -6
- package/es/components/iho-chat/src/Index.vue.d.ts +316 -6
- package/es/components/iho-chat/src/Index.vue2.js +1 -1
- package/es/components/iho-chat/src/api/index.js +1 -1
- package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +5 -0
- package/es/components/iho-chat/src/components/ChatAdd.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatFile.vue.d.ts +121 -1
- package/es/components/iho-chat/src/components/ChatFile.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +6 -0
- package/es/components/iho-chat/src/components/ChatFooter.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +160 -2
- package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +122 -0
- package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatRecord.vue.d.ts +29 -0
- package/es/components/iho-chat/src/components/ChatRecord.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatSet.vue.d.ts +6 -1
- package/es/components/iho-chat/src/components/ChatSet.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ContextMenu.js +1 -1
- package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +5 -0
- package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
- package/es/components/iho-chat/src/components/SiderList.vue.d.ts +1 -3
- package/es/components/iho-chat/src/components/SiderList.vue2.js +1 -1
- package/es/components/iho-chat/src/constants/index.d.ts +2 -1
- package/es/components/iho-chat/src/constants/index.js +1 -1
- package/es/components/iho-chat/src/hooks/useSearchUserList.js +1 -1
- package/es/components/iho-chat/src/hooks/useSession.js +1 -1
- package/es/components/iho-chat/src/hooks/useState.d.ts +6 -0
- package/es/components/iho-chat/src/hooks/useState.js +1 -1
- package/es/components/iho-chat/src/types/index.d.ts +3 -1
- package/es/components/iho-chat/src/types/index.js +1 -1
- package/es/components/iho-chat/src/utils/chatSock.js +1 -1
- package/es/components/iho-chat/style/index.css +1 -1
- package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.d.ts +29 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +29 -0
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/index.js +1 -1
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useRowHeight.d.ts +2 -0
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useRowHeight.js +1 -0
- package/es/components/iho-table/src/types/index.d.ts +3 -0
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/quick-search/index.d.ts +3 -0
- package/es/components/quick-search/src/index.vue.d.ts +3 -0
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue.d.ts +29 -0
- package/es/components/table-filter/src/components/bi-filter/components/Date.vue.d.ts +29 -0
- package/es/components/table-filter/src/components/bi-filter/components/index.d.ts +29 -0
- package/es/components/table-filter/src/components/bi-filter/index.vue.d.ts +29 -0
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +58 -0
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +29 -0
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +29 -0
- package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +58 -0
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +58 -0
- package/es/components/table-filter/src/components/render-widget/components/DateInner.vue.d.ts +29 -0
- package/es/components/table-filter/src/components/render-widget/components/DateOut.vue.d.ts +29 -0
- package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.d.ts +29 -0
- package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.d.ts +29 -0
- package/es/components/table-filter/src/components/render-widget/components/index.d.ts +116 -0
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +116 -0
- package/es/components/table-filter/src/hooks/useAdvanced.d.ts +1 -0
- package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
- package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -1
- package/es/components/table-filter/src/types/index.d.ts +2 -0
- package/es/components/vod-chunk-upload/src/chunk-upload-new.vue2.js +1 -1
- package/es/env.d.ts +25 -25
- package/es/shared/package.json.js +1 -1
- package/es/shared/utils/index.d.ts +1 -0
- package/es/shared/utils/index.js +1 -1
- package/package.json +2 -2
@@ -28,6 +28,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
28
28
|
defaultSessionKey: {
|
29
29
|
type: StringConstructor;
|
30
30
|
};
|
31
|
+
show: {
|
32
|
+
type: BooleanConstructor;
|
33
|
+
default: boolean;
|
34
|
+
};
|
31
35
|
}, {
|
32
36
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
33
37
|
token: {
|
@@ -53,6 +57,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
53
57
|
defaultSessionKey: {
|
54
58
|
type: StringConstructor;
|
55
59
|
};
|
60
|
+
show: {
|
61
|
+
type: BooleanConstructor;
|
62
|
+
default: boolean;
|
63
|
+
};
|
56
64
|
}>> & {
|
57
65
|
"onTemplate-click"?: ((...args: any[]) => any) | undefined;
|
58
66
|
"onUnread-message-update"?: ((...args: any[]) => any) | undefined;
|
@@ -74,18 +82,21 @@ declare const _default: import("vue").DefineComponent<{
|
|
74
82
|
updateSessionItem: AnyObject;
|
75
83
|
isUpdateSession: boolean;
|
76
84
|
currentReferenceMsg: AnyObject | null;
|
85
|
+
currentReEditMsg: AnyObject | null;
|
77
86
|
showVideo: boolean;
|
78
87
|
currentAVMsg: AnyObject;
|
79
88
|
currentGroupUser: AnyObject[];
|
80
89
|
showMultipleVideo: boolean;
|
81
90
|
};
|
82
|
-
|
91
|
+
unreadTotal: import("vue").ComputedRef<number>;
|
83
92
|
openSession: (item: AnyObject) => Promise<void>;
|
84
93
|
closeSession: () => AnyObject | null;
|
85
94
|
getCurrentSession: () => AnyObject | null;
|
86
95
|
setSessionList: (list: AnyObject[]) => void;
|
87
96
|
setUpdateSessionItem: (item: AnyObject) => void;
|
88
97
|
setCurrentSessionItem: (item: AnyObject) => void;
|
98
|
+
updateSessionList: (sessionItem: AnyObject) => void;
|
99
|
+
reConnention: number;
|
89
100
|
groupSessionList: AnyObject[];
|
90
101
|
init: () => Promise<void>;
|
91
102
|
initWebSocket: () => void;
|
@@ -118,12 +129,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
118
129
|
}[]>;
|
119
130
|
currentFilterKey: import("vue").Ref<string>;
|
120
131
|
state: IState;
|
121
|
-
|
132
|
+
unreadTotal: import("vue").ComputedRef<number>;
|
122
133
|
openSession: (item: AnyObject) => Promise<void>;
|
123
|
-
updateSessionList: (sessionItem: AnyObject) => void;
|
124
134
|
currentWidth: import("vue").ComputedRef<number>;
|
125
135
|
sessionList: import("vue").ComputedRef<AnyObject[]>;
|
126
|
-
unreadTotal: import("vue").ComputedRef<number>;
|
127
136
|
changeWidth: ({ distance }: AnyObject) => void;
|
128
137
|
handleFilter: (key: string) => void;
|
129
138
|
showSession: (item: AnyObject, currentKey?: string) => boolean | undefined;
|
@@ -245,7 +254,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
245
254
|
submitFormData: (o: AnyObject) => Promise<void>;
|
246
255
|
handleGroupName: () => Promise<void>;
|
247
256
|
handleAvatar: (options: import("./types").FileOptions) => Promise<void>;
|
248
|
-
|
257
|
+
closeChatSet: () => void;
|
249
258
|
NDrawer: any;
|
250
259
|
NDrawerContent: any;
|
251
260
|
NAvatar: any;
|
@@ -347,6 +356,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
347
356
|
};
|
348
357
|
defaultValue: {
|
349
358
|
type: PropType<AnyObject[]>;
|
359
|
+
default: () => never[];
|
350
360
|
};
|
351
361
|
}, {
|
352
362
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
@@ -367,6 +377,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
367
377
|
};
|
368
378
|
defaultValue: {
|
369
379
|
type: PropType<AnyObject[]>;
|
380
|
+
default: () => never[];
|
370
381
|
};
|
371
382
|
}>> & {
|
372
383
|
onComfirm?: ((...args: any[]) => any) | undefined;
|
@@ -381,6 +392,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
381
392
|
options: import("vue").Ref<AnyObject[]>;
|
382
393
|
groupName: import("vue").Ref<string>;
|
383
394
|
checkedSourceIds: import("vue").Ref<(string | number)[]>;
|
395
|
+
remark: import("vue").Ref<string>;
|
384
396
|
userList: import("vue").Ref<AnyObject[]>;
|
385
397
|
handleInput: () => void;
|
386
398
|
_disabledIds: import("vue").ComputedRef<any[]>;
|
@@ -429,10 +441,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
429
441
|
};
|
430
442
|
defaultValue: {
|
431
443
|
type: PropType<AnyObject[]>;
|
444
|
+
default: () => never[];
|
432
445
|
};
|
433
446
|
}>> & {
|
434
447
|
onComfirm?: ((...args: any[]) => any) | undefined;
|
435
448
|
}, {
|
449
|
+
defaultValue: AnyObject[];
|
436
450
|
mode: string;
|
437
451
|
title: string;
|
438
452
|
disabledIds: string[];
|
@@ -458,6 +472,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
458
472
|
};
|
459
473
|
}>> & {}>>;
|
460
474
|
state: IState;
|
475
|
+
relayMessage: (param: {
|
476
|
+
checkedIds: string[];
|
477
|
+
remark: string;
|
478
|
+
content: AnyObject;
|
479
|
+
}) => Promise<void>;
|
461
480
|
imageList: import("vue").Ref<AnyObject[]>;
|
462
481
|
fileList: import("vue").Ref<AnyObject[]>;
|
463
482
|
imageRef: import("vue").Ref<any>;
|
@@ -472,7 +491,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
472
491
|
handleSearch: () => Promise<void>;
|
473
492
|
formatImageList: (data: AnyObject[]) => {
|
474
493
|
label: string;
|
475
|
-
list:
|
494
|
+
list: any;
|
476
495
|
}[];
|
477
496
|
resetAndSearch: () => void;
|
478
497
|
title: import("vue").ComputedRef<"聊天图片" | "聊天文件">;
|
@@ -485,8 +504,122 @@ declare const _default: import("vue").DefineComponent<{
|
|
485
504
|
NIcon: any;
|
486
505
|
NTooltip: any;
|
487
506
|
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<{}>>, {}>;
|
507
|
+
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
508
|
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
509
|
downloadFile: typeof import("./utils").downloadFile;
|
510
|
+
ChatAdd: import("vue").DefineComponent<{
|
511
|
+
title: {
|
512
|
+
type: StringConstructor;
|
513
|
+
default: string;
|
514
|
+
};
|
515
|
+
mode: {
|
516
|
+
type: StringConstructor;
|
517
|
+
default: string;
|
518
|
+
};
|
519
|
+
options: {
|
520
|
+
type: PropType<AnyObject[]>;
|
521
|
+
};
|
522
|
+
disabledIds: {
|
523
|
+
type: PropType<string[]>;
|
524
|
+
default: () => never[];
|
525
|
+
};
|
526
|
+
defaultValue: {
|
527
|
+
type: PropType<AnyObject[]>;
|
528
|
+
default: () => never[];
|
529
|
+
};
|
530
|
+
}, {
|
531
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
532
|
+
title: {
|
533
|
+
type: StringConstructor;
|
534
|
+
default: string;
|
535
|
+
};
|
536
|
+
mode: {
|
537
|
+
type: StringConstructor;
|
538
|
+
default: string;
|
539
|
+
};
|
540
|
+
options: {
|
541
|
+
type: PropType<AnyObject[]>;
|
542
|
+
};
|
543
|
+
disabledIds: {
|
544
|
+
type: PropType<string[]>;
|
545
|
+
default: () => never[];
|
546
|
+
};
|
547
|
+
defaultValue: {
|
548
|
+
type: PropType<AnyObject[]>;
|
549
|
+
default: () => never[];
|
550
|
+
};
|
551
|
+
}>> & {
|
552
|
+
onComfirm?: ((...args: any[]) => any) | undefined;
|
553
|
+
}>>;
|
554
|
+
emit: (event: "comfirm", ...args: any[]) => void;
|
555
|
+
state: IState;
|
556
|
+
setCurrentSessionItem: (item: AnyObject) => void;
|
557
|
+
listRef: import("vue").Ref<any>;
|
558
|
+
keyword: import("vue").Ref<string>;
|
559
|
+
showModal: import("vue").Ref<boolean>;
|
560
|
+
checkedOptions: import("vue").Ref<AnyObject[]>;
|
561
|
+
options: import("vue").Ref<AnyObject[]>;
|
562
|
+
groupName: import("vue").Ref<string>;
|
563
|
+
checkedSourceIds: import("vue").Ref<(string | number)[]>;
|
564
|
+
remark: import("vue").Ref<string>;
|
565
|
+
userList: import("vue").Ref<AnyObject[]>;
|
566
|
+
handleInput: () => void;
|
567
|
+
_disabledIds: import("vue").ComputedRef<any[]>;
|
568
|
+
defaultOptions: import("vue").ComputedRef<{
|
569
|
+
id: any;
|
570
|
+
name: any;
|
571
|
+
avatar: any;
|
572
|
+
}[]>;
|
573
|
+
checkedIds: import("vue").ComputedRef<any[]>;
|
574
|
+
btnDisabled: import("vue").ComputedRef<boolean>;
|
575
|
+
allChecked: import("vue").WritableComputedRef<boolean>;
|
576
|
+
handlePositiveClick: () => Promise<void>;
|
577
|
+
updateCheckedSourceIds: () => void;
|
578
|
+
handleSourceIdsUpdate: (value: (string | number)[], meta: {
|
579
|
+
actionType: "check" | "uncheck";
|
580
|
+
value: string | number;
|
581
|
+
}) => void;
|
582
|
+
closeTag: (id: string) => void;
|
583
|
+
NModal: any;
|
584
|
+
NButton: any;
|
585
|
+
NSpace: any;
|
586
|
+
NAvatar: any;
|
587
|
+
NIcon: any;
|
588
|
+
NTag: any;
|
589
|
+
NInput: any;
|
590
|
+
NCheckbox: any;
|
591
|
+
NCheckboxGroup: any;
|
592
|
+
NTooltip: any;
|
593
|
+
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<{}>>, {}>;
|
594
|
+
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<{}>>, {}>;
|
595
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
596
|
+
title: {
|
597
|
+
type: StringConstructor;
|
598
|
+
default: string;
|
599
|
+
};
|
600
|
+
mode: {
|
601
|
+
type: StringConstructor;
|
602
|
+
default: string;
|
603
|
+
};
|
604
|
+
options: {
|
605
|
+
type: PropType<AnyObject[]>;
|
606
|
+
};
|
607
|
+
disabledIds: {
|
608
|
+
type: PropType<string[]>;
|
609
|
+
default: () => never[];
|
610
|
+
};
|
611
|
+
defaultValue: {
|
612
|
+
type: PropType<AnyObject[]>;
|
613
|
+
default: () => never[];
|
614
|
+
};
|
615
|
+
}>> & {
|
616
|
+
onComfirm?: ((...args: any[]) => any) | undefined;
|
617
|
+
}, {
|
618
|
+
defaultValue: AnyObject[];
|
619
|
+
mode: string;
|
620
|
+
title: string;
|
621
|
+
disabledIds: string[];
|
622
|
+
}>;
|
490
623
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
491
624
|
type: {
|
492
625
|
type: StringConstructor;
|
@@ -562,6 +695,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
562
695
|
type: PropType<string | false | HTMLElement>;
|
563
696
|
default: string;
|
564
697
|
};
|
698
|
+
holidays: {
|
699
|
+
type: PropType<Date[]>;
|
700
|
+
default: () => never[];
|
701
|
+
};
|
702
|
+
type: {
|
703
|
+
type: StringConstructor;
|
704
|
+
default: string;
|
705
|
+
};
|
565
706
|
}, {
|
566
707
|
attrs: {
|
567
708
|
[x: string]: unknown;
|
@@ -586,6 +727,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
586
727
|
type: PropType<string | false | HTMLElement>;
|
587
728
|
default: string;
|
588
729
|
};
|
730
|
+
holidays: {
|
731
|
+
type: PropType<Date[]>;
|
732
|
+
default: () => never[];
|
733
|
+
};
|
734
|
+
type: {
|
735
|
+
type: StringConstructor;
|
736
|
+
default: string;
|
737
|
+
};
|
589
738
|
}>> & {
|
590
739
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
591
740
|
}>>;
|
@@ -602,6 +751,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
602
751
|
blur: () => any;
|
603
752
|
handleConfirm: (target: HTMLInputElement) => void;
|
604
753
|
onUpdateShow: (show: boolean) => Promise<void>;
|
754
|
+
watchers: import("../../../shared/types").AnyFn[];
|
755
|
+
stopWatcher: () => void;
|
756
|
+
setHoliday: (show: boolean) => Promise<void>;
|
605
757
|
onConfirm: (...args: any[]) => Promise<void>;
|
606
758
|
isAllowedInvalidValue: (value: (string | [string, string]) | null | undefined) => boolean | "" | undefined;
|
607
759
|
setShortcutValue: (type: "month" | "week") => Promise<void>;
|
@@ -626,11 +778,21 @@ declare const _default: import("vue").DefineComponent<{
|
|
626
778
|
type: PropType<string | false | HTMLElement>;
|
627
779
|
default: string;
|
628
780
|
};
|
781
|
+
holidays: {
|
782
|
+
type: PropType<Date[]>;
|
783
|
+
default: () => never[];
|
784
|
+
};
|
785
|
+
type: {
|
786
|
+
type: StringConstructor;
|
787
|
+
default: string;
|
788
|
+
};
|
629
789
|
}>> & {
|
630
790
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
631
791
|
}, {
|
792
|
+
type: string;
|
632
793
|
updateUnchangedValue: boolean;
|
633
794
|
to: string | false | HTMLElement;
|
795
|
+
holidays: Date[];
|
634
796
|
}>>;
|
635
797
|
formatTime: typeof import("./utils").formatTime;
|
636
798
|
MESSAGE_TYPE: typeof import("./constants").MESSAGE_TYPE;
|
@@ -663,6 +825,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
663
825
|
};
|
664
826
|
defaultValue: {
|
665
827
|
type: PropType<AnyObject[]>;
|
828
|
+
default: () => never[];
|
666
829
|
};
|
667
830
|
}, {
|
668
831
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
@@ -683,6 +846,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
683
846
|
};
|
684
847
|
defaultValue: {
|
685
848
|
type: PropType<AnyObject[]>;
|
849
|
+
default: () => never[];
|
686
850
|
};
|
687
851
|
}>> & {
|
688
852
|
onComfirm?: ((...args: any[]) => any) | undefined;
|
@@ -697,6 +861,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
697
861
|
options: import("vue").Ref<AnyObject[]>;
|
698
862
|
groupName: import("vue").Ref<string>;
|
699
863
|
checkedSourceIds: import("vue").Ref<(string | number)[]>;
|
864
|
+
remark: import("vue").Ref<string>;
|
700
865
|
userList: import("vue").Ref<AnyObject[]>;
|
701
866
|
handleInput: () => void;
|
702
867
|
_disabledIds: import("vue").ComputedRef<any[]>;
|
@@ -745,10 +910,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
745
910
|
};
|
746
911
|
defaultValue: {
|
747
912
|
type: PropType<AnyObject[]>;
|
913
|
+
default: () => never[];
|
748
914
|
};
|
749
915
|
}>> & {
|
750
916
|
onComfirm?: ((...args: any[]) => any) | undefined;
|
751
917
|
}, {
|
918
|
+
defaultValue: AnyObject[];
|
752
919
|
mode: string;
|
753
920
|
title: string;
|
754
921
|
disabledIds: string[];
|
@@ -759,12 +926,18 @@ declare const _default: import("vue").DefineComponent<{
|
|
759
926
|
chatMainRef: import("vue").Ref<HTMLElement | undefined>;
|
760
927
|
state: IState;
|
761
928
|
setMsgList: (list?: AnyObject[]) => void;
|
929
|
+
relayMessage: (param: {
|
930
|
+
checkedIds: string[];
|
931
|
+
remark: string;
|
932
|
+
content: AnyObject;
|
933
|
+
}) => Promise<void>;
|
762
934
|
setCurrentSessionItem: (item: AnyObject) => void;
|
763
935
|
isGroupChat: import("vue").ComputedRef<boolean>;
|
764
936
|
contextmenuRef: import("vue").Ref<any>;
|
765
937
|
showMenu: import("vue").Ref<boolean>;
|
766
938
|
menuPosition: any;
|
767
939
|
menuMsgId: import("vue").Ref<any>;
|
940
|
+
relayTriggerRef: import("vue").Ref<any>;
|
768
941
|
pageInfo: {
|
769
942
|
page: number;
|
770
943
|
hasMore: boolean;
|
@@ -781,6 +954,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
781
954
|
handleContextmenu: (event: MouseEvent, msgId: string) => Promise<void>;
|
782
955
|
setMenuPosition: (event: MouseEvent) => Promise<void>;
|
783
956
|
showMessage: (item: AnyObject) => boolean;
|
957
|
+
showReEdit: (item: AnyObject) => boolean;
|
784
958
|
showReferenceMsg: (item: AnyObject) => any;
|
785
959
|
showBlendMsg: (item: AnyObject) => any;
|
786
960
|
showTemplateMsg: (item: AnyObject, type: "template" | "system") => boolean | undefined;
|
@@ -790,6 +964,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
790
964
|
resetInfo: () => void;
|
791
965
|
setReferenceMsg: (msgItem: AnyObject) => void;
|
792
966
|
handleSelect: (key: string, msgItem: AnyObject) => void;
|
967
|
+
handleRelay: (checkedIds: string[], remark: string) => void;
|
968
|
+
reEdit: (item: AnyObject) => void;
|
793
969
|
NAvatar: any;
|
794
970
|
NImageGroup: any;
|
795
971
|
NImage: any;
|
@@ -974,6 +1150,119 @@ declare const _default: import("vue").DefineComponent<{
|
|
974
1150
|
}, {
|
975
1151
|
show: boolean;
|
976
1152
|
}>;
|
1153
|
+
ChatAdd: import("vue").DefineComponent<{
|
1154
|
+
title: {
|
1155
|
+
type: StringConstructor;
|
1156
|
+
default: string;
|
1157
|
+
};
|
1158
|
+
mode: {
|
1159
|
+
type: StringConstructor;
|
1160
|
+
default: string;
|
1161
|
+
};
|
1162
|
+
options: {
|
1163
|
+
type: PropType<AnyObject[]>;
|
1164
|
+
};
|
1165
|
+
disabledIds: {
|
1166
|
+
type: PropType<string[]>;
|
1167
|
+
default: () => never[];
|
1168
|
+
};
|
1169
|
+
defaultValue: {
|
1170
|
+
type: PropType<AnyObject[]>;
|
1171
|
+
default: () => never[];
|
1172
|
+
};
|
1173
|
+
}, {
|
1174
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
1175
|
+
title: {
|
1176
|
+
type: StringConstructor;
|
1177
|
+
default: string;
|
1178
|
+
};
|
1179
|
+
mode: {
|
1180
|
+
type: StringConstructor;
|
1181
|
+
default: string;
|
1182
|
+
};
|
1183
|
+
options: {
|
1184
|
+
type: PropType<AnyObject[]>;
|
1185
|
+
};
|
1186
|
+
disabledIds: {
|
1187
|
+
type: PropType<string[]>;
|
1188
|
+
default: () => never[];
|
1189
|
+
};
|
1190
|
+
defaultValue: {
|
1191
|
+
type: PropType<AnyObject[]>;
|
1192
|
+
default: () => never[];
|
1193
|
+
};
|
1194
|
+
}>> & {
|
1195
|
+
onComfirm?: ((...args: any[]) => any) | undefined;
|
1196
|
+
}>>;
|
1197
|
+
emit: (event: "comfirm", ...args: any[]) => void;
|
1198
|
+
state: IState;
|
1199
|
+
setCurrentSessionItem: (item: AnyObject) => void;
|
1200
|
+
listRef: import("vue").Ref<any>;
|
1201
|
+
keyword: import("vue").Ref<string>;
|
1202
|
+
showModal: import("vue").Ref<boolean>;
|
1203
|
+
checkedOptions: import("vue").Ref<AnyObject[]>;
|
1204
|
+
options: import("vue").Ref<AnyObject[]>;
|
1205
|
+
groupName: import("vue").Ref<string>;
|
1206
|
+
checkedSourceIds: import("vue").Ref<(string | number)[]>;
|
1207
|
+
remark: import("vue").Ref<string>;
|
1208
|
+
userList: import("vue").Ref<AnyObject[]>;
|
1209
|
+
handleInput: () => void;
|
1210
|
+
_disabledIds: import("vue").ComputedRef<any[]>;
|
1211
|
+
defaultOptions: import("vue").ComputedRef<{
|
1212
|
+
id: any;
|
1213
|
+
name: any;
|
1214
|
+
avatar: any;
|
1215
|
+
}[]>;
|
1216
|
+
checkedIds: import("vue").ComputedRef<any[]>;
|
1217
|
+
btnDisabled: import("vue").ComputedRef<boolean>;
|
1218
|
+
allChecked: import("vue").WritableComputedRef<boolean>;
|
1219
|
+
handlePositiveClick: () => Promise<void>;
|
1220
|
+
updateCheckedSourceIds: () => void;
|
1221
|
+
handleSourceIdsUpdate: (value: (string | number)[], meta: {
|
1222
|
+
actionType: "check" | "uncheck";
|
1223
|
+
value: string | number;
|
1224
|
+
}) => void;
|
1225
|
+
closeTag: (id: string) => void;
|
1226
|
+
NModal: any;
|
1227
|
+
NButton: any;
|
1228
|
+
NSpace: any;
|
1229
|
+
NAvatar: any;
|
1230
|
+
NIcon: any;
|
1231
|
+
NTag: any;
|
1232
|
+
NInput: any;
|
1233
|
+
NCheckbox: any;
|
1234
|
+
NCheckboxGroup: any;
|
1235
|
+
NTooltip: any;
|
1236
|
+
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<{}>>, {}>;
|
1237
|
+
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<{}>>, {}>;
|
1238
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "comfirm"[], "comfirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
1239
|
+
title: {
|
1240
|
+
type: StringConstructor;
|
1241
|
+
default: string;
|
1242
|
+
};
|
1243
|
+
mode: {
|
1244
|
+
type: StringConstructor;
|
1245
|
+
default: string;
|
1246
|
+
};
|
1247
|
+
options: {
|
1248
|
+
type: PropType<AnyObject[]>;
|
1249
|
+
};
|
1250
|
+
disabledIds: {
|
1251
|
+
type: PropType<string[]>;
|
1252
|
+
default: () => never[];
|
1253
|
+
};
|
1254
|
+
defaultValue: {
|
1255
|
+
type: PropType<AnyObject[]>;
|
1256
|
+
default: () => never[];
|
1257
|
+
};
|
1258
|
+
}>> & {
|
1259
|
+
onComfirm?: ((...args: any[]) => any) | undefined;
|
1260
|
+
}, {
|
1261
|
+
defaultValue: AnyObject[];
|
1262
|
+
mode: string;
|
1263
|
+
title: string;
|
1264
|
+
disabledIds: string[];
|
1265
|
+
}>;
|
977
1266
|
simplifyMessage: typeof import("./utils").simplifyMessage;
|
978
1267
|
isAudioOrVideoMessage: typeof isAudioOrVideoMessage;
|
979
1268
|
getAVTime: typeof import("./utils").getAVTime;
|
@@ -1010,6 +1299,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
1010
1299
|
fileChange: (options: import("./types").FileOptions, chatMessageType: import("./constants").MESSAGE_TYPE) => Promise<void>;
|
1011
1300
|
handleMsgSend: () => Promise<void>;
|
1012
1301
|
doSendMessage: (contentInfo: AnyObject) => Promise<void>;
|
1302
|
+
clearInput: () => void;
|
1013
1303
|
NButton: any;
|
1014
1304
|
NPopover: any;
|
1015
1305
|
NTooltip: any;
|
@@ -1034,6 +1324,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
1034
1324
|
};
|
1035
1325
|
defaultValue: {
|
1036
1326
|
type: PropType<AnyObject[]>;
|
1327
|
+
default: () => never[];
|
1037
1328
|
};
|
1038
1329
|
}, {
|
1039
1330
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
@@ -1054,6 +1345,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
1054
1345
|
};
|
1055
1346
|
defaultValue: {
|
1056
1347
|
type: PropType<AnyObject[]>;
|
1348
|
+
default: () => never[];
|
1057
1349
|
};
|
1058
1350
|
}>> & {
|
1059
1351
|
onComfirm?: ((...args: any[]) => any) | undefined;
|
@@ -1068,6 +1360,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
1068
1360
|
options: import("vue").Ref<AnyObject[]>;
|
1069
1361
|
groupName: import("vue").Ref<string>;
|
1070
1362
|
checkedSourceIds: import("vue").Ref<(string | number)[]>;
|
1363
|
+
remark: import("vue").Ref<string>;
|
1071
1364
|
userList: import("vue").Ref<AnyObject[]>;
|
1072
1365
|
handleInput: () => void;
|
1073
1366
|
_disabledIds: import("vue").ComputedRef<any[]>;
|
@@ -1116,10 +1409,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
1116
1409
|
};
|
1117
1410
|
defaultValue: {
|
1118
1411
|
type: PropType<AnyObject[]>;
|
1412
|
+
default: () => never[];
|
1119
1413
|
};
|
1120
1414
|
}>> & {
|
1121
1415
|
onComfirm?: ((...args: any[]) => any) | undefined;
|
1122
1416
|
}, {
|
1417
|
+
defaultValue: AnyObject[];
|
1123
1418
|
mode: string;
|
1124
1419
|
title: string;
|
1125
1420
|
disabledIds: string[];
|
@@ -1226,6 +1521,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
1226
1521
|
};
|
1227
1522
|
defaultValue: {
|
1228
1523
|
type: PropType<AnyObject[]>;
|
1524
|
+
default: () => never[];
|
1229
1525
|
};
|
1230
1526
|
}, {
|
1231
1527
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
@@ -1246,6 +1542,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
1246
1542
|
};
|
1247
1543
|
defaultValue: {
|
1248
1544
|
type: PropType<AnyObject[]>;
|
1545
|
+
default: () => never[];
|
1249
1546
|
};
|
1250
1547
|
}>> & {
|
1251
1548
|
onComfirm?: ((...args: any[]) => any) | undefined;
|
@@ -1260,6 +1557,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
1260
1557
|
options: import("vue").Ref<AnyObject[]>;
|
1261
1558
|
groupName: import("vue").Ref<string>;
|
1262
1559
|
checkedSourceIds: import("vue").Ref<(string | number)[]>;
|
1560
|
+
remark: import("vue").Ref<string>;
|
1263
1561
|
userList: import("vue").Ref<AnyObject[]>;
|
1264
1562
|
handleInput: () => void;
|
1265
1563
|
_disabledIds: import("vue").ComputedRef<any[]>;
|
@@ -1308,10 +1606,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
1308
1606
|
};
|
1309
1607
|
defaultValue: {
|
1310
1608
|
type: PropType<AnyObject[]>;
|
1609
|
+
default: () => never[];
|
1311
1610
|
};
|
1312
1611
|
}>> & {
|
1313
1612
|
onComfirm?: ((...args: any[]) => any) | undefined;
|
1314
1613
|
}, {
|
1614
|
+
defaultValue: AnyObject[];
|
1315
1615
|
mode: string;
|
1316
1616
|
title: string;
|
1317
1617
|
disabledIds: string[];
|
@@ -1449,6 +1749,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
1449
1749
|
};
|
1450
1750
|
defaultValue: {
|
1451
1751
|
type: PropType<AnyObject[]>;
|
1752
|
+
default: () => never[];
|
1452
1753
|
};
|
1453
1754
|
}, {
|
1454
1755
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
@@ -1469,6 +1770,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
1469
1770
|
};
|
1470
1771
|
defaultValue: {
|
1471
1772
|
type: PropType<AnyObject[]>;
|
1773
|
+
default: () => never[];
|
1472
1774
|
};
|
1473
1775
|
}>> & {
|
1474
1776
|
onComfirm?: ((...args: any[]) => any) | undefined;
|
@@ -1483,6 +1785,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
1483
1785
|
options: import("vue").Ref<AnyObject[]>;
|
1484
1786
|
groupName: import("vue").Ref<string>;
|
1485
1787
|
checkedSourceIds: import("vue").Ref<(string | number)[]>;
|
1788
|
+
remark: import("vue").Ref<string>;
|
1486
1789
|
userList: import("vue").Ref<AnyObject[]>;
|
1487
1790
|
handleInput: () => void;
|
1488
1791
|
_disabledIds: import("vue").ComputedRef<any[]>;
|
@@ -1531,10 +1834,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
1531
1834
|
};
|
1532
1835
|
defaultValue: {
|
1533
1836
|
type: PropType<AnyObject[]>;
|
1837
|
+
default: () => never[];
|
1534
1838
|
};
|
1535
1839
|
}>> & {
|
1536
1840
|
onComfirm?: ((...args: any[]) => any) | undefined;
|
1537
1841
|
}, {
|
1842
|
+
defaultValue: AnyObject[];
|
1538
1843
|
mode: string;
|
1539
1844
|
title: string;
|
1540
1845
|
disabledIds: string[];
|
@@ -1571,10 +1876,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
1571
1876
|
defaultSessionKey: {
|
1572
1877
|
type: StringConstructor;
|
1573
1878
|
};
|
1879
|
+
show: {
|
1880
|
+
type: BooleanConstructor;
|
1881
|
+
default: boolean;
|
1882
|
+
};
|
1574
1883
|
}>> & {
|
1575
1884
|
"onTemplate-click"?: ((...args: any[]) => any) | undefined;
|
1576
1885
|
"onUnread-message-update"?: ((...args: any[]) => any) | undefined;
|
1577
1886
|
}, {
|
1887
|
+
show: boolean;
|
1578
1888
|
baseURL: string;
|
1579
1889
|
chatBox: boolean;
|
1580
1890
|
}>;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,ref as s,reactive as o,provide as
|
1
|
+
import{defineComponent as e,ref as s,reactive as t,computed as o,provide as n,onBeforeUnmount as i,watch as r,openBlock as a,createElementBlock as c,normalizeStyle as u,unref as d,createVNode as l,withCtx as p,createBlock as m,Fragment as h,createElementVNode as f,renderSlot as S,createCommentVNode as y}from"vue";import{NConfigProvider as g,NSpin as v,NLayout as b,NLayoutContent as M}from"naive-ui";import I from"./components/SiderList.vue.js";import k from"./components/ChatHeader.vue.js";import L from"./components/ChatMain.vue.js";import T from"./components/ChatFooter.vue.js";import V from"./components/ChatSearch.vue.js";import j from"./components/ChatAdd.vue.js";import w from"./components/Video.vue.js";import N from"./components/MultipleVideo.vue.js";import{ChatSock as U}from"./utils/chatSock.js";import{instanceAxios as A,readMessageApi as C}from"./api/index.js";import{useTheme as _}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{remove as E,isNumber as O}from"lodash-es";import"@vue/shared";import"../../../shared/utils/index.js";import{promiseTimeout as x}from"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import"../../../shared/hooks/useScrollLoading.js";import{CHAT_TYPE as R,SUBSCRIBE_MESSAGE_TYPE as G,AV_STATUS as K}from"./constants/index.js";import{InjectionIChatState as B,InjectionIChatStompClient as P,InjectionIChatEmits as J,InjectionIChatUnreadTotal as $}from"./types/index.js";import{isAudioOrVideoMessage as q,listSort as F}from"./utils/index.js";import{useSession as H}from"./hooks/useSession.js";import"trtc-sdk-v5";const z={key:0,class:"iho-chat__header"},D={class:"toolbar"};var W=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},show:{type:Boolean,default:!0}},emits:["template-click","unread-message-update"],setup(e,{expose:W,emit:Y}){const Q=e;A.defaults.baseURL=Q.baseURL,A.defaults.headers.Authorization="bearer "+Q.token;const X=_(),Z=s(!1),ee=s(),se=t({orgId:Q.orgId,currentSessionItem:{},id:"",userInfo:{id:Q.userId},msgList:[],currentMsg:{},isAppendMsg:!1,sessionList:[],isChangeSession:!1,updateSessionItem:{},isUpdateSession:!1,currentReferenceMsg:null,currentReEditMsg:null,showVideo:!1,currentAVMsg:{},currentGroupUser:[],showMultipleVideo:!1}),te=o((()=>se.sessionList.reduce(((e,s)=>e+ +s.unreadNum),0)));n(B,se),n(P,ee),n(J,Y),n($,te);const{openSession:oe,closeSession:ne,getCurrentSession:ie,setSessionList:re,setUpdateSessionItem:ae,setCurrentSessionItem:ce,updateSessionList:ue}=H(se),de=[];function le(){const e={headers:{AccessToken:Q.token,UserId:Q.userId},heartbeatFn(){try{ee.value.send("test")}catch(e){ee.value.disconnect(),le()}},connectCb(){console.log("连接成功"),ee.value.subscribe("/user/topic/single",(({body:e})=>me({body:e,chatType:R.SINGLE}))),ee.value.subscribe("/app/sessionList",(({body:e})=>{try{const s=JSON.parse(e),{authentication:t,currentUser:o,sessionVos:n}=s;if(Object.assign(se.userInfo,o,t),!(null==n?void 0:n.length))return;re(n),de.splice(0,de.length),de.push(...n.filter((e=>e.chatType===R.GROUP))),de.forEach((e=>{ee.value.subscribe(`/topic/group/${e.receiver}`,(({body:e})=>me({body:e,chatType:R.GROUP})))})),function(){const e=se.sessionList.find((e=>e.sessionKey===Q.defaultSessionKey));e&&oe(e)}()}catch(e){console.log(e)}}))},errorCb(e,s){}};ee.value=new U("/fdp-chat/websocket",e)}async function pe(e,s){if(se.currentMsg=e,e.sessionKey===se.currentSessionItem.sessionKey)return se.isAppendMsg=!0,e.sender!==se.userInfo.id&&await C({chatType:s,messageIdSet:[e.id],receiver:se.userInfo.id,sender:e.sender}),void ce({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};ae(t)}async function me({body:e,chatType:s}){try{const t=JSON.parse(e),{messageVo:o,sessionVo:n,chatAvStatusVo:i}=t;switch(t.event){case G.MESSAGE:q(o.content)?!se.showVideo&&!se.showMultipleVideo||o.content.avStatus!==K.IN_CALL?(se.currentMsg=o,Object.assign(se.currentAVMsg,{strRoomId:o.sessionKey,chatMessageType:o.content.chatMessageType,callMode:o.sender===se.userInfo.id?"call":"invite",currentMsg:o}),se.showVideo||se.showMultipleVideo?pe(o,s):se.showVideo=!0):(ee.value.send("/app/chat/send",{},JSON.stringify({chatType:R.SINGLE,receiver:o.sender,content:{chatMessageType:o.content.chatMessageType,avStatus:K.CALL_BUSY}})),console.log("用户忙!")):pe(o,s);break;case G.RECALL_MESSAGE:break;case G.AV_STATUS:Object.assign(se.currentAVMsg,i,{callMode:i.sender===se.userInfo.id?"call":"invite",checkedIds:[]}),se.showVideo||se.showMultipleVideo?console.log("用户忙!"):se.showMultipleVideo=!0;break;case G.NEW_SESSION:if(s===R.GROUP)return;ae(n);break;case G.JOIN:if(s===R.GROUP)return;ae(n),ee.value.subscribe(`/topic/group/${n.receiver}`,(({body:e})=>me({body:e,chatType:R.GROUP})));break;case G.LEAVE:ne(),E(se.sessionList,(e=>e.sessionKey===n.sessionKey))}}catch(e){console.log(e)}}return async function(){le()}(),i((()=>{var e;null==(e=ee.value)||e.disconnect()})),r((()=>te.value),(e=>{!async function s(t=0){const o=F(se.sessionList),n=o.every((e=>!!e.name));if(!(t>2))if(n){const s=o.filter((e=>{var s;return+(null!=(s=e.unreadNum)?s:0)>0}));Y("unread-message-update",e,s)}else await x(100),s(++t)}()})),r([()=>se.isChangeSession,()=>se.isUpdateSession],(([e,s])=>{e&&(ue(se.currentSessionItem),se.isChangeSession=!1),s&&(ue(se.updateSessionItem),se.isUpdateSession=!1)}),{immediate:!0}),W({getUnreadData:function(){return se.sessionList.filter((e=>O(e.unreadNum)&&e.unreadNum>0))},openSession:oe,closeSession:ne,getCurrentSession:ie}),(s,t)=>e.show?(a(),c("div",{key:0,class:"iho-chat",style:u(d(X))},[l(d(g),{abstract:"",namespace:"iho-chat__popover"},{default:p((()=>[Z.value?(a(),m(d(v),{key:0,stroke:"#5585f5"})):(a(),c(h,{key:1},[e.chatBox?y("v-if",!0):(a(),c("div",z,[l(V),l(j,{title:"发起群聊",mode:"create","default-value":[se.userInfo]},null,8,["default-value"]),f("div",D,[S(s.$slots,"toolbar")])])),l(d(b),{class:"iho-chat__body","has-sider":""},{default:p((()=>[e.chatBox?y("v-if",!0):(a(),m(I,{key:0})),l(d(M),{class:"chat-content"},{default:p((()=>[l(k),l(L),l(T)])),_:1}),S(s.$slots,"external")])),_:3}),se.showVideo?(a(),m(w,{key:1})):y("v-if",!0),se.showMultipleVideo?(a(),m(N,{key:2})):y("v-if",!0)],64))])),_:3})],4)):y("v-if",!0)}});export{W as default};
|