cnhis-design-vue 3.3.1-beta.10 → 3.3.1-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 (129) hide show
  1. package/es/components/ai-chat/index.d.ts +145 -10
  2. package/es/components/ai-chat/src/Index.vue.d.ts +145 -10
  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 +44 -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 +55 -2
  11. package/es/components/ai-chat/src/components/ChatFooter.vue2.js +1 -1
  12. package/es/components/ai-chat/src/components/ChatMainInner.d.ts +2 -0
  13. package/es/components/ai-chat/src/components/ChatMainInner.js +1 -0
  14. package/es/components/ai-chat/src/components/ChatRight.vue.d.ts +55 -0
  15. package/es/components/ai-chat/src/components/ChatRight.vue.js +1 -0
  16. package/es/components/ai-chat/src/components/ChatRight.vue2.js +1 -0
  17. package/es/components/ai-chat/src/components/card/JsonCard.d.ts +25 -0
  18. package/es/components/ai-chat/src/components/card/JsonCard.js +1 -0
  19. package/es/components/ai-chat/src/components/card/SelectIcon.d.ts +14 -0
  20. package/es/components/ai-chat/src/components/card/SelectIcon.js +1 -0
  21. package/es/components/ai-chat/src/hooks/useProgram.d.ts +6 -0
  22. package/es/components/ai-chat/src/hooks/useProgram.js +1 -0
  23. package/es/components/ai-chat/src/hooks/useWebsocket.d.ts +2 -0
  24. package/es/components/ai-chat/src/hooks/useWebsocket.js +1 -0
  25. package/es/components/ai-chat/src/utils/index.d.ts +1 -0
  26. package/es/components/ai-chat/src/utils/index.js +1 -1
  27. package/es/components/ai-chat/style/index.css +1 -1
  28. package/es/components/audio-sdk/index.d.ts +2 -304
  29. package/es/components/audio-sdk/index.js +1 -1
  30. package/es/components/audio-sdk/src/audioSDK.d.ts +8 -5
  31. package/es/components/audio-sdk/src/audioSDK.js +1 -1
  32. package/es/components/audio-sdk/src/components/recording.vue.d.ts +4 -43
  33. package/es/components/audio-sdk/src/components/recording.vue2.js +1 -1
  34. package/es/components/audio-sdk/src/utils/recordingModal.d.ts +4 -7
  35. package/es/components/audio-sdk/src/utils/recordingModal.js +1 -1
  36. package/es/components/audio-sdk/style/index.css +1 -1
  37. package/es/components/callback/src/components/render/popupMaps.d.ts +1 -7
  38. package/es/components/date-picker/src/DatePicker.vue2.js +1 -1
  39. package/es/components/editor/src/Editor.js +1 -1
  40. package/es/components/editor/style/index.css +1 -0
  41. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -1
  42. package/es/components/field-editor/index.d.ts +1 -7
  43. package/es/components/field-editor/src/FieldEditor.vue.d.ts +1 -7
  44. package/es/components/form-config/index.d.ts +3 -38
  45. package/es/components/form-config/src/FormConfig.vue.d.ts +3 -38
  46. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +1 -7
  47. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +1 -17
  48. package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +1 -8
  49. package/es/components/form-render/index.d.ts +1 -7
  50. package/es/components/form-render/index.js +1 -1
  51. package/es/components/form-render/src/FormRender.vue.d.ts +1 -7
  52. package/es/components/form-render/src/FormRender.vue2.js +1 -1
  53. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +1 -7
  54. package/es/components/form-render/src/components/renderer/date.d.ts +0 -2
  55. package/es/components/form-render/src/components/renderer/date.js +1 -1
  56. package/es/components/form-render/src/components/renderer/formItem.d.ts +0 -2
  57. package/es/components/form-render/src/components/renderer/formItem.js +1 -1
  58. package/es/components/form-render/src/components/renderer/input.d.ts +0 -5
  59. package/es/components/form-render/src/components/renderer/input.js +1 -1
  60. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +1 -14
  61. package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +1 -14
  62. package/es/components/form-render/src/components/renderer/select.d.ts +0 -5
  63. package/es/components/form-render/src/components/renderer/select.js +1 -1
  64. package/es/components/form-render/src/components/tooltipMessage.vue.d.ts +1 -12
  65. package/es/components/form-render/src/components/tooltipMessage.vue2.js +1 -1
  66. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  67. package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +0 -4
  68. package/es/components/form-render/src/types/fieldItem.d.ts +0 -1
  69. package/es/components/form-render/src/types/index.d.ts +0 -2
  70. package/es/components/form-render/src/utils/index.d.ts +0 -1
  71. package/es/components/form-render/src/utils/index.js +1 -1
  72. package/es/components/form-render/style/index.css +1 -1
  73. package/es/components/iho-table/src/IhoTable.vue2.js +1 -1
  74. package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +1 -1
  75. package/es/components/iho-table/src/hooks/tapHooks/index.js +1 -1
  76. package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.d.ts +3 -3
  77. package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.js +1 -1
  78. package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +1 -1
  79. package/es/components/iho-table/src/plugins/highLightSetPlugin.js +1 -1
  80. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useSelectOption.d.ts +0 -7
  81. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useSelectOption.js +1 -1
  82. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
  83. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.d.ts +2 -1
  84. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js +1 -1
  85. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/checkRendererPlugin.js +1 -1
  86. package/es/components/iho-table/src/plugins/stickyFixedPlugin.js +1 -1
  87. package/es/components/iho-table/src/plugins/varialbleHeightPlugin.js +1 -1
  88. package/es/components/iho-table/src/plugins/verticalTablePlugin/src/utils.js +1 -1
  89. package/es/components/iho-table/src/types/index.d.ts +0 -1
  90. package/es/components/iho-table/src/types/pluginType.d.ts +2 -2
  91. package/es/components/index.css +1 -1
  92. package/es/components/index.d.ts +1 -2
  93. package/es/components/index.js +1 -1
  94. package/es/components/info-header/index.d.ts +2 -24
  95. package/es/components/info-header/src/InfoHeader.vue.d.ts +2 -24
  96. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +0 -2
  97. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +0 -2
  98. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +1 -9
  99. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +1 -7
  100. package/es/components/scale-view/index.d.ts +2 -3
  101. package/es/components/scale-view/src/ScaleView.vue.d.ts +2 -3
  102. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  103. package/es/components/scale-view/src/hooks/scaleview-init.d.ts +1 -3
  104. package/es/components/scale-view/src/hooks/scaleview-init.js +1 -1
  105. package/es/components/scale-view/src/hooks/use-component.d.ts +2189 -1
  106. package/es/components/shortcut-setter/index.d.ts +1 -8
  107. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +1 -8
  108. package/es/shared/assets/img/file-emr.png.js +1 -0
  109. package/es/shared/assets/img/file.png.js +1 -0
  110. package/es/shared/assets/img/use.png.js +1 -0
  111. package/es/shared/package.json.js +1 -1
  112. package/package.json +2 -2
  113. package/es/components/audio-sdk/src/Index.vue.d.ts +0 -304
  114. package/es/components/audio-sdk/src/Index.vue.js +0 -1
  115. package/es/components/audio-sdk/src/Index.vue2.js +0 -1
  116. package/es/components/audio-sdk/src/components/form.vue.d.ts +0 -51
  117. package/es/components/audio-sdk/src/components/form.vue.js +0 -1
  118. package/es/components/audio-sdk/src/components/form.vue2.js +0 -1
  119. package/es/components/audio-sdk/src/components/recording-modal.vue.d.ts +0 -91
  120. package/es/components/audio-sdk/src/components/recording-modal.vue.js +0 -1
  121. package/es/components/audio-sdk/src/components/recording-modal.vue2.js +0 -1
  122. package/es/components/audio-sdk/src/utils/index.d.ts +0 -4
  123. package/es/components/audio-sdk/src/utils/index.js +0 -1
  124. package/es/shared/components/ArrowIcon/ArrowIcon.vue.js +0 -1
  125. package/es/shared/components/ArrowIcon/index.d.ts +0 -2
  126. package/es/shared/components/ArrowIcon/index.js +0 -1
  127. package/es/shared/components/DateIcon/DateIcon.vue.js +0 -1
  128. package/es/shared/components/DateIcon/index.d.ts +0 -2
  129. package/es/shared/components/DateIcon/index.js +0 -1
