FormDrawerHistory-c55dc82a.js 8.0 KB

1
  1. var g=(e,t,a)=>new Promise((n,i)=>{var r=o=>{try{s(a.next(o))}catch(p){i(p)}},h=o=>{try{s(a.throw(o))}catch(p){i(p)}},s=o=>o.done?n(o.value):Promise.resolve(o.value).then(r,h);s((a=a.apply(e,t)).next())});import{a as D,B as _}from"./index-e473004f.js";import{a as b}from"./index-b614de6b.js";import{ak as c,_ as v}from"./index.js";import{l as d}from"./antd-ecb53b14.js";import{c as T}from"./roomApi-24c97ea0.js";import{u as w,_ as Y}from"./useTable-e1a77cdc.js";import"./FormItem.vue_vue_type_script_lang-35d3ca4d.js";import{a as C}from"./vitalsHistoryApi-41f6c31d.js";import{C as x}from"./ChartsCard-981e4c18.js";import{d as F,f as u,r as N,Y as S,a6 as k,a7 as M,_ as y,l as P,u as f,aa as L,x as H}from"./vue-8fccce23.js";const ee=e=>c.post({url:"/archives/formulaTemplate/add",params:e}),ae=e=>c.post({url:"/archives/formulaTemplate/edit",params:e}),te=e=>c.get({url:"/archives/formulaTemplate/query/list/"+e}),oe=e=>c.get({url:"/archives/formulaTemplate/detail/"+e}),B=e=>c.post({url:"/biz/drug/query/list",params:e}),le=[{title:"类型",dataIndex:"typeId",edit:!0,editable:!0,editRule:!0,width:150,editComponent:"ApiSelect",editComponentProps:({record:e})=>({api:b,params:{dictCode:"ct"},showSearch:!0,placeholder:"请选择",getPopupContainer:()=>document.body,onOptionsSelect:t=>{e.type=t[0].label,e.nameId=""}})},{title:"类型名称",dataIndex:"type",ifShow:!1},{title:"厂商",ifShow:!1,dataIndex:"makers"},{title:"名称",dataIndex:"name",edit:!0,editable:!0,width:150,editComponent:"ApiSelect",editRule:!0,editComponentProps:({record:e})=>({api:T,immediate:!1,labelField:"name",valueField:"name",params:{type:e.typeId||"",enable:!0},placeholder:"请选择",onOptionsSelect:t=>{e.makers=t[0].makers}})},{title:"数量",dataIndex:"count",width:200,edit:!0,editable:!0,editComponent:"InputNumber",editRule:!0,editComponentProps:{placeholder:"请输入"}}],re=[{label:"血管通路",field:"vascularAccess",required:!0,component:"ApiSelect",componentProps:{api:b,params:{dictCode:"va_type"}}},{label:"透析模式",field:"dialysisType",required:!0,component:"ApiSelect",componentProps:{api:b,params:{dictCode:"dt"}}},{label:"制定日期",field:"enactedTime",required:!0,component:"DatePicker",componentProps:()=>({placeholder:"请输入制定日期",getPopupContainer:()=>document.body,valueFormat:"YYYY-MM-DD"})},{field:"vitals",component:"PlainTitle",defaultValue:"体征",label:"体征",subLabel:"查看历史",subLabelColor:"rgba(0, 109, 255, 1)",colProps:{span:24}},{label:"干体重 (kg)",field:"vitals.dryWeight",component:"InputNumber",required:!0,componentProps:{placeholder:"请输入干体重",step:"0.01"}},{label:"OH值 (kg)",field:"vitals.oh",component:"InputNumber",required:!0,componentProps:{placeholder:"请输入干体重",step:"0.01"}},{label:"V值 (kg)",field:"vitals.v",component:"InputNumber",required:!0,componentProps:{placeholder:"请输入干体重",step:"0.01"}},{field:"anticoagulant",component:"PlainTitle",defaultValue:"抗凝",colProps:{span:24}},{label:"抗凝方式Label",field:"anticoagulant.type",component:"Input",show:!1},{label:"抗凝方式",field:"anticoagulant.typeId",component:"ApiSelect",itemProps:{validateTrigger:"blur"},componentProps:({formModel:e})=>({api:b,params:{dictCode:"agt"},onOptionsSelect:t=>{var a;e["anticoagulant.type"]=(a=t[0])==null?void 0:a.label,e["anticoagulant.nameId"]=void 0}})},{label:"抗凝剂名称",field:"anticoagulant.name",component:"Input",show:!1},{label:"抗凝剂",field:"anticoagulant.nameId",component:"ApiSelect",componentProps:({formModel:e})=>({api:B,immediate:!1,labelField:"name",valueField:"id",params:{type:e["anticoagulant.typeId"]},onOptionsSelect:t=>{var a,n;e["anticoagulant.nameId"]=(a=t[0])==null?void 0:a.value,e["anticoagulant.name"]=(n=t[0])==null?void 0:n.label}}),ifShow:({values:e})=>e["anticoagulant.typeId"]&&e["anticoagulant.typeId"]!=""},{label:"首剂(mg)",field:"anticoagulant.firstDose",component:"InputNumber",componentProps:{placeholder:"请输入追加",step:"0.01"}},{label:"追加(mg)",field:"anticoagulant.appendDose",component:"InputNumber",componentProps:{placeholder:"请输入追加",step:"0.01"}},{field:"suppliesTemplateTitle",component:"PlainTitle",defaultValue:"耗材",colProps:{span:24}},{field:"suppliesTemplate",component:"PlainTitle",slot:"suppliesTemplate",labelClass:"hidden",colProps:{span:24}},{field:"dialysisParam11",component:"PlainTitle",defaultValue:"透析参数",colProps:{span:24}},{label:"透析时长 (h)",field:"dialysisParam.dialysisTime",component:"InputNumber",componentProps:{placeholder:"请输入",step:"0.01"}},{label:"流量 (ml/min)",field:"dialysisParam.flowRate",component:"InputNumber",componentProps:{placeholder:"请输入",step:"0.01"}},{label:"湿度 (℃)",field:"dialysisParam.temperature",component:"InputNumber",componentProps:{placeholder:"请输入",step:"0.01"}},{label:"血流量 (ml/min)",field:"dialysisParam.bloodFlow",component:"InputNumber",componentProps:{placeholder:"请输入",step:"0.01"}},{label:"K (mmolL)",field:"dialysisParam.k",component:"InputNumber",componentProps:{placeholder:"请输入",step:"0.01"}},{label:"Na (mmolL)",field:"dialysisParam.na",component:"InputNumber",componentProps:{placeholder:"请输入",step:"0.01"}},{label:"Ca (mmolL)",field:"dialysisParam.ca",component:"InputNumber",componentProps:{placeholder:"请输入",step:"0.01"}},{label:"碳酸氢根 (mmolL)",field:"dialysisParam.hco",component:"InputNumber",componentProps:{placeholder:"请输入",step:"0.01"}},{label:"Mg (mmolL)",field:"dialysisParam.mg",component:"InputNumber",componentProps:{placeholder:"请输入",step:"0.01"}},{label:"Cl (mmolL)",field:"dialysisParam.cl",component:"InputNumber",componentProps:{placeholder:"请输入",step:"0.01"}},{label:"葡萄糖 (mmolL)",field:"dialysisParam.glucose",component:"InputNumber",componentProps:{placeholder:"请输入",step:"0.01"}},{label:"置换液",field:"dialysisParam.dsplacementFluid",component:"Input",componentProps:{placeholder:"请输入"},ifShow:({values:e})=>e.dialysisType=="dt_hd_crrt"},{label:"稀释方式",field:"dialysisParam.dilute",component:"Input",componentProps:{placeholder:"请输入"},ifShow:({values:e})=>e.dialysisType=="dt_hd_crrt"}],R=[{title:"时间",dataIndex:"dialysisTime",align:"left"},{title:"透前血压(mmHg)",dataIndex:"preBloodPressure",align:"left"},{title:"透前体重(kg)",dataIndex:"preWeight",align:"left"},{title:"透后体重(kg)",dataIndex:"postWeight",align:"left"},{title:"干体重(kg)",dataIndex:"dryWeight",align:"left"},{title:"实际超滤量(kg)",dataIndex:"actualUltrafiltration",align:"left"}],V={class:"w-full mt-2"},q={class:"my-2"},A="70%",O=F({__name:"FormDrawerHistory",setup(e){const t=u("体征历史数据"),a=u(),n=u([d().subtract(3,"month").format("YYYY-MM-DD"),d().format("YYYY-MM-DD")]),i=u([]);d().subtract(3,"month").format("YYYY-MM-DD"),d().format("YYYY-MM-DD");const r=N({colors:[{color:"rgba(33, 201, 153, 1)",label:"透前血压 (mmHg)",dot:"rgba(33, 201, 153, 1)"}],infoData:[],dateData:[]}),[h,{setTableData:s}]=w({rowKey:"id",showIndexColumn:!1,bordered:!0,striped:!1,pagination:!1,maxHeight:200,dataSource:i.value,columns:R}),[o,{setDrawerProps:p}]=D(l=>g(this,null,function*(){console.log("🚀 ~ file: FormDrawer.vue:49 ~ data:",l),p({confirmLoading:!1}),a.value=l.record.patientBasicId,yield I()}));function I(){return g(this,null,function*(){const l=yield C({createTime:n.value,patientBasicId:a.value});r.dateData=l.map(m=>m.dialysisTime?d(m.dialysisTime).format("YYYY-MM-DD"):""),r.infoData=l.map(m=>m.preBloodPressure),i.value=l,yield H(),yield s(i.value)})}return(l,m)=>(S(),k(f(_),L(l.$attrs,{destroyOnClose:"",onRegister:f(o),title:t.value,width:A,showFooter:!1}),{default:M(()=>[y("div",V,[y("div",q,[P(x,{title:"透前血压趋势","has-safe":!1,colors:r.colors,height:"200px","date-data":r.dateData,"info-data":r.infoData},null,8,["colors","date-data","info-data"])]),P(f(Y),{onRegister:f(h)},null,8,["onRegister"])])]),_:1},16,["onRegister","title"]))}});const W=v(O,[["__scopeId","data-v-3e62c569"]]),ne=Object.freeze(Object.defineProperty({__proto__:null,default:W},Symbol.toStringTag,{value:"Module"}));export{W as F,te as a,oe as b,le as c,re as d,ee as e,ae as f,ne as g};