cnhis-design-vue 3.3.1-beta.15 → 3.3.1-beta.18
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/index.d.ts +6 -0
- package/es/components/ai-chat/src/Index.vue.d.ts +6 -0
- package/es/components/ai-chat/src/Index.vue2.js +1 -1
- package/es/components/ai-chat/src/api/index.d.ts +1 -0
- package/es/components/ai-chat/src/api/index.js +1 -1
- package/es/components/ai-chat/src/components/ChatAudio.vue2.js +1 -1
- package/es/components/ai-chat/src/components/ChatFooter.vue.d.ts +6 -0
- package/es/components/ai-chat/src/components/ChatFooter.vue2.js +1 -1
- package/es/components/ai-chat/src/components/ChatMain.js +1 -1
- package/es/components/ai-chat/src/components/ChatMainDefault.js +1 -1
- package/es/components/ai-chat/src/components/ChatRight.vue.d.ts +1 -0
- package/es/components/ai-chat/src/components/ChatRight.vue2.js +1 -1
- package/es/components/ai-chat/src/components/card/JsonCard.js +1 -1
- package/es/components/ai-chat/style/index.css +1 -1
- package/es/components/field-set/src/FieldColor.vue.d.ts +1 -1
- package/es/components/field-set/src/FieldFilter.vue.d.ts +1 -1
- package/es/components/field-set/src/FieldSet.vue.d.ts +1 -1
- package/es/components/field-set/src/components/table-row.vue.d.ts +1 -1
- package/es/components/iho-chat/index.d.ts +17 -2
- package/es/components/iho-chat/src/Index.vue.d.ts +17 -2
- package/es/components/iho-chat/src/api/index.d.ts +1 -0
- package/es/components/iho-chat/src/api/index.js +1 -1
- package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +1 -0
- package/es/components/iho-chat/src/components/ChatAdd.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatFile.vue.d.ts +1 -0
- package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +1 -0
- package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +5 -0
- package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +1 -0
- package/es/components/iho-chat/src/components/ChatRecord.vue.d.ts +3 -1
- package/es/components/iho-chat/src/components/ChatRecord.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatSearch.vue.d.ts +8 -2
- package/es/components/iho-chat/src/components/ChatSearch.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatSet.vue.d.ts +1 -0
- package/es/components/iho-chat/src/components/ChatSet.vue2.js +1 -1
- package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +1 -0
- package/es/components/iho-chat/src/hooks/useSearchPatientList.d.ts +11 -0
- package/es/components/iho-chat/src/hooks/useSearchPatientList.js +1 -0
- package/es/components/iho-chat/style/index.css +1 -1
- package/es/components/iho-table/index.d.ts +24 -24
- package/es/components/iho-table/index.js +1 -1
- package/es/components/iho-table/src/plugins/index.d.ts +18 -20
- package/es/components/iho-table/src/plugins/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/varialbleHeightPlugin.js +1 -1
- package/es/components/iho-table/src/utils/index.js +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
@@ -722,9 +722,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
722
722
|
}>;
|
723
723
|
developMode: boolean;
|
724
724
|
draggable: boolean;
|
725
|
-
isHighlightRow: boolean;
|
726
725
|
idx: number;
|
727
726
|
isHighlight: boolean;
|
727
|
+
isHighlightRow: boolean;
|
728
728
|
isFieldSet: boolean;
|
729
729
|
fieldDescribeMode: "column" | "tooltip";
|
730
730
|
hideExpressionOption: AnyObject[];
|
@@ -383,9 +383,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
383
383
|
}>;
|
384
384
|
developMode: boolean;
|
385
385
|
draggable: boolean;
|
386
|
-
isHighlightRow: boolean;
|
387
386
|
idx: number;
|
388
387
|
isHighlight: boolean;
|
388
|
+
isHighlightRow: boolean;
|
389
389
|
isFieldSet: boolean;
|
390
390
|
fieldDescribeMode: "column" | "tooltip";
|
391
391
|
hideExpressionOption: AnyObject[];
|
@@ -752,6 +752,7 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
752
752
|
remark: import("vue").Ref<string>;
|
753
753
|
currentTab: import("vue").Ref<import("../../shared/types").AnyObject[]>;
|
754
754
|
breadcrumbList: import("vue").Ref<import("../../shared/types").AnyObject[]>;
|
755
|
+
breadcrumbRef: import("vue").Ref<any>;
|
755
756
|
userList: import("vue").Ref<import("../../shared/types").AnyObject[]>;
|
756
757
|
handleInput: () => void;
|
757
758
|
_disabledIds: import("vue").ComputedRef<any[]>;
|
@@ -1031,6 +1032,7 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
1031
1032
|
remark: import("vue").Ref<string>;
|
1032
1033
|
currentTab: import("vue").Ref<import("../../shared/types").AnyObject[]>;
|
1033
1034
|
breadcrumbList: import("vue").Ref<import("../../shared/types").AnyObject[]>;
|
1035
|
+
breadcrumbRef: import("vue").Ref<any>;
|
1034
1036
|
userList: import("vue").Ref<import("../../shared/types").AnyObject[]>;
|
1035
1037
|
handleInput: () => void;
|
1036
1038
|
_disabledIds: import("vue").ComputedRef<any[]>;
|
@@ -1343,6 +1345,8 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
1343
1345
|
holidays: Date[];
|
1344
1346
|
}>>;
|
1345
1347
|
formatTime: typeof import("./src/utils").formatTime;
|
1348
|
+
isDoctorRole: typeof import("./src/utils").isDoctorRole;
|
1349
|
+
getRoleName: typeof import("./src/utils").getRoleName;
|
1346
1350
|
MESSAGE_TYPE: typeof import("./src/constants").MESSAGE_TYPE;
|
1347
1351
|
emojis: {
|
1348
1352
|
default: string[][];
|
@@ -1452,6 +1456,7 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
1452
1456
|
remark: import("vue").Ref<string>;
|
1453
1457
|
currentTab: import("vue").Ref<import("../../shared/types").AnyObject[]>;
|
1454
1458
|
breadcrumbList: import("vue").Ref<import("../../shared/types").AnyObject[]>;
|
1459
|
+
breadcrumbRef: import("vue").Ref<any>;
|
1455
1460
|
userList: import("vue").Ref<import("../../shared/types").AnyObject[]>;
|
1456
1461
|
handleInput: () => void;
|
1457
1462
|
_disabledIds: import("vue").ComputedRef<any[]>;
|
@@ -2030,6 +2035,7 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
2030
2035
|
remark: import("vue").Ref<string>;
|
2031
2036
|
currentTab: import("vue").Ref<import("../../shared/types").AnyObject[]>;
|
2032
2037
|
breadcrumbList: import("vue").Ref<import("../../shared/types").AnyObject[]>;
|
2038
|
+
breadcrumbRef: import("vue").Ref<any>;
|
2033
2039
|
userList: import("vue").Ref<import("../../shared/types").AnyObject[]>;
|
2034
2040
|
handleInput: () => void;
|
2035
2041
|
_disabledIds: import("vue").ComputedRef<any[]>;
|
@@ -2307,6 +2313,7 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
2307
2313
|
remark: import("vue").Ref<string>;
|
2308
2314
|
currentTab: import("vue").Ref<import("../../shared/types").AnyObject[]>;
|
2309
2315
|
breadcrumbList: import("vue").Ref<import("../../shared/types").AnyObject[]>;
|
2316
|
+
breadcrumbRef: import("vue").Ref<any>;
|
2310
2317
|
userList: import("vue").Ref<import("../../shared/types").AnyObject[]>;
|
2311
2318
|
handleInput: () => void;
|
2312
2319
|
_disabledIds: import("vue").ComputedRef<any[]>;
|
@@ -2414,7 +2421,8 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
2414
2421
|
simplifyMessage: typeof import("./src/utils").simplifyMessage;
|
2415
2422
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
2416
2423
|
ChatSearch: import("vue").DefineComponent<{}, {
|
2417
|
-
|
2424
|
+
userListRef: import("vue").Ref<any>;
|
2425
|
+
patientListRef: import("vue").Ref<any>;
|
2418
2426
|
inputRef: import("vue").Ref<any>;
|
2419
2427
|
showSearch: import("vue").Ref<boolean>;
|
2420
2428
|
keyword: import("vue").Ref<string>;
|
@@ -2451,14 +2459,19 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
2451
2459
|
openSession: (session: string | import("../../shared/types").AnyObject) => Promise<void>;
|
2452
2460
|
userList: import("vue").Ref<import("../../shared/types").AnyObject[]>;
|
2453
2461
|
handleInput: () => void;
|
2462
|
+
patientList: import("vue").Ref<import("../../shared/types").AnyObject[]>;
|
2463
|
+
handlePatientInput: () => void;
|
2454
2464
|
currentTabValue: import("vue").Ref<string>;
|
2455
2465
|
currentIndex: import("vue").Ref<number>;
|
2456
2466
|
groupList: import("vue").ComputedRef<import("../../shared/types").AnyObject[]>;
|
2457
|
-
|
2467
|
+
showNoUserData: import("vue").ComputedRef<boolean>;
|
2468
|
+
showNoPatientData: import("vue").ComputedRef<boolean>;
|
2458
2469
|
showAllNoData: import("vue").ComputedRef<boolean>;
|
2459
2470
|
showGroupNoData: import("vue").ComputedRef<boolean>;
|
2471
|
+
userStartIndex: import("vue").ComputedRef<number>;
|
2460
2472
|
groupStartIndex: import("vue").ComputedRef<number>;
|
2461
2473
|
currentList: import("vue").ComputedRef<import("../../shared/types").AnyObject[]>;
|
2474
|
+
handleSearchInput: () => void;
|
2462
2475
|
handleKeyDown: (event: KeyboardEvent) => void;
|
2463
2476
|
addSession: (id: string) => Promise<void>;
|
2464
2477
|
handleTabChange: () => void;
|
@@ -2639,6 +2652,7 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
2639
2652
|
remark: import("vue").Ref<string>;
|
2640
2653
|
currentTab: import("vue").Ref<import("../../shared/types").AnyObject[]>;
|
2641
2654
|
breadcrumbList: import("vue").Ref<import("../../shared/types").AnyObject[]>;
|
2655
|
+
breadcrumbRef: import("vue").Ref<any>;
|
2642
2656
|
userList: import("vue").Ref<import("../../shared/types").AnyObject[]>;
|
2643
2657
|
handleInput: () => void;
|
2644
2658
|
_disabledIds: import("vue").ComputedRef<any[]>;
|
@@ -3007,6 +3021,7 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
3007
3021
|
remark: import("vue").Ref<string>;
|
3008
3022
|
currentTab: import("vue").Ref<import("../../shared/types").AnyObject[]>;
|
3009
3023
|
breadcrumbList: import("vue").Ref<import("../../shared/types").AnyObject[]>;
|
3024
|
+
breadcrumbRef: import("vue").Ref<any>;
|
3010
3025
|
userList: import("vue").Ref<import("../../shared/types").AnyObject[]>;
|
3011
3026
|
handleInput: () => void;
|
3012
3027
|
_disabledIds: import("vue").ComputedRef<any[]>;
|
@@ -753,6 +753,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
753
753
|
remark: import("vue").Ref<string>;
|
754
754
|
currentTab: import("vue").Ref<AnyObject[]>;
|
755
755
|
breadcrumbList: import("vue").Ref<AnyObject[]>;
|
756
|
+
breadcrumbRef: import("vue").Ref<any>;
|
756
757
|
userList: import("vue").Ref<AnyObject[]>;
|
757
758
|
handleInput: () => void;
|
758
759
|
_disabledIds: import("vue").ComputedRef<any[]>;
|
@@ -1032,6 +1033,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
1032
1033
|
remark: import("vue").Ref<string>;
|
1033
1034
|
currentTab: import("vue").Ref<AnyObject[]>;
|
1034
1035
|
breadcrumbList: import("vue").Ref<AnyObject[]>;
|
1036
|
+
breadcrumbRef: import("vue").Ref<any>;
|
1035
1037
|
userList: import("vue").Ref<AnyObject[]>;
|
1036
1038
|
handleInput: () => void;
|
1037
1039
|
_disabledIds: import("vue").ComputedRef<any[]>;
|
@@ -1344,6 +1346,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
1344
1346
|
holidays: Date[];
|
1345
1347
|
}>>;
|
1346
1348
|
formatTime: typeof import("./utils").formatTime;
|
1349
|
+
isDoctorRole: typeof import("./utils").isDoctorRole;
|
1350
|
+
getRoleName: typeof import("./utils").getRoleName;
|
1347
1351
|
MESSAGE_TYPE: typeof import("./constants").MESSAGE_TYPE;
|
1348
1352
|
emojis: {
|
1349
1353
|
default: string[][];
|
@@ -1453,6 +1457,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
1453
1457
|
remark: import("vue").Ref<string>;
|
1454
1458
|
currentTab: import("vue").Ref<AnyObject[]>;
|
1455
1459
|
breadcrumbList: import("vue").Ref<AnyObject[]>;
|
1460
|
+
breadcrumbRef: import("vue").Ref<any>;
|
1456
1461
|
userList: import("vue").Ref<AnyObject[]>;
|
1457
1462
|
handleInput: () => void;
|
1458
1463
|
_disabledIds: import("vue").ComputedRef<any[]>;
|
@@ -2031,6 +2036,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
2031
2036
|
remark: import("vue").Ref<string>;
|
2032
2037
|
currentTab: import("vue").Ref<AnyObject[]>;
|
2033
2038
|
breadcrumbList: import("vue").Ref<AnyObject[]>;
|
2039
|
+
breadcrumbRef: import("vue").Ref<any>;
|
2034
2040
|
userList: import("vue").Ref<AnyObject[]>;
|
2035
2041
|
handleInput: () => void;
|
2036
2042
|
_disabledIds: import("vue").ComputedRef<any[]>;
|
@@ -2308,6 +2314,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
2308
2314
|
remark: import("vue").Ref<string>;
|
2309
2315
|
currentTab: import("vue").Ref<AnyObject[]>;
|
2310
2316
|
breadcrumbList: import("vue").Ref<AnyObject[]>;
|
2317
|
+
breadcrumbRef: import("vue").Ref<any>;
|
2311
2318
|
userList: import("vue").Ref<AnyObject[]>;
|
2312
2319
|
handleInput: () => void;
|
2313
2320
|
_disabledIds: import("vue").ComputedRef<any[]>;
|
@@ -2415,7 +2422,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
2415
2422
|
simplifyMessage: typeof import("./utils").simplifyMessage;
|
2416
2423
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
2417
2424
|
ChatSearch: import("vue").DefineComponent<{}, {
|
2418
|
-
|
2425
|
+
userListRef: import("vue").Ref<any>;
|
2426
|
+
patientListRef: import("vue").Ref<any>;
|
2419
2427
|
inputRef: import("vue").Ref<any>;
|
2420
2428
|
showSearch: import("vue").Ref<boolean>;
|
2421
2429
|
keyword: import("vue").Ref<string>;
|
@@ -2452,14 +2460,19 @@ declare const _default: import("vue").DefineComponent<{
|
|
2452
2460
|
openSession: (session: string | AnyObject) => Promise<void>;
|
2453
2461
|
userList: import("vue").Ref<AnyObject[]>;
|
2454
2462
|
handleInput: () => void;
|
2463
|
+
patientList: import("vue").Ref<AnyObject[]>;
|
2464
|
+
handlePatientInput: () => void;
|
2455
2465
|
currentTabValue: import("vue").Ref<string>;
|
2456
2466
|
currentIndex: import("vue").Ref<number>;
|
2457
2467
|
groupList: import("vue").ComputedRef<AnyObject[]>;
|
2458
|
-
|
2468
|
+
showNoUserData: import("vue").ComputedRef<boolean>;
|
2469
|
+
showNoPatientData: import("vue").ComputedRef<boolean>;
|
2459
2470
|
showAllNoData: import("vue").ComputedRef<boolean>;
|
2460
2471
|
showGroupNoData: import("vue").ComputedRef<boolean>;
|
2472
|
+
userStartIndex: import("vue").ComputedRef<number>;
|
2461
2473
|
groupStartIndex: import("vue").ComputedRef<number>;
|
2462
2474
|
currentList: import("vue").ComputedRef<AnyObject[]>;
|
2475
|
+
handleSearchInput: () => void;
|
2463
2476
|
handleKeyDown: (event: KeyboardEvent) => void;
|
2464
2477
|
addSession: (id: string) => Promise<void>;
|
2465
2478
|
handleTabChange: () => void;
|
@@ -2640,6 +2653,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
2640
2653
|
remark: import("vue").Ref<string>;
|
2641
2654
|
currentTab: import("vue").Ref<AnyObject[]>;
|
2642
2655
|
breadcrumbList: import("vue").Ref<AnyObject[]>;
|
2656
|
+
breadcrumbRef: import("vue").Ref<any>;
|
2643
2657
|
userList: import("vue").Ref<AnyObject[]>;
|
2644
2658
|
handleInput: () => void;
|
2645
2659
|
_disabledIds: import("vue").ComputedRef<any[]>;
|
@@ -3008,6 +3022,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
3008
3022
|
remark: import("vue").Ref<string>;
|
3009
3023
|
currentTab: import("vue").Ref<AnyObject[]>;
|
3010
3024
|
breadcrumbList: import("vue").Ref<AnyObject[]>;
|
3025
|
+
breadcrumbRef: import("vue").Ref<any>;
|
3011
3026
|
userList: import("vue").Ref<AnyObject[]>;
|
3012
3027
|
handleInput: () => void;
|
3013
3028
|
_disabledIds: import("vue").ComputedRef<any[]>;
|
@@ -5,6 +5,7 @@ export declare function getHistoryRecordApi(params: AnyObject): import("axios").
|
|
5
5
|
export declare function toppingSessionApi(params: AnyObject): import("axios").AxiosPromise<any>;
|
6
6
|
export declare function uploadFileApi(params: FormData): import("axios").AxiosPromise<any>;
|
7
7
|
export declare function listUserApi(params: AnyObject): import("axios").AxiosPromise<any>;
|
8
|
+
export declare function listPatientApi(params: AnyObject): import("axios").AxiosPromise<any>;
|
8
9
|
export declare function getUserDetailApi(params: AnyObject): import("axios").AxiosPromise<any>;
|
9
10
|
export declare function readMessageApi(params: AnyObject): import("axios").AxiosPromise<any>;
|
10
11
|
export declare function recallMessageApi(params: AnyObject): import("axios").AxiosPromise<any>;
|
@@ -1 +1 @@
|
|
1
|
-
import t from"axios";import{createDiscreteApi as e}from"naive-ui";const{message:r}=e(["message"]);function o(t){const e=[];for(const r in t){const o=t[r];Array.isArray(o)?o.forEach((t=>{e.push(`${encodeURIComponent(r)}=${encodeURIComponent(t)}`)})):e.push(`${encodeURIComponent(r)}=${encodeURIComponent(o)}`)}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:o(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:o(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
|
1
|
+
import t from"axios";import{createDiscreteApi as e}from"naive-ui";const{message:r}=e(["message"]);function o(t){const e=[];for(const r in t){const o=t[r];Array.isArray(o)?o.forEach((t=>{e.push(`${encodeURIComponent(r)}=${encodeURIComponent(t)}`)})):e.push(`${encodeURIComponent(r)}=${encodeURIComponent(o)}`)}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:o(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:o(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:"/patient/listPatient",params:t})}function c(t){return n({method:"get",url:"/user/getUserDetail",params:t})}function m(t){return n({method:"post",url:"/chat/readMessage",data:t})}function l(t){return n({method:"post",url:"/chat/recallMessage",data:t})}function h(t){return n({method:"post",url:"/chat/searchChatRecord",data:t})}function f(t){return n({method:"post",url:"/group/create",data:t})}function g(t){return n({method:"get",url:"/group/user",params:t})}function C(t){return n({method:"post",url:"/group/join",data:t})}function w(t){return n({method:"post",url:"/group/leave",data:t})}function v(t){return n({method:"post",url:"/av/finish",data:t})}function y(t){return n({headers:{"Content-Type":"multipart/form-data"},method:"post",url:"/group/update",data:t})}function U(t){return n({headers:{"Content-Type":"application/x-www-form-urlencoded"},method:"put",url:"/session/updateStatus",data:o(t)})}function T(){return n({method:"get",url:"/user/getOrgUserTree"})}n.interceptors.response.use((t=>{var e,o,n;if(null==(e=t.data)?void 0:e.result)return null==(o=t.data)?void 0:o.data;500==(null==(n=t.data)?void 0:n.code)&&t.data.msg&&r.error(t.data.msg)}));export{v as avFinishApi,u as getHistoryRecordApi,T as getOrgUserTreeApi,c as getUserDetailApi,f as groupCreateApi,C as groupJoinApi,w as groupLeaveApi,y as groupUpdateApi,g as groupUserApi,n as instanceAxios,p as listPatientApi,i as listUserApi,a as openSessionApi,m as readMessageApi,l as recallMessageApi,h as searchChatRecordApi,s as toppingSessionApi,U as updateStatusApi,d as uploadFileApi};
|
@@ -98,6 +98,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
98
98
|
remark: import("vue").Ref<string>;
|
99
99
|
currentTab: import("vue").Ref<AnyObject[]>;
|
100
100
|
breadcrumbList: import("vue").Ref<AnyObject[]>;
|
101
|
+
breadcrumbRef: import("vue").Ref<any>;
|
101
102
|
userList: import("vue").Ref<AnyObject[]>;
|
102
103
|
handleInput: () => void;
|
103
104
|
_disabledIds: import("vue").ComputedRef<any[]>;
|
@@ -1 +1 @@
|
|
1
|
-
import{createElementVNode as e,defineComponent as l,ref as a,computed as n,watch as o,openBlock as t,createElementBlock as i,Fragment as r,createVNode as u,unref as s,withCtx as d,createCommentVNode as c,createBlock as v,renderList as p,toDisplayString as f,createTextVNode as g,withDirectives as m,isRef as h,vShow as y,normalizeClass as w,withModifiers as k,renderSlot as b}from"vue";import{NModal as I,NInput as C,NIcon as _,NSpace as x,NButton as L,NBreadcrumb as j,NBreadcrumbItem as S,NCheckbox as B,NCheckboxGroup as U,NAvatar as R,NTag as E,NTooltip as N}from"naive-ui";import{SearchOutline as z,PersonOutline as A,PeopleOutline as D,ChevronBackOutline as G,ChevronForwardOutline as T,AddOutline as V}from"@vicons/ionicons5";import{useData as $}from"../hooks/useData.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import{CHAT_TYPE as M}from"../constants/index.js";import{getOrgUserTreeApi as O,groupUserApi as P,groupLeaveApi as q,groupJoinApi as F,groupCreateApi as H}from"../api/index.js";import{listSort as J,isDoctorRole as K,getRoleName as Q}from"../utils/index.js";import{union as W,unionBy as X,remove as Y,intersection as Z,last as ee,isArray as le,uniqBy as ae,cloneDeep as ne,trim as oe}from"lodash-es";import"trtc-sdk-v5";import{useSearchUserList as te}from"../hooks/useSearchUserList.js";var ie,re;const ue={class:"iho-chat-dialog__content iho-chat-add-wrapper"},se={key:0,class:"input-box"},de=e("span",null,(null==(ie=window.getLanguageByCode)?void 0:ie.call(window,"10010.1.34"))||"群名称:",-1),ce={class:"transfer-box"},ve={class:"transfer-box__left"},pe={key:0,class:"nav-wrapper"},fe={key:0,class:"chat--iconfont chat--icon-map-site"},ge={style:{"font-size":"12px"}},me={key:1,class:"header"},he={class:"user-list-box"},ye={key:0,class:"org-list"},we={class:"seach-box"},ke={class:"ellipsis"},be={key:0,style:{"font-size":"12px",color:"#666","margin-right":"10px"}},Ie={key:1,class:"no-data"},Ce={class:"transfer-box__right"},_e={class:"checked-tag-box"},xe={class:"seach-box"},Le={class:"ellipsis"},je={key:0,class:"input-wrapper"};var Se=l({__name:"ChatAdd",props:{title:{type:String,default:(null==(re=window.getLanguageByCode)?void 0:re.call(window,"10010.1.42"))||"添加新成员"},mode:{type:String,default:"select"},options:{type:Array},disabledIds:{type:Array,default:()=>[]},defaultValue:{type:Array,default:()=>[]},disabled:{type:Boolean,default:!1}},emits:["comfirm"],setup(l,{emit:ie}){const re=l;let Se=[];const Be=[{key:"single",label:"按好友选"},{key:"group",label:"按群聊选"},{key:"org",label:"按架构选"}];let Ue=[];const{state:Re,setCurrentSessionItem:Ee}=$(),Ne=a(),ze=a(""),Ae=a(!1),De=a([]),Ge=a(""),Te=a(""),Ve=a([]),$e=a([]),{userList:Me,handleInput:Oe}=te({wrapperRef:Ne,keywordRef:ze,before:()=>{Ve.value.length>0||(Me.value=Se)}}),Pe=n((()=>"relay"===re.mode?[]:W(re.disabledIds,[Re.userInfo.id]))),qe=n((()=>{var e;return(null==(e=Re.sessionList)?void 0:e.length)?J(Re.sessionList).map((e=>({id:e.receiver,name:e.name,avatar:e.avatar,chatType:e.chatType,roleInfo:e.roleInfo||""}))):[]})),Fe=n((()=>qe.value.filter((e=>e.chatType===M.SINGLE)))),He=n((()=>qe.value.filter((e=>e.chatType===M.GROUP)))),Je=n((()=>De.value.length?De.value.map((e=>e.id)):[])),Ke=n((()=>"create"===re.mode?Je.value.length<3:Je.value.length<1)),Qe=n({get:()=>We.value.filter((e=>!el(e))).length===Me.value.filter((e=>!el(e.id))).length,set(e){const l=[];if(Me.value.forEach((e=>{var a;if(1==e.type&&(null==(a=e.children)?void 0:a.length)){const a=ol(e.children||[]).filter((e=>!el(e.id)));l.push(...a)}else el(e.id)||l.push(e)})),e)De.value=X(De.value,l,"id");else{const e=l.map((e=>e.id));Y(De.value,(l=>e.includes(l.id)))}}}),We=n({get(){var e,l,a;return null!=(a=null==(l=null==(e=Me.value)?void 0:e.filter((e=>{var l;if(1==e.type&&(null==(l=e.children)?void 0:l.length)){const l=ol(e.children||[]).map((e=>e.id)).filter((e=>!el(e)));return Z(l,Je.value).length===l.length}return Je.value.includes(e.id)})))?void 0:l.map((e=>e.id)))?a:[]},set(e){Me.value.forEach((l=>{var a;const n=[];1==l.type&&(null==(a=l.children)?void 0:a.length)?n.push(...ol(l.children||[]).filter((e=>!el(e.id)))):n.push(l),e.includes(l.id)?De.value=X(De.value,n,"id"):Y(De.value,(e=>n.some((l=>l.id===e.id))))}))}}),Xe=n((()=>{var e;return Ve.value.length>0?null==(e=ee(Ve.value))?void 0:e.key:""})),Ye=n((()=>!("relay"!==re.mode&&["group","org"].includes(Xe.value)&&1===Ve.value.length)));function Ze(e){e.forEach((e=>{var l;1==e.type&&(null==(l=e.children)?void 0:l.length)?(e.total=ol(e.children).length,Ze(e.children)):2==e.type&&(e.total=0)}))}function el(e){var l,a;return"group"===Xe.value?"relay"!==re.mode&&(1===Ve.value.length||(null==(l=Pe.value)?void 0:l.includes(e))):null==(a=Pe.value)?void 0:a.includes(e)}function ll(){Ve.value.length>1?"group"===Xe.value?Me.value=He.value:"org"===Xe.value&&(Me.value=Ue.map((e=>({id:e.orgId,name:e.orgName}))),$e.value=[]):Me.value=Se,Ve.value.pop()}function al(e,l){const{id:a,children:n=[],type:o}=e;if("breadcrumb"!==l||ee($e.value).id!==a)if(o){const l=$e.value.findIndex((e=>e.id===a));l>-1?$e.value=$e.value.slice(0,l+1):$e.value.push(e),Me.value=n}else{const n=Ue.find((e=>e.orgId===a));$e.value=[e],Me.value=n.userList||[],l||Ve.value.push({key:Xe.value,label:n.orgName})}}function nl(e){const{children:l=[]}=e;if(!l.length)return!0;const a=ol(l).map((e=>e.id)).filter((e=>!Pe.value.includes(e)));return Z(a,Je.value).length===a.length}function ol(e){const l=[];return e.forEach((e=>{var a;1==e.type&&(null==(a=e.children)?void 0:a.length)?l.push(...ol(e.children)):2==e.type&&l.push(e)})),l}async function tl(){const e=s(Je);switch(re.mode){case"create":await H({creator:Re.userInfo.id,memberIdSet:e,name:oe(Ge.value),orgId:Re.orgId});break;case"join":if(await F({groupId:Re.currentSessionItem.receiver,operator:Re.userInfo.id,memberIdSet:e}),!Re.currentSessionItem.defaultName){const e=De.value.map((e=>e.name)).join(",");Ee({name:`${Re.currentSessionItem.name},${e}`})}Re.currentGroupUser.push(...Me.value.filter((l=>e.includes(l.id))));break;case"remove":if(await q({dissolution:!1,groupId:Re.currentSessionItem.receiver,operator:Re.userInfo.id,memberIdSet:e}),!Re.currentSessionItem.defaultName){const e=De.value.map((e=>e.name)).join(","),l=new RegExp(e,"g");Ee({name:Re.currentSessionItem.name.replace(l,"")})}Y(Re.currentGroupUser,(l=>e.includes(l.id)));break;default:ie("comfirm",{checkedIds:e,checkedOptions:De.value,remark:Te.value})}Ae.value=!1}return async function(){try{const e=await O();Ue=le(e)?e:[],Ue.forEach((e=>Ze(e.userList||[])))}catch(e){console.log("error ==>",e)}}(),o((()=>Ae.value),(e=>{if(!e)return;ze.value="",Ge.value="",Ve.value=[],$e.value=[];const l="relay"===re.mode?qe.value:Fe.value,a=le(re.options)&&re.options.length?re.options:l;Se=ae(a,"id"),Me.value=Se,De.value=le(re.defaultValue)&&re.defaultValue.length?ne(re.defaultValue):[]})),(a,n)=>{var o,$;return t(),i(r,null,[u(s(I),{preset:"dialog",title:l.title,"show-icon":!1,"auto-focus":!1,"trap-focus":!1,class:"iho-chat-dialog",show:Ae.value,"onUpdate:show":n[5]||(n[5]=e=>Ae.value=e),"negative-text":(null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.28"))||"取消","positive-text":(null==($=window.getLanguageByCode)?void 0:$.call(window,"10010.1.27"))||"确定","display-directive":"show","positive-button-props":{disabled:s(Ke)},onPositiveClick:tl},{default:d((()=>{var a,o,b,I,N,V,$,M,O;return[e("div",ue,["create"===l.mode?(t(),i("div",se,[de,u(s(C),{clearable:"",placeholder:(null==(a=window.getLanguageByCode)?void 0:a.call(window,"10010.1.35"))||"取个群名称方便后续搜索",value:Ge.value,"onUpdate:value":n[0]||(n[0]=e=>Ge.value=e),valueModifiers:{trim:!0}},null,8,["value"])])):c("v-if",!0),e("div",ce,[e("div",ve,[u(s(C),{placeholder:(null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.36"))||"搜索",clearable:"",value:ze.value,"onUpdate:value":[n[1]||(n[1]=e=>ze.value=e),s(Oe)],valueModifiers:{trim:!0}},{prefix:d((()=>[u(s(_),{component:s(z)},null,8,["component"])])),_:1},8,["value","onUpdate:value"]),ze.value||"remove"===l.mode?c("v-if",!0):(t(),i("div",pe,[0===Ve.value.length?(t(),v(s(x),{key:0,justify:"space-around","wrap-item":!1},{default:d((()=>[(t(),i(r,null,p(Be,(l=>u(s(x),{vertical:"",align:"center","wrap-item":!1,key:l.key,onClick:()=>function(e){switch(ze.value="",Ve.value=[e],e.key){case"single":Me.value=Fe.value;break;case"group":Me.value=He.value;break;case"org":Me.value=Ue.map((e=>({id:e.orgId,name:e.orgName})))}}(l)},{default:d((()=>[u(s(L),{tertiary:""},{icon:d((()=>["org"===l.key?(t(),i("i",fe)):(t(),v(s(_),{key:1,component:"single"===l.key?s(A):s(D)},null,8,["component"]))])),_:2},1024),e("span",ge,f(l.label),1)])),_:2},1032,["onClick"]))),64))])),_:1})):c("v-if",!0),Ve.value.length>0?(t(),i("div",me,[u(s(L),{text:"",onClick:ll},{icon:d((()=>[u(s(_),{component:s(G)},null,8,["component"])])),_:1}),e("h4",null,f(null==(b=s(ee)(Ve.value))?void 0:b.label),1)])):c("v-if",!0),Ve.value.length>0&&"org"===(null==(I=s(ee)(Ve.value))?void 0:I.key)&&$e.value.length>0?(t(),v(s(j),{key:2,separator:">"},{default:d((()=>[(t(!0),i(r,null,p($e.value,(e=>(t(),v(s(S),{key:e.id,onClick:l=>al(e,"breadcrumb")},{default:d((()=>[g(f(e.name),1)])),_:2},1032,["onClick"])))),128))])),_:1})):c("v-if",!0)])),e("div",he,[s(Me).length>0?(t(),i(r,{key:0},[m(u(s(B),{label:(null==(N=window.getLanguageByCode)?void 0:N.call(window,"10010.1.37"))||"全选",checked:s(Qe),"onUpdate:checked":n[2]||(n[2]=e=>h(Qe)?Qe.value=e:null)},null,8,["checked"]),[[y,s(Ye)]]),"org"===s(Xe)&&1===Ve.value.length?(t(),i("div",ye,[(t(!0),i(r,null,p(s(Me),(l=>(t(),v(s(x),{"wrap-item":!1,align:"center",justify:"space-between",key:l.Id,onClick:e=>al(l)},{default:d((()=>[e("span",null,f(l.name),1),u(s(_),{size:"16",component:s(T)},null,8,["component"])])),_:2},1032,["onClick"])))),128))])):(t(),v(s(U),{key:1,ref_key:"listRef",ref:Ne,value:s(We),"onUpdate:value":n[3]||(n[3]=e=>h(We)?We.value=e:null)},{default:d((()=>[(t(!0),i(r,null,p(s(Me),(l=>(t(),v(s(B),{key:l.id,value:l.id,disabled:el(l.id),onClick:()=>async function(e){const l=s(Xe);if(l&&"relay"!==re.mode&&"group"===l&&1===Ve.value.length)try{Ve.value.push({key:l,label:e.name});const a=await P({id:e.id});Me.value=le(a)?a:[]}catch(e){console.log("error ==>",e)}}(l)},{default:d((()=>[u(s(x),{align:"center","wrap-item":!1,wrap:!1},{default:d((()=>[u(s(R),{src:l.avatar,round:"",size:32},null,8,["src"]),e("div",we,[e("span",ke,f(l.name),1),m(e("label",{class:w(["iho-chatRole",s(K)(l.roleInfo)?"isDoctor":""])},f(s(Q)(l.roleInfo)),3),[[y,s(Q)(l.roleInfo)]])]),l.total?(t(),i("span",be," ("+f(l.total)+"人) ",1)):c("v-if",!0),1==l.type&&l.children.length>0?(t(),v(s(L),{key:1,type:"primary",text:"",disabled:nl(l),style:{"margin-left":"auto"},onClick:k((e=>al(l)),["stop"])},{default:d((()=>[g(" 下级 ")])),_:2},1032,["disabled","onClick"])):c("v-if",!0)])),_:2},1024)])),_:2},1032,["value","disabled","onClick"])))),128))])),_:1},8,["value"]))],64)):(t(),i("div",Ie,(null==(V=window.getLanguageByCode)?void 0:V.call(window,"10010.1.38"))||"找不到相关结果"))])]),e("div",Ce,[e("span",null,((null==($=window.getLanguageByCode)?void 0:$.call(window,"10010.1.39"))||"已选择")+f(s(Je).length)+((null==(M=window.getLanguageByCode)?void 0:M.call(window,"10010.1.40"))||"人"),1),e("div",_e,[(t(!0),i(r,null,p(De.value,(a=>(t(),v(s(E),{key:a.id,bordered:!1,closable:"relay"===l.mode||a.id!==s(Re).userInfo.id,disabled:s(Pe).includes(a.id),onClose:()=>{return e=a.id,void Y(De.value,(l=>l.id===e));var e}},{avatar:d((()=>[u(s(R),{round:"",src:a.avatar},null,8,["src"])])),default:d((()=>[e("div",xe,[e("span",Le,f(a.name),1),m(e("label",{class:w(["iho-chatRole",s(K)(a.roleInfo)?"isDoctor":""])},f(s(Q)(a.roleInfo)),3),[[y,s(Q)(a.roleInfo)]])])])),_:2},1032,["closable","disabled","onClose"])))),128))]),"relay"===l.mode?(t(),i("div",je,[u(s(C),{clearable:"",value:Te.value,"onUpdate:value":n[4]||(n[4]=e=>Te.value=e),type:"textarea",placeholder:(null==(O=window.getLanguageByCode)?void 0:O.call(window,"10010.1.41"))||"留言",autosize:{minRows:2,maxRows:2}},null,8,["value"])])):c("v-if",!0)])])])]})),_:1},8,["title","show","positive-button-props"]),e("span",{class:w(["btn-wrapper",{disabled:l.disabled}]),onClick:n[6]||(n[6]=e=>Ae.value=!0)},[b(a.$slots,"trigger",{},(()=>[u(s(N),{"show-arrow":!1,placement:"bottom"},{trigger:d((()=>[u(s(L),{color:"#ffffff4D",class:"add-btn"},{icon:d((()=>[u(s(_),{component:s(V),color:"#fff"},null,8,["component"])])),_:1})])),default:d((()=>[g(" "+f(l.title),1)])),_:1})]))],2)],64)}}});export{Se as default};
|
1
|
+
import{createElementVNode as e,defineComponent as l,ref as a,computed as n,watch as o,openBlock as t,createElementBlock as i,Fragment as r,createVNode as u,unref as s,withCtx as d,createCommentVNode as c,createBlock as v,renderList as p,toDisplayString as f,createTextVNode as g,withDirectives as m,isRef as h,vShow as y,normalizeClass as w,withModifiers as k,renderSlot as b,nextTick as I}from"vue";import{NModal as C,NInput as _,NIcon as x,NSpace as L,NButton as j,NBreadcrumb as S,NBreadcrumbItem as B,NCheckbox as U,NCheckboxGroup as R,NAvatar as E,NTag as N,NTooltip as T}from"naive-ui";import{SearchOutline as z,PersonOutline as A,PeopleOutline as D,ChevronBackOutline as G,ChevronForwardOutline as V,AddOutline as $}from"@vicons/ionicons5";import{useData as M}from"../hooks/useData.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import{CHAT_TYPE as O}from"../constants/index.js";import{getOrgUserTreeApi as P,groupUserApi as q,groupLeaveApi as F,groupJoinApi as H,groupCreateApi as J}from"../api/index.js";import{listSort as K,isDoctorRole as Q,getRoleName as W}from"../utils/index.js";import{union as X,unionBy as Y,remove as Z,intersection as ee,last as le,isArray as ae,uniqBy as ne,cloneDeep as oe,trim as te}from"lodash-es";import"trtc-sdk-v5";import{useSearchUserList as ie}from"../hooks/useSearchUserList.js";var re,ue;const se={class:"iho-chat-dialog__content iho-chat-add-wrapper"},de={key:0,class:"input-box"},ce=e("span",null,(null==(re=window.getLanguageByCode)?void 0:re.call(window,"10010.1.34"))||"群名称:",-1),ve={class:"transfer-box"},pe={class:"transfer-box__left"},fe={key:0,class:"nav-wrapper"},ge={key:0,class:"chat--iconfont chat--icon-map-site"},me={style:{"font-size":"12px"}},he={key:1,class:"header"},ye={class:"user-list-box"},we={key:0,class:"org-list"},ke={class:"seach-box"},be={class:"ellipsis"},Ie={key:0,style:{"font-size":"12px",color:"#666","margin-right":"10px","white-space":"nowrap"}},Ce={key:1,class:"no-data"},_e={class:"transfer-box__right"},xe={class:"checked-tag-box"},Le={class:"seach-box"},je={class:"ellipsis"},Se={key:0,class:"input-wrapper"};var Be=l({__name:"ChatAdd",props:{title:{type:String,default:(null==(ue=window.getLanguageByCode)?void 0:ue.call(window,"10010.1.42"))||"添加新成员"},mode:{type:String,default:"select"},options:{type:Array},disabledIds:{type:Array,default:()=>[]},defaultValue:{type:Array,default:()=>[]},disabled:{type:Boolean,default:!1}},emits:["comfirm"],setup(l,{emit:re}){const ue=l;let Be=[];const Ue=[{key:"single",label:"按好友选"},{key:"group",label:"按群聊选"},{key:"org",label:"按架构选"}];let Re=[];const{state:Ee,setCurrentSessionItem:Ne}=M(),Te=a(),ze=a(""),Ae=a(!1),De=a([]),Ge=a(""),Ve=a(""),$e=a([]),Me=a([]),Oe=a(),{userList:Pe,handleInput:qe}=ie({wrapperRef:Te,keywordRef:ze,before:()=>{$e.value.length>0||(Pe.value=Be)}}),Fe=n((()=>"relay"===ue.mode?[]:X(ue.disabledIds,[Ee.userInfo.id]))),He=n((()=>{var e;return(null==(e=Ee.sessionList)?void 0:e.length)?K(Ee.sessionList).map((e=>({id:e.receiver,name:e.name,avatar:e.avatar,chatType:e.chatType,roleInfo:e.roleInfo||""}))):[]})),Je=n((()=>He.value.filter((e=>e.chatType===O.SINGLE)))),Ke=n((()=>He.value.filter((e=>e.chatType===O.GROUP)))),Qe=n((()=>De.value.length?De.value.map((e=>e.id)):[])),We=n((()=>"create"===ue.mode?Qe.value.length<3:Qe.value.length<1)),Xe=n({get:()=>Ye.value.filter((e=>!al(e))).length===Pe.value.filter((e=>!al(e.id))).length,set(e){const l=[];if(Pe.value.forEach((e=>{var a;if(1==e.type&&(null==(a=e.children)?void 0:a.length)){const a=il(e.children||[]).filter((e=>!al(e.id)));l.push(...a)}else al(e.id)||l.push(e)})),e)De.value=Y(De.value,l,"id");else{const e=l.map((e=>e.id));Z(De.value,(l=>e.includes(l.id)))}}}),Ye=n({get(){var e,l,a;return null!=(a=null==(l=null==(e=Pe.value)?void 0:e.filter((e=>{var l;if(1==e.type&&(null==(l=e.children)?void 0:l.length)){const l=il(e.children||[]).map((e=>e.id)).filter((e=>!al(e)));return ee(l,Qe.value).length===l.length}return Qe.value.includes(e.id)})))?void 0:l.map((e=>e.id)))?a:[]},set(e){Pe.value.forEach((l=>{var a;const n=[];1==l.type&&(null==(a=l.children)?void 0:a.length)?n.push(...il(l.children||[]).filter((e=>!al(e.id)))):n.push(l),e.includes(l.id)?De.value=Y(De.value,n,"id"):Z(De.value,(e=>n.some((l=>l.id===e.id))))}))}}),Ze=n((()=>{var e;return $e.value.length>0?null==(e=le($e.value))?void 0:e.key:""})),el=n((()=>!("relay"!==ue.mode&&["group","org"].includes(Ze.value)&&1===$e.value.length)));function ll(e){e.forEach((e=>{var l;1==e.type&&(null==(l=e.children)?void 0:l.length)?(e.total=il(e.children).length,ll(e.children)):2==e.type&&(e.total=0)}))}function al(e){var l,a;return"group"===Ze.value?"relay"!==ue.mode&&(1===$e.value.length||(null==(l=Fe.value)?void 0:l.includes(e))):null==(a=Fe.value)?void 0:a.includes(e)}function nl(){$e.value.length>1?"group"===Ze.value?Pe.value=Ke.value:"org"===Ze.value&&(Pe.value=Re.map((e=>({id:e.orgId,name:e.orgName}))),Me.value=[]):Pe.value=Be,$e.value.pop()}function ol(e,l){const{id:a,children:n=[],type:o}=e;if("breadcrumb"!==l||le(Me.value).id!==a)if(o){const l=Me.value.findIndex((e=>e.id===a));l>-1?Me.value=Me.value.slice(0,l+1):Me.value.push(e),Pe.value=n,I((()=>{const e=Oe.value.$el.getElementsByTagName("ul")[0];e&&e.scrollTo(1e7,0)}))}else{const n=Re.find((e=>e.orgId===a));Me.value=[e],Pe.value=n.userList||[],l||$e.value.push({key:Ze.value,label:n.orgName})}}function tl(e){const{children:l=[]}=e;if(!l.length)return!0;const a=il(l).map((e=>e.id)).filter((e=>!Fe.value.includes(e)));return ee(a,Qe.value).length===a.length}function il(e){const l=[];return e.forEach((e=>{var a;1==e.type&&(null==(a=e.children)?void 0:a.length)?l.push(...il(e.children)):2==e.type&&l.push(e)})),l}async function rl(){const e=s(Qe);switch(ue.mode){case"create":await J({creator:Ee.userInfo.id,memberIdSet:e,name:te(Ge.value),orgId:Ee.orgId});break;case"join":if(await H({groupId:Ee.currentSessionItem.receiver,operator:Ee.userInfo.id,memberIdSet:e}),!Ee.currentSessionItem.defaultName){const e=De.value.map((e=>e.name)).join(",");Ne({name:`${Ee.currentSessionItem.name},${e}`})}Ee.currentGroupUser.push(...Pe.value.filter((l=>e.includes(l.id))));break;case"remove":if(await F({dissolution:!1,groupId:Ee.currentSessionItem.receiver,operator:Ee.userInfo.id,memberIdSet:e}),!Ee.currentSessionItem.defaultName){const e=De.value.map((e=>e.name)).join(","),l=new RegExp(e,"g");Ne({name:Ee.currentSessionItem.name.replace(l,"")})}Z(Ee.currentGroupUser,(l=>e.includes(l.id)));break;default:re("comfirm",{checkedIds:e,checkedOptions:De.value,remark:Ve.value})}Ae.value=!1}return async function(){try{const e=await P();Re=ae(e)?e:[],Re.forEach((e=>ll(e.userList||[])))}catch(e){console.log("error ==>",e)}}(),o((()=>Ae.value),(e=>{if(!e)return;ze.value="",Ge.value="",$e.value=[],Me.value=[];const l="relay"===ue.mode?He.value:Je.value,a=ae(ue.options)&&ue.options.length?ue.options:l;Be=ne(a,"id"),Pe.value=Be,De.value=ae(ue.defaultValue)&&ue.defaultValue.length?oe(ue.defaultValue):[]})),(a,n)=>{var o,I;return t(),i(r,null,[u(s(C),{preset:"dialog",title:l.title,"show-icon":!1,"auto-focus":!1,"trap-focus":!1,class:"iho-chat-dialog",show:Ae.value,"onUpdate:show":n[5]||(n[5]=e=>Ae.value=e),"negative-text":(null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.28"))||"取消","positive-text":(null==(I=window.getLanguageByCode)?void 0:I.call(window,"10010.1.27"))||"确定","display-directive":"show","positive-button-props":{disabled:s(We)},onPositiveClick:rl},{default:d((()=>{var a,o,b,I,C,T,$,M,O;return[e("div",se,["create"===l.mode?(t(),i("div",de,[ce,u(s(_),{clearable:"",placeholder:(null==(a=window.getLanguageByCode)?void 0:a.call(window,"10010.1.35"))||"取个群名称方便后续搜索",value:Ge.value,"onUpdate:value":n[0]||(n[0]=e=>Ge.value=e),valueModifiers:{trim:!0}},null,8,["value"])])):c("v-if",!0),e("div",ve,[e("div",pe,[u(s(_),{placeholder:(null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.36"))||"搜索",clearable:"",value:ze.value,"onUpdate:value":[n[1]||(n[1]=e=>ze.value=e),s(qe)],valueModifiers:{trim:!0}},{prefix:d((()=>[u(s(x),{component:s(z)},null,8,["component"])])),_:1},8,["value","onUpdate:value"]),ze.value||"remove"===l.mode?c("v-if",!0):(t(),i("div",fe,[0===$e.value.length?(t(),v(s(L),{key:0,justify:"space-around","wrap-item":!1},{default:d((()=>[(t(),i(r,null,p(Ue,(l=>u(s(L),{vertical:"",align:"center","wrap-item":!1,key:l.key,onClick:()=>function(e){switch(ze.value="",$e.value=[e],e.key){case"single":Pe.value=Je.value;break;case"group":Pe.value=Ke.value;break;case"org":Pe.value=Re.map((e=>({id:e.orgId,name:e.orgName})))}}(l)},{default:d((()=>[u(s(j),{tertiary:""},{icon:d((()=>["org"===l.key?(t(),i("i",ge)):(t(),v(s(x),{key:1,component:"single"===l.key?s(A):s(D)},null,8,["component"]))])),_:2},1024),e("span",me,f(l.label),1)])),_:2},1032,["onClick"]))),64))])),_:1})):c("v-if",!0),$e.value.length>0?(t(),i("div",he,[u(s(j),{text:"",onClick:nl},{icon:d((()=>[u(s(x),{component:s(G)},null,8,["component"])])),_:1}),e("h4",null,f(null==(b=s(le)($e.value))?void 0:b.label),1)])):c("v-if",!0),$e.value.length>0&&"org"===(null==(I=s(le)($e.value))?void 0:I.key)&&Me.value.length>0?(t(),v(s(S),{key:2,ref_key:"breadcrumbRef",ref:Oe,separator:">"},{default:d((()=>[(t(!0),i(r,null,p(Me.value,(e=>(t(),v(s(B),{key:e.id,onClick:l=>ol(e,"breadcrumb")},{default:d((()=>[g(f(e.name),1)])),_:2},1032,["onClick"])))),128))])),_:1},512)):c("v-if",!0)])),e("div",ye,[s(Pe).length>0?(t(),i(r,{key:0},[m(u(s(U),{label:(null==(C=window.getLanguageByCode)?void 0:C.call(window,"10010.1.37"))||"全选",checked:s(Xe),"onUpdate:checked":n[2]||(n[2]=e=>h(Xe)?Xe.value=e:null)},null,8,["checked"]),[[y,s(el)]]),"org"===s(Ze)&&1===$e.value.length?(t(),i("div",we,[(t(!0),i(r,null,p(s(Pe),(l=>(t(),v(s(L),{"wrap-item":!1,align:"center",justify:"space-between",key:l.Id,onClick:e=>ol(l)},{default:d((()=>[e("span",null,f(l.name),1),u(s(x),{size:"16",component:s(V)},null,8,["component"])])),_:2},1032,["onClick"])))),128))])):(t(),v(s(R),{key:1,ref_key:"listRef",ref:Te,value:s(Ye),"onUpdate:value":n[3]||(n[3]=e=>h(Ye)?Ye.value=e:null)},{default:d((()=>[(t(!0),i(r,null,p(s(Pe),(l=>(t(),v(s(U),{key:l.id,value:l.id,disabled:al(l.id),onClick:()=>async function(e){const l=s(Ze);if(l&&"relay"!==ue.mode&&"group"===l&&1===$e.value.length)try{$e.value.push({key:l,label:e.name});const a=await q({id:e.id});Pe.value=ae(a)?a:[]}catch(e){console.log("error ==>",e)}}(l)},{default:d((()=>[u(s(L),{align:"center","wrap-item":!1,wrap:!1},{default:d((()=>[u(s(E),{src:l.avatar,round:"",size:32},null,8,["src"]),e("div",ke,[e("span",be,f(l.name),1),m(e("label",{class:w(["iho-chatRole",s(Q)(l.roleInfo)?"isDoctor":""])},f(s(W)(l.roleInfo)),3),[[y,s(W)(l.roleInfo)]])]),l.total?(t(),i("span",Ie," ("+f(l.total)+"人) ",1)):c("v-if",!0),1==l.type&&l.children.length>0?(t(),v(s(j),{key:1,type:"primary",text:"",disabled:tl(l),style:{"margin-left":"auto"},onClick:k((e=>ol(l)),["stop"])},{default:d((()=>[g(" 下级 ")])),_:2},1032,["disabled","onClick"])):c("v-if",!0)])),_:2},1024)])),_:2},1032,["value","disabled","onClick"])))),128))])),_:1},8,["value"]))],64)):(t(),i("div",Ce,(null==(T=window.getLanguageByCode)?void 0:T.call(window,"10010.1.38"))||"找不到相关结果"))])]),e("div",_e,[e("span",null,((null==($=window.getLanguageByCode)?void 0:$.call(window,"10010.1.39"))||"已选择")+f(s(Qe).length)+((null==(M=window.getLanguageByCode)?void 0:M.call(window,"10010.1.40"))||"人"),1),e("div",xe,[(t(!0),i(r,null,p(De.value,(a=>(t(),v(s(N),{key:a.id,bordered:!1,closable:"relay"===l.mode||a.id!==s(Ee).userInfo.id,disabled:s(Fe).includes(a.id),onClose:()=>{return e=a.id,void Z(De.value,(l=>l.id===e));var e}},{avatar:d((()=>[u(s(E),{round:"",src:a.avatar},null,8,["src"])])),default:d((()=>[e("div",Le,[e("span",je,f(a.name),1),m(e("label",{class:w(["iho-chatRole",s(Q)(a.roleInfo)?"isDoctor":""])},f(s(W)(a.roleInfo)),3),[[y,s(W)(a.roleInfo)]])])])),_:2},1032,["closable","disabled","onClose"])))),128))]),"relay"===l.mode?(t(),i("div",Se,[u(s(_),{clearable:"",value:Ve.value,"onUpdate:value":n[4]||(n[4]=e=>Ve.value=e),type:"textarea",placeholder:(null==(O=window.getLanguageByCode)?void 0:O.call(window,"10010.1.41"))||"留言",autosize:{minRows:2,maxRows:2}},null,8,["value"])])):c("v-if",!0)])])])]})),_:1},8,["title","show","positive-button-props"]),e("span",{class:w(["btn-wrapper",{disabled:l.disabled}]),onClick:n[6]||(n[6]=e=>Ae.value=!0)},[b(a.$slots,"trigger",{},(()=>[u(s(T),{"show-arrow":!1,placement:"bottom"},{trigger:d((()=>[u(s(j),{color:"#ffffff4D",class:"add-btn"},{icon:d((()=>[u(s(x),{component:s($),color:"#fff"},null,8,["component"])])),_:1})])),default:d((()=>[g(" "+f(l.title),1)])),_:1})]))],2)],64)}}});export{Be as default};
|
@@ -182,6 +182,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
182
182
|
remark: import("vue").Ref<string>;
|
183
183
|
currentTab: import("vue").Ref<AnyObject[]>;
|
184
184
|
breadcrumbList: import("vue").Ref<AnyObject[]>;
|
185
|
+
breadcrumbRef: import("vue").Ref<any>;
|
185
186
|
userList: import("vue").Ref<AnyObject[]>;
|
186
187
|
handleInput: () => void;
|
187
188
|
_disabledIds: import("vue").ComputedRef<any[]>;
|
@@ -173,6 +173,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
173
173
|
remark: Ref<string>;
|
174
174
|
currentTab: Ref<AnyObject[]>;
|
175
175
|
breadcrumbList: Ref<AnyObject[]>;
|
176
|
+
breadcrumbRef: Ref<any>;
|
176
177
|
userList: Ref<AnyObject[]>;
|
177
178
|
handleInput: () => void;
|
178
179
|
_disabledIds: import("vue").ComputedRef<any[]>;
|
@@ -220,6 +220,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
220
220
|
remark: import("vue").Ref<string>;
|
221
221
|
currentTab: import("vue").Ref<AnyObject[]>;
|
222
222
|
breadcrumbList: import("vue").Ref<AnyObject[]>;
|
223
|
+
breadcrumbRef: import("vue").Ref<any>;
|
223
224
|
userList: import("vue").Ref<AnyObject[]>;
|
224
225
|
handleInput: () => void;
|
225
226
|
_disabledIds: import("vue").ComputedRef<any[]>;
|
@@ -499,6 +500,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
499
500
|
remark: import("vue").Ref<string>;
|
500
501
|
currentTab: import("vue").Ref<AnyObject[]>;
|
501
502
|
breadcrumbList: import("vue").Ref<AnyObject[]>;
|
503
|
+
breadcrumbRef: import("vue").Ref<any>;
|
502
504
|
userList: import("vue").Ref<AnyObject[]>;
|
503
505
|
handleInput: () => void;
|
504
506
|
_disabledIds: import("vue").ComputedRef<any[]>;
|
@@ -811,6 +813,8 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
811
813
|
holidays: Date[];
|
812
814
|
}>>;
|
813
815
|
formatTime: typeof import("../utils").formatTime;
|
816
|
+
isDoctorRole: typeof import("../utils").isDoctorRole;
|
817
|
+
getRoleName: typeof import("../utils").getRoleName;
|
814
818
|
MESSAGE_TYPE: typeof import("../constants").MESSAGE_TYPE;
|
815
819
|
emojis: {
|
816
820
|
default: string[][];
|
@@ -920,6 +924,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
920
924
|
remark: import("vue").Ref<string>;
|
921
925
|
currentTab: import("vue").Ref<AnyObject[]>;
|
922
926
|
breadcrumbList: import("vue").Ref<AnyObject[]>;
|
927
|
+
breadcrumbRef: import("vue").Ref<any>;
|
923
928
|
userList: import("vue").Ref<AnyObject[]>;
|
924
929
|
handleInput: () => void;
|
925
930
|
_disabledIds: import("vue").ComputedRef<any[]>;
|
@@ -483,6 +483,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
483
483
|
remark: import("vue").Ref<string>;
|
484
484
|
currentTab: import("vue").Ref<AnyObject[]>;
|
485
485
|
breadcrumbList: import("vue").Ref<AnyObject[]>;
|
486
|
+
breadcrumbRef: import("vue").Ref<any>;
|
486
487
|
userList: import("vue").Ref<AnyObject[]>;
|
487
488
|
handleInput: () => void;
|
488
489
|
_disabledIds: import("vue").ComputedRef<any[]>;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { PropType } from 'vue';
|
2
2
|
import { AnyObject } from '../../../../shared/types';
|
3
|
-
import { formatTime } from '../utils';
|
3
|
+
import { formatTime, isDoctorRole, getRoleName } from '../utils';
|
4
4
|
import { MESSAGE_TYPE } from '../constants';
|
5
5
|
declare const _default: import("vue").DefineComponent<{
|
6
6
|
visible: {
|
@@ -207,6 +207,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
207
207
|
holidays: Date[];
|
208
208
|
}>>;
|
209
209
|
formatTime: typeof formatTime;
|
210
|
+
isDoctorRole: typeof isDoctorRole;
|
211
|
+
getRoleName: typeof getRoleName;
|
210
212
|
MESSAGE_TYPE: typeof MESSAGE_TYPE;
|
211
213
|
emojis: {
|
212
214
|
default: string[][];
|
@@ -1 +1 @@
|
|
1
|
-
import{createElementVNode as e,defineComponent as a,ref as l,watch as t,openBlock as
|
1
|
+
import{createElementVNode as e,defineComponent as a,ref as l,watch as t,openBlock as s,createBlock as n,unref as r,withCtx as o,createVNode as i,toDisplayString as u,normalizeStyle as d,resolveDynamicComponent as c,createElementBlock as v,Fragment as m,renderList as p,createCommentVNode as f,withDirectives as g,normalizeClass as h,vShow as y,createTextVNode as w}from"vue";import{NModal as _,NAvatar as b,NInputGroup as T,NInput as k,NSelect as M,NPopover as I,NTag as x,NIcon as j}from"naive-ui";import{SearchOutline as C}from"@vicons/ionicons5";import{useData as L}from"../hooks/useData.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import{MESSAGE_TYPE as A}from"../constants/index.js";import{searchChatRecordApi as S}from"../api/index.js";import{transformMessage as H,isDoctorRole as D,getRoleName as U,formatTime as B}from"../utils/index.js";import{last as E}from"lodash-es";import"trtc-sdk-v5";import N from"../../../date-picker/index.js";import{useDebounceFn as z}from"@vueuse/core";import{format as O}from"date-fns";import"../../../../shared/utils/index.js";import"@vue/shared";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import{useScrollLoading as R}from"../../../../shared/hooks/useScrollLoading.js";import{emojis as G}from"../utils/emoji.js";var $,J;const W={class:"iho-chat-dialog__header"},F=e("span",{class:"left"},(null==($=window.getLanguageByCode)?void 0:$.call(window,"10010.1.65"))||"聊天记录",-1),P={class:"center"},V={class:"chat-record-box"},q={class:"msg-box"},K={class:"name-and-time"},Q={class:"seach-box"},X={class:"ellipsis"},Y={style:{"white-space":"nowrap"}},Z={class:"content"},ee=["src"],ae={class:"file-type"},le={class:"text"},te={class:"name"},se={class:"detail"},ne=["src"],re=["innerHTML"],oe={key:1,class:"no-data"},ie={class:"chat-record-box__filter"},ue=e("span",{class:"filter-title"},(null==(J=window.getLanguageByCode)?void 0:J.call(window,"10010.1.72"))||"添加筛选条件",-1),de={class:"filter-item"},ce=e("span",{class:"label"},"成员:",-1),ve={class:"filter-item"},me=e("span",{class:"label"},"日期:",-1),pe={class:"time-target"},fe={class:"time-target__item"},ge=e("span",null,"开始:",-1),he={class:"tip"},ye={class:"time-target__item"},we=e("span",null,"结束:",-1),_e={class:"tip"};var be=a({__name:"ChatRecord",props:{visible:{type:Boolean}},setup(a){const $=a,J={color:"#fff",textColor:"#666"},{state:be,cssVars:Te}=L(),ke=l(),Me=l([]),Ie=l(),xe=l([]),je=l(),Ce=l(),Le=z(Be,500),Ae={page:0,hasMore:!0,lastSendTime:O(new Date,"yyyy-MM-dd HH:mm:ss")};function Se(e,a){try{const l=JSON.parse(e);return l?l[a]:""}catch(a){return e||""}}function He(e){const{size:a,sendTime:l,senderName:t}=e;return`${O(new Date(l),"yyyy/MM/dd HH:mm")} ${t}`}function De(e){const a=e.lastIndexOf(".");if(console.log("dotIndex",a),-1!==a){return e.charAt(a+1).toUpperCase()}return"?"}async function Ue(){var e;try{if(!Ae.hasMore)return;Ae.page++;const a=await S({orgId:be.orgId,keyword:Ie.value,endTime:ze(),startTime:je.value?je.value+" 00:00:00":"",lastSendTime:Ae.lastSendTime,memberIdSet:xe.value,page:Ae.page,recordType:"ALL",receiver:be.currentSessionItem.receiver,userId:be.userInfo.id});Array.isArray(a)&&0!==a.length&&Array.isArray(a[0].recordList)||(Ae.hasMore=!1);let l=a||[];Array.isArray(a)&&a.length>0&&(l=a[0].recordList.filter((e=>"WITHDRAWN"!==e.status))),Ae.lastSendTime=null==(e=E(l))?void 0:e.sendTime,l.forEach((e=>{var a,l,t;let s="";if(e.content.chatMessageType===A.TEMPLATE)s=null==(t=null==(l=null==(a=e.content)?void 0:a.messageTemplate)?void 0:l.setting)?void 0:t.title;else s=H(e.content);e.__content=s})),Me.value=Ae.page>1?Me.value.concat(l):l}catch(e){}}function Be(){Object.assign(Ae,{page:0,hasMore:!0,lastSendTime:ze()||O(new Date,"yyyy-MM-dd HH:mm:ss")}),Ue()}function Ee(e){return!!Ce.value&&e>Date.parse(`${Ce.value} 23:59:59`)}function Ne(e){return!!je.value&&e<Date.parse(je.value)}function ze(){return Ce.value?Ce.value+" 23:59:59":""}function Oe(e){switch(e){case"member":xe.value=[];break;case"start":je.value=null;break;case"end":Ce.value=null}}function Re(e){return i(m,null,[i("div",{style:"display: flex;align-items: center"},[i(b,{src:e.avatar,round:!0,size:"small"},null),i("span",{style:"margin-left: 10px"},[e.name])])])}return R(ke,(()=>{Ue()})),t([()=>xe.value,()=>je.value,()=>Ce.value],(()=>{$.visible&&Be()}),{deep:!0}),t((()=>$.visible),(e=>{e?Be():(Ie.value="",Ce.value=null,je.value=null,xe.value=[],Me.value=[])})),(a,l)=>(s(),n(r(_),{preset:"dialog",title:"","show-icon":!1,"auto-focus":!1,class:"iho-chat-dialog"},{header:o((()=>[e("div",W,[F,e("div",P,[i(r(b),{round:"",size:30,src:r(be).currentSessionItem.avatar},null,8,["src"]),e("span",null,u(r(be).currentSessionItem.name),1)])])])),default:o((()=>[e("div",{class:"iho-chat-dialog__content iho-chat-record-wrapper",style:d(r(Te))},[i(r(T),null,{default:o((()=>{var e;return[(s(),n(c((()=>[i(j,{component:C,size:18,color:"#6666"},null),xe.value.length>0?i(x,{closable:!0,bordered:!1,color:J,onClose:()=>Oe("member")},{default:()=>{var e,a;return[w("成员:")," ",xe.value.length>1?xe.value.length+((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.40"))||"人"):null==(a=be.currentGroupUser.find((e=>e.id===xe.value[0])))?void 0:a.name]}}):null,je.value?i(x,{closable:!0,bordered:!1,color:J,onClose:()=>Oe("start")},{default:()=>[w("起始时间: "),je.value]}):null,Ce.value?i(x,{closable:!0,bordered:!1,color:J,onClose:()=>Oe("end")},{default:()=>[w("结束时间: "),Ce.value]}):null])))),i(r(k),{placeholder:(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.36"))||"搜索",value:Ie.value,"onUpdate:value":l[0]||(l[0]=e=>Ie.value=e),valueModifiers:{trim:!0},onInput:r(Le)},null,8,["value","onInput"])]})),_:1}),e("div",V,[e("div",{class:"chat-record-box__content",ref_key:"recordRef",ref:ke},[Me.value.length>0?(s(!0),v(m,{key:0},p(Me.value,(a=>(s(),v("div",{class:"content-item",key:a.id},[i(r(b),{round:"",size:38,src:a.senderAvatar},null,8,["src"]),e("div",q,[e("div",K,[f(" <span>{{ item.senderName }}</span> "),e("div",Q,[e("span",X,u(a.senderName),1),g(e("label",{class:h(["iho-chatRole",r(D)(a.roleInfo)?"isDoctor":""])},u(r(U)(a.roleInfo)),3),[[y,r(U)(a.roleInfo)]])]),e("span",Y,u(r(B)(a.sendTime).recordTime),1)]),e("div",Z,[a.content.chatMessageType===r(A).IMAGE?(s(),v("img",{key:0,src:Se(a.__content,"fileUrl")},null,8,ee)):a.content.chatMessageType===r(A).FILE?(s(),v(m,{key:1},[e("span",ae,u(De(a.__content)),1),e("div",le,[e("span",te,u(Se(a.__content,"fileName")),1),e("span",se,u(He(a)),1)])],64)):a.content.chatMessageType===r(A).EMOJI?(s(),v("img",{key:2,class:"emoji",src:r(G).findEmoji(a.__content)},null,8,ne)):(s(),v("p",{key:3,innerHTML:a.__content},null,8,re))])])])))),128)):(s(),v("div",oe,"没有找到相关记录"))],512),e("div",ie,[ue,e("div",de,[ce,i(r(M),{value:xe.value,"onUpdate:value":l[1]||(l[1]=e=>xe.value=e),multiple:"","max-tag-count":1,"render-label":Re,options:r(be).currentGroupUser,"value-field":"id"},null,8,["value","options"])]),e("div",ve,[me,e("div",pe,[i(r(I),{trigger:"click","show-arrow":!1},{trigger:o((()=>{var a;return[e("div",fe,[ge,g(i(r(x),{bordered:!1,color:J,closable:"",onClose:l[2]||(l[2]=()=>Oe("start"))},{default:o((()=>[w(u(je.value),1)])),_:1},512),[[y,je.value]]),g(e("span",he,(null==(a=window.getLanguageByCode)?void 0:a.call(window,"10010.1.76"))||"点击选择",512),[[y,!je.value]])])]})),default:o((()=>[i(r(N),{"formatted-value":je.value,"onUpdate:formatted-value":l[3]||(l[3]=e=>je.value=e),type:"date",panel:"",clearable:"","is-date-disabled":Ee},null,8,["formatted-value"])])),_:1}),i(r(I),{trigger:"click","show-arrow":!1},{trigger:o((()=>{var a;return[e("div",ye,[we,g(i(r(x),{bordered:!1,color:J,closable:"",onClose:l[4]||(l[4]=()=>Oe("end"))},{default:o((()=>[w(u(Ce.value),1)])),_:1},512),[[y,Ce.value]]),g(e("span",_e,(null==(a=window.getLanguageByCode)?void 0:a.call(window,"10010.1.76"))||"点击选择",512),[[y,!Ce.value]])])]})),default:o((()=>[i(r(N),{"formatted-value":Ce.value,"onUpdate:formatted-value":l[5]||(l[5]=e=>Ce.value=e),type:"date",panel:"",clearable:"","is-date-disabled":Ne},null,8,["formatted-value"])])),_:1})])])])])],4)])),_:1}))}});export{be as default};
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { AnyObject } from '../../../../shared/types';
|
2
2
|
declare const _default: import("vue").DefineComponent<{}, {
|
3
|
-
|
3
|
+
userListRef: import("vue").Ref<any>;
|
4
|
+
patientListRef: import("vue").Ref<any>;
|
4
5
|
inputRef: import("vue").Ref<any>;
|
5
6
|
showSearch: import("vue").Ref<boolean>;
|
6
7
|
keyword: import("vue").Ref<string>;
|
@@ -37,14 +38,19 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
37
38
|
openSession: (session: string | AnyObject) => Promise<void>;
|
38
39
|
userList: import("vue").Ref<AnyObject[]>;
|
39
40
|
handleInput: () => void;
|
41
|
+
patientList: import("vue").Ref<AnyObject[]>;
|
42
|
+
handlePatientInput: () => void;
|
40
43
|
currentTabValue: import("vue").Ref<string>;
|
41
44
|
currentIndex: import("vue").Ref<number>;
|
42
45
|
groupList: import("vue").ComputedRef<AnyObject[]>;
|
43
|
-
|
46
|
+
showNoUserData: import("vue").ComputedRef<boolean>;
|
47
|
+
showNoPatientData: import("vue").ComputedRef<boolean>;
|
44
48
|
showAllNoData: import("vue").ComputedRef<boolean>;
|
45
49
|
showGroupNoData: import("vue").ComputedRef<boolean>;
|
50
|
+
userStartIndex: import("vue").ComputedRef<number>;
|
46
51
|
groupStartIndex: import("vue").ComputedRef<number>;
|
47
52
|
currentList: import("vue").ComputedRef<AnyObject[]>;
|
53
|
+
handleSearchInput: () => void;
|
48
54
|
handleKeyDown: (event: KeyboardEvent) => void;
|
49
55
|
addSession: (id: string) => Promise<void>;
|
50
56
|
handleTabChange: () => void;
|
@@ -1 +1 @@
|
|
1
|
-
import{createElementVNode as e,defineComponent as l,ref as
|
1
|
+
import{createElementVNode as e,defineComponent as l,ref as t,computed as n,watch as o,nextTick as a,openBlock as s,createBlock as u,unref as i,normalizeStyle as r,withCtx as v,createVNode as c,createTextVNode as d,withModifiers as p,createCommentVNode as f,createElementBlock as g,Fragment as m,renderList as w,normalizeClass as y,withDirectives as h,vShow as k}from"vue";import{NPopover as C,NButton as L,NIcon as _,NInput as M,NTabs as j,NTabPane as I,NDivider as x}from"naive-ui";import{SearchOutline as B}from"@vicons/ionicons5";import{useData as R}from"../hooks/useData.js";import"stompjs";import"sockjs-client/dist/sockjs.min.js";import{openSessionApi as b}from"../api/index.js";import{isGroup as D}from"../utils/index.js";import{trim as U}from"lodash-es";import"trtc-sdk-v5";import{useSearchUserList as S}from"../hooks/useSearchUserList.js";import{useSearchPatientList as z}from"../hooks/useSearchPatientList.js";import A from"../../../default-page/index.js";import E from"./userItemRender.js";var K;const P=e("div",{class:"title"},"联系人(患者)",-1),G=e("div",{class:"title"},"联系人(医护)",-1),N=e("div",{class:"title"},(null==(K=window.getLanguageByCode)?void 0:K.call(window,"10010.1.575"))||"我的群组",-1),T={class:"user-list-wrapper"};var V=l({__name:"ChatSearch",setup(l){const K=t(),V=t(),$=t(),q=t(!1),F=t(""),{cssVars:H,state:J,openSession:O}=R(),{userList:Q,handleInput:W}=S({wrapperRef:K,keywordRef:F}),{patientList:X,handlePatientInput:Y}=z({wrapperRef:V,keywordRef:F}),Z=t("all"),ee=t(0),le=n((()=>(F.value||"").replace(/^\s+|\s+$/g,"")?J.sessionList.filter((e=>D(e)&&(null==e?void 0:e.name.includes(F.value)))):[])),te=n((()=>!Q.value.length&&!!U(F.value||""))),ne=n((()=>!X.value.length&&!!U(F.value||""))),oe=n((()=>!(Q.value.length||X.value.length||le.value.length||!U(F.value||"")))),ae=n((()=>!le.value.length&&!!U(F.value||""))),se=n((()=>X.value.length>3?4:X.value.length)),ue=n((()=>(Q.value.length>3?4:Q.value.length)+se.value)),ie=n((()=>{switch(Z.value){case"patient":return X.value;case"user":return Q.value;case"group":return le.value;default:{const e=[],l=X.value.length,t=Q.value.length,n=le.value.length;return l>0&&(l>3?e.push(...X.value.slice(0,3),{id:"patient"}):e.push(...X.value)),t>0&&(t>3?e.push(...Q.value.slice(0,3),{id:"user"}):e.push(...Q.value)),n>0&&(n>3?e.push(...le.value.slice(0,3),{id:"group"}):e.push(...le.value)),e}}}));function re(){W(),Y()}function ve(e){if(["ArrowUp","ArrowDown"].includes(e.key)){e.preventDefault();const l=i(ee);if("ArrowUp"===e.key){const e=l>0?l-1:ie.value.length-1;ee.value=e}else if("ArrowDown"===e.key){const e=l<ie.value.length-1?l+1:0;ee.value=e}}else if(["Enter"].includes(e.key)){e.preventDefault();const l=ie.value.find(((e,l)=>ee.value===l)).id;["patient","user","group"].includes(l)?Z.value=l:async function(e){q.value=!1;const l=J.sessionList.find((l=>e&&[l.receiver,l.id].includes(e)));let t=l;if(!l){t=await b({chatType:"SINGLE",receiver:e,sender:J.userInfo.id})}O(t)}(l)}}function ce(){$.value.focus(),ee.value=0}function de(){q.value=!1}return o((()=>q.value),(async e=>{var l;e&&(await a(),null==(l=$.value)||l.focus())})),(l,t)=>(s(),u(i(C),{raw:"","content-class":"search-content",class:"search-wrapper",style:r(i(H)),show:q.value,"onUpdate:show":t[8]||(t[8]=e=>q.value=e),placement:"top",trigger:"click","display-directive":"show","show-arrow":!1,delay:0,overlap:""},{trigger:v((()=>[c(i(L),{color:"#ffffff4D",class:"search-trigger-btn"},{icon:v((()=>[c(i(_),{component:i(B),color:"#ffffff80"},null,8,["component"])])),default:v((()=>{var e;return[d((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.80"))||"搜索联系人")]})),_:1})])),default:v((()=>[c(i(M),{ref_key:"inputRef",ref:$,size:"small",clearable:"",autofocus:"",value:F.value,"onUpdate:value":[t[0]||(t[0]=e=>F.value=e),re],onKeydown:p(ve,["stop"])},{prefix:v((()=>[c(i(_),{color:"#ffffff80",component:i(B)},null,8,["component"])])),_:1},8,["value","onKeydown"]),c(i(j),{type:"line",animated:"",value:Z.value,"onUpdate:value":[t[7]||(t[7]=e=>Z.value=e),ce]},{default:v((()=>{var l,n;return[c(i(I),{name:"all",tab:(null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.571"))||"综合","display-directive":"show",style:{padding:"0 10px 10px","overflow-y":"auto"}},{default:v((()=>{var e,l;return[f(" 联系人(患者) "),i(X).length>0?(s(),g(m,{key:0},[P,(s(!0),g(m,null,w(i(X),((e,l)=>(s(),g(m,{key:e.id},[l<3?(s(),u(i(E),{key:0,item:e,class:y({last:i(X).length<4?l===i(X).length-1:2===l,selected:ee.value===l}),onItemClick:de,onMouseover:p((()=>ee.value=l),["stop"])},null,8,["item","class","onMouseover"])):f("v-if",!0)],64)))),128)),i(X).length>3?(s(),g("div",{key:0,onClick:t[1]||(t[1]=()=>Z.value="user"),class:y(["user-item",3===ee.value?"selected":""]),onMouseover:t[2]||(t[2]=p((()=>ee.value=3),["stop"]))},[c(i(L),{text:"",type:"primary"},{icon:v((()=>[c(i(_),{component:i(B),size:"16"},null,8,["component"])])),default:v((()=>[d(" 查看更多联系人(患者) ")])),_:1})],34)):f("v-if",!0)],64)):f("v-if",!0),i(X).length&&i(Q).length?(s(),u(i(x),{key:1})):f("v-if",!0),f(" 联系人(医护) "),i(Q).length>0?(s(),g(m,{key:2},[G,(s(!0),g(m,null,w(i(Q),((e,l)=>(s(),g(m,{key:e.id},[l<3?(s(),u(i(E),{key:0,item:e,class:y({last:i(Q).length<4?l===i(Q).length-1:2===l,selected:ee.value===i(se)+l}),onItemClick:de,onMouseover:p((()=>ee.value=i(se)+l),["stop"])},null,8,["item","class","onMouseover"])):f("v-if",!0)],64)))),128)),i(Q).length>3?(s(),g("div",{key:0,onClick:t[3]||(t[3]=()=>Z.value="user"),class:y(["user-item",ee.value===i(se)+3?"selected":""]),onMouseover:t[4]||(t[4]=p((()=>ee.value=i(se)+3),["stop"]))},[c(i(L),{text:"",type:"primary"},{icon:v((()=>[c(i(_),{component:i(B),size:"16"},null,8,["component"])])),default:v((()=>[d(" 查看更多联系人(医护) ")])),_:1})],34)):f("v-if",!0)],64)):f("v-if",!0),i(Q).length&&i(le).length?(s(),u(i(x),{key:3})):f("v-if",!0),f((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.572"))||"群组"),i(le).length>0?(s(),g(m,{key:4},[N,(s(!0),g(m,null,w(i(le),((e,l)=>(s(),g(m,{key:e.id},[l<3?(s(),u(i(E),{key:0,item:e,class:y({last:i(le).length<4?l===i(le).length-1:2===l,selected:ee.value===i(ue)+l}),onItemClick:de,onMouseover:p((()=>ee.value=i(ue)+l),["stop"])},null,8,["item","class","onMouseover"])):f("v-if",!0)],64)))),128)),i(le).length>3?(s(),g("div",{key:0,onClick:t[5]||(t[5]=()=>Z.value="group"),class:y(["user-item",ee.value===i(ue)+3?"selected":""]),onMouseover:t[6]||(t[6]=p((()=>ee.value=i(ue)+3),["stop"]))},[c(i(L),{text:"",type:"primary"},{icon:v((()=>[c(i(_),{component:i(B),size:"16"},null,8,["component"])])),default:v((()=>{var e;return[d((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.574"))||"查看更多群组")]})),_:1})],34)):f("v-if",!0)],64)):f("v-if",!0),h(c(i(A),{config:{title:" ",content:(null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.81"))||"找不到相关的结果"},type:"5"},null,512),[[k,i(oe)]])]})),_:1}),c(i(I),{name:"patient",tab:"联系人(患者)","display-directive":"show"},{default:v((()=>{var l;return[e("div",{class:"user-list-wrapper",ref_key:"patientListRef",ref:V},[(s(!0),g(m,null,w(i(X),((e,l)=>(s(),u(i(E),{key:e.id,item:e,onItemClick:de,class:y({selected:ee.value===l}),onMouseover:p((()=>ee.value=l),["stop"])},null,8,["item","class","onMouseover"])))),128)),h(c(i(A),{config:{title:" ",content:(null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.81"))||"找不到相关的结果"},type:"5"},null,512),[[k,i(ne)]])],512)]})),_:1}),c(i(I),{name:"user",tab:"联系人(医护)","display-directive":"show"},{default:v((()=>{var l;return[e("div",{class:"user-list-wrapper",ref_key:"userListRef",ref:K},[(s(!0),g(m,null,w(i(Q),((e,l)=>(s(),u(i(E),{key:e.id,item:e,onItemClick:de,class:y({selected:ee.value===l}),onMouseover:p((()=>ee.value=l),["stop"])},null,8,["item","class","onMouseover"])))),128)),h(c(i(A),{config:{title:" ",content:(null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.81"))||"找不到相关的结果"},type:"5"},null,512),[[k,i(te)]])],512)]})),_:1}),c(i(I),{name:"group",tab:(null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.572"))||"群组","display-directive":"show"},{default:v((()=>{var l;return[e("div",T,[(s(!0),g(m,null,w(i(le),((e,l)=>(s(),u(i(E),{key:e.id,item:e,onItemClick:de,class:y({selected:ee.value===l}),onMouseover:p((()=>ee.value=l),["stop"])},null,8,["item","class","onMouseover"])))),128)),h(c(i(A),{config:{title:" ",content:(null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.81"))||"找不到相关的结果"},type:"5"},null,512),[[k,i(ae)]])])]})),_:1})]})),_:1},8,["value"])])),_:1},8,["style","show"]))}});export{V as default};
|
@@ -164,6 +164,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
164
164
|
remark: import("vue").Ref<string>;
|
165
165
|
currentTab: import("vue").Ref<AnyObject[]>;
|
166
166
|
breadcrumbList: import("vue").Ref<AnyObject[]>;
|
167
|
+
breadcrumbRef: import("vue").Ref<any>;
|
167
168
|
userList: import("vue").Ref<AnyObject[]>;
|
168
169
|
handleInput: () => void;
|
169
170
|
_disabledIds: import("vue").ComputedRef<any[]>;
|