cnhis-design-vue 3.2.13-beta.12 → 3.2.13-beta.13
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/es/components/ai-chat/index.d.ts +16 -4
- package/es/components/ai-chat/src/Index.vue.d.ts +16 -4
- package/es/components/ai-chat/src/Index.vue2.js +1 -1
- package/es/components/ai-chat/src/components/ChatFooter.vue.d.ts +3 -1
- package/es/components/ai-chat/src/components/ChatFooter.vue2.js +1 -1
- package/es/components/ai-chat/src/components/ChatPatient.vue.d.ts +2 -1
- package/es/components/ai-chat/src/components/ChatPatient.vue2.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
@@ -40,7 +40,10 @@ declare const AiChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
40
40
|
patientInfo: {
|
41
41
|
type: import("vue").PropType<Partial<{
|
42
42
|
info: import("../../shared/types").AnyObject;
|
43
|
-
queryPatient: (
|
43
|
+
queryPatient: (props: {
|
44
|
+
keyword: string;
|
45
|
+
businessType: string;
|
46
|
+
}) => Promise<import("../../shared/types").AnyObject[]>;
|
44
47
|
}>>;
|
45
48
|
};
|
46
49
|
}, {
|
@@ -86,7 +89,10 @@ declare const AiChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
86
89
|
patientInfo: {
|
87
90
|
type: import("vue").PropType<Partial<{
|
88
91
|
info: import("../../shared/types").AnyObject;
|
89
|
-
queryPatient: (
|
92
|
+
queryPatient: (props: {
|
93
|
+
keyword: string;
|
94
|
+
businessType: string;
|
95
|
+
}) => Promise<import("../../shared/types").AnyObject[]>;
|
90
96
|
}>>;
|
91
97
|
};
|
92
98
|
}>> & {
|
@@ -94,6 +100,7 @@ declare const AiChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
94
100
|
}>>;
|
95
101
|
emit: (event: "button-click", ...args: any[]) => void;
|
96
102
|
state: import("../../shared/types").AnyObject;
|
103
|
+
NMessageProvider: any;
|
97
104
|
ChatMain: import("vue").DefineComponent<Readonly<import("vue").ComponentPropsOptions<{
|
98
105
|
[x: string]: unknown;
|
99
106
|
}>>, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, never[], never, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<readonly string[] | import("vue").ExtractPropTypes<Readonly<import("vue").ComponentObjectPropsOptions<{
|
@@ -104,6 +111,7 @@ declare const AiChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
104
111
|
ChatFooter: import("vue").DefineComponent<{}, {
|
105
112
|
cssVars: import("vue").ComputedRef<import("../../shared/types").AnyObject>;
|
106
113
|
audioSdk: import("..").CAudioSDK;
|
114
|
+
message: import("naive-ui").MessageApi;
|
107
115
|
emit: (event: string, ...args: any[]) => void;
|
108
116
|
shortcutList: any;
|
109
117
|
state: any;
|
@@ -215,7 +223,7 @@ declare const AiChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
215
223
|
patientInfo: any;
|
216
224
|
state: any;
|
217
225
|
formValue: {
|
218
|
-
businessType:
|
226
|
+
businessType: string;
|
219
227
|
vaa01: null;
|
220
228
|
bck03a: string;
|
221
229
|
};
|
@@ -236,6 +244,7 @@ declare const AiChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
236
244
|
renderLabel: (option: import("../../shared/types").AnyObject) => string;
|
237
245
|
handleUpdateValue: (value: string, option: import("naive-ui").SelectOption) => void;
|
238
246
|
handleSearch: (keyword: string) => Promise<void>;
|
247
|
+
handleBusinessTypeUpdate: () => void;
|
239
248
|
handleValidateClick: (e: MouseEvent) => void;
|
240
249
|
NDrawer: any;
|
241
250
|
NDrawerContent: any;
|
@@ -296,7 +305,10 @@ declare const AiChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
296
305
|
patientInfo: {
|
297
306
|
type: import("vue").PropType<Partial<{
|
298
307
|
info: import("../../shared/types").AnyObject;
|
299
|
-
queryPatient: (
|
308
|
+
queryPatient: (props: {
|
309
|
+
keyword: string;
|
310
|
+
businessType: string;
|
311
|
+
}) => Promise<import("../../shared/types").AnyObject[]>;
|
300
312
|
}>>;
|
301
313
|
};
|
302
314
|
}>> & {
|
@@ -42,7 +42,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
42
42
|
patientInfo: {
|
43
43
|
type: PropType<Partial<{
|
44
44
|
info: AnyObject;
|
45
|
-
queryPatient: (
|
45
|
+
queryPatient: (props: {
|
46
|
+
keyword: string;
|
47
|
+
businessType: string;
|
48
|
+
}) => Promise<AnyObject[]>;
|
46
49
|
}>>;
|
47
50
|
};
|
48
51
|
}, {
|
@@ -88,7 +91,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
88
91
|
patientInfo: {
|
89
92
|
type: PropType<Partial<{
|
90
93
|
info: AnyObject;
|
91
|
-
queryPatient: (
|
94
|
+
queryPatient: (props: {
|
95
|
+
keyword: string;
|
96
|
+
businessType: string;
|
97
|
+
}) => Promise<AnyObject[]>;
|
92
98
|
}>>;
|
93
99
|
};
|
94
100
|
}>> & {
|
@@ -96,6 +102,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
96
102
|
}>>;
|
97
103
|
emit: (event: "button-click", ...args: any[]) => void;
|
98
104
|
state: AnyObject;
|
105
|
+
NMessageProvider: any;
|
99
106
|
ChatMain: import("vue").DefineComponent<Readonly<import("vue").ComponentPropsOptions<{
|
100
107
|
[x: string]: unknown;
|
101
108
|
}>>, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, never[], never, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<readonly string[] | import("vue").ExtractPropTypes<Readonly<import("vue").ComponentObjectPropsOptions<{
|
@@ -106,6 +113,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
106
113
|
ChatFooter: import("vue").DefineComponent<{}, {
|
107
114
|
cssVars: import("vue").ComputedRef<AnyObject>;
|
108
115
|
audioSdk: import("../../../components/index").CAudioSDK;
|
116
|
+
message: import("naive-ui").MessageApi;
|
109
117
|
emit: (event: string, ...args: any[]) => void;
|
110
118
|
shortcutList: any;
|
111
119
|
state: any;
|
@@ -217,7 +225,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
217
225
|
patientInfo: any;
|
218
226
|
state: any;
|
219
227
|
formValue: {
|
220
|
-
businessType:
|
228
|
+
businessType: string;
|
221
229
|
vaa01: null;
|
222
230
|
bck03a: string;
|
223
231
|
};
|
@@ -238,6 +246,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
238
246
|
renderLabel: (option: AnyObject) => string;
|
239
247
|
handleUpdateValue: (value: string, option: import("naive-ui").SelectOption) => void;
|
240
248
|
handleSearch: (keyword: string) => Promise<void>;
|
249
|
+
handleBusinessTypeUpdate: () => void;
|
241
250
|
handleValidateClick: (e: MouseEvent) => void;
|
242
251
|
NDrawer: any;
|
243
252
|
NDrawerContent: any;
|
@@ -298,7 +307,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
298
307
|
patientInfo: {
|
299
308
|
type: PropType<Partial<{
|
300
309
|
info: AnyObject;
|
301
|
-
queryPatient: (
|
310
|
+
queryPatient: (props: {
|
311
|
+
keyword: string;
|
312
|
+
businessType: string;
|
313
|
+
}) => Promise<AnyObject[]>;
|
302
314
|
}>>;
|
303
315
|
};
|
304
316
|
}>> & {
|
@@ -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
|
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 u,unref as m,createVNode as p,withCtx as l,createBlock as d,createCommentVNode as c}from"vue";import{NMessageProvider as h}from"naive-ui";import y from"./components/ChatMain.js";import f from"./components/ChatFooter.vue.js";import{useTheme as j}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import"lodash-es";import{useFormRequest as v}from"../../../shared/hooks/useFormRequest/index.js";import{uuidGenerator as x}from"../../../shared/utils/index.js";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import"../../../shared/hooks/useScrollLoading.js";import{InjectionAIChat as S,InjectionAIChatEmits as k}from"./types/index.js";import g from"axios";import"../../index.js";const b=["id"];var q=e({__name:"Index",props:{token:{type:String,required:!0},userAvatar:{type:String},defaultShortcutList:{type:Array},shortcutList:{type:Array},queryData:{type:Function,reuired:!0},queryRecord:{type:Function,reuired:!0},hideInput:{type:Boolean},uiStyle:{type:String},audioTimed:{type:Number,default:10},commandList:{type:Array},queryPrompt:{type:Function},patientInfo:{type:Object}},emits:["button-click"],setup(e,{expose:q,emit:A}){const C=e,F=j();v().registGlobHttpInstance(g.create({headers:{Authorization:"bearer "+C.token}}));const I=t({id:"ai-chat-"+x(),loading:!1,sending:!1,sendContent:"",selectedCommand:null,selectedPrompt:null,externalData:null,selectedPatient:null});return o(S,{...r(C),state:I,isSmall:s((()=>"small"===C.uiStyle))}),o(k,A),q({pushMessage:e=>{I.externalData=e}}),(t,o)=>(i(),a("div",{id:I.id,class:n(["ai-chat","small"===e.uiStyle?"ai-chat--small":""]),style:u(m(F))},[p(m(h),null,{default:l((()=>[p(m(y)),e.hideInput?c("v-if",!0):(i(),d(f,{key:0}))])),_:1})],14,b))}});export{q as default};
|
@@ -4,6 +4,7 @@ import { AnyObject } from '../../../../shared/types';
|
|
4
4
|
declare const _default: import("vue").DefineComponent<{}, {
|
5
5
|
cssVars: import("vue").ComputedRef<AnyObject>;
|
6
6
|
audioSdk: CAudioSDK;
|
7
|
+
message: import("naive-ui").MessageApi;
|
7
8
|
emit: (event: string, ...args: any[]) => void;
|
8
9
|
shortcutList: any;
|
9
10
|
state: any;
|
@@ -115,7 +116,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
115
116
|
patientInfo: any;
|
116
117
|
state: any;
|
117
118
|
formValue: {
|
118
|
-
businessType:
|
119
|
+
businessType: string;
|
119
120
|
vaa01: null;
|
120
121
|
bck03a: string;
|
121
122
|
};
|
@@ -136,6 +137,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
136
137
|
renderLabel: (option: AnyObject) => string;
|
137
138
|
handleUpdateValue: (value: string, option: import("naive-ui").SelectOption) => void;
|
138
139
|
handleSearch: (keyword: string) => Promise<void>;
|
140
|
+
handleBusinessTypeUpdate: () => void;
|
139
141
|
handleValidateClick: (e: MouseEvent) => void;
|
140
142
|
NDrawer: any;
|
141
143
|
NDrawerContent: any;
|
@@ -1 +1 @@
|
|
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{
|
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{useMessage as b,NButton as C,NIcon as x,NPopover as _,NInput as I,NTag as j,NBreadcrumb as z,NBreadcrumbItem as T}from"naive-ui";import{PeopleOutline as P,SparklesSharp as K,PaperPlane as M,ChevronBack as D,ChevronForward as S}from"@vicons/ionicons5";import{InjectionAIChatEmits as U,InjectionAIChat as R}from"../types/index.js";import A from"../../../audio-sdk/src/audioSDK.js";import{cloneDeep as E,isString as L,last as B}from"lodash-es";import{useTheme as F}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 W from"./ChatPrompt.vue.js";import $ from"./ChatPatient.vue.js";const q={class:"menu-box fillet-8"},H={class:"input-wrapper fillet-10"},N=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),V={class:"btn-box"},G=["disabled"],J={class:"command-box"},O={class:"command-box__header"},Q={key:0,class:"title"},X={class:"command-box__menu"},Y=["onMouseover","onClick"],Z={class:"label"},ee={class:"remark"};var le=e({__name:"ChatFooter",setup(e){const le=F(),oe=A.create(),te=b(),ne=l(U),{shortcutList:ae,state:se,isSmall:re,audioTimed:ue,commandList:ie}=l(R),ce=o(),de=o(""),ve=o(!1),me=o([]),pe=o(E(ie.value||[])),he=o(!1),fe=o(""),ke=o(!1),ye=t((()=>!de.value.replace(/( |\s|<br>)+/g,""))),we=t((()=>{var e;return!de.value&&!(null==(e=ce.value)?void 0:e.activated.value)})),ge=t((()=>{if(!se.selectedPatient)return"选择患者";const{bcq04b:e,vaa05:l}=se.selectedPatient;return`${e}床/${l}`}));async function be(){try{const e=await oe.start(g(),{allowPunctuationMark:!1,timed:ue.value||10,realTimeRecognition:!0});if("success"!==(null==e?void 0:e.result))return;const{text:l}=e.data;de.value=l}catch(e){console.log(e)}}function Ce(e){var l;if(L(e))return e;const{content:o}=(null==(l=null==e?void 0:e.contents)?void 0:l[0])||{};return o.instructionName}function xe(){var e;ve.value=!1,pe.value=E(ie.value||[]),me.value=[],(null==(e=ie.value)?void 0:e.length)&&(ve.value=!0,fe.value=pe.value[0].shortcutId)}function _e(e){if("Slash"!==e.code||se.selectedCommand||de.value)if("Backspace"===e.key)ve.value=!1,!de.value.startsWith("/")&&!de.value.startsWith("、")||2!==de.value.length||se.selectedCommand?!de.value&&se.selectedCommand&&(e.preventDefault(),se.selectedCommand=null,de.value="/",xe()):xe();else if(ve.value&&["ArrowUp","ArrowDown"].includes(e.key)){const l=pe.value.findIndex((e=>e.shortcutId===fe.value));if("ArrowUp"===e.key){const e=l>0?l-1:pe.value.length-1;fe.value=pe.value[e].shortcutId}else if("ArrowDown"===e.key){const e=l<pe.value.length-1?l+1:0;fe.value=pe.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(),ve.value){ze(pe.value.find((e=>e.shortcutId===fe.value)))}else je()}else ve.value=!1;else xe()}function Ie(e){!e&&se.selectedPrompt&&(se.selectedPrompt=null)}function je(){ye.value||(re.value||se.selectedPatient?(se.sending=!0,se.loading=!0,se.sendContent=de.value,de.value=""):te.warning("请先选择患者!"))}function ze(e){var l;fe.value=e.shortcutId,ce.value.focus(),(null==(l=e.children)?void 0:l.length)?(pe.value=e.children,fe.value=pe.value[0].shortcutId,me.value.push(e)):(se.selectedCommand=e||{},ve.value=!1,de.value="")}function Te(){var e;me.value.pop(),pe.value=B(me.value)?null==(e=B(me.value))?void 0:e.children:E(ie.value||[]),fe.value=pe.value[0].shortcutId,ce.value.focus()}return n((()=>se.sendContent),(e=>{e&&!se.sending&&(de.value=e)})),a((()=>{oe.destroy()})),(e,l)=>(s(),r("section",{class:u(["chat-footer",i(se).loading?"disabled":""])},[c("div",q,[i(re)?f("v-if",!0):(s(),d(i(C),{key:0,secondary:"",size:"small",onClick:l[0]||(l[0]=()=>ke.value=!0)},{icon:v((()=>[m(i(x),{color:i(le)["--c-primary-color"],size:"20",component:i(P)},null,8,["color","component"])])),default:v((()=>[p(" "+h(i(ge)),1)])),_:1})),i(ae)&&i(ae).length>0?(s(!0),r(k,{key:1},y(i(ae),(e=>(s(),d(i(C),{secondary:"",size:"small",round:i(re),key:Ce(e),onClick:()=>function(e){var l;if(L(e))de.value=e;else{const o=null==(l=null==e?void 0:e.contents)?void 0:l[0];ne("button-click",{msgItem:o,item:e})}}(e)},{default:v((()=>[p(h(Ce(e)),1)])),_:2},1032,["round","onClick"])))),128)):f("v-if",!0)]),m(i(_),{"content-style":"height: 400px",placement:"top-start",trigger:"manual",width:"trigger","show-arrow":!1,to:!1,show:ve.value,onClickoutside:l[5]||(l[5]=e=>ve.value=!1)},{trigger:v((()=>[c("div",H,[i(re)?(s(),d(i(I),{key:0,ref_key:"inputRef",ref:ce,style:{"--n-height":"48px"},round:"",placeholder:"",disabled:i(se).loading,value:de.value,"onUpdate:value":l[2]||(l[2]=e=>de.value=e),onKeydownCapture:_e,onInput:Ie},{prefix:v((()=>[i(se).selectedCommand&&i(se).selectedCommand.shortcutTitle?(s(),d(i(j),{key:0,bordered:!1,color:{textColor:i(le)["--c-primary-color"]},style:{"--n-border-radius":"5px"}},{default:v((()=>[p(" /"+h(i(se).selectedCommand.shortcutTitle),1)])),_:1},8,["color"])):i(we)?(s(),d(i(C),{key:1,text:"",onClick:l[1]||(l[1]=()=>he.value=!0)},{default:v((()=>[m(i(x),{color:"#8f66f7",size:"18",component:i(K)},null,8,["component"])])),_:1})):f("v-if",!0)])),suffix:v((()=>[m(i(C),{text:"",disabled:i(se).loading,onClick:be},{icon:v((()=>[m(i(x),{size:"30"},{default:v((()=>[N])),_:1})])),_:1},8,["disabled"]),m(i(C),{circle:"",class:"gradient",style:{"margin-left":"10px"},disabled:i(ye),onClick:je},{icon:v((()=>[m(i(x),{color:"#fff",size:"20",component:i(M)},null,8,["component"])])),_:1},8,["disabled"])])),_:1},8,["disabled","value"])):(s(),r(k,{key:1},[m(i(I),{ref_key:"inputRef",ref:ce,type:"textarea",placeholder:'请向我提问或输入"/"查看指令,Shift+Enter换行',disabled:i(se).loading,autosize:{minRows:2,maxRows:7},value:de.value,"onUpdate:value":l[4]||(l[4]=e=>de.value=e),onKeydownCapture:_e,onInput:Ie},{prefix:v((()=>[i(se).selectedCommand&&i(se).selectedCommand.shortcutTitle?(s(),d(i(j),{key:0,bordered:!1,color:{textColor:i(le)["--c-primary-color"]},style:{"--n-border-radius":"5px"}},{default:v((()=>{var e;return[p(" /"+h(null==(e=i(se).selectedCommand)?void 0:e.shortcutTitle),1)]})),_:1},8,["color"])):i(we)?(s(),d(i(C),{key:1,text:"",onClick:l[3]||(l[3]=()=>he.value=!0)},{default:v((()=>[m(i(x),{color:"#8f66f7",size:"18",component:i(K)},null,8,["component"])])),_:1})):f("v-if",!0)])),_:1},8,["disabled","value"]),c("div",V,[c("span",{class:u(["btn-send","gradient","fillet-8",i(ye)?"disabled":""]),disabled:i(ye),onClick:je},[m(i(x),{color:"#fff",size:"22",component:i(M)},null,8,["component"])],10,G)])],64))])])),default:v((()=>[c("div",J,[c("div",O,[0===me.value.length?(s(),r("span",Q,"推荐指令")):(s(),r(k,{key:1},[m(i(C),{text:"",onClick:Te},{default:v((()=>[m(i(x),{color:"#999",size:"20",component:i(D)},null,8,["component"])])),_:1}),m(i(z),null,{default:v((()=>[(s(!0),r(k,null,y(me.value,(e=>(s(),d(i(T),{key:e.shortcutId},{default:v((()=>[p(h(e.shortcutTitle),1)])),_:2},1024)))),128))])),_:1})],64))]),c("div",X,[(s(!0),r(k,null,y(pe.value,(e=>(s(),r("div",{class:u(["menu-item",e.children&&e.children.length?"":"selectable",fe.value===e.shortcutId?"selected":""]),key:e.shortcutId,onMouseover:w((()=>fe.value=e.shortcutId),["stop"]),onClick:()=>ze(e)},[c("span",Z,h(e.shortcutTitle),1),c("span",ee,h(e.shortcutDescription),1),e.children&&e.children.length?(s(),d(i(x),{key:0,color:"#999",size:"20",component:i(S)},null,8,["component"])):f("v-if",!0)],42,Y)))),128))])])])),_:1},8,["show"]),m(W,{show:he.value,"onUpdate:show":l[6]||(l[6]=e=>he.value=e)},null,8,["show"]),m($,{show:ke.value,"onUpdate:show":l[7]||(l[7]=e=>ke.value=e)},null,8,["show"])],2))}});export{le as default};
|
@@ -16,7 +16,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
16
16
|
patientInfo: any;
|
17
17
|
state: any;
|
18
18
|
formValue: {
|
19
|
-
businessType:
|
19
|
+
businessType: string;
|
20
20
|
vaa01: null;
|
21
21
|
bck03a: string;
|
22
22
|
};
|
@@ -37,6 +37,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
37
37
|
renderLabel: (option: AnyObject) => string;
|
38
38
|
handleUpdateValue: (value: string, option: SelectOption) => void;
|
39
39
|
handleSearch: (keyword: string) => Promise<void>;
|
40
|
+
handleBusinessTypeUpdate: () => void;
|
40
41
|
handleValidateClick: (e: MouseEvent) => void;
|
41
42
|
NDrawer: any;
|
42
43
|
NDrawerContent: any;
|
@@ -1 +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
|
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 s,createVNode as i,createTextVNode as r,toDisplayString as v}from"vue";import{NDrawer as p,NDrawerContent as d,NForm as f,NFormItem as c,NRadioGroup as b,NRadio as m,NSelect as h,NButton as y}from"naive-ui";import{isFunction as _,isArray as g}from"lodash-es";import{InjectionAIChat as k}from"../types/index.js";var w=e({__name:"ChatPatient",props:{show:{type:Boolean}},emits:["update:show"],setup(e,{emit:w}){const{patientInfo:I,state:T}=a(k),C=t({businessType:"CLINICIAN",vaa01:null,bck03a:""}),q={businessType:{required:!0,trigger:"change",message:"请选择类型"},vaa01:{required:!0,trigger:["blur","change"],message:"请选择患者"}},P=l([]),$=l();function N(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.bck03a=a.bck03a}async function L(e){var a;if(_(null==(a=I.value)?void 0:a.queryPatient))try{const a=await I.value.queryPatient({keyword:e,businessType:C.businessType});if(g(a))return void(P.value=a);P.value=[]}catch(e){P.value=[]}}function x(){C.vaa01=null,C.bck03a="",L("")}function S(e){var a;e.preventDefault(),null==(a=$.value)||a.validate((e=>{e||(T.selectedPatient={...C,...P.value.find((e=>e.vaa01===C.vaa01))},w("update:show",!1))}))}return L(""),(a,t)=>(u(),n(o(p),{placement:"bottom",height:"300","trap-focus":!1,to:"#"+o(T).id,show:e.show,onMaskClick:t[2]||(t[2]=()=>w("update:show",!1))},{default:s((()=>[i(o(d),null,{default:s((()=>[i(o(f),{ref_key:"formRef",ref:$,"label-placement":"left","label-width":"auto",size:"large",model:C,"require-mark-placement":"right-hanging",rules:q},{default:s((()=>[i(o(c),{label:"业务",path:"businessType"},{default:s((()=>[i(o(b),{value:C.businessType,"onUpdate:value":[t[0]||(t[0]=e=>C.businessType=e),x],name:"业务"},{default:s((()=>[i(o(m),{value:"CLINICIAN"},{default:s((()=>[r("门诊")])),_:1}),i(o(m),{value:"HOSPITAL"},{default:s((()=>[r("住院")])),_:1})])),_:1},8,["value"])])),_:1}),i(o(c),{label:"患者",path:"vaa01"},{default:s((()=>[i(o(h),{remote:"",value:C.vaa01,"onUpdate:value":[t[1]||(t[1]=e=>C.vaa01=e),A],placeholder:"请选择患者",filterable:"",options:P.value,"render-label":N,"value-field":"vaa01",onSearch:L},null,8,["value","options"])])),_:1}),i(o(c),{label:"科室"},{default:s((()=>[r(v(C.bck03a),1)])),_:1}),i(o(c),null,{default:s((()=>[i(o(y),{block:"",type:"primary",onClick:S},{default:s((()=>[r("确定")])),_:1})])),_:1})])),_:1},8,["model"])])),_:1})])),_:1},8,["to","show"]))}});export{w as default};
|
@@ -1 +1 @@
|
|
1
|
-
var e="@cnhis-design-vue/shared",i="3.2.13-beta.
|
1
|
+
var e="@cnhis-design-vue/shared",i="3.2.13-beta.13",s="index.ts",n={"naive-ui":"^2.30.0",vue:"^3.2.0"},a={"@vicons/ionicons5":"^0.12.0","lodash-es":"^4.17.21",moment:"^2.29.1","video.js":"^7.19.2","videojs-contrib-hls":"^5.15.0",viewerjs:"^1.10.5","xe-utils":"^3.5.4"},d={name:e,version:"3.2.13-beta.13",private:!0,main:"index.ts",peerDependencies:n,dependencies:a};export{d as default,a as dependencies,s as main,e as name,n as peerDependencies,i as version};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "cnhis-design-vue",
|
3
|
-
"version": "3.2.13-beta.
|
3
|
+
"version": "3.2.13-beta.13",
|
4
4
|
"license": "ISC",
|
5
5
|
"module": "./es/components/index.js",
|
6
6
|
"main": "./es/components/index.js",
|
@@ -72,5 +72,5 @@
|
|
72
72
|
"iOS 7",
|
73
73
|
"last 3 iOS versions"
|
74
74
|
],
|
75
|
-
"gitHead": "
|
75
|
+
"gitHead": "0f7d07e77743ed6ec4ecaa03963252786211141e"
|
76
76
|
}
|