cnhis-design-vue 3.2.13-beta.2 → 3.2.13-beta.20

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 (84) hide show
  1. package/README.md +87 -87
  2. package/es/components/ai-chat/index.d.ts +95 -4
  3. package/es/components/ai-chat/src/Index.vue.d.ts +96 -5
  4. package/es/components/ai-chat/src/Index.vue2.js +1 -1
  5. package/es/components/ai-chat/src/components/ChatCard.d.ts +10 -4
  6. package/es/components/ai-chat/src/components/ChatCard.js +1 -1
  7. package/es/components/ai-chat/src/components/ChatFooter.vue.d.ts +60 -1
  8. package/es/components/ai-chat/src/components/ChatFooter.vue2.js +1 -1
  9. package/es/components/ai-chat/src/components/ChatMain.js +1 -1
  10. package/es/components/ai-chat/src/components/ChatPatient.vue.d.ts +59 -0
  11. package/es/components/ai-chat/src/components/ChatPatient.vue.js +1 -0
  12. package/es/components/ai-chat/src/components/ChatPatient.vue2.js +1 -0
  13. package/es/components/ai-chat/src/types/index.d.ts +4 -3
  14. package/es/components/ai-chat/style/index.css +1 -1
  15. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  16. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
  17. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
  18. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
  19. package/es/components/button-print/index.d.ts +4 -4
  20. package/es/components/button-print/src/ButtonPrint.vue.d.ts +4 -4
  21. package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
  22. package/es/components/button-print/src/components/OldPrintComponent.vue.d.ts +4 -4
  23. package/es/components/button-print/src/components/OldPrintComponent.vue2.js +1 -1
  24. package/es/components/button-print/src/utils/print.js +1 -1
  25. package/es/components/callback/src/components/render/popupMaps.d.ts +8 -6
  26. package/es/components/classification/src/components/table-modal/index.vue.d.ts +0 -3
  27. package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
  28. package/es/components/fabric-chart/src/hooks/useCommon.js +1 -1
  29. package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
  30. package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
  31. package/es/components/iho-table/index.d.ts +8 -6
  32. package/es/components/iho-table/src/IhoTable.vue.d.ts +8 -6
  33. package/es/components/iho-table/src/IhoTable.vue2.js +1 -1
  34. package/es/components/iho-table/src/plugins/crossHeaderPlugin.js +1 -1
  35. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.d.ts +20 -0
  36. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +1 -1
  37. package/es/components/iho-table/src/plugins/headerPlugin/index.js +1 -1
  38. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -1
  39. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js +1 -1
  40. package/es/components/iho-table/src/types/index.d.ts +6 -2
  41. package/es/components/iho-table/style/index.css +1 -1
  42. package/es/components/index.css +1 -1
  43. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  44. package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
  45. package/es/components/template-render/src/components/Button.vue.d.ts +1 -0
  46. package/es/components/template-render/src/components/Button.vue2.js +1 -1
  47. package/es/components/template-render/src/components/Field.vue.d.ts +1 -1
  48. package/es/components/template-render/src/components/Field.vue2.js +1 -1
  49. package/es/components/template-render/src/components/index.d.ts +26 -25
  50. package/es/env.d.ts +25 -25
  51. package/es/shared/assets/img/ai__avatar.png.js +1 -1
  52. package/es/shared/assets/img/defaultCover/10review_successful.png.js +1 -1
  53. package/es/shared/assets/img/defaultCover/11review_fail.png.js +1 -1
  54. package/es/shared/assets/img/defaultCover/12no_setting.png.js +1 -1
  55. package/es/shared/assets/img/defaultCover/13no_menu_setting.png.js +1 -1
  56. package/es/shared/assets/img/defaultCover/14no_call_setting.png.js +1 -1
  57. package/es/shared/assets/img/defaultCover/15no_use_tag.png.js +1 -1
  58. package/es/shared/assets/img/defaultCover/16no_table_data.png.js +1 -1
  59. package/es/shared/assets/img/defaultCover/1location.png.js +1 -1
  60. package/es/shared/assets/img/defaultCover/2notfound.png.js +1 -1
  61. package/es/shared/assets/img/defaultCover/3loading.png.js +1 -1
  62. package/es/shared/assets/img/defaultCover/4no_permission.png.js +1 -1
  63. package/es/shared/assets/img/defaultCover/5no_data.png.js +1 -1
  64. package/es/shared/assets/img/defaultCover/6no_network.png.js +1 -1
  65. package/es/shared/assets/img/defaultCover/7no_doctor.png.js +1 -1
  66. package/es/shared/assets/img/defaultCover/8system_error.png.js +1 -1
  67. package/es/shared/assets/img/defaultCover/9system_upgrade.png.js +1 -1
  68. package/es/shared/assets/img/failure.png.js +1 -1
  69. package/es/shared/assets/img/logo.png.js +1 -1
  70. package/es/shared/assets/img/no-permission.png.js +1 -1
  71. package/es/shared/assets/img/nodata.png.js +1 -1
  72. package/es/shared/assets/img/notfound.png.js +1 -1
  73. package/es/shared/assets/img/qr.png.js +1 -1
  74. package/es/shared/assets/img/success.png.js +1 -1
  75. package/es/shared/assets/img/table_style_2.png.js +1 -1
  76. package/es/shared/assets/img/video.png.js +1 -1
  77. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  78. package/es/shared/assets/img/xb_big.png.js +1 -1
  79. package/es/shared/assets/img/xb_small.png.js +1 -1
  80. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
  81. package/es/shared/package.json.js +1 -1
  82. package/es/shared/utils/fabricjs/index.d.ts +6823 -0
  83. package/es/shared/utils/tapable/index.d.ts +139 -0
  84. package/package.json +2 -2
