cnhis-design-vue 3.2.17-release.1 → 3.2.18-beta.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/es/components/ai-chat/index.d.ts +143 -17
  2. package/es/components/ai-chat/src/Index.vue.d.ts +143 -17
  3. package/es/components/ai-chat/src/Index.vue2.js +1 -1
  4. package/es/components/ai-chat/src/api/index.d.ts +6 -0
  5. package/es/components/ai-chat/src/api/index.js +1 -0
  6. package/es/components/ai-chat/src/components/ChatAudio.vue.d.ts +40 -0
  7. package/es/components/ai-chat/src/components/ChatAudio.vue.js +1 -0
  8. package/es/components/ai-chat/src/components/ChatAudio.vue2.js +1 -0
  9. package/es/components/ai-chat/src/components/ChatCard.js +1 -1
  10. package/es/components/ai-chat/src/components/ChatFooter.vue.d.ts +51 -2
  11. package/es/components/ai-chat/src/components/ChatFooter.vue2.js +1 -1
  12. package/es/components/ai-chat/src/components/ChatMain.d.ts +1 -7
  13. package/es/components/ai-chat/src/components/ChatMain.js +1 -1
  14. package/es/components/ai-chat/src/components/ChatMainInner.d.ts +2 -0
  15. package/es/components/ai-chat/src/components/ChatMainInner.js +1 -0
  16. package/es/components/ai-chat/src/components/ChatRight.vue.d.ts +56 -0
  17. package/es/components/ai-chat/src/components/ChatRight.vue.js +1 -0
  18. package/es/components/ai-chat/src/components/ChatRight.vue2.js +1 -0
  19. package/es/components/ai-chat/src/components/card/JsonCard.d.ts +25 -0
  20. package/es/components/ai-chat/src/components/card/JsonCard.js +1 -0
  21. package/es/components/ai-chat/src/components/card/SelectIcon.d.ts +14 -0
  22. package/es/components/ai-chat/src/components/card/SelectIcon.js +1 -0
  23. package/es/components/ai-chat/src/hooks/useProgram.d.ts +6 -0
  24. package/es/components/ai-chat/src/hooks/useProgram.js +1 -0
  25. package/es/components/ai-chat/src/hooks/useWebsocket.d.ts +2 -0
  26. package/es/components/ai-chat/src/hooks/useWebsocket.js +1 -0
  27. package/es/components/ai-chat/src/utils/index.d.ts +1 -0
  28. package/es/components/ai-chat/src/utils/index.js +1 -1
  29. package/es/components/ai-chat/style/index.css +1 -1
  30. package/es/components/audio-sdk/src/audioSDK.d.ts +6 -7
  31. package/es/components/audio-sdk/src/audioSDK.js +1 -1
  32. package/es/components/audio-sdk/src/utils/recordingModal.d.ts +2 -1
  33. package/es/components/audio-sdk/src/utils/recordingModal.js +1 -1
  34. package/es/components/button-print/index.d.ts +1 -0
  35. package/es/components/button-print/src/ButtonPrint.vue.d.ts +1 -0
  36. package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +1 -0
  37. package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
  38. package/es/components/editor/src/Editor.js +1 -1
  39. package/es/components/editor/style/index.css +1 -0
  40. package/es/components/field-set/index.d.ts +3 -2
  41. package/es/components/field-set/src/FieldColor.vue.d.ts +2 -0
  42. package/es/components/field-set/src/FieldFilter.vue.d.ts +2 -0
  43. package/es/components/field-set/src/FieldSet.vue.d.ts +2 -0
  44. package/es/components/field-set/src/FieldSet.vue2.js +1 -1
  45. package/es/components/field-set/src/Index.vue.d.ts +3 -2
  46. package/es/components/field-set/src/Index.vue2.js +1 -1
  47. package/es/components/field-set/src/types/index.d.ts +1 -0
  48. package/es/components/field-set/style/index.css +1 -1
  49. package/es/components/form-render/src/components/renderer/formItem.js +1 -1
  50. package/es/components/iho-chat/index.d.ts +155 -3
  51. package/es/components/iho-chat/src/Index.vue.d.ts +155 -3
  52. package/es/components/iho-chat/src/api/index.d.ts +1 -0
  53. package/es/components/iho-chat/src/api/index.js +1 -1
  54. package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +9 -0
  55. package/es/components/iho-chat/src/components/ChatAdd.vue2.js +1 -1
  56. package/es/components/iho-chat/src/components/ChatFile.vue.d.ts +11 -1
  57. package/es/components/iho-chat/src/components/ChatFile.vue2.js +1 -1
  58. package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +22 -0
  59. package/es/components/iho-chat/src/components/ChatFooter.vue2.js +1 -1
  60. package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +32 -1
  61. package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +77 -3
  62. package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
  63. package/es/components/iho-chat/src/components/ChatRecord.vue.d.ts +1 -0
  64. package/es/components/iho-chat/src/components/ChatRecord.vue2.js +1 -1
  65. package/es/components/iho-chat/src/components/ChatSearch.vue.d.ts +1 -0
  66. package/es/components/iho-chat/src/components/ChatSet.vue.d.ts +10 -0
  67. package/es/components/iho-chat/src/components/ContextMenu.js +1 -1
  68. package/es/components/iho-chat/src/components/MessageEvent.vue.d.ts +1 -0
  69. package/es/components/iho-chat/src/components/MessageMergeForward.vue.d.ts +59 -0
  70. package/es/components/iho-chat/src/components/MessageMergeForward.vue.js +1 -0
  71. package/es/components/iho-chat/src/components/MessageMergeForward.vue2.js +1 -0
  72. package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +10 -0
  73. package/es/components/iho-chat/src/components/PersonProfile.vue.d.ts +1 -0
  74. package/es/components/iho-chat/src/components/SiderList.vue.d.ts +1 -0
  75. package/es/components/iho-chat/src/components/Video.vue.d.ts +1 -0
  76. package/es/components/iho-chat/src/hooks/useData.d.ts +4 -2
  77. package/es/components/iho-chat/src/hooks/useData.js +1 -1
  78. package/es/components/iho-chat/src/hooks/useVideo.d.ts +1 -0
  79. package/es/components/iho-chat/src/types/index.d.ts +1 -0
  80. package/es/components/iho-chat/src/utils/index.d.ts +1 -0
  81. package/es/components/iho-chat/src/utils/index.js +1 -1
  82. package/es/components/iho-chat/style/iconfont.ttf +0 -0
  83. package/es/components/iho-chat/style/index.css +1 -1
  84. package/es/components/index.css +1 -1
  85. package/es/components/select-label/style/index.css +1 -1
  86. package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
  87. package/es/components/select-person/src/index.vue2.js +1 -1
  88. package/es/components/select-person/style/index.css +1 -1
  89. package/es/components/shortcut-provider/src/types/index.d.ts +3 -0
  90. package/es/components/shortcut-setter/src/ShortcutSetter.vue2.js +1 -1
  91. package/es/shared/assets/img/file-emr.png.js +1 -0
  92. package/es/shared/assets/img/file.png.js +1 -0
  93. package/es/shared/assets/img/use.png.js +1 -0
  94. package/es/shared/package.json.js +1 -1
  95. package/es/shared/utils/index.js +1 -1
  96. package/package.json +2 -2
