| 1 |
- var U=Object.defineProperty,Y=Object.defineProperties;var Z=Object.getOwnPropertyDescriptors;var M=Object.getOwnPropertySymbols;var H=Object.prototype.hasOwnProperty,J=Object.prototype.propertyIsEnumerable;var P=(r,a,n)=>a in r?U(r,a,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[a]=n,q=(r,a)=>{for(var n in a||(a={}))H.call(a,n)&&P(r,n,a[n]);if(M)for(var n of M(a))J.call(a,n)&&P(r,n,a[n]);return r},W=(r,a)=>Y(r,Z(a));var g=(r,a,n)=>new Promise((_,y)=>{var k=d=>{try{v(n.next(d))}catch(x){y(x)}},w=d=>{try{v(n.throw(d))}catch(x){y(x)}},v=d=>d.done?_(d.value):Promise.resolve(d.value).then(k,w);v((n=n.apply(r,a)).next())});import{X as ee}from"./XTTab-e7882549.js";import{u as te,a as ae,_ as ie}from"./useTable-9be8c0ed.js";import{B as ne,a as se,b as oe,c as le,d as re,e as ce,_ as de,s as ue}from"./FormModal.vue_vue_type_script_setup_true_lang-e5b9ed24.js";import{b as pe}from"./index-a4e1ec38.js";import{ak as f,_ as me}from"./index.js";import{u as G}from"./index-4f5bc708.js";import fe from"./FormModalDetail-f73859d8.js";import{g as _e}from"./working-eeb97b48.js";import{P as ye}from"./ImportModal.vue_vue_type_style_index_0_scoped_375ed303_lang-fdd1625c.js";import{_ as ge}from"./componentMap-61ccdbb2.js";import{u as he}from"./useForm-bff27c7a.js";import"./FormItem.vue_vue_type_script_lang-39d09a3e.js";import{d as be,r as z,f as N,o as ke,Y as s,Z as o,_ as h,l as b,u as l,a7 as ve,F as C,a0 as xe,$ as u,a9 as c,ad as Se,E,a8 as Ne,a6 as Ce}from"./vue-aed314e3.js";import"./useForm-c7f42ee0.js";import"./antd-f259b82a.js";import"./componentMap-175d8229.js";import"./uuid-31b8b5a4.js";import"./useWindowSizeFn-6e9d633b.js";import"./onMountedOrActivated-d9097634.js";import"./sortable.esm-4ae27e0b.js";import"./schedulingExecApi-30afb8ae.js";import"./index-7fe9c1e2.js";import"./index-6811a03f.js";import"./useFormItem-421691fe.js";import"./useSortable-7d2b6665.js";import"./download-2ecc6b15.js";import"./copyTextToClipboard-328ee3b1.js";import"./TextEditor-4892fcd0.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"},Ve={key:0,class:"mr-1 iconfont icon-xt-dual-pump_default color-man"},Me={key:1},Pe={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({}),n=N([{key:"gender",dictCode:"pb_sex"},{key:"type",dictCode:"pb_type"},{key:"pump",dictCode:"bm_pump"}]),_=N(ne),y=N(se),k=N([]),[w,{openModal:v}]=G(),[d,{openModal:x}]=G();ke(()=>g(this,null,function*(){const i=yield pe(n.value.map(e=>e.dictCode));for(const e in i){const t=n.value.filter(m=>m.dictCode==e)[0];a[t.key]=i[e]}const p=yield oe();y.value=y.value.map(e=>(e.key=="0"&&(e.value=p.all),e.key=="1"&&(e.value=p.newPatient),e.key=="2"&&(e.value=p.noneScheduled),e))}));const[$,{getFieldsValue:D}]=he({schemas:ue,autoSubmitOnEnter:!0,size:"large",rowProps:{gutter:16}}),[A,{reload:F}]=te({api:le,rowKey:"id",columns:re,showIndexColumn:!0,bordered:!0,actionColumn:{width:100,title:"操作",dataIndex:"action",fixed:"right"},beforeFetch:I,afterFetch:j}),S=z({patientName:"",tableSort:"archivesCreateTime"});function I(i){return W(q({},i),{queryType:_.value=="0"?"0":_.value,patientName:S.patientName,orders:[{field:S.tableSort,direction:"ASC"}]})}function j(i){return g(this,null,function*(){return console.log("🚀 ~ file: index.vue:238 ~ handleAfterFetch ~ data:",i),k.value.length||(k.value=yield _e()),i.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 m;return(m=t.specialNeed)==null?void 0:m.sailingSorts.includes(t.sort)}).map(t=>t.name).join("、"),e})})}function K(i){console.log("🚀 ~ file: index.vue:206 ~ handleView ~ record:",i),i.gender=f(a.gender,i.patientGender,"label"),v(!0,{isUpdate:!0,record:i})}function O(i){console.log("🚀 ~ file: index.vue:206 ~ handleView ~ record:",i),i.gender=f(a.gender,i.patientGender,"label"),x(!0,{record:i})}function B(e){return g(this,arguments,function*({isUpdate:i,values:p}){console.log(i),console.log(p),yield F()})}function X(i){return g(this,null,function*(){_.value=i.value,yield F()})}function L(){return g(this,null,function*(){S.patientName=D().name||"",S.tableSort=D().tableSort||"",yield F()})}return(i,p)=>(s(),o("div",we,[h("div",null,[b(l(ye),{title:"个人排班"}),h("div",Fe,[b(l(ee),{type:"illness",width:170,selected:_.value,data:y.value,onItemClick:X},null,8,["selected","data"]),b(l(ge),{onRegister:l($),onFieldValueChange:L,style:{width:"450px"}},null,8,["onRegister"])]),b(l(ie),{onRegister:l(A)},{bodyCell:ve(({column:e,record:t})=>{var m,R,V;return[e.key==="patientName"?(s(),o(C,{key:0},[h("span",{class:xe(["table-dot","table-dot--"+t.status])},null,2),h("span",{title:t.patientName},u(t.patientName),9,Te)],64)):c("",!0),e.key==="patientGender"?(s(),o("span",{key:1,style:Se({backgroundColor:l(f)(a.gender,t.patientGender,"bgColor"),color:l(f)(a.gender,t.patientGender,"fontColor"),padding:"1px 6px",borderRadius:"2px",marginRight:"4px"})},u(l(f)(a.gender,t.patientGender,"label")),5)):c("",!0),e.key==="patientType"?(s(),o(C,{key:2},[E(u(l(f)(a.type,t.patientType,"label")),1)],64)):c("",!0),e.key==="frequency"?(s(),o(C,{key:3},[t.frequency?(s(),o("span",De,u((m=t.frequency)==null?void 0:m.times)+"次/"+u((R=t.frequency)==null?void 0:R.week)+"周 ",1)):(s(),o("span",Be," 无 "))],64)):c("",!0),e.key==="machine"&&t.machine.length?(s(),o("div",Re,[(s(!0),o(C,null,Ne(t.machine,(T,Q)=>(s(),o("div",{key:T,class:"inline-flex"},[T=="pump_dual"?(s(),o("i",Ve)):c("",!0),E(" "+u(l(f)(a.pump,T,"label"))+" ",1),Q<t.machine.length-1?(s(),o("span",Me,"、")):c("",!0)]))),128))])):c("",!0),e.key==="specialNeed"?(s(),o("div",Pe,[h("div",qe,u(t.specialNeedWeek),1),(V=t.specialNeedSailingSorts)!=null&&V.length?(s(),o("div",We)):c("",!0),h("div",Ge,u(t.specialNeedSailingSorts),1)])):c("",!0),e.key==="action"?(s(),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};
|