package/README.md CHANGED
@@ -1,87 +1,87 @@
1
- # 安装
2
-
3
- ```shell
4
- npm i cnhis-design-vue@[版本号]
5
- # or
6
- yarn add cnhis-design-vue@[版本号] #推荐
7
- ```
8
-
9
- ## 1.全局引入
10
-
11
- ```typescript
12
- // main.ts
13
- import { createApp } from 'vue';
14
- import App from './App.vue';
15
- import 'cnhis-design-vue/es/packages/index.css';
16
- import cui from 'cnhis-design-vue';
17
-
18
- const app = createApp(App);
19
- app.use(cui).mount('#app');
20
- ```
21
-
22
- ## 2. 按需引入
23
-
24
- 组件现在支持了自动按需引入, 但是样式文件需要额外的处理
25
-
26
- ### 2.1 样式处理方式1 (按需引入样式)
27
-
28
- ```shell
29
- # 安装自动导入样式的插件
30
- npm i -d vite-plugin-style-import
31
- ```
32
-
33
- ```typescript
34
- // vite.config.ts
35
- import { defineConfig } from 'vite';
36
- import { createStyleImportPlugin } from 'vite-plugin-style-import';
37
-
38
- export default defineConfig({
39
- plugins: [
40
- // ...otherPlugins
41
- createStyleImportPlugin({
42
- libs: [
43
- {
44
- libraryName: 'cnhis-design-vue',
45
- esModule: true,
46
- ensureStyleFile: true,
47
- resolveStyle: name => {
48
- return `cnhis-design-vue/es/components/${ name.slice(2) }/style/index.css`;
49
- }
50
- }
51
- ]
52
- })
53
- ]
54
- });
55
- ```
56
-
57
- ### 2.2 样式处理方式2 (全局引入样式)
58
-
59
- ```typescript
60
- // main.ts
61
- import 'cnhis-design-vue/es/components/index.css';
62
- ```
63
-
64
- ## 3.FAQ
65
-
66
- ### 3.1 项目打包后样式丢失
67
-
68
- 处理方法, 将 cnhis-design-vue 从 vendor 包中移除 (没有出现此问题则不需要)
69
-
70
- ```typescript
71
- // vite.config.ts
72
- import { defineConfig } from 'vite';
73
-
74
- export default defineConfig({
75
- build: {
76
- rollupOptions: {
77
- // ..otherOptions
78
- output: {
79
- dir: './dist',
80
- manualChunks: {
81
- 'cnhis-vendor': ['cnhis-design-vue']
82
- }
83
- }
84
- }
85
- }
86
- });
87
- ```
1
+ # 安装
2
+
3
+ ```shell
4
+ npm i cnhis-design-vue@[版本号]
5
+ # or
6
+ yarn add cnhis-design-vue@[版本号] #推荐
7
+ ```
8
+
9
+ ## 1.全局引入
10
+
11
+ ```typescript
12
+ // main.ts
13
+ import { createApp } from 'vue';
14
+ import App from './App.vue';
15
+ import 'cnhis-design-vue/es/packages/index.css';
16
+ import cui from 'cnhis-design-vue';
17
+
18
+ const app = createApp(App);
19
+ app.use(cui).mount('#app');
20
+ ```
21
+
22
+ ## 2. 按需引入
23
+
24
+ 组件现在支持了自动按需引入, 但是样式文件需要额外的处理
25
+
26
+ ### 2.1 样式处理方式1 (按需引入样式)
27
+
28
+ ```shell
29
+ # 安装自动导入样式的插件
30
+ npm i -d vite-plugin-style-import
31
+ ```
32
+
33
+ ```typescript
34
+ // vite.config.ts
35
+ import { defineConfig } from 'vite';
36
+ import { createStyleImportPlugin } from 'vite-plugin-style-import';
37
+
38
+ export default defineConfig({
39
+ plugins: [
40
+ // ...otherPlugins
41
+ createStyleImportPlugin({
42
+ libs: [
43
+ {
44
+ libraryName: 'cnhis-design-vue',
45
+ esModule: true,
46
+ ensureStyleFile: true,
47
+ resolveStyle: name => {
48
+ return `cnhis-design-vue/es/components/${ name.slice(2) }/style/index.css`;
49
+ }
50
+ }
51
+ ]
52
+ })
53
+ ]
54
+ });
55
+ ```
56
+
57
+ ### 2.2 样式处理方式2 (全局引入样式)
58
+
59
+ ```typescript
60
+ // main.ts
61
+ import 'cnhis-design-vue/es/components/index.css';
62
+ ```
63
+
64
+ ## 3.FAQ
65
+
66
+ ### 3.1 项目打包后样式丢失
67
+
68
+ 处理方法, 将 cnhis-design-vue 从 vendor 包中移除 (没有出现此问题则不需要)
69
+
70
+ ```typescript
71
+ // vite.config.ts
72
+ import { defineConfig } from 'vite';
73
+
74
+ export default defineConfig({
75
+ build: {
76
+ rollupOptions: {
77
+ // ..otherOptions
78
+ output: {
79
+ dir: './dist',
80
+ manualChunks: {
81
+ 'cnhis-vendor': ['cnhis-design-vue']
82
+ }
83
+ }
84
+ }
85
+ }
86
+ });
87
+ ```
@@ -1,5 +1,9 @@
1
1
  import { SFCWithInstall } from '../../shared/types';
