cnhis-design-vue 3.2.13-beta.0 → 3.2.13-beta.10

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 (33) hide show
  1. package/es/components/ai-chat/index.d.ts +76 -3
  2. package/es/components/ai-chat/src/Index.vue.d.ts +76 -3
  3. package/es/components/ai-chat/src/Index.vue2.js +1 -1
  4. package/es/components/ai-chat/src/components/ChatCard.js +1 -1
  5. package/es/components/ai-chat/src/components/ChatFooter.vue.d.ts +58 -0
  6. package/es/components/ai-chat/src/components/ChatFooter.vue2.js +1 -1
  7. package/es/components/ai-chat/src/components/ChatPatient.vue.d.ts +58 -0
  8. package/es/components/ai-chat/src/components/ChatPatient.vue.js +1 -0
  9. package/es/components/ai-chat/src/components/ChatPatient.vue2.js +1 -0
  10. package/es/components/ai-chat/src/types/index.d.ts +2 -2
  11. package/es/components/ai-chat/style/index.css +1 -1
  12. package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
  13. package/es/components/button-print/src/utils/print.js +1 -1
  14. package/es/components/callback/src/components/render/popupMaps.d.ts +8 -6
  15. package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
  16. package/es/components/fabric-chart/src/hooks/useCommon.js +1 -1
  17. package/es/components/iho-table/index.d.ts +8 -6
  18. package/es/components/iho-table/src/IhoTable.vue.d.ts +8 -6
  19. package/es/components/iho-table/src/IhoTable.vue2.js +1 -1
  20. package/es/components/iho-table/src/plugins/crossHeaderPlugin.js +1 -1
  21. package/es/components/iho-table/src/plugins/headerPlugin/index.js +1 -1
  22. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -1
  23. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js +1 -1
  24. package/es/components/iho-table/src/types/index.d.ts +3 -2
  25. package/es/components/iho-table/style/index.css +1 -1
  26. package/es/components/index.css +1 -1
  27. package/es/components/template-render/src/components/Button.vue.d.ts +1 -0
  28. package/es/components/template-render/src/components/Button.vue2.js +1 -1
  29. package/es/components/template-render/src/components/Field.vue.d.ts +1 -1
  30. package/es/components/template-render/src/components/Field.vue2.js +1 -1
  31. package/es/components/template-render/src/components/index.d.ts +3 -2
  32. package/es/shared/package.json.js +1 -1
  33. package/package.json +2 -2
@@ -34,7 +34,12 @@ declare const AiChat: SFCWithInstall<import("vue").DefineComponent<{
34
34
  type: import("vue").PropType<import("./src/types").QueryPrompt>;
35
35
  };
36
36
  patientInfo: {
37
- type: import("vue").PropType<import("../../shared/types").AnyObject>;
37
+ type: import("vue").PropType<Partial<{
38
+ info: import("../../shared/types").AnyObject;
39
+ queryPatient: (props: {
40
+ keyword: string;
41
+ }) => Promise<import("../../shared/types").AnyObject[]>;
42
+ }>>;
38
43
  };
