cnhis-design-vue 3.3.1-beta.4 → 3.3.1-beta.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +87 -87
- package/es/components/ai-chat/index.d.ts +394 -43
- package/es/components/ai-chat/src/Index.vue.d.ts +394 -43
- package/es/components/ai-chat/src/Index.vue2.js +1 -1
- package/es/components/ai-chat/src/api/index.d.ts +8 -0
- package/es/components/ai-chat/src/api/index.js +1 -0
- package/es/components/ai-chat/src/components/ChatAudio.vue.d.ts +38 -0
- package/es/components/ai-chat/src/components/ChatAudio.vue.js +1 -0
- package/es/components/ai-chat/src/components/ChatAudio.vue2.js +1 -0
- package/es/components/ai-chat/src/components/ChatBI.vue.d.ts +2 -2
- package/es/components/ai-chat/src/components/ChatBI.vue2.js +1 -1
- package/es/components/ai-chat/src/components/ChatCard.js +1 -1
- package/es/components/ai-chat/src/components/ChatFooter.vue.d.ts +75 -31
- package/es/components/ai-chat/src/components/ChatFooter.vue2.js +1 -1
- package/es/components/ai-chat/src/components/ChatMain.d.ts +1 -7
- package/es/components/ai-chat/src/components/ChatMain.js +1 -1
- package/es/components/ai-chat/src/components/ChatMainDefault.d.ts +2 -0
- package/es/components/ai-chat/src/components/ChatMainDefault.js +1 -0
- package/es/components/ai-chat/src/components/ChatPatient.vue.d.ts +2 -2
- package/es/components/ai-chat/src/components/ChatPatient.vue2.js +1 -1
- package/es/components/ai-chat/src/components/ChatPrompt.vue.d.ts +2 -2
- package/es/components/ai-chat/src/components/ChatPrompt.vue2.js +1 -1
- package/es/components/ai-chat/src/components/ChatRight.vue.d.ts +57 -0
- package/es/components/ai-chat/src/components/ChatRight.vue.js +1 -0
- package/es/components/ai-chat/src/components/ChatRight.vue2.js +1 -0
- package/es/components/ai-chat/src/components/card/JsonCard.d.ts +25 -0
- package/es/components/ai-chat/src/components/card/JsonCard.js +1 -0
- package/es/components/ai-chat/src/components/message-render/CardRender.d.ts +16 -0
- package/es/components/ai-chat/src/components/message-render/CardRender.js +1 -0
- package/es/components/ai-chat/src/components/message-render/FormRender.d.ts +16 -0
- package/es/components/ai-chat/src/components/message-render/FormRender.js +1 -0
- package/es/components/ai-chat/src/components/mobile/MobileChatAudio.vue.d.ts +36 -0
- package/es/components/ai-chat/src/components/mobile/MobileChatAudio.vue.js +1 -0
- package/es/components/ai-chat/src/components/mobile/MobileChatAudio.vue2.js +1 -0
- package/es/components/ai-chat/src/components/mobile/MobileChatFooter.vue.d.ts +105 -0
- package/es/components/ai-chat/src/components/mobile/MobileChatFooter.vue.js +1 -0
- package/es/components/ai-chat/src/components/mobile/MobileChatFooter.vue2.js +1 -0
- package/es/components/ai-chat/src/components/svgs/AddIcon.vue.js +1 -0
- package/es/components/ai-chat/src/components/svgs/AudioIcon.vue.js +1 -0
- package/es/components/ai-chat/src/components/svgs/KeyboardIcon.vue.js +1 -0
- package/es/components/ai-chat/src/components/svgs/MicroPhone.vue.js +1 -0
- package/es/components/ai-chat/src/hooks/index.d.ts +2 -0
- package/es/components/ai-chat/src/hooks/index.js +1 -0
- package/es/components/ai-chat/src/hooks/useChartAudioContext.d.ts +18 -0
- package/es/components/ai-chat/src/hooks/useChartAudioContext.js +1 -0
- package/es/components/ai-chat/src/hooks/useData.d.ts +77 -0
- package/es/components/ai-chat/src/hooks/useData.js +1 -0
- package/es/components/ai-chat/src/hooks/useFooterContext.d.ts +38 -0
- package/es/components/ai-chat/src/hooks/useFooterContext.js +1 -0
- package/es/components/ai-chat/src/hooks/useProgram.d.ts +14 -0
- package/es/components/ai-chat/src/hooks/useProgram.js +1 -0
- package/es/components/ai-chat/src/hooks/useSSE.d.ts +9 -0
- package/es/components/ai-chat/src/hooks/useSSE.js +1 -0
- package/es/components/ai-chat/src/hooks/useWebsocket.d.ts +4 -0
- package/es/components/ai-chat/src/hooks/useWebsocket.js +1 -0
- package/es/components/ai-chat/src/types/index.d.ts +1 -3
- package/es/components/ai-chat/src/types/index.js +1 -1
- package/es/components/ai-chat/src/utils/index.d.ts +6 -0
- package/es/components/ai-chat/src/utils/index.js +1 -1
- package/es/components/ai-chat/style/index.css +1 -1
- package/es/components/audio-sdk/index.d.ts +274 -2
- package/es/components/audio-sdk/index.js +1 -1
- package/es/components/audio-sdk/src/Index.vue.d.ts +274 -0
- package/es/components/audio-sdk/src/Index.vue.js +1 -0
- package/es/components/audio-sdk/src/Index.vue2.js +1 -0
- package/es/components/audio-sdk/src/audioSDK.d.ts +60 -28
- package/es/components/audio-sdk/src/audioSDK.js +1 -1
- package/es/components/audio-sdk/src/components/form.vue.d.ts +51 -0
- package/es/components/audio-sdk/src/components/recording-modal.vue.d.ts +100 -0
- package/es/components/audio-sdk/src/components/recording-modal.vue.js +1 -0
- package/es/components/audio-sdk/src/components/recording-modal.vue2.js +1 -0
- package/es/components/audio-sdk/src/components/recording.vue.d.ts +53 -4
- package/es/components/audio-sdk/src/components/recording.vue2.js +1 -1
- package/es/components/audio-sdk/src/utils/index.d.ts +7 -0
- package/es/components/audio-sdk/src/utils/index.js +1 -0
- package/es/components/audio-sdk/src/utils/recordingModal.d.ts +7 -3
- package/es/components/audio-sdk/src/utils/recordingModal.js +1 -1
- package/es/components/audio-sdk/style/index.css +1 -1
- package/es/components/button-print/index.d.ts +30 -0
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +30 -0
- package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
- package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +9 -0
- package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
- package/es/components/button-print/src/components/OldPrintComponent.vue.d.ts +9 -0
- package/es/components/button-print/src/components/OldPrintComponent.vue2.js +1 -1
- package/es/components/button-print/src/utils/print.d.ts +2 -2
- package/es/components/button-print/src/utils/print.js +1 -1
- package/es/components/calendar/index.d.ts +126 -3
- package/es/components/calendar/src/Calendar.vue.d.ts +126 -2
- package/es/components/card-reader-sdk/src/cardReaderSDK.d.ts +4 -8
- package/es/components/card-reader-sdk/src/cardReaderSDK.js +1 -1
- package/es/components/card-render/src/components/Button.vue.d.ts +3 -0
- package/es/components/card-render/src/components/Button.vue2.js +1 -1
- package/es/components/card-render/src/components/ScaleView.vue.d.ts +39 -0
- package/es/components/card-render/src/components/ScaleView.vue.js +1 -0
- package/es/components/card-render/src/components/ScaleView.vue2.js +1 -0
- package/es/components/card-render/src/components/Table.vue.d.ts +104 -0
- package/es/components/card-render/src/components/Table.vue.js +1 -0
- package/es/components/card-render/src/components/Table.vue2.js +1 -0
- package/es/components/card-render/src/components/Text.vue.d.ts +1 -0
- package/es/components/card-render/src/components/Text.vue2.js +1 -1
- package/es/components/card-render/src/components/index.d.ts +162 -23
- package/es/components/card-render/src/components/index.js +1 -1
- package/es/components/card-render/src/constants/index.d.ts +4 -1
- package/es/components/card-render/src/constants/index.js +1 -1
- package/es/components/card-render/style/index.css +1 -1
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +3 -0
- package/es/components/editor/src/Editor.js +1 -1
- package/es/components/editor/style/index.css +1 -0
- package/es/components/fabric-chart/index.d.ts +6 -2
- package/es/components/fabric-chart/src/FabricChart.vue.d.ts +6 -2
- package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
- package/es/components/field-set/src/FieldColor.vue.d.ts +1 -1
- package/es/components/field-set/src/FieldFilter.vue.d.ts +1 -1
- package/es/components/field-set/src/FieldSet.vue.d.ts +1 -1
- package/es/components/field-set/src/components/table-row.vue.d.ts +1 -1
- package/es/components/form-config/index.d.ts +40 -10
- package/es/components/form-config/src/FormConfig.vue.d.ts +40 -10
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +32 -8
- package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +8 -2
- package/es/components/form-render/src/components/renderer/date.d.ts +2 -2
- package/es/components/form-render/src/components/renderer/formItem.d.ts +2 -0
- package/es/components/form-render/src/components/renderer/formItem.js +1 -1
- package/es/components/form-render/src/components/renderer/levelSearchCascader/index.d.ts +9 -0
- package/es/components/form-render/src/components/renderer/levelSearchCascader/index.js +1 -1
- package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +12 -1
- package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +12 -1
- package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/components/tooltipMessage.vue.d.ts +12 -1
- package/es/components/form-render/src/components/tooltipMessage.vue2.js +1 -1
- package/es/components/form-render/src/hooks/useBusinessBinding.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/hooks/useLowCodeReactions.js +1 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +9 -3
- package/es/components/guide/src/renderer.d.ts +2 -2
- package/es/components/iho-chat/index.d.ts +206 -4
- package/es/components/iho-chat/src/Index.vue.d.ts +206 -4
- package/es/components/iho-chat/src/api/index.d.ts +1 -0
- package/es/components/iho-chat/src/api/index.js +1 -1
- package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +8 -0
- package/es/components/iho-chat/src/components/ChatAdd.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatFile.vue.d.ts +11 -3
- package/es/components/iho-chat/src/components/ChatFile.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +7 -0
- package/es/components/iho-chat/src/components/ChatFooter.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +96 -2
- package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +77 -0
- package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatRecord.vue.d.ts +71 -1
- package/es/components/iho-chat/src/components/ChatRecord.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatSearch.vue.d.ts +8 -2
- package/es/components/iho-chat/src/components/ChatSearch.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatSet.vue.d.ts +10 -0
- package/es/components/iho-chat/src/components/ChatSet.vue2.js +1 -1
- package/es/components/iho-chat/src/components/MessageMergeForward.vue.d.ts +70 -1
- package/es/components/iho-chat/src/components/MessageMergeForward.vue2.js +1 -1
- package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +7 -0
- package/es/components/iho-chat/src/components/PersonProfile.vue.d.ts +3 -0
- package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
- package/es/components/iho-chat/src/components/SiderList.vue.d.ts +3 -1
- package/es/components/iho-chat/src/components/SiderList.vue2.js +1 -1
- package/es/components/iho-chat/src/constants/index.d.ts +9 -2
- package/es/components/iho-chat/src/constants/index.js +1 -1
- package/es/components/iho-chat/src/hooks/useSearchPatientList.d.ts +11 -0
- package/es/components/iho-chat/src/hooks/useSearchPatientList.js +1 -0
- package/es/components/iho-chat/src/utils/chatSock.js +1 -1
- package/es/components/iho-chat/src/utils/index.d.ts +6 -0
- package/es/components/iho-chat/src/utils/index.js +1 -1
- package/es/components/iho-chat/style/index.css +1 -1
- package/es/components/iho-table/index.d.ts +3 -0
- package/es/components/iho-table/index.js +1 -1
- package/es/components/iho-table/src/IhoTable.vue2.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/index.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.d.ts +3 -3
- package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.js +1 -1
- package/es/components/iho-table/src/hooks/useTablePlugin.js +1 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/headerPlugin/index.d.ts +1 -1
- package/es/components/iho-table/src/plugins/headerPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/highLightSetPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/index.d.ts +79 -3
- package/es/components/iho-table/src/plugins/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/stickyFixedPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/varialbleHeightPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/utils.js +1 -1
- package/es/components/iho-table/src/types/pluginType.d.ts +2 -2
- package/es/components/iho-table/src/utils/index.js +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.d.ts +2 -1
- package/es/components/index.js +1 -1
- package/es/components/scale-view/index.d.ts +17 -3
- package/es/components/scale-view/src/ScaleView.vue.d.ts +17 -3
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/scale-view/src/components/EvaluateCountdown.vue.d.ts +1 -1
- package/es/components/scale-view/src/hooks/scaleview-computed.js +1 -1
- package/es/components/scale-view/src/hooks/scaleview-init.d.ts +3 -1
- package/es/components/scale-view/src/hooks/scaleview-init.js +1 -1
- package/es/components/scale-view/src/hooks/scaleview-props.d.ts +4 -0
- package/es/components/scale-view/src/hooks/scaleview-props.js +1 -1
- package/es/components/scale-view/src/hooks/use-component.d.ts +1 -2189
- package/es/components/shortcut-provider/src/ShortcutProvider.vue2.js +1 -1
- package/es/components/shortcut-setter/index.d.ts +8 -2
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +8 -2
- package/es/components/steps-wheel/index.d.ts +18 -0
- package/es/components/steps-wheel/src/StepsWheel.vue.d.ts +18 -0
- package/es/components/steps-wheel/src/StepsWheel.vue2.js +1 -1
- package/es/env.d.ts +25 -25
- package/es/shared/assets/img/ai__avatar.png.js +1 -1
- package/es/shared/assets/img/defaultCover/10review_successful.png.js +1 -1
- package/es/shared/assets/img/defaultCover/11review_fail.png.js +1 -1
- package/es/shared/assets/img/defaultCover/12no_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/13no_menu_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/14no_call_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/15no_use_tag.png.js +1 -1
- package/es/shared/assets/img/defaultCover/16no_table_data.png.js +1 -1
- package/es/shared/assets/img/defaultCover/1location.png.js +1 -1
- package/es/shared/assets/img/defaultCover/2notfound.png.js +1 -1
- package/es/shared/assets/img/defaultCover/3loading.png.js +1 -1
- package/es/shared/assets/img/defaultCover/4no_permission.png.js +1 -1
- package/es/shared/assets/img/defaultCover/5no_data.png.js +1 -1
- package/es/shared/assets/img/defaultCover/6no_network.png.js +1 -1
- package/es/shared/assets/img/defaultCover/7no_doctor.png.js +1 -1
- package/es/shared/assets/img/defaultCover/8system_error.png.js +1 -1
- package/es/shared/assets/img/defaultCover/9system_upgrade.png.js +1 -1
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/file-emr.png.js +1 -0
- package/es/shared/assets/img/file.png.js +1 -0
- package/es/shared/assets/img/logo.png.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/table_style_2.png.js +1 -1
- package/es/shared/assets/img/use.png.js +1 -0
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/es/shared/hooks/useLevelSearchCascader.d.ts +1 -0
- package/es/shared/hooks/useLevelSearchCascader.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/package.json +5 -3
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
- package/es/shared/utils/fabricjs/index.d.ts +0 -6823
- package/es/shared/utils/tapable/index.d.ts +0 -139
@@ -18,9 +18,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
18
18
|
}>> & {
|
19
19
|
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
20
20
|
}>>;
|
21
|
-
emit: (event: string, ...args: any[]) => void;
|
22
21
|
_emit: (event: "update:show", ...args: any[]) => void;
|
23
|
-
state:
|
22
|
+
state: AnyObject;
|
23
|
+
emit: (event: "button-click" | "program", ...args: any[]) => void;
|
24
24
|
templateProps: import("vue").ComputedRef<{
|
25
25
|
config: any;
|
26
26
|
data: any;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as t,
|
1
|
+
import{defineComponent as t,computed as o,openBlock as e,createBlock as a,unref as n,withCtx as s,createVNode as i,mergeProps as u,createCommentVNode as r}from"vue";import{NDrawer as d,NDrawerContent as l}from"naive-ui";import m from"../../../card-render/index.js";import{isValidJSON as p}from"../utils/index.js";import{useData as c}from"../hooks/useData.js";var f=t({__name:"ChatBI",props:{show:{type:Boolean},data:{type:Object}},emits:["update:show"],setup(t,{emit:f}){const h=t,{state:v,emit:g}=c(),w=o((()=>{var t,o,e;const{content:a={}}=(null==(t=h.data)?void 0:t.msgItem)||{};return{config:p(null==(o=a.settings)?void 0:o.setting)?JSON.parse(null==(e=a.settings)?void 0:e.setting):null,data:a.data}}));function k(t){const{eventName:o,data:e}=t;f("update:show",!1),o&&g("button-click",{buttonInfo:e,isBI:!0,...h.data})}return(o,p)=>(e(),a(n(d),{placement:"bottom",height:"80%","trap-focus":!1,to:"#"+n(v).id,show:t.show,onMaskClick:p[0]||(p[0]=()=>f("update:show",!1))},{default:s((()=>[i(n(l),null,{default:s((()=>[t.data?(e(),a(n(m),u({key:0},n(w),{onModuleClick:k}),null,16)):r("v-if",!0)])),_:1})])),_:1},8,["to","show"]))}});export{f as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,
|
1
|
+
import{defineComponent as e,ref as t,reactive as a,computed as l,watch as n,createVNode as o}from"vue";import{NForm as i,NFormItem as s,NInput as r,NIcon as u,NButton as d}from"naive-ui";import c from"../../../form-render/index.js";import v from"../../../card-render/index.js";import{cloneDeep as p,isArray as m,omit as f}from"lodash-es";import{isValidJSON as g}from"../utils/index.js";import{ChevronDown as b,ChevronForward as y}from"@vicons/ionicons5";import{useData as h}from"../hooks/useData.js";var E=e({name:"ChatCard",inheritAttrs:!1,props:{msgItem:{type:Object,default:()=>({})},selectParams:{type:Object},configs:{type:Object},msgId:{type:String}},emits:["button-click"],setup(e,{attrs:E,slots:I,emit:_}){const k={TEXT:"INPUT",NUMBER:"INPUT_NUMBER",DATETIME:"DATE",MULTI_SELECT:"REMOTE_SEARCH",SELECT:"REMOTE_SEARCH"},{cssVars:C,patientInfo:T,state:x,axiosInstance:P,isSmall:w,appId:O}=h(),M=t([]),R=t(),S=t(),j=a({vaa05:""}),L=t(),N=l((()=>{var t,a;return!!(null==(a=null==(t=e.msgItem)?void 0:t.content)?void 0:a.body)})),F=e.msgItem.content,q={},A=a(p(F.data||{})),B={beforeRequest(e,t,a){var l,n;if(null==t?void 0:t.params){const{items:e=[]}=F.body||{},a=null==(n=(l=R.value).getFormValues)?void 0:n.call(l);Object.keys(t.params).forEach((l=>{const n=e.find((e=>e.code===l));"vaa05"===l?t.params.vaa05=S.value.selectedPatient.vaa01:Reflect.has(a,l)?t.params[l]=a[l]:n&&(t.params[l]=n.value)}))}t&&Reflect.has(t,"configs")&&(t.configs=S.value.selectedPatient)}};function H(e){const{eventName:t,data:a}=e;t&&_("button-click",{buttonInfo:a,isBI:!0})}function K(e){A[e.button.id+"Disabled"]="1",_("button-click",{buttonInfo:{...f(e.button,["props"]),data:e.data}})}if(N.value){const t=F.body.items||[],a=t.some((e=>"vaa05"===e.code));M.value=t.filter((e=>e.showFlag)).map((t=>{var l,n,o;if("vaa05"===t.code&&!w.value)return S.value={...t},t._value?j.vaa05=t._value:(null==(l=t.options)?void 0:l.length)&&t.value&&(j.vaa05=null==(n=t.options.find((e=>e.value===t.value)))?void 0:n.label,S.value.selectedPatient=e.configs),null;const i={html_type:k[t.type]||t.type,val_key:t.code,name:t.name,elem_width:12,default_val:t.value,lazyRequest:!0,requestCache:!0,urlConfig:{nameKey:null!=(o=t.labelField)?o:"label"},option:[],is_null:t.required?"0":"1",is_edit:e.msgItem.disabled?"0":"1",componentProps:{},multi_select:"MULTI_SELECT"===t.type?"0":"1"};if("DATETIME"===t.type&&(i.date_format="yyyy-MM-dd HH:mm:ss"),"REMOTE_SEARCH"===i.html_type){if(i.componentProps={fallbackOption:!1},i.option=t.options||[],i.default_val=null,t.value&&m(t.options)&&t.options.length>0){t.options.find((e=>(null==e?void 0:e.value)===t.value))&&(i.default_val=t.value)}if(Object.assign(i.urlConfig,{url:"/flow/api/instruction/parameter/getOptionsValues",method:"post",params:{...e.selectParams,code:t.code,source:w.value?"inner":"global",...w.value?{appId:O.value}:{}},dependKey:[]}),a&&(i.urlConfig.params.configs=T.value.info||x.selectedPatient),t.dependencies){const e=t.dependencies.split(",");i.urlConfig.dependKey=e,i.urlConfig.params.params={},e.forEach((e=>{i.urlConfig.params.params[e]=""}))}}return i})).filter((e=>!!e))}function U(){var t;if(!S.value)return null;function a(){e.msgItem.disabled||(x.showPatient=!0)}return o(i,{class:"form-render",ref:L,"require-mark-placement":"left",disabled:e.msgItem.disabled,model:j,rules:{vaa05:{required:S.value.required,message:S.value.name+((null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.146"))||"为必填"),trigger:["input"]}}},{default:()=>[o(s,{label:S.value.name,path:"vaa05",class:"form-render__formItem",style:"--n-feedback-height: 16px; --n-feedback-padding: 0px; --n-feedback-font-size: 12px"},{default:()=>{var e;return[o(r,{style:"--n-text-color-disabled: #000; --n-placeholder-color-disabled: #000;--n-padding-left: 8px; --n-padding-right: 8px",readonly:!0,value:j.vaa05,placeholder:(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.147"))||"请选择",onClick:a},{suffix:()=>o(u,{color:"#c2c2c2",component:b},null)})]}})]})}async function D(t,a){var l,n;try{const o=a||R.value.getFormValues();await(null==(l=R.value)?void 0:l.validate()),F.body.items.forEach((e=>{var t;"vaa05"===e.code?(e._value=x.selectedPatientLabel,e.value=S.value.selectedPatient.vaa01||e.value):o[e.code]&&(e.value=o[e.code]),e.showFlag||(o[e.code]=e.value),(null==(t=q[e.code])?void 0:t[0])&&(e.options=q[e.code])})),x.loading=!0,_("button-click",{values:o,buttonInfo:t,patient:(null==(n=S.value)?void 0:n.selectedPatient)||e.configs,isForm:!0})}catch(e){x.loading=!1}}function V(e){const{fieldInstance:t,context:a,value:l,fieldKey:n}=e;"REMOTE_SEARCH"===t.componentType&&(null==l?void 0:l.length)&&(q[n]=[null==a?void 0:a.currentOption])}function J(){_("button-click",{showMore:!0})}function z(){var e;if("1834043761964638208"!==(null==(e=F.settings)?void 0:e.id)||!F.data)return null;const t=JSON.parse(F.settings.setting),a=e=>{var t;let l="";for(let n=0;n<e.length;n++){const o=e[n];if(o.setting.scopeKey){l=o.setting.scopeKey;break}if((null==(t=o.childrens)?void 0:t.length)&&(l=a(o.childrens),l))break}return l},l=a(t.templates);return!l||!g(F.data[l])||JSON.parse(F.data[l]).length<=5?null:(g(A[l])&&(A[l]=JSON.parse(A[l]).slice(0,5)),o(d,{block:!0,text:!0,"icon-placement":"right",color:C.value["--c-primary-color"],style:"margin-top: 10px",onClick:J},{icon:()=>o(u,{component:y},null),default:()=>"查看更多"}))}return n((()=>x.showPatient),(t=>{!e.msgItem.disabled&&N.value&&!t&&x.selectedPatientLabel&&S.value&&(j.vaa05=x.selectedPatientLabel,S.value.selectedPatient={...x.selectedPatientForm})})),()=>{var t;return o("div",{class:"card"},[N.value?[o("p",null,[F.title||F.header.title]),o("div",{class:"form-box"},[[U(),o(c,{"request-instance":{get:P.get,post:P.post},"life-cycle":B,column:12,ref:R,"field-list":M.value,onFormChange:V},null)]]),F.footer.buttons.map((t=>function(t){const a={width:"100%","--n-height":"36px",fontSize:"15px",marginTop:"10px"},l=N.value?{...a,marginTop:"0"}:a;return o(d,{id:e.msgId,style:l,secondary:!0,class:"gradient",disabled:e.msgItem.disabled,onClick:async function(){var e;if(N.value){if(!R.value)return;try{S.value?null==(e=L.value)||e.validate((async e=>{var a,l;if(!e){const e=null==(l=(a=R.value).getFormValues)?void 0:l.call(a);Object.assign(e,{vaa05:S.value.selectedPatient.vaa01}),await D(t,e)}})):await D(t)}catch(e){}}else _("button-click")}},{default:()=>[N.value?null==t?void 0:t.text:F.buttonName]})}(t)))]:[o(v,{config:g(null==(t=F.settings)?void 0:t.setting)?JSON.parse(F.settings.setting):null,data:A,"onModule-click":H,"onButton-click":K},null),z()]])}}});export{E as default};
|
@@ -1,17 +1,20 @@
|
|
1
|
-
import {
|
1
|
+
import { CSSProperties } from 'vue';
|
2
2
|
import { CAudioSDK } from '../../../../components/audio-sdk';
|
3
|
-
import { AnyObject } from '../../../../shared/types';
|
4
3
|
declare const _default: import("vue").DefineComponent<{}, {
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
audioTimed: any;
|
12
|
-
commandList: any;
|
13
|
-
inputRef: import("vue").Ref<any>;
|
4
|
+
state: import("../../../../shared/types").AnyObject;
|
5
|
+
shortcutList: import("vue").Ref<any>;
|
6
|
+
getShortcutName: (item: string | import("../../../../shared/types").AnyObject) => any;
|
7
|
+
isAllDisabled: import("vue").ComputedRef<any>;
|
8
|
+
isStreamingOutput: import("vue").Ref<any>;
|
9
|
+
handleShortcut: (item: string | import("../../../../shared/types").AnyObject) => void;
|
14
10
|
showPopover: import("vue").Ref<boolean>;
|
11
|
+
handleKeyDown: (event: KeyboardEvent) => void;
|
12
|
+
handleInput: (value: string) => void;
|
13
|
+
btnDisabled: import("vue").ComputedRef<any>;
|
14
|
+
commandList: import("vue").Ref<any>;
|
15
|
+
showAudio: import("vue").Ref<boolean>;
|
16
|
+
handleSend: () => void;
|
17
|
+
isDefault: import("vue").ComputedRef<boolean>;
|
15
18
|
breadcrumb: import("vue").Ref<{
|
16
19
|
[x: string]: any;
|
17
20
|
shortcutTitle: string;
|
@@ -19,6 +22,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
19
22
|
shortcutDescription?: string | undefined;
|
20
23
|
children?: any[] | undefined;
|
21
24
|
}[]>;
|
25
|
+
currentShortcutId: import("vue").Ref<string>;
|
22
26
|
currentCommand: import("vue").Ref<{
|
23
27
|
[x: string]: any;
|
24
28
|
shortcutTitle: string;
|
@@ -26,22 +30,23 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
26
30
|
shortcutDescription?: string | undefined;
|
27
31
|
children?: any[] | undefined;
|
28
32
|
}[]>;
|
33
|
+
clickMenu: (menu: import("../types").CommandItem) => void;
|
34
|
+
audioTimed: import("vue").Ref<any>;
|
35
|
+
showLBtn: import("vue").Ref<any>;
|
36
|
+
isSmall: import("vue").ComputedRef<boolean>;
|
37
|
+
cssVars: import("vue").ComputedRef<import("../../../../shared/types").AnyObject>;
|
38
|
+
railStyle: ({ focused, checked }: {
|
39
|
+
focused: boolean;
|
40
|
+
checked: boolean;
|
41
|
+
}) => CSSProperties;
|
42
|
+
inputRef: import("vue").Ref<any>;
|
43
|
+
placeholder: import("vue").ComputedRef<"请向我提问,Shift+Enter换行" | "请向我提问或输入\"/\"查看指令" | "请向我提问或输入\"/\"查看指令,Shift+Enter换行">;
|
44
|
+
audioSdk: CAudioSDK;
|
45
|
+
recorderStart: () => Promise<void>;
|
29
46
|
showPrompt: import("vue").Ref<boolean>;
|
30
|
-
currentShortcutId: import("vue").Ref<string>;
|
31
47
|
showPatient: import("vue").Ref<boolean>;
|
32
|
-
placeholder: import("vue").ComputedRef<"请向我提问或输入\"/\"查看指令" | "请向我提问或输入\"/\"查看指令,Shift+Enter换行">;
|
33
|
-
btnDisabled: import("vue").ComputedRef<any>;
|
34
48
|
showMagicWand: import("vue").ComputedRef<boolean>;
|
35
49
|
patient: import("vue").ComputedRef<string>;
|
36
|
-
recorderStart: () => Promise<void>;
|
37
|
-
getShortcutName: (item: string | AnyObject) => any;
|
38
|
-
handleShortcut: (item: string | AnyObject) => void;
|
39
|
-
resetCurrentCommand: () => void;
|
40
|
-
handleKeyDown: (event: KeyboardEvent) => void;
|
41
|
-
isWrap: (event: KeyboardEvent) => boolean;
|
42
|
-
handleInput: (value: string) => void;
|
43
|
-
handleSend: () => void;
|
44
|
-
clickMenu: (menu: CommandItem) => void;
|
45
50
|
handleBack: () => void;
|
46
51
|
updateShow: (value: boolean) => void;
|
47
52
|
NButton: any;
|
@@ -51,6 +56,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
51
56
|
NBreadcrumb: any;
|
52
57
|
NBreadcrumbItem: any;
|
53
58
|
NTag: any;
|
59
|
+
NSwitch: any;
|
54
60
|
PaperPlane: 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
61
|
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<{}>>, {}>;
|
56
62
|
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<{}>>, {}>;
|
@@ -73,16 +79,16 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
73
79
|
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
74
80
|
}>>;
|
75
81
|
emit: (event: "update:show", ...args: any[]) => void;
|
76
|
-
|
77
|
-
|
82
|
+
state: import("../../../../shared/types").AnyObject;
|
83
|
+
queryPrompt: import("vue").Ref<any>;
|
78
84
|
listRef: import("vue").Ref<any>;
|
79
85
|
keyword: import("vue").Ref<string>;
|
80
|
-
list: import("vue").Ref<AnyObject[]>;
|
86
|
+
list: import("vue").Ref<import("../../../../shared/types").AnyObject[]>;
|
81
87
|
showNoData: import("vue").ComputedRef<boolean>;
|
82
88
|
handleInput: () => void;
|
83
89
|
handleSearch: () => Promise<void>;
|
84
90
|
resetAndSearch: () => void;
|
85
|
-
select: (item: AnyObject) => void;
|
91
|
+
select: (item: import("../../../../shared/types").AnyObject) => void;
|
86
92
|
NDrawer: any;
|
87
93
|
NDrawerContent: any;
|
88
94
|
NIcon: any;
|
@@ -112,8 +118,8 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
112
118
|
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
113
119
|
}>>;
|
114
120
|
emit: (event: "update:show", ...args: any[]) => void;
|
115
|
-
|
116
|
-
|
121
|
+
state: import("../../../../shared/types").AnyObject;
|
122
|
+
patientInfo: import("vue").Ref<any>;
|
117
123
|
formValue: {
|
118
124
|
businessType: string;
|
119
125
|
vaa01: null;
|
@@ -131,9 +137,9 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
131
137
|
message: string;
|
132
138
|
};
|
133
139
|
};
|
134
|
-
options: import("vue").Ref<AnyObject[]>;
|
140
|
+
options: import("vue").Ref<import("../../../../shared/types").AnyObject[]>;
|
135
141
|
formRef: import("vue").Ref<any>;
|
136
|
-
renderLabel: (option: AnyObject) => string;
|
142
|
+
renderLabel: (option: import("../../../../shared/types").AnyObject) => string;
|
137
143
|
handleUpdateValue: (value: string, option: import("naive-ui").SelectOption) => void;
|
138
144
|
handleSearch: (keyword: string) => Promise<void>;
|
139
145
|
handleBusinessTypeUpdate: () => void;
|
@@ -155,5 +161,43 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
155
161
|
}, {
|
156
162
|
show: boolean;
|
157
163
|
}>;
|
164
|
+
ChatAudio: import("vue").DefineComponent<{
|
165
|
+
show: {
|
166
|
+
type: BooleanConstructor;
|
167
|
+
};
|
168
|
+
}, {
|
169
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
170
|
+
show: {
|
171
|
+
type: BooleanConstructor;
|
172
|
+
};
|
173
|
+
}>> & {
|
174
|
+
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
175
|
+
}>>;
|
176
|
+
emit: (event: "update:show", ...args: any[]) => void;
|
177
|
+
audioChartRef: import("vue").Ref<HTMLDivElement | undefined>;
|
178
|
+
isWarning: import("vue").Ref<boolean>;
|
179
|
+
isActive: import("vue").Ref<boolean>;
|
180
|
+
handlePlay: () => void;
|
181
|
+
handlePause: () => void;
|
182
|
+
handleEnd: (trigger?: string | undefined) => Promise<void>;
|
183
|
+
formattedTime: import("vue").ComputedRef<string>;
|
184
|
+
warnTime: import("vue").Ref<number>;
|
185
|
+
tip: import("vue").ComputedRef<"未识别录音" | "正在录音中..." | "录音已暂停">;
|
186
|
+
NSpace: any;
|
187
|
+
NButton: any;
|
188
|
+
NIcon: any;
|
189
|
+
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<{}>>, {}>;
|
190
|
+
MicOff: 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<{}>>, {}>;
|
191
|
+
AlertCircle: 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<{}>>, {}>;
|
192
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:show"[], "update:show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
193
|
+
show: {
|
194
|
+
type: BooleanConstructor;
|
195
|
+
};
|
196
|
+
}>> & {
|
197
|
+
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
198
|
+
}, {
|
199
|
+
show: boolean;
|
200
|
+
}>;
|
201
|
+
MicroPhone: any;
|
158
202
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
159
203
|
export default _default;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,
|
1
|
+
import{defineComponent as e,ref as o,onMounted as t,computed as l,watch as n,nextTick as a,onBeforeUnmount as s,openBlock as i,createElementBlock as d,normalizeClass as c,unref as r,createElementVNode as u,createBlock as v,withCtx as m,createVNode as h,createTextVNode as f,toDisplayString as p,createCommentVNode as w,Fragment as k,renderList as g,normalizeStyle as y,createSlots as b,withModifiers as C,isRef as x,getCurrentInstance as _}from"vue";import{NButton as z,NIcon as S,NPopover as I,NInput as P,NTag as L,NBreadcrumb as j,NBreadcrumbItem as D,NSwitch as T}from"naive-ui";import{PeopleOutline as M,SparklesSharp as U,PaperPlane as B,ChevronBack as F,ChevronForward as K}from"@vicons/ionicons5";import{useFooterContext as R}from"../hooks/useFooterContext.js";import"../../../audio-sdk/index.js";import{last as A,cloneDeep as E}from"lodash-es";import q from"./ChatPrompt.vue.js";import N from"./ChatPatient.vue.js";import O from"./ChatAudio.vue.js";import V from"./svgs/MicroPhone.vue.js";import W from"../../../audio-sdk/src/audioSDK.js";const G={key:0,class:"menu-box fillet-8"},H={class:"input-wrapper fillet-10"},J={key:0,class:"btn-box"},Q=["disabled"],X={class:"command-box"},Y={class:"command-box__header"},Z={key:0,class:"title"},$={class:"command-box__menu"},ee=["onMouseover","onClick"],oe={class:"label"},te={class:"remark"};var le=e({__name:"ChatFooter",setup(e){const{state:le,shortcutList:ne,getShortcutName:ae,isAllDisabled:se,isStreamingOutput:ie,handleShortcut:de,showPopover:ce,handleKeyDown:re,handleInput:ue,btnDisabled:ve,commandList:me,showAudio:he,handleSend:fe,isDefault:pe,breadcrumb:we,currentShortcutId:ke,currentCommand:ge,clickMenu:ye,audioTimed:be,showLBtn:Ce,isSmall:xe,cssVars:_e}=R();function ze({focused:e,checked:o}){const t={};return o?(t.background="#d03050",e&&(t.boxShadow="0 0 0 2px #d0305040")):(t.background="#2080f0",e&&(t.boxShadow="0 0 0 2px #2080f040")),t}const Se=o();t((()=>{var e;null==(e=Se.value)||e.focus()}));const Ie=l((()=>pe.value?"请向我提问,Shift+Enter换行":xe.value?'请向我提问或输入"/"查看指令':'请向我提问或输入"/"查看指令,Shift+Enter换行'));n((()=>le.loading),(async e=>{var o;e||(await a(),null==(o=Se.value)||o.focus())}));const Pe=W.create();async function Le(){try{const e=await Pe.start({instance:_(),allowPunctuationMark:!1,timed:be.value||10,realTimeRecognition:!0});if("success"!==(null==e?void 0:e.result))return;le.sendContent=e.data||""}catch(e){console.log(e)}}s((()=>{W.destroy()}));const je=o(!1),De=o(!1),Te=l((()=>{var e;return!le.sendContent&&!(null==(e=Se.value)?void 0:e.activated.value)})),Me=l((()=>{var e,o;if(!le.selectedPatient)return(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.190"))||"选择患者";const{bcq04b:t,vaa05:l}=le.selectedPatient;let n="";t&&(n+=t+((null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.191"))||"床"));return l&&(n+=(!n||n.endsWith("/")?"":"/")+l),n}));function Ue(){var e;we.value.pop(),ge.value=A(we.value)?null==(e=A(we.value))?void 0:e.children:E(me.value||[]),ke.value=ge.value[0].shortcutId,Se.value.focus()}function Be(e){e||(le.showPatient=!1)}return n((()=>le.showPatient),(e=>{e&&(De.value=e)})),(e,o)=>(i(),d("section",{class:c(["chat-footer-wrapper",{"is-small":r(xe)}])},[u("div",{class:c(["chat-footer",r(le).loading?"disabled":""])},[r(pe)&&r(ne)&&r(ne).length>0?(i(),d("div",G,[r(xe)||r(pe)?w("v-if",!0):(i(),v(r(z),{key:0,secondary:"",size:"small",onClick:o[0]||(o[0]=()=>De.value=!0)},{icon:m((()=>[h(r(S),{color:r(_e)["--c-primary-color"],size:"20",component:r(M)},null,8,["color","component"])])),default:m((()=>[f(" "+p(r(Me)),1)])),_:1})),r(ne)&&r(ne).length>0?(i(!0),d(k,{key:1},g(r(ne),(e=>(i(),v(r(z),{secondary:"",size:"small",style:y(r(xe)?"background: #fff":""),round:r(xe),key:r(ae)(e),disabled:r(se)||r(ie)&&r(le).loading,onClick:()=>r(de)(e)},{default:m((()=>[f(p(r(ae)(e)),1)])),_:2},1032,["style","round","disabled","onClick"])))),128)):w("v-if",!0)])):w("v-if",!0),h(r(I),{"content-style":"height: 400px",placement:"top-start",trigger:"manual",width:"trigger","show-arrow":!1,to:!1,show:r(ce),onClickoutside:o[5]||(o[5]=e=>ce.value=!1)},{trigger:m((()=>[u("div",H,[h(r(P),{ref_key:"inputRef",ref:Se,placeholder:r(Ie),type:"textarea",autosize:{minRows:r(xe)?1:2,maxRows:7},disabled:r(se)||r(le).loading||r(he),value:r(le).sendContent,"onUpdate:value":o[2]||(o[2]=e=>r(le).sendContent=e),onKeydownCapture:r(re),onInput:r(ue)},b({_:2},[r(pe)?void 0:{name:"prefix",fn:m((()=>[r(le).selectedCommand&&r(le).selectedCommand.shortcutTitle?(i(),v(r(L),{key:0,bordered:!1,color:{textColor:r(_e)["--c-primary-color"]},style:{"--n-border-radius":"5px"}},{default:m((()=>[f(" /"+p(r(le).selectedCommand.shortcutTitle),1)])),_:1},8,["color"])):r(Te)?(i(),v(r(z),{key:1,text:"",onClick:o[1]||(o[1]=()=>je.value=!0)},{default:m((()=>[h(r(S),{color:"#8f66f7",size:"18",component:r(U)},null,8,["component"])])),_:1})):w("v-if",!0)])),key:"0"},r(xe)?{name:"suffix",fn:m((()=>[h(r(z),{text:"",disabled:r(le).loading,onClick:Le},{icon:m((()=>[h(r(S),{size:"30"},{default:m((()=>[h(V)])),_:1})])),_:1},8,["disabled"]),h(r(z),{circle:"",class:"gradient",style:{"margin-left":"10px"},disabled:r(ve),onClick:r(fe)},{icon:m((()=>[h(r(S),{color:"#fff",size:"20",component:r(B)},null,8,["component"])])),_:1},8,["disabled","onClick"])])),key:"1"}:void 0]),1032,["placeholder","autosize","disabled","value","onKeydownCapture","onInput"]),r(xe)?w("v-if",!0):(i(),d("div",J,[r(pe)?(i(),v(r(z),{key:0,text:"",disabled:r(se)||r(he)||r(le).loading,onClick:o[3]||(o[3]=e=>he.value=!0)},{icon:m((()=>[h(r(S),{size:"60"},{default:m((()=>[h(V)])),_:1})])),_:1},8,["disabled"])):w("v-if",!0),u("span",{class:c(["btn-send","gradient","fillet-8",r(ve)||r(he)?"disabled":""]),disabled:r(ve)||r(he),onClick:o[4]||(o[4]=(...e)=>r(fe)&&r(fe)(...e))},[h(r(S),{color:"#fff",size:"36",component:r(B)},null,8,["component"])],10,Q)]))])])),default:m((()=>{var e;return[u("div",X,[u("div",Y,[0===r(we).length?(i(),d("span",Z,(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.189"))||"推荐指令")):(i(),d(k,{key:1},[h(r(z),{text:"",onClick:Ue},{default:m((()=>[h(r(S),{color:"#999",size:"20",component:r(F)},null,8,["component"])])),_:1}),h(r(j),null,{default:m((()=>[(i(!0),d(k,null,g(r(we),(e=>(i(),v(r(D),{key:e.shortcutId},{default:m((()=>[f(p(e.shortcutTitle),1)])),_:2},1024)))),128))])),_:1})],64))]),u("div",$,[(i(!0),d(k,null,g(r(ge),(e=>(i(),d("div",{class:c(["menu-item",e.children&&e.children.length?"":"selectable",r(ke)===e.shortcutId?"selected":""]),key:e.shortcutId,onMouseover:C((()=>ke.value=e.shortcutId),["stop"]),onClick:()=>r(ye)(e)},[u("span",oe,p(e.shortcutTitle),1),u("span",te,p(e.shortcutDescription),1),e.children&&e.children.length?(i(),v(r(S),{key:0,color:"#999",size:"20",component:r(K)},null,8,["component"])):w("v-if",!0)],42,ee)))),128))])])]})),_:1},8,["show"]),r(pe)?(i(),v(O,{key:2,show:r(he),"onUpdate:show":o[8]||(o[8]=e=>x(he)?he.value=e:null)},null,8,["show"])):(i(),d(k,{key:1},[h(q,{show:je.value,"onUpdate:show":o[6]||(o[6]=e=>je.value=e)},null,8,["show"]),h(N,{show:De.value,"onUpdate:show":[o[7]||(o[7]=e=>De.value=e),Be]},null,8,["show"])],64)),r(pe)&&r(Ce)?(i(),v(r(T),{key:3,value:r(le).switchFlag,"onUpdate:value":o[9]||(o[9]=e=>r(le).switchFlag=e),"rail-style":ze},{checked:m((()=>[f("L1")])),unchecked:m((()=>[f("L2")])),_:1},8,["value"])):w("v-if",!0)],2)],2))}});export{le as default};
|
@@ -1,8 +1,2 @@
|
|
1
|
-
declare const _default: import("vue").DefineComponent<Readonly<import("vue").
|
2
|
-
[x: string]: unknown;
|
3
|
-
}>>, () => 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<{
|
4
|
-
[x: string]: unknown;
|
5
|
-
}>>>> & {}, {
|
6
|
-
readonly [x: number]: string;
|
7
|
-
} | {}>;
|
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<{}>>, {}>;
|
8
2
|
export default _default;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,
|
1
|
+
import{defineComponent as e,ref as n,computed as t,watch as l,createVNode as o,createTextVNode as s,nextTick as a,isVNode as i}from"vue";import{NSpin as u,NAvatar as r,NSpace as d,NButton as c}from"naive-ui";import m from"../../../../shared/assets/img/ai__avatar.png.js";import v from"../../../../shared/assets/img/logo.png.js";import{isArray as g,isFunction as p,has as f}from"lodash-es";import{uuidGenerator as h}from"../../../../shared/utils/index.js";import"@vueuse/core";import"date-fns";import"@vue/shared";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{useScrollLoading as w}from"../../../../shared/hooks/useScrollLoading.js";import b from"./ChatCard.js";import{isValidJSON as C}from"../utils/index.js";import y from"./ChatBI.vue.js";import{useData as I}from"../hooks/useData.js";function j(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!i(e)}var k=e({name:"ChatMain",inheritAttrs:!1,setup(e,{attrs:i,slots:k,emit:x}){const{state:L,queryData:T,queryRecord:B,defaultShortcutList:E,hideInput:P,isSmall:S,emit:D}=I(),M=n(null),O=n([]),z=n(!1),q=n(!1),A=n(),H=t((()=>S.value?v:m)),N={page:0,hasMore:!0};async function R(e=!1){if(!N.hasMore)return;N.page++,1==N.page&&(O.value=[]);const{records:n,rows:t}=await B.value({page:N.page});g(t)&&O.value.length<=+n&&(O.value=N.page>1?[...O.value,...t]:t,F(),O.value.length>=+n&&(e&&(z.value=!0),N.hasMore=!1,console.log("没有更多消息了")))}async function U(){var e,n;O.value.unshift({msgId:h(),contents:[{role:"user",content:L.sendContent}]}),null==(e=M.value)||e.scrollTo({top:0,behavior:"auto"}),F();const t=L.selectedCommand,l=L.selectedPrompt;L.selectedCommand=null,L.selectedPrompt=null;const o=await T.value({content:L.sendContent,contentType:"text",command:t,prompt:l,patient:L.selectedPatient});g(null==o?void 0:o.contents)&&(O.value.unshift(o),await a(),null==(n=M.value)||n.scrollTo({top:0,behavior:"auto"})),L.selectedPatientLabel="",L.selectedPatientForm=null,L.sending=!1,L.loading=!1,L.sendContent=""}function _(e,n,t){if(e.type!==n){if(e.childrens&&e.childrens.length)for(let l=0;l<e.childrens.length;l++)_(e.childrens[l],n,t)}else t.push(e)}function F(){O.value.forEach((e=>{e.contents.forEach((e=>{var n;if(Reflect.has(e,"disabled")||(e.disabled=!0),"json"===e.contentType&&"string"!=typeof e.content){const{settings:t,data:l,needConfirms:o}=e.content;if(o||!(null==t?void 0:t.setting)||!C(null==t?void 0:t.setting)||!(null==(n=null==l?void 0:l.buttonList)?void 0:n.length))return;const{templates:s=[]}=JSON.parse(t.setting),a=[];s.forEach((e=>{_(e,"BUTTON",a)})),a.forEach((e=>{const{buttonList:n}=e.setting;n.forEach((e=>{var n;const{conditions:t=[]}=(null==(n=null==e?void 0:e.advancedConfig)?void 0:n.disabled)||{};t.length&&(l[e.id+"Disabled"]="1")}))}))}}))}))}function J(e,n,t,l){const{contentType:s,content:a}=n;return"json"===s&&a?o(b,{selectParams:{taskId:e.taskId,instructionId:e.instructionId},msgItem:n,configs:t,msgId:l,"onButton-click":(t={})=>function(e){var n;const{item:t,msgItem:l,showMore:o}=e;return o?(A.value={item:t,msgItem:l},void(q.value=!0)):l?(D("button-click",e),void(l.disabled=!0)):void(t.link||(L.sendContent=(null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.27"))||"确定",L.sending=!0,L.loading=!0))}({item:e,msgItem:n,...t})},null):null}function G(e,n){const{contents:t=[],buttonType:l="",configs:s={},msgId:a=""}=e,i=J(e,t[n],s,a);if(i)return i;return[t[n].content.replace(/\\n|\n|\r\n/g,"<br>").split("<br>").filter((e=>!!e)).map(((e,n,t)=>[e,n===t.length-1?null:o("br",null,null)]))]}function K({role:e=""}){return"user"===e}function Q(){var e,n;let t;return o("div",{class:"message-item"},[o(r,{round:!0,size:S.value?64:40,src:H.value},null),o("div",{class:"content-box"},[o("div",{class:"content fillet-10 default"},[o("h2",null,[s((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.192"))||"Hi,我是你的AI助理")]),o("p",null,[s("我汇集了医生站/护士站各项智能服务,可以向我进行提问哦 ~ "),o("br",null,null),s("你的反馈助我成长,期待我们一起探索未来!下次可以在首页和应用页找到我~")]),g(E.value)&&E.value.length>0?[o("p",{style:"margin: 5px 0 5px"},[s((null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.195"))||"你可以试着问我:")]),o(d,{"wrap-item":!1},j(t=E.value.map((e=>o(c,{size:"large",secondary:!0,onClick:()=>L.sendContent=e,disabled:L.loading},j(e)?e:{default:()=>[e]}))))?t:{default:()=>[t]})]:null])])])}return w(M,(()=>{R()}),P.value?"bottom":"top"),R(!0),l((()=>L.externalData),(e=>{var n,t;e&&(f(n=e,"msgId")||(n.msgId=h()),O.value.unshift(n),null==(t=M.value)||t.scrollTo({top:0,behavior:"auto"}),L.loading=!1,L.externalData=null)})),l((()=>L.sending),(e=>{var n,t,l,o,s,a,i;if(e){if(O.value.length>0&&[(null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.428"))||"确认",(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.27"))||"确定"].includes(L.sendContent)){const e=null==(s=null==(l=O.value[0])?void 0:l.contents)?void 0:s[(null==(o=O.value[0].contents)?void 0:o.length)-1];return(null==(a=e.content)?void 0:a.body)&&!e.disabled?(null==(i=document.getElementById(O.value[0].msgId))||i.click(),void setTimeout((()=>{O.value.unshift({msgId:h(),contents:[{role:"user",content:L.sendContent}]}),L.selectedCommand=null,L.selectedPrompt=null,L.sending=!1,L.sendContent=""}))):void U()}U()}})),()=>[o("section",{class:"chat-main-wrapper",ref:M},[o("div",{class:"chat-main-box"},[o("div",{class:"chat-main",style:{"flex-direction":P.value?"column":"column-reverse"}},[[L.loading?o("div",{class:"message-item"},[[o("div",{class:"content-box"},[o("div",{class:"content loading"},[o(u,{size:22,stroke:"#4170EE"},null),o("span",null,[s("正在加载中,请稍等...")])])])]]):null,O.value.map((e=>e.contents.map(((n,t)=>o("div",{class:"message-item",key:e.msgId+t},[[o("div",{class:["content-box",K(n)?"mine":""]},[o("div",{class:"content"},[p(n.render)?n.render():G(e,t)])])]]))))),z.value?Q():null]]),o(y,{show:q.value,"onUpdate:show":e=>q.value=e,data:A.value},null)])])]}});export{k as default};
|
@@ -0,0 +1,2 @@
|
|
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;
|
@@ -0,0 +1 @@
|
|
1
|
+
import{defineComponent as e,ref as t,watch as n,createVNode as o}from"vue";import"../../../../shared/utils/index.js";import{NTooltip as r,NButton as s,NIcon as a}from"naive-ui";import"@vueuse/core";import"date-fns";import{isArray as i,isFunction as l,isString as c}from"lodash-es";import"@vue/shared";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import{SyncOutline as u,ChevronUp as d,ChevronDown as p}from"@vicons/ionicons5";import{useScrollLoading as m}from"../../../../shared/hooks/useScrollLoading.js";import v from"markdown-it";import{getSessionMsgApi as g,getHistoryRecordApi as h}from"../api/index.js";import{useData as f}from"../hooks/useData.js";import"../utils/index.js";import y from"./card/JsonCard.js";import x from"./message-render/CardRender.js";import _ from"./message-render/FormRender.js";const b=v({html:!0});var T=e({name:"ChatMain",inheritAttrs:!1,setup(e,{attrs:v,slots:T,emit:w}){const{state:j,sessionId:M,sendMessage:k,appCode:C,isStreamingOutput:S,prologue:E,bpmnProcessIdAndStartToken:I,formatProcessInfo:L}=f(),A=t(null),R=t(!1),q={page:0,hasMore:!0};async function H(){if(!q.hasMore||!M.value)return;q.page++,1==q.page&&(j.record=[]);const e=S.value?await g({appCode:C.value,sessionId:M.value,page:q.page,pageSize:20}):await h({sessionId:M.value,page:q.page,pageSize:20}),{rows:t,query:n={}}=e||{};i(t)&&(t.forEach((e=>{i(e.contents)&&e.contents.length>1&&(e.cntents.forEach((e=>{O(e||{})&&(e.__showMore=!0),"form"===(null==e?void 0:e.messageType)&&(e.disabled=!0)})),e.contents.reverse())})),j.record.length<=+n.records&&(j.record=q.page>1?[...j.record,...t]:t,j.record.length>=+n.records&&(q.hasMore=!1,console.log("没有更多消息了"))))}function P(e,t){var n;const{contentType:o,messageType:r}=(null==(n=null==e?void 0:e.contents)?void 0:n[t])||{};return"json"===o&&"retry_inquiry"!==r}function $(e){return c(e)&&e?[o("div",{class:"ai-chat__markdown",innerHTML:function(e){const t=[],n=e.replace(/<table[^>]*>([\s\S]*?)<\/table>/g,((e,n)=>(t.push(n),`<table>TABLE_PLACEHOLDER_${t.length-1}</table>`)));return n.replace(/(\\n|\r|\n)/g,'<div style="height:4px"></div>').replace(/<div style="height:4px"><\/div>$/,"").replace(/<table>TABLE_PLACEHOLDER_(\d+)<\/table>/g,((e,n)=>`<table>${t[n]}</table>`))}(b.render(e))},null)]:null}function z(e,t){var n;const{contents:i=[],msgId:l=""}=e,{countTime:c,__showMore:m,contentType:v="",messageType:g="",content:h=""}=i[t]||{};if("json"===v)return"retry_inquiry"===g?[$((null==h?void 0:h.errorMsg)||""),o(r,{trigger:"hover"},{default:()=>"重新生成",trigger:()=>o(s,{style:"position: relative;top: 3px;margin-left: 8px",type:"primary",text:!0,onClick:()=>{return e=null==h?void 0:h.audioText,j.loadingText="系统正在对您的对话内容进行梳理整合,转化为规范的结构化问诊记录",void k({contents:[{content:e,contentType:"text",role:"user"}],opType:"create_inquiry"});var e}},{icon:()=>o(a,{component:u},null)})})]:"form"===g?o(_,{"msg-item":i[t]},null):"card"===g?o(x,{"msg-item":i[t]},null):function(e,t){return o(y,{item:e,messageItem:t},null)}(e,i[t]);const f=$((null==(n=i[t])?void 0:n.content)||"");if(f&&O(i[t]||{})){const e=o("div",{style:"cursor: pointer; border-top: 1px solid #e5e5e5;",onClick:()=>{var e;return i[t].__showMore=!(null==(e=i[t])?void 0:e.__showMore)}},[[`已深度分析(用时${null!=c?c:0}秒)`,o(a,{style:"position: relative;top: 4px",size:18,component:m?d:p},null)]]);return[o("div",{style:{display:m?"none":"unset"}},[f]),e]}return f}function D({role:e=""}){return"user"===e}function O({msgSource:e=""}){return"assistant"===e}function B(){const e=$(E.value);return e?o("div",{class:"message-item"},[o("div",{class:"content-box"},[o("div",{class:"content fillet-10 default"},[e])])]):null}return m(A,(()=>{H()}),"top"),n((()=>M.value),(async e=>{var t;j.loading=!1,R.value=!1,j.showRight=!1,j.showRightSlot=!1,j.record=[],q.page=0,q.hasMore=!0,await H(),(null==(t=j.record)?void 0:t.length)||(R.value=!0),L(I.value)}),{immediate:!0}),()=>[o("section",{class:"chat-main-wrapper",ref:A},[o("div",{class:"chat-main-box"},[o("div",{class:"chat-main",style:"column-reverse"},[[j.loading?o("div",{class:"message-item"},[o("div",{class:"content-box"},[o("div",{class:"content loading"},[o("span",{class:"ai-chat__loading-icon"},null),o("span",null,[j.loadingText||"分析中..."])])])]):null,j.record.map((e=>i(e.contents)?e.contents.map(((t,n)=>z(e,n)?o("div",{class:"message-item",key:e.msgId+n},[o("div",{class:["content-box",D(t)?"mine":""]},[o("div",{class:["content",{"content-json":!l(t.render)&&P(e,n)}]},[l(t.render)?t.render():z(e,n)])])]):null)):null)),R.value?B():null]])])])]}});export{T as default};
|
@@ -13,8 +13,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
13
13
|
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
14
14
|
}>>;
|
15
15
|
emit: (event: "update:show", ...args: any[]) => void;
|
16
|
-
|
17
|
-
|
16
|
+
state: AnyObject;
|
17
|
+
patientInfo: import("vue").Ref<any>;
|
18
18
|
formValue: {
|
19
19
|
businessType: string;
|
20
20
|
vaa01: null;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,
|
1
|
+
import{defineComponent as e,reactive as a,ref as l,openBlock as n,createBlock as t,unref as o,withCtx as u,createVNode as i,createTextVNode as d,toDisplayString as r}from"vue";import{NDrawer as s,NDrawerContent as w,NForm as v,NFormItem as g,NRadioGroup as c,NRadio as f,NSelect as p,NButton as y}from"naive-ui";import{isFunction as b,isArray as m}from"lodash-es";import{useData as h}from"../hooks/useData.js";import"../utils/index.js";var C=e({__name:"ChatPatient",props:{show:{type:Boolean}},emits:["update:show"],setup(e,{emit:C}){var L;const{state:k,patientInfo:B}=h(),_=a({businessType:"CLINICIAN",vaa01:null,bck03a:""}),I={businessType:{required:!0,trigger:"change",message:"请选择类型"},vaa01:{required:!0,trigger:["blur","change"],message:(null==(L=window.getLanguageByCode)?void 0:L.call(window,"10010.1.201"))||"请选择患者"}},P=l([]),T=l();function q(e){var a,l,n,t;const{bcq04b:o,vae96:u}=e,i="1"==u?(null==(a=window.getLanguageByCode)?void 0:a.call(window,"10010.1.203"))||"男":"2"==u?(null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.204"))||"女":(null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.205"))||"未知";let d="";o&&(d+=o+((null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.191"))||"床"));const r=a=>{e[a]&&(d+=(!d||d.endsWith("/")?"":"/")+e[a])};return r("vaa05"),d+="/"+i,r("vae87"),r("bck02a"),d.startsWith("/")&&(d=d.slice(1)),d}function N(e,a){_.bck03a=a.bck03a}async function A(e){var a;if(b(null==(a=B.value)?void 0:a.queryPatient))try{const a=await B.value.queryPatient({keyword:e,businessType:_.businessType});if(m(a))return void(P.value=a);P.value=[]}catch(e){P.value=[]}}function j(){_.vaa01=null,_.bck03a="",A("")}function x(e){var a;e.preventDefault(),null==(a=T.value)||a.validate((e=>{if(!e){const e={..._,...P.value.find((e=>e.vaa01===_.vaa01))};k.showPatient?(k.selectedPatientLabel=q(e),k.selectedPatientForm=e):k.selectedPatient=e,C("update:show",!1)}}))}return A(""),(a,l)=>(n(),t(o(s),{placement:"bottom",height:"300","trap-focus":!1,to:"#"+o(k).id,show:e.show,onMaskClick:l[2]||(l[2]=()=>C("update:show",!1))},{default:u((()=>[i(o(w),null,{default:u((()=>[i(o(v),{ref_key:"formRef",ref:T,"label-placement":"left","label-width":"auto",size:"large",model:_,"require-mark-placement":"right-hanging",rules:I},{default:u((()=>{var e,a,n;return[i(o(g),{label:(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.197"))||"业务",path:"businessType"},{default:u((()=>{var e;return[i(o(c),{value:_.businessType,"onUpdate:value":[l[0]||(l[0]=e=>_.businessType=e),j],name:(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.197"))||"业务"},{default:u((()=>[i(o(f),{value:"CLINICIAN"},{default:u((()=>{var e;return[d((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.198"))||"门诊")]})),_:1}),i(o(f),{value:"HOSPITAL"},{default:u((()=>{var e;return[d((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.199"))||"住院")]})),_:1})])),_:1},8,["value"])]})),_:1}),i(o(g),{label:(null==(a=window.getLanguageByCode)?void 0:a.call(window,"10010.1.200"))||"患者",path:"vaa01"},{default:u((()=>{var e;return[i(o(p),{to:"body",remote:"",value:_.vaa01,"onUpdate:value":[l[1]||(l[1]=e=>_.vaa01=e),N],placeholder:(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.201"))||"请选择患者",filterable:"",options:P.value,"render-label":q,"value-field":"vaa01",onSearch:A},null,8,["value","options"])]})),_:1}),i(o(g),{label:(null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.202"))||"科室"},{default:u((()=>[d(r(_.bck03a),1)])),_:1}),i(o(g),null,{default:u((()=>[i(o(y),{block:"",type:"primary",onClick:x},{default:u((()=>{var e;return[d((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.27"))||"确定")]})),_:1})])),_:1})]})),_:1},8,["model"])])),_:1})])),_:1},8,["to","show"]))}});export{C as default};
|
@@ -16,8 +16,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
16
16
|
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
17
17
|
}>>;
|
18
18
|
emit: (event: "update:show", ...args: any[]) => void;
|
19
|
-
|
20
|
-
|
19
|
+
state: AnyObject;
|
20
|
+
queryPrompt: import("vue").Ref<any>;
|
21
21
|
listRef: import("vue").Ref<any>;
|
22
22
|
keyword: import("vue").Ref<string>;
|
23
23
|
list: import("vue").Ref<AnyObject[]>;
|
@@ -1 +1 @@
|
|
1
|
-
import{createElementVNode as e,defineComponent as o,
|
1
|
+
import{createElementVNode as e,defineComponent as o,ref as t,computed as a,watch as s,openBlock as l,createBlock as n,unref as r,withCtx as u,createVNode as p,createElementBlock as i,Fragment as c,renderList as d,toDisplayString as m,withDirectives as v,vShow as h}from"vue";import{NDrawer as f,NDrawerContent as w,NButton as g,NIcon as k,NInput as C}from"naive-ui";import{CloseOutline as y,SearchOutline as _}from"@vicons/ionicons5";import{isFunction as j}from"lodash-es";import"../../../../shared/utils/index.js";import{useDebounceFn as x}from"@vueuse/core";import"date-fns";import"@vue/shared";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import{useScrollLoading as M}from"../../../../shared/hooks/useScrollLoading.js";import{useData as b}from"../hooks/useData.js";import"../utils/index.js";var B;const L={class:"title"},P=e("span",null,(null==(B=window.getLanguageByCode)?void 0:B.call(window,"10010.1.206"))||"发现提示词",-1),R=["onClick"];var S=o({__name:"ChatPrompt",props:{show:{type:Boolean}},emits:["update:show"],setup(o,{emit:B}){const S=o,U={page:0,hasMore:!0},{state:q,queryPrompt:z}=b(),D=t(),H=t(""),I=t([]),O=a((()=>!I.value.length&&!!(H.value||"").replace(/^\s+|\s+$/g,""))),T=x(A,500);async function $(){try{if(!U.hasMore||!j(z.value))return;U.page++,1==U.page&&(I.value=[]);const e=await z.value({keyword:H.value,page:U.page});I.value.length<=+e.records&&(I.value=U.page>1?I.value.concat(e.rows):e.rows,I.value.length>=+e.records&&(U.hasMore=!1))}catch(e){}}function A(){Object.assign(U,{page:0,hasMore:!0}),$()}return M(D,(()=>{$()})),s((()=>S.show),(e=>{e&&(H.value="",A())})),(t,a)=>(l(),n(r(f),{placement:"bottom",height:"70%","trap-focus":!1,to:"#"+r(q).id,show:o.show,"content-class":"prompt-wrapper",onMaskClick:a[2]||(a[2]=()=>B("update:show",!1))},{default:u((()=>[p(r(w),null,{header:u((()=>[e("div",L,[P,p(r(g),{text:"",onClick:a[0]||(a[0]=()=>B("update:show",!1))},{default:u((()=>[p(r(k),{size:"20",component:r(y)},null,8,["component"])])),_:1})]),p(r(C),{ref:"inputRef",clearable:"",autofocus:"",value:H.value,"onUpdate:value":[a[1]||(a[1]=e=>H.value=e),r(T)]},{prefix:u((()=>[p(r(k),{component:r(_)},null,8,["component"])])),_:1},8,["value","onUpdate:value"])])),default:u((()=>{var o;return[e("div",{class:"list-wrapper",ref_key:"listRef",ref:D},[(l(!0),i(c,null,d(I.value,(o=>(l(),i("div",{class:"item",key:o.promptId,onClick:()=>function(e){B("update:show",!1),q.selectedPrompt=e,q.sendContent=e.promptContent}(o)},[e("p",null,m(o.promptTitle),1),e("p",null,m(o.promptContent),1)],8,R)))),128)),v(e("div",null,(null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.81"))||"找不到相关的结果",512),[[h,r(O)]])],512)]})),_:1})])),_:1},8,["to","show"]))}});export{S as default};
|
@@ -0,0 +1,57 @@
|
|
1
|
+
import { AnyObject } from '../../../../shared/types';
|
2
|
+
declare const _default: import("vue").DefineComponent<{}, {
|
3
|
+
medicalLabel: {
|
4
|
+
key: string;
|
5
|
+
title: string;
|
6
|
+
}[];
|
7
|
+
state: AnyObject;
|
8
|
+
configs: import("vue").Ref<any>;
|
9
|
+
sendMessage: (params?: AnyObject) => Promise<void>;
|
10
|
+
isStreamingOutput: import("vue").Ref<any>;
|
11
|
+
toolbarConfig: {
|
12
|
+
toolbarKeys: never[];
|
13
|
+
};
|
14
|
+
content: import("vue").Ref<string>;
|
15
|
+
saveDisabled: import("vue").ComputedRef<any>;
|
16
|
+
handleSave: () => Promise<void>;
|
17
|
+
handleDelete: () => Promise<void>;
|
18
|
+
createMedicalRecord: () => void;
|
19
|
+
extractContentByTitle: () => AnyObject;
|
20
|
+
NSpace: any;
|
21
|
+
NButton: any;
|
22
|
+
Editor: import("../../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{
|
23
|
+
editorConfig: {
|
24
|
+
type: ObjectConstructor;
|
25
|
+
};
|
26
|
+
toolbarConfig: {
|
27
|
+
type: ObjectConstructor;
|
28
|
+
};
|
29
|
+
uploadImgUrl: {
|
30
|
+
type: StringConstructor;
|
31
|
+
};
|
32
|
+
isDisabled: {
|
33
|
+
type: BooleanConstructor;
|
34
|
+
default: boolean;
|
35
|
+
};
|
36
|
+
}, {
|
37
|
+
editorRef: import("vue").ShallowRef<any>;
|
38
|
+
renderVN: () => JSX.Element;
|
39
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, never[], never, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
40
|
+
editorConfig: {
|
41
|
+
type: ObjectConstructor;
|
42
|
+
};
|
43
|
+
toolbarConfig: {
|
44
|
+
type: ObjectConstructor;
|
45
|
+
};
|
46
|
+
uploadImgUrl: {
|
47
|
+
type: StringConstructor;
|
48
|
+
};
|
49
|
+
isDisabled: {
|
50
|
+
type: BooleanConstructor;
|
51
|
+
default: boolean;
|
52
|
+
};
|
53
|
+
}>> & {}, {
|
54
|
+
isDisabled: boolean;
|
55
|
+
}>>;
|
56
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
57
|
+
export default _default;
|
@@ -0,0 +1 @@
|
|
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};
|
@@ -0,0 +1 @@
|
|
1
|
+
import{defineComponent as t,reactive as n,ref as e,computed as o,watch as l,withDirectives as i,openBlock as s,createElementBlock as a,createVNode as r,unref as c,withCtx as u,createTextVNode as d,createCommentVNode as y,vShow as k}from"vue";import{NSpace as f,NButton as p}from"naive-ui";import{$message as g}from"../utils/index.js";import _ from"../../../editor/index.js";import{callbackApi as m}from"../api/index.js";import{useData as v}from"../hooks/useData.js";import"lodash-es";const h={class:"ai-chat-right"};var j=t({__name:"ChatRight",setup(t){const j=[{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:b,configs:w,sendMessage:C,isStreamingOutput:x}=v(),z=n({toolbarKeys:[]}),q=e(""),R=o((()=>{var t;return b.loading||!(null==(t=b.consultationContent)?void 0:t.id)}));async function D(){try{b.loading=!0;const t=$();b.consultationContent.contents[0].content.details.autoBackFillData=t,await m(b.consultationContent),g.success("保存成功")}catch(t){console.log("error ==>",t)}finally{b.loading=!1}}function S(){var t;const n=$();console.log("json ==>",n,b.consultationContent),b.consultationContent.contents[0].content.details.autoBackFillData=n,x.value||(b.loadingText="系统进入深度分析模式,正在整合数据,调取主诉,获取现病史、既往病史,读取过敏史,综合多维度信息生成诊断建议"),C({opType:"create_medical",...b.consultationContent,contents:[{role:"user",content:"",contentType:"text"}],medicalInfo:b.consultationContent,firstSubmit:!0,parentMsgId:b.consultationContent.msgId,flowResult:b.consultationContent.contents[0].content}),b.inquiryStr=(null==(t=b.consultationContent)?void 0:t.__title)||""}function $(){const t={};return j.forEach((n=>{const e=new RegExp(`<p><span.*?><strong>\\d+、${n.title}<\\/strong><\\/span><\\/p><p>(.*?)<\\/p>`,"i"),o=q.value.match(e);if(o&&o[1]){const e=o[1].trim();t[n.key]="<br>"===e?"":e}})),t}return l((()=>b.showRight),(t=>{var n,e,o,l;if(t){b.showRightSlot=!1;const{autoBackFillData:t}=(null==(l=null==(o=null==(e=null==(n=b.consultationContent)?void 0:n.contents)?void 0:e[0])?void 0:o.content)?void 0:l.details)||{};if(q.value="",!t)return;j.forEach(((n,e)=>{q.value+=`<p><span style="font-size: 16px;"><strong>${e+1}、${n.title}</strong></span></p><p><span>${t[n.key]||""}</span></p>`}));const i=Object.keys(t).reduce(((n,e)=>{var o;return n+=(null==(o=j.find((t=>t.key===e)))?void 0:o.title)+": "+t[e]+"\n"}),"");b.inquiryStr=i}else b.consultationContent=null})),(t,n)=>i((s(),a("div",h,[r(c(_),{"toolbar-config":z,modelValue:q.value,"onUpdate:modelValue":n[0]||(n[0]=t=>q.value=t)},null,8,["toolbar-config","modelValue"]),r(c(f),{class:"footer","wrap-item":!1},{default:u((()=>[r(c(p),{round:"",class:"gradient",disabled:c(b).loading,onClick:S},{default:u((()=>[d("审核完成")])),_:1},8,["disabled"]),r(c(p),{round:"",onClick:D,disabled:c(R)},{default:u((()=>[d("暂存")])),_:1},8,["disabled"]),y(' <n-button round @click="handleDelete" :disabled="state.loading" style="margin-left: auto">删除</n-button> ')])),_:1})],512)),[[k,c(b).showRight]])}});export{j as default};
|
@@ -0,0 +1,25 @@
|
|
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;
|