cnhis-design-vue 3.2.19-beta.4 → 3.2.19-beta.7

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 (48) hide show
  1. package/es/components/ai-chat/index.d.ts +17 -146
  2. package/es/components/ai-chat/src/Index.vue.d.ts +17 -146
  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 +2 -54
  6. package/es/components/ai-chat/src/components/ChatFooter.vue2.js +1 -1
  7. package/es/components/ai-chat/src/components/ChatMain.d.ts +7 -1
  8. package/es/components/ai-chat/src/components/ChatMain.js +1 -1
  9. package/es/components/ai-chat/src/utils/index.d.ts +0 -1
  10. package/es/components/ai-chat/src/utils/index.js +1 -1
  11. package/es/components/ai-chat/style/index.css +1 -1
  12. package/es/components/audio-sdk/src/audioSDK.d.ts +7 -6
  13. package/es/components/audio-sdk/src/audioSDK.js +1 -1
  14. package/es/components/audio-sdk/src/utils/recordingModal.d.ts +1 -2
  15. package/es/components/audio-sdk/src/utils/recordingModal.js +1 -1
  16. package/es/components/button-print/src/components/OldPrintComponent.vue2.js +1 -1
  17. package/es/components/editor/src/Editor.js +1 -1
  18. package/es/components/editor/style/index.css +0 -1
  19. package/es/components/field-set/src/FieldColor.vue.d.ts +4 -4
  20. package/es/components/field-set/src/FieldFilter.vue.d.ts +4 -4
  21. package/es/components/field-set/src/FieldSet.vue.d.ts +5 -5
  22. package/es/components/field-set/src/components/table-row.vue.d.ts +4 -4
  23. package/es/components/index.css +1 -1
  24. package/es/components/shortcut-provider/src/hooks/useShortcuts.js +1 -1
  25. package/es/components/shortcut-provider/src/types/index.d.ts +1 -0
  26. package/es/shared/package.json.js +1 -1
  27. package/package.json +2 -2
  28. package/es/components/ai-chat/src/api/index.d.ts +0 -6
  29. package/es/components/ai-chat/src/api/index.js +0 -1
  30. package/es/components/ai-chat/src/components/ChatAudio.vue.d.ts +0 -43
  31. package/es/components/ai-chat/src/components/ChatAudio.vue.js +0 -1
  32. package/es/components/ai-chat/src/components/ChatAudio.vue2.js +0 -1
  33. package/es/components/ai-chat/src/components/ChatMainInner.d.ts +0 -2
  34. package/es/components/ai-chat/src/components/ChatMainInner.js +0 -1
  35. package/es/components/ai-chat/src/components/ChatRight.vue.d.ts +0 -56
  36. package/es/components/ai-chat/src/components/ChatRight.vue.js +0 -1
  37. package/es/components/ai-chat/src/components/ChatRight.vue2.js +0 -1
  38. package/es/components/ai-chat/src/components/card/JsonCard.d.ts +0 -25
  39. package/es/components/ai-chat/src/components/card/JsonCard.js +0 -1
  40. package/es/components/ai-chat/src/components/card/SelectIcon.d.ts +0 -14
  41. package/es/components/ai-chat/src/components/card/SelectIcon.js +0 -1
  42. package/es/components/ai-chat/src/hooks/useProgram.d.ts +0 -6
  43. package/es/components/ai-chat/src/hooks/useProgram.js +0 -1
  44. package/es/components/ai-chat/src/hooks/useWebsocket.d.ts +0 -2
  45. package/es/components/ai-chat/src/hooks/useWebsocket.js +0 -1
  46. package/es/shared/assets/img/file-emr.png.js +0 -1
  47. package/es/shared/assets/img/file.png.js +0 -1
  48. package/es/shared/assets/img/use.png.js +0 -1