39
44
  }, {
40
45
  cssVars: import("vue").ComputedRef<import("../../shared/types").AnyObject>;
@@ -73,7 +78,12 @@ declare const AiChat: SFCWithInstall<import("vue").DefineComponent<{
73
78
  type: import("vue").PropType<import("./src/types").QueryPrompt>;
74
79
  };
75
80
  patientInfo: {
76
- type: import("vue").PropType<import("../../shared/types").AnyObject>;
81
+ type: import("vue").PropType<Partial<{
82
+ info: import("../../shared/types").AnyObject;
83
+ queryPatient: (props: {
84
+ keyword: string;
85
+ }) => Promise<import("../../shared/types").AnyObject[]>;
86
+ }>>;
77
87
  };
78
88
  }>> & {
79
89
  "onButton-click"?: ((...args: any[]) => any) | undefined;
@@ -115,8 +125,10 @@ declare const AiChat: SFCWithInstall<import("vue").DefineComponent<{
115
125
  }[]>;
116
126
  showPrompt: import("vue").Ref<boolean>;
117
127
  currentShortcutId: import("vue").Ref<string>;
128
+ showPatient: import("vue").Ref<boolean>;
118
129
  btnDisabled: import("vue").ComputedRef<boolean>;
119
130
  showMagicWand: import("vue").ComputedRef<boolean>;
131
+ patient: import("vue").ComputedRef<string>;
120
132
  recorderStart: () => Promise<void>;
121
133
  isValidJSON: (str: string) => boolean;
122
134
  getShortcutName: (item: string | import("../../shared/types").AnyObject) => any;
@@ -139,6 +151,7 @@ declare const AiChat: SFCWithInstall<import("vue").DefineComponent<{
139
151
  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
152
  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
153
  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<{}>>, {}>;
154
+ 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
155
  ChatPrompt: import("vue").DefineComponent<{
143
156
  show: {
144
157
  type: BooleanConstructor;
@@ -182,6 +195,61 @@ declare const AiChat: SFCWithInstall<import("vue").DefineComponent<{
182
195
  }, {
183
196
  show: boolean;
184
197
  }>;
198
+ ChatPatient: import("vue").DefineComponent<{
199
+ show: {
200
+ type: BooleanConstructor;
201
+ };
202
+ }, {
203
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
204
+ show: {
205
+ type: BooleanConstructor;
206
+ };
207
+ }>> & {
208
+ "onUpdate:show"?: ((...args: any[]) => any) | undefined;
209
+ }>>;
210
+ emit: (event: "update:show", ...args: any[]) => void;
211
+ patientInfo: any;
212
+ state: any;
213
+ formValue: {
214
+ businessType: null;
215
+ vaa01: null;
216
+ vaa07: string;
217
+ };
218
+ rules: {
219
+ businessType: {
220
+ required: boolean;
221
+ trigger: string;
222
+ message: string;
223
+ };
224
+ vaa01: {
225
+ required: boolean;
226
+ trigger: string[];
227
+ message: string;
228
+ };
229
+ };
230
+ options: import("vue").Ref<import("../../shared/types").AnyObject[]>;
231
+ formRef: import("vue").Ref<any>;
232
+ renderLabel: (option: import("../../shared/types").AnyObject) => string;
233
+ handleUpdateValue: (value: string, option: import("naive-ui").SelectOption) => void;
234
+ handleSearch: (keyword: string) => Promise<void>;
235
+ handleValidateClick: (e: MouseEvent) => void;
236
+ NDrawer: any;
237
+ NDrawerContent: any;
238
+ NForm: any;
239
+ NFormItem: any;
240
+ NButton: any;
241
+ NRadioGroup: any;
242
+ NRadio: any;
243
+ NSelect: any;
244
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:show"[], "update:show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
245
+ show: {
246
+ type: BooleanConstructor;
247
+ };
248
+ }>> & {
249
+ "onUpdate:show"?: ((...args: any[]) => any) | undefined;
250
+ }, {
251
+ show: boolean;
252
+ }>;
185
253
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
186
254
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "button-click"[], "button-click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
187
255
  userAvatar: {
@@ -218,7 +286,12 @@ declare const AiChat: SFCWithInstall<import("vue").DefineComponent<{
218
286
  type: import("vue").PropType<import("./src/types").QueryPrompt>;
219
287
  };
220
288
  patientInfo: {
221
- type: import("vue").PropType<import("../../shared/types").AnyObject>;
289
+ type: import("vue").PropType<Partial<{
290
+ info: import("../../shared/types").AnyObject;
291
+ queryPatient: (props: {
292
+ keyword: string;
293
+ }) => Promise<import("../../shared/types").AnyObject[]>;
294
+ }>>;
222
295
  };
223
296
  }>> & {
224
297
  "onButton-click"?: ((...args: any[]) => any) | undefined;
@@ -36,7 +36,12 @@ declare const _default: import("vue").DefineComponent<{
36
36
  type: PropType<QueryPrompt>;
37
37
  };
38
38
  patientInfo: {
39
- type: PropType<AnyObject>;
39
+ type: PropType<Partial<{
40
+ info: AnyObject;
41
+ queryPatient: (props: {
42
+ keyword: string;
43
+ }) => Promise<AnyObject[]>;
44
+ }>>;
40
45
  };
41
46
  }, {
42
47
  cssVars: import("vue").ComputedRef<AnyObject>;
@@ -75,7 +80,12 @@ declare const _default: import("vue").DefineComponent<{
75
80
  type: PropType<QueryPrompt>;
76
81
  };
77
82
  patientInfo: {
78
- type: PropType<AnyObject>;
83
+ type: PropType<Partial<{
84
+ info: AnyObject;
85
+ queryPatient: (props: {
86
+ keyword: string;
87
+ }) => Promise<AnyObject[]>;
88
+ }>>;
79
89
  };
80
90
  }>> & {
81
91
  "onButton-click"?: ((...args: any[]) => any) | undefined;
@@ -117,8 +127,10 @@ declare const _default: import("vue").DefineComponent<{
117
127
  }[]>;
118
128
  showPrompt: import("vue").Ref<boolean>;
119
129
  currentShortcutId: import("vue").Ref<string>;
130
+ showPatient: import("vue").Ref<boolean>;
120
131
  btnDisabled: import("vue").ComputedRef<boolean>;
121
132
  showMagicWand: import("vue").ComputedRef<boolean>;
133
+ patient: import("vue").ComputedRef<string>;
122
134
  recorderStart: () => Promise<void>;
123
135
  isValidJSON: (str: string) => boolean;
124
136
  getShortcutName: (item: string | AnyObject) => any;
@@ -141,6 +153,7 @@ declare const _default: import("vue").DefineComponent<{
141
153
  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
154
  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
155
  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<{}>>, {}>;
156
+ 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
157
  ChatPrompt: import("vue").DefineComponent<{
145
158
  show: {
146
159
  type: BooleanConstructor;
@@ -184,6 +197,61 @@ declare const _default: import("vue").DefineComponent<{
184
197
  }, {
185
198
  show: boolean;
186
199
  }>;
200
+ ChatPatient: import("vue").DefineComponent<{
201
+ show: {
202
+ type: BooleanConstructor;
203
+ };
204
+ }, {
205
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
206
+ show: {
207
+ type: BooleanConstructor;
208
+ };
209
+ }>> & {
210
+ "onUpdate:show"?: ((...args: any[]) => any) | undefined;
211
+ }>>;
212
+ emit: (event: "update:show", ...args: any[]) => void;
213
+ patientInfo: any;
214
+ state: any;
215
+ formValue: {
216
+ businessType: null;
217
+ vaa01: null;
218
+ vaa07: string;
219
+ };
220
+ rules: {
221
+ businessType: {
222
+ required: boolean;
223
+ trigger: string;
224
+ message: string;
225
+ };
226
+ vaa01: {
227
+ required: boolean;
228
+ trigger: string[];
229
+ message: string;
230
+ };
231
+ };
232
+ options: import("vue").Ref<AnyObject[]>;
233
+ formRef: import("vue").Ref<any>;
234
+ renderLabel: (option: AnyObject) => string;
235
+ handleUpdateValue: (value: string, option: import("naive-ui").SelectOption) => void;
236
+ handleSearch: (keyword: string) => Promise<void>;
237
+ handleValidateClick: (e: MouseEvent) => void;
238
+ NDrawer: any;
239
+ NDrawerContent: any;
240
+ NForm: any;
241
+ NFormItem: any;
242
+ NButton: any;
243
+ NRadioGroup: any;
244
+ NRadio: any;
245
+ NSelect: any;
246
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:show"[], "update:show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
247
+ show: {
248
+ type: BooleanConstructor;
249
+ };
250
+ }>> & {
251
+ "onUpdate:show"?: ((...args: any[]) => any) | undefined;
252
+ }, {
253
+ show: boolean;
254
+ }>;
187
255
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
188
256
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "button-click"[], "button-click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
189
257
  userAvatar: {
@@ -220,7 +288,12 @@ declare const _default: import("vue").DefineComponent<{
220
288
  type: PropType<QueryPrompt>;
221
289
  };
222
290
  patientInfo: {
223
- type: PropType<AnyObject>;
291
+ type: PropType<Partial<{
292
+ info: AnyObject;
293
+ queryPatient: (props: {
294
+ keyword: string;
295
+ }) => Promise<AnyObject[]>;
296
+ }>>;
224
297
  };
225
298
  }>> & {
226
299
  "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 s,computed as r,openBlock as i,createElementBlock as a,normalizeClass as n,normalizeStyle as m,unref as p,createVNode as u,createBlock as l,createCommentVNode as d}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,selectedPatient:null});return o(v,{...s(F),state:b,isSmall:r((()=>"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?d("v-if",!0):(i(),l(h,{key:0}))],14,g))}});export{k as default};
@@ -1 +1 @@
1
- import{defineComponent as e,inject as t,ref as n,createVNode as i}from"vue";import{NButton as o}from"naive-ui";import{InjectionAIChat as l}from"../types/index.js";import"../../../index.js";import{isArray as a}from"lodash-es";import s from"../../../form-render/index.js";import r from"../../../template-render/index.js";var d=e({name:"ChatCard",inheritAttrs:!1,props:{msgItem:{type:Object,default:()=>({})},instructionId:{type:String}},emits:["button-click"],setup(e,{attrs:d,slots:u,emit:c}){const{patientInfo:m,state:p}=t(l),f=n([]),g=n();function v(e){try{return JSON.parse(e),!0}catch(e){return!1}}const y=e.msgItem.content;function b(e){const{eventName:t,data:n}=e;t&&c("button-click",{fieldItem:n,isBI:!0})}function h(e){y.data[e.id+"Disabled"]=!0,c("button-click")}return y.needConfirms&&(f.value=(y.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:m},dependKey:[]}),a(t.dependencies)&&t.dependencies.length&&(o.urlConfig.dependKey=t.dependencies))),o}))),()=>{var t;return i("div",{class:"card"},[y.needConfirms?[i("p",null,[y.title||y.header.title]),i(s,{disabled:e.msgItem.disabled,column:12,ref:g,"field-list":f.value},null),y.footer.buttons.map((t=>function(t){const n={width:"100%","--n-height":"36px",fontSize:"15px",marginTop:"10px"},l=y.needConfirms?{...n,marginTop:"0"}:n;return i(o,{style:l,secondary:!0,class:"gradient",disabled:e.msgItem.disabled,onClick:async function(){if(y.needConfirms){if(!g.value)return;const e=g.value.getFormValues();try{await g.value.validate(),p.loading=!0,c("button-click",{values:e,buttonInfo:t,isForm:!0})}catch(e){}}else c("button-click")}},{default:()=>[y.needConfirms?null==t?void 0:t.text:y.buttonName]})}(t)))]:i(r,{config:v(null==(t=y.settings)?void 0:t.setting)?JSON.parse(y.settings.setting):null,data:y.data,"onModule-click":b,"onButton-click":h},null)])}}});export{d as default};
1
+ import{defineComponent as t,inject as e,ref as n,computed as o,createVNode as i}from"vue";import{NButton as l}from"naive-ui";import{InjectionAIChat as a}from"../types/index.js";import"../../../index.js";import{isArray as r}from"lodash-es";import s from"../../../form-render/index.js";import u from"../../../template-render/index.js";var d=t({name:"ChatCard",inheritAttrs:!1,props:{msgItem:{type:Object,default:()=>({})},instructionId:{type:String}},emits:["button-click"],setup(t,{attrs:d,slots:c,emit:m}){const{patientInfo:p,state:f}=e(a),v=n([]),g=n(),b=o((()=>{var e,n;return!!(null==(n=null==(e=t.msgItem)?void 0:e.content)?void 0:n.body)}));function y(t){try{return JSON.parse(t),!0}catch(t){return!1}}const h=t.msgItem.content;function I(t){const{eventName:e,data:n}=t;e&&m("button-click",{buttonInfo:n,isBI:!0})}function x(t){h.data[t.button.id+"Disabled"]=!0,m("button-click",{buttonInfo:t.button})}return b.value&&(v.value=(h.body.items||[]).map((e=>{var n,o;const i={html_type:e.type,val_key:e.code,name:e.name,elem_width:12,default_val:e.value,lazyRequest:!0,requestCache:!0,urlConfig:{nameKey:null!=(n=e.labelField)?n:"label"},option:[],is_null:e.required?"0":"1"};return"SELECT"===i.html_type&&(i.option=e.options,"fixed"===e.dataSourceType&&(null==(o=e.options)?void 0:o.length)||(i.html_type="REMOTE_SEARCH",Object.assign(i.urlConfig,{url:"/flow/api/instruction/parameter/getOptionsValues",method:"post",params:{instructionId:t.instructionId,code:e.code,configs:p.value.info},dependKey:[]}),r(e.dependencies)&&e.dependencies.length&&(i.urlConfig.dependKey=e.dependencies))),i}))),()=>{var e;return i("div",{class:"card"},[b.value?[i("p",null,[h.title||h.header.title]),i(s,{disabled:t.msgItem.disabled,column:12,ref:g,"field-list":v.value},null),h.footer.buttons.map((e=>function(e){const n={width:"100%","--n-height":"36px",fontSize:"15px",marginTop:"10px"},o=b.value?{...n,marginTop:"0"}:n;return i(l,{style:o,secondary:!0,class:"gradient",disabled:t.msgItem.disabled,onClick:async function(){if(b.value){if(!g.value)return;const t=g.value.getFormValues();try{await g.value.validate(),h.body.items.forEach((e=>{t[e.code]&&(e.value=t[e.code])})),f.loading=!0,m("button-click",{values:t,buttonInfo:e,isForm:!0})}catch(t){}}else m("button-click")}},{default:()=>[b.value?null==e?void 0:e.text:h.buttonName]})}(e)))]:i(u,{config:y(null==(e=h.settings)?void 0:e.setting)?JSON.parse(h.settings.setting):null,data:h.data,"onModule-click":I,"onButton-click":x},null)])}}});export{d as default};
@@ -29,8 +29,10 @@ declare const _default: import("vue").DefineComponent<{}, {
29
29
  }[]>;
