index-24a27288.js 6.2 KB

1
  1. var Q=Object.defineProperty,Y=Object.defineProperties;var Z=Object.getOwnPropertyDescriptors;var P=Object.getOwnPropertySymbols;var H=Object.prototype.hasOwnProperty,J=Object.prototype.propertyIsEnumerable;var V=(r,a,i)=>a in r?Q(r,a,{enumerable:!0,configurable:!0,writable:!0,value:i}):r[a]=i,q=(r,a)=>{for(var i in a||(a={}))H.call(a,i)&&V(r,i,a[i]);if(P)for(var i of P(a))J.call(a,i)&&V(r,i,a[i]);return r},W=(r,a)=>Y(r,Z(a));var g=(r,a,i)=>new Promise((f,_)=>{var k=d=>{try{v(i.next(d))}catch(x){_(x)}},w=d=>{try{v(i.throw(d))}catch(x){_(x)}},v=d=>d.done?f(d.value):Promise.resolve(d.value).then(k,w);v((i=i.apply(r,a)).next())});import{X as ee}from"./XTTab-9b8140e6.js";import{u as te,a as ae,_ as ie}from"./useTable-bf847966.js";import{B as se,a as ne,b as oe,c as le,d as re,e as ce,_ as de,s as pe}from"./FormModal.vue_vue_type_script_setup_true_lang-3b7df65a.js";import{a as ue}from"./index-fe06ec6c.js";import{aj as m,_ as me}from"./index.js";import{u as G}from"./index-c733fbf6.js";import fe from"./FormModalDetail-b5c8fa8e.js";import{g as _e}from"./working-b53c07be.js";import{P as ye}from"./ImportModal.vue_vue_type_style_index_0_scoped_a59c69fa_lang-367be871.js";import{_ as ge}from"./componentMap-8020b34e.js";import{u as he}from"./useForm-64bbd444.js";import"./FormItem.vue_vue_type_script_lang-aa52e9e4.js";import{d as be,r as z,f as N,o as ke,Y as n,Z as o,_ as h,l as b,u as l,a7 as ve,F as C,a0 as xe,$ as p,a9 as c,ad as Se,E,a8 as Ne,a6 as Ce}from"./vue-b33f04cb.js";import"./useForm-b1e549d3.js";import"./antd-f204cf77.js";import"./componentMap-5ed4f2d1.js";import"./uuid-31b8b5a4.js";import"./useWindowSizeFn-e2b93e2a.js";import"./onMountedOrActivated-3a1cee4e.js";import"./sortable.esm-4ae27e0b.js";import"./schedulingExecApi-78202c39.js";import"./index-2f799b33.js";import"./index-2f695166.js";import"./useFormItem-1a9613e7.js";import"./useSortable-764357db.js";import"./download-7fff4f5c.js";import"./copyTextToClipboard-2136d900.js";import"./TextEditor-6383dadf.js";const we={class:"warp"},Fe={class:"flex justify-between my-4"},Te=["title"],De={key:0},Be={key:1},Re={key:4,class:"flex"},Me={key:0,class:"mr-1 iconfont icon-xt-dual-pump_default color-man"},Pe={key:1},Ve={key:5,class:"flex table-special"},qe={class:"inline-flex"},We={key:0,class:"divider"},Ge={class:"inline-flex"},ze=be({__name:"index",setup(r){const a=z({}),i=N([{key:"gender",dictCode:"pb_sex"},{key:"type",dictCode:"pb_type"},{key:"pump",dictCode:"bm_pump"}]),f=N(se),_=N(ne),k=N([]),[w,{openModal:v}]=G(),[d,{openModal:x}]=G();ke(()=>g(this,null,function*(){const s=yield ue(i.value.map(e=>e.dictCode));for(const e in s){const t=i.value.filter(u=>u.dictCode==e)[0];a[t.key]=s[e]}const y=yield oe();_.value=_.value.map(e=>(e.key=="0"&&(e.value=y.all),e.key=="1"&&(e.value=y.newPatient),e.key=="2"&&(e.value=y.noneScheduled),e))}));const[$,{getFieldsValue:D}]=he({schemas:pe,autoSubmitOnEnter:!0,size:"large",rowProps:{gutter:16}}),[I,{reload:F}]=te({api:le,rowKey:"id",columns:re,showIndexColumn:!0,bordered:!0,actionColumn:{width:100,title:"操作",dataIndex:"action",fixed:"right"},beforeFetch:j,afterFetch:A}),S=z({patientName:"",tableSort:"archivesCreateTime"});function j(s){return W(q({},s),{queryType:f.value=="0"?"0":f.value,patientName:S.patientName,orders:[{field:S.tableSort,direction:"ASC"}]})}function A(s){return g(this,null,function*(){return k.value.length||(k.value=yield _e()),s.map(e=>{e.specialNeedWeek="";for(const t in e.specialNeed)e.specialNeed[t]&&t!="sailingSorts"&&(e.specialNeedWeek=e.specialNeedWeek.concat("、",ce[t]));return e.specialNeedWeek=e.specialNeedWeek.substring(1),e.specialNeedSailingSorts=k.value.filter(t=>{var u;return(u=t.specialNeed)==null?void 0:u.sailingSorts.includes(t.sort)}).map(t=>t.name).join("、"),e})})}function K(s){s.gender=m(a.gender,s.patientGender,"label"),v(!0,{isUpdate:!0,record:s})}function O(s){s.gender=m(a.gender,s.patientGender,"label"),x(!0,{record:s})}function B(e){return g(this,arguments,function*({isUpdate:s,values:y}){yield F()})}function U(s){return g(this,null,function*(){f.value=s.value,yield F()})}function X(){return g(this,null,function*(){S.patientName=D().name||"",S.tableSort=D().tableSort||"",yield F()})}return(s,y)=>(n(),o("div",we,[h("div",null,[b(l(ye),{title:"个人排班"}),h("div",Fe,[b(l(ee),{type:"illness",width:170,selected:f.value,data:_.value,onItemClick:U},null,8,["selected","data"]),b(l(ge),{onRegister:l($),onFieldValueChange:X,style:{width:"450px"}},null,8,["onRegister"])]),b(l(ie),{onRegister:l(I)},{bodyCell:ve(({column:e,record:t})=>{var u,R,M;return[e.key==="patientName"?(n(),o(C,{key:0},[h("span",{class:xe(["table-dot","table-dot--"+t.status])},null,2),h("span",{title:t.patientName},p(t.patientName),9,Te)],64)):c("",!0),e.key==="patientGender"?(n(),o("span",{key:1,style:Se({backgroundColor:l(m)(a.gender,t.patientGender,"bgColor"),color:l(m)(a.gender,t.patientGender,"fontColor"),padding:"1px 6px",borderRadius:"2px",marginRight:"4px"})},p(l(m)(a.gender,t.patientGender,"label")),5)):c("",!0),e.key==="patientType"?(n(),o(C,{key:2},[E(p(l(m)(a.type,t.patientType,"label")),1)],64)):c("",!0),e.key==="frequency"?(n(),o(C,{key:3},[t.frequency?(n(),o("span",De,p((u=t.frequency)==null?void 0:u.times)+"次/"+p((R=t.frequency)==null?void 0:R.week)+"周 ",1)):(n(),o("span",Be," 无 "))],64)):c("",!0),e.key==="machine"&&t.machine.length?(n(),o("div",Re,[(n(!0),o(C,null,Ne(t.machine,(T,L)=>(n(),o("div",{key:T,class:"inline-flex"},[T=="pump_dual"?(n(),o("i",Me)):c("",!0),E(" "+p(l(m)(a.pump,T,"label"))+" ",1),L<t.machine.length-1?(n(),o("span",Pe,"、")):c("",!0)]))),128))])):c("",!0),e.key==="specialNeed"?(n(),o("div",Ve,[h("div",qe,p(t.specialNeedWeek),1),(M=t.specialNeedSailingSorts)!=null&&M.length?(n(),o("div",We)):c("",!0),h("div",Ge,p(t.specialNeedSailingSorts),1)])):c("",!0),e.key==="action"?(n(),Ce(l(ae),{key:6,actions:[{auth:"bed:scheduledPerson:edit",icon:"icon-xt-details_edit_default|iconfont",tooltip:"编辑",onClick:K.bind(null,t)},{auth:"bed:scheduledPerson:query",disabled:!t.frequency,icon:"icon-xt-bed_default|iconfont",tooltip:"排班",onClick:O.bind(null,t)}]},null,8,["actions"])):c("",!0)]}),_:1},8,["onRegister"])]),b(de,{onRegister:l(w),onSuccess:B},null,8,["onRegister"]),b(fe,{onRegister:l(d),onSuccess:B},null,8,["onRegister"])]))}});const ft=me(ze,[["__scopeId","data-v-bc033605"]]);export{ft as default};