index-897a6b9a.js 9.4 KB

1
  1. var ce=Object.defineProperty,de=Object.defineProperties;var ue=Object.getOwnPropertyDescriptors;var Y=Object.getOwnPropertySymbols;var fe=Object.prototype.hasOwnProperty,pe=Object.prototype.propertyIsEnumerable;var E=(r,o,l)=>o in r?ce(r,o,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[o]=l,A=(r,o)=>{for(var l in o||(o={}))fe.call(o,l)&&E(r,l,o[l]);if(Y)for(var l of Y(o))pe.call(o,l)&&E(r,l,o[l]);return r},$=(r,o)=>de(r,ue(o));var g=(r,o,l)=>new Promise((I,h)=>{var k=m=>{try{D(l.next(m))}catch(w){h(w)}},P=m=>{try{D(l.throw(m))}catch(w){h(w)}},D=m=>m.done?I(m.value):Promise.resolve(m.value).then(k,P);D((l=l.apply(r,o)).next())});import{P as me}from"./ImportModal.vue_vue_type_style_index_0_scoped_a59c69fa_lang-153d3ad5.js";import{I as ye}from"./ImportModal-f7525a37.js";import{X as ge}from"./XTTab-2f7efd67.js";/* empty css */import{S as ve}from"./Sift-381d25b3.js";import{m as S,aR as T,aj as u,_ as _e}from"./index.js";import{u as he,a as be,_ as ke}from"./useTable-4417017a.js";import{_ as Ce}from"./componentMap-090b9009.js";import{u as xe}from"./useForm-2d0613b7.js";import"./FormItem.vue_vue_type_script_lang-d3f182d4.js";import{B as De,a as we,c as Me,s as Re,b as Be}from"./data-f9c59461.js";import{d as Se,r as j,f as F,R as Te,o as Fe,Y as c,Z as d,_,l as n,u as a,a7 as b,a9 as f,F as v,a0 as ze,$ as y,E as x,ad as N,a8 as Ie,a6 as Pe,a1 as Ae,a2 as Ve}from"./vue-8fccce23.js";import{g as Ye,h as Ee,i as $e,j as U}from"./patientBasicApi-ab0fd18a.js";import{a as je}from"./index-971488e0.js";import{at as Ne,l as q}from"./antd-d98832c6.js";import{u as z}from"./index-74ee4d87.js";import{_ as Ue}from"./FormModal.vue_vue_type_script_setup_true_lang-7817f713.js";import{_ as qe}from"./FormModal.vue_vue_type_script_setup_true_lang-43ec8445.js";import Ke from"./PrintCardModal-29ec433a.js";import Oe from"./FormDrawerSift-881327c6.js";import{u as Xe}from"./index-187f76c9.js";import{b as Le}from"./download-fac9a150.js";import"./useForm-bca35dcc.js";import"./componentMap-4cfd6e0f.js";import"./uuid-31b8b5a4.js";import"./useWindowSizeFn-e2b93e2a.js";import"./onMountedOrActivated-cb072c10.js";import"./sortable.esm-4ae27e0b.js";import"./index-7b00e5b4.js";import"./index-a7810134.js";import"./useFormItem-9c6d112e.js";import"./useSortable-7338e303.js";import"./copyTextToClipboard-ba2fd847.js";import"./TextEditor-e80f27f2.js";import"./index-cac72ab6.js";const Qe=r=>(Ae("data-v-66269c33"),r=r(),Ve(),r),Ze={class:"m-4"},Ge={class:"flex justify-between"},He=Qe(()=>_("span",null,"患者建档",-1)),Je={class:"flex justify-between my-4"},We={class:"flex"},et={key:0,class:"flex mb-2"},tt={key:6,class:"flex"},it=Se({__name:"index",setup(r){const o=j({}),l=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"}]),I=Te(),h=F(De),k=F(we),[P,{openModal:D}]=z(),[m,{openModal:w}]=z(),[K,{openModal:O}]=z(),[X,{openModal:L}]=z(),[Q,{openDrawer:Z}]=Xe();Fe(()=>g(this,null,function*(){const e=yield je(l.value.map(t=>t.dictCode));for(const t in e){const s=l.value.filter(C=>C.dictCode==t)[0];o[s.key]=e[t]}const i=yield Ye();console.log("🚀 ~ file: index.vue:104 ~ onMounted ~ stats:",i),k.value=k.value.map(t=>(t.key=="0"&&(t.value=i.all),t.key=="1"&&(t.value=i.newPatient),t.key=="2"&&(t.value=i.noneFormulate),t.key=="3"&&(t.value=i.positive),t)),console.log("🚀 ~ file: index.vue:118 ~ onMounted ~ tabData.value:",k.value)}));const[G,{getFieldsValue:H}]=xe({schemas:Be,autoSubmitOnEnter:!0,size:"large",rowProps:{gutter:16}}),[J,{reload:M,getDataSource:W}]=he({api:Ee,rowKey:"id",columns:Me,showIndexColumn:!0,bordered:!1,actionColumn:{width:230,title:"操作",dataIndex:"action"},beforeFetch:ee,afterFetch:te}),p=F([]),V=j({name:""});function ee(e){const i={};return p.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),A($(A({},e),{queryType:h.value=="0"?"0":h.value,name:V.name}),i)}function te(e){return e}function R(e){return g(this,null,function*(){if(e=="import"&&(console.log("🚀 ~ file: index.vue:283 ~ headerClick ~ type:",e),L(!0,{title:"导入患者档案",importUrl:$e,exportUrl:U})),e=="export"){console.log("🚀 ~ file: index.vue:283 ~ headerClick ~ type:",e);const i=yield U(W().map(t=>t.id));console.log("🚀 ~ file: index.vue:287 ~ headerClick ~ res:",i),Le(i.base64,i.fileName)}if(e=="add"&&(console.log("🚀 ~ file: index.vue:283 ~ headerClick ~ type:",e),D(!0,{isUpdate:!1,record:{}})),e=="filter"){console.log("🚀 ~ file: index.vue:283 ~ headerClick ~ type:",e);const i=[];p.value.forEach(t=>{const s={field:t.field,value:t.value};t.isDict&&(s.value=t.dict),i.push(s)}),Z(!0,{record:i})}})}function ie(e){I.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 ae(e){w(!0,{record:e})}function oe(e){O(!0,{record:e})}function B(t){return g(this,arguments,function*({isUpdate:e,values:i}){console.log(e),console.log(i),yield M()})}function se(e){return g(this,null,function*(){h.value=e.value,yield M()})}function ne(){return g(this,null,function*(){V.name=H().name,yield M()})}function le(e){return g(this,null,function*(){p.value=[];for(const i in e)e[i]&&Re.forEach(t=>{t.field==i&&p.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 M()})}function re(e){return g(this,null,function*(){e.type=="clear"&&(console.log("清空全部"),p.value=[]),e.type=="close"&&(console.log("删除部分条件"),p.value=p.value.filter(i=>{var t;return i.field!=((t=e.item)==null?void 0:t.field)})),yield M()})}return(e,i)=>(c(),d("div",Ze,[_("div",null,[_("div",Ge,[n(a(me),{title:"透析病历"}),_("div",null,[n(a(T),{class:"mr-2",border:!1,size:"large",onClick:i[0]||(i[0]=()=>R("import"))},{icon:b(()=>[n(S,{icon:"icon-xt-import_default|iconfont",size:18,color:"#3D4155"})]),_:1}),n(a(T),{class:"mr-2",border:!1,size:"large",onClick:i[1]||(i[1]=()=>R("export"))},{icon:b(()=>[n(S,{icon:"icon-xt-export_default|iconfont",size:18,color:"#3D4155"})]),_:1}),n(a(T),{border:!1,size:"large",type:"primary",onClick:i[2]||(i[2]=()=>R("add"))},{icon:b(()=>[n(S,{icon:"icon-xt-add_default|iconfont",size:18,color:"#fff",class:"mr-1"})]),default:b(()=>[He]),_:1})])]),_("div",Je,[n(a(ge),{type:"illness",width:136,selected:h.value,data:k.value,onItemClick:se},null,8,["selected","data"]),_("div",We,[n(a(Ce),{onRegister:a(G),onFieldValueChange:ne,style:{width:"450px"},class:"mr-2"},null,8,["onRegister"]),n(a(Ne),{count:p.value.length},{default:b(()=>[n(a(T),{border:!1,size:"large",onClick:i[3]||(i[3]=()=>R("filter"))},{icon:b(()=>[n(S,{icon:"icon-xt-screen_default|iconfont",size:18,color:"#3D4155"})]),_:1})]),_:1},8,["count"])])]),p.value.length?(c(),d("div",et,[n(a(ve),{data:p.value,onClose:re},null,8,["data"])])):f("",!0),n(a(ke),{onRegister:a(J)},{bodyCell:b(({column:t,record:s})=>[t.key==="name"?(c(),d(v,{key:0},[_("span",{class:ze(["table-dot","table-dot--"+s.status])},null,2),_("span",null,y(s.name),1)],64)):f("",!0),t.key==="birthday"?(c(),d(v,{key:1},[x(y(s.birthday?a(q)(s.birthday).format("YYYY-MM-DD"):""),1)],64)):f("",!0),t.key==="firstDialysisTime"?(c(),d(v,{key:2},[x(y(s.firstDialysisTime?a(q)(s.firstDialysisTime).format("YYYY-MM-DD"):""),1)],64)):f("",!0),t.key==="gender"?(c(),d("span",{key:3,style:N({backgroundColor:a(u)(o.gender,s.gender,"bgColor"),color:a(u)(o.gender,s.gender,"fontColor"),padding:"1px 6px",borderRadius:"2px",marginRight:"4px"})},y(a(u)(o.gender,s.gender,"label")),5)):f("",!0),t.key==="firstDialysisType"?(c(),d(v,{key:4},[x(y(a(u)(o.firstDialysisType,s.firstDialysisType,"label")),1)],64)):f("",!0),t.key==="type"?(c(),d(v,{key:5},[x(y(a(u)(o.type,s.type,"label")),1)],64)):f("",!0),t.key==="infectiousDiseases"?(c(),d("div",tt,[(c(!0),d(v,null,Ie(s.infectiousDiseases,C=>(c(),d("div",{key:C,style:N({backgroundColor:a(u)(o.infectiousDiseases,C,"bgColor"),color:a(u)(o.infectiousDiseases,C,"fontColor"),padding:"1px 6px",borderRadius:"2px",marginRight:"4px"})},y(a(u)(o.infectiousDiseases,C,"label")),5))),128))])):f("",!0),t.key==="vascularAccess"?(c(),d(v,{key:7},[x(y(a(u)(o.vascularAccess,s.vascularAccess,"label")),1)],64)):f("",!0),t.key==="patientReturn"?(c(),d(v,{key:8},[x(y(a(u)(o.patientReturn,s.patientReturn,"label")),1)],64)):f("",!0),t.key==="action"?(c(),Pe(a(be),{key:9,actions:[{auth:"archives:patientBasic:query",icon:"icon-xt-medical_default|iconfont",tooltip:"详情",label:"详情",onClick:ie.bind(null,s)},{auth:["archives:patientBasic:edit","archives:patientBasic:makeCard"],tooltip:"病历制卡",label:"病历制卡",onClick:ae.bind(null,s)},{auth:["archives:patientBasic:edit","archives:patientBasic:printCard"],tooltip:"打印制卡",label:"打印制卡",onClick:oe.bind(null,s)}]},null,8,["actions"])):f("",!0)]),_:1},8,["onRegister"])]),n(Ue,{onRegister:a(P),onSuccess:B},null,8,["onRegister"]),n(qe,{onRegister:a(m),onSuccess:B},null,8,["onRegister"]),n(Ke,{onRegister:a(K),onSuccess:B},null,8,["onRegister"]),n(Oe,{onRegister:a(Q),onSuccess:le},null,8,["onRegister"]),n(a(ye),{onRegister:a(X),onSuccess:B},null,8,["onRegister"])]))}});const $t=_e(it,[["__scopeId","data-v-66269c33"]]);export{$t as default};