import{_ as xt,Y as Re,o as bt,r as J,c as ht,d as C,e as M,i as v,k as D,v as V,q as N,x as P,j as ne,w as h,h as Je,f as x,F as De,t as Ie,Z as Fe,l as H,y as Te,g as k,$ as vt,E as $,a0 as yt,a1 as wt,a2 as ce,N as se,a3 as St,a4 as Ge,a5 as kt,a6 as Et}from"./index-b6283fd9.js";const Ct={class:"YuYue202506"},Dt={key:0,class:"patientInfo"},It={class:"item"},Tt={class:"name"},Mt={class:"item"},Nt={class:"value"},Vt={class:"item"},Bt={class:"value"},Rt={key:0,class:"item"},Pt={class:"value"},zt={key:1,class:"item"},Yt={class:"value"},Ot={key:2,class:"item"},$t={class:"value"},Lt={key:1},Ut={class:"entrustList"},Ht={key:0,style:{"font-size":"12px",color:"#909399"}},jt={style:{"margin-right":"4px",color:"#999"}},Jt={key:0,class:"errMsg"},Ft={key:1},Gt={key:0},At={key:1},qt={key:0,style:{color:"orangered"}},Wt={key:1},Zt={key:0},Kt={key:0},Qt={key:1},Xt={class:"planInfo"},ed={style:{display:"flex","justify-content":"space-between","align-items":"center","margin-top":"8px","margin-bottom":"8px"}},td={style:{display:"flex","align-items":"center"}},dd=["onClick"],nd={style:{display:"flex","flex-direction":"column","margin-left":"12px"}},sd={style:{border:"1px solid #efefef"}},ad={class:"planTable"},id={key:0,style:{"background-color":"#f1f1f1"}},ld={style:{"font-weight":"700"}},rd=["onClick"],od={key:0},ud={key:0},pd={key:1,style:{"background-color":"#fff"}},_d={class:"dialog-footer"},md={style:{display:"flex","align-items":"flex-start",gap:"12px"}},cd=["innerHTML"],fd={style:{display:"flex","align-items":"flex-start",gap:"12px"}},gd=["innerHTML"],xd={style:{display:"flex","align-items":"flex-start",gap:"12px"}},bd=["innerHTML"],hd={style:{display:"flex","align-items":"flex-start",gap:"12px"}},vd=["innerHTML"],yd=`1.未预约状态,如果多个检查项目能在同一个检查室进行检查,系统会自动选中能一起预约的项目,只需要点击一次预约按钮即可完成预约
2.已预约状态,预约到同一个时段的同一个检查室的项目,系统会自动选中,更改预约或取消预约只需点击一次
3.不同状态的预约的预约项目无法一起选中`,wd={__name:"YuYue202506",props:{reg_num:{type:String},entrust_ids:{type:String},episode_id:{type:String},appointment_type:{type:[String,Number]},dotype:{type:Number},do_user:{default:"",type:[String,Number]},special_privileges:{type:Array,default:()=>[]},scope:{type:String,default:"all"}},setup(Ae){const S=Ae;let L=k(null),Y=k(null),_=k([]);const le=n=>n?n.requestComment?`${n.entrust}(${n.requestComment})`:n.entrust:"";let ae=k([]),Q=k(!1),O=k(!1),de=k(["1"]),Me=k(!0),fe=k([]),B=k(""),R=k(0),z=k([]),U=k([]),b=k([]),A=k(!0),ge=k([]),q=k([]),xe=k("add"),ie=k(""),be=k([]),he=k([]),re=k([]),qe=k(0),Pe=k(!1),oe=k(!0),X=k(!1),F=k(!1),ue=k(""),pe=k(null),_e=k(null),ee=k(!1),ze=k(""),te=k(!1),Ye=k(""),W=k(!1),ve=k("");const We=n=>{let e=["周日","周一","周二","周三","周四","周五","周六"];const d=new Date(n).getDay();return e[d]},Oe=Re(()=>{const n=b.value.map(d=>{var a;return(a=d.department_resources)==null?void 0:a.department_resources_name}).filter(Boolean),e=[...new Set(n)];if(e.length!==1)return 0;const t=e[0];return _.value.filter(d=>{var a;return((a=d.department_resources)==null?void 0:a.department_resources_name)===t}).length}),$e=Re(()=>S.special_privileges.includes("emergency")),Ze=Re(()=>{const n=_.value.filter(t=>!!(t.list_status===1&&t.reservation_date||t.list_status===0&&t.temp_plan_id&&t.reservation_date));return n.length<2?!1:new Set(n.map(t=>t.reservation_date)).size>1});let ye=null;const Ke=()=>{ye&&clearTimeout(ye),ye=setTimeout(()=>{K(),ye=null},500)},Qe=n=>{var t,d,a,i,r,s,o,m,p,f;if(z.value=[],U.value=[],fe.value=[],ae.value=[],B.value="",b.value=n,console.log("11111",b.value),b.value.forEach((g,y)=>{z.value.push(g.id),U.value.push(g.entrust_id)}),b.value.every(g=>{var y;return g.roster_id===((y=b.value[0])==null?void 0:y.roster_id)}))R.value=(t=b.value[0])==null?void 0:t.roster_id,R.value!==0&&R.value&&(ie.value=(d=b.value[0])==null?void 0:d.reservation_date,ft(He(),(a=b.value[0])==null?void 0:a.reservation_date)&&((i=b.value[0])!=null&&i.reservation_date)?Z.value=ke((r=b.value[0])==null?void 0:r.reservation_date):Z.value=ke(He()),B.value=(o=(s=b.value[0])==null?void 0:s.department_resources)==null?void 0:o.department_resources_name);else if(R.value=0,b.value.length>0){const g=(p=(m=b.value[0])==null?void 0:m.department_resources)==null?void 0:p.execute_department_id;if(g&&b.value.every(c=>{var E;return((E=c.department_resources)==null?void 0:E.execute_department_id)===g})){const c=(f=b.value[0].department_resources)==null?void 0:f.department_resources_name;c&&(B.value=c)}}ge.value.forEach(g=>{b.value.find(y=>y===g)||(xe.value="cancel")}),b.value.length==0&&(xe.value="add",ge.value=[]),console.log(xe.value),U.value.length>0&&A.value&&(xe.value==="add"&&b.value[0].list_status==0?oe.value?nt():K():Ke()),pe.value&&_.value.findIndex(y=>z.value.includes(y.id))+1===pe.value.idx&&(ue.value=pe.value.html,F.value=!0,pe.value=null),_e.value&&_.value.findIndex(y=>z.value.includes(y.id))+1===_e.value.idx&&(ve.value=_e.value.html,W.value=!0,_e.value=null),Xe()},Xe=()=>{var t,d;if(b.value.length===0){Me.value=!0;return}const n=(d=(t=b.value[0])==null?void 0:t.department_resources)==null?void 0:d.execute_department_id;if(n==null){Me.value=!0;return}const e=b.value.every(a=>{var i;return((i=a.department_resources)==null?void 0:i.execute_department_id)===n});Me.value=!e},et=n=>b.value.findIndex(e=>e.id===n.id)>-1,tt=({row:n,rowIndex:e})=>{if(n.tishi_msg!="")return"disabled-row";if(et(n))return"selected-row"},dt=(n,e)=>n.tishi_msg=="";let we=k([]);const Se=(n,e)=>{let t=z.value;_.value=[],Q.value=!0,vt({regnum:S.reg_num,entrustid:S.entrust_ids,episodeid:S.episode_id,appointment_type:S.appointment_type}).then(d=>{var a;if(Q.value=!1,d.status){if(d.data.info.length>0){let i=d.data.info;if(Y.value=i[0].maininfo,i.forEach((r,s)=>{var m,p;let o=r.maininfo;o.tishi_msg=r.msg,o.limosis=(m=r.iteminfo[0])==null?void 0:m.limosis,_.value.push(o),r.msg!=""&&r.msg!=null&&we.value.push({msg:r.msg,item_name:(p=r.iteminfo[0])==null?void 0:p.item_name})}),t.length>0&&!e)t.forEach((r,s)=>{_.value.forEach((o,m)=>{r==o.id&&L.value.toggleRowSelection(_.value[m],!0)})});else{for(let r=0;r<_.value.length;r++)if(_.value[r].tishi_msg==""&&_.value[r].list_status===0){L.value.toggleRowSelection(_.value[r],!0);const s=(a=_.value[r].department_resources)==null?void 0:a.department_resources_name;s&&_.value.forEach(o=>{var m;o.id!==_.value[r].id&&o.list_status===0&&o.tishi_msg===""&&((m=o.department_resources)==null?void 0:m.department_resources_name)===s&&L.value.toggleRowSelection(o,!0)}),_.value[r].roster_id!=null&&(R.value=_.value[r].roster_id,B.value=s);break}if(z.value.length===0){const r=_.value.find(s=>s.tishi_msg==="");r&&(A.value=!1,e&&t.length>0?t.forEach(s=>{const o=_.value.find(m=>m.id===s);o&&L.value.toggleRowSelection(o,!0)}):L.value.toggleRowSelection(r,!0),A.value=!0)}}Be.value&&(Be.value=!1,we.value.length>0&&(console.log("22222222222222",we.value),X.value=!0)),he.value=JSON.parse(JSON.stringify(_.value)),n&&n()}}else $.error(d.msg)})},nt=()=>{let n=[],e=b.value.length;if(b.value[e-1].list_status!=0)return!1;_.value.forEach((t,d)=>{t.list_status==0&&t.tishi_msg==""&&(t.id==b.value[e-1].id?n.push({name:t.entrust,rowid:d,first:1}):n.push({name:t.entrust,rowid:d,first:0}))}),n.length>=2?(Q.value=!0,yt({items:n}).then(t=>{Q.value=!1,t.status?(n.forEach((a,i)=>{A.value=!1,L.value.toggleRowSelection(_.value[a.rowid],!1)}),t.data.rowids.forEach((a,i)=>{A.value=!1,L.value.toggleRowSelection(_.value[a],!0)}),ge.value=b.value,K()):$.error(t.msg),A.value=!0})):(ge.value=b.value,K())};let Z=k([]);const K=()=>{if(U.value.length==0)return $.error("请选择检查项目"),!1;O.value=!0,wt({regnum:S.reg_num,entrustid:U.value,episodeid:S.episode_id,appointment_type:S.appointment_type,date:Z.value,scope:S.scope,do_user:S.do_user}).then(n=>{if(O.value=!1,ae.value=[],fe.value=[],n.status){let e=n.data.plan_list,t=n.data.zhanWeiCount,d=n.data.is_emergency;if(re.value=e,qe.value=t,e.length>0){e.some(m=>m.department_resources_name===B.value)||(B.value=e[0].department_resources_name);const i=new Set,r=new Set;e.forEach(m=>{if(m.department_resources_name==B.value){const p=`${m.begin_time.substring(0,5)}-${m.end_time.substring(0,5)}`;i.add(p)}r.add(m.department_resources_name)}),fe.value=r,Array.from(i).sort().forEach(m=>{const p={time_range:m};Z.value.forEach(f=>{const g=e.find(c=>`${c.begin_time.substring(0,5)}-${c.end_time.substring(0,5)}`===m&&c.date===f&&c.department_resources_name==B.value);let y=!1;g?(g.plan_enable===!0&&(y=!0),d===!0&&g.plan_enable===!0&&$e.value==!0&&(y=!0),p[f]={use_count:`${g.used_count}/${g.count}`,id:g.id,enable:y}):p[f]={use_count:"0/0",id:null,enable:y}}),ae.value.push(p)}),R.value=0;const o=Le();if(o.length>0)q.value=o,R.value=o[0];else{q.value=[];const m=e.find(p=>p.department_resources_name==B.value&&p.plan_enable===!0);m&&(R.value=m.id)}if(!Pe.value){Pe.value=!0;const m=_.value.filter(p=>p.list_status===0);if(m.length>0){const p=m.map(f=>{var g;return{id:f.id,entrust_id:f.entrust_id,department_resources_name:((g=f.department_resources)==null?void 0:g.department_resources_name)||"",date:f.reservation_date||"",begin_time:f.period_begin_time||"",end_time:f.period_end_time||""}});ce({type:"optimal_time",regnum:S.reg_num,entrustid:U.value,episodeid:S.episode_id,appointment_type:S.appointment_type,items:p,scope:S.scope,do_user:S.do_user}).then(f=>{if(f.status){f.data.forEach(u=>{const w=_.value.find(T=>T.id===u.id);w&&(w.department_resources||(w.department_resources={}),w.department_resources.department_resources_name=u.department_resources_name,w.reservation_date=u.date,w.period_begin_time=u.begin_time,w.period_end_time=u.end_time,w.temp_plan_id=u.plan_id)});const g={};f.data.forEach(u=>{var T,j;const w=u.department_resources_name;g[w]||(g[w]={items:[],timeSlots:new Set,dates:new Set}),g[w].items.push(u),g[w].timeSlots.add(((T=u.begin_time)==null?void 0:T.substring(0,5))+"-"+((j=u.end_time)==null?void 0:j.substring(0,5))),g[w].dates.add(u.date)});const y=[];for(const[u,w]of Object.entries(g))(w.timeSlots.size>1||w.dates.size>1)&&w.items.forEach(T=>{var Ee,I;const j=_.value.findIndex(G=>G.id===T.id);y.push({idx:j!==-1?j+1:"",room:T.department_resources_name,date:T.date,timeSlot:((Ee=T.begin_time)==null?void 0:Ee.substring(0,5))+"-"+((I=T.end_time)==null?void 0:I.substring(0,5)),entrust:le(_.value.find(G=>G.id===T.id))})});if(y.length>0){let u='
';u+='| 序号 | 项目名称 | 检查室 | 日期 | 时间段 |
';let w="",T="#f5f5f5";y.sort((I,G)=>I.idx-G.idx).forEach(I=>{I.timeSlot!==w&&(T=T==="#fff"?"#d5dce6":"#fff",w=I.timeSlot),u+='| '+I.idx+' | '+I.entrust+' | '+I.room+' | '+I.date+' | '+I.timeSlot+" |
"}),u+="
";const j=Math.min(...y.map(I=>I.idx));_.value.findIndex(I=>z.value.includes(I.id))+1===j?(ue.value=u,F.value=!0):pe.value={html:u,idx:j}}const c=new Set(f.data.map(u=>u.id)),E=p.filter(u=>!c.has(u.id));if(E.length>0){let u='';u+='| 序号 | 项目名称 | 排班资源 | 日期 | 时间段 | 结果 |
';let w=1;f.data.forEach(I=>{var me,Ce,je;const G=((me=_.value.find(gt=>gt.id===I.id))==null?void 0:me.entrust)||"";u+='| '+w+++' | '+G+' | '+I.department_resources_name+' | '+I.date+' | '+((Ce=I.begin_time)==null?void 0:Ce.substring(0,5))+"-"+((je=I.end_time)==null?void 0:je.substring(0,5))+' | ✅ 成功匹配 |
'}),E.forEach(I=>{var me;const G=((me=_.value.find(Ce=>Ce.id===I.id))==null?void 0:me.entrust)||"";u+='| '+w+++' | '+G+' | — | ❌ 未找到合适号源 |
'}),u+="
";const T=E.map(I=>_.value.findIndex(G=>G.id===I.id)+1).filter(I=>I>0),j=Math.min(...T);_.value.findIndex(I=>z.value.includes(I.id))+1===j?(ve.value=u,W.value=!0):_e.value={html:u,idx:j}}const l=Le();l.length>0&&(q.value=l,R.value=l[0])}})}}}}else $.error(n.msg)})},st=n=>{B.value=n,R.value=0,q.value=[],K()},Le=()=>{const n=[];for(const e of _.value)if(z.value.includes(e.id)&&e.list_status===0&&e.temp_plan_id){const t=re.value.find(d=>d.id===e.temp_plan_id&&d.department_resources_name===B.value);t&&!n.includes(t.id)&&n.push(t.id)}for(const e of _.value)if(z.value.includes(e.id)&&e.list_status===1&&e.roster_id){const t=re.value.find(d=>d.id===e.roster_id&&d.department_resources_name===B.value);t&&!n.includes(t.id)&&n.push(t.id)}return n},at=n=>{if(console.log(n),n==null)return;const e=re.value.find(t=>t.id===n);e&&(R.value=n,q.value=[n],ot(),b.value.forEach(t=>{const d=_.value.find(a=>a.id===t.id);d&&(d.department_resources||(d.department_resources={}),d.department_resources.department_resources_name=e.department_resources_name,d.reservation_date=e.date,d.period_begin_time=e.begin_time,d.period_end_time=e.end_time,d.temp_plan_id=n)}))},it=()=>{if(U.value.length===0){$.error("请选择检查项目");return}O.value=!0,b.value.forEach(t=>{const d=he.value.find(i=>i.id===t.id);if(!d)return;const a=_.value.find(i=>i.id===t.id);a&&(a.department_resources=d.department_resources,a.reservation_date=d.reservation_date,a.period_begin_time=d.period_begin_time,a.period_end_time=d.period_end_time,a.temp_plan_id=void 0)});const n=b.value.filter(t=>t.list_status===0).map(t=>{var d;return{id:t.id,entrust_id:t.entrust_id,department_resources_name:((d=t.department_resources)==null?void 0:d.department_resources_name)||"",date:t.reservation_date||"",begin_time:t.period_begin_time||"",end_time:t.period_end_time||""}}),e=_.value.filter(t=>!z.value.includes(t.id)&&t.list_status===0&&t.temp_plan_id).map(t=>t.temp_plan_id);ce({type:"optimal_time",regnum:S.reg_num,entrustid:U.value,episodeid:S.episode_id,appointment_type:S.appointment_type,items:n,occupied_plan_ids:e,scope:S.scope,do_user:S.do_user}).then(t=>{if(O.value=!1,t.status){t.data.forEach(s=>{const o=_.value.find(m=>m.id===s.id);o&&(o.department_resources||(o.department_resources={}),o.department_resources.department_resources_name=s.department_resources_name,o.reservation_date=s.date,o.period_begin_time=s.begin_time,o.period_end_time=s.end_time,o.temp_plan_id=s.plan_id)});const d={};t.data.forEach(s=>{var m,p;const o=s.department_resources_name;d[o]||(d[o]={items:[],timeSlots:new Set,dates:new Set}),d[o].items.push(s),d[o].timeSlots.add(((m=s.begin_time)==null?void 0:m.substring(0,5))+"-"+((p=s.end_time)==null?void 0:p.substring(0,5))),d[o].dates.add(s.date)});const a=[];for(const[s,o]of Object.entries(d))(o.timeSlots.size>1||o.dates.size>1)&&o.items.forEach(m=>{var f,g;const p=_.value.findIndex(y=>y.id===m.id);a.push({idx:p!==-1?p+1:"",room:m.department_resources_name,date:m.date,timeSlot:((f=m.begin_time)==null?void 0:f.substring(0,5))+"-"+((g=m.end_time)==null?void 0:g.substring(0,5)),entrust:le(_.value.find(y=>y.id===m.id))})});if(a.length>0){let s='';s+='| 序号 | 项目名称 | 检查室 | 日期 | 时间段 |
';let o="",m="#f5f5f5";a.sort((p,f)=>p.idx-f.idx).forEach(p=>{p.timeSlot!==o&&(m=m==="#fff"?"#d5dce6":"#fff",o=p.timeSlot),s+='| '+p.idx+' | '+p.entrust+' | '+p.room+' | '+p.date+' | '+p.timeSlot+" |
"}),s+="
",ue.value=s,F.value=!0}const i=new Set(t.data.map(s=>s.id)),r=n.filter(s=>!i.has(s.id));if(r.length>0){let s='';s+='| 序号 | 项目名称 | 排班资源 | 日期 | 时间段 | 结果 |
';let o=1;t.data.forEach(m=>{var f,g;const p=le(_.value.find(y=>y.id===m.id));s+='| '+o+++' | '+p+' | '+m.department_resources_name+' | '+m.date+' | '+((f=m.begin_time)==null?void 0:f.substring(0,5))+"-"+((g=m.end_time)==null?void 0:g.substring(0,5))+' | ✅ 成功匹配 |
'}),r.forEach(m=>{const p=le(_.value.find(f=>f.id===m.id));s+='| '+o+++' | '+p+' | — | ❌ 未找到合适号源 |
'}),s+="
",ve.value=s,W.value=!0}else t.data.length===0&&se.confirm("所有项目均未匹配到合适号源,请重新选择号源","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"error",showCancelButton:!1});t.data.length>0&&(B.value=t.data[0].department_resources_name,q.value=t.data.map(s=>s.plan_id),R.value=t.data[0].plan_id)}else $.error(t.msg)})},lt=()=>{if(U.value.length===0){$.error("请选择检查项目");return}O.value=!0,b.value.forEach(t=>{const d=he.value.find(i=>i.id===t.id);if(!d)return;const a=_.value.find(i=>i.id===t.id);a&&(a.department_resources=d.department_resources,a.reservation_date=d.reservation_date,a.period_begin_time=d.period_begin_time,a.period_end_time=d.period_end_time,a.temp_plan_id=void 0)});const n=b.value.filter(t=>t.list_status===0).map(t=>{var d;return{id:t.id,entrust_id:t.entrust_id,department_resources_name:((d=t.department_resources)==null?void 0:d.department_resources_name)||"",date:t.reservation_date||"",begin_time:t.period_begin_time||"",end_time:t.period_end_time||""}}),e=_.value.filter(t=>!z.value.includes(t.id)&&t.list_status===0&&t.temp_plan_id).map(t=>t.temp_plan_id);ce({type:"full_day",regnum:S.reg_num,entrustid:U.value,episodeid:S.episode_id,appointment_type:S.appointment_type,items:n,occupied_plan_ids:e,scope:S.scope,do_user:S.do_user}).then(t=>{if(O.value=!1,t.status)if(t.data.forEach(d=>{const a=_.value.find(i=>i.id===d.id);a&&(a.department_resources||(a.department_resources={}),a.department_resources.department_resources_name=d.department_resources_name,a.reservation_date=d.date,a.period_begin_time=d.begin_time,a.period_end_time=d.end_time,a.temp_plan_id=d.plan_id)}),t.data.length>0){const d={};t.data.forEach(i=>{var s,o;const r=i.department_resources_name;d[r]||(d[r]={items:[],timeSlots:new Set,dates:new Set}),d[r].items.push(i),d[r].timeSlots.add(((s=i.begin_time)==null?void 0:s.substring(0,5))+"-"+((o=i.end_time)==null?void 0:o.substring(0,5))),d[r].dates.add(i.date)});const a=[];for(const[i,r]of Object.entries(d))(r.timeSlots.size>1||r.dates.size>1)&&r.items.forEach(s=>{var m,p;const o=_.value.findIndex(f=>f.id===s.id);a.push({idx:o!==-1?o+1:"",room:s.department_resources_name,date:s.date,timeSlot:((m=s.begin_time)==null?void 0:m.substring(0,5))+"-"+((p=s.end_time)==null?void 0:p.substring(0,5)),entrust:le(_.value.find(f=>f.id===s.id))})});if(a.length>0){let i='';i+='| 序号 | 项目名称 | 检查室 | 日期 | 时间段 |
';let r="",s="#f5f5f5";a.sort((o,m)=>o.idx-m.idx).forEach(o=>{o.timeSlot!==r&&(s=s==="#fff"?"#d5dce6":"#fff",r=o.timeSlot),i+='| '+o.idx+' | '+o.entrust+' | '+o.room+' | '+o.date+' | '+o.timeSlot+" |
"}),i+="
",ue.value=i,F.value=!0}B.value=t.data[0].department_resources_name,q.value=t.data.map(i=>i.plan_id),R.value=t.data[0].plan_id}else se.confirm("未找到任何一天可满足所有检查项目的号源","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",showCancelButton:!1});else $.error(t.msg)})},rt=()=>{if(U.value.length===0){$.error("请选择检查项目");return}O.value=!0,b.value.forEach(t=>{const d=he.value.find(i=>i.id===t.id);if(!d)return;const a=_.value.find(i=>i.id===t.id);a&&(a.department_resources=d.department_resources,a.reservation_date=d.reservation_date,a.period_begin_time=d.period_begin_time,a.period_end_time=d.period_end_time,a.temp_plan_id=void 0)});const n=b.value.filter(t=>t.list_status===0).map(t=>{var d;return{id:t.id,entrust_id:t.entrust_id,department_resources_name:((d=t.department_resources)==null?void 0:d.department_resources_name)||"",date:t.reservation_date||"",begin_time:t.period_begin_time||"",end_time:t.period_end_time||""}}),e=_.value.filter(t=>!z.value.includes(t.id)&&t.list_status===0&&t.temp_plan_id).map(t=>t.temp_plan_id);ce({type:"same_day_slot",regnum:S.reg_num,entrustid:U.value,episodeid:S.episode_id,appointment_type:S.appointment_type,items:n,occupied_plan_ids:e,scope:S.scope,do_user:S.do_user}).then(t=>{if(O.value=!1,t.status)if(t.data.length>0){const d={};t.data.forEach(i=>{var s,o;const r=i.department_resources_name;d[r]||(d[r]={timeSlots:new Set}),d[r].timeSlots.add(((s=i.begin_time)==null?void 0:s.substring(0,5))+"-"+((o=i.end_time)==null?void 0:o.substring(0,5)))});let a=!1;for(const i of Object.values(d))if(i.timeSlots.size>1){a=!0;break}if(a){se.confirm("未找到同一时段号源,无法匹配","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",showCancelButton:!1});return}t.data.forEach(i=>{const r=_.value.find(s=>s.id===i.id);r&&(r.department_resources||(r.department_resources={}),r.department_resources.department_resources_name=i.department_resources_name,r.reservation_date=i.date,r.period_begin_time=i.begin_time,r.period_end_time=i.end_time,r.temp_plan_id=i.plan_id)}),B.value=t.data[0].department_resources_name,q.value=t.data.map(i=>i.plan_id),R.value=t.data[0].plan_id}else se.confirm("未找到同一时段号源,无法匹配","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",showCancelButton:!1});else $.error(t.msg)})},ot=()=>{O.value=!0;const n=re.value.find(a=>a.id===R.value);if(!n){O.value=!1;return}const e=n.date+" "+n.begin_time,t=n.date+" "+n.end_time,d=n.department_resources_name;St({reg_num:S.reg_num,planid:R.value}).then(a=>{var r;O.value=!1;let i=[];if(!a.status&&((r=a.data)!=null&&r.conflicts)&&(i=i.concat(a.data.conflicts.filter(s=>s.room_name!==d))),_.value.forEach(s=>{var f,g,y,c;if(s.list_status!==0||!s.temp_plan_id||!s.reservation_date||((f=s.department_resources)==null?void 0:f.department_resources_name)===d)return;const m=s.reservation_date+" "+s.period_begin_time,p=s.reservation_date+" "+s.period_end_time;m<=t&&e<=p&&(i.some(l=>l.entrust===s.entrust&&l.date===s.reservation_date)||i.push({entrust:s.entrust,date:s.reservation_date,begin_time:(g=s.period_begin_time)==null?void 0:g.substring(0,5),end_time:(y=s.period_end_time)==null?void 0:y.substring(0,5),room_name:((c=s.department_resources)==null?void 0:c.department_resources_name)||""}))}),i.length>0){let s='';s+='| 序号 | 项目名称 | 检查室 | 日期 | 时间段 |
',i.forEach((o,m)=>{s+='| '+(m+1)+' | '+o.entrust+' | '+(o.room_name||"")+' | '+o.date+' | '+o.begin_time+"-"+o.end_time+" |
"}),s+="
",ze.value=s,ee.value=!0}})},Ne=n=>{if(U.length==0)return $.error("请选择检查项目"),!1;if(R.value==0||R.value==""||R.value==null)return $.error("请选择号源"),!1;let e="确定预约此时间吗?";n==2&&(e="确定改约至此时间吗?"),se.confirm(e,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{ut(n)}).catch(()=>{})},ut=async n=>{O.value=!0;const e={};_.value.forEach(p=>{var f;!z.value.includes(p.id)&&p.temp_plan_id&&(e[p.id]={temp_plan_id:p.temp_plan_id,department_resources_name:(f=p.department_resources)==null?void 0:f.department_resources_name,reservation_date:p.reservation_date,period_begin_time:p.period_begin_time,period_end_time:p.period_end_time})}),console.log("tempPlanCache 缓存:",JSON.parse(JSON.stringify(e)));const t={};let d=!1;if(z.value.forEach(p=>{const f=_.value.find(y=>y.id===p),g=(f==null?void 0:f.temp_plan_id)||(f==null?void 0:f.roster_id);if(!g){d=!0;return}t[g]||(t[g]=[]),t[g].push(p)}),d){O.value=!1,$.error("存在未分配号源的项目,请先选择号源");return}const a=Object.keys(t);if(a.length===1){const p=Number(a[0]),f=t[p];Ge({mainlistid:f,planid:p,appointment_type:S.appointment_type,dotype:n,do_user:S.do_user,is_emergency:n==111?1:null}).then(g=>{O.value=!1,g.status?(be.value.forEach((y,c)=>{y.label=="开启申请单pdf"&&y.value}),Se(()=>{var l;A.value=!1;const y=[...z.value],c=_.value.filter(u=>u.list_status===0&&u.tishi_msg==="");if(c.length===0)y.forEach(u=>{const w=_.value.find(T=>T.id===u);w&&L.value.toggleRowSelection(w,!0)});else{L.value.clearSelection();const u=new Set(c.map(w=>{var T;return(T=w.department_resources)==null?void 0:T.department_resources_name}).filter(Boolean));_.value.forEach(w=>{var T;w.tishi_msg===""&&(w.list_status===0||u.has((T=w.department_resources)==null?void 0:T.department_resources_name))&&L.value.toggleRowSelection(w,!0)})}if(A.value=!0,_.value.forEach(u=>{e[u.id]&&(console.log("回填 temp_plan_id:",u.id,e[u.id].temp_plan_id),u.temp_plan_id=e[u.id].temp_plan_id,u.department_resources||(u.department_resources={}),u.department_resources.department_resources_name=e[u.id].department_resources_name,u.reservation_date=e[u.id].reservation_date,u.period_begin_time=e[u.id].period_begin_time,u.period_end_time=e[u.id].period_end_time)}),console.log("回填后 entrustTableDate:",JSON.parse(JSON.stringify(_.value.map(u=>({id:u.id,temp_plan_id:u.temp_plan_id,list_status:u.list_status}))))),setTimeout(()=>{console.log("延迟检查 temp_plan_id:",JSON.parse(JSON.stringify(_.value.map(u=>({id:u.id,temp_plan_id:u.temp_plan_id,list_status:u.list_status})))))},2e3),b.value.length>0){const u=(l=b.value[0].department_resources)==null?void 0:l.department_resources_name;u&&(B.value=u)}if(b.value.some(u=>u.list_status===0)||K(),de.value.length>0){const u=b.value.filter(w=>w.list_status===1).map(w=>w.entrust_id);u.length>0&&Ve(u)}},!0)):se.confirm(g.msg,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"error",showCancelButton:!1}).then(()=>{}).catch(()=>{})});return}const i=[],r=[],s=[];for(const p of a){const f=Number(p),g=t[p];try{const y=await Ge({mainlistid:g,planid:f,appointment_type:S.appointment_type,dotype:n,do_user:S.do_user,is_emergency:n==111?1:null});y.status?g.forEach(c=>{var l;const E=_.value.find(u=>u.id===c);if(E){const u=(E.period_begin_time?E.period_begin_time.substring(0,5):"")+"-"+(E.period_end_time?E.period_end_time.substring(0,5):"");i.push({name:E.entrust,room:((l=E.department_resources)==null?void 0:l.department_resources_name)||"",date:E.reservation_date||"",time:u}),s.push(E.entrust_id)}}):g.forEach(c=>{const E=_.value.find(l=>l.id===c);E&&r.push({name:E.entrust,msg:y.msg})})}catch{g.forEach(c=>{const E=_.value.find(l=>l.id===c);E&&r.push({name:E.entrust,msg:"请求异常"})})}}O.value=!1;let o='';o+='| 序号 | 项目名称 | 检查室 | 日期 | 时间段 | 结果 |
';let m=1;i.forEach(p=>{o+='| '+m+++' | '+p.name+' | '+p.room+' | '+p.date+' | '+p.time+' | 预约成功 |
'}),r.forEach(p=>{o+='| '+m+++' | '+p.name+' | — | '+p.msg+" |
"}),o+="
",Ye.value=o,te.value=!0,i.length>0&&(Se(()=>{var y;A.value=!1;const p=[...z.value],f=_.value.filter(c=>c.list_status===0&&c.tishi_msg==="");if(f.length===0)p.forEach(c=>{const E=_.value.find(l=>l.id===c);E&&L.value.toggleRowSelection(E,!0)});else{L.value.clearSelection();const c=new Set(f.map(E=>{var l;return(l=E.department_resources)==null?void 0:l.department_resources_name}).filter(Boolean));_.value.forEach(E=>{var l;E.tishi_msg===""&&(E.list_status===0||c.has((l=E.department_resources)==null?void 0:l.department_resources_name))&&L.value.toggleRowSelection(E,!0)})}if(A.value=!0,_.value.forEach(c=>{e[c.id]&&(console.log("回填 temp_plan_id:",c.id,e[c.id].temp_plan_id),c.temp_plan_id=e[c.id].temp_plan_id,c.department_resources||(c.department_resources={}),c.department_resources.department_resources_name=e[c.id].department_resources_name,c.reservation_date=e[c.id].reservation_date,c.period_begin_time=e[c.id].period_begin_time,c.period_end_time=e[c.id].period_end_time)}),console.log("回填后 entrustTableDate:",JSON.parse(JSON.stringify(_.value.map(c=>({id:c.id,temp_plan_id:c.temp_plan_id,list_status:c.list_status}))))),setTimeout(()=>{console.log("延迟检查 temp_plan_id:",JSON.parse(JSON.stringify(_.value.map(c=>({id:c.id,temp_plan_id:c.temp_plan_id,list_status:c.list_status})))))},2e3),b.value.length>0){const c=(y=b.value[0].department_resources)==null?void 0:y.department_resources_name;c&&(B.value=c)}b.value.some(c=>c.list_status===0)||K(),de.value.length>0&&Ve(s)},!0),be.value.forEach((p,f)=>{p.label=="开启申请单pdf"&&p.value}))},pt=()=>{se.confirm("确定取消预约吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(async()=>{const n={};_.value.forEach(d=>{var a;!z.value.includes(d.id)&&d.temp_plan_id&&(n[d.id]={temp_plan_id:d.temp_plan_id,department_resources_name:(a=d.department_resources)==null?void 0:a.department_resources_name,reservation_date:d.reservation_date,period_begin_time:d.period_begin_time,period_end_time:d.period_end_time})});const e=b.value.map(d=>{var a;return{id:d.id,entrust_id:d.entrust_id,department_resources_name:((a=d.department_resources)==null?void 0:a.department_resources_name)||"",date:d.reservation_date||"",begin_time:d.period_begin_time||"",end_time:d.period_end_time||""}});Q.value=!0;const t=await kt({ids:b.value.map(d=>d.id),reg_num:b.value[0].reg_num,do_user:S.do_user});t.status?($.success("取消成功"),Q.value=!1,Se(()=>{_.value.forEach(a=>{n[a.id]&&(a.temp_plan_id=n[a.id].temp_plan_id,a.department_resources||(a.department_resources={}),a.department_resources.department_resources_name=n[a.id].department_resources_name,a.reservation_date=n[a.id].reservation_date,a.period_begin_time=n[a.id].period_begin_time,a.period_end_time=n[a.id].period_end_time)});const d=e;if(d.length>0){const a=_.value.filter(i=>!d.find(r=>r.id===i.id)&&i.list_status===0&&i.temp_plan_id).map(i=>i.temp_plan_id);ce({type:"optimal_time",regnum:S.reg_num,entrustid:d.map(i=>i.entrust_id),episodeid:S.episode_id,appointment_type:S.appointment_type,items:d,occupied_plan_ids:a,scope:S.scope,do_user:S.do_user}).then(i=>{i.status&&i.data.length>0&&(i.data.forEach(r=>{const s=_.value.find(o=>o.id===r.id);s&&(s.department_resources||(s.department_resources={}),s.department_resources.department_resources_name=r.department_resources_name,s.reservation_date=r.date,s.period_begin_time=r.begin_time,s.period_end_time=r.end_time,s.temp_plan_id=r.plan_id)}),B.value=i.data[0].department_resources_name,q.value=i.data.map(r=>r.plan_id),R.value=i.data[0].plan_id)})}},!0)):($.error(t.msg||"取消失败"),Q.value=!1)})},_t=()=>{Et({config_arrs:["开启申请单pdf","医生端打印"]}).then(n=>{n.status&&(be.value=n.data.list,be.value.forEach((e,t)=>{console.log(S.appointment_type),e.label=="医生端打印"&&e.value==="0"&&S.appointment_type==1&&(de.value=[])}))})},Ve=n=>{const e=n||U.value,t=b.value.filter(i=>e.includes(i.entrust_id)&&i.list_status!=1);if(t.length>0){$.error(t.map(i=>i.entrust).join("、")+" 不可打印,请重新选择");return}const a="https://yj.dev.cjy.net.cn/api/GetCheckPdf?Dev=1&Type=group&"+e.map(i=>"OrderNoList[]="+i).join("&");fetch(a).then(i=>i.blob()).then(i=>{const r=URL.createObjectURL(i),s=document.createElement("iframe");s.style.display="none",s.src=r,s.onload=()=>{s.contentWindow.print(),URL.revokeObjectURL(r)},document.body.appendChild(s)})},mt=()=>{B.value="",Z.value=ke(ie.value),console.log(Z.value),K()};function ct(n){const e=n.getFullYear(),t=String(n.getMonth()+1).padStart(2,"0"),d=String(n.getDate()).padStart(2,"0");return`${e}-${t}-${d}`}function ke(n=new Date,e=15){const t=new Date(n),d=[];if(isNaN(t.getTime()))throw new Error("无效的日期格式");for(let a=0;a15}function He(){const n=new Date,e=n.getFullYear(),t=String(n.getMonth()+1).padStart(2,"0"),d=String(n.getDate()).padStart(2,"0");return`${e}-${t}-${d}`}let Be=k(!1);return bt(()=>{Be.value=!0,_t(),Z.value=ke(),Se(()=>{b.value.some(e=>e.list_status===0)||K()})}),(n,e)=>{var E;const t=J("el-alert"),d=J("el-table-column"),a=J("el-tag"),i=J("el-table"),r=J("el-button"),s=J("el-checkbox"),o=J("el-checkbox-group"),m=J("el-tooltip"),p=J("el-date-picker"),f=J("el-empty"),g=J("el-dialog"),y=J("el-icon"),c=ht("loading");return C(),M("div",Ct,[v(Y)?(C(),M("div",Dt,[D("div",It,[D("span",Tt,V(v(Y).user_name),1),N("("+V(v(Y).user_sex_label)+" "+V(v(Y).age)+"岁)",1)]),D("div",Mt,[N(V(v(Y).patient_type_label)+"号:",1),D("span",Nt,V(v(Y).patient_type==0?(E=v(Y).episodeid)==null?void 0:E.slice(-10):v(Y).reg_num),1)]),D("div",Vt,[e[19]||(e[19]=N("电话:",-1)),D("span",Bt,V(v(Y).user_phone),1)]),v(Y).warddesc?(C(),M("div",Rt,[e[20]||(e[20]=N("病区:",-1)),D("span",Pt,V(v(Y).warddesc),1)])):P("",!0),v(Y).bedno?(C(),M("div",zt,[e[21]||(e[21]=N("床号:",-1)),D("span",Yt,V(v(Y).bedno),1)])):P("",!0),v(Y).diagnosisName?(C(),M("div",Ot,[e[22]||(e[22]=N("诊断:",-1)),D("span",$t,V(v(Y).diagnosisName),1)])):P("",!0)])):(C(),M("div",Lt," 获取患者信息失败 ")),Ze.value?(C(),ne(t,{key:2,type:"danger",closable:!1,"show-icon":"",style:{"margin-bottom":"8px"}},{title:h(()=>[...e[23]||(e[23]=[D("span",{style:{"font-weight":"700",color:"#f56c6c"}},"患者所有检查项目未预约至同一天,请注意是否需手动调整预约",-1)])]),_:1})):P("",!0),D("div",Ut,[Je((C(),ne(i,{data:v(_),style:{width:"100%"},"row-key":"id",ref_key:"entrustTableRef",ref:L,"row-class-name":tt,onSelectionChange:Qe},{default:h(()=>[x(d,{type:"selection",width:"36",selectable:dt}),x(d,{prop:"tishi_msg",width:"200"},{header:h(()=>[D("div",null,[D("div",null,"共 "+V(v(_).length)+" 项,已选 "+V(v(z).length)+" 项",1),Oe.value>0?(C(),M("div",Ht,"同检查室项目 "+V(Oe.value)+" 项",1)):P("",!0)])]),default:h(l=>[D("span",jt,V(l.$index+1),1),l.row.tishi_msg!=""?(C(),M("span",Jt,V(l.row.tishi_msg),1)):(C(),M("span",Ft,"正常"))]),_:1}),x(d,{prop:"list_status",label:"预约状态",width:"80"},{default:h(l=>[l.row.list_status===0?(C(),ne(a,{key:0,class:"ml-2",type:"info"},{default:h(()=>[...e[24]||(e[24]=[N("未预约",-1)])]),_:1})):P("",!0),l.row.list_status===1?(C(),ne(a,{key:1,class:"ml-2",type:"success"},{default:h(()=>[...e[25]||(e[25]=[N("已预约",-1)])]),_:1})):P("",!0),l.row.list_status===2?(C(),ne(a,{key:2,class:"ml-2"},{default:h(()=>[...e[26]||(e[26]=[N("登记",-1)])]),_:1})):P("",!0),l.row.list_status===3?(C(),ne(a,{key:3,class:"ml-2",type:"warning"},{default:h(()=>[...e[27]||(e[27]=[N("完成",-1)])]),_:1})):P("",!0)]),_:1}),x(d,{label:"项目","show-overflow-tooltip":""},{default:h(l=>[N(V(l.row.entrust)+V(l.row.requestComment?"("+l.row.requestComment+")":""),1)]),_:1}),x(d,{prop:"is_pay",label:"是否交费",width:"60",align:"center"},{default:h(l=>[l.row.is_pay==1?(C(),M("span",Gt,"是")):P("",!0),l.row.is_pay==0?(C(),M("span",At,"否")):P("",!0)]),_:1}),x(d,{prop:"his_is_emergency",label:"是否加急",width:"60",align:"center"},{default:h(l=>[l.row.his_is_emergency==1?(C(),M("span",qt,"是")):P("",!0),l.row.his_is_emergency==0?(C(),M("span",Wt,"否")):P("",!0)]),_:1}),x(d,{prop:"department_resources.department_resources_name",label:"排班",width:"220"}),x(d,{prop:"reservation_date",label:"预约日期",width:"120"}),x(d,{prop:"check_begin_time",label:"预约时间",width:"120"},{default:h(l=>[l.row.period_begin_time&&l.row.period_end_time?(C(),M("span",Zt,V(l.row.period_begin_time.substring(0,5))+"~"+V(l.row.period_end_time.substring(0,5)),1)):P("",!0)]),_:1}),x(d,{prop:"limosis",label:"是否空腹",width:"60",align:"center"},{default:h(l=>[l.row.limosis==0?(C(),M("span",Kt,"否")):(C(),M("span",Qt,"是"))]),_:1}),x(d,{prop:"reservation_department",label:"申请科室",width:"150"}),x(d,{prop:"",label:"医嘱时间",width:"200"},{default:h(l=>[N(V(l.row.entrust_date)+" "+V(l.row.entrust_time),1)]),_:1}),x(d,{prop:"docotr",label:"申请医生",width:"80"})]),_:1},8,["data"])),[[c,v(Q)]])]),D("div",Xt,[D("div",ed,[D("div",td,[(C(!0),M(De,null,Ie(v(fe),(l,u)=>(C(),M("div",{key:u,class:Fe({"ZhenShiButton zhenshiButton_active":v(B)===l,ZhenShiButton:v(B)!==l}),onClick:w=>st(l)},V(l),11,dd))),128)),e[38]||(e[38]=D("div",{class:"shuxian"},null,-1)),$e.value?(C(),ne(r,{key:0,class:"do_button",type:"danger",onClick:e[0]||(e[0]=l=>Ne(111))},{default:h(()=>[...e[28]||(e[28]=[N("加急预约",-1)])]),_:1})):P("",!0),x(r,{class:"do_button",type:"success",onClick:e[1]||(e[1]=l=>Ne(1))},{default:h(()=>[...e[29]||(e[29]=[N("预约",-1)])]),_:1}),x(r,{class:"do_button",type:"warning",onClick:e[2]||(e[2]=l=>Ne(2))},{default:h(()=>[...e[30]||(e[30]=[N("更改预约时间",-1)])]),_:1}),x(r,{class:"do_button",type:"danger",onClick:e[3]||(e[3]=l=>pt())},{default:h(()=>[...e[31]||(e[31]=[N("取消预约",-1)])]),_:1}),x(r,{onClick:e[4]||(e[4]=l=>Ve())},{default:h(()=>[...e[32]||(e[32]=[N("打印申请单",-1)])]),_:1}),D("div",nd,[x(o,{modelValue:v(de),"onUpdate:modelValue":e[5]||(e[5]=l=>H(de)?de.value=l:de=l)},{default:h(()=>[x(s,{label:"1"},{default:h(()=>[...e[33]||(e[33]=[N("预约完成后打印申请单",-1)])]),_:1})]),_:1},8,["modelValue"]),x(m,{placement:"top",content:yd,"popper-class":"tip-pre-line"},{default:h(()=>[x(s,{modelValue:v(oe),"onUpdate:modelValue":e[6]||(e[6]=l=>H(oe)?oe.value=l:oe=l)},{default:h(()=>[...e[34]||(e[34]=[N("自动选中能一起预约的检查项目",-1)])]),_:1},8,["modelValue"])]),_:1})]),x(m,{placement:"top",content:"点击此按钮,系统会推荐最近能用的时间段号源,多个检查项目可能会跨天跨时间段","popper-class":"tip-pre-line"},{default:h(()=>[x(r,{class:"do_button_recommend",type:"primary",style:{"margin-left":"20px",width:"120px"},onClick:it},{default:h(()=>[...e[35]||(e[35]=[N("推荐最近时间号源",-1)])]),_:1})]),_:1}),x(m,{placement:"top",content:"点击此按钮,系统会推荐最近的能在同一天完成检查的号源","popper-class":"tip-pre-line"},{default:h(()=>[x(r,{class:"do_button_recommend",type:"primary",style:{width:"120px"},onClick:lt},{default:h(()=>[...e[36]||(e[36]=[N("推荐同一天号源",-1)])]),_:1})]),_:1}),x(m,{placement:"top",content:"点击此按钮,系统会推荐最近的能在同一天同一时间段完成检查的号源","popper-class":"tip-pre-line"},{default:h(()=>[x(r,{class:"do_button_recommend",type:"primary",onClick:rt},{default:h(()=>[...e[37]||(e[37]=[N("推荐同一天同一时间段号源",-1)])]),_:1})]),_:1})]),D("div",null,[x(p,{modelValue:v(ie),"onUpdate:modelValue":e[7]||(e[7]=l=>H(ie)?ie.value=l:ie=l),type:"date",placeholder:"跳转日期",onChange:e[8]||(e[8]=l=>mt())},null,8,["modelValue"])])]),Je((C(),M("div",sd,[D("table",ad,[v(b).length>0?(C(),M("tr",id,[e[39]||(e[39]=D("td",{style:{width:"120px"}},null,-1)),(C(!0),M(De,null,Ie(v(Z),(l,u)=>(C(),M("td",ld,V(l.substring(5,10))+" "+V(We(l)),1))),256))])):P("",!0),v(Z).length>0&&v(ae).length>0?(C(!0),M(De,{key:1},Ie(v(ae),(l,u)=>(C(),M("tr",{key:u,class:"table_plan_row"},[(C(!0),M(De,null,Ie(l,(w,T)=>(C(),M("td",{key:T,class:Fe({planActive:v(q).includes(w.id)&&w.id!==0&&w.id,plandisable:!w.enable&&T!=="time_range"}),onClick:j=>at(w.id)},[T=="time_range"?(C(),M("span",od,V(w),1)):P("",!0),D("span",null,V(w.use_count),1)],10,rd))),128))]))),128)):P("",!0)]),v(b).length==0?(C(),M("div",ud,[x(f,{description:"请选择项目"})])):P("",!0),v(b).length>0&&v(ae).length==0?(C(),M("div",pd,[x(f,{description:"暂无号源"})])):P("",!0)])),[[c,v(O)]])]),x(g,{modelValue:v(X),"onUpdate:modelValue":e[10]||(e[10]=l=>H(X)?X.value=l:X=l),title:"提示",width:"500"},{footer:h(()=>[D("div",_d,[x(r,{type:"primary",onClick:e[9]||(e[9]=l=>H(X)?X.value=!1:X=!1)},{default:h(()=>[...e[40]||(e[40]=[N(" 确定 ",-1)])]),_:1})])]),default:h(()=>[x(i,{data:v(we),style:{width:"100%"},"row-key":"id"},{default:h(()=>[x(d,{prop:"item_name",label:"项目名称"}),x(d,{prop:"msg",label:"异常提示"})]),_:1},8,["data"])]),_:1},8,["modelValue"]),x(g,{modelValue:v(F),"onUpdate:modelValue":e[12]||(e[12]=l=>H(F)?F.value=l:F=l),title:"提示",width:"800"},{footer:h(()=>[x(r,{type:"primary",onClick:e[11]||(e[11]=l=>H(F)?F.value=!1:F=!1)},{default:h(()=>[...e[42]||(e[42]=[N("确定",-1)])]),_:1})]),default:h(()=>[D("div",md,[x(y,{class:"el-icon-warning",style:{color:"#e6a23c","font-size":"24px","flex-shrink":"0","margin-top":"2px"}},{default:h(()=>[x(v(Te))]),_:1}),D("div",null,[e[41]||(e[41]=D("p",{style:{margin:"0 0 12px 0","font-weight":"700"}},"最近可用的同一时间段号源数量不足,无法把当前全部检查项目预约在同一时间段,系统已经自动拆分。",-1)),D("div",{innerHTML:v(ue)},null,8,cd)])])]),_:1},8,["modelValue"]),x(g,{modelValue:v(ee),"onUpdate:modelValue":e[14]||(e[14]=l=>H(ee)?ee.value=l:ee=l),title:"时段冲突",width:"800"},{footer:h(()=>[x(r,{type:"primary",onClick:e[13]||(e[13]=l=>H(ee)?ee.value=!1:ee=!1)},{default:h(()=>[...e[44]||(e[44]=[N("我知道了",-1)])]),_:1})]),default:h(()=>[D("div",fd,[x(y,{style:{color:"#F56C6C","font-size":"24px","flex-shrink":"0","margin-top":"2px"}},{default:h(()=>[x(v(Te))]),_:1}),D("div",null,[e[43]||(e[43]=D("p",{style:{margin:"0 0 12px 0","font-weight":"700"}}," 以下项目与当前选择的时间段存在冲突,请确认是否继续预约: ",-1)),D("div",{innerHTML:v(ze)},null,8,gd)])])]),_:1},8,["modelValue"]),x(g,{modelValue:v(te),"onUpdate:modelValue":e[16]||(e[16]=l=>H(te)?te.value=l:te=l),title:"预约结果",width:"800"},{footer:h(()=>[x(r,{type:"primary",onClick:e[15]||(e[15]=l=>H(te)?te.value=!1:te=!1)},{default:h(()=>[...e[45]||(e[45]=[N("确定",-1)])]),_:1})]),default:h(()=>[D("div",xd,[x(y,{style:{color:"#e6a23c","font-size":"24px","flex-shrink":"0","margin-top":"2px"}},{default:h(()=>[x(v(Te))]),_:1}),D("div",{innerHTML:v(Ye)},null,8,bd)])]),_:1},8,["modelValue"]),x(g,{modelValue:v(W),"onUpdate:modelValue":e[18]||(e[18]=l=>H(W)?W.value=l:W=l),title:"预约推荐结果",width:"800"},{footer:h(()=>[x(r,{type:"primary",onClick:e[17]||(e[17]=l=>H(W)?W.value=!1:W=!1)},{default:h(()=>[...e[46]||(e[46]=[N("确定",-1)])]),_:1})]),default:h(()=>[D("div",hd,[x(y,{style:{color:"#e6a23c","font-size":"24px","flex-shrink":"0","margin-top":"2px"}},{default:h(()=>[x(v(Te))]),_:1}),D("div",{innerHTML:v(ve)},null,8,vd)])]),_:1},8,["modelValue"])])}}},kd=xt(wd,[["__scopeId","data-v-62fd23a8"]]);export{kd as Y};