2
2
  declare const AiChat: SFCWithInstall<import("vue").DefineComponent<{
3
+ token: {
4
+ type: StringConstructor;
5
+ required: true;
6
+ };
3
7
  userAvatar: {
4
8
  type: StringConstructor;
5
9
  };
@@ -34,11 +38,21 @@ declare const AiChat: SFCWithInstall<import("vue").DefineComponent<{
34
38
  type: import("vue").PropType<import("./src/types").QueryPrompt>;
35
39
  };
36
40
  patientInfo: {
37
- type: import("vue").PropType<import("../../shared/types").AnyObject>;
41
+ type: import("vue").PropType<Partial<{
42
+ info: import("../../shared/types").AnyObject;
43
+ queryPatient: (props: {
44
+ keyword: string;
45
+ businessType: string;
46
+ }) => Promise<import("../../shared/types").AnyObject[]>;
47
+ }>>;
38
48
  };
39
49
  }, {
40
50
  cssVars: import("vue").ComputedRef<import("../../shared/types").AnyObject>;
41
51
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
52
+ token: {
53
+ type: StringConstructor;
54
+ required: true;
55
+ };
42
56
  userAvatar: {
43
57
  type: StringConstructor;
44
58
  };
@@ -73,13 +87,21 @@ declare const AiChat: SFCWithInstall<import("vue").DefineComponent<{
73
87
  type: import("vue").PropType<import("./src/types").QueryPrompt>;
74
88
  };
75
89
  patientInfo: {
76
- type: import("vue").PropType<import("../../shared/types").AnyObject>;
90
+ type: import("vue").PropType<Partial<{
91
+ info: import("../../shared/types").AnyObject;
92
+ queryPatient: (props: {
93
+ keyword: string;
94
+ businessType: string;
95
+ }) => Promise<import("../../shared/types").AnyObject[]>;
96
+ }>>;
77
97
  };
78
98
  }>> & {
79
99
  "onButton-click"?: ((...args: any[]) => any) | undefined;
80
100
  }>>;
101
+ axiosInstance: import("axios").AxiosInstance;
81
102
  emit: (event: "button-click", ...args: any[]) => void;
82
103
  state: import("../../shared/types").AnyObject;