@@ -1 +1 @@
1
- import{findAncestor as t}from"../../../../shared/utils/index.js";import{useEventListener as e,useDebounceFn as r}from"@vueuse/core";import{once as s,pick as a,omit as n,isFunction as u,isString as c}from"lodash-es";import{reactive as i,ref as o,unref as l,computed as h,getCurrentInstance as d,inject as g,onBeforeUnmount as p,onDeactivated as b,onActivated as f}from"vue";import{ShortcutStatus as v,InjectionShortcutManager as k}from"../constants/index.js";import{normalizeSignatureInfo as y,getKeySignature as C,getDisplaySignature as m,isInvalidSignature as S,isKeyboardEvent as E,isInvalidSignatureAtInput as w,isShortcutProvider as M}from"../utils/index.js";const T=Symbol("Glob"),K=new Map;class I{constructor(t,e=T){this.shortcutCallbackMap=i(new Map),this.shortcutCache=o({}),this.disabled=!1,this.environmentEle=t||window,K.set(e,this)}static log(t,e=!1){const r=`[ShortcutManager] ${t}`;return!e&&console.warn(r),r}get traverse(){return[...Object.values(this.shortcutCache.value)].sort(((t,e)=>(t.order||0)-(e.order||0)))}query(t){return this.shortcutCache.value[t]}async update(t,e){var r,s;const a=null==(r=this.query(t))?void 0:r.currentKeySignature;e&&c(this.shortcutCache,e);const n=this.query(t);if(!n)return;await(null==(s=n.onUpdate)?void 0:s.call(n,t,e?y(e):void 0)),c(this.shortcutCache,e),n.currentKeySignature=C(e),n.shortcutSignature=y(e);const u=this.shortcutCallbackMap.get(a);function c(t,e){if(a!==C(e)){if(Object.values(t.value).some((t=>t.currentKeySignature===C(e))))throw`重复的快捷键=> ${m(e)}`;if(S(e))throw`非法的快捷键=>${e.key}`}}this.shortcutCallbackMap.delete(a),this.shortcutCallbackMap.set(n.currentKeySignature,u)}register(t){const e=this.query(t.key);return e?(e.status=v.ACTIVE,this.shortcutCallbackMap.set(e.currentKeySignature,t.callback),Object.assign(e,a(t,["debounce","debounceOption","label","order","key"])),r(e)):(this.shortcutCache.value[t.key]=n(t,["callback"]),this.shortcutCallbackMap.set(t.currentKeySignature,t.callback),r(this.shortcutCache.value[t.key]));function r(t){return{stop:()=>{t.status=v.INACTIVE},start:()=>{t.status=v.ACTIVE},signature:()=>t.currentKeySignature}}}start(){return this.handle?(I.log(`请勿重复启动=>${this}`),this):(this.handle=async e=>{if(!E(e)||this.disabled)return;const r=t(e.target,M);if(r&&r!==l(this.environmentEle)||w(e))return;const s=C(e),a=this.shortcutCallbackMap.get(s);if(!a)return;const n=Object.values(this.shortcutCache.value).find((t=>t.currentKeySignature===s));if(n&&n.status===v.ACTIVE&&!n.disabled&&(!u(n.beforeTrigger)||n.beforeTrigger(e))){if(!n.triggerOnInput){const t=e.target;if(["INPUT","TEXTAREA"].includes(t.tagName))return}e.preventDefault(),a(e)}},e(this.environmentEle,"keyup",this.handle,{capture:!0}),this)}destroy(){var t;this.handle&&(null==(t=l(this.environmentEle))||t.removeEventListener("keyup",this.handle,{capture:!0})),this.handle=void 0,this.clear()}clear(){this.shortcutCallbackMap.clear(),this.shortcutCache.value={}}}const j=(new I).start(),A=s((()=>I.log("非setup语境下的shortcut将影响全局"))),O=s((()=>I.log("在非setup语境下使用register函数,组件销毁时可能需要手动调用stop函数使快捷键失活")));function $(t){const e=h((()=>{if(l(t)){const e=K.get(l(t));return e||I.log(`不存在的scope=>${t}, 将使用全局快捷键`),e||j}return d()?g(k,j):(A(),j)}));return{register:function(t){const{stop:s,signature:a,start:n}=l(e).register(function(t){return{...t,shortcutSignature:y(t.shortcutSignature),currentKeySignature:C(t.shortcutSignature),key:function(t){const e=t.key||t.label;if(!c(e))throw new Error(I.log(`非法的key类型=>${e}`,!0));return e}(t),status:v.ACTIVE,callback:function(t){var e,s;if(!u(t.callback))throw new Error(I.log(`非法的callback类型=>${t.callback}`,!0));return t.debounce?r(t.callback,null!=(s=null==(e=t.debounceOption)?void 0:e.duration)?s:300):t.callback}(t)}}(t));return d()?(p(s),b(s),f(n)):O(),{stop:s,signature:a,start:n}},traverse:function(){return l(e).traverse},clear:function(){l(e).clear()},update:function(t,r){return l(e).update(t,r)},updateManagerDisabled:function(t){l(e).disabled=!!t}}}export{T as GlobalShortcutProvider,I as ShortcutManager,$ as useShortcuts};
1
+ import{findAncestor as t}from"../../../../shared/utils/index.js";import{useEventListener as e,useDebounceFn as r}from"@vueuse/core";import{once as s,pick as a,omit as n,isFunction as u,isString as c}from"lodash-es";import{reactive as i,ref as o,unref as l,computed as h,getCurrentInstance as d,inject as g,onBeforeUnmount as b,onDeactivated as p,onActivated as f}from"vue";import{ShortcutStatus as v,InjectionShortcutManager as k}from"../constants/index.js";import{normalizeSignatureInfo as y,getKeySignature as C,getDisplaySignature as m,isInvalidSignature as S,isKeyboardEvent as w,isInvalidSignatureAtInput as E,isShortcutProvider as M}from"../utils/index.js";const T=Symbol("Glob"),K=new Map;class I{constructor(t,e=T){this.shortcutCallbackMap=i(new Map),this.shortcutCache=o({}),this.disabled=!1,this.environmentEle=t||window,K.set(e,this)}static log(t,e=!1){const r=`[ShortcutManager] ${t}`;return!e&&console.warn(r),r}get traverse(){return[...Object.values(this.shortcutCache.value)].sort(((t,e)=>(t.order||0)-(e.order||0)))}query(t){return this.shortcutCache.value[t]}async update(t,e){var r,s;const a=null==(r=this.query(t))?void 0:r.currentKeySignature;e&&c(this.shortcutCache,e);const n=this.query(t);if(!n)return;await(null==(s=n.onUpdate)?void 0:s.call(n,t,e?y(e):void 0)),c(this.shortcutCache,e),n.currentKeySignature=C(e),n.shortcutSignature=y(e);const u=this.shortcutCallbackMap.get(a);function c(t,e){if(a!==C(e)){if(Object.values(t.value).some((t=>t.currentKeySignature===C(e))))throw`重复的快捷键=> ${m(e)}`;if(S(e))throw`非法的快捷键=>${e.key}`}}this.shortcutCallbackMap.delete(a),this.shortcutCallbackMap.set(n.currentKeySignature,u)}register(t){const e=this.query(t.key);return e?(e.status=v.ACTIVE,this.shortcutCallbackMap.set(e.currentKeySignature,t.callback),Object.assign(e,a(t,["debounce","debounceOption","label","order","key"])),r(e)):(this.shortcutCache.value[t.key]=n(t,["callback"]),this.shortcutCallbackMap.set(t.currentKeySignature,t.callback),r(this.shortcutCache.value[t.key]));function r(t){return{stop:()=>{t.status=v.INACTIVE},start:()=>{t.status=v.ACTIVE},signature:()=>t.currentKeySignature}}}start(){return this.handle?(I.log(`请勿重复启动=>${this}`),this):(this.handle=async e=>{if(!w(e)||this.disabled)return;const r=t(e.target,M);if(r&&r!==l(this.environmentEle))return;const s=C(e),a=this.shortcutCallbackMap.get(s);if(!a)return;const n=Object.values(this.shortcutCache.value).find((t=>t.currentKeySignature===s));if(n&&n.status===v.ACTIVE&&!n.disabled&&(!E(e)||n.allowPureNumber&&/^\d$/.test(e.key))&&(!u(n.beforeTrigger)||n.beforeTrigger(e))){if(!n.triggerOnInput){const t=e.target;if(["INPUT","TEXTAREA"].includes(t.tagName))return}e.preventDefault(),a(e)}},e(this.environmentEle,"keyup",this.handle,{capture:!0}),this)}destroy(){var t;this.handle&&(null==(t=l(this.environmentEle))||t.removeEventListener("keyup",this.handle,{capture:!0})),this.handle=void 0,this.clear()}clear(){this.shortcutCallbackMap.clear(),this.shortcutCache.value={}}}const $=(new I).start(),j=s((()=>I.log("非setup语境下的shortcut将影响全局"))),A=s((()=>I.log("在非setup语境下使用register函数,组件销毁时可能需要手动调用stop函数使快捷键失活")));function O(t){const e=h((()=>{if(l(t)){const e=K.get(l(t));return e||I.log(`不存在的scope=>${t}, 将使用全局快捷键`),e||$}return d()?g(k,$):(j(),$)}));return{register:function(t){const{stop:s,signature:a,start:n}=l(e).register(function(t){return{...t,shortcutSignature:y(t.shortcutSignature),currentKeySignature:C(t.shortcutSignature),key:function(t){const e=t.key||t.label;if(!c(e))throw new Error(I.log(`非法的key类型=>${e}`,!0));return e}(t),status:v.ACTIVE,callback:function(t){var e,s;if(!u(t.callback))throw new Error(I.log(`非法的callback类型=>${t.callback}`,!0));return t.debounce?r(t.callback,null!=(s=null==(e=t.debounceOption)?void 0:e.duration)?s:300):t.callback}(t)}}(t));return d()?(b(s),p(s),f(n)):A(),{stop:s,signature:a,start:n}},traverse:function(){return l(e).traverse},clear:function(){l(e).clear()},update:function(t,r){return l(e).update(t,r)},updateManagerDisabled:function(t){l(e).disabled=!!t}}}export{T as GlobalShortcutProvider,I as ShortcutManager,O as useShortcuts};
@@ -36,6 +36,7 @@ export type ShortcutOption = {
36
36
  duration?: number;
37
37
  };