@@ -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,15 +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
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<{}>>, {}>;
112
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;
113
136
  cssVars: import("vue").ComputedRef<import("../../shared/types").AnyObject>;
114
137
  audioSdk: import("..").CAudioSDK;
115
138
  emit: (event: string, ...args: any[]) => void;
@@ -118,6 +141,8 @@ declare const AiChat: SFCWithInstall<import("vue").DefineComponent<{
118
141
  isSmall: any;
119
142
  audioTimed: any;
120
143
  commandList: any;
144
+ isInner: any;
145
+ patientInfo: any;
121
146
  inputRef: import("vue").Ref<any>;
122
147
  showPopover: import("vue").Ref<boolean>;
123
148
  breadcrumb: import("vue").Ref<{
@@ -137,13 +162,16 @@ declare const AiChat: SFCWithInstall<import("vue").DefineComponent<{
137
162
  showPrompt: import("vue").Ref<boolean>;
138
163
  currentShortcutId: import("vue").Ref<string>;
139
164
  showPatient: import("vue").Ref<boolean>;
140
- placeholder: import("vue").ComputedRef<"请向我提问或输入\"/\"查看指令" | "请向我提问或输入\"/\"查看指令,Shift+Enter换行">;
165
+ showAudio: import("vue").Ref<boolean>;
166
+ placeholder: import("vue").ComputedRef<"请向我提问,Shift+Enter换行" | "请向我提问或输入\"/\"查看指令" | "请向我提问或输入\"/\"查看指令,Shift+Enter换行">;
141
167
  btnDisabled: import("vue").ComputedRef<any>;
142
168
  showMagicWand: import("vue").ComputedRef<boolean>;
143
169
  patient: import("vue").ComputedRef<string>;
170
+ currentShortcutList: import("vue").ComputedRef<any>;
171
+ isAllDisabled: import("vue").ComputedRef<any>;
144
172
  recorderStart: () => Promise<void>;
145
173
  getShortcutName: (item: string | import("../../shared/types").AnyObject) => any;
146
- handleShortcut: (item: string | import("../../shared/types").AnyObject) => void;
174
+ handleShortcut: (item: string | import("../../shared/types").AnyObject) => Promise<void>;
147
175
  resetCurrentCommand: () => void;
148
176
  handleKeyDown: (event: KeyboardEvent) => void;
149
177
  isWrap: (event: KeyboardEvent) => boolean;
@@ -263,6 +291,102 @@ declare const AiChat: SFCWithInstall<import("vue").DefineComponent<{
263
291
  }, {
264
292
  show: boolean;
265
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
+ vaa07: any;
310
+ immediatelyRecording: any;
311
+ time: import("vue").Ref<number>;
312
+ endType: string;
313
+ pause: import("@vueuse/shared").Fn;
314
+ resume: import("@vueuse/shared").Fn;
315
+ isActive: import("vue").Ref<boolean>;
316
+ tip: import("vue").ComputedRef<"正在录音中..." | "录音已暂停">;
317
+ formattedTime: import("vue").ComputedRef<string>;
318
+ checkEnvironment: () => boolean;
319
+ start: () => Promise<void>;
320
+ handlePause: () => void;
321
+ handlePlay: () => void;
322
+ handleEnd: (trigger?: string | undefined) => Promise<void>;
323
+ NSpace: any;
324
+ NButton: any;
325
+ NIcon: any;
326
+ 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<{}>>, {}>;
327
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:show"[], "update:show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
328
+ show: {
329
+ type: BooleanConstructor;
330
+ };
331
+ }>> & {
332
+ "onUpdate:show"?: ((...args: any[]) => any) | undefined;
333
+ }, {
334
+ show: boolean;
335
+ }>;
336
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
337
+ 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<{}>>, {}>;
338
+ ChatRight: import("vue").DefineComponent<{}, {
339
+ medicalLabel: {
340
+ key: string;
341
+ title: string;
342
+ }[];
343
+ state: any;
344
+ patientInfo: any;
345
+ toolbarConfig: {
346
+ toolbarKeys: never[];
347
+ };
348
+ content: import("vue").Ref<string>;
349
+ handleSave: () => Promise<void>;
350
+ createMedicalRecord: () => void;
351
+ extractContentByTitle: () => import("../../shared/types").AnyObject;
352
+ NIcon: any;
353
+ NSpace: any;
354
+ NButton: any;
355
+ Editor: SFCWithInstall<import("vue").DefineComponent<{
356
+ editorConfig: {
357
+ type: ObjectConstructor;
358
+ };
359
+ toolbarConfig: {
360
+ type: ObjectConstructor;
361
+ };
362
+ uploadImgUrl: {
363
+ type: StringConstructor;
364
+ };
365
+ isDisabled: {
366
+ type: BooleanConstructor;
367
+ default: boolean;
368
+ };
369
+ }, {
370
+ editorRef: import("vue").ShallowRef<any>;
371
+ renderVN: () => JSX.Element;
372
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, never[], never, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
373
+ editorConfig: {
374
+ type: ObjectConstructor;
375
+ };
376
+ toolbarConfig: {
377
+ type: ObjectConstructor;
378
+ };
379
+ uploadImgUrl: {
380
+ type: StringConstructor;
381
+ };
382
+ isDisabled: {
383
+ type: BooleanConstructor;
384
+ default: boolean;
385
+ };
386
+ }>> & {}, {
387
+ isDisabled: boolean;
388
+ }>>;
389
+ 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<{}>>, {}>;
266
390
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
267
391
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "button-click"[], "button-click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
268
392
  token: {
@@ -280,17 +404,16 @@ declare const AiChat: SFCWithInstall<import("vue").DefineComponent<{
280
404
  };
281
405
  queryData: {
282
406
  type: import("vue").PropType<import("./src/types").QueryData>;
283
- reuired: boolean;
284
407
  };
285
408
  queryRecord: {
286
409
  type: import("vue").PropType<import("./src/types").QueryRecord>;
287
- reuired: boolean;
288
410
  };
289
411
  hideInput: {
290
412
  type: BooleanConstructor;
291
413
  };
292
414
  uiStyle: {
293
415
  type: StringConstructor;
416
+ default: string;
294
417
  };
295
418
  audioTimed: {
296
419
  type: NumberConstructor;
@@ -314,10 +437,22 @@ declare const AiChat: SFCWithInstall<import("vue").DefineComponent<{
314
437
  appId: {
315
438
  type: StringConstructor;
316
439
  };
440
+ orgId: {
441
+ type: StringConstructor;
442
+ };
443
+ userId: {
444
+ type: StringConstructor;
445
+ };
446
+ immediatelyRecording: {
447
+ type: BooleanConstructor;
448
+ default: boolean;
449
+ };
317
450
  }>> & {
318
451
  "onButton-click"?: ((...args: any[]) => any) | undefined;
319
452
  }, {
320
453
  hideInput: boolean;
454
+ uiStyle: string;
321
455
  audioTimed: number;
456
+ immediatelyRecording: boolean;
322
457
  }>>;
323
458
  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,15 +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
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<{}>>, {}>;
114
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;
115
138
  cssVars: import("vue").ComputedRef<AnyObject>;
116
139
  audioSdk: import("../..").CAudioSDK;
117
140
  emit: (event: string, ...args: any[]) => void;
@@ -120,6 +143,8 @@ declare const _default: import("vue").DefineComponent<{
120
143
  isSmall: any;
121
144
  audioTimed: any;
122
145
  commandList: any;
146
+ isInner: any;
147
+ patientInfo: any;
123
148
  inputRef: import("vue").Ref<any>;
124
149
  showPopover: import("vue").Ref<boolean>;
125
150
  breadcrumb: import("vue").Ref<{
@@ -139,13 +164,16 @@ declare const _default: import("vue").DefineComponent<{
139
164
  showPrompt: import("vue").Ref<boolean>;
140
165
  currentShortcutId: import("vue").Ref<string>;
141
166
  showPatient: import("vue").Ref<boolean>;
142
- placeholder: import("vue").ComputedRef<"请向我提问或输入\"/\"查看指令" | "请向我提问或输入\"/\"查看指令,Shift+Enter换行">;
167
+ showAudio: import("vue").Ref<boolean>;
168
+ placeholder: import("vue").ComputedRef<"请向我提问,Shift+Enter换行" | "请向我提问或输入\"/\"查看指令" | "请向我提问或输入\"/\"查看指令,Shift+Enter换行">;
143
169
  btnDisabled: import("vue").ComputedRef<any>;
144
170
  showMagicWand: import("vue").ComputedRef<boolean>;
145
171
  patient: import("vue").ComputedRef<string>;
172
+ currentShortcutList: import("vue").ComputedRef<any>;
173
+ isAllDisabled: import("vue").ComputedRef<any>;
146
174
  recorderStart: () => Promise<void>;
147
175
  getShortcutName: (item: string | AnyObject) => any;
148
- handleShortcut: (item: string | AnyObject) => void;
176
+ handleShortcut: (item: string | AnyObject) => Promise<void>;
149
177
  resetCurrentCommand: () => void;
150
178
  handleKeyDown: (event: KeyboardEvent) => void;
151
179
  isWrap: (event: KeyboardEvent) => boolean;
@@ -265,6 +293,102 @@ declare const _default: import("vue").DefineComponent<{
265
293
  }, {
266
294
  show: boolean;
267
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
+ vaa07: any;
312
+ immediatelyRecording: any;
313
+ time: import("vue").Ref<number>;
314
+ endType: string;
315
+ pause: import("@vueuse/shared").Fn;
316
+ resume: import("@vueuse/shared").Fn;
317
+ isActive: import("vue").Ref<boolean>;
318
+ tip: import("vue").ComputedRef<"正在录音中..." | "录音已暂停">;
319
+ formattedTime: import("vue").ComputedRef<string>;
320
+ checkEnvironment: () => boolean;
321
+ start: () => Promise<void>;
322
+ handlePause: () => void;
323
+ handlePlay: () => void;
324
+ handleEnd: (trigger?: string | undefined) => Promise<void>;
325
+ NSpace: any;
326
+ NButton: any;
327
+ NIcon: any;
328
+ 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<{}>>, {}>;
329
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:show"[], "update:show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
330
+ show: {
331
+ type: BooleanConstructor;
332
+ };
333
+ }>> & {
334
+ "onUpdate:show"?: ((...args: any[]) => any) | undefined;
335
+ }, {
336
+ show: boolean;
337
+ }>;
338
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
339
+ 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<{}>>, {}>;
340
+ ChatRight: import("vue").DefineComponent<{}, {
341
+ medicalLabel: {
342
+ key: string;
343
+ title: string;
344
+ }[];
345
+ state: any;
346
+ patientInfo: any;
347
+ toolbarConfig: {
348
+ toolbarKeys: never[];
349
+ };
350
+ content: import("vue").Ref<string>;
351
+ handleSave: () => Promise<void>;
352
+ createMedicalRecord: () => void;
353
+ extractContentByTitle: () => AnyObject;
354
+ NIcon: any;
355
+ NSpace: any;
356
+ NButton: any;
357
+ Editor: import("../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{
358
+ editorConfig: {
359
+ type: ObjectConstructor;
360
+ };
361
+ toolbarConfig: {
362
+ type: ObjectConstructor;
363
+ };
364
+ uploadImgUrl: {
365
+ type: StringConstructor;
366
+ };
367
+ isDisabled: {
368
+ type: BooleanConstructor;
369
+ default: boolean;
370
+ };
371
+ }, {
372
+ editorRef: import("vue").ShallowRef<any>;
373
+ renderVN: () => JSX.Element;
374
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, never[], never, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
375
+ editorConfig: {
376
+ type: ObjectConstructor;
377
+ };
378
+ toolbarConfig: {
379
+ type: ObjectConstructor;
380
+ };
381
+ uploadImgUrl: {
382
+ type: StringConstructor;
383
+ };
384
+ isDisabled: {
385
+ type: BooleanConstructor;
386
+ default: boolean;
387
+ };
388
+ }>> & {}, {
389
+ isDisabled: boolean;
390
+ }>>;
391
+ 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<{}>>, {}>;
268
392
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
269
393
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "button-click"[], "button-click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
270
394
  token: {
@@ -282,17 +406,16 @@ declare const _default: import("vue").DefineComponent<{
282
406
  };
283
407
  queryData: {
284
408
  type: PropType<QueryData>;
285
- reuired: boolean;
286
409
  };
287
410
  queryRecord: {
288
411
  type: PropType<QueryRecord>;
289
- reuired: boolean;
290
412
  };
291
413
  hideInput: {
292
414
  type: BooleanConstructor;
293
415
  };
294
416
  uiStyle: {
295
417
  type: StringConstructor;
418
+ default: string;
296
419
  };
297
420
  audioTimed: {
298
421
  type: NumberConstructor;
@@ -316,10 +439,22 @@ declare const _default: import("vue").DefineComponent<{
316
439
  appId: {
317
440
  type: StringConstructor;
318
441
  };
442
+ orgId: {
443
+ type: StringConstructor;
444
+ };
445
+ userId: {
446
+ type: StringConstructor;
447
+ };
448
+ immediatelyRecording: {
449
+ type: BooleanConstructor;
450
+ default: boolean;
451
+ };
319
452
  }>> & {
320
453
  "onButton-click"?: ((...args: any[]) => any) | undefined;
321
454
  }, {
322
455
  hideInput: boolean;
456
+ uiStyle: string;
323
457
  audioTimed: number;
458
+ immediatelyRecording: boolean;
324
459
  }>;
325
460
  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 o,provide as n,toRefs as i,openBlock as r,createElementBlock as a,normalizeStyle as s,unref as l,createElementVNode as u,normalizeClass as d,createBlock as p,createCommentVNode as m}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 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"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 x=["id"];var C=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:C,emit:P}){const _=e,b=v();j.defaults.headers.Authorization="bearer "+_.token,"inner"!==_.uiStyle&&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=o({id:"ai-chat-doctor-"+S(),loading:!1,loadingText:"",sending:!1,sendContent:"",selectedCommand:null,selectedPrompt:null,externalData:null,selectedPatient:null,selectedPatientLabel:"",selectedPatientForm:null,showPatient:!1,showRight:!1,consultationContent:null,params:{},reportContent:null});return n(g,{...i(_),state:F,isSmall:t((()=>"small"===_.uiStyle)),isInner:t((()=>"inner"===_.uiStyle)),vaa07:t((()=>{var e,t;return null==(t=null==(e=_.patientInfo)?void 0:e.info)?void 0:t.vaa07}))}),n(k,P),"inner"===_.uiStyle&&I(_,F),C({pushMessage:e=>{F.externalData=e},updatePatientInfo:e=>{F.selectedPatient=e}}),(t,o)=>(r(),a("div",{class:"ai-chat-doctor",style:s(l(b))},[u("div",{id:F.id,class:d(["ai-chat-doctor__main",l(A)?"ai-chat-doctor__main--small":"","inner"===e.uiStyle?"ai-chat-doctor__main--inner":""])},["inner"===e.uiStyle?(r(),p(l(h),{key:0})):(r(),p(l(c),{key:1})),e.hideInput?m("v-if",!0):(r(),p(y,{key:2}))],10,x),"inner"===e.uiStyle?(r(),p(f,{key:0})):m("v-if",!0)],4))}});export{C 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{$message as t}from"../utils/index.js";const r=e.create({withCredentials:!0,timeout:5e3});function o(e){return r({headers:{"Content-Type":"multipart/form-data"},method:"post",url:"/storage-service/storage/uploadFile",data:e})}function a(e){return r({method:"post",url:"/flow/api/opd/conversation",data:e})}function s(e){return r({method:"put",url:"/flow/api/opd/message",data:e})}function i(e){return r({method:"get",url:`/flow/api/dialog/${e.sessionId}/messages`,params:{page:e.page||1,pageSize:e.pageSize||20}})}r.interceptors.request.use((e=>{var t;if(null==(t=e.url)?void 0:t.includes("/conversation")){const t={...e};return delete t.timeout,t}return e})),r.interceptors.response.use((e=>{var r,o,a;if(null==(r=e.data)?void 0:r.success)return null==(o=e.data)?void 0:o.data;500==(null==(a=e.data)?void 0:a.code)&&e.data.msg&&t.error(e.data.msg)}));export{a as conversationApi,i as getHistoryRecordApi,r as instanceAxios,s as saveApi,o as uploadFileApi};
@@ -0,0 +1,44 @@
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
+ vaa07: any;
18
+ immediatelyRecording: any;
19
+ time: import("vue").Ref<number>;
20
+ endType: string;
21
+ pause: import("@vueuse/shared").Fn;
22
+ resume: import("@vueuse/shared").Fn;
23
+ isActive: import("vue").Ref<boolean>;
24
+ tip: import("vue").ComputedRef<"正在录音中..." | "录音已暂停">;
25
+ formattedTime: import("vue").ComputedRef<string>;
26
+ checkEnvironment: () => boolean;
27
+ start: () => Promise<void>;
28
+ handlePause: () => void;
29
+ handlePlay: () => void;
30
+ handleEnd: (trigger?: string) => Promise<void>;
31
+ NSpace: any;
32
+ NButton: any;
33
+ NIcon: any;
34
+ 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<{}>>, {}>;
35
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:show"[], "update:show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
36
+ show: {
37
+ type: BooleanConstructor;
38
+ };
39
+ }>> & {
40
+ "onUpdate:show"?: ((...args: any[]) => any) | undefined;
41
+ }, {
42
+ show: boolean;
43
+ }>;
44
+ 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 i,watch as a,onBeforeUnmount as n,withDirectives as r,openBlock as s,createElementBlock as l,unref as u,createBlock as d,createCommentVNode as c,createElementVNode as p,toDisplayString as m,normalizeStyle as f,createVNode as v,withCtx as w,createTextVNode as h,vShow as g}from"vue";import{NIcon as y,NSpace as _,NButton as F}from"naive-ui";import{StopCircleOutline as S}from"@vicons/ionicons5";import{InjectionAIChat as k}from"../types/index.js";import{useIntervalFn as x,promiseTimeout as C}from"@vueuse/core";import $ from"../../../audio-sdk/src/audioSDK.js";import{uploadFileApi as j}from"../api/index.js";import{uuidGenerator as M}from"../../../../shared/utils/index.js";import{$message as z}from"../utils/index.js";const A={class:"ai-chat-doctor__audio"};var I=o({__name:"ChatAudio",props:{show:{type:Boolean}},emits:["update:show"],setup(o,{emit:I}){const B=o,D=$.create(),{state:T,vaa07:b,immediatelyRecording:q}=e(k),K=t(0);let L="";const{pause:N,resume:O,isActive:R}=x((()=>{K.value++}),1e3,{immediate:!1}),U=i((()=>R.value?"正在录音中...":"录音已暂停")),E=i((()=>{const o=Math.floor(K.value/3600),e=Math.floor(K.value%3600/60),t=K.value%60,i=e.toString().padStart(2,"0"),a=t.toString().padStart(2,"0");if(o>0){return`${o.toString().padStart(2,"0")}:${i}:${a}`}return`${i}:${a}`}));async function G(){try{if((null==(o=null==navigator?void 0:navigator.userAgent)?void 0:o.includes("Chrome"))&&!(null==window?void 0:window.isSecureContext)&&(I("update:show",!1),z.warning("当前使用的http协议默认不支持麦克风权限,需要用户开启浏览器麦克风权限"),1))return;const e=await D.start(void 0,{timed:1800,recognizable:!1,showModal:!1});if(I("update:show",!1),"click"!==L)return;const{result:t,data:i}=e||{};if("success"!==t)return;if(i){const o=new File([i],`${M()}.mp3`,{type:i.type}),e=new FormData;e.append("file",o),e.append("channelId","MINIO");const t=await j(e),a=(null==t?void 0:t.path)||"";console.log("音频地址 ==>",a),T.params={audioUrl:a,opType:"create_inquiry"},T.sending=!0,T.loading=!0,T.loadingText="系统正在对您的对话内容进行梳理整合,转化为规范的结构化问诊记录"}}catch(o){console.log(o),I("update:show",!1),"fail"===(null==o?void 0:o.result)&&o.msg&&z.warning(o.msg)}var o}function H(){N(),D.pause()}function J(){O(),D.resume()}async function P(o){L=o||"",null==D||D.stop(),I("update:show",!1)}return a((()=>B.show),(o=>{o?(L="",K.value=0,O(),G()):N()}),{immediate:!0}),a((()=>b.value),(async o=>{const e=B.show;B.show&&P(),q.value&&(e&&await C(10),I("update:show",!0))}),{immediate:!0}),n((()=>{$.destroy()})),(e,t)=>r((s(),l("div",A,[u(R)?c("v-if",!0):(s(),d(u(y),{key:0,size:"42",color:"#FF1818",component:u(S)},null,8,["component"])),p("p",null,m(u(U)),1),p("h3",{style:f(u(R)?"":"color: #FF1818")},m(u(E)),5),v(u(_),{"wrap-item":!1,size:15},{default:w((()=>[r(v(u(F),{round:"",onClick:H},{default:w((()=>[h("暂停")])),_:1},512),[[g,u(R)]]),r(v(u(F),{round:"",onClick:J},{default:w((()=>[h("继续")])),_:1},512),[[g,!u(R)]]),v(u(F),{round:"",color:"#FF1818",onClick:t[0]||(t[0]=()=>P("click"))},{default:w((()=>{var o;return[h((null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.77"))||"结束")]})),_:1})])),_:1})],512)),[[g,o.show]])}});export{I 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 h,ChevronForward as b}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"../../../card-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:C}){const _={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:""}),F=a(),q=n((()=>{var t,a;return!!(null==(a=null==(t=e.msgItem)?void 0:t.content)?void 0:a.body)})),A=e.msgItem.content,H={},B=l(p(A.data||{})),K={beforeRequest(e,t,a){var l,n;if(null==t?void 0:t.params){const{items:e=[]}=A.body||{},a=null==(n=(l=R.value).getFormValues)?void 0:n.call(l);Object.keys(t.params).forEach((l=>{const n=e.find((e=>e.code===l));"vaa05"===l?t.params.vaa05=L.value.selectedPatient.vaa01:Reflect.has(a,l)?t.params[l]=a[l]:n&&(t.params[l]=n.value)}))}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(q.value){const t=A.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.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,i.urlConfig.params.params={},e.forEach((e=>{i.urlConfig.params.params[e]=""}))}}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:F,"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:h},null)})]}})]})}async function V(t,a){var l,n;try{const o=a||R.value.getFormValues();await(null==(l=R.value)?void 0:l.validate()),A.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,C("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 z(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=A.settings)?void 0:e.id)||!A.data)return null;const t=JSON.parse(A.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(A.data[l])||JSON.parse(A.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:b},null),default:()=>"查看更多"}))}return o((()=>w.showPatient),(t=>{!e.msgItem.disabled&&q.value&&!t&&w.selectedPatientLabel&&L.value&&(N.vaa05=w.selectedPatientLabel,L.value.selectedPatient={...w.selectedPatientForm})})),()=>{var t;return i("div",{class:"card"},[q.value?[i("p",null,[A.title||A.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:z},null)]]),A.footer.buttons.map((t=>function(t){const a={width:"100%","--n-height":"36px",fontSize:"15px",marginTop:"10px"},l=q.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(q.value){if(!R.value)return;try{L.value?null==(e=F.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 V(t,e)}})):await V(t)}catch(e){}}else C("button-click")}},{default:()=>[q.value?null==t?void 0:t.text:A.buttonName]})}(t)))]:[i(I,{config:g(null==(t=A.settings)?void 0:t.setting)?JSON.parse(A.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 h,ChevronForward as b}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 k from"../../../form-render/index.js";import I from"../../../card-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:C,emit:_}){const T={TEXT:"INPUT",NUMBER:"INPUT_NUMBER",DATETIME:"DATE",MULTI_SELECT:"REMOTE_SEARCH",SELECT:"REMOTE_SEARCH"},P=y(),{patientInfo:w,state:O,isSmall:j,appId:S}=t(v),M=a([]),R=a(),L=a(),N=l({vaa05:""}),F=a(),q=n((()=>{var t,a;return!!(null==(a=null==(t=e.msgItem)?void 0:t.content)?void 0:a.body)})),A=e.msgItem.content,H={},B=l(p(A.data||{})),K={beforeRequest(e,t,a){var l,n;if(null==t?void 0:t.params){const{items:e=[]}=A.body||{},a=null==(n=(l=R.value).getFormValues)?void 0:n.call(l);Object.keys(t.params).forEach((l=>{const n=e.find((e=>e.code===l));"vaa05"===l?t.params.vaa05=L.value.selectedPatient.vaa01:Reflect.has(a,l)?t.params[l]=a[l]:n&&(t.params[l]=n.value)}))}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(q.value){const t=A.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&&!j.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:j.value?"inner":"global",...j.value?{appId:S.value}:{}},dependKey:[]}),a&&(i.urlConfig.params.configs=w.value.info||O.selectedPatient),t.dependencies){const e=t.dependencies.split(",");i.urlConfig.dependKey=e,i.urlConfig.params.params={},e.forEach((e=>{i.urlConfig.params.params[e]=""}))}}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:F,"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:h},null)})]}})]})}async function V(t,a){var l,n;try{const o=a||R.value.getFormValues();await(null==(l=R.value)?void 0:l.validate()),A.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,_("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 z(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=A.settings)?void 0:e.id)||!A.data)return null;const t=JSON.parse(A.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(A.data[l])||JSON.parse(A.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:b},null),default:()=>"查看更多"}))}return o((()=>O.showPatient),(t=>{!e.msgItem.disabled&&q.value&&!t&&O.selectedPatientLabel&&L.value&&(N.vaa05=O.selectedPatientLabel,L.value.selectedPatient={...O.selectedPatientForm})})),()=>{var t;return i("div",{class:"card"},[q.value?[i("p",null,[A.title||A.header.title]),i("div",{class:"form-box"},[[J(),i(k,{"request-instance":{get:E.get,post:E.post},"life-cycle":K,column:12,ref:R,"field-list":M.value,onFormChange:z},null)]]),A.footer.buttons.map((t=>function(t){const a={width:"100%","--n-height":"36px",fontSize:"15px",marginTop:"10px"},l=q.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(q.value){if(!R.value)return;try{L.value?null==(e=F.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 V(t,e)}})):await V(t)}catch(e){}}else _("button-click")}},{default:()=>[q.value?null==t?void 0:t.text:A.buttonName]})}(t)))]:[i(I,{config:g(null==(t=A.settings)?void 0:t.setting)?JSON.parse(A.settings.setting):null,data:B,"onModule-click":U,"onButton-click":D},null),G()]])}}});export{x as default};