30
30
  showPrompt: import("vue").Ref<boolean>;
31
31
  currentShortcutId: import("vue").Ref<string>;
32
+ showPatient: import("vue").Ref<boolean>;
32
33
  btnDisabled: import("vue").ComputedRef<boolean>;
33
34
  showMagicWand: import("vue").ComputedRef<boolean>;
35
+ patient: import("vue").ComputedRef<string>;
34
36
  recorderStart: () => Promise<void>;
35
37
  isValidJSON: (str: string) => boolean;
36
38
  getShortcutName: (item: string | AnyObject) => any;
@@ -53,6 +55,7 @@ declare const _default: import("vue").DefineComponent<{}, {
53
55
  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<{}>>, {}>;
54
56
  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<{}>>, {}>;
55
57
  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<{}>>, {}>;
58
+ 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<{}>>, {}>;
56
59
  ChatPrompt: import("vue").DefineComponent<{
57
60
  show: {
58
61
  type: BooleanConstructor;
@@ -96,5 +99,60 @@ declare const _default: import("vue").DefineComponent<{}, {
96
99
  }, {
97
100
  show: boolean;
98
101
  }>;
102
+ ChatPatient: import("vue").DefineComponent<{
103
+ show: {
104
+ type: BooleanConstructor;
105
+ };
106
+ }, {
107
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
108
+ show: {
109
+ type: BooleanConstructor;
110
+ };
111
+ }>> & {
112
+ "onUpdate:show"?: ((...args: any[]) => any) | undefined;
113
+ }>>;
114
+ emit: (event: "update:show", ...args: any[]) => void;
115
+ patientInfo: any;
116
+ state: any;
117
+ formValue: {
118
+ businessType: null;
119
+ vaa01: null;
120
+ vaa07: string;
121
+ };
122
+ rules: {
123
+ businessType: {
124
+ required: boolean;
125
+ trigger: string;
126
+ message: string;
127
+ };
128
+ vaa01: {
129
+ required: boolean;
130
+ trigger: string[];
131
+ message: string;
132
+ };
133
+ };
134
+ options: import("vue").Ref<AnyObject[]>;
135
+ formRef: import("vue").Ref<any>;
136
+ renderLabel: (option: AnyObject) => string;
137
+ handleUpdateValue: (value: string, option: import("naive-ui").SelectOption) => void;
138
+ handleSearch: (keyword: string) => Promise<void>;
139
+ handleValidateClick: (e: MouseEvent) => void;
140
+ NDrawer: any;
141
+ NDrawerContent: any;
142
+ NForm: any;
143
+ NFormItem: any;
144
+ NButton: any;
145
+ NRadioGroup: any;
146
+ NRadio: any;
147
+ NSelect: any;
148
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:show"[], "update:show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
149
+ show: {
150
+ type: BooleanConstructor;
151
+ };
152
+ }>> & {
153
+ "onUpdate:show"?: ((...args: any[]) => any) | undefined;
154
+ }, {
155
+ show: boolean;
156
+ }>;
99
157
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
100
158
  export default _default;
@@ -1 +1 @@
1
- import{defineComponent as e,inject as l,ref as t,computed as o,watch as n,onBeforeUnmount as a,openBlock as s,createElementBlock as u,normalizeClass as r,unref as i,Fragment as d,renderList as c,createBlock as v,withCtx as m,createTextVNode as p,toDisplayString as h,createCommentVNode as f,createVNode as k,createElementVNode as y,withModifiers as g,getCurrentInstance as w}from"vue";import{NButton as b,NPopover as x,NInput as C,NTag as _,NIcon as I,NBreadcrumb as j,NBreadcrumbItem as z}from"naive-ui";import{SparklesSharp as T,PaperPlane as K,ChevronBack as M,ChevronForward as D}from"@vicons/ionicons5";import{InjectionAIChatEmits as S,InjectionAIChat as R}from"../types/index.js";import U from"../../../audio-sdk/src/audioSDK.js";import{cloneDeep as A,isString as P,last as E}from"lodash-es";import{useTheme as L}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 B from"./ChatPrompt.vue.js";const F={key:0,class:"menu-box fillet-8"},W={class:"input-wrapper fillet-10"},H=y("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},[y("path",{fill:"none",stroke:"black","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M192 448h128"}),y("path",{d:"M384 208v32c0 70.4-57.6 128-128 128h0c-70.4 0-128-57.6-128-128v-32",fill:"none",stroke:"black","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"}),y("path",{fill:"none",stroke:"black","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M256 368v80"}),y("path",{d:"M256 64a63.68 63.68 0 0 0-64 64v111c0 35.2 29 65 64 65s64-29 64-65V128c0-36-28-64-64-64z",fill:"none",stroke:"#4972EF","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"})],-1),N={class:"btn-box"},V=["disabled"],q={class:"command-box"},G={class:"command-box__header"},J={key:0,class:"title"},O={class:"command-box__menu"},Q=["onMouseover","onClick"],X={class:"label"},Y={class:"remark"};var Z=e({__name:"ChatFooter",setup(e){const Z=L(),$=U.create(),ee=l(S),{shortcutList:le,state:te,isSmall:oe,audioTimed:ne,commandList:ae}=l(R),se=t(),ue=t(""),re=t(!1),ie=t([]),de=t(A(ae.value||[])),ce=t(!1),ve=t(""),me=o((()=>!ue.value.replace(/(&nbsp;|\s|<br>)+/g,""))),pe=o((()=>{var e;return!ue.value&&!(null==(e=se.value)?void 0:e.activated.value)}));async function he(){try{const e=await $.start(w(),{allowPunctuationMark:!1,timed:ne.value||10,realTimeRecognition:!0});if("success"!==(null==e?void 0:e.result))return;const{text:l}=e.data;ue.value=l}catch(e){console.log(e)}}function fe(e){var l;if(P(e))return e;const{content:t}=(null==(l=null==e?void 0:e.contents)?void 0:l[0])||{};return t.instructionName}function ke(){re.value=!1,de.value=A(ae.value||[]),ie.value=[],ae.value.length&&(re.value=!0,ve.value=de.value[0].shortcutId)}function ye(e){if("Slash"!==e.code||te.selectedCommand||ue.value)if("Backspace"===e.key)re.value=!1,!ue.value.startsWith("/")&&!ue.value.startsWith("、")||2!==ue.value.length||te.selectedCommand?!ue.value&&te.selectedCommand&&(e.preventDefault(),te.selectedCommand=null,ue.value="/",ke()):ke();else if(re.value&&["ArrowUp","ArrowDown"].includes(e.key)){const l=de.value.findIndex((e=>e.shortcutId===ve.value));if("ArrowUp"===e.key){const e=l>0?l-1:de.value.length-1;ve.value=de.value[e].shortcutId}else if("ArrowDown"===e.key){const e=l<de.value.length-1?l+1:0;ve.value=de.value[e].shortcutId}}else if(["Enter"].includes(e.key)){if(!function(e){return e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}(e))if(e.preventDefault(),re.value){be(de.value.find((e=>e.shortcutId===ve.value)))}else we()}else re.value=!1;else ke()}function ge(e){!e&&te.selectedPrompt&&(te.selectedPrompt=null)}function we(){me.value||(te.sending=!0,te.loading=!0,te.sendContent=ue.value,ue.value="")}function be(e){var l;ve.value=e.shortcutId,se.value.focus(),(null==(l=e.children)?void 0:l.length)?(de.value=e.children,ve.value=de.value[0].shortcutId,ie.value.push(e)):(te.selectedCommand=e||{},re.value=!1,ue.value="")}function xe(){var e;ie.value.pop(),de.value=E(ie.value)?null==(e=E(ie.value))?void 0:e.children:A(ae.value||[]),ve.value=de.value[0].shortcutId,se.value.focus()}return n((()=>te.sendContent),(e=>{e&&!te.sending&&(ue.value=e)})),a((()=>{$.destroy()})),(e,l)=>(s(),u("section",{class:r(["chat-footer",i(te).loading?"disabled":""])},[i(le)&&i(le).length>0?(s(),u("div",F,[(s(!0),u(d,null,c(i(le),(e=>(s(),v(i(b),{secondary:"",size:"small",round:i(oe),key:fe(e),onClick:()=>function(e){var l;if(P(e))ue.value=e;else{const t=null==(l=null==e?void 0:e.contents)?void 0:l[0];ee("button-click",{msgItem:t,item:e})}}(e)},{default:m((()=>[p(h(fe(e)),1)])),_:2},1032,["round","onClick"])))),128))])):f("v-if",!0),k(i(x),{"content-style":"height: 400px",placement:"top-start",trigger:"manual",width:"trigger","show-arrow":!1,to:!1,show:re.value,onClickoutside:l[4]||(l[4]=e=>re.value=!1)},{trigger:m((()=>[y("div",W,[i(oe)?(s(),v(i(C),{key:0,ref_key:"inputRef",ref:se,style:{"--n-height":"48px"},round:"",placeholder:"",disabled:i(te).loading,value:ue.value,"onUpdate:value":l[1]||(l[1]=e=>ue.value=e),onKeydownCapture:ye,onInput:ge},{prefix:m((()=>[i(te).selectedCommand&&i(te).selectedCommand.shortcutTitle?(s(),v(i(_),{key:0,bordered:!1,color:{textColor:i(Z)["--c-primary-color"]},style:{"--n-border-radius":"5px"}},{default:m((()=>[p(" /"+h(i(te).selectedCommand.shortcutTitle),1)])),_:1},8,["color"])):i(pe)?(s(),v(i(b),{key:1,text:"",onClick:l[0]||(l[0]=()=>ce.value=!0)},{default:m((()=>[k(i(I),{color:"#8f66f7",size:"18",component:i(T)},null,8,["component"])])),_:1})):f("v-if",!0)])),suffix:m((()=>[k(i(b),{text:"",disabled:i(te).loading,onClick:he},{icon:m((()=>[k(i(I),{size:"30"},{default:m((()=>[H])),_:1})])),_:1},8,["disabled"]),k(i(b),{circle:"",class:"gradient",style:{"margin-left":"10px"},disabled:i(me),onClick:we},{icon:m((()=>[k(i(I),{color:"#fff",size:"20",component:i(K)},null,8,["component"])])),_:1},8,["disabled"])])),_:1},8,["disabled","value"])):(s(),u(d,{key:1},[k(i(C),{ref_key:"inputRef",ref:se,type:"textarea",placeholder:"请向我提问,Shift+Enter换行",disabled:i(te).loading,autosize:{minRows:2,maxRows:7},value:ue.value,"onUpdate:value":l[3]||(l[3]=e=>ue.value=e),onKeydownCapture:ye,onInput:ge},{prefix:m((()=>[i(te).selectedCommand&&i(te).selectedCommand.shortcutTitle?(s(),v(i(_),{key:0,bordered:!1,color:{textColor:i(Z)["--c-primary-color"]},style:{"--n-border-radius":"5px"}},{default:m((()=>{var e;return[p(" /"+h(null==(e=i(te).selectedCommand)?void 0:e.shortcutTitle),1)]})),_:1},8,["color"])):i(pe)?(s(),v(i(b),{key:1,text:"",onClick:l[2]||(l[2]=()=>ce.value=!0)},{default:m((()=>[k(i(I),{color:"#8f66f7",size:"18",component:i(T)},null,8,["component"])])),_:1})):f("v-if",!0)])),_:1},8,["disabled","value"]),y("div",N,[y("span",{class:r(["btn-send","gradient","fillet-8",i(me)?"disabled":""]),disabled:i(me),onClick:we},[k(i(I),{color:"#fff",size:"22",component:i(K)},null,8,["component"])],10,V)])],64))])])),default:m((()=>[y("div",q,[y("div",G,[0===ie.value.length?(s(),u("span",J,"推荐指令")):(s(),u(d,{key:1},[k(i(b),{text:"",onClick:xe},{default:m((()=>[k(i(I),{color:"#999",size:"20",component:i(M)},null,8,["component"])])),_:1}),k(i(j),null,{default:m((()=>[(s(!0),u(d,null,c(ie.value,(e=>(s(),v(i(z),{key:e.shortcutId},{default:m((()=>[p(h(e.shortcutTitle),1)])),_:2},1024)))),128))])),_:1})],64))]),y("div",O,[(s(!0),u(d,null,c(de.value,(e=>(s(),u("div",{class:r(["menu-item",e.children&&e.children.length?"":"selectable",ve.value===e.shortcutId?"selected":""]),key:e.shortcutId,onMouseover:g((()=>ve.value=e.shortcutId),["stop"]),onClick:()=>be(e)},[y("span",X,h(e.shortcutTitle),1),y("span",Y,h(e.shortcutDescription),1),e.children&&e.children.length?(s(),v(i(I),{key:0,color:"#999",size:"20",component:i(D)},null,8,["component"])):f("v-if",!0)],42,Q)))),128))])])])),_:1},8,["show"]),k(B,{show:ce.value,"onUpdate:show":l[5]||(l[5]=e=>ce.value=e)},null,8,["show"])],2))}});export{Z as default};
1
+ import{defineComponent as e,inject as l,ref as o,computed as t,watch as n,onBeforeUnmount as a,openBlock as s,createElementBlock as r,normalizeClass as u,unref as i,createElementVNode as c,createBlock as d,withCtx as v,createVNode as m,createTextVNode as p,toDisplayString as h,createCommentVNode as f,Fragment as k,renderList as y,withModifiers as w,getCurrentInstance as g}from"vue";import{NButton as b,NIcon as C,NPopover as x,NInput as _,NTag as I,NBreadcrumb as j,NBreadcrumbItem as z}from"naive-ui";import{PeopleOutline as T,SparklesSharp as K,PaperPlane as M,ChevronBack as P,ChevronForward as D}from"@vicons/ionicons5";import{InjectionAIChatEmits as S,InjectionAIChat as U}from"../types/index.js";import R from"../../../audio-sdk/src/audioSDK.js";import{cloneDeep as A,isString as E,last as L}from"lodash-es";import{useTheme as B}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 F from"./ChatPrompt.vue.js";import W from"./ChatPatient.vue.js";const $={class:"menu-box fillet-8"},q={class:"input-wrapper fillet-10"},H=c("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},[c("path",{fill:"none",stroke:"black","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M192 448h128"}),c("path",{d:"M384 208v32c0 70.4-57.6 128-128 128h0c-70.4 0-128-57.6-128-128v-32",fill:"none",stroke:"black","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"}),c("path",{fill:"none",stroke:"black","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M256 368v80"}),c("path",{d:"M256 64a63.68 63.68 0 0 0-64 64v111c0 35.2 29 65 64 65s64-29 64-65V128c0-36-28-64-64-64z",fill:"none",stroke:"#4972EF","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"})],-1),N={class:"btn-box"},V=["disabled"],G={class:"command-box"},J={class:"command-box__header"},O={key:0,class:"title"},Q={class:"command-box__menu"},X=["onMouseover","onClick"],Y={class:"label"},Z={class:"remark"};var ee=e({__name:"ChatFooter",setup(e){const ee=B(),le=R.create(),oe=l(S),{shortcutList:te,state:ne,isSmall:ae,audioTimed:se,commandList:re}=l(U),ue=o(),ie=o(""),ce=o(!1),de=o([]),ve=o(A(re.value||[])),me=o(!1),pe=o(""),he=o(!1),fe=t((()=>!ie.value.replace(/(&nbsp;|\s|<br>)+/g,""))),ke=t((()=>{var e;return!ie.value&&!(null==(e=ue.value)?void 0:e.activated.value)})),ye=t((()=>{if(!ne.selectedPatient)return"选择患者";const{bcq04b:e,vaa05:l}=ne.selectedPatient;return`${e}床/${l}`}));async function we(){try{const e=await le.start(g(),{allowPunctuationMark:!1,timed:se.value||10,realTimeRecognition:!0});if("success"!==(null==e?void 0:e.result))return;const{text:l}=e.data;ie.value=l}catch(e){console.log(e)}}function ge(e){var l;if(E(e))return e;const{content:o}=(null==(l=null==e?void 0:e.contents)?void 0:l[0])||{};return o.instructionName}function be(){var e;ce.value=!1,ve.value=A(re.value||[]),de.value=[],(null==(e=re.value)?void 0:e.length)&&(ce.value=!0,pe.value=ve.value[0].shortcutId)}function Ce(e){if("Slash"!==e.code||ne.selectedCommand||ie.value)if("Backspace"===e.key)ce.value=!1,!ie.value.startsWith("/")&&!ie.value.startsWith("、")||2!==ie.value.length||ne.selectedCommand?!ie.value&&ne.selectedCommand&&(e.preventDefault(),ne.selectedCommand=null,ie.value="/",be()):be();else if(ce.value&&["ArrowUp","ArrowDown"].includes(e.key)){const l=ve.value.findIndex((e=>e.shortcutId===pe.value));if("ArrowUp"===e.key){const e=l>0?l-1:ve.value.length-1;pe.value=ve.value[e].shortcutId}else if("ArrowDown"===e.key){const e=l<ve.value.length-1?l+1:0;pe.value=ve.value[e].shortcutId}}else if(["Enter"].includes(e.key)){if(!function(e){return e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}(e))if(e.preventDefault(),ce.value){Ie(ve.value.find((e=>e.shortcutId===pe.value)))}else _e()}else ce.value=!1;else be()}function xe(e){!e&&ne.selectedPrompt&&(ne.selectedPrompt=null)}function _e(){fe.value||(ne.sending=!0,ne.loading=!0,ne.sendContent=ie.value,ie.value="")}function Ie(e){var l;pe.value=e.shortcutId,ue.value.focus(),(null==(l=e.children)?void 0:l.length)?(ve.value=e.children,pe.value=ve.value[0].shortcutId,de.value.push(e)):(ne.selectedCommand=e||{},ce.value=!1,ie.value="")}function je(){var e;de.value.pop(),ve.value=L(de.value)?null==(e=L(de.value))?void 0:e.children:A(re.value||[]),pe.value=ve.value[0].shortcutId,ue.value.focus()}return n((()=>ne.sendContent),(e=>{e&&!ne.sending&&(ie.value=e)})),a((()=>{le.destroy()})),(e,l)=>(s(),r("section",{class:u(["chat-footer",i(ne).loading?"disabled":""])},[c("div",$,[i(ae)?f("v-if",!0):(s(),d(i(b),{key:0,secondary:"",size:"small",onClick:l[0]||(l[0]=()=>he.value=!0)},{icon:v((()=>[m(i(C),{color:i(ee)["--c-primary-color"],size:"20",component:i(T)},null,8,["color","component"])])),default:v((()=>[p(" "+h(i(ye)),1)])),_:1})),i(te)&&i(te).length>0?(s(!0),r(k,{key:1},y(i(te),(e=>(s(),d(i(b),{secondary:"",size:"small",round:i(ae),key:ge(e),onClick:()=>function(e){var l;if(E(e))ie.value=e;else{const o=null==(l=null==e?void 0:e.contents)?void 0:l[0];oe("button-click",{msgItem:o,item:e})}}(e)},{default:v((()=>[p(h(ge(e)),1)])),_:2},1032,["round","onClick"])))),128)):f("v-if",!0)]),m(i(x),{"content-style":"height: 400px",placement:"top-start",trigger:"manual",width:"trigger","show-arrow":!1,to:!1,show:ce.value,onClickoutside:l[5]||(l[5]=e=>ce.value=!1)},{trigger:v((()=>[c("div",q,[i(ae)?(s(),d(i(_),{key:0,ref_key:"inputRef",ref:ue,style:{"--n-height":"48px"},round:"",placeholder:"",disabled:i(ne).loading,value:ie.value,"onUpdate:value":l[2]||(l[2]=e=>ie.value=e),onKeydownCapture:Ce,onInput:xe},{prefix:v((()=>[i(ne).selectedCommand&&i(ne).selectedCommand.shortcutTitle?(s(),d(i(I),{key:0,bordered:!1,color:{textColor:i(ee)["--c-primary-color"]},style:{"--n-border-radius":"5px"}},{default:v((()=>[p(" /"+h(i(ne).selectedCommand.shortcutTitle),1)])),_:1},8,["color"])):i(ke)?(s(),d(i(b),{key:1,text:"",onClick:l[1]||(l[1]=()=>me.value=!0)},{default:v((()=>[m(i(C),{color:"#8f66f7",size:"18",component:i(K)},null,8,["component"])])),_:1})):f("v-if",!0)])),suffix:v((()=>[m(i(b),{text:"",disabled:i(ne).loading,onClick:we},{icon:v((()=>[m(i(C),{size:"30"},{default:v((()=>[H])),_:1})])),_:1},8,["disabled"]),m(i(b),{circle:"",class:"gradient",style:{"margin-left":"10px"},disabled:i(fe),onClick:_e},{icon:v((()=>[m(i(C),{color:"#fff",size:"20",component:i(M)},null,8,["component"])])),_:1},8,["disabled"])])),_:1},8,["disabled","value"])):(s(),r(k,{key:1},[m(i(_),{ref_key:"inputRef",ref:ue,type:"textarea",placeholder:"请向我提问,Shift+Enter换行",disabled:i(ne).loading,autosize:{minRows:2,maxRows:7},value:ie.value,"onUpdate:value":l[4]||(l[4]=e=>ie.value=e),onKeydownCapture:Ce,onInput:xe},{prefix:v((()=>[i(ne).selectedCommand&&i(ne).selectedCommand.shortcutTitle?(s(),d(i(I),{key:0,bordered:!1,color:{textColor:i(ee)["--c-primary-color"]},style:{"--n-border-radius":"5px"}},{default:v((()=>{var e;return[p(" /"+h(null==(e=i(ne).selectedCommand)?void 0:e.shortcutTitle),1)]})),_:1},8,["color"])):i(ke)?(s(),d(i(b),{key:1,text:"",onClick:l[3]||(l[3]=()=>me.value=!0)},{default:v((()=>[m(i(C),{color:"#8f66f7",size:"18",component:i(K)},null,8,["component"])])),_:1})):f("v-if",!0)])),_:1},8,["disabled","value"]),c("div",N,[c("span",{class:u(["btn-send","gradient","fillet-8",i(fe)?"disabled":""]),disabled:i(fe),onClick:_e},[m(i(C),{color:"#fff",size:"22",component:i(M)},null,8,["component"])],10,V)])],64))])])),default:v((()=>[c("div",G,[c("div",J,[0===de.value.length?(s(),r("span",O,"推荐指令")):(s(),r(k,{key:1},[m(i(b),{text:"",onClick:je},{default:v((()=>[m(i(C),{color:"#999",size:"20",component:i(P)},null,8,["component"])])),_:1}),m(i(j),null,{default:v((()=>[(s(!0),r(k,null,y(de.value,(e=>(s(),d(i(z),{key:e.shortcutId},{default:v((()=>[p(h(e.shortcutTitle),1)])),_:2},1024)))),128))])),_:1})],64))]),c("div",Q,[(s(!0),r(k,null,y(ve.value,(e=>(s(),r("div",{class:u(["menu-item",e.children&&e.children.length?"":"selectable",pe.value===e.shortcutId?"selected":""]),key:e.shortcutId,onMouseover:w((()=>pe.value=e.shortcutId),["stop"]),onClick:()=>Ie(e)},[c("span",Y,h(e.shortcutTitle),1),c("span",Z,h(e.shortcutDescription),1),e.children&&e.children.length?(s(),d(i(C),{key:0,color:"#999",size:"20",component:i(D)},null,8,["component"])):f("v-if",!0)],42,X)))),128))])])])),_:1},8,["show"]),m(F,{show:me.value,"onUpdate:show":l[6]||(l[6]=e=>me.value=e)},null,8,["show"]),m(W,{show:he.value,"onUpdate:show":l[7]||(l[7]=e=>he.value=e)},null,8,["show"])],2))}});export{ee as default};
@@ -0,0 +1,58 @@
1
+ import { SelectOption } from 'naive-ui';
2
+ import { AnyObject } from '../../../../shared/types';
3
+ declare const _default: import("vue").DefineComponent<{
4
+ show: {
5
+ type: BooleanConstructor;
6
+ };
7
+ }, {
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
+ patientInfo: any;
17
+ state: any;
18
+ formValue: {
19
+ businessType: null;
20
+ vaa01: null;
21
+ vaa07: string;
22
+ };
23
+ rules: {
24
+ businessType: {
25
+ required: boolean;
26
+ trigger: string;
27
+ message: string;
28
+ };
29
+ vaa01: {
30
+ required: boolean;
31
+ trigger: string[];
32
+ message: string;
33
+ };
34
+ };
35
+ options: import("vue").Ref<AnyObject[]>;
36
+ formRef: import("vue").Ref<any>;
37
+ renderLabel: (option: AnyObject) => string;
38
+ handleUpdateValue: (value: string, option: SelectOption) => void;
39
+ handleSearch: (keyword: string) => Promise<void>;
40
+ handleValidateClick: (e: MouseEvent) => void;
41
+ NDrawer: any;
42
+ NDrawerContent: any;
43
+ NForm: any;
44
+ NFormItem: any;
45
+ NButton: any;
46
+ NRadioGroup: any;
47
+ NRadio: any;
48
+ NSelect: any;
49
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:show"[], "update:show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
50
+ show: {
51
+ type: BooleanConstructor;
52
+ };
53
+ }>> & {
54
+ "onUpdate:show"?: ((...args: any[]) => any) | undefined;
55
+ }, {
56
+ show: boolean;
57
+ }>;
58
+ export default _default;
@@ -0,0 +1 @@
1
+ import t from"./ChatPatient.vue2.js";import e from"../../../../_virtual/_plugin-vue_export-helper.js";var r=e(t,[["__file","ChatPatient.vue"]]);export{r as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as e,inject as a,reactive as t,ref as l,openBlock as u,createBlock as n,unref as o,withCtx as r,createVNode as i,createTextVNode as s,toDisplayString as v}from"vue";import{NDrawer as d,NDrawerContent as f,NForm as p,NFormItem as c,NRadioGroup as m,NRadio as h,NSelect as b,NButton as y}from"naive-ui";import{isFunction as _,isArray as g}from"lodash-es";import{InjectionAIChat as w}from"../types/index.js";var k=e({__name:"ChatPatient",props:{show:{type:Boolean}},emits:["update:show"],setup(e,{emit:k}){const{patientInfo:q,state:T}=a(w),C=t({businessType:null,vaa01:null,vaa07:""}),I={businessType:{required:!0,trigger:"change",message:"请选择类型"},vaa01:{required:!0,trigger:["blur","change"],message:"请选择患者"}},P=l([]),$=l();function x(e){const{bcq04b:a,vaa05:t,vae96:l,vae87:u,bck02a:n}=e;return`${a}床/${t}/${1==l?"男":2==l?"女":"未知"}/${u}/${n}`}function A(e,a){C.vaa07=a.vaa07}async function L(e){var a;if(_(null==(a=q.value)?void 0:a.queryPatient))try{const a=await q.value.queryPatient(e);if(g(a))return void(P.value=a);P.value=[]}catch(e){P.value=[]}}function N(e){var a;e.preventDefault(),null==(a=$.value)||a.validate((e=>{e||(T.selectedPatient={...C,...P.value.find((e=>e.vaa01===C.vaa01))},k("update:show",!1))}))}return L(""),(a,t)=>(u(),n(o(d),{placement:"bottom",height:"300","trap-focus":!1,to:"#"+o(T).id,show:e.show,onMaskClick:t[2]||(t[2]=()=>k("update:show",!1))},{default:r((()=>[i(o(f),null,{default:r((()=>[i(o(p),{ref_key:"formRef",ref:$,"label-placement":"left","label-width":"auto",size:"large",model:C,"require-mark-placement":"right-hanging",rules:I},{default:r((()=>[i(o(c),{label:"业务",path:"businessType"},{default:r((()=>[i(o(m),{value:C.businessType,"onUpdate:value":t[0]||(t[0]=e=>C.businessType=e),name:"业务"},{default:r((()=>[i(o(h),{value:"CLINICIAN"},{default:r((()=>[s("门诊")])),_:1}),i(o(h),{value:"HOSPITAL"},{default:r((()=>[s("住院")])),_:1})])),_:1},8,["value"])])),_:1}),i(o(c),{label:"患者",path:"vaa01"},{default:r((()=>[i(o(b),{remote:"",value:C.vaa01,"onUpdate:value":[t[1]||(t[1]=e=>C.vaa01=e),A],placeholder:"请选择患者",filterable:"",options:P.value,"render-label":x,"value-field":"vaa01",onSearch:L},null,8,["value","options"])])),_:1}),i(o(c),{label:"科室"},{default:r((()=>[s(v(C.vaa07),1)])),_:1}),i(o(c),null,{default:r((()=>[i(o(y),{block:"",type:"primary",onClick:N},{default:r((()=>[s("确定")])),_:1})])),_:1})])),_:1},8,["model"])])),_:1})])),_:1},8,["to","show"]))}});export{k as default};
@@ -19,11 +19,11 @@ export type QueryData = (props: {
19
19
  contentType: string;
20
20
  command: any;
21
21
  prompt: any;
22
- }) => Promise<Array<{
22
+ }) => Promise<{
23
23
  contents: MessageItem[];
24
24
  buttonType?: string;
25
25
  [key: string]: any;
26
- }>>;
26
+ }>;
27
27
  export type QueryRecord = (props: {
28
28
  page: number;
29
29
  }) => Promise<{
@@ -1 +1 @@
1
- .c-recording-wrapper{align-items:center;background-color:#fff;border-radius:10px;bottom:100px;display:flex;height:350px;justify-content:center;left:calc(50% - 250px);position:fixed;width:500px}@keyframes toScale{0%{transform:translateX(-50%) translateY(-50%) scale(1)}to{transform:translateX(-50%) translateY(-50%) scale(1.5)}}.c-recording-wrapper .content{font-size:18px;position:absolute;text-align:center;top:20px}.c-recording-wrapper .animation{animation:toScale 1s infinite;background-color:#5585f54d;left:50%;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%) scale(1);z-index:-1}.c-recording-wrapper .animation,.c-recording-wrapper .icon-box{align-items:center;border-radius:50%;display:flex;height:90px;justify-content:center;width:90px}.c-recording-wrapper .icon-box{background-color:#5585f5;cursor:pointer}.c-recording-wrapper .tip{bottom:20px;position:absolute}.ai-chat{background:linear-gradient(135deg,#c9dbfb,#c9dbfb 20%,rgba(237,237,253,.5) 70%,rgba(151,97,251,.2));display:flex;flex-flow:column nowrap;font-size:14px;height:100%;padding:45px 0 60px;position:relative;width:100%}.ai-chat,.ai-chat *{box-sizing:border-box}.ai-chat .fillet-10{border-radius:10px}.ai-chat .fillet-8{border-radius:8px}.ai-chat .n-avatar{background-color:var(--c-primary-color)}.ai-chat .gradient{background:linear-gradient(178deg,#8f66f7,#4170ee);color:#fff}.ai-chat .gradient:active,.ai-chat .gradient:focus,.ai-chat .gradient:hover{color:#fff}.ai-chat .chat-main{display:flex;flex:1;flex-flow:column-reverse nowrap;overflow-y:auto;padding:0 130px 0 82px;row-gap:16px}.ai-chat .chat-main::-webkit-scrollbar{width:5px}.ai-chat .chat-main::-webkit-scrollbar-thumb{background:rgba(0,0,0,.25);border-radius:5px}.ai-chat .chat-main::-webkit-scrollbar-track-piece{background-color:unset}.ai-chat .chat-main .message-item{column-gap:8px;display:flex;flex-flow:row nowrap}.ai-chat .chat-main .message-item:first-child{margin-bottom:auto}.ai-chat .chat-main .message-item .n-avatar{flex-shrink:0}.ai-chat .chat-main .message-item .content-box .content{background:#fff;border-radius:10px;flex:unset;padding:10px 12px}.ai-chat .chat-main .message-item .content-box .content .card{width:236px}.ai-chat .chat-main .message-item .content-box .content .card>p{font-size:14px;line-height:19px}.ai-chat .chat-main .message-item .content-box .content .card .link-btn{display:flex;flex-flow:row wrap;font-size:14px;justify-content:space-between;margin-top:10px;width:100%}.ai-chat .chat-main .message-item .content-box .content .card .link-btn .n-button__content{display:unset;flex:1;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}.ai-chat .chat-main .message-item .content-box .content .card .card-body{border:1px solid #d5d5d5;border-radius:8px;margin-top:5px;overflow:hidden}.ai-chat .chat-main .message-item .content-box .content .card .card-body__head{background:rgba(65,112,238,.14);line-height:36px;padding:0 15px}.ai-chat .chat-main .message-item .content-box .content .card .card-body__content{padding:10px 6px}.ai-chat .chat-main .message-item .content-box .content .card .card-body__content>div{display:flex;font-size:12px}.ai-chat .chat-main .message-item .content-box .content .card .card-body__content>div .label{flex:0 0 60px;text-align:right}.ai-chat .chat-main .message-item .content-box .content .card .patient-info{border-top:1px solid #e5e5e5;margin-top:5px}.ai-chat .chat-main .message-item .content-box .content .card .patient-info .patient-item{margin:5px 0 0 5px}.ai-chat .chat-main .message-item .content-box .content .card .patient-info .patient-item:last-child{margin-bottom:0}.ai-chat .chat-main .message-item .content-box .content .card .patient-info .patient-item p:first-child{font-weight:700}.ai-chat .chat-main .message-item .content-box .content .card .patient-info .patient-item p:last-child{color:#888}.ai-chat .chat-main .message-item .content-box .content .card .n-form{margin-top:10px}.ai-chat .chat-main .message-item .content-box .content .card .n-form .form-render__formItemLabel{color:#888}.ai-chat .chat-main .message-item .content-box .content.default h2{font-size:22px;font-weight:500;margin:10px 0}.ai-chat .chat-main .message-item .content-box .content.loading{align-items:center;color:#999;column-gap:10px;display:flex}.ai-chat .chat-main .message-item .content-box.mine .content{background:hsla(0,0%,100%,.48);border-radius:8px}.ai-chat .chat-footer{padding:30px 130px 0}.ai-chat .chat-footer.disabled{cursor:not-allowed}.ai-chat .chat-footer .menu-box{background:#fff;column-gap:8px;display:flex;margin-bottom:8px;overflow-x:auto;padding:10px}.ai-chat .chat-footer .menu-box::-webkit-scrollbar{width:5px}.ai-chat .chat-footer .menu-box::-webkit-scrollbar-thumb{background:rgba(0,0,0,.25);border-radius:5px}.ai-chat .chat-footer .menu-box::-webkit-scrollbar-track-piece{background-color:unset}.ai-chat .chat-footer .menu-box::-webkit-scrollbar{height:5px}.ai-chat .chat-footer .input-wrapper{background:#fff;box-shadow:0 3px 4px 0 rgba(0,0,0,.1);padding:15px 20px}.ai-chat .chat-footer .input-wrapper .n-input__border,.ai-chat .chat-footer .input-wrapper .n-input__state-border{border:none}.ai-chat .chat-footer .input-wrapper .n-input:not(.n-input--disabled).n-input--focus .n-input__state-border{box-shadow:unset}.ai-chat .chat-footer .input-wrapper .btn-box{display:flex;justify-content:flex-end}.ai-chat .chat-footer .input-wrapper .btn-box .btn-send{align-items:center;cursor:pointer;display:flex;height:46px;justify-content:center;width:58px}.ai-chat .chat-footer .input-wrapper .btn-box .btn-send.disabled{cursor:not-allowed;opacity:.5}.ai-chat .chat-footer .command-box{display:flex;flex-flow:column nowrap;height:100%}.ai-chat .chat-footer .command-box__header{display:flex}.ai-chat .chat-footer .command-box__header .title{color:#999}.ai-chat .chat-footer .command-box__menu{flex:1;overflow-y:auto}.ai-chat .chat-footer .command-box__menu .menu-item{align-items:center;display:flex;padding:8px 0 8px 5px}.ai-chat .chat-footer .command-box__menu .menu-item .remark{color:#999;flex:1;font-size:12px;margin-left:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ai-chat .chat-footer .command-box__menu .menu-item .n-icon{margin-left:auto}.ai-chat .chat-footer .command-box__menu .menu-item:hover{cursor:default}.ai-chat .chat-footer .command-box__menu .menu-item.selected{background:#f2f2f2;border-radius:5px}.ai-chat .chat-footer .command-box__menu .menu-item.selectable{position:relative}.ai-chat .chat-footer .command-box__menu .menu-item.selectable .label{color:var(--c-primary-color);margin-left:30px}.ai-chat .chat-footer .command-box__menu .menu-item.selectable:before{background:#e5e5e5;border-radius:5px;content:"/";height:20px;left:5px;line-height:20px;position:absolute;text-align:center;top:10px;width:20px}.ai-chat--small{padding:20px 0 44px}.ai-chat--small .chat-main{padding:0 20px 10px}.ai-chat--small .chat-main .message-item{display:unset}.ai-chat--small .chat-main .message-item .n-avatar{background:transparent}.ai-chat--small .chat-main .message-item .content-box{display:flex;flex-flow:row nowrap}.ai-chat--small .chat-main .message-item .content-box .content{border-radius:3px 14px 14px;max-width:calc(100% - 55px)}.ai-chat--small .chat-main .message-item .content-box .content.default{border-radius:4px 16px 16px}.ai-chat--small .chat-main .message-item .content-box.mine{flex-flow:row-reverse nowrap}.ai-chat--small .chat-main .message-item .content-box.mine .content{background:#5874dc;border-radius:14px 0 14px 14px;color:#fff}.ai-chat--small .chat-footer{padding:10px 20px 0}.ai-chat--small .chat-footer .menu-box{background:none;padding:0}.ai-chat--small .chat-footer .menu-box .n-button{background:#fff}.ai-chat--small .chat-footer .input-wrapper{border-radius:24px;box-shadow:0 0 6px 0 hsla(240,9%,85%,.74);padding:0}.ai-chat .prompt-wrapper{background:linear-gradient(135deg,#ecf3ff,#ecf3ff 20%,rgba(237,237,253,.5) 70%,rgba(203,175,255,.3))}.ai-chat .prompt-wrapper .n-drawer-header{padding:15px}.ai-chat .prompt-wrapper .n-drawer-header__main{width:100%}.ai-chat .prompt-wrapper .n-drawer-header__main .title{display:flex;font-size:14px}.ai-chat .prompt-wrapper .n-drawer-header__main .title .n-button{margin-left:auto}.ai-chat .prompt-wrapper .n-drawer-header__main .n-input{margin-top:10px}.ai-chat .prompt-wrapper .n-drawer-body-content-wrapper{padding:0 10px}.ai-chat .prompt-wrapper .n-drawer-body-content-wrapper .list-wrapper{align-content:flex-start;display:flex;flex-wrap:wrap;height:100%;overflow-y:auto}.ai-chat .prompt-wrapper .n-drawer-body-content-wrapper .list-wrapper::-webkit-scrollbar{width:5px}.ai-chat .prompt-wrapper .n-drawer-body-content-wrapper .list-wrapper::-webkit-scrollbar-thumb{background:rgba(0,0,0,.25);border-radius:5px}.ai-chat .prompt-wrapper .n-drawer-body-content-wrapper .list-wrapper::-webkit-scrollbar-track-piece{background-color:unset}.ai-chat .prompt-wrapper .n-drawer-body-content-wrapper .list-wrapper .item{background:#fff;border-radius:10px;box-sizing:border-box;break-inside:avoid;cursor:pointer;margin:5px;padding:10px;width:calc(50% - 10px)}.ai-chat .prompt-wrapper .n-drawer-body-content-wrapper .list-wrapper .item:hover{background-image:linear-gradient(#ecf3ff,#fff 40%,#fff)}.ai-chat .prompt-wrapper .n-drawer-body-content-wrapper .list-wrapper .item p:last-child{color:#999;font-size:12px}
1
+ .c-recording-wrapper{align-items:center;background-color:#fff;border-radius:10px;bottom:100px;display:flex;height:350px;justify-content:center;left:calc(50% - 250px);position:fixed;width:500px}@keyframes toScale{0%{transform:translateX(-50%) translateY(-50%) scale(1)}to{transform:translateX(-50%) translateY(-50%) scale(1.5)}}.c-recording-wrapper .content{font-size:18px;position:absolute;text-align:center;top:20px}.c-recording-wrapper .animation{animation:toScale 1s infinite;background-color:#5585f54d;left:50%;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%) scale(1);z-index:-1}.c-recording-wrapper .animation,.c-recording-wrapper .icon-box{align-items:center;border-radius:50%;display:flex;height:90px;justify-content:center;width:90px}.c-recording-wrapper .icon-box{background-color:#5585f5;cursor:pointer}.c-recording-wrapper .tip{bottom:20px;position:absolute}.c-template-render{box-sizing:border-box;color:#000;font-size:0;line-height:1.6}.c-template-render__flex{display:flex}.c-template-render__flexAlignCenter{align-items:center}.c-template-render__flex-wrap{flex-wrap:wrap}.c-template-render__flex1{flex:1}.c-template-render__width100{width:100%}.c-template-render__color60{color:rgba(0,0,0,.6)}.c-template-render__color100{color:#000}.c-template-render__text-ellipsis{-webkit-box-orient:vertical;-webkit-line-clamp:1;display:-webkit-box!important;overflow:hidden;overflow-wrap:break-word;text-overflow:ellipsis;word-break:break-all}.c-template-render__nowrap{white-space:nowrap}.c-template-render__mgr8{margin-right:8px!important}.c-template-render__mgb8{margin-bottom:8px!important}.c-template-render__mgt4{margin-top:4px!important}.c-template-render__mgb4{margin-bottom:4px!important}.c-template-render__un-mgr8{margin-right:-8px!important}.c-template-render__bar{padding-left:8px;position:relative}.c-template-render__bar:before{background:var(--c-primary-color);border-radius:4px;content:"";height:12px;left:0;position:absolute;top:50%;transform:translateY(-50%);width:4px}.c-template-render__inline{display:inline}.ai-chat{background:linear-gradient(135deg,#c9dbfb,#c9dbfb 20%,rgba(237,237,253,.5) 70%,rgba(151,97,251,.2));display:flex;flex-flow:column nowrap;font-size:14px;height:100%;padding:45px 0 60px;position:relative;width:100%}.ai-chat,.ai-chat *{box-sizing:border-box}.ai-chat .fillet-10{border-radius:10px}.ai-chat .fillet-8{border-radius:8px}.ai-chat .n-avatar{background-color:var(--c-primary-color)}.ai-chat .gradient{background:linear-gradient(178deg,#8f66f7,#4170ee);color:#fff}.ai-chat .gradient:active,.ai-chat .gradient:focus,.ai-chat .gradient:hover{color:#fff}.ai-chat .chat-main{display:flex;flex:1;flex-flow:column-reverse nowrap;overflow-y:auto;padding:0 130px 0 82px;row-gap:16px}.ai-chat .chat-main::-webkit-scrollbar{width:5px}.ai-chat .chat-main::-webkit-scrollbar-thumb{background:rgba(0,0,0,.25);border-radius:5px}.ai-chat .chat-main::-webkit-scrollbar-track-piece{background-color:unset}.ai-chat .chat-main .message-item{column-gap:8px;display:flex;flex-flow:row nowrap}.ai-chat .chat-main .message-item:first-child{margin-bottom:auto}.ai-chat .chat-main .message-item .n-avatar{flex-shrink:0}.ai-chat .chat-main .message-item .content-box .content{background:#fff;border-radius:10px;flex:unset;padding:10px 12px}.ai-chat .chat-main .message-item .content-box .content .card{width:236px}.ai-chat .chat-main .message-item .content-box .content .card>p{font-size:14px;line-height:19px}.ai-chat .chat-main .message-item .content-box .content .card .link-btn{display:flex;flex-flow:row wrap;font-size:14px;justify-content:space-between;margin-top:10px;width:100%}.ai-chat .chat-main .message-item .content-box .content .card .link-btn .n-button__content{display:unset;flex:1;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}.ai-chat .chat-main .message-item .content-box .content .card .card-body{border:1px solid #d5d5d5;border-radius:8px;margin-top:5px;overflow:hidden}.ai-chat .chat-main .message-item .content-box .content .card .card-body__head{background:rgba(65,112,238,.14);line-height:36px;padding:0 15px}.ai-chat .chat-main .message-item .content-box .content .card .card-body__content{padding:10px 6px}.ai-chat .chat-main .message-item .content-box .content .card .card-body__content>div{display:flex;font-size:12px}.ai-chat .chat-main .message-item .content-box .content .card .card-body__content>div .label{flex:0 0 60px;text-align:right}.ai-chat .chat-main .message-item .content-box .content .card .patient-info{border-top:1px solid #e5e5e5;margin-top:5px}.ai-chat .chat-main .message-item .content-box .content .card .patient-info .patient-item{margin:5px 0 0 5px}.ai-chat .chat-main .message-item .content-box .content .card .patient-info .patient-item:last-child{margin-bottom:0}.ai-chat .chat-main .message-item .content-box .content .card .patient-info .patient-item p:first-child{font-weight:700}.ai-chat .chat-main .message-item .content-box .content .card .patient-info .patient-item p:last-child{color:#888}.ai-chat .chat-main .message-item .content-box .content .card .n-form{margin-top:10px}.ai-chat .chat-main .message-item .content-box .content .card .n-form .form-render__formItemLabel{color:#888}.ai-chat .chat-main .message-item .content-box .content.default h2{font-size:22px;font-weight:500;margin:10px 0}.ai-chat .chat-main .message-item .content-box .content.loading{align-items:center;color:#999;column-gap:10px;display:flex}.ai-chat .chat-main .message-item .content-box.mine .content{background:hsla(0,0%,100%,.48);border-radius:8px}.ai-chat .chat-footer{padding:30px 130px 0}.ai-chat .chat-footer.disabled{cursor:not-allowed}.ai-chat .chat-footer .menu-box{background:#fff;column-gap:8px;display:flex;margin-bottom:8px;overflow-x:auto;padding:10px}.ai-chat .chat-footer .menu-box::-webkit-scrollbar{width:5px}.ai-chat .chat-footer .menu-box::-webkit-scrollbar-thumb{background:rgba(0,0,0,.25);border-radius:5px}.ai-chat .chat-footer .menu-box::-webkit-scrollbar-track-piece{background-color:unset}.ai-chat .chat-footer .menu-box::-webkit-scrollbar{height:5px}.ai-chat .chat-footer .input-wrapper{background:#fff;box-shadow:0 3px 4px 0 rgba(0,0,0,.1);padding:15px 20px}.ai-chat .chat-footer .input-wrapper .n-input__border,.ai-chat .chat-footer .input-wrapper .n-input__state-border{border:none}.ai-chat .chat-footer .input-wrapper .n-input:not(.n-input--disabled).n-input--focus .n-input__state-border{box-shadow:unset}.ai-chat .chat-footer .input-wrapper .btn-box{display:flex;justify-content:flex-end}.ai-chat .chat-footer .input-wrapper .btn-box .btn-send{align-items:center;cursor:pointer;display:flex;height:46px;justify-content:center;width:58px}.ai-chat .chat-footer .input-wrapper .btn-box .btn-send.disabled{cursor:not-allowed;opacity:.5}.ai-chat .chat-footer .command-box{display:flex;flex-flow:column nowrap;height:100%}.ai-chat .chat-footer .command-box__header{display:flex}.ai-chat .chat-footer .command-box__header .title{color:#999}.ai-chat .chat-footer .command-box__menu{flex:1;overflow-y:auto}.ai-chat .chat-footer .command-box__menu .menu-item{align-items:center;display:flex;padding:8px 0 8px 5px}.ai-chat .chat-footer .command-box__menu .menu-item .remark{color:#999;flex:1;font-size:12px;margin-left:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ai-chat .chat-footer .command-box__menu .menu-item .n-icon{margin-left:auto}.ai-chat .chat-footer .command-box__menu .menu-item:hover{cursor:default}.ai-chat .chat-footer .command-box__menu .menu-item.selected{background:#f2f2f2;border-radius:5px}.ai-chat .chat-footer .command-box__menu .menu-item.selectable{position:relative}.ai-chat .chat-footer .command-box__menu .menu-item.selectable .label{color:var(--c-primary-color);margin-left:30px}.ai-chat .chat-footer .command-box__menu .menu-item.selectable:before{background:#e5e5e5;border-radius:5px;content:"/";height:20px;left:5px;line-height:20px;position:absolute;text-align:center;top:10px;width:20px}.ai-chat--small{padding:20px 0 44px}.ai-chat--small .chat-main{padding:0 20px 10px}.ai-chat--small .chat-main .message-item{display:unset}.ai-chat--small .chat-main .message-item .n-avatar{background:transparent}.ai-chat--small .chat-main .message-item .content-box{display:flex;flex-flow:row nowrap}.ai-chat--small .chat-main .message-item .content-box .content{border-radius:3px 14px 14px;max-width:calc(100% - 55px)}.ai-chat--small .chat-main .message-item .content-box .content.default{border-radius:4px 16px 16px}.ai-chat--small .chat-main .message-item .content-box.mine{flex-flow:row-reverse nowrap}.ai-chat--small .chat-main .message-item .content-box.mine .content{background:#5874dc;border-radius:14px 0 14px 14px;color:#fff}.ai-chat--small .chat-footer{padding:10px 20px 0}.ai-chat--small .chat-footer .menu-box{background:none;padding:0}.ai-chat--small .chat-footer .menu-box .n-button{background:#fff}.ai-chat--small .chat-footer .input-wrapper{border-radius:24px;box-shadow:0 0 6px 0 hsla(240,9%,85%,.74);padding:0}.ai-chat .prompt-wrapper{background:linear-gradient(135deg,#ecf3ff,#ecf3ff 20%,rgba(237,237,253,.5) 70%,rgba(203,175,255,.3))}.ai-chat .prompt-wrapper .n-drawer-header{padding:15px}.ai-chat .prompt-wrapper .n-drawer-header__main{width:100%}.ai-chat .prompt-wrapper .n-drawer-header__main .title{display:flex;font-size:14px}.ai-chat .prompt-wrapper .n-drawer-header__main .title .n-button{margin-left:auto}.ai-chat .prompt-wrapper .n-drawer-header__main .n-input{margin-top:10px}.ai-chat .prompt-wrapper .n-drawer-body-content-wrapper{padding:0 10px}.ai-chat .prompt-wrapper .n-drawer-body-content-wrapper .list-wrapper{align-content:flex-start;display:flex;flex-wrap:wrap;height:100%;overflow-y:auto}.ai-chat .prompt-wrapper .n-drawer-body-content-wrapper .list-wrapper::-webkit-scrollbar{width:5px}.ai-chat .prompt-wrapper .n-drawer-body-content-wrapper .list-wrapper::-webkit-scrollbar-thumb{background:rgba(0,0,0,.25);border-radius:5px}.ai-chat .prompt-wrapper .n-drawer-body-content-wrapper .list-wrapper::-webkit-scrollbar-track-piece{background-color:unset}.ai-chat .prompt-wrapper .n-drawer-body-content-wrapper .list-wrapper .item{background:#fff;border-radius:10px;box-sizing:border-box;break-inside:avoid;cursor:pointer;margin:5px;padding:10px;width:calc(50% - 10px)}.ai-chat .prompt-wrapper .n-drawer-body-content-wrapper .list-wrapper .item:hover{background-image:linear-gradient(#ecf3ff,#fff 40%,#fff)}.ai-chat .prompt-wrapper .n-drawer-body-content-wrapper .list-wrapper .item p:last-child{color:#999;font-size:12px}