38
38
  triggerOnInput: boolean;
39
+ allowPureNumber: boolean;
39
40
  beforeTrigger: (event: KeyboardEvent) => boolean;
40
41
  /**
41
42
  * 快捷键编辑组件的操作按钮
@@ -1 +1 @@
1
- var e="@cnhis-design-vue/shared",i="3.2.19-beta.4",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.19-beta.4",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};
1
+ var e="@cnhis-design-vue/shared",i="3.2.19-beta.7",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.19-beta.7",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.19-beta.4",
3
+ "version": "3.2.19-beta.7",
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": "4c1c2b6747bf7f88479421487b82a3f64cc69ed5"
75
+ "gitHead": "4fd8941957fbd878eb275d5565665db97bc455e8"
76
76
  }
@@ -1,6 +0,0 @@
1
- import { AnyObject } from '../../../../shared/types';
2
- export declare const instanceAxios: import("axios").AxiosInstance;
3
- export declare function uploadFileApi(params: FormData): import("axios").AxiosPromise<any>;
4
- export declare function conversationApi(params: AnyObject): import("axios").AxiosPromise<any>;
5
- export declare function saveApi(params: AnyObject): import("axios").AxiosPromise<any>;
6
- export declare function getHistoryRecordApi(params: AnyObject): import("axios").AxiosPromise<any>;
@@ -1 +0,0 @@
1
- import e from"axios";import{createDiscreteApi as a}from"naive-ui";const{message:t}=a(["message"]),o=e.create({withCredentials:!0,timeout:5e4});function r(e){return o({headers:{"Content-Type":"multipart/form-data"},method:"post",url:"/storage-service/storage/uploadFile",data:e})}function s(e){return o({method:"post",url:"/flow/api/opd/conversation",data:e})}function i(e){return o({method:"put",url:"/flow/api/opd/message",data:e})}function n(e){return o({method:"get",url:`/flow/api/dialog/${e.sessionId}/messages`,params:{page:e.page||1,pageSize:e.pageSize||20}})}o.interceptors.response.use((e=>{var a,o,r;if(null==(a=e.data)?void 0:a.success)return null==(o=e.data)?void 0:o.data;500==(null==(r=e.data)?void 0:r.code)&&e.data.msg&&t.error(e.data.msg)}));export{s as conversationApi,n as getHistoryRecordApi,o as instanceAxios,i as saveApi,r as uploadFileApi};
@@ -1,43 +0,0 @@
1
- import { CAudioSDK } from '../../../../components/audio-sdk';
2
- declare const _default: import("vue").DefineComponent<{
3
- show: {
4
- type: BooleanConstructor;
5
- };
6
- }, {
7
- audioSdk: CAudioSDK;
8
- props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
9
- show: {
10
- type: BooleanConstructor;
11
- };
12
- }>> & {
13
- "onUpdate:show"?: ((...args: any[]) => any) | undefined;
14
- }>>;
15
- emit: (event: "update:show", ...args: any[]) => void;
16
- state: any;
17
- vaa07: any;
18
- immediatelyRecording: any;
19
- time: import("vue").Ref<number>;
20
- endType: string;
21
- pause: import("@vueuse/shared").Fn;
22
- resume: import("@vueuse/shared").Fn;
23
- isActive: import("vue").Ref<boolean>;
24
- tip: import("vue").ComputedRef<"正在录音中..." | "录音已暂停">;
25
- formattedTime: import("vue").ComputedRef<string>;
26
- start: () => Promise<void>;
27
- handlePause: () => void;
28
- handlePlay: () => void;
29
- handleEnd: (trigger?: string) => Promise<void>;
30
- NSpace: any;
31
- NButton: any;
32
- NIcon: any;
33
- StopCircleOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
34
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:show"[], "update:show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
35
- show: {
36
- type: BooleanConstructor;
37
- };
38
- }>> & {
39
- "onUpdate:show"?: ((...args: any[]) => any) | undefined;
40
- }, {
41
- show: boolean;
42
- }>;
43
- export default _default;
@@ -1 +0,0 @@
1
- import e from"./ChatAudio.vue2.js";import r from"../../../../_virtual/_plugin-vue_export-helper.js";var o=r(e,[["__file","ChatAudio.vue"]]);export{o as default};
@@ -1 +0,0 @@
1
- import{defineComponent as o,inject as e,ref as t,computed as a,watch as i,onBeforeUnmount as n,withDirectives as r,openBlock as s,createElementBlock as l,unref as u,createBlock as c,createCommentVNode as d,createElementVNode as p,toDisplayString as m,normalizeStyle as f,createVNode as v,withCtx as w,createTextVNode as h,vShow as y}from"vue";import{NIcon as g,NSpace as _,NButton as F}from"naive-ui";import{StopCircleOutline as k}from"@vicons/ionicons5";import{InjectionAIChat as S}from"../types/index.js";import{useIntervalFn as $,promiseTimeout as x}from"@vueuse/core";import C from"../../../audio-sdk/src/audioSDK.js";import{uploadFileApi as j}from"../api/index.js";import{uuidGenerator as M}from"../../../../shared/utils/index.js";const z={class:"ai-chat__audio"};var I=o({__name:"ChatAudio",props:{show:{type:Boolean}},emits:["update:show"],setup(o,{emit:I}){const A=o,B=C.create(),{state:D,vaa07:T,immediatelyRecording:b}=e(S),q=t(0);let K="";const{pause:L,resume:N,isActive:O}=$((()=>{q.value++}),1e3,{immediate:!1}),R=a((()=>O.value?"正在录音中...":"录音已暂停")),U=a((()=>{const o=Math.floor(q.value/3600),e=Math.floor(q.value%3600/60),t=q.value%60,a=e.toString().padStart(2,"0"),i=t.toString().padStart(2,"0");if(o>0){return`${o.toString().padStart(2,"0")}:${a}:${i}`}return`${a}:${i}`}));function E(){L(),B.pause()}function G(){N(),B.resume()}async function H(o){K=o||"",null==B||B.stop(),I("update:show",!1)}return i((()=>A.show),(o=>{o?(K="",q.value=0,N(),async function(){try{const o=await B.start(void 0,{timed:1800,recognizable:!1,showModal:!1});if(I("update:show",!1),"click"!==K)return;const{result:e,data:t}=o||{};if("success"!==e)return;if(t){const o=new File([t],`${M()}.mp3`,{type:t.type}),e=new FormData;e.append("file",o),e.append("channelId","MINIO");const a=await j(e),i=(null==a?void 0:a.path)||"";console.log("音频地址 ==>",i),D.params={audioUrl:i,opType:"create_inquiry"},D.sending=!0,D.loading=!0,D.loadingText="系统正在对您的对话内容进行梳理整合,转化为规范的结构化问诊记录"}}catch(o){console.log(o)}}()):L()}),{immediate:!0}),i((()=>T.value),(async o=>{const e=A.show;A.show&&H(),b.value&&(e&&await x(10),I("update:show",!0))}),{immediate:!0}),n((()=>{C.destroy()})),(e,t)=>r((s(),l("div",z,[u(O)?d("v-if",!0):(s(),c(u(g),{key:0,size:"42",color:"#FF1818",component:u(k)},null,8,["component"])),p("p",null,m(u(R)),1),p("h3",{style:f(u(O)?"":"color: #FF1818")},m(u(U)),5),v(u(_),{"wrap-item":!1,size:15},{default:w((()=>[r(v(u(F),{round:"",onClick:E},{default:w((()=>[h("暂停")])),_:1},512),[[y,u(O)]]),r(v(u(F),{round:"",onClick:G},{default:w((()=>[h("继续")])),_:1},512),[[y,!u(O)]]),v(u(F),{round:"",color:"#FF1818",onClick:t[0]||(t[0]=()=>H("click"))},{default:w((()=>{var o;return[h((null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.77"))||"结束")]})),_:1})])),_:1})],512)),[[y,o.show]])}});export{I as default};
@@ -1,2 +0,0 @@
1
- declare const _default: import("vue").DefineComponent<{}, () => JSX.Element[], {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
2
- export default _default;
@@ -1 +0,0 @@
1
- import{defineComponent as e,inject as n,ref as t,watch as o,createVNode as s,nextTick as a,resolveComponent as r}from"vue";import{InjectionAIChat as l}from"../types/index.js";import{isArray as i,cloneDeep as c,isFunction as u}from"lodash-es";import{uuidGenerator as d}from"../../../../shared/utils/index.js";import"naive-ui";import{useLocalStorage as m}from"@vueuse/core";import"date-fns";import"@vue/shared";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{useScrollLoading as p}from"../../../../shared/hooks/useScrollLoading.js";import v from"./card/JsonCard.js";import{getHistoryRecordApi as g,conversationApi as h}from"../api/index.js";import{useProgram as f}from"../hooks/useProgram.js";var y=e({name:"ChatMain",inheritAttrs:!1,components:{JsonCard:v},setup(e,{attrs:v,slots:y,emit:j}){const x=m("aISessionIdMap",new Map),{patientInfo:C,state:b,vaa07:I}=n(l),{programMethod:M,MedicalOrderId:T}=f(),w=t(null),_=t([]),k={page:0,hasMore:!0};async function S(){if(!I.value)return;const e=x.value.get(I.value);if(!k.hasMore||!e)return;k.page++,1==k.page&&(_.value=[]);const n=await g({sessionId:e,page:k.page,pageSize:20}),{rows:t,query:o={}}=n||{};i(t)&&(t.forEach((e=>{i(e.contents)&&e.contents.length>1&&e.contents.reverse()})),_.value.length<=+o.records&&(_.value=k.page>1?[..._.value,...t]:t,_.value.length>=+o.records&&(k.hasMore=!1,console.log("没有更多消息了"))))}async function q(e){var n;i(e.contents)&&(_.value.unshift(e),await a(),null==(n=w.value)||n.scrollTo({top:0,behavior:"auto"}))}function O(e,n){var t,o;return"json"===(null==(o=null==(t=null==e?void 0:e.contents)?void 0:t[n])?void 0:o.contentType)}function J(e,n){var t;const{contents:o=[],msgId:a=""}=e;if("json"===(null==(t=o[n])?void 0:t.contentType))return function(e,n){return s(r("json-card"),{item:e,messageItem:n},null)}(e,o[n]);const l=o[n].content.replace(/\\n|\n|\r\n/g,"<br>").split("<br>").filter((e=>!!e)).map(((e,n,t)=>[e,n===t.length-1?null:s("br",null,null)]));return l.length?[l]:null}function R({role:e=""}){return"user"===e}return p(w,(()=>{S()}),"top"),o((()=>I.value),(e=>{b.showRight=!1,_.value=[],k.page=0,k.hasMore=!0,S()}),{immediate:!0}),o((()=>b.reportContent),(e=>{e&&(q(e),b.reportContent=null)})),o((()=>b.sending),(async e=>{var n,t,o;if(e){const{opType:e}=b.params||{};if(!e&&b.sendContent&&(_.value.unshift({msgId:d(),contents:[{role:"user",content:b.sendContent}]}),null==(n=w.value)||n.scrollTo({top:0,behavior:"auto"})),e&&["recommend_treatment_plan","recommend_diagnosis","recommend_examination"].includes(e)){if(_.value.length>0){const e=_.value.find((e=>{var n;return!R(null==(n=null==e?void 0:e.contents)?void 0:n[0])}));e&&Object.assign(b.params,c(e))}Object.assign(b.params,{contents:[{role:"user",content:"",contentType:"text"}]})}try{const n=await h({contents:[{role:"user",content:b.sendContent,contentType:"text"}],platform:"web",sessionType:"text_chat",source:"global",configs:C.value.info,...b.params});n.sessionId&&I.value&&!x.value.get(I.value)&&x.value.set(I.value,n.sessionId),"diagnosis"===e&&(b.refreshMedical=!0),i(n.contents)&&n.contents.length>1&&n.contents.reverse(),q(n),e&&["create_inquiry","create_medical"].includes(e)&&(b.showRight=!0,"create_inquiry"===e?b.consultationContent=n:(b.consultationContent=null,await M(T,{vac01:(null==(o=null==(t=C.value)?void 0:t.info)?void 0:o.vac01)||"1878974046080958465",type:1}))),e||(b.sendContent=""),b.params={}}catch(e){console.log("error ==>",e)}finally{b.sending=!1,b.loading=!1,b.loadingText=""}}})),()=>[s("section",{class:"chat-main",ref:w,style:"column-reverse"},[[b.loading?s("div",{class:"message-item"},[s("div",{class:"content-box"},[s("div",{class:"content loading"},[s("span",{class:"loading-icon"},null),s("span",null,[b.loadingText||"正在整合数据..."])])])]):null,_.value.map((e=>e.contents.map(((n,t)=>J(e,t)?s("div",{class:"message-item",key:e.msgId+t},[s("div",{class:["content-box",R(n)?"mine":""]},[s("div",{class:["content",{"content-json":!u(n.render)&&O(e,t)}]},[u(n.render)?n.render():J(e,t)])])]):null))))]])]}});export{y as default};
@@ -1,56 +0,0 @@
1
- import { AnyObject } from '../../../../shared/types';
2
- declare const _default: import("vue").DefineComponent<{}, {
3
- medicalLabel: {
4
- key: string;
5
- title: string;
6
- }[];
7
- state: any;
8
- patientInfo: any;
9
- toolbarConfig: {
10
- toolbarKeys: never[];
11
- };
12
- content: import("vue").Ref<string>;
13
- key: import("vue").Ref<string>;
14
- handleSave: () => Promise<void>;
15
- createMedicalRecord: () => void;
16
- extractContentByTitle: () => AnyObject;
17
- NIcon: any;
18
- NSpace: any;
19
- NButton: any;
20
- Editor: import("../../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{
21
- editorConfig: {
22
- type: ObjectConstructor;
23
- };
24
- toolbarConfig: {
25
- type: ObjectConstructor;
26
- };
27
- uploadImgUrl: {
28
- type: StringConstructor;
29
- };
30
- isDisabled: {
31
- type: BooleanConstructor;
32
- default: boolean;
33
- };
34
- }, {
35
- editorRef: import("vue").ShallowRef<any>;
36
- renderVN: () => JSX.Element;
37
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, never[], never, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
38
- editorConfig: {
39
- type: ObjectConstructor;
40
- };
41
- toolbarConfig: {
42
- type: ObjectConstructor;
43
- };
44
- uploadImgUrl: {
45
- type: StringConstructor;
46
- };
47
- isDisabled: {
48
- type: BooleanConstructor;
49
- default: boolean;
50
- };
51
- }>> & {}, {
52
- isDisabled: boolean;
53
- }>>;
54
- CloseOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
55
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
56
- export default _default;
@@ -1 +0,0 @@
1
- import t from"./ChatRight.vue2.js";import e from"../../../../_virtual/_plugin-vue_export-helper.js";var r=e(t,[["__file","ChatRight.vue"]]);export{r as default};
@@ -1 +0,0 @@
1
- import{defineComponent as t,inject as n,reactive as e,ref as o,watch as i,withDirectives as l,openBlock as a,createElementBlock as s,createElementVNode as c,vShow as r,unref as u,createVNode as d,withCtx as y,createTextVNode as p}from"vue";import{NButton as f,NIcon as k,NSpace as m}from"naive-ui";import{InjectionAIChat as g}from"../types/index.js";import{$message as _}from"../utils/index.js";import h from"../../../editor/index.js";import{CloseOutline as v}from"@vicons/ionicons5";import{saveApi as j}from"../api/index.js";const C={class:"ai-chat__right"},w={class:"header"},b={class:"main"};var x=t({__name:"ChatRight",setup(t){const x=[{key:"zs_yy",title:"主诉"},{key:"xbs_fuk",title:"现病史"},{key:"jws_vtk",title:"既往史"},{key:"patient_allergy_sync",title:"过敏史"},{key:"tgjcms_wsssss",title:"体格检查描述"},{key:"marriage",title:"婚姻状况"},{key:"nation",title:"民族"},{key:"profession",title:"职业"},{key:"jkzk_wyuu",title:"一般健康状况"},{key:"ryljlz_tbyvrt",title:"外长期居住史"},{key:"yjbz_qisf1",title:"饮酒标志"},{key:"gydwufcjfsxwzjcs_aogt_oietyntrrqk",title:"工业毒物、粉尘及放射性物质接触史"},{key:"yqtysjcs_ua_uirqk",title:"疫区、疫水接触史"},{key:"ryct_tbsw",title:"入院查体"},{key:"fzjclg_lessxj",title:"辅助检查结果"},{key:"o_hn_iyjc_hr",title:"互认回填"},{key:"cbzd_phyo",title:"初步诊断"},{key:"zljh_yuya",title:"诊疗计划"},{key:"wdcqjzs_qftanwk",title:"外地长期居住史"}],{state:z,patientInfo:q}=n(g),R=e({toolbarKeys:[]}),D=o(""),$=o(Date.now().toString());async function I(){var t;try{const n=E();z.consultationContent.contents[0].content.details.autoBackFillData=n,await j({msgId:z.consultationContent.msgId,contents:z.consultationContent.contents,configs:null==(t=q.value)?void 0:t.info}),_.success("保存成功")}catch(t){console.log("error ==>",t)}}function B(){const t=E();console.log("json ==>",t,z.consultationContent),z.consultationContent.contents[0].content.details.autoBackFillData=t,z.params={opType:"create_medical",...z.consultationContent,contents:[{role:"user",content:"",contentType:"text"}],medicalInfo:z.consultationContent},z.sending=!0,z.loading=!0,z.loadingText="系统进入深度分析模式,正在整合数据,调取主诉,获取现病史、既往病史,读取过敏史,综合多维度信息生成诊断建议"}function E(){const t={};return x.forEach((n=>{const e=new RegExp(`<p><span.*?><strong>\\d+、${n.title}<\\/strong><\\/span><\\/p><p>(.*?)<\\/p>`,"i"),o=D.value.match(e);if(o&&o[1]){const e=o[1].trim();t[n.key]="<br>"===e?"":e}})),t}return i((()=>z.consultationContent),(t=>{var n,e,o;if(t){const{autoBackFillData:i}=(null==(o=null==(e=null==(n=null==t?void 0:t.contents)?void 0:n[0])?void 0:e.content)?void 0:o.details)||{};if(!i)return;x.forEach(((t,n)=>{D.value+=`<p><span style="font-size: 16px;"><strong>${n+1}、${t.title}</strong></span></p><p><span>${i[t.key]||""}</span></p><p>${n<x.length-1?"<br>":""}`}))}})),i((()=>z.showRight),(t=>{t||(z.consultationContent=null)})),i((()=>z.refreshMedical),(t=>{t&&($.value=Date.now().toString(),z.refreshMedical=!1)})),(t,n)=>l((a(),s("div",C,[c("div",w,[l(c("h4",null,"问诊记录",512),[[r,u(z).consultationContent]]),d(u(f),{quaternary:"",onClick:n[0]||(n[0]=()=>u(z).showRight=!1)},{icon:y((()=>[d(u(k),{size:"20",component:u(v)},null,8,["component"])])),_:1})]),l(c("div",b,[d(u(h),{"toolbar-config":R,modelValue:D.value,"onUpdate:modelValue":n[1]||(n[1]=t=>D.value=t)},null,8,["toolbar-config","modelValue"]),d(u(m),{class:"footer","wrap-item":!1},{default:y((()=>[d(u(f),{round:"",class:"gradient",disabled:u(z).loading,onClick:B},{default:y((()=>[p("审核完成")])),_:1},8,["disabled"]),d(u(f),{round:"",onClick:I},{default:y((()=>[p("暂存")])),_:1})])),_:1})],512),[[r,u(z).consultationContent]]),l((a(),s("div",{class:"main",id:"aiChatMedicalRecord",key:$.value})),[[r,!u(z).consultationContent]])],512)),[[r,u(z).showRight]])}});export{x as default};
@@ -1,25 +0,0 @@
1
- import { PropType } from 'vue';
2
- import { AnyObject } from '../../../../../shared/types';
3
- declare const _default: import("vue").DefineComponent<{
4
- item: {
5
- type: PropType<AnyObject>;
6
- default: () => {};
7
- };
8
- messageItem: {
9
- type: PropType<AnyObject>;
10
- default: () => {};
11
- };
12
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, never[], never, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
13
- item: {
14
- type: PropType<AnyObject>;
15
- default: () => {};
16
- };
17
- messageItem: {
18
- type: PropType<AnyObject>;
19
- default: () => {};
20
- };
21
- }>> & {}, {
22
- item: AnyObject;
23
- messageItem: AnyObject;
24
- }>;
25
- export default _default;
@@ -1 +0,0 @@
1
- import{defineComponent as e,inject as a,ref as i,computed as s,createVNode as l,resolveComponent as n,createTextVNode as t}from"vue";import{NSpace as o,NIcon as d,NImage as c,NButton as r}from"naive-ui";import m from"../../../../../shared/assets/img/file.png.js";import u from"../../../../../shared/assets/img/file-emr.png.js";import p from"../../../../../shared/assets/img/use.png.js";import{CheckmarkCircle as v}from"@vicons/ionicons5";import g from"./SelectIcon.js";import{InjectionAIChat as f}from"../../types/index.js";import{useProgram as h}from"../../hooks/useProgram.js";import{isArray as y,isString as b}from"lodash-es";var x=e({name:"ChatJsonCard",inheritAttrs:!1,props:{item:{type:Object,default:()=>({})},messageItem:{type:Object,default:()=>({})}},components:{NSpace:o,NIcon:d,NImage:c,SelectIcon:g},emits:[],setup(e,{attrs:o,slots:d,emit:c}){const{state:g,patientInfo:x}=a(f),{programMethod:_,MedicalOrderId:C,ReportId:I}=h(),{messageType:k,content:T}=e.messageItem,j=i([]),w=i([]),N=s((()=>{var e,a;return(null==(a=null==(e=x.value)?void 0:e.info)?void 0:a.vac01)||"1878974046080958465"})),S=s((()=>null==T?void 0:T.diagnosis)),E=s((()=>{var e;return"diagnosis_added"===k&&(null==(e=S.value)?void 0:e.length)})),O=s((()=>E.value||"medical_added"===k)),q=s((()=>"diagnosis"===k||"diagnosis_added"===k||"treatment_plan"===k));var D,P;"diagnosis_added"===k&&(j.value=null==(P=null==(D=T.recommendedExaminations)?void 0:D.map)?void 0:P.call(D,(e=>e.name)));const A=(e,a="name")=>{w.value.includes(e[a])?w.value=w.value.filter((i=>i!==e[a])):w.value.push(e[a])};function J(a,i){var s,l;null==(s=null==a?void 0:a.preventDefault)||s.call(a),null==(l=null==a?void 0:a.stopPropagation)||l.call(a);let n=i?[i]:[];arguments.length||(n=T.possibleConditions.filter((e=>w.value.includes(e.code)))),n.length&&(g.params={...e.item,opType:"diagnosis",contents:[{role:"user",content:"",contentType:"text"}],possibleConditions:n},g.sending=!0,g.loading=!0,g.loadingText="依据当前诊断与病历内容分析,正在筛为您筛选和匹配最适合的检验检查项目")}async function L(a,i){var s,l;if(b(a)||(null==(s=null==a?void 0:a.preventDefault)||s.call(a),null==(l=null==a?void 0:a.stopPropagation)||l.call(a)),"edit"===a){const e=i?j.value.includes(i.name)?[i.name]:[]:[...j.value];await _(C,{bbx05List:JSON.stringify(e),vac01:N.value,type:3})}else{let a=i?[i]:[];i||(a=T.recommendedExaminations.filter((e=>j.value.includes(e.name)))),g.params={...e.item,opType:"medical_order",contents:[{role:"user",content:"",contentType:"text"}],recommendedExaminations:a},g.sending=!0,g.loading=!0}}const M=async()=>{var e;const a=(null==(e=T.reports)?void 0:e[0])||{};await _(I,{vaa07:N.value,reportType:a.reportType,reportId:a.reportId})},R=async(e,a)=>{var i,s;null==(i=null==e?void 0:e.preventDefault)||i.call(e),null==(s=null==e?void 0:e.stopPropagation)||s.call(e);const l=a?[a.name]:w.value;await _(C,{drugNameList:JSON.stringify(l),vac01:N.value,type:3})},z=e=>{if(!("diagnosis_added"===k?!j.value.length:!w.value.length))return"diagnosis"===k?J():"diagnosis_added"===k?L(e):"treatment_plan"===k?R():void 0};async function H(){g.showRight=!0,"medical"===k?(async()=>{g.consultationContent=null,await _(C,{vac01:N.value,type:1})})():g.consultationContent=e.item}const W=()=>l("div",{class:"diagnosis-added-box"},[l("div",{class:"recommended-wrap"},[l("div",{class:"title"},[t("检验检查推荐")]),T.recommendedExaminations.map((e=>l("div",{class:"recommended-item"},[l("div",{class:"top"},[l("div",{class:"left-tag"},[l("span",{class:["recommended-tag",{active:j.value.includes(e.name)}],onClick:()=>(e=>{j.value.includes(e.name)?j.value=j.value.filter((a=>a!==e.name)):j.value.push(e.name)})(e)},[e.name,l(n("select-icon"),{class:"select-icon",width:16},null)])]),l("img",{class:"right-icon",src:p,onClick:a=>L(a,e)},null)]),l("div",{class:"desc"},[e.description])])))])]);const $=()=>{if(!O.value)return null;return("medical_added"===k?[{}]:S.value).map((e=>l("div",{class:"card-header"},[l("span",{class:"left-title"},[l(n("n-icon"),{component:v},null),"medical_added"===k?"已完成申请单开立":`已添加诊断:${e.name}`]),"medical_added"===k?null:l("span",{class:"right-desc"},[t("创建时间: "),e.createdTime])])))},B=()=>{if(!q.value)return null;const e="diagnosis_added"===k?!j.value.length:!w.value.length;return l("div",{class:"card-footer"},[l("span",{class:"left-desc"},[t("请注意,推荐信息由AI生成,结果仅供临床参考")]),l("div",{class:"right-btns"},[l(r,{size:"large",disabled:e,onClick:()=>z("edit")},{default:()=>[t("编辑所选")]}),l("span",{class:["right-btn",{disabled:e}],onClick:()=>z()},[t("引用所选")])])])},F=()=>"inquiry"==k||"medical"==k?(()=>{var e,a;const i="inquiry"===k;return l("div",{class:"inquiry_medical-box",onClick:()=>H()},[l("div",{class:"left-img"},[l("img",{src:i?m:u},null)]),l("div",{class:"right-text"},[l("p",{class:"top-info"},[i?null==(e=T.summary)?void 0:e.inquiryStr:T.info]),l("p",{class:"sum-time"},[t("创建时间:"),(null==(a=T.summary)?void 0:a.creationTime)||T.creationTime])])])})():"diagnosis"==k?l("div",{class:"diagnosis-box"},[l("div",{class:"title"},[t("诊断辅助")]),l("div",{class:"desc"},[T.patientHistory]),T.possibleConditions.map((e=>l("div",{class:["con-item",{active:w.value.includes(e.code)}],onClick:()=>A(e,"code")},[l("div",{class:"top-content"},[l("div",{class:"left_wrap"},[l("a",{href:e.link,target:"_blank"},[t("【"),e.condition,t("】")]),e.code,t("("),e.probability,t(")")]),l("img",{class:"right-icon",src:p,onClick:a=>J(a,e)},null)]),l("div",{class:"btm-desc"},[e.description])])))]):"diagnosis_added"==k?W():"treatment_plan"==k?l("div",{class:"treatment-plan-box"},[l("div",{class:"top-div"},[l("div",{class:"title"},[T.title])]),l("div",{class:"desc"},[T.description]),l("div",{class:"medication-wrap"},[l("div",{class:"title"},[t("药物")]),T.medications.map((e=>l("div",{class:["medication-item",{active:w.value.includes(e.name)}],onClick:()=>A(e)},[l("div",{class:"top"},[l("div",{class:"name"},[e.name]),l("img",{class:"right-icon",src:p,onClick:a=>R(a,e)},null)]),l("ul",null,[l("li",null,[t("用量: "),e.dosage,e.purpose]),l("li",null,[t("用法: "),e.usageInstructions])])])))]),l("div",{class:"precaution-wrap"},[l("div",{class:"title"},[t("注意事项")]),l("div",{class:"precaution-div"},[T.precautions.map(((e,a)=>l("div",{class:"treatment-item"},[a+1,t(". "),e])))])])]):"report_message"==k?(()=>{var e,a;const i=(null==(e=T.reports)?void 0:e[0])||{},s=(null==(a=i.reportInterpretation)?void 0:a.replace(/\\n|\n|\r/g,"<br>").split("<br>"))||[""],o=s.map(((e,a)=>[e,a===s.length-1?null:l("br",null,null)]));return l("div",{class:"report-message-box"},[l("div",{class:"top-title"},[l("div",{class:"left-title"},[l(n("n-icon"),{component:v},null),i.reportName]),l("div",{class:"right-detail"},[l(r,{text:!0,onClick:M},{default:()=>[t("报告详情")]}),l(r,{text:!0},{default:()=>[t("推荐方案")]})])]),l("div",{class:"center-img"},[i.images.map((e=>"pdf"===e.imageType?l("embed",{class:"pdf-embed",src:e.image,type:"application/pdf"},null):l(n("n-image"),{src:e.image},null)))]),l("div",{class:"bottom-interpretation"},[o,l("div",{class:"desc-tip"},[t("请注意,辅助诊断由AI推荐,结果仅供临床参考。")])])])})():"medical_added"==k?function(){if(!y(T))return null;const e=T.map((e=>{const{itemName:a,sample:i,execDeptName:s}=e||{};let n="";a&&(n+=a);const t=()=>!n||n.endsWith("/")?"":"/";return i&&(n+=t()+i),s&&(n+=t()+s),l("div",{class:"item"},[l("span",null,[n]),l("span",{class:"time"},[e.beginExecTime])])}));return l("div",{class:"medical-added-box"},[e])}():"默认json内容";return()=>l("section",{class:"json-card_section"},[$(),l("div",{class:"card-content"},[F()]),B()])}});export{x as default};
@@ -1,14 +0,0 @@
1
- declare const _default: import("vue").DefineComponent<{
2
- width: {
3
- type: NumberConstructor;
4
- default: number;
5
- };
6
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
7
- width: {
8
- type: NumberConstructor;
9
- default: number;
10
- };
11
- }>>, {
12
- width: number;
13
- }>;
14
- export default _default;
@@ -1 +0,0 @@
1
- import{defineComponent as t,createVNode as e}from"vue";var r=t({name:"SelectIcon",props:{width:{type:Number,default:20}},setup:t=>()=>e("svg",{width:`${t.width}px`,height:`${t.width}px`,viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[e("g",{id:"门诊预约",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e("g",{id:"预约记录-开发渠道",transform:"translate(-339, -270)"},[e("g",{id:"编组-8",transform:"translate(0, 184)"},[e("g",{id:"3",transform:"translate(243, 66)"},[e("g",{id:"编组-2",transform:"translate(96, 20)"},[e("path",{d:"M20,0 L20,16 C20,18.209139 18.209139,20 16,20 L0,20 L0,20 L20,0 Z",id:"Rectangle-6",fill:"#2474FF"},null),e("path",{d:"M17.1936275,10.2928932 L18.607841,11.7071068 L12.24388,18.0710678 L12.242,18.0698932 L8,13.8284271 L9.41421356,12.4142136 L12.243,15.2428932 L17.1936275,10.2928932 Z",id:"Combined-Shape",fill:"#FFFFFF"},null)])])])])])])});export{r as default};
@@ -1,6 +0,0 @@
1
- import { AnyObject } from '../../../../shared/types';
2
- export declare function useProgram(): {
3
- MedicalOrderId: string;
4
- ReportId: string;
5
- programMethod: (bpmnProcessId: string, params: AnyObject) => Promise<any>;
6
- };
@@ -1 +0,0 @@
1
- function r(){return{MedicalOrderId:"Y3ncua3BP36",ReportId:"Ys6k60gBP54",programMethod:async(r,a)=>{var n,e;try{return await(null==(e=null==(n=window._programArrange)?void 0:n.next)?void 0:e.call(n,{bpmnProcessId:r,variables:{...a}}))}catch(r){throw new Error("流程编排执行失败!")}}}}export{r as useProgram};
@@ -1,2 +0,0 @@
1
- import { AnyObject } from '../../../../shared/types';
2
- export declare function useWebsocket(props: AnyObject, state: AnyObject): void;
@@ -1 +0,0 @@
1
- import{onBeforeUnmount as o}from"vue";import{isValidJSON as e}from"../utils/index.js";function n(n,t){if(!n.orgId||!n.userId)return;let r=!1;const s=new WebSocket(`/flow/ai/opd/${n.orgId}_${n.userId}`);s.onopen=()=>{r=!0,console.log("0 websocket连接成功 ==>")},s.onerror=()=>console.log("WebSocket连接失败"),s.onmessage=o=>{const{data:n}=o||{};if(console.log("张铁柱 ==>",o),!e(n))return;const r=JSON.parse(n);t.reportContent=r||null},async function o(e=0){return e>5?console.log("websocket连接失败 ==>"):r?console.log("websocket连接成功 ==>"):void setTimeout((()=>{o(++e)}),100)}(),o((()=>{s.close()}))}export{n as useWebsocket};
@@ -1 +0,0 @@
1
- var A="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACUAAAAoCAMAAABO3sPvAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAABCUExURUdwTLrH2b7L28DO3c3Y5QBl/wBm/7TC1rrI2rzK28rW4////7LB1QBm/9ff6X25/sXQ3+ry+8Pf/zub/wB9/wOG/yYY+3cAAAALdFJOUwDjoXQoiO5//r9Z8rE0jwAAAOVJREFUOMvt1NsOgjAMBuAhICitXTt4/1e1wxhZ6SAx8c7/gnD41i4lWQihu4xg07ShTNeAl1upFMWHzWjYHeAx7RNLNgCwo6aymqrJTVGtqopqdbWtdqBytcu5yqw7VwzQbhRHiHkg/PlZY34GGDZKNwrx1eLDdmp9faretY47vvdlU6pafqj+8/pOyYI2194qRi+9UeSq616xiMycEOdpJpZ8h47Kq1kQSVXCRXxFRKoW1JJEichXKSW96HdVQnLUMVeSo466+4WRBFe1rjKnnD8JNCdmbV6hKw7dyuzNSU6z9x+fafE89x48hKcAAAAASUVORK5CYII=";export{A as default};
@@ -1 +0,0 @@
1
- var A="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAMAAAC7IEhfAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAA5UExURUdwTACQ/wCa+wCQ/7jG2MjT4L3K27bD1wCR/83Y5LPC1v///wCR/9ff6WXI/7bk/zW5/t3y/gCt/8q0bEUAAAAKdFJOUwBWuuXhVal/fysieA5MAAAAu0lEQVQ4y73V2xLDEBCAYVLEqYj3f9iSTFJhw15o/0vzzYSZWIScKaHrhCJtSkPxFrK0/K6CJE/M1GVZf33V2hiMhGGWTGFgK5/gLlEwS4GCpjiQfNmq6G9yPdxigXwLKeRsbKEEoX2Arix24O2crgN9WehA9B7nw63MzTh1KIt/PUw8G8FrdRrE7JFiIQGdAyDt34QvTFQuIZT/uDcw7N7rX0NwkF7Dhw9G8zmf2XjY71WjFHg+DnY8Ih+MGDjNMAmfOQAAAABJRU5ErkJggg==";export{A as default};
@@ -1 +0,0 @@
1
- var A="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAkUExURUdwTABl/gBk/QBa+wBl/gBk/gBj/QBk/gBk/QBk/QBl/QBg/8y67VYAAAAMdFJOUwD+xQp/t0Wa0F3kLUbgIywAAABdSURBVAjXY2BgMDY2ZgABdkFBQVEDIIN1iYtLYTCI0cDAwCIKZTA4OkAZHApQBhMyg3NCGYTBwNDoAGIwp6XNEjUAMjiBBgs6QESShAwgagqry6vAjBagdAEDDAAAQXgP8Z48ljAAAAAASUVORK5CYII=";export{A as default};