104
+ NMessageProvider: any;
83
105
  ChatMain: import("vue").DefineComponent<Readonly<import("vue").ComponentPropsOptions<{
84
106
  [x: string]: unknown;
85
107
  }>>, () => 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<{
@@ -90,6 +112,7 @@ declare const AiChat: SFCWithInstall<import("vue").DefineComponent<{
90
112
  ChatFooter: import("vue").DefineComponent<{}, {
91
113
  cssVars: import("vue").ComputedRef<import("../../shared/types").AnyObject>;
92
114
  audioSdk: import("..").CAudioSDK;
115
+ message: import("naive-ui").MessageApi;
93
116
  emit: (event: string, ...args: any[]) => void;
94
117
  shortcutList: any;
95
118
  state: any;
@@ -97,7 +120,6 @@ declare const AiChat: SFCWithInstall<import("vue").DefineComponent<{
97
120
  audioTimed: any;
98
121
  commandList: any;
99
122
  inputRef: import("vue").Ref<any>;
100
- content: import("vue").Ref<string>;
101
123
  showPopover: import("vue").Ref<boolean>;
102
124
  breadcrumb: import("vue").Ref<{
103
125
  [x: string]: any;
@@ -115,8 +137,10 @@ declare const AiChat: SFCWithInstall<import("vue").DefineComponent<{
115
137
  }[]>;
116
138
  showPrompt: import("vue").Ref<boolean>;
117
139
  currentShortcutId: import("vue").Ref<string>;
140
+ showPatient: import("vue").Ref<boolean>;
118
141
  btnDisabled: import("vue").ComputedRef<boolean>;
119
142
  showMagicWand: import("vue").ComputedRef<boolean>;
143
+ patient: import("vue").ComputedRef<string>;
120
144
  recorderStart: () => Promise<void>;
121
145
  isValidJSON: (str: string) => boolean;
122
146
  getShortcutName: (item: string | import("../../shared/types").AnyObject) => any;
@@ -139,6 +163,7 @@ declare const AiChat: SFCWithInstall<import("vue").DefineComponent<{
139
163
  ChevronBack: 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<{}>>, {}>;
140
164
  ChevronForward: 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<{}>>, {}>;
141
165
  SparklesSharp: 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<{}>>, {}>;
166
+ PeopleOutline: 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<{}>>, {}>;
142
167
  ChatPrompt: import("vue").DefineComponent<{
143
168
  show: {
144
169
  type: BooleanConstructor;
@@ -182,8 +207,68 @@ declare const AiChat: SFCWithInstall<import("vue").DefineComponent<{
182
207
  }, {
183
208
  show: boolean;
184
209
  }>;
210
+ ChatPatient: import("vue").DefineComponent<{
211
+ show: {
212
+ type: BooleanConstructor;
213
+ };
214
+ }, {
215
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
216
+ show: {
217
+ type: BooleanConstructor;
218
+ };
219
+ }>> & {
220
+ "onUpdate:show"?: ((...args: any[]) => any) | undefined;
221
+ }>>;
222
+ emit: (event: "update:show", ...args: any[]) => void;
223
+ patientInfo: any;
224
+ state: any;
225
+ formValue: {
226
+ businessType: string;
227
+ vaa01: null;
228
+ bck03a: string;
229
+ };
230
+ rules: {
231
+ businessType: {
232
+ required: boolean;
233
+ trigger: string;
234
+ message: string;
235
+ };
236
+ vaa01: {
237
+ required: boolean;
238
+ trigger: string[];
239
+ message: string;
240
+ };
241
+ };
242
+ options: import("vue").Ref<import("../../shared/types").AnyObject[]>;
243
+ formRef: import("vue").Ref<any>;
244
+ renderLabel: (option: import("../../shared/types").AnyObject) => string;
245
+ handleUpdateValue: (value: string, option: import("naive-ui").SelectOption) => void;
246
+ handleSearch: (keyword: string) => Promise<void>;
247
+ handleBusinessTypeUpdate: () => void;
248
+ handleValidateClick: (e: MouseEvent) => void;
249
+ NDrawer: any;
250
+ NDrawerContent: any;
251
+ NForm: any;
252
+ NFormItem: any;
253
+ NButton: any;
254
+ NRadioGroup: any;
255
+ NRadio: any;
256
+ NSelect: any;
257
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:show"[], "update:show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
258
+ show: {
259
+ type: BooleanConstructor;
260
+ };
261
+ }>> & {
262
+ "onUpdate:show"?: ((...args: any[]) => any) | undefined;
263
+ }, {
264
+ show: boolean;
265
+ }>;
185
266
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
186
267
  }, 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
+ token: {
269
+ type: StringConstructor;
270
+ required: true;
271
+ };
187
272
  userAvatar: {
188
273
  type: StringConstructor;
189
274
  };
@@ -218,7 +303,13 @@ declare const AiChat: SFCWithInstall<import("vue").DefineComponent<{
218
303
  type: import("vue").PropType<import("./src/types").QueryPrompt>;
219
304
  };
220
305
  patientInfo: {
221
- type: import("vue").PropType<import("../../shared/types").AnyObject>;
306
+ type: import("vue").PropType<Partial<{
307
+ info: import("../../shared/types").AnyObject;
308
+ queryPatient: (props: {
309
+ keyword: string;
310
+ businessType: string;
311
+ }) => Promise<import("../../shared/types").AnyObject[]>;
312
+ }>>;
222
313
  };
223
314
  }>> & {
224
315
  "onButton-click"?: ((...args: any[]) => any) | undefined;
@@ -2,6 +2,10 @@ import { type PropType } from 'vue';
2
2
  import { QueryData, QueryRecord, CommandItem, QueryPrompt } from './types';
3
3
  import { AnyObject } from '../../../shared/types';
4
4
  declare const _default: import("vue").DefineComponent<{
5
+ token: {
6
+ type: StringConstructor;
7
+ required: true;
8
+ };
5
9
  userAvatar: {
6
10
  type: StringConstructor;
7
11
  };
@@ -36,11 +40,21 @@ declare const _default: import("vue").DefineComponent<{
36
40
  type: PropType<QueryPrompt>;
37
41
  };
38
42
  patientInfo: {
39
- type: PropType<AnyObject>;
43
+ type: PropType<Partial<{
44
+ info: AnyObject;
45
+ queryPatient: (props: {
46
+ keyword: string;
47
+ businessType: string;
48
+ }) => Promise<AnyObject[]>;
49
+ }>>;
40
50
  };
41
51
  }, {
42
52
  cssVars: import("vue").ComputedRef<AnyObject>;
43
53
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
54
+ token: {
55
+ type: StringConstructor;
56
+ required: true;
57
+ };
44
58
  userAvatar: {
45
59
  type: StringConstructor;
46
60
  };
@@ -75,13 +89,21 @@ declare const _default: import("vue").DefineComponent<{
75
89
  type: PropType<QueryPrompt>;
76
90
  };
77
91
  patientInfo: {
78
- type: PropType<AnyObject>;
92
+ type: PropType<Partial<{
93
+ info: AnyObject;
94
+ queryPatient: (props: {
95
+ keyword: string;
96
+ businessType: string;
97
+ }) => Promise<AnyObject[]>;
98
+ }>>;
79
99
  };
80
100
  }>> & {
81
101
  "onButton-click"?: ((...args: any[]) => any) | undefined;
82
102
  }>>;
103
+ axiosInstance: import("axios").AxiosInstance;
83
104
  emit: (event: "button-click", ...args: any[]) => void;
84
105
  state: AnyObject;
106
+ NMessageProvider: any;
85
107
  ChatMain: import("vue").DefineComponent<Readonly<import("vue").ComponentPropsOptions<{
86
108
  [x: string]: unknown;
87
109
  }>>, () => 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<{
@@ -91,7 +113,8 @@ declare const _default: import("vue").DefineComponent<{
91
113
  } | {}>;
92
114
  ChatFooter: import("vue").DefineComponent<{}, {
93
115
  cssVars: import("vue").ComputedRef<AnyObject>;
94
- audioSdk: import("../../../components/index").CAudioSDK;
116
+ audioSdk: import("../..").CAudioSDK;
117
+ message: import("naive-ui").MessageApi;
95
118
  emit: (event: string, ...args: any[]) => void;
96
119
  shortcutList: any;
97
120
  state: any;
@@ -99,7 +122,6 @@ declare const _default: import("vue").DefineComponent<{
99
122
  audioTimed: any;
100
123
  commandList: any;
101
124
  inputRef: import("vue").Ref<any>;
102
- content: import("vue").Ref<string>;
103
125
  showPopover: import("vue").Ref<boolean>;
104
126
  breadcrumb: import("vue").Ref<{
105
127
  [x: string]: any;
@@ -117,8 +139,10 @@ declare const _default: import("vue").DefineComponent<{
117
139
  }[]>;
118
140
  showPrompt: import("vue").Ref<boolean>;
119
141
  currentShortcutId: import("vue").Ref<string>;
142
+ showPatient: import("vue").Ref<boolean>;
120
143
  btnDisabled: import("vue").ComputedRef<boolean>;
121
144
  showMagicWand: import("vue").ComputedRef<boolean>;
145
+ patient: import("vue").ComputedRef<string>;
122
146
  recorderStart: () => Promise<void>;
123
147
  isValidJSON: (str: string) => boolean;
124
148
  getShortcutName: (item: string | AnyObject) => any;
@@ -141,6 +165,7 @@ declare const _default: import("vue").DefineComponent<{
141
165
  ChevronBack: 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<{}>>, {}>;
142
166
  ChevronForward: 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<{}>>, {}>;
143
167
  SparklesSharp: 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<{}>>, {}>;
168
+ PeopleOutline: 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<{}>>, {}>;
144
169
  ChatPrompt: import("vue").DefineComponent<{
145
170
  show: {
146
171
  type: BooleanConstructor;
@@ -184,8 +209,68 @@ declare const _default: import("vue").DefineComponent<{
184
209
  }, {
185
210
  show: boolean;
186
211
  }>;
212
+ ChatPatient: import("vue").DefineComponent<{
213
+ show: {
214
+ type: BooleanConstructor;
215
+ };
216
+ }, {
217
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
218
+ show: {
219
+ type: BooleanConstructor;
220
+ };
221
+ }>> & {
222
+ "onUpdate:show"?: ((...args: any[]) => any) | undefined;
223
+ }>>;
224
+ emit: (event: "update:show", ...args: any[]) => void;
225
+ patientInfo: any;
226
+ state: any;
227
+ formValue: {
228
+ businessType: string;
229
+ vaa01: null;
230
+ bck03a: string;
231
+ };
232
+ rules: {
233
+ businessType: {
234
+ required: boolean;
235
+ trigger: string;
236
+ message: string;
237
+ };
238
+ vaa01: {
239
+ required: boolean;
240
+ trigger: string[];
241
+ message: string;
242
+ };
243
+ };
244
+ options: import("vue").Ref<AnyObject[]>;
245
+ formRef: import("vue").Ref<any>;
246
+ renderLabel: (option: AnyObject) => string;
247
+ handleUpdateValue: (value: string, option: import("naive-ui").SelectOption) => void;
248
+ handleSearch: (keyword: string) => Promise<void>;
249
+ handleBusinessTypeUpdate: () => void;
250
+ handleValidateClick: (e: MouseEvent) => void;
251
+ NDrawer: any;
252
+ NDrawerContent: any;
253
+ NForm: any;
254
+ NFormItem: any;
255
+ NButton: any;
256
+ NRadioGroup: any;
257
+ NRadio: any;
258
+ NSelect: any;
259
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:show"[], "update:show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
260
+ show: {
261
+ type: BooleanConstructor;
262
+ };
263
+ }>> & {
264
+ "onUpdate:show"?: ((...args: any[]) => any) | undefined;
265
+ }, {
266
+ show: boolean;
267
+ }>;
187
268
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
188
269
  }, 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
+ token: {
271
+ type: StringConstructor;
272
+ required: true;
273
+ };
189
274
  userAvatar: {
190
275
  type: StringConstructor;
191
276
  };
@@ -220,7 +305,13 @@ declare const _default: import("vue").DefineComponent<{
220
305
  type: PropType<QueryPrompt>;
221
306
  };
222
307
  patientInfo: {
223
- type: PropType<AnyObject>;
308
+ type: PropType<Partial<{
309
+ info: AnyObject;
310
+ queryPatient: (props: {
311
+ keyword: string;
312
+ businessType: string;
313
+ }) => Promise<AnyObject[]>;
314
+ }>>;
224
315
  };
225
316
  }>> & {
226
317
  "onButton-click"?: ((...args: any[]) => any) | undefined;
@@ -1 +1 @@
1
- import{defineComponent as e,reactive as t,provide as o,toRefs as r,computed as s,openBlock as i,createElementBlock as a,normalizeClass as n,normalizeStyle as m,unref as p,createVNode as u,createBlock as d,createCommentVNode as l}from"vue";import c from"./components/ChatMain.js";import h from"./components/ChatFooter.vue.js";import{useTheme as y}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import"lodash-es";import{useFormRequest as f}from"../../../shared/hooks/useFormRequest/index.js";import{uuidGenerator as j}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 v,InjectionAIChatEmits as x}from"./types/index.js";import S from"axios";import"../../index.js";const g=["id"];var k=e({__name:"Index",props:{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}},emits:["button-click"],setup(e,{expose:k,emit:C}){const F=e;f().registGlobHttpInstance(S.create());const I=y(),b=t({id:"ai-chat-"+j(),loading:!1,sending:!1,sendContent:"",selectedCommand:null,selectedPrompt:null,externalData:null});return o(v,{...r(F),state:b,isSmall:s((()=>"small"===F.uiStyle))}),o(x,C),k({pushMessage:e=>{b.externalData=e}}),(t,o)=>(i(),a("div",{id:b.id,class:n(["ai-chat","small"===e.uiStyle?"ai-chat--small":""]),style:m(p(I))},[u(p(c)),e.hideInput?l("v-if",!0):(i(),d(h,{key:0}))],14,g))}});export{k as default};
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 p,createVNode as d,withCtx as l,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 j}from"./types/index.js";import k from"axios";const g=["id"];var A=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}},emits:["button-click"],setup(e,{expose:A,emit:C}){const I=e,b=v(),q=k.create({headers:{Authorization:"bearer "+I.token}});q.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});return o(x,{...r(I),state:F,isSmall:s((()=>"small"===I.uiStyle)),axiosInstance:q}),o(j,C),A({pushMessage:e=>{F.externalData=e}}),(t,o)=>(a(),i("div",{id:F.id,class:n(["ai-chat","small"===e.uiStyle?"ai-chat--small":""]),style:u(p(b))},[d(p(h),null,{default:l((()=>[d(p(y)),e.hideInput?c("v-if",!0):(a(),m(f,{key:0}))])),_:1})],14,g))}});export{A as default};
@@ -5,16 +5,22 @@ declare const _default: import("vue").DefineComponent<{
5
5
  type: PropType<MessageItem>;
6
6
  default: () => {};
7
7
  };
8
- instructionId: {
9
- type: StringConstructor;
8
+ selectParams: {
9
+ type: PropType<{
10
+ taskId: string;
11
+ instructionId: string;
12
+ }>;
10
13
  };
11
14
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "button-click"[], "button-click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
12
15
  msgItem: {
13
16
  type: PropType<MessageItem>;
14
17
  default: () => {};
15
18
  };
16
- instructionId: {
17
- type: StringConstructor;
19
+ selectParams: {
20
+ type: PropType<{
21
+ taskId: string;
22
+ instructionId: string;
23
+ }>;
18
24
  };
19
25
  }>> & {
20
26
  "onButton-click"?: ((...args: any[]) => any) | undefined;
@@ -1 +1 @@
1
- import{defineComponent as e,inject as t,ref as n,computed as i,createVNode as o}from"vue";import{NButton as l}from"naive-ui";import{InjectionAIChat as a}from"../types/index.js";import"../../../index.js";import{isArray as s}from"lodash-es";import r from"../../../form-render/index.js";import d from"../../../template-render/index.js";var u=e({name:"ChatCard",inheritAttrs:!1,props:{msgItem:{type:Object,default:()=>({})},instructionId:{type:String}},emits:["button-click"],setup(e,{attrs:u,slots:c,emit:m}){const{patientInfo:p,state:f}=t(a),v=n([]),g=n(),y=i((()=>{var t,n;return!!(null==(n=null==(t=e.msgItem)?void 0:t.content)?void 0:n.body)}));function b(e){try{return JSON.parse(e),!0}catch(e){return!1}}const h=e.msgItem.content;function I(e){const{eventName:t,data:n}=e;t&&m("button-click",{fieldItem:n,isBI:!0})}function x(e){h.data[e.id+"Disabled"]=!0,m("button-click")}return y.value&&(v.value=(h.body.items||[]).map((t=>{var n,i;const o={html_type:t.type,val_key:t.code,name:t.name,elem_width:12,default_val:t.value,lazyRequest:!0,requestCache:!0,urlConfig:{nameKey:null!=(n=t.labelField)?n:"label"},option:[],is_null:t.required?"0":"1"};return"SELECT"===o.html_type&&(o.option=t.options,"fixed"===t.dataSourceType&&(null==(i=t.options)?void 0:i.length)||(o.html_type="REMOTE_SEARCH",Object.assign(o.urlConfig,{url:"/flow/api/instruction/parameter/getOptionsValues",method:"post",params:{instructionId:e.instructionId,code:t.code,configs:p},dependKey:[]}),s(t.dependencies)&&t.dependencies.length&&(o.urlConfig.dependKey=t.dependencies))),o}))),()=>{var t;return o("div",{class:"card"},[y.value?[o("p",null,[h.title||h.header.title]),o(r,{disabled:e.msgItem.disabled,column:12,ref:g,"field-list":v.value},null),h.footer.buttons.map((t=>function(t){const n={width:"100%","--n-height":"36px",fontSize:"15px",marginTop:"10px"},i=y.value?{...n,marginTop:"0"}:n;return o(l,{style:i,secondary:!0,class:"gradient",disabled:e.msgItem.disabled,onClick:async function(){if(y.value){if(!g.value)return;const n=g.value.getFormValues();try{await g.value.validate(),e.msgItem.content.body.items.forEach((e=>{n[e.code]&&(e.value=n[e.code])})),f.loading=!0,m("button-click",{values:n,buttonInfo:t,isForm:!0})}catch(e){}}else m("button-click")}},{default:()=>[y.value?null==t?void 0:t.text:h.buttonName]})}(t)))]:o(d,{config:b(null==(t=h.settings)?void 0:t.setting)?JSON.parse(h.settings.setting):null,data:h.data,"onModule-click":I,"onButton-click":x},null)])}}});export{u as default};
1
+ import{defineComponent as e,inject as t,ref as n,computed as o,createVNode as l,toRef as a}from"vue";import{NButton as i}from"naive-ui";import{InjectionAIChat as s}from"../types/index.js";import"../../../index.js";import{isArray as u}from"lodash-es";import r from"../../../form-render/index.js";import d from"../../../template-render/index.js";var c=e({name:"ChatCard",inheritAttrs:!1,props:{msgItem:{type:Object,default:()=>({})},selectParams:{type:Object}},emits:["button-click"],setup(e,{attrs:c,slots:p,emit:m}){const f={TEXT:"INPUT",NUMBER:"INPUT_NUMBER",DATETIME:"DATETIME-INPUT",MULTI_SELECT:"REMOTE_SEARCH",SELECT:"REMOTE_SEARCH"},{patientInfo:v,state:g,axiosInstance:b,isSmall:E}=t(s),y=n([]),T=n(),h=o((()=>{var t,n;return!!(null==(n=null==(t=e.msgItem)?void 0:t.content)?void 0:n.body)}));function I(e){try{return JSON.parse(e),!0}catch(e){return!1}}const _=e.msgItem.content,C={};function O(e){const{eventName:t,data:n}=e;t&&m("button-click",{buttonInfo:n,isBI:!0})}function x(e){_.data[e.button.id+"Disabled"]=!0,m("button-click",{buttonInfo:e.button})}function M(e){const{fieldInstance:t,context:n,value:o,fieldKey:l}=e;"REMOTE_SEARCH"===t.componentType&&(null==o?void 0:o.length)&&(C[l]=[null==n?void 0:n.currentOption])}return h.value&&(y.value=(_.body.items||[]).map((t=>{var n;const o={html_type:f[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!=(n=t.labelField)?n:"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("REMOTE_SEARCH"===o.html_type){if(o.componentProps={fallbackOption:!1},o.option=t.options||[],o.default_val=null,t.value&&u(t.options)&&t.options.length>0){t.options.find((e=>(null==e?void 0:e.value)===t.value))&&(o.default_val=t.value)}Object.assign(o.urlConfig,{url:"/flow/api/instruction/parameter/getOptionsValues",method:"post",params:{...e.selectParams,code:t.code,source:E.value?"inner":"global",configs:v.value.info||g.selectedPatient},dependKey:[]}),u(t.dependencies)&&t.dependencies.length&&(o.urlConfig.dependKey=t.dependencies)}return o}))),()=>{var t;return l("div",{class:"card"},[h.value?[l("p",null,[_.title||_.header.title]),l(r,{"request-instance":{get:b.get,post:b.post},column:12,ref:T,"field-list":y.value,onFormChange:M},null),_.footer.buttons.map((t=>function(t){const n={width:"100%","--n-height":"36px",fontSize:"15px",marginTop:"10px"},o=h.value?{...n,marginTop:"0"}:n;return l(i,{style:o,secondary:!0,class:"gradient",disabled:e.msgItem.disabled,onClick:async function(){if(h.value){if(!T.value)return;const e=T.value.getFormValues();try{await T.value.validate(),_.body.items.forEach((t=>{var n;e[t.code]&&(t.value=e[t.code]),(null==(n=C[t.code])?void 0:n[0])&&(t.options=C[t.code])})),g.loading=!0,m("button-click",{values:e,buttonInfo:t,isForm:!0})}catch(e){}}else m("button-click")}},{default:()=>[h.value?null==t?void 0:t.text:_.buttonName]})}(t)))]:l(d,{config:I(null==(t=_.settings)?void 0:t.setting)?JSON.parse(_.settings.setting):null,data:a(_,"data").value,"onModule-click":O,"onButton-click":x},null)])}}});export{c as default};