cnhis-design-vue 3.3.1-beta.17 → 3.3.1-beta.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +87 -87
- package/es/components/ai-chat/index.d.ts +59 -20
- package/es/components/ai-chat/src/Index.vue.d.ts +59 -20
- package/es/components/ai-chat/src/Index.vue2.js +1 -1
- package/es/components/ai-chat/src/api/index.d.ts +3 -0
- package/es/components/ai-chat/src/api/index.js +1 -1
- package/es/components/ai-chat/src/components/ChatAudio.vue.d.ts +5 -3
- package/es/components/ai-chat/src/components/ChatAudio.vue2.js +1 -1
- package/es/components/ai-chat/src/components/ChatBI.vue.d.ts +2 -2
- package/es/components/ai-chat/src/components/ChatBI.vue2.js +1 -1
- package/es/components/ai-chat/src/components/ChatCard.js +1 -1
- package/es/components/ai-chat/src/components/ChatFooter.vue.d.ts +19 -17
- package/es/components/ai-chat/src/components/ChatFooter.vue2.js +1 -1
- package/es/components/ai-chat/src/components/ChatMain.js +1 -1
- package/es/components/ai-chat/src/components/ChatMainDefault.js +1 -1
- package/es/components/ai-chat/src/components/ChatPatient.vue.d.ts +2 -2
- package/es/components/ai-chat/src/components/ChatPatient.vue2.js +1 -1
- package/es/components/ai-chat/src/components/ChatPrompt.vue.d.ts +2 -2
- package/es/components/ai-chat/src/components/ChatPrompt.vue2.js +1 -1
- package/es/components/ai-chat/src/components/ChatRight.vue.d.ts +4 -2
- package/es/components/ai-chat/src/components/ChatRight.vue2.js +1 -1
- package/es/components/ai-chat/src/components/card/JsonCard.js +1 -1
- package/es/components/ai-chat/src/hooks/index.d.ts +2 -0
- package/es/components/ai-chat/src/hooks/index.js +1 -0
- package/es/components/ai-chat/src/hooks/useData.d.ts +47 -0
- package/es/components/ai-chat/src/hooks/useData.js +1 -0
- package/es/components/ai-chat/src/hooks/useWebsocket.d.ts +2 -1
- package/es/components/ai-chat/src/hooks/useWebsocket.js +1 -1
- package/es/components/ai-chat/src/types/index.d.ts +1 -3
- package/es/components/ai-chat/src/types/index.js +1 -1
- package/es/components/ai-chat/style/index.css +1 -1
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
- package/es/components/card-render/src/components/index.d.ts +23 -23
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +0 -3
- package/es/components/form-render/src/hooks/useBusinessBinding.js +1 -1
- package/es/components/iho-chat/index.d.ts +69 -2
- package/es/components/iho-chat/src/Index.vue.d.ts +69 -2
- package/es/components/iho-chat/src/api/index.d.ts +1 -0
- package/es/components/iho-chat/src/api/index.js +1 -1
- package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +1 -0
- package/es/components/iho-chat/src/components/ChatAdd.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatFile.vue.d.ts +1 -0
- package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +1 -0
- package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +57 -0
- package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +1 -0
- package/es/components/iho-chat/src/components/ChatRecord.vue.d.ts +54 -0
- package/es/components/iho-chat/src/components/ChatRecord.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatSearch.vue.d.ts +8 -2
- package/es/components/iho-chat/src/components/ChatSearch.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatSet.vue.d.ts +1 -0
- package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +1 -0
- package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
- package/es/components/iho-chat/src/hooks/useSearchPatientList.d.ts +11 -0
- package/es/components/iho-chat/src/hooks/useSearchPatientList.js +1 -0
- package/es/components/iho-chat/style/index.css +1 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +1 -1
- package/es/components/index.css +1 -1
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/env.d.ts +25 -25
- package/es/shared/assets/img/ai__avatar.png.js +1 -1
- package/es/shared/assets/img/defaultCover/10review_successful.png.js +1 -1
- package/es/shared/assets/img/defaultCover/11review_fail.png.js +1 -1
- package/es/shared/assets/img/defaultCover/12no_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/13no_menu_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/14no_call_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/15no_use_tag.png.js +1 -1
- package/es/shared/assets/img/defaultCover/16no_table_data.png.js +1 -1
- package/es/shared/assets/img/defaultCover/1location.png.js +1 -1
- package/es/shared/assets/img/defaultCover/2notfound.png.js +1 -1
- package/es/shared/assets/img/defaultCover/3loading.png.js +1 -1
- package/es/shared/assets/img/defaultCover/4no_permission.png.js +1 -1
- package/es/shared/assets/img/defaultCover/5no_data.png.js +1 -1
- package/es/shared/assets/img/defaultCover/6no_network.png.js +1 -1
- package/es/shared/assets/img/defaultCover/7no_doctor.png.js +1 -1
- package/es/shared/assets/img/defaultCover/8system_error.png.js +1 -1
- package/es/shared/assets/img/defaultCover/9system_upgrade.png.js +1 -1
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/file-emr.png.js +1 -1
- package/es/shared/assets/img/file.png.js +1 -1
- package/es/shared/assets/img/logo.png.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/table_style_2.png.js +1 -1
- package/es/shared/assets/img/use.png.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
- package/es/shared/package.json.js +1 -1
- package/es/shared/utils/fabricjs/index.d.ts +6823 -0
- package/es/shared/utils/tapable/index.d.ts +139 -0
- package/package.json +3 -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
|
+
```
|
@@ -58,8 +58,11 @@ declare const AiChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
58
58
|
type: BooleanConstructor;
|
59
59
|
default: boolean;
|
60
60
|
};
|
61
|
+
isStreamingOutput: {
|
62
|
+
type: BooleanConstructor;
|
63
|
+
default: boolean;
|
64
|
+
};
|
61
65
|
}, {
|
62
|
-
cssVars: import("vue").ComputedRef<import("../../shared/types").AnyObject>;
|
63
66
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
64
67
|
token: {
|
65
68
|
type: StringConstructor;
|
@@ -119,27 +122,55 @@ declare const AiChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
119
122
|
type: BooleanConstructor;
|
120
123
|
default: boolean;
|
121
124
|
};
|
125
|
+
isStreamingOutput: {
|
126
|
+
type: BooleanConstructor;
|
127
|
+
default: boolean;
|
128
|
+
};
|
122
129
|
}>> & {
|
123
130
|
"onButton-click"?: ((...args: any[]) => any) | undefined;
|
124
131
|
onProgram?: ((...args: any[]) => any) | undefined;
|
125
132
|
}>>;
|
126
133
|
emit: (event: "button-click" | "program", ...args: any[]) => void;
|
134
|
+
data: {
|
135
|
+
patientInfo: import("vue").Ref<any>;
|
136
|
+
queryPrompt: import("vue").Ref<any>;
|
137
|
+
queryData: import("vue").Ref<any>;
|
138
|
+
queryRecord: import("vue").Ref<any>;
|
139
|
+
defaultShortcutList: import("vue").Ref<any>;
|
140
|
+
hideInput: import("vue").Ref<any>;
|
141
|
+
shortcutList: import("vue").Ref<any>;
|
142
|
+
audioTimed: import("vue").Ref<any>;
|
143
|
+
commandList: import("vue").Ref<any>;
|
144
|
+
appId: import("vue").Ref<any>;
|
145
|
+
immediatelyRecording: import("vue").Ref<any>;
|
146
|
+
cssVars: import("vue").ComputedRef<import("../../shared/types").AnyObject>;
|
147
|
+
state: import("../../shared/types").AnyObject;
|
148
|
+
isSmall: import("vue").ComputedRef<boolean>;
|
149
|
+
isDefault: import("vue").ComputedRef<boolean>;
|
150
|
+
vaa07: import("vue").ComputedRef<any>;
|
151
|
+
axiosInstance: import("axios").AxiosInstance;
|
152
|
+
emit: (event: "button-click" | "program", ...args: any[]) => void;
|
153
|
+
appendMessage: (item: import("../../shared/types").AnyObject) => Promise<void>;
|
154
|
+
sendMessage: (params?: import("../../shared/types").AnyObject) => Promise<void>;
|
155
|
+
};
|
156
|
+
cssVars: import("vue").ComputedRef<import("../../shared/types").AnyObject>;
|
127
157
|
state: import("../../shared/types").AnyObject;
|
128
158
|
onClose: () => void;
|
129
159
|
NIcon: any;
|
130
160
|
NButton: any;
|
131
161
|
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<{}>>, {}>;
|
132
162
|
ChatFooter: import("vue").DefineComponent<{}, {
|
133
|
-
cssVars: import("vue").ComputedRef<import("../../shared/types").AnyObject>;
|
134
163
|
audioSdk: import("..").CAudioSDK;
|
135
|
-
|
136
|
-
shortcutList: any
|
137
|
-
state:
|
138
|
-
isSmall:
|
139
|
-
audioTimed: any
|
140
|
-
commandList: any
|
141
|
-
isDefault:
|
142
|
-
patientInfo: any
|
164
|
+
cssVars: import("vue").ComputedRef<import("../../shared/types").AnyObject>;
|
165
|
+
shortcutList: import("vue").Ref<any>;
|
166
|
+
state: import("../../shared/types").AnyObject;
|
167
|
+
isSmall: import("vue").ComputedRef<boolean>;
|
168
|
+
audioTimed: import("vue").Ref<any>;
|
169
|
+
commandList: import("vue").Ref<any>;
|
170
|
+
isDefault: import("vue").ComputedRef<boolean>;
|
171
|
+
patientInfo: import("vue").Ref<any>;
|
172
|
+
emit: (event: "button-click" | "program", ...args: any[]) => void;
|
173
|
+
sendMessage: (params?: import("../../shared/types").AnyObject) => Promise<void>;
|
143
174
|
inputRef: import("vue").Ref<any>;
|
144
175
|
showPopover: import("vue").Ref<boolean>;
|
145
176
|
breadcrumb: import("vue").Ref<{
|
@@ -161,7 +192,7 @@ declare const AiChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
161
192
|
showPatient: import("vue").Ref<boolean>;
|
162
193
|
showAudio: import("vue").Ref<boolean>;
|
163
194
|
placeholder: import("vue").ComputedRef<"请向我提问,Shift+Enter换行" | "请向我提问或输入\"/\"查看指令" | "请向我提问或输入\"/\"查看指令,Shift+Enter换行">;
|
164
|
-
isAllDisabled: import("vue").ComputedRef<
|
195
|
+
isAllDisabled: import("vue").ComputedRef<boolean>;
|
165
196
|
btnDisabled: import("vue").ComputedRef<any>;
|
166
197
|
showMagicWand: import("vue").ComputedRef<boolean>;
|
167
198
|
patient: import("vue").ComputedRef<string>;
|
@@ -210,8 +241,8 @@ declare const AiChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
210
241
|
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
211
242
|
}>>;
|
212
243
|
emit: (event: "update:show", ...args: any[]) => void;
|
213
|
-
|
214
|
-
|
244
|
+
state: import("../../shared/types").AnyObject;
|
245
|
+
queryPrompt: import("vue").Ref<any>;
|
215
246
|
listRef: import("vue").Ref<any>;
|
216
247
|
keyword: import("vue").Ref<string>;
|
217
248
|
list: import("vue").Ref<import("../../shared/types").AnyObject[]>;
|
@@ -249,8 +280,8 @@ declare const AiChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
249
280
|
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
250
281
|
}>>;
|
251
282
|
emit: (event: "update:show", ...args: any[]) => void;
|
252
|
-
|
253
|
-
|
283
|
+
state: import("../../shared/types").AnyObject;
|
284
|
+
patientInfo: import("vue").Ref<any>;
|
254
285
|
formValue: {
|
255
286
|
businessType: string;
|
256
287
|
vaa01: null;
|
@@ -306,9 +337,10 @@ declare const AiChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
306
337
|
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
307
338
|
}>>;
|
308
339
|
emit: (event: "update:show", ...args: any[]) => void;
|
309
|
-
state:
|
310
|
-
vaa07: any
|
311
|
-
immediatelyRecording: any
|
340
|
+
state: import("../../shared/types").AnyObject;
|
341
|
+
vaa07: import("vue").ComputedRef<any>;
|
342
|
+
immediatelyRecording: import("vue").Ref<any>;
|
343
|
+
sendMessage: (params?: import("../../shared/types").AnyObject) => Promise<void>;
|
312
344
|
time: import("vue").Ref<number>;
|
313
345
|
endType: string;
|
314
346
|
pause: import("@vueuse/shared").Fn;
|
@@ -339,13 +371,15 @@ declare const AiChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
339
371
|
key: string;
|
340
372
|
title: string;
|
341
373
|
}[];
|
342
|
-
state:
|
343
|
-
patientInfo: any
|
374
|
+
state: import("../../shared/types").AnyObject;
|
375
|
+
patientInfo: import("vue").Ref<any>;
|
376
|
+
sendMessage: (params?: import("../../shared/types").AnyObject) => Promise<void>;
|
344
377
|
toolbarConfig: {
|
345
378
|
toolbarKeys: never[];
|
346
379
|
};
|
347
380
|
content: import("vue").Ref<string>;
|
348
381
|
handleSave: () => Promise<void>;
|
382
|
+
handleDelete: () => Promise<void>;
|
349
383
|
createMedicalRecord: () => void;
|
350
384
|
extractContentByTitle: () => import("../../shared/types").AnyObject;
|
351
385
|
NSpace: any;
|
@@ -446,6 +480,10 @@ declare const AiChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
446
480
|
type: BooleanConstructor;
|
447
481
|
default: boolean;
|
448
482
|
};
|
483
|
+
isStreamingOutput: {
|
484
|
+
type: BooleanConstructor;
|
485
|
+
default: boolean;
|
486
|
+
};
|
449
487
|
}>> & {
|
450
488
|
"onButton-click"?: ((...args: any[]) => any) | undefined;
|
451
489
|
onProgram?: ((...args: any[]) => any) | undefined;
|
@@ -454,5 +492,6 @@ declare const AiChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
454
492
|
uiStyle: string;
|
455
493
|
audioTimed: number;
|
456
494
|
immediatelyRecording: boolean;
|
495
|
+
isStreamingOutput: boolean;
|
457
496
|
}>>;
|
458
497
|
export default AiChat;
|
@@ -60,8 +60,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
60
60
|
type: BooleanConstructor;
|
61
61
|
default: boolean;
|
62
62
|
};
|
63
|
+
isStreamingOutput: {
|
64
|
+
type: BooleanConstructor;
|
65
|
+
default: boolean;
|
66
|
+
};
|
63
67
|
}, {
|
64
|
-
cssVars: import("vue").ComputedRef<AnyObject>;
|
65
68
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
66
69
|
token: {
|
67
70
|
type: StringConstructor;
|
@@ -121,27 +124,55 @@ declare const _default: import("vue").DefineComponent<{
|
|
121
124
|
type: BooleanConstructor;
|
122
125
|
default: boolean;
|
123
126
|
};
|
127
|
+
isStreamingOutput: {
|
128
|
+
type: BooleanConstructor;
|
129
|
+
default: boolean;
|
130
|
+
};
|
124
131
|
}>> & {
|
125
132
|
"onButton-click"?: ((...args: any[]) => any) | undefined;
|
126
133
|
onProgram?: ((...args: any[]) => any) | undefined;
|
127
134
|
}>>;
|
128
135
|
emit: (event: "button-click" | "program", ...args: any[]) => void;
|
136
|
+
data: {
|
137
|
+
patientInfo: import("vue").Ref<any>;
|
138
|
+
queryPrompt: import("vue").Ref<any>;
|
139
|
+
queryData: import("vue").Ref<any>;
|
140
|
+
queryRecord: import("vue").Ref<any>;
|
141
|
+
defaultShortcutList: import("vue").Ref<any>;
|
142
|
+
hideInput: import("vue").Ref<any>;
|
143
|
+
shortcutList: import("vue").Ref<any>;
|
144
|
+
audioTimed: import("vue").Ref<any>;
|
145
|
+
commandList: import("vue").Ref<any>;
|
146
|
+
appId: import("vue").Ref<any>;
|
147
|
+
immediatelyRecording: import("vue").Ref<any>;
|
148
|
+
cssVars: import("vue").ComputedRef<AnyObject>;
|
149
|
+
state: AnyObject;
|
150
|
+
isSmall: import("vue").ComputedRef<boolean>;
|
151
|
+
isDefault: import("vue").ComputedRef<boolean>;
|
152
|
+
vaa07: import("vue").ComputedRef<any>;
|
153
|
+
axiosInstance: import("axios").AxiosInstance;
|
154
|
+
emit: (event: "button-click" | "program", ...args: any[]) => void;
|
155
|
+
appendMessage: (item: AnyObject) => Promise<void>;
|
156
|
+
sendMessage: (params?: AnyObject) => Promise<void>;
|
157
|
+
};
|
158
|
+
cssVars: import("vue").ComputedRef<AnyObject>;
|
129
159
|
state: AnyObject;
|
130
160
|
onClose: () => void;
|
131
161
|
NIcon: any;
|
132
162
|
NButton: any;
|
133
163
|
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<{}>>, {}>;
|
134
164
|
ChatFooter: import("vue").DefineComponent<{}, {
|
135
|
-
cssVars: import("vue").ComputedRef<AnyObject>;
|
136
165
|
audioSdk: import("../..").CAudioSDK;
|
137
|
-
|
138
|
-
shortcutList: any
|
139
|
-
state:
|
140
|
-
isSmall:
|
141
|
-
audioTimed: any
|
142
|
-
commandList: any
|
143
|
-
isDefault:
|
144
|
-
patientInfo: any
|
166
|
+
cssVars: import("vue").ComputedRef<AnyObject>;
|
167
|
+
shortcutList: import("vue").Ref<any>;
|
168
|
+
state: AnyObject;
|
169
|
+
isSmall: import("vue").ComputedRef<boolean>;
|
170
|
+
audioTimed: import("vue").Ref<any>;
|
171
|
+
commandList: import("vue").Ref<any>;
|
172
|
+
isDefault: import("vue").ComputedRef<boolean>;
|
173
|
+
patientInfo: import("vue").Ref<any>;
|
174
|
+
emit: (event: "button-click" | "program", ...args: any[]) => void;
|
175
|
+
sendMessage: (params?: AnyObject) => Promise<void>;
|
145
176
|
inputRef: import("vue").Ref<any>;
|
146
177
|
showPopover: import("vue").Ref<boolean>;
|
147
178
|
breadcrumb: import("vue").Ref<{
|
@@ -163,7 +194,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
163
194
|
showPatient: import("vue").Ref<boolean>;
|
164
195
|
showAudio: import("vue").Ref<boolean>;
|
165
196
|
placeholder: import("vue").ComputedRef<"请向我提问,Shift+Enter换行" | "请向我提问或输入\"/\"查看指令" | "请向我提问或输入\"/\"查看指令,Shift+Enter换行">;
|
166
|
-
isAllDisabled: import("vue").ComputedRef<
|
197
|
+
isAllDisabled: import("vue").ComputedRef<boolean>;
|
167
198
|
btnDisabled: import("vue").ComputedRef<any>;
|
168
199
|
showMagicWand: import("vue").ComputedRef<boolean>;
|
169
200
|
patient: import("vue").ComputedRef<string>;
|
@@ -212,8 +243,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
212
243
|
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
213
244
|
}>>;
|
214
245
|
emit: (event: "update:show", ...args: any[]) => void;
|
215
|
-
|
216
|
-
|
246
|
+
state: AnyObject;
|
247
|
+
queryPrompt: import("vue").Ref<any>;
|
217
248
|
listRef: import("vue").Ref<any>;
|
218
249
|
keyword: import("vue").Ref<string>;
|
219
250
|
list: import("vue").Ref<AnyObject[]>;
|
@@ -251,8 +282,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
251
282
|
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
252
283
|
}>>;
|
253
284
|
emit: (event: "update:show", ...args: any[]) => void;
|
254
|
-
|
255
|
-
|
285
|
+
state: AnyObject;
|
286
|
+
patientInfo: import("vue").Ref<any>;
|
256
287
|
formValue: {
|
257
288
|
businessType: string;
|
258
289
|
vaa01: null;
|
@@ -308,9 +339,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
308
339
|
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
309
340
|
}>>;
|
310
341
|
emit: (event: "update:show", ...args: any[]) => void;
|
311
|
-
state:
|
312
|
-
vaa07: any
|
313
|
-
immediatelyRecording: any
|
342
|
+
state: AnyObject;
|
343
|
+
vaa07: import("vue").ComputedRef<any>;
|
344
|
+
immediatelyRecording: import("vue").Ref<any>;
|
345
|
+
sendMessage: (params?: AnyObject) => Promise<void>;
|
314
346
|
time: import("vue").Ref<number>;
|
315
347
|
endType: string;
|
316
348
|
pause: import("@vueuse/shared").Fn;
|
@@ -341,13 +373,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
341
373
|
key: string;
|
342
374
|
title: string;
|
343
375
|
}[];
|
344
|
-
state:
|
345
|
-
patientInfo: any
|
376
|
+
state: AnyObject;
|
377
|
+
patientInfo: import("vue").Ref<any>;
|
378
|
+
sendMessage: (params?: AnyObject) => Promise<void>;
|
346
379
|
toolbarConfig: {
|
347
380
|
toolbarKeys: never[];
|
348
381
|
};
|
349
382
|
content: import("vue").Ref<string>;
|
350
383
|
handleSave: () => Promise<void>;
|
384
|
+
handleDelete: () => Promise<void>;
|
351
385
|
createMedicalRecord: () => void;
|
352
386
|
extractContentByTitle: () => AnyObject;
|
353
387
|
NSpace: any;
|
@@ -448,6 +482,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
448
482
|
type: BooleanConstructor;
|
449
483
|
default: boolean;
|
450
484
|
};
|
485
|
+
isStreamingOutput: {
|
486
|
+
type: BooleanConstructor;
|
487
|
+
default: boolean;
|
488
|
+
};
|
451
489
|
}>> & {
|
452
490
|
"onButton-click"?: ((...args: any[]) => any) | undefined;
|
453
491
|
onProgram?: ((...args: any[]) => any) | undefined;
|
@@ -456,5 +494,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
456
494
|
uiStyle: string;
|
457
495
|
audioTimed: number;
|
458
496
|
immediatelyRecording: boolean;
|
497
|
+
isStreamingOutput: boolean;
|
459
498
|
}>;
|
460
499
|
export default _default;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as t,
|
1
|
+
import{defineComponent as t,provide as e,openBlock as o,createElementBlock as i,normalizeStyle as a,unref as s,normalizeClass as r,createElementVNode as n,createBlock as p,createCommentVNode as l,withDirectives as u,vShow as h,createVNode as c,withCtx as m,renderSlot as d}from"vue";import{NButton as y,NIcon as f}from"naive-ui";import g from"./components/ChatMain.js";import S from"./components/ChatFooter.vue.js";import v from"./components/ChatRight.vue.js";import R from"./components/ChatMainDefault.js";import{CloseOutline as w}from"@vicons/ionicons5";import{initData as k,InjectionAIChatData as I}from"./hooks/useData.js";import{useWebsocket as j}from"./hooks/useWebsocket.js";const q=["id"],C={class:"chat-right-wrapper"},b={class:"header"},x={class:"content"},A={class:"slot-wrapper"};var D=t({__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:"default"},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},isStreamingOutput:{type:Boolean,default:!1}},emits:["button-click","program"],setup(t,{expose:D,emit:F}){const M=t,B=k(M,F);e(I,B);const{cssVars:L,state:P}=B;function _(){P.showRight=!1,P.showRightSlot=!1}return"default"===M.uiStyle&&j(M,B),D({pushMessage:t=>{P.externalData=t},updatePatientInfo:t=>{P.selectedPatient=t},showRight(t){P.showRight=!1,P.showRightSlot=t}}),(e,k)=>(o(),i("div",{style:a(s(L)),class:r(["ai-chat","small"===t.uiStyle?"ai-chat--small":""])},[n("div",{id:s(P).id,class:"chat-left-wrapper"},["default"===t.uiStyle?(o(),p(s(R),{key:0,ref:"chatMainRef"},null,512)):(o(),p(s(g),{key:1})),t.hideInput?l("v-if",!0):(o(),p(S,{key:2}))],8,q),u(n("div",C,[n("div",b,[u(n("h4",null,"问诊记录",512),[[h,s(P).showRight]]),c(s(y),{quaternary:"",onClick:_},{icon:m((()=>[c(s(f),{size:"20",component:s(w)},null,8,["component"])])),_:1})]),n("div",x,[u(c(v,null,null,512),[[h,s(P).showRight]]),u(n("div",A,[d(e.$slots,"chat-right")],512),[[h,s(P).showRightSlot]])])],512),[[h,s(P).showRight||s(P).showRightSlot]])],6))}});export{D as default};
|
@@ -2,4 +2,7 @@ import { AnyObject } from '../../../../shared/types';
|
|
2
2
|
export declare const axiosInstance: import("axios").AxiosInstance;
|
3
3
|
export declare function conversationApi(params: AnyObject): import("axios").AxiosPromise<any>;
|
4
4
|
export declare function saveApi(params: AnyObject): import("axios").AxiosPromise<any>;
|
5
|
+
export declare function deleteApi(params: AnyObject): import("axios").AxiosPromise<any>;
|
5
6
|
export declare function getHistoryRecordApi(params: AnyObject): import("axios").AxiosPromise<any>;
|
7
|
+
export declare function conversationStreamApi(params: AnyObject): import("axios").AxiosPromise<any>;
|
8
|
+
export declare function getSessionMsgApi(params: AnyObject): import("axios").AxiosPromise<any>;
|
@@ -1 +1 @@
|
|
1
|
-
import e from"axios";import{$message as t}from"../utils/index.js";const o=e.create({withCredentials:!0,timeout:5e3});function s(e){return o({method:"post",url:"/flow/api/opd/conversation",data:e})}function a(e){return o({method:"put",url:"/flow/api/opd/message",data:e})}function r(e){return o({method:"get",url:`/flow/api/dialog/${e.sessionId}/messages`,params:{page:e.page||1,pageSize:e.pageSize||20}})}o.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})),o.interceptors.response.use((e=>{var o,s,a,r
|
1
|
+
import e from"axios";import{$message as t}from"../utils/index.js";const o=e.create({withCredentials:!0,timeout:5e3});function s(e){return o({method:"post",url:"/flow/api/opd/conversation",data:e})}function a(e){return o({method:"put",url:"/flow/api/opd/message",data:e})}function n(e){return o({method:"delete",url:`/flow/api/opd/message/${e.messageId}`})}function r(e){return o({method:"get",url:`/flow/api/dialog/${e.sessionId}/messages`,params:{page:e.page||1,pageSize:e.pageSize||20}})}function i(e){return o({method:"post",url:"/flow/ai/api/conversation",data:e})}function u(e){return o({method:"get",url:"/flow/ai/api/sessionMsg",params:{sessionId:e.sessionId}})}o.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})),o.interceptors.response.use((e=>{var o,s,a,n,r;return(null==(o=e.config.url)?void 0:o.includes("/options"))?(null==(s=e.data)?void 0:s.success)?e.data:{success:!1,data:[]}:(null==(a=e.data)?void 0:a.success)?null==(n=e.data)?void 0:n.data:void(!(null==(r=e.data)?void 0:r.success)&&e.data.msg?t.error(e.data.msg):console.log("请求错误"))}));export{o as axiosInstance,s as conversationApi,i as conversationStreamApi,n as deleteApi,r as getHistoryRecordApi,u as getSessionMsgApi,a as saveApi};
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { AnyObject } from '../../../../shared/types';
|
1
2
|
import { CAudioSDK } from '../../../../components/audio-sdk';
|
2
3
|
declare const _default: import("vue").DefineComponent<{
|
3
4
|
show: {
|
@@ -13,9 +14,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
13
14
|
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
14
15
|
}>>;
|
15
16
|
emit: (event: "update:show", ...args: any[]) => void;
|
16
|
-
state:
|
17
|
-
vaa07: any
|
18
|
-
immediatelyRecording: any
|
17
|
+
state: AnyObject;
|
18
|
+
vaa07: import("vue").ComputedRef<any>;
|
19
|
+
immediatelyRecording: import("vue").Ref<any>;
|
20
|
+
sendMessage: (params?: AnyObject) => Promise<void>;
|
19
21
|
time: import("vue").Ref<number>;
|
20
22
|
endType: string;
|
21
23
|
pause: import("@vueuse/shared").Fn;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as o,
|
1
|
+
import{defineComponent as o,ref as t,computed as e,watch as a,onBeforeUnmount as i,withDirectives as n,openBlock as s,createElementBlock as r,unref as u,createBlock as l,createCommentVNode as c,createElementVNode as d,toDisplayString as m,normalizeStyle as p,createVNode as f,withCtx as v,createTextVNode as w,vShow as h}from"vue";import{NIcon as g,NSpace as y,NButton as k}from"naive-ui";import{StopCircleOutline as S}from"@vicons/ionicons5";import{useIntervalFn as _,promiseTimeout as C}from"@vueuse/core";import"../../../audio-sdk/index.js";import{$message as F}from"../utils/index.js";import{useData as $}from"../hooks/useData.js";import j from"../../../audio-sdk/src/audioSDK.js";const x={class:"ai-chat-audio"};var M=o({__name:"ChatAudio",props:{show:{type:Boolean}},emits:["update:show"],setup(o,{emit:M}){const T=o,z=j.create(),{state:A,vaa07:B,immediatelyRecording:D,sendMessage:R}=$(),q=t(0);let K="";const{pause:L,resume:b,isActive:E}=_((()=>{q.value++}),1e3,{immediate:!1}),G=e((()=>E.value?"正在录音中...":"录音已暂停")),H=e((()=>{const o=Math.floor(q.value/3600),t=Math.floor(q.value%3600/60),e=q.value%60,a=t.toString().padStart(2,"0"),i=e.toString().padStart(2,"0");if(o>0){return`${o.toString().padStart(2,"0")}:${a}:${i}`}return`${a}:${i}`}));function I(){L(),z.pause()}function J(){b(),z.resume()}async function N(o){K=o||"",null==z||z.stop(),M("update:show",!1)}return a((()=>T.show),(o=>{o?(K="",q.value=0,b(),async function(){try{const o=await z.start({timed:1800,showModal:!1,realTimeRecognition:!1});if(M("update:show",!1),"click"!==K)return;const{result:t,data:e}=o||{};if("success"!==t)return;e&&(A.sendContent=e,A.loadingText="系统正在对您的对话内容进行梳理整合,转化为规范的结构化问诊记录",R({opType:"create_inquiry"}))}catch(o){console.log(o),M("update:show",!1),"fail"===(null==o?void 0:o.result)&&o.msg&&F.warning(o.msg)}}()):L()}),{immediate:!0}),a((()=>B.value),(async o=>{const t=T.show;T.show&&N(),D.value&&(t&&await C(10),M("update:show",!0))}),{immediate:!0}),i((()=>{j.destroy()})),(t,e)=>n((s(),r("div",x,[u(E)?c("v-if",!0):(s(),l(u(g),{key:0,size:"42",color:"#FF1818",component:u(S)},null,8,["component"])),d("p",null,m(u(G)),1),d("h3",{style:p(u(E)?"":"color: #FF1818")},m(u(H)),5),f(u(y),{"wrap-item":!1,size:15},{default:v((()=>[n(f(u(k),{round:"",onClick:I},{default:v((()=>[w("暂停")])),_:1},512),[[h,u(E)]]),n(f(u(k),{round:"",onClick:J},{default:v((()=>[w("继续")])),_:1},512),[[h,!u(E)]]),f(u(k),{round:"",color:"#FF1818",onClick:e[0]||(e[0]=()=>N("click"))},{default:v((()=>{var o;return[w((null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.77"))||"结束")]})),_:1})])),_:1})],512)),[[h,o.show]])}});export{M as default};
|
@@ -18,9 +18,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
18
18
|
}>> & {
|
19
19
|
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
20
20
|
}>>;
|
21
|
-
emit: (event: string, ...args: any[]) => void;
|
22
21
|
_emit: (event: "update:show", ...args: any[]) => void;
|
23
|
-
state:
|
22
|
+
state: AnyObject;
|
23
|
+
emit: (event: "button-click" | "program", ...args: any[]) => void;
|
24
24
|
templateProps: import("vue").ComputedRef<{
|
25
25
|
config: any;
|
26
26
|
data: any;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as t,
|
1
|
+
import{defineComponent as t,computed as o,openBlock as e,createBlock as a,unref as n,withCtx as s,createVNode as i,mergeProps as r,createCommentVNode as u}from"vue";import{NDrawer as d,NDrawerContent as l}from"naive-ui";import"../../../index.js";import{isValidJSON as m}from"../utils/index.js";import{useData as p}from"../hooks/useData.js";import c from"../../../card-render/index.js";var f=t({__name:"ChatBI",props:{show:{type:Boolean},data:{type:Object}},emits:["update:show"],setup(t,{emit:f}){const h=t,{state:v,emit:g}=p(),w=o((()=>{var t,o,e;const{content:a={}}=(null==(t=h.data)?void 0:t.msgItem)||{};return{config:m(null==(o=a.settings)?void 0:o.setting)?JSON.parse(null==(e=a.settings)?void 0:e.setting):null,data:a.data}}));function k(t){const{eventName:o,data:e}=t;f("update:show",!1),o&&g("button-click",{buttonInfo:e,isBI:!0,...h.data})}return(o,m)=>(e(),a(n(d),{placement:"bottom",height:"80%","trap-focus":!1,to:"#"+n(v).id,show:t.show,onMaskClick:m[0]||(m[0]=()=>f("update:show",!1))},{default:s((()=>[i(n(l),null,{default:s((()=>[t.data?(e(),a(n(c),r({key:0},n(w),{onModuleClick:k}),null,16)):u("v-if",!0)])),_:1})])),_:1},8,["to","show"]))}});export{f as default};
|