index-27007b43.js 9.4 KB

1
  1. var de=Object.defineProperty,ue=Object.defineProperties;var fe=Object.getOwnPropertyDescriptors;var $=Object.getOwnPropertySymbols;var pe=Object.prototype.hasOwnProperty,me=Object.prototype.propertyIsEnumerable;var j=(r,o,n)=>o in r?de(r,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[o]=n,T=(r,o)=>{for(var n in o||(o={}))pe.call(o,n)&&j(r,n,o[n]);if($)for(var n of $(o))me.call(o,n)&&j(r,n,o[n]);return r},N=(r,o)=>ue(r,fe(o));var g=(r,o,n)=>new Promise((P,h)=>{var b=m=>{try{w(n.next(m))}catch(M){h(M)}},z=m=>{try{w(n.throw(m))}catch(M){h(M)}},w=m=>m.done?P(m.value):Promise.resolve(m.value).then(b,z);w((n=n.apply(r,o)).next())});import{P as ge}from"./ImportModal.vue_vue_type_style_index_0_scoped_a59c69fa_lang-1f52fa9b.js";import{I as ye}from"./ImportModal-0a643374.js";import{X as ve}from"./XTTab-2f7efd67.js";/* empty css */import{S as _e}from"./Sift-381d25b3.js";import{o as V,aO as Y,f as u,_ as he}from"./index.js";import{u as be,a as ke,_ as Ce}from"./useTable-3abd6d70.js";import{_ as xe}from"./componentMap-6df01015.js";import{u as De}from"./useForm-c3e28b04.js";import"./FormItem.vue_vue_type_script_lang-35d3ca4d.js";import{B as we,a as Me,c as Re,s as Be,b as Se}from"./data-ee02378a.js";import{d as Te,r as U,f as F,R as Fe,o as Ie,Y as c,Z as d,_,l,u as s,a7 as x,a9 as p,F as v,a0 as Pe,$ as y,E as D,ad as q,a8 as ze,a6 as Ae,a1 as Ve,a2 as Ye}from"./vue-8fccce23.js";import{g as Ee,h as $e,i as je,j as O}from"./patientBasicApi-d8092592.js";import{l as Ne}from"./index-b614de6b.js";import{as as Ue,l as K}from"./antd-ecb53b14.js";import{u as I}from"./index-8cbf1e33.js";import{_ as qe}from"./FormModal.vue_vue_type_script_setup_true_lang-e9289fdc.js";import{_ as Oe}from"./FormModal.vue_vue_type_script_setup_true_lang-7d38fa37.js";import Ke from"./PrintCardModal-5c412583.js";import Xe from"./FormDrawerSift-a14a9346.js";import{u as Le}from"./index-e473004f.js";import{b as Qe}from"./download-c6c2acd3.js";import"./useForm-19fca69f.js";import"./componentMap-16efd70f.js";import"./uuid-31b8b5a4.js";import"./useWindowSizeFn-8ad2dbf2.js";import"./onMountedOrActivated-cb072c10.js";import"./sortable.esm-4ae27e0b.js";import"./index-22d6b33a.js";import"./index-3eef3423.js";import"./useFormItem-d8cab136.js";import"./useSortable-987ef813.js";import"./copyTextToClipboard-ab85e052.js";import"./TextEditor-284232fa.js";import"./index-b8ee0cd4.js";const Ze=r=>(Ve("data-v-bfe6f994"),r=r(),Ye(),r),Ge={class:"m-4"},He={class:"flex justify-between"},Je=Ze(()=>_("span",null,"患者建档",-1)),We={class:"flex justify-between my-4"},et={class:"flex"},tt={key:0,class:"flex mb-2"},at={key:6,class:"flex"},it=Te({__name:"index",setup(r){const o=U({}),n=F([{key:"gender",dictCode:"pb_sex"},{key:"patientReturn",dictCode:"pb_return"},{key:"infectiousDiseases",dictCode:"pb_epidemic"},{key:"type",dictCode:"pb_type"},{key:"vascularAccess",dictCode:"va_type"},{key:"return",dictCode:"va_return"},{key:"firstDialysisType",dictCode:"dt"}]),P=Fe(),h=F(we),b=F(Me),[z,{openModal:w}]=I(),[m,{openModal:M}]=I(),[X,{openModal:L}]=I(),[Q,{openModal:Z}]=I(),[G,{openDrawer:H}]=Le();Ie(()=>g(this,null,function*(){const e=yield Ne(n.value.map(i=>i.dictCode));for(const i in e){const t=n.value.filter(a=>a.dictCode==i)[0];o[t.key]=e[i]}yield C()}));const[J,{getFieldsValue:E}]=De({schemas:Se,autoSubmitOnEnter:!0,size:"large",rowProps:{gutter:16}}),[W,{reload:R,getDataSource:ee}]=be({api:Ee,rowKey:"id",columns:Re,showIndexColumn:!0,bordered:!1,actionColumn:{width:230,title:"操作",dataIndex:"action"},beforeFetch:te,afterFetch:ae}),f=F([]),k=U({name:"",tags:[]});function C(){return g(this,null,function*(){const e={};f.value.forEach(a=>{e[a.field]=a.isDict?a.dict:a.value});const i=T({name:k.name,tags:k.tags},e),t=yield $e(i);console.log("🚀 ~ file: index.vue:104 ~ onMounted ~ stats:",t),b.value=b.value.map(a=>(a.key=="0"&&(a.value=t.all),a.key=="1"&&(a.value=t.newPatient),a.key=="2"&&(a.value=t.noneFormulate),a.key=="3"&&(a.value=t.positive),a)),console.log("🚀 ~ file: index.vue:118 ~ onMounted ~ tabData.value:",b.value)})}function te(e){const i={};return f.value.forEach(t=>{i[t.field]=t.isDict?t.dict:t.value}),e!=null&&e.order&&(e.orders=[{field:e.field,direction:e.order.substring(0,e.order.length-3).toUpperCase()}],delete e.order,delete e.field),T(N(T({},e),{queryType:h.value=="0"?"0":h.value,name:k.name,tags:k.tags}),i)}function ae(e){return e}function A(e){return g(this,null,function*(){if(e=="import"&&(console.log("🚀 ~ file: index.vue:283 ~ headerClick ~ type:",e),Z(!0,{title:"导入患者档案",importUrl:je,exportUrl:O})),e=="export"){console.log("🚀 ~ file: index.vue:283 ~ headerClick ~ type:",e);const i=yield O(ee().map(t=>t.id));console.log("🚀 ~ file: index.vue:287 ~ headerClick ~ res:",i),Qe(i.base64,i.fileName)}if(e=="add"&&(console.log("🚀 ~ file: index.vue:283 ~ headerClick ~ type:",e),w(!0,{isUpdate:!1,record:{}})),e=="filter"){console.log("🚀 ~ file: index.vue:283 ~ headerClick ~ type:",e);const i=[];f.value.forEach(t=>{const a={field:t.field,value:t.value};t.isDict&&(a.value=t.dict),i.push(a)}),H(!0,{record:i})}})}function ie(e){P.push({path:"/bizArchives/detail",query:{id:e.id,accessId:e.accessId,name:e.name,gender:u(o.gender,e.gender,"label"),age:e.age}})}function se(e){M(!0,{record:e})}function oe(e){L(!0,{record:e})}function B(t){return g(this,arguments,function*({isUpdate:e,values:i}){console.log(e),console.log(i),yield R(),yield C()})}function ne(e){return g(this,null,function*(){h.value=e.value,yield R(),yield C()})}function le(){return g(this,null,function*(){k.name=E().name,k.tags=E().tags,yield R(),yield C()})}function re(e){return g(this,null,function*(){f.value=[];for(const i in e)e[i]&&Be.forEach(t=>{t.field==i&&f.value.push({field:t.field,label:t.label,value:t.component.includes("Api")?u(o.gender,e[i],"label"):e[i],isDict:t.component.includes("Api"),dict:t.component.includes("Api")?e[i]:""})});yield R(),yield C()})}function ce(e){return g(this,null,function*(){e.type=="clear"&&(console.log("清空全部"),f.value=[]),e.type=="close"&&(console.log("删除部分条件"),f.value=f.value.filter(i=>{var t;return i.field!=((t=e.item)==null?void 0:t.field)})),yield R(),yield C()})}return(e,i)=>(c(),d("div",Ge,[_("div",null,[_("div",He,[l(s(ge),{title:"透析病历"}),_("div",null,[l(s(Y),{title:"下载病历",class:"mr-2",border:!1,size:"large",onClick:i[0]||(i[0]=()=>A("export"))},{icon:x(()=>[l(V,{icon:"icon-xt-import_default|iconfont",size:18,color:"#3D4155"})]),_:1}),l(s(Y),{border:!1,size:"large",type:"primary",onClick:i[1]||(i[1]=()=>A("add"))},{icon:x(()=>[l(V,{icon:"icon-xt-add_default|iconfont",size:18,color:"#fff",class:"mr-1"})]),default:x(()=>[Je]),_:1})])]),_("div",We,[l(s(ve),{type:"illness",width:136,selected:h.value,data:b.value,onItemClick:ne},null,8,["selected","data"]),_("div",et,[l(s(xe),{onRegister:s(J),onFieldValueChange:le,style:{width:"450px"},class:"mr-2"},null,8,["onRegister"]),l(s(Ue),{count:f.value.length},{default:x(()=>[l(s(Y),{border:!1,size:"large",onClick:i[2]||(i[2]=()=>A("filter"))},{icon:x(()=>[l(V,{icon:"icon-xt-screen_default|iconfont",size:18,color:"#3D4155"})]),_:1})]),_:1},8,["count"])])]),f.value.length?(c(),d("div",tt,[l(s(_e),{data:f.value,onClose:ce},null,8,["data"])])):p("",!0),l(s(Ce),{onRegister:s(W)},{bodyCell:x(({column:t,record:a})=>[t.key==="name"?(c(),d(v,{key:0},[_("span",{class:Pe(["table-dot","table-dot--"+a.status])},null,2),_("span",null,y(a.name),1)],64)):p("",!0),t.key==="birthday"?(c(),d(v,{key:1},[D(y(a.birthday?s(K)(a.birthday).format("YYYY-MM-DD"):""),1)],64)):p("",!0),t.key==="firstDialysisTime"?(c(),d(v,{key:2},[D(y(a.firstDialysisTime?s(K)(a.firstDialysisTime).format("YYYY-MM-DD"):""),1)],64)):p("",!0),t.key==="gender"?(c(),d("span",{key:3,style:q({backgroundColor:s(u)(o.gender,a.gender,"bgColor"),color:s(u)(o.gender,a.gender,"fontColor"),padding:"1px 6px",borderRadius:"2px",marginRight:"4px"})},y(s(u)(o.gender,a.gender,"label")),5)):p("",!0),t.key==="firstDialysisType"?(c(),d(v,{key:4},[D(y(s(u)(o.firstDialysisType,a.firstDialysisType,"label")),1)],64)):p("",!0),t.key==="type"?(c(),d(v,{key:5},[D(y(s(u)(o.type,a.type,"label")),1)],64)):p("",!0),t.key==="infectiousDiseases"?(c(),d("div",at,[(c(!0),d(v,null,ze(a.infectiousDiseases,S=>(c(),d("div",{key:S,style:q({backgroundColor:s(u)(o.infectiousDiseases,S,"bgColor"),color:s(u)(o.infectiousDiseases,S,"fontColor"),padding:"1px 6px",borderRadius:"2px",marginRight:"4px"})},y(s(u)(o.infectiousDiseases,S,"label")),5))),128))])):p("",!0),t.key==="vascularAccess"?(c(),d(v,{key:7},[D(y(s(u)(o.vascularAccess,a.vascularAccess,"label")),1)],64)):p("",!0),t.key==="patientReturn"?(c(),d(v,{key:8},[D(y(s(u)(o.patientReturn,a.patientReturn,"label")),1)],64)):p("",!0),t.key==="action"?(c(),Ae(s(ke),{key:9,actions:[{auth:"archives:patientBasic:query",icon:"icon-xt-medical_default|iconfont",tooltip:"详情",label:"详情",onClick:ie.bind(null,a)},{auth:["archives:patientBasic:edit","archives:patientBasic:makeCard"],tooltip:"病历制卡",label:"病历制卡",onClick:se.bind(null,a)},{auth:["archives:patientBasic:edit","archives:patientBasic:printCard"],tooltip:"打印制卡",label:"打印制卡",onClick:oe.bind(null,a)}]},null,8,["actions"])):p("",!0)]),_:1},8,["onRegister"])]),l(qe,{onRegister:s(z),onSuccess:B},null,8,["onRegister"]),l(Oe,{onRegister:s(m),onSuccess:B},null,8,["onRegister"]),l(Ke,{onRegister:s(X),onSuccess:B},null,8,["onRegister"]),l(Xe,{onRegister:s(G),onSuccess:re},null,8,["onRegister"]),l(s(ye),{onRegister:s(Q),onSuccess:B},null,8,["onRegister"])]))}});const jt=he(it,[["__scopeId","data-v-bfe6f994"]]);export{jt as default};