@@ -15,17 +15,16 @@ declare const AiChat: SFCWithInstall<import("vue").DefineComponent<{
15
15
  };
16
16
  queryData: {
17
17
  type: import("vue").PropType<import("./src/types").QueryData>;
18
- reuired: boolean;
19
18
  };
20
19
  queryRecord: {
21
20
  type: import("vue").PropType<import("./src/types").QueryRecord>;
22
- reuired: boolean;
23
21
  };
24
22
  hideInput: {
25
23
  type: BooleanConstructor;
26
24
  };
27
25
  uiStyle: {
28
26
  type: StringConstructor;
27
+ default: string;
29
28
  };
30
29
  audioTimed: {
31
30
  type: NumberConstructor;
@@ -49,6 +48,16 @@ declare const AiChat: SFCWithInstall<import("vue").DefineComponent<{
49
48
  appId: {
50
49
  type: StringConstructor;
51
50
  };
51
+ orgId: {
52
+ type: StringConstructor;
53
+ };
54
+ userId: {
55
+ type: StringConstructor;
56
+ };
57
+ immediatelyRecording: {
58
+ type: BooleanConstructor;
59
+ default: boolean;
60
+ };
52
61
  }, {
53
62
  cssVars: import("vue").ComputedRef<import("../../shared/types").AnyObject>;
54
63
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
@@ -67,17 +76,16 @@ declare const AiChat: SFCWithInstall<import("vue").DefineComponent<{
67
76
  };
68
77
  queryData: {
69
78
  type: import("vue").PropType<import("./src/types").QueryData>;
70
- reuired: boolean;
71
79
  };
72
80
  queryRecord: {
73
81
  type: import("vue").PropType<import("./src/types").QueryRecord>;
74
- reuired: boolean;
75
82
  };
76
83
  hideInput: {
77
84
  type: BooleanConstructor;
78
85
  };
79
86
  uiStyle: {
80
87
  type: StringConstructor;
88
+ default: string;
81
89
  };
82
90
  audioTimed: {
83
91
  type: NumberConstructor;
@@ -101,21 +109,30 @@ declare const AiChat: SFCWithInstall<import("vue").DefineComponent<{
101
109
  appId: {
102
110
  type: StringConstructor;
103
111
  };
112
+ orgId: {
113
+ type: StringConstructor;
114
+ };
115
+ userId: {
116
+ type: StringConstructor;
117
+ };
118
+ immediatelyRecording: {
119
+ type: BooleanConstructor;
120
+ default: boolean;
121
+ };
104
122
  }>> & {
105
123
  "onButton-click"?: ((...args: any[]) => any) | undefined;
106
124
  }>>;
107
- axiosInstance: import("axios").AxiosInstance;
108
125
  emit: (event: "button-click", ...args: any[]) => void;
126
+ showSmallStyle: import("vue").ComputedRef<boolean>;
109
127
  state: import("../../shared/types").AnyObject;
110
- NMessageProvider: any;
111
- ChatMain: import("vue").DefineComponent<Readonly<import("vue").ComponentPropsOptions<{
112
- [x: string]: unknown;
113
- }>>, () => JSX.Element[], unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, never[], never, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<readonly string[] | import("vue").ExtractPropTypes<Readonly<import("vue").ComponentObjectPropsOptions<{
114
- [x: string]: unknown;
115
- }>>>> & {}, {
116
- readonly [x: number]: string;
117
- } | {}>;
128
+ ChatMain: import("vue").DefineComponent<{}, () => JSX.Element[], {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
118
129
  ChatFooter: import("vue").DefineComponent<{}, {
130
+ innerDefaultShortcutList: {
131
+ key: string;
132
+ value: string;
133
+ }[];
134
+ programMethod: (bpmnProcessId: string, params: import("../../shared/types").AnyObject) => Promise<any>;
135
+ MedicalOrderId: string;
119
136
  cssVars: import("vue").ComputedRef<import("../../shared/types").AnyObject>;
120
137
  audioSdk: import("..").CAudioSDK;
121
138
  emit: (event: string, ...args: any[]) => void;
@@ -124,6 +141,9 @@ declare const AiChat: SFCWithInstall<import("vue").DefineComponent<{
124
141
  isSmall: any;
125
142
  audioTimed: any;
126
143
  commandList: any;
144
+ isInner: any;
145
+ patientInfo: any;
146
+ immediatelyRecording: any;
127
147
  inputRef: import("vue").Ref<any>;
128
148
  showPopover: import("vue").Ref<boolean>;
129
149
  breadcrumb: import("vue").Ref<{
@@ -143,13 +163,15 @@ declare const AiChat: SFCWithInstall<import("vue").DefineComponent<{
143
163
  showPrompt: import("vue").Ref<boolean>;
144
164
  currentShortcutId: import("vue").Ref<string>;
145
165
  showPatient: import("vue").Ref<boolean>;
146
- placeholder: import("vue").ComputedRef<"请向我提问或输入\"/\"查看指令" | "请向我提问或输入\"/\"查看指令,Shift+Enter换行">;
166
+ showAudio: any;
167
+ placeholder: import("vue").ComputedRef<"请向我提问,Shift+Enter换行" | "请向我提问或输入\"/\"查看指令" | "请向我提问或输入\"/\"查看指令,Shift+Enter换行">;
147
168
  btnDisabled: import("vue").ComputedRef<any>;
148
169
  showMagicWand: import("vue").ComputedRef<boolean>;
149
170
  patient: import("vue").ComputedRef<string>;
171
+ currentShortcutList: import("vue").ComputedRef<any>;
150
172
  recorderStart: () => Promise<void>;
151
173
  getShortcutName: (item: string | import("../../shared/types").AnyObject) => any;
152
- handleShortcut: (item: string | import("../../shared/types").AnyObject) => void;
174
+ handleShortcut: (item: string | import("../../shared/types").AnyObject) => Promise<void>;
153
175
  resetCurrentCommand: () => void;
154
176
  handleKeyDown: (event: KeyboardEvent) => void;
155
177
  isWrap: (event: KeyboardEvent) => boolean;
@@ -269,6 +291,99 @@ declare const AiChat: SFCWithInstall<import("vue").DefineComponent<{
269
291
  }, {
270
292
  show: boolean;
271
293
  }>;
294
+ ChatAudio: import("vue").DefineComponent<{
295
+ show: {
296
+ type: BooleanConstructor;
297
+ };
298
+ }, {
299
+ audioSdk: import("..").CAudioSDK;
300
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
301
+ show: {
302
+ type: BooleanConstructor;
303
+ };
304
+ }>> & {
305
+ "onUpdate:show"?: ((...args: any[]) => any) | undefined;
306
+ }>>;
307
+ emit: (event: "update:show", ...args: any[]) => void;
308
+ state: any;
309
+ time: import("vue").Ref<number>;
310
+ pause: import("@vueuse/shared").Fn;
311
+ resume: import("@vueuse/shared").Fn;
312
+ isActive: import("vue").Ref<boolean>;
313
+ tip: import("vue").ComputedRef<"正在录音中..." | "录音已暂停">;
314
+ formattedTime: import("vue").ComputedRef<string>;
315
+ start: () => Promise<void>;
316
+ handlePause: () => void;
317
+ handlePlay: () => void;
318
+ handleEnd: () => Promise<void>;
319
+ NSpace: any;
320
+ NButton: any;
321
+ NIcon: any;
322
+ StopCircleOutline: 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<{}>>, {}>;
323
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:show"[], "update:show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
324
+ show: {
325
+ type: BooleanConstructor;
326
+ };
327
+ }>> & {
328
+ "onUpdate:show"?: ((...args: any[]) => any) | undefined;
329
+ }, {
330
+ show: boolean;
331
+ }>;
332
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
333
+ ChatMainInner: import("vue").DefineComponent<{}, () => JSX.Element[], {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
334
+ ChatRight: import("vue").DefineComponent<{}, {
335
+ medicalLabel: {
336
+ key: string;
337
+ title: string;
338
+ }[];
339
+ state: any;
340
+ patientInfo: any;
341
+ toolbarConfig: {
342
+ toolbarKeys: string[];
343
+ };
344
+ content: import("vue").Ref<string>;
345
+ key: import("vue").Ref<string>;
346
+ handleSave: () => Promise<void>;
347
+ createMedicalRecord: () => void;
348
+ extractContentByTitle: () => import("../../shared/types").AnyObject;
349
+ NIcon: any;
350
+ NSpace: any;
351
+ NButton: any;
352
+ Editor: SFCWithInstall<import("vue").DefineComponent<{
353
+ editorConfig: {
354
+ type: ObjectConstructor;
355
+ };
356
+ toolbarConfig: {
357
+ type: ObjectConstructor;
358
+ };
359
+ uploadImgUrl: {
360
+ type: StringConstructor;
361
+ };
362
+ isDisabled: {
363
+ type: BooleanConstructor;
364
+ default: boolean;
365
+ };
366
+ }, {
367
+ editorRef: import("vue").ShallowRef<any>;
368
+ renderVN: () => JSX.Element;
369
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, never[], never, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
370
+ editorConfig: {
371
+ type: ObjectConstructor;
372
+ };
373
+ toolbarConfig: {
374
+ type: ObjectConstructor;
375
+ };
376
+ uploadImgUrl: {
377
+ type: StringConstructor;
378
+ };
379
+ isDisabled: {
380
+ type: BooleanConstructor;
381
+ default: boolean;
382
+ };
383
+ }>> & {}, {
384
+ isDisabled: boolean;
385
+ }>>;
386
+ CloseOutline: 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<{}>>, {}>;
272
387
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
273
388
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "button-click"[], "button-click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
274
389
  token: {
@@ -286,17 +401,16 @@ declare const AiChat: SFCWithInstall<import("vue").DefineComponent<{
286
401
  };
287
402
  queryData: {
288
403
  type: import("vue").PropType<import("./src/types").QueryData>;
289
- reuired: boolean;
290
404
  };
291
405
  queryRecord: {
292
406
  type: import("vue").PropType<import("./src/types").QueryRecord>;
293
- reuired: boolean;
294
407
  };
295
408
  hideInput: {
296
409
  type: BooleanConstructor;
297
410
  };
298
411
  uiStyle: {
299
412
  type: StringConstructor;
413
+ default: string;
300
414
  };
301
415
  audioTimed: {
302
416
  type: NumberConstructor;
@@ -320,10 +434,22 @@ declare const AiChat: SFCWithInstall<import("vue").DefineComponent<{
320
434
  appId: {
321
435
  type: StringConstructor;
322
436
  };
437
+ orgId: {
438
+ type: StringConstructor;
439
+ };
440
+ userId: {
441
+ type: StringConstructor;
442
+ };
443
+ immediatelyRecording: {
444
+ type: BooleanConstructor;
445
+ default: boolean;
446
+ };
323
447
  }>> & {
324
448
  "onButton-click"?: ((...args: any[]) => any) | undefined;
325
449
  }, {
326
450
  hideInput: boolean;
451
+ uiStyle: string;
327
452
  audioTimed: number;
453
+ immediatelyRecording: boolean;
328
454
  }>>;
329
455
  export default AiChat;
@@ -17,17 +17,16 @@ declare const _default: import("vue").DefineComponent<{
17
17
  };
18
18
  queryData: {
19
19
  type: PropType<QueryData>;
20
- reuired: boolean;
21
20
  };
22
21
  queryRecord: {
23
22
  type: PropType<QueryRecord>;
24
- reuired: boolean;
25
23
  };
26
24
  hideInput: {
27
25
  type: BooleanConstructor;
28
26
  };
29
27
  uiStyle: {
30
28
  type: StringConstructor;
29
+ default: string;
31
30
  };
32
31
  audioTimed: {
33
32
  type: NumberConstructor;
@@ -51,6 +50,16 @@ declare const _default: import("vue").DefineComponent<{
51
50
  appId: {
52
51
  type: StringConstructor;
53
52
  };
53
+ orgId: {
54
+ type: StringConstructor;
55
+ };
56
+ userId: {
57
+ type: StringConstructor;
58
+ };
59
+ immediatelyRecording: {
60
+ type: BooleanConstructor;
61
+ default: boolean;
62
+ };
54
63
  }, {
55
64
  cssVars: import("vue").ComputedRef<AnyObject>;
56
65
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
@@ -69,17 +78,16 @@ declare const _default: import("vue").DefineComponent<{
69
78
  };
70
79
  queryData: {
71
80
  type: PropType<QueryData>;
72
- reuired: boolean;
73
81
  };
74
82
  queryRecord: {
75
83
  type: PropType<QueryRecord>;
76
- reuired: boolean;
77
84
  };
78
85
  hideInput: {
79
86
  type: BooleanConstructor;
80
87
  };
81
88
  uiStyle: {
82
89
  type: StringConstructor;
90
+ default: string;
83
91
  };
84
92
  audioTimed: {
85
93
  type: NumberConstructor;
@@ -103,21 +111,30 @@ declare const _default: import("vue").DefineComponent<{
103
111
  appId: {
104
112
  type: StringConstructor;
105
113
  };
114
+ orgId: {
115
+ type: StringConstructor;
116
+ };
117
+ userId: {
118
+ type: StringConstructor;
119
+ };
120
+ immediatelyRecording: {
121
+ type: BooleanConstructor;
122
+ default: boolean;
123
+ };
106
124
  }>> & {
107
125
  "onButton-click"?: ((...args: any[]) => any) | undefined;
108
126
  }>>;
109
- axiosInstance: import("axios").AxiosInstance;
110
127
  emit: (event: "button-click", ...args: any[]) => void;
128
+ showSmallStyle: import("vue").ComputedRef<boolean>;
111
129
  state: AnyObject;
112
- NMessageProvider: any;
113
- ChatMain: import("vue").DefineComponent<Readonly<import("vue").ComponentPropsOptions<{
114
- [x: string]: unknown;
115
- }>>, () => JSX.Element[], unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, never[], never, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<readonly string[] | import("vue").ExtractPropTypes<Readonly<import("vue").ComponentObjectPropsOptions<{
116
- [x: string]: unknown;
117
- }>>>> & {}, {
118
- readonly [x: number]: string;
119
- } | {}>;
130
+ ChatMain: import("vue").DefineComponent<{}, () => JSX.Element[], {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
120
131
  ChatFooter: import("vue").DefineComponent<{}, {
132
+ innerDefaultShortcutList: {
133
+ key: string;
134
+ value: string;
135
+ }[];
136
+ programMethod: (bpmnProcessId: string, params: AnyObject) => Promise<any>;
137
+ MedicalOrderId: string;
121
138
  cssVars: import("vue").ComputedRef<AnyObject>;
122
139
  audioSdk: import("../..").CAudioSDK;
123
140
  emit: (event: string, ...args: any[]) => void;
@@ -126,6 +143,9 @@ declare const _default: import("vue").DefineComponent<{
126
143
  isSmall: any;
127
144
  audioTimed: any;
128
145
  commandList: any;
146
+ isInner: any;
147
+ patientInfo: any;
148
+ immediatelyRecording: any;
129
149
  inputRef: import("vue").Ref<any>;
130
150
  showPopover: import("vue").Ref<boolean>;
131
151
  breadcrumb: import("vue").Ref<{
@@ -145,13 +165,15 @@ declare const _default: import("vue").DefineComponent<{
145
165
  showPrompt: import("vue").Ref<boolean>;
146
166
  currentShortcutId: import("vue").Ref<string>;
147
167
  showPatient: import("vue").Ref<boolean>;
148
- placeholder: import("vue").ComputedRef<"请向我提问或输入\"/\"查看指令" | "请向我提问或输入\"/\"查看指令,Shift+Enter换行">;
168
+ showAudio: any;
169
+ placeholder: import("vue").ComputedRef<"请向我提问,Shift+Enter换行" | "请向我提问或输入\"/\"查看指令" | "请向我提问或输入\"/\"查看指令,Shift+Enter换行">;
149
170
  btnDisabled: import("vue").ComputedRef<any>;
150
171
  showMagicWand: import("vue").ComputedRef<boolean>;
151
172
  patient: import("vue").ComputedRef<string>;
173
+ currentShortcutList: import("vue").ComputedRef<any>;
152
174
  recorderStart: () => Promise<void>;
153
175
  getShortcutName: (item: string | AnyObject) => any;
154
- handleShortcut: (item: string | AnyObject) => void;
176
+ handleShortcut: (item: string | AnyObject) => Promise<void>;
155
177
  resetCurrentCommand: () => void;
156
178
  handleKeyDown: (event: KeyboardEvent) => void;
157
179
  isWrap: (event: KeyboardEvent) => boolean;
@@ -271,6 +293,99 @@ declare const _default: import("vue").DefineComponent<{
271
293
  }, {
272
294
  show: boolean;
273
295
  }>;
296
+ ChatAudio: import("vue").DefineComponent<{
297
+ show: {
298
+ type: BooleanConstructor;
299
+ };
300
+ }, {
301
+ audioSdk: import("../..").CAudioSDK;
302
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
303
+ show: {
304
+ type: BooleanConstructor;
305
+ };
306
+ }>> & {
307
+ "onUpdate:show"?: ((...args: any[]) => any) | undefined;
308
+ }>>;
309
+ emit: (event: "update:show", ...args: any[]) => void;
310
+ state: any;
311
+ time: import("vue").Ref<number>;
312
+ pause: import("@vueuse/shared").Fn;
313
+ resume: import("@vueuse/shared").Fn;
314
+ isActive: import("vue").Ref<boolean>;
315
+ tip: import("vue").ComputedRef<"正在录音中..." | "录音已暂停">;
316
+ formattedTime: import("vue").ComputedRef<string>;
317
+ start: () => Promise<void>;
318
+ handlePause: () => void;
319
+ handlePlay: () => void;
320
+ handleEnd: () => Promise<void>;
321
+ NSpace: any;
322
+ NButton: any;
323
+ NIcon: any;
324
+ StopCircleOutline: 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<{}>>, {}>;
325
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:show"[], "update:show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
326
+ show: {
327
+ type: BooleanConstructor;
328
+ };
329
+ }>> & {
330
+ "onUpdate:show"?: ((...args: any[]) => any) | undefined;
331
+ }, {
332
+ show: boolean;
333
+ }>;
334
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
335
+ ChatMainInner: import("vue").DefineComponent<{}, () => JSX.Element[], {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
336
+ ChatRight: import("vue").DefineComponent<{}, {
337
+ medicalLabel: {
338
+ key: string;
339
+ title: string;
340
+ }[];
341
+ state: any;
342
+ patientInfo: any;
343
+ toolbarConfig: {
344
+ toolbarKeys: string[];
345
+ };
346
+ content: import("vue").Ref<string>;
347
+ key: import("vue").Ref<string>;
348
+ handleSave: () => Promise<void>;
349
+ createMedicalRecord: () => void;
350
+ extractContentByTitle: () => AnyObject;
351
+ NIcon: any;
352
+ NSpace: any;
353
+ NButton: any;
354
+ Editor: import("../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{
355
+ editorConfig: {
356
+ type: ObjectConstructor;
357
+ };
358
+ toolbarConfig: {
359
+ type: ObjectConstructor;
360
+ };
361
+ uploadImgUrl: {
362
+ type: StringConstructor;
363
+ };
364
+ isDisabled: {
365
+ type: BooleanConstructor;
366
+ default: boolean;
367
+ };
368
+ }, {
369
+ editorRef: import("vue").ShallowRef<any>;
370
+ renderVN: () => JSX.Element;
371
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, never[], never, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
372
+ editorConfig: {
373
+ type: ObjectConstructor;
374
+ };
375
+ toolbarConfig: {
376
+ type: ObjectConstructor;
377
+ };
378
+ uploadImgUrl: {
379
+ type: StringConstructor;
380
+ };
381
+ isDisabled: {
382
+ type: BooleanConstructor;
383
+ default: boolean;
384
+ };
385
+ }>> & {}, {
386
+ isDisabled: boolean;
387
+ }>>;
388
+ CloseOutline: 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<{}>>, {}>;
274
389
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
275
390
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "button-click"[], "button-click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
276
391
  token: {
@@ -288,17 +403,16 @@ declare const _default: import("vue").DefineComponent<{
288
403
  };
289
404
  queryData: {
290
405
  type: PropType<QueryData>;
291
- reuired: boolean;
292
406
  };
293
407
  queryRecord: {
294
408
  type: PropType<QueryRecord>;
295
- reuired: boolean;
296
409
  };
297
410
  hideInput: {
298
411
  type: BooleanConstructor;
299
412
  };
300
413
  uiStyle: {
301
414
  type: StringConstructor;
415
+ default: string;
302
416
  };
303
417
  audioTimed: {
304
418
  type: NumberConstructor;
@@ -322,10 +436,22 @@ declare const _default: import("vue").DefineComponent<{
322
436
  appId: {
323
437
  type: StringConstructor;
324
438
  };
439
+ orgId: {
440
+ type: StringConstructor;
441
+ };
442
+ userId: {
443
+ type: StringConstructor;
444
+ };
445
+ immediatelyRecording: {
446
+ type: BooleanConstructor;
447
+ default: boolean;
448
+ };
325
449
  }>> & {
326
450
  "onButton-click"?: ((...args: any[]) => any) | undefined;
327
451
  }, {
328
452
  hideInput: boolean;
453
+ uiStyle: string;
329
454
  audioTimed: number;
455
+ immediatelyRecording: boolean;
330
456
  }>;
331
457
  export default _default;
@@ -1 +1 @@
1
- import{defineComponent as e,reactive as t,provide as o,toRefs as r,computed as s,openBlock as a,createElementBlock as i,normalizeClass as n,normalizeStyle as u,unref as l,createVNode as p,withCtx as d,createBlock as m,createCommentVNode as c}from"vue";import{NMessageProvider as h}from"naive-ui";import y from"./components/ChatMain.js";import f from"./components/ChatFooter.vue.js";import{useTheme as v}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import"lodash-es";import"@vue/shared";import{uuidGenerator as S}from"../../../shared/utils/index.js";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import"../../../shared/hooks/useScrollLoading.js";import{InjectionAIChat as x,InjectionAIChatEmits as g}from"./types/index.js";import j from"axios";const k=["id"];var P=e({__name:"Index",props:{token:{type:String,required:!0},userAvatar:{type:String},defaultShortcutList:{type:Array},shortcutList:{type:Array},queryData:{type:Function,reuired:!0},queryRecord:{type:Function,reuired:!0},hideInput:{type:Boolean},uiStyle:{type:String},audioTimed:{type:Number,default:10},commandList:{type:Array},queryPrompt:{type:Function},patientInfo:{type:Object},appId:{type:String}},emits:["button-click"],setup(e,{expose:P,emit:I}){const b=e,A=v(),C=j.create({headers:{Authorization:"bearer "+b.token}});C.interceptors.response.use((e=>{var t;return(null==(t=e.data)?void 0:t.success)?e.data:{success:!1,data:[]}}));const F=t({id:"ai-chat-"+S(),loading:!1,sending:!1,sendContent:"",selectedCommand:null,selectedPrompt:null,externalData:null,selectedPatient:null,selectedPatientLabel:"",selectedPatientForm:null,showPatient:!1});return o(x,{...r(b),state:F,isSmall:s((()=>"small"===b.uiStyle)),axiosInstance:C}),o(g,I),P({pushMessage:e=>{F.externalData=e},updatePatientInfo:e=>{F.selectedPatient=e}}),(t,o)=>(a(),i("div",{id:F.id,class:n(["ai-chat","small"===e.uiStyle?"ai-chat--small":""]),style:u(l(A))},[p(l(h),null,{default:d((()=>[p(l(y)),e.hideInput?c("v-if",!0):(a(),m(f,{key:0}))])),_:1})],14,k))}});export{P as default};
1
+ import{defineComponent as e,computed as t,reactive as i,provide as n,toRefs as o,openBlock as r,createElementBlock as s,normalizeStyle as a,unref as u,createElementVNode as l,normalizeClass as p,createBlock as m,createCommentVNode as d}from"vue";import c from"./components/ChatMain.js";import y from"./components/ChatFooter.vue.js";import h from"./components/ChatMainInner.js";import f from"./components/ChatRight.vue.js";import{useTheme as S}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import"lodash-es";import"@vue/shared";import{uuidGenerator as v}from"../../../shared/utils/index.js";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import"naive-ui";import"../../../shared/hooks/useScrollLoading.js";import{InjectionAIChat as g,InjectionAIChatEmits as k}from"./types/index.js";import{instanceAxios as j}from"./api/index.js";import{useWebsocket as I}from"./hooks/useWebsocket.js";const C=["id"];var x=e({__name:"Index",props:{token:{type:String,required:!0},userAvatar:{type:String},defaultShortcutList:{type:Array},shortcutList:{type:Array},queryData:{type:Function},queryRecord:{type:Function},hideInput:{type:Boolean},uiStyle:{type:String,default:"big"},audioTimed:{type:Number,default:10},commandList:{type:Array},queryPrompt:{type:Function},patientInfo:{type:Object},appId:{type:String},orgId:{type:String},userId:{type:String},immediatelyRecording:{type:Boolean,default:!1}},emits:["button-click"],setup(e,{expose:x,emit:P}){const _=e,b=S();j.defaults.headers.Authorization="bearer "+_.token,"inner"!==_.uiStyle&&(j.defaults.timeout=5e3,j.interceptors.response.use((e=>{var t;return(null==(t=e.data)?void 0:t.success)?e.data:{success:!1,data:[]}})));const A=t((()=>["small","inner"].includes(_.uiStyle))),F=i({id:"ai-chat-"+v(),loading:!1,sending:!1,sendContent:"",selectedCommand:null,selectedPrompt:null,externalData:null,selectedPatient:null,selectedPatientLabel:"",selectedPatientForm:null,showPatient:!1,showRight:!1,consultationContent:null,params:{},reportContent:null,refreshMedical:!1});return n(g,{...o(_),state:F,isSmall:t((()=>"small"===_.uiStyle)),isInner:t((()=>"inner"===_.uiStyle))}),n(k,P),"inner"===_.uiStyle&&I(_,F),x({pushMessage:e=>{F.externalData=e},updatePatientInfo:e=>{F.selectedPatient=e}}),(t,i)=>(r(),s("div",{class:"ai-chat",style:a(u(b))},[l("div",{id:F.id,class:p(["ai-chat__main",u(A)?"ai-chat__main--small":"","inner"===e.uiStyle?"ai-chat__main--inner":""])},["inner"===e.uiStyle?(r(),m(u(h),{key:0})):(r(),m(u(c),{key:1})),e.hideInput?d("v-if",!0):(r(),m(y,{key:2}))],10,C),"inner"===e.uiStyle?(r(),m(f,{key:0})):d("v-if",!0)],4))}});export{x as default};
@@ -0,0 +1,6 @@
1
+ import { AnyObject } from '../../../../shared/types';
2
+ export declare const instanceAxios: import("axios").AxiosInstance;
3
+ export declare function uploadFileApi(params: FormData): import("axios").AxiosPromise<any>;
4
+ export declare function conversationApi(params: AnyObject): import("axios").AxiosPromise<any>;
5
+ export declare function saveApi(params: AnyObject): import("axios").AxiosPromise<any>;
6
+ export declare function getHistoryRecordApi(params: AnyObject): import("axios").AxiosPromise<any>;
@@ -0,0 +1 @@
1
+ import e from"axios";import{createDiscreteApi as a}from"naive-ui";const{message:t}=a(["message"]),o=e.create({withCredentials:!0,timeout:5e4});function r(e){return o({headers:{"Content-Type":"multipart/form-data"},method:"post",url:"/storage-service/storage/uploadFile",data:e})}function s(e){return o({method:"post",url:"/flow/api/opd/conversation",data:e})}function i(e){return o({method:"put",url:"/flow/api/opd/message",data:e})}function n(e){return o({method:"get",url:`/flow/api/dialog/${e.sessionId}/messages`,params:{page:e.page||1,pageSize:e.pageSize||20}})}o.interceptors.response.use((e=>{var a,o,r;if(null==(a=e.data)?void 0:a.success)return null==(o=e.data)?void 0:o.data;500==(null==(r=e.data)?void 0:r.code)&&e.data.msg&&t.error(e.data.msg)}));export{s as conversationApi,n as getHistoryRecordApi,o as instanceAxios,i as saveApi,r as uploadFileApi};
@@ -0,0 +1,40 @@
1
+ import { CAudioSDK } from '../../../../components/audio-sdk';
2
+ declare const _default: import("vue").DefineComponent<{
3
+ show: {
4
+ type: BooleanConstructor;
5
+ };
6
+ }, {
7
+ audioSdk: CAudioSDK;
8
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
9
+ show: {
10
+ type: BooleanConstructor;
11
+ };
12
+ }>> & {
13
+ "onUpdate:show"?: ((...args: any[]) => any) | undefined;
14
+ }>>;
15
+ emit: (event: "update:show", ...args: any[]) => void;
16
+ state: any;
17
+ time: import("vue").Ref<number>;
18
+ pause: import("@vueuse/shared").Fn;
19
+ resume: import("@vueuse/shared").Fn;
20
+ isActive: import("vue").Ref<boolean>;
21
+ tip: import("vue").ComputedRef<"正在录音中..." | "录音已暂停">;
22
+ formattedTime: import("vue").ComputedRef<string>;
23
+ start: () => Promise<void>;
24
+ handlePause: () => void;
25
+ handlePlay: () => void;
26
+ handleEnd: () => Promise<void>;
27
+ NSpace: any;
28
+ NButton: any;
29
+ NIcon: any;
30
+ StopCircleOutline: 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<{}>>, {}>;
31
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:show"[], "update:show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
32
+ show: {
33
+ type: BooleanConstructor;
34
+ };
35
+ }>> & {
36
+ "onUpdate:show"?: ((...args: any[]) => any) | undefined;
37
+ }, {
38
+ show: boolean;
39
+ }>;
40
+ export default _default;
@@ -0,0 +1 @@
1
+ import e from"./ChatAudio.vue2.js";import r from"../../../../_virtual/_plugin-vue_export-helper.js";var o=r(e,[["__file","ChatAudio.vue"]]);export{o as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as o,inject as e,ref as t,computed as a,watch as i,withDirectives as n,openBlock as r,createElementBlock as s,unref as u,createBlock as l,createCommentVNode as d,createElementVNode as c,toDisplayString as p,normalizeStyle as m,createVNode as f,withCtx as v,createTextVNode as h,vShow as w}from"vue";import{NIcon as y,NSpace as g,NButton as _}from"naive-ui";import{StopCircleOutline as F}from"@vicons/ionicons5";import{InjectionAIChat as S}from"../types/index.js";import{useIntervalFn as $}from"@vueuse/core";import k from"../../../audio-sdk/src/audioSDK.js";import{uploadFileApi as C}from"../api/index.js";import{uuidGenerator as j}from"../../../../shared/utils/index.js";const x={class:"ai-chat__audio"};var M=o({__name:"ChatAudio",props:{show:{type:Boolean}},emits:["update:show"],setup(o,{emit:M}){const z=o,I=k.create(),{state:A}=e(S),B=t(0),{pause:D,resume:b,isActive:q}=$((()=>{B.value++}),1e3,{immediate:!1}),K=a((()=>q.value?"正在录音中...":"录音已暂停")),L=a((()=>{const o=Math.floor(B.value/3600),e=Math.floor(B.value%3600/60),t=B.value%60,a=e.toString().padStart(2,"0"),i=t.toString().padStart(2,"0");if(o>0){return`${o.toString().padStart(2,"0")}:${a}:${i}`}return`${a}:${i}`}));function N(){D(),I.pause()}function O(){b(),I.resume()}async function T(){I.stop(),M("update:show",!1)}return i((()=>z.show),(o=>{o?(B.value=0,b(),async function(){try{const o=await I.start(void 0,{timed:1800,recognizable:!1,showModal:!1});M("update:show",!1);const{result:e,data:t}=o||{};if("success"!==e)return;if(t){const o=new File([t],`${j()}.mp3`,{type:t.type}),e=new FormData;e.append("file",o),e.append("channelId","MINIO");const a=await C(e),i=(null==a?void 0:a.path)||"";console.log("音频地址 ==>",i),A.params={audioUrl:i,opType:"create_inquiry"},A.sending=!0,A.loading=!0}}catch(o){console.log(o)}}()):D()}),{immediate:!0}),(e,t)=>n((r(),s("div",x,[u(q)?d("v-if",!0):(r(),l(u(y),{key:0,size:"42",color:"#FF1818",component:u(F)},null,8,["component"])),c("p",null,p(u(K)),1),c("h3",{style:m(u(q)?"":"color: #FF1818")},p(u(L)),5),f(u(g),{"wrap-item":!1,size:15},{default:v((()=>[n(f(u(_),{round:"",onClick:N},{default:v((()=>[h("暂停")])),_:1},512),[[w,u(q)]]),n(f(u(_),{round:"",onClick:O},{default:v((()=>[h("继续")])),_:1},512),[[w,!u(q)]]),f(u(_),{round:"",color:"#FF1818",onClick:T},{default:v((()=>{var o;return[h((null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.77"))||"结束")]})),_:1})])),_:1})],512)),[[w,o.show]])}});export{M as default};
@@ -1 +1 @@
1
- import{defineComponent as e,inject as t,ref as a,reactive as l,computed as n,watch as o,createVNode as i}from"vue";import{NForm as s,NFormItem as r,NInput as u,NIcon as d,NButton as c}from"naive-ui";import{InjectionAIChat as v}from"../types/index.js";import"../../../index.js";import{cloneDeep as p,isArray as m,omit as f}from"lodash-es";import{isValidJSON as g}from"../utils/index.js";import{ChevronDown as b,ChevronForward as h}from"@vicons/ionicons5";import{useTheme as y}from"../../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import"@vue/shared";import"../../../../shared/utils/index.js";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import"../../../../shared/hooks/useScrollLoading.js";import E from"../../../form-render/index.js";import I from"../../../template-render/index.js";var k=e({name:"ChatCard",inheritAttrs:!1,props:{msgItem:{type:Object,default:()=>({})},selectParams:{type:Object},configs:{type:Object},msgId:{type:String}},emits:["button-click"],setup(e,{attrs:k,slots:x,emit:_}){const C={TEXT:"INPUT",NUMBER:"INPUT_NUMBER",DATETIME:"DATE",MULTI_SELECT:"REMOTE_SEARCH",SELECT:"REMOTE_SEARCH"},T=y(),{patientInfo:P,state:w,axiosInstance:O,isSmall:S,appId:j}=t(v),M=a([]),R=a(),L=a(),N=l({vaa05:""}),q=a(),A=n((()=>{var t,a;return!!(null==(a=null==(t=e.msgItem)?void 0:t.content)?void 0:a.body)})),F=e.msgItem.content,H={},B=l(p(F.data||{})),K={beforeRequest(e,t,a){(null==t?void 0:t.params)&&(t.params.vaa05=L.value.selectedPatient.vaa01),t&&Reflect.has(t,"configs")&&(t.configs=L.value.selectedPatient)}};function U(e){const{eventName:t,data:a}=e;t&&_("button-click",{buttonInfo:a,isBI:!0})}function D(e){B[e.button.id+"Disabled"]="1",_("button-click",{buttonInfo:{...f(e.button,["props"]),data:e.data}})}if(A.value){const t=F.body.items||[],a=t.some((e=>"vaa05"===e.code));M.value=t.filter((e=>e.showFlag)).map((t=>{var l,n,o;if("vaa05"===t.code&&!S.value)return L.value={...t},t._value?N.vaa05=t._value:(null==(l=t.options)?void 0:l.length)&&t.value&&(N.vaa05=null==(n=t.options.find((e=>e.value===t.value)))?void 0:n.label,L.value.selectedPatient=e.configs),null;const i={html_type:C[t.type]||t.type,val_key:t.code,name:t.name,elem_width:12,default_val:t.value,lazyRequest:!0,requestCache:!0,urlConfig:{nameKey:null!=(o=t.labelField)?o:"label"},option:[],is_null:t.required?"0":"1",is_edit:e.msgItem.disabled?"0":"1",componentProps:{},multi_select:"MULTI_SELECT"===t.type?"0":"1"};if("DATETIME"===t.type&&(i.date_format="yyyy-MM-dd HH:mm:ss"),"REMOTE_SEARCH"===i.html_type){if(i.componentProps={fallbackOption:!1},i.option=t.options||[],i.default_val=null,t.value&&m(t.options)&&t.options.length>0){t.options.find((e=>(null==e?void 0:e.value)===t.value))&&(i.default_val=t.value)}if(Object.assign(i.urlConfig,{url:"/flow/api/instruction/parameter/getOptionsValues",method:"post",params:{...e.selectParams,code:t.code,source:S.value?"inner":"global",...S.value?{appId:j.value}:{}},dependKey:[]}),a&&(i.urlConfig.params.configs=P.value.info||w.selectedPatient),t.dependencies){const e=t.dependencies.split(",");i.urlConfig.dependKey=e,e.includes("vaa05")&&(i.urlConfig.params.params={vaa05:""})}}return i})).filter((e=>!!e))}function J(){var t;if(!L.value)return null;function a(){e.msgItem.disabled||(w.showPatient=!0)}return i(s,{class:"form-render",ref:q,"require-mark-placement":"left",disabled:e.msgItem.disabled,model:N,rules:{vaa05:{required:L.value.required,message:L.value.name+((null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.146"))||"为必填"),trigger:["input"]}}},{default:()=>[i(r,{label:L.value.name,path:"vaa05",class:"form-render__formItem",style:"--n-feedback-height: 16px; --n-feedback-padding: 0px; --n-feedback-font-size: 12px"},{default:()=>{var e;return[i(u,{style:"--n-text-color-disabled: #000; --n-placeholder-color-disabled: #000;--n-padding-left: 8px; --n-padding-right: 8px",readonly:!0,value:N.vaa05,placeholder:(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.147"))||"请选择",onClick:a},{suffix:()=>i(d,{color:"#c2c2c2",component:b},null)})]}})]})}async function z(t,a){var l,n;try{const o=a||R.value.getFormValues();await(null==(l=R.value)?void 0:l.validate()),F.body.items.forEach((e=>{var t;"vaa05"===e.code?(e._value=w.selectedPatientLabel,e.value=L.value.selectedPatient.vaa01||e.value):o[e.code]&&(e.value=o[e.code]),e.showFlag||(o[e.code]=e.value),(null==(t=H[e.code])?void 0:t[0])&&(e.options=H[e.code])})),w.loading=!0,_("button-click",{values:o,buttonInfo:t,patient:(null==(n=L.value)?void 0:n.selectedPatient)||e.configs,isForm:!0})}catch(e){w.loading=!1}}function V(e){const{fieldInstance:t,context:a,value:l,fieldKey:n}=e;"REMOTE_SEARCH"===t.componentType&&(null==l?void 0:l.length)&&(H[n]=[null==a?void 0:a.currentOption])}function X(){_("button-click",{showMore:!0})}function G(){var e;if("1834043761964638208"!==(null==(e=F.settings)?void 0:e.id)||!F.data)return null;const t=JSON.parse(F.settings.setting),a=e=>{var t;let l="";for(let n=0;n<e.length;n++){const o=e[n];if(o.setting.scopeKey){l=o.setting.scopeKey;break}if((null==(t=o.childrens)?void 0:t.length)&&(l=a(o.childrens),l))break}return l},l=a(t.templates);return!l||!g(F.data[l])||JSON.parse(F.data[l]).length<=5?null:(g(B[l])&&(B[l]=JSON.parse(B[l]).slice(0,5)),i(c,{block:!0,text:!0,"icon-placement":"right",color:T.value["--c-primary-color"],style:"margin-top: 10px",onClick:X},{icon:()=>i(d,{component:h},null),default:()=>"查看更多"}))}return o((()=>w.showPatient),(t=>{!e.msgItem.disabled&&A.value&&!t&&w.selectedPatientLabel&&L.value&&(N.vaa05=w.selectedPatientLabel,L.value.selectedPatient={...w.selectedPatientForm})})),()=>{var t;return i("div",{class:"card"},[A.value?[i("p",null,[F.title||F.header.title]),i("div",{class:"form-box"},[[J(),i(E,{"request-instance":{get:O.get,post:O.post},"life-cycle":K,column:12,ref:R,"field-list":M.value,onFormChange:V},null)]]),F.footer.buttons.map((t=>function(t){const a={width:"100%","--n-height":"36px",fontSize:"15px",marginTop:"10px"},l=A.value?{...a,marginTop:"0"}:a;return i(c,{id:e.msgId,style:l,secondary:!0,class:"gradient",disabled:e.msgItem.disabled,onClick:async function(){var e;if(A.value){if(!R.value)return;try{L.value?null==(e=q.value)||e.validate((async e=>{var a,l;if(!e){const e=null==(l=(a=R.value).getFormValues)?void 0:l.call(a);Object.assign(e,{vaa05:L.value.selectedPatient.vaa01}),await z(t,e)}})):await z(t)}catch(e){}}else _("button-click")}},{default:()=>[A.value?null==t?void 0:t.text:F.buttonName]})}(t)))]:[i(I,{config:g(null==(t=F.settings)?void 0:t.setting)?JSON.parse(F.settings.setting):null,data:B,"onModule-click":U,"onButton-click":D},null),G()]])}}});export{k as default};
1
+ import{defineComponent as e,inject as t,ref as a,reactive as l,computed as n,watch as o,createVNode as i}from"vue";import{NForm as s,NFormItem as r,NInput as u,NIcon as d,NButton as c}from"naive-ui";import{InjectionAIChat as v}from"../types/index.js";import"../../../index.js";import{cloneDeep as p,isArray as m,omit as f}from"lodash-es";import{isValidJSON as g}from"../utils/index.js";import{ChevronDown as b,ChevronForward as h}from"@vicons/ionicons5";import{useTheme as y}from"../../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import"@vue/shared";import"../../../../shared/utils/index.js";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import"../../../../shared/hooks/useScrollLoading.js";import{instanceAxios as E}from"../api/index.js";import I from"../../../form-render/index.js";import k from"../../../template-render/index.js";var x=e({name:"ChatCard",inheritAttrs:!1,props:{msgItem:{type:Object,default:()=>({})},selectParams:{type:Object},configs:{type:Object},msgId:{type:String}},emits:["button-click"],setup(e,{attrs:x,slots:_,emit:C}){const T={TEXT:"INPUT",NUMBER:"INPUT_NUMBER",DATETIME:"DATE",MULTI_SELECT:"REMOTE_SEARCH",SELECT:"REMOTE_SEARCH"},P=y(),{patientInfo:w,state:O,isSmall:S,appId:j}=t(v),M=a([]),R=a(),L=a(),N=l({vaa05:""}),q=a(),A=n((()=>{var t,a;return!!(null==(a=null==(t=e.msgItem)?void 0:t.content)?void 0:a.body)})),F=e.msgItem.content,H={},B=l(p(F.data||{})),K={beforeRequest(e,t,a){(null==t?void 0:t.params)&&(t.params.vaa05=L.value.selectedPatient.vaa01),t&&Reflect.has(t,"configs")&&(t.configs=L.value.selectedPatient)}};function U(e){const{eventName:t,data:a}=e;t&&C("button-click",{buttonInfo:a,isBI:!0})}function D(e){B[e.button.id+"Disabled"]="1",C("button-click",{buttonInfo:{...f(e.button,["props"]),data:e.data}})}if(A.value){const t=F.body.items||[],a=t.some((e=>"vaa05"===e.code));M.value=t.filter((e=>e.showFlag)).map((t=>{var l,n,o;if("vaa05"===t.code&&!S.value)return L.value={...t},t._value?N.vaa05=t._value:(null==(l=t.options)?void 0:l.length)&&t.value&&(N.vaa05=null==(n=t.options.find((e=>e.value===t.value)))?void 0:n.label,L.value.selectedPatient=e.configs),null;const i={html_type:T[t.type]||t.type,val_key:t.code,name:t.name,elem_width:12,default_val:t.value,lazyRequest:!0,requestCache:!0,urlConfig:{nameKey:null!=(o=t.labelField)?o:"label"},option:[],is_null:t.required?"0":"1",is_edit:e.msgItem.disabled?"0":"1",componentProps:{},multi_select:"MULTI_SELECT"===t.type?"0":"1"};if("DATETIME"===t.type&&(i.date_format="yyyy-MM-dd HH:mm:ss"),"REMOTE_SEARCH"===i.html_type){if(i.componentProps={fallbackOption:!1},i.option=t.options||[],i.default_val=null,t.value&&m(t.options)&&t.options.length>0){t.options.find((e=>(null==e?void 0:e.value)===t.value))&&(i.default_val=t.value)}if(Object.assign(i.urlConfig,{url:"/flow/api/instruction/parameter/getOptionsValues",method:"post",params:{...e.selectParams,code:t.code,source:S.value?"inner":"global",...S.value?{appId:j.value}:{}},dependKey:[]}),a&&(i.urlConfig.params.configs=w.value.info||O.selectedPatient),t.dependencies){const e=t.dependencies.split(",");i.urlConfig.dependKey=e,e.includes("vaa05")&&(i.urlConfig.params.params={vaa05:""})}}return i})).filter((e=>!!e))}function J(){var t;if(!L.value)return null;function a(){e.msgItem.disabled||(O.showPatient=!0)}return i(s,{class:"form-render",ref:q,"require-mark-placement":"left",disabled:e.msgItem.disabled,model:N,rules:{vaa05:{required:L.value.required,message:L.value.name+((null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.146"))||"为必填"),trigger:["input"]}}},{default:()=>[i(r,{label:L.value.name,path:"vaa05",class:"form-render__formItem",style:"--n-feedback-height: 16px; --n-feedback-padding: 0px; --n-feedback-font-size: 12px"},{default:()=>{var e;return[i(u,{style:"--n-text-color-disabled: #000; --n-placeholder-color-disabled: #000;--n-padding-left: 8px; --n-padding-right: 8px",readonly:!0,value:N.vaa05,placeholder:(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.147"))||"请选择",onClick:a},{suffix:()=>i(d,{color:"#c2c2c2",component:b},null)})]}})]})}async function z(t,a){var l,n;try{const o=a||R.value.getFormValues();await(null==(l=R.value)?void 0:l.validate()),F.body.items.forEach((e=>{var t;"vaa05"===e.code?(e._value=O.selectedPatientLabel,e.value=L.value.selectedPatient.vaa01||e.value):o[e.code]&&(e.value=o[e.code]),e.showFlag||(o[e.code]=e.value),(null==(t=H[e.code])?void 0:t[0])&&(e.options=H[e.code])})),O.loading=!0,C("button-click",{values:o,buttonInfo:t,patient:(null==(n=L.value)?void 0:n.selectedPatient)||e.configs,isForm:!0})}catch(e){O.loading=!1}}function V(e){const{fieldInstance:t,context:a,value:l,fieldKey:n}=e;"REMOTE_SEARCH"===t.componentType&&(null==l?void 0:l.length)&&(H[n]=[null==a?void 0:a.currentOption])}function X(){C("button-click",{showMore:!0})}function G(){var e;if("1834043761964638208"!==(null==(e=F.settings)?void 0:e.id)||!F.data)return null;const t=JSON.parse(F.settings.setting),a=e=>{var t;let l="";for(let n=0;n<e.length;n++){const o=e[n];if(o.setting.scopeKey){l=o.setting.scopeKey;break}if((null==(t=o.childrens)?void 0:t.length)&&(l=a(o.childrens),l))break}return l},l=a(t.templates);return!l||!g(F.data[l])||JSON.parse(F.data[l]).length<=5?null:(g(B[l])&&(B[l]=JSON.parse(B[l]).slice(0,5)),i(c,{block:!0,text:!0,"icon-placement":"right",color:P.value["--c-primary-color"],style:"margin-top: 10px",onClick:X},{icon:()=>i(d,{component:h},null),default:()=>"查看更多"}))}return o((()=>O.showPatient),(t=>{!e.msgItem.disabled&&A.value&&!t&&O.selectedPatientLabel&&L.value&&(N.vaa05=O.selectedPatientLabel,L.value.selectedPatient={...O.selectedPatientForm})})),()=>{var t;return i("div",{class:"card"},[A.value?[i("p",null,[F.title||F.header.title]),i("div",{class:"form-box"},[[J(),i(I,{"request-instance":{get:E.get,post:E.post},"life-cycle":K,column:12,ref:R,"field-list":M.value,onFormChange:V},null)]]),F.footer.buttons.map((t=>function(t){const a={width:"100%","--n-height":"36px",fontSize:"15px",marginTop:"10px"},l=A.value?{...a,marginTop:"0"}:a;return i(c,{id:e.msgId,style:l,secondary:!0,class:"gradient",disabled:e.msgItem.disabled,onClick:async function(){var e;if(A.value){if(!R.value)return;try{L.value?null==(e=q.value)||e.validate((async e=>{var a,l;if(!e){const e=null==(l=(a=R.value).getFormValues)?void 0:l.call(a);Object.assign(e,{vaa05:L.value.selectedPatient.vaa01}),await z(t,e)}})):await z(t)}catch(e){}}else C("button-click")}},{default:()=>[A.value?null==t?void 0:t.text:F.buttonName]})}(t)))]:[i(k,{config:g(null==(t=F.settings)?void 0:t.setting)?JSON.parse(F.settings.setting):null,data:B,"onModule-click":U,"onButton-click":D},null),G()]])}}});export{x as default};