You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
26 KiB
JavaScript

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

import{_ as gl,Y as _l,o as yl,r as x,c as cl,h as me,i as a,d,e as y,k as i,f as s,w as o,l as b,j as C,an as xl,E as c,g as n,ao as kl,ap as be,a9 as bl,q as r,F as I,t as U,x as E,v as V,aa as Cl,aq as Vl,ar as hl,as as wl,at as Il,au as Dl,a8 as Ul,ae as Sl,af as Ll,N as zl,ag as Rl,aj as Hl,ak as Bl,al as El,av as Tl}from"./index-2a066d66.js";const $l={class:"head"},Nl={style:{display:"inline-flex","align-items":"center"}},Gl={class:"page"},Fl={class:"chuansuokuang"},Al={key:0,style:{padding:"0 20px 12px","margin-top":"10px"}},Pl={class:"dialog-footer"},Ml={class:"row"},Ol={class:"row"},Yl={class:"row"},jl={class:"row"},ql={class:"row"},Jl={class:"row"},Kl={class:"row"},Ql={class:"row"},Wl={class:"row"},Xl={class:"dialog-footer"},Zl={style:{"font-weight":"900","font-size":"16px"}},et={style:{display:"flex","margin-top":"20px"}},lt={style:{width:"30%","border-right":"1px solid #ccc",padding:"4px 20px"}},tt={style:{"border-bottom":"1px solid #ccc","padding-bottom":"12px","margin-bottom":"20px"}},at={style:{display:"flex","margin-bottom":"8px"}},st={style:{"padding-left":"40px","max-height":"400px","overflow-y":"scroll"}},ot={style:{width:"100px","border-right":"1px solid #ccc","text-align":"center",height:"400px","line-height":"400px"}},it={style:{width:"60%","padding-left":"20px","max-height":"450px","overflow-y":"scroll"}},nt={style:{color:"#999","margin-bottom":"4px","font-size":"12px"}},ut={key:0,id:"huchi_table"},dt={key:0,style:{display:"flex"}},rt={key:1,style:{display:"flex"}},mt={key:1,style:{"text-align":"center","margin-top":"20px",color:"#bbb"}},pt={style:{"margin-right":"12px"}},vt={style:{"margin-left":"12px",width:"250px"}},ft={style:{"margin-bottom":"12px"}},gt={style:{display:"flex","align-items":"center","margin-bottom":"8px"}},_t={style:{"font-weight":"700","margin-right":"12px"}},yt={style:{display:"flex","align-items":"center","margin-bottom":"8px"}},ct={style:{display:"flex","align-items":"center","margin-bottom":"8px"}},xt={style:{display:"flex","align-items":"center"}},kt={key:0,style:{"text-align":"center",color:"#bbb",padding:"20px"}},bt={key:0,style:{"text-align":"center",padding:"12px 0",color:"#303133","font-size":"15px","font-weight":"500"}},Ct={style:{display:"flex","justify-content":"space-around",padding:"12px 0"}},Vt={style:{"text-align":"center",flex:"1"}},ht={style:{"font-size":"28px","font-weight":"700",color:"#409eff"}},wt={style:{"text-align":"center",flex:"1"}},It={style:{"font-size":"28px","font-weight":"700",color:"#e6a23c"}},Dt={style:{"text-align":"center",flex:"1"}},Ut={style:{"font-size":"28px","font-weight":"700",color:"#67c23a"}},St={__name:"DeptCheckItemConfig",setup(Lt){let A=n(!1),h=n({bigClass:"",smallClass:"",name:"",orderField:"",orderDirection:"",hisExecDepts:"1",deviceBind:""}),p=n({id:null,item_name:"",limosis:"",reservation_method:"",check_time:"",check_begin_time:"",check_notice:"",warm_tips:"",use_seats:1,is_share_slot:0}),Ce=n([]),Ve=n([]),he=n([]),we=n([]);const P=(t="")=>{let e={};e={...h.value},t=="Dialog"&&(e.bigClass=W.value),A.value=!0,xl({searchInfo:e}).then(u=>{A.value=!1,u.status?(t=="Dialog"?(he.value=u.data.bigClass,we.value=u.data.smallClass):(Ce.value=u.data.bigClass,Ve.value=u.data.smallClass),M()):c.error(u.msg)})};let Ie=n([]),j=n(1),q=n(15),De=0;const M=()=>{pe.value&&pe.value.clearSelection(),D.value=[],A.value=!0,kl({searchInfo:h.value,page:j.value,pageSize:q.value}).then(t=>{if(A.value=!1,t.status){let e=t.data.list;Ie.value=e,De=t.data.count}else c.error(t.msg)})},$e=({prop:t,order:e})=>{h.value.orderField=t||"",h.value.orderDirection=e||"",M()},Ne=t=>{q.value=t,M()},Ge=t=>{j.value=t,M()};let S=n(!1),T=n(!1),X=n(!1),D=n([]),pe=n(null),$=n(!1),Ue=n(""),Se=n(""),J=n(""),L=n(!1),se=n(0),oe=n(0),ie=n(!1),K=n(!1),ve=n(""),Z=n({added:0,removed:0,updated:0});const Fe=_l(()=>X.value?"批量关联排班":"关联排班"),Ae=t=>{D.value=t},Le=t=>{if(D.value.length===0){c.error("请先勾选要批量设置的检查项目");return}Ue.value=t,Se.value=t==="check_notice"?"批量设置检查须知":"批量设置温馨提示";const e={};D.value.forEach(v=>{const k=(v[t]||"").trim();k&&(e[k]=(e[k]||0)+1)});let u=0,_="";Object.entries(e).forEach(([v,k])=>{k>u&&(u=k,_=v)}),J.value=_,$.value=!0},Pe=()=>{const t=D.value.map(e=>e.id);A.value=!0,hl({item_ids:t,field:Ue.value,value:J.value}).then(e=>{A.value=!1,e.status?($.value=!1,c.success(e.msg),M()):c.error(e.msg)})},Me=async()=>{L.value=!0,se.value=0,oe.value=0,ie.value=!1,K.value=!1,Z.value={added:0,removed:0,updated:0},ve.value="正在同步分类...",K.value=!0;const t=await wl();if(K.value=!1,!t.status){c.error("同步分类失败:"+(t.msg||"未知错误")),L.value=!1;return}se.value=1,oe.value=50,ve.value="正在同步项目...",K.value=!0;const e=await Il();if(K.value=!1,!e.status){c.error("同步项目失败:"+(e.msg||"未知错误")),L.value=!1;return}Z.value=e.data,se.value=2,oe.value=100,ie.value=!0,P()},Oe=t=>{X.value=!1,z.value=[],S.value=!0,p.value.id=t.id,be({}).then(e=>{e.status&&(ee.value=e.data),t.devicesInfo&&t.devicesInfo.length>0&&t.devicesInfo.forEach(function(u){ee.value.find(function(_){return _.id==u.id})&&z.value.push(u.id)})})},Ye=()=>{if(D.value.length===0){c.error("请先勾选要批量关联的检查项目");return}X.value=!0,be({}).then(t=>{t.status&&(ee.value=t.data);let e=[];if(D.value.length>0){e=D.value[0].devicesInfo.map(u=>u.id);for(let u=1;u<D.value.length;u++){const _=D.value[u].devicesInfo.map(v=>v.id);e=e.filter(v=>_.includes(v))}}z.value=e,S.value=!0})};let z=n([]),fe=n(0),ge=n(!1);const je=async()=>{const t=e=>Tl({item_id:e,device_ids:z.value});if(X.value){ge.value=!0,fe.value=0;const e=D.value.length;let u=0,_=0;for(let v=0;v<e;v++){try{(await t(D.value[v].id)).status?u++:_++}catch{_++}fe.value=Math.round((v+1)/e*100)}setTimeout(()=>{ge.value=!1},1500),_===0?c.success(`批量关联成功,共${e}`):c.warning(`完成${u}项,失败${_}`),S.value=!1,z.value=[],P()}else t(p.value.id).then(e=>{e.status?(S.value=!1,z.value=[],P()):c.error(e.msg)})};let ee=n([]);const qe=()=>{be({}).then(t=>{t.status?ee.value=t.data:c.error(t.msg)})},Je=t=>{T.value=!0,p.value.id=t.id,p.value.item_name=t.item_name,p.value.limosis=t.limosis,p.value.reservation_method=t.reservation_method,p.value.check_time=t.check_time,p.value.use_seats=t.use_seats||1,p.value.is_share_slot=t.is_share_slot??0,(t.check_begin_time==""||t.check_begin_time==null)&&(t.check_begin_time=0),p.value.check_begin_time=t.check_begin_time,p.value.check_notice=t.check_notice,p.value.warm_tips=t.warm_tips};let _e=n("");const Ke=()=>{bl({}).then(t=>{t.status?_e.value=t.data:c.error(t.msg)})},Qe=()=>{Dl({Info:p.value}).then(t=>{t.status?(T.value=!1,M()):c.error(t.msg)})};let le=n(!1),Q=n(""),te=n(null),W=n(null),G=n(null),ne=n(!1),ue=n([]),R=n(!1),O=n([]),H=n({code:"",name:""});const We=t=>{le.value=!0,H.value.name=t.item_name,H.value.code=t.item_code,G.value=[],Q.value="",P("Dialog"),Re()},ze=()=>{R.value=!0,ue.value=[],Ul({searchInfo:{name:Q.value,bigClass:W.value,smallClass:te.value},page:1,pageSize:100}).then(t=>{R.value=!1,t.status?t.data.list.length>0?G.value=t.data.list:c.error("未找到相关项目"):c.error(t.msg)})},Xe=()=>{let t=[],e=!0;if(w.value.forEach(function(u,_){O.value.forEach(function(v,k){u.code2==v&&(c.error(u.code2_item_name+" 已经存在于右侧,不能重复添加"),e=!1)})}),!e)return!1;G.value.forEach(u=>{O.value.includes(u.item_code)?w.value.push({code2:u.item_code,code2_item_name:u.item_name}):t.push(u)}),G.value=t,O.value=[]},Ze=t=>{w.value=w.value.filter(e=>e.code2!=t.code2),G.value.find(e=>e.item_code==t.code2)||G.value.push({item_code:t.code2,item_name:t.code2_item_name})},ye=(t,e,u,_=0)=>{R.value=!0,Sl({id:_,code1:t,code2:e,time:u}).then(v=>{R.value=!1,v.status?(c({message:v.msg,type:"success"}),w.value.forEach(function(k,f){k.code2==v.data.code2&&(w.value[f].id=v.data.id)})):c.error(v.msg)})};let w=n([]);const Re=()=>{R.value=!0,Ll({code:H.value.code}).then(t=>{R.value=!1,t.status?w.value=t.data:c.error(t.msg)})},el=t=>{zl.confirm("确定解除此项互斥关系吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{R.value=!0,Rl({id:t}).then(e=>{R.value=!1,e.status?(c({message:e.msg,type:"success"}),Re()):c.error(e.msg)})})};let N=n(!1),ae=n(!1),ce=n({id:null,item_name:""}),F=n([]),He=n([]);const ll=["星期一","星期二","星期三","星期四","星期五","星期六","星期日"],tl=t=>{ce.value={id:t.id,item_name:t.item_name},N.value=!0,ae.value=!0,Hl({item_id:t.id}).then(e=>{e.status&&(He.value=e.data)}),Bl({item_id:t.id}).then(e=>{ae.value=!1,e.status?F.value=(e.data||[]).map(u=>({days:u.rule_value.days||[],start_time:u.rule_value.start_time||"",end_time:u.rule_value.end_time||"",resources_id:u.rule_value.resources_id||""})):c.error(e.msg)})},al=()=>{F.value.push({days:[],start_time:"",end_time:"",resources_id:""})},sl=t=>{F.value.splice(t,1)},ol=()=>{for(let e=0;e<F.value.length;e++){const u=F.value[e];if(u.days.length===0){c.error("规则 "+(e+1)+" 至少选择一个星期");return}if(!u.start_time||!u.end_time){c.error("规则 "+(e+1)+" 请设置完整的时间段");return}}const t=F.value.map(e=>({rule_type:"TIME_RESTRICTION",rule_value:{days:e.days,start_time:e.start_time,end_time:e.end_time,resources_id:e.resources_id||""}}));ae.value=!0,El({item_id:ce.value.id,rules:t}).then(e=>{ae.value=!1,e.status?(c.success("保存成功"),N.value=!1):c.error(e.msg)})};return yl(()=>{P(),qe(),Ke()}),(t,e)=>{const u=x("el-tag"),_=x("el-option"),v=x("el-select"),k=x("el-input"),f=x("el-button"),il=x("el-row"),B=x("el-table-column"),nl=x("el-table"),ul=x("el-pagination"),dl=x("el-transfer"),Be=x("el-progress"),Y=x("el-dialog"),de=x("el-checkbox"),xe=x("el-checkbox-group"),rl=x("el-input-number"),ml=x("DArrowLeft"),ke=x("el-icon"),pl=x("DArrowRight"),Ee=x("el-time-select"),Te=x("el-step"),vl=x("el-steps"),fl=x("el-result"),re=cl("loading");return me((d(),y("div",null,[i("div",$l,[s(il,null,{default:o(()=>[i("div",Nl,[s(u,{class:"ml-2",type:"success",style:{"margin-right":"20px"}},{default:o(()=>[...e[44]||(e[44]=[r("医嘱类别",-1)])]),_:1}),s(v,{clearable:"",filterable:!0,modelValue:a(h).bigClass,"onUpdate:modelValue":e[0]||(e[0]=l=>a(h).bigClass=l),onChange:e[1]||(e[1]=l=>P()),placeholder:"所有医嘱大类"},{default:o(()=>[(d(!0),y(I,null,U(a(Ce),(l,m)=>(d(),C(_,{key:m,label:l.item_class_name,value:l.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),s(v,{filterable:!0,clearable:"",modelValue:a(h).smallClass,"onUpdate:modelValue":e[2]||(e[2]=l=>a(h).smallClass=l),placeholder:"所有医嘱小类",style:{"margin-left":"10px"}},{default:o(()=>[(d(!0),y(I,null,U(a(Ve),(l,m)=>(d(),C(_,{key:m,label:l.item_class_name,value:l.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),s(v,{clearable:"",modelValue:a(h).deviceBind,"onUpdate:modelValue":e[3]||(e[3]=l=>a(h).deviceBind=l),placeholder:"关联排班",style:{"margin-left":"10px"}},{default:o(()=>[s(_,{label:"全部",value:""}),s(_,{label:"已关联排班",value:1}),s(_,{label:"未关联排班",value:0})]),_:1},8,["modelValue"]),s(v,{clearable:"",modelValue:a(h).hisExecDepts,"onUpdate:modelValue":e[4]||(e[4]=l=>a(h).hisExecDepts=l),placeholder:"执行科室",style:{"margin-left":"10px"}},{default:o(()=>[s(_,{label:"全部",value:""}),s(_,{label:"有执行科室",value:"1"}),s(_,{label:"无执行科室",value:"0"})]),_:1},8,["modelValue"]),s(k,{modelValue:a(h).name,"onUpdate:modelValue":e[5]||(e[5]=l=>a(h).name=l),placeholder:"请输入项目编号/名称",style:{"margin-left":"10px"}},null,8,["modelValue"])]),s(f,{type:"primary",onClick:e[6]||(e[6]=l=>M()),style:{"margin-left":"10px"}},{default:o(()=>[...e[45]||(e[45]=[r("查询",-1)])]),_:1}),s(f,{type:"primary",onClick:e[7]||(e[7]=l=>Ye()),style:{"margin-left":"10px"}},{default:o(()=>[...e[46]||(e[46]=[r("批量关联排班",-1)])]),_:1}),s(f,{type:"primary",onClick:e[8]||(e[8]=l=>Le("check_notice")),style:{"margin-left":"10px"}},{default:o(()=>[...e[47]||(e[47]=[r("批量设置检查须知",-1)])]),_:1}),s(f,{type:"primary",onClick:e[9]||(e[9]=l=>Le("warm_tips")),style:{"margin-left":"10px"}},{default:o(()=>[...e[48]||(e[48]=[r("批量设置温馨提示",-1)])]),_:1}),s(f,{type:"warning",onClick:Me,style:{"margin-left":"10px"}},{default:o(()=>[...e[49]||(e[49]=[r("同步项目",-1)])]),_:1})]),_:1})]),s(nl,{ref_key:"checkItemTableRef",ref:pe,data:a(Ie),style:{width:"100%","margin-top":"10px"},"row-key":"id",onSortChange:$e,onSelectionChange:Ae},{default:o(()=>[s(B,{type:"selection",width:"50"}),s(B,{prop:"item_code",label:"检查项目编号",width:"160",sortable:"custom"}),s(B,{prop:"item_name",label:"检查项目名称",sortable:"custom"}),s(B,{prop:"reservation_method_name",label:"预约方式"}),s(B,{prop:"limosis",label:"要求空腹",width:"100"},{default:o(l=>[l.row.limosis==1?(d(),C(u,{key:0,class:"ml-2",type:"danger"},{default:o(()=>[...e[50]||(e[50]=[r("是",-1)])]),_:1})):E("",!0),l.row.limosis==0?(d(),C(u,{key:1,class:"ml-2",type:"success"},{default:o(()=>[...e[51]||(e[51]=[r("否",-1)])]),_:1})):E("",!0)]),_:1}),E("",!0),s(B,{prop:"check_time",label:"检查时间",width:"100"}),s(B,{prop:"check_begin_time",label:"开始预约时间",width:"120"}),s(B,{prop:"devicesInfo",label:"关联排班"},{default:o(l=>[(d(!0),y(I,null,U(l.row.devicesInfo,(m,g)=>(d(),y("span",{key:g},[m.status==1&&m.is_del==0?(d(),C(u,{key:0,class:"ml-2",type:"success"},{default:o(()=>[r(V(m.device_name),1)]),_:2},1024)):E("",!0),m.status==0||m.is_del==1?(d(),C(u,{key:1,class:"ml-2",type:"danger"},{default:o(()=>[r(V(m.device_name),1)]),_:2},1024)):E("",!0)]))),128))]),_:1}),s(B,{prop:"",label:"医嘱关联排班",width:"150"},{default:o(l=>[s(f,{size:"small",onClick:m=>Oe(l.row)},{default:o(()=>[...e[52]||(e[52]=[r("关联排班",-1)])]),_:1},8,["onClick"])]),_:1}),s(B,{prop:"",label:"操作",width:"220"},{default:o(l=>[s(f,{type:"primary",onClick:m=>Je(l.row),size:"small"},{default:o(()=>[...e[53]||(e[53]=[r("修改",-1)])]),_:1},8,["onClick"]),s(f,{type:"warning",onClick:m=>We(l.row),size:"small"},{default:o(()=>[...e[54]||(e[54]=[r("互斥",-1)])]),_:1},8,["onClick"]),s(f,{type:"success",onClick:m=>tl(l.row),size:"small"},{default:o(()=>[...e[55]||(e[55]=[r("规则",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1},8,["data"]),i("div",Gl,[s(ul,{"current-page":a(j),"onUpdate:currentPage":e[10]||(e[10]=l=>b(j)?j.value=l:j=l),"page-size":a(q),"onUpdate:pageSize":e[11]||(e[11]=l=>b(q)?q.value=l:q=l),"page-sizes":[15,50,100,200],layout:"total,sizes, prev, pager, next",total:a(De),onSizeChange:Ne,onCurrentChange:Ge},null,8,["current-page","page-size","total"])]),s(Y,{modelValue:a(S),"onUpdate:modelValue":e[15]||(e[15]=l=>b(S)?S.value=l:S=l),title:Fe.value,width:"40%"},{footer:o(()=>[i("span",Pl,[s(f,{onClick:e[13]||(e[13]=l=>b(S)?S.value=!1:S=!1)},{default:o(()=>[...e[56]||(e[56]=[r("取消",-1)])]),_:1}),s(f,{type:"primary",onClick:e[14]||(e[14]=l=>je())},{default:o(()=>[...e[57]||(e[57]=[r(" 确定 ",-1)])]),_:1})])]),default:o(()=>[i("div",Fl,[s(dl,{modelValue:a(z),"onUpdate:modelValue":e[12]||(e[12]=l=>b(z)?z.value=l:z=l),titles:["可选排班","已关联排班"],props:{key:"id",label:"device_name"},data:a(ee)},null,8,["modelValue","data"])]),a(X)&&a(ge)?(d(),y("div",Al,[s(Be,{percentage:a(fe),"stroke-width":14},null,8,["percentage"])])):E("",!0)]),_:1},8,["modelValue","title"]),s(Y,{modelValue:a(T),"onUpdate:modelValue":e[26]||(e[26]=l=>b(T)?T.value=l:T=l),title:"编辑项目",width:"40%"},{footer:o(()=>[i("span",Xl,[s(f,{onClick:e[24]||(e[24]=l=>b(T)?T.value=!1:T=!1)},{default:o(()=>[...e[70]||(e[70]=[r("取消",-1)])]),_:1}),s(f,{type:"primary",onClick:e[25]||(e[25]=l=>Qe())},{default:o(()=>[...e[71]||(e[71]=[r(" 确定 ",-1)])]),_:1})])]),default:o(()=>[i("div",Ml,[e[58]||(e[58]=i("span",{class:"title"},"医嘱名称:",-1)),r(V(a(p).item_name),1)]),i("div",Ol,[e[59]||(e[59]=i("span",{class:"title"},"预约方式:",-1)),a(_e)?(d(),C(xe,{key:0,modelValue:a(p).reservation_method,"onUpdate:modelValue":e[16]||(e[16]=l=>a(p).reservation_method=l)},{default:o(()=>[(d(!0),y(I,null,U(a(_e),(l,m)=>(d(),C(de,{label:l.id,value:l.id,key:m},{default:o(()=>[r(V(l.name),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"])):E("",!0)]),i("div",Yl,[e[60]||(e[60]=i("span",{class:"title"},"空腹:",-1)),s(v,{filterable:!0,clearable:"",modelValue:a(p).limosis,"onUpdate:modelValue":e[17]||(e[17]=l=>a(p).limosis=l),placeholder:"是否空腹",style:{width:"100px"}},{default:o(()=>[s(_,{label:"否",value:0}),s(_,{label:"是",value:1})]),_:1},8,["modelValue"])]),i("div",jl,[e[61]||(e[61]=i("span",{class:"title"},"检查时间:",-1)),s(k,{modelValue:a(p).check_time,"onUpdate:modelValue":e[18]||(e[18]=l=>a(p).check_time=l),placeholder:"请输入此项检查的时长",style:{width:"200px"}},null,8,["modelValue"])]),i("div",ql,[e[62]||(e[62]=i("span",{class:"title"},"占用号源:",-1)),s(rl,{modelValue:a(p).use_seats,"onUpdate:modelValue":e[19]||(e[19]=l=>a(p).use_seats=l),min:1,max:99,style:{width:"200px"}},null,8,["modelValue"]),e[63]||(e[63]=i("div",{style:{"margin-left":"4px"}},"预约时占用的号源数量默认1",-1))]),i("div",Jl,[e[65]||(e[65]=i("span",{class:"title"},"共享号源:",-1)),s(de,{modelValue:a(p).is_share_slot,"onUpdate:modelValue":e[20]||(e[20]=l=>a(p).is_share_slot=l),"true-value":1,"false-value":0},{default:o(()=>[...e[64]||(e[64]=[r(" 项目按人数占用号源 ",-1)])]),_:1},8,["modelValue"])]),i("div",Kl,[e[66]||(e[66]=i("span",{class:"title"},"等待时间:",-1)),s(k,{modelValue:a(p).check_begin_time,"onUpdate:modelValue":e[21]||(e[21]=l=>a(p).check_begin_time=l),placeholder:"开医嘱后,等待时间",style:{width:"200px"}},null,8,["modelValue"]),e[67]||(e[67]=i("div",{style:{"margin-left":"4px"}},"医嘱开具后,预约时间需在设定的等待期之后,单位分钟",-1))]),i("div",Ql,[e[68]||(e[68]=i("span",{class:"title"},"检查须知:",-1)),s(k,{modelValue:a(p).check_notice,"onUpdate:modelValue":e[22]||(e[22]=l=>a(p).check_notice=l),type:"textarea",placeholder:"请输入检查须知",style:{width:"500px"},rows:8},null,8,["modelValue"])]),i("div",Wl,[e[69]||(e[69]=i("span",{class:"title"},"温馨提示:",-1)),s(k,{modelValue:a(p).warm_tips,"onUpdate:modelValue":e[23]||(e[23]=l=>a(p).warm_tips=l),type:"textarea",placeholder:"请输入温馨提示",style:{width:"500px"},rows:8},null,8,["modelValue"])])]),_:1},8,["modelValue"]),s(Y,{modelValue:a(le),"onUpdate:modelValue":e[35]||(e[35]=l=>b(le)?le.value=l:le=l),title:"为 "+a(H).name+" 设置互斥",width:"80%"},{default:o(()=>[e[78]||(e[78]=r(" 请输入想要与 ",-1)),i("span",Zl,V(a(H).name),1),e[79]||(e[79]=r(" 互斥的项目名称 ",-1)),i("div",et,[i("div",lt,[me((d(),y("div",tt,[i("div",at,[s(v,{clearable:"",filterable:!0,modelValue:a(W),"onUpdate:modelValue":e[27]||(e[27]=l=>b(W)?W.value=l:W=l),onChange:e[28]||(e[28]=l=>P("Dialog")),placeholder:"所有医嘱大类"},{default:o(()=>[(d(!0),y(I,null,U(a(he),(l,m)=>(d(),C(_,{key:m,label:l.item_class_name,value:l.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),s(v,{filterable:!0,clearable:"",modelValue:a(te),"onUpdate:modelValue":e[29]||(e[29]=l=>b(te)?te.value=l:te=l),placeholder:"所有医嘱小类",onChange:e[30]||(e[30]=l=>ze()),style:{"margin-left":"10px"}},{default:o(()=>[(d(!0),y(I,null,U(a(we),(l,m)=>(d(),C(_,{key:m,label:l.item_class_name,value:l.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),i("div",null,[s(k,{modelValue:a(Q),"onUpdate:modelValue":e[31]||(e[31]=l=>b(Q)?Q.value=l:Q=l),placeholder:"项目搜索",style:{width:"200px"}},null,8,["modelValue"]),s(f,{type:"success",style:{"margin-left":"8px"},onClick:e[32]||(e[32]=l=>ze())},{default:o(()=>[...e[72]||(e[72]=[r("查询",-1)])]),_:1})])])),[[re,a(R)]]),i("div",st,[s(xe,{modelValue:a(O),"onUpdate:modelValue":e[33]||(e[33]=l=>b(O)?O.value=l:O=l),style:{display:"flex","flex-direction":"column"}},{default:o(()=>[(d(!0),y(I,null,U(a(G),(l,m)=>(d(),C(de,{key:m,label:l.item_code},{default:o(()=>[r(V(l.item_name),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])])]),i("div",ot,[s(f,{type:"primary",icon:a(Cl),circle:"",onClick:e[34]||(e[34]=l=>Xe())},null,8,["icon"])]),i("div",it,[i("div",nt,"已经存在互斥项("+V(a(w).length)+"",1),a(w).length>0?(d(),y("table",ut,[(d(!0),y(I,null,U(a(w),(l,m)=>(d(),y("tr",{key:m},[i("td",null,V(l.code2_item_name),1),i("td",null,[s(k,{modelValue:a(w)[m].time,"onUpdate:modelValue":g=>a(w)[m].time=g,placeholder:"时间,0为永久互斥",style:{width:"150px"}},null,8,["modelValue","onUpdate:modelValue"]),e[73]||(e[73]=i("span",{style:{"font-size":"12px",color:"#bbb"}}," 小时",-1))]),i("td",null,[l.id?(d(),y("span",dt,[s(f,{type:"danger",style:{"margin-left":"8px"},onClick:g=>el(l.id)},{default:o(()=>[...e[74]||(e[74]=[r("解除",-1)])]),_:1},8,["onClick"]),s(f,{type:"primary",style:{"margin-left":"8px"},onClick:g=>ye(a(H).code,l.code2,a(w)[m].time,l.id)},{default:o(()=>[...e[75]||(e[75]=[r("更新",-1)])]),_:1},8,["onClick"])])):(d(),y("span",rt,[s(f,{type:"success",style:{"margin-left":"8px"},onClick:g=>ye(a(H).code,l.code2,a(w)[m].time)},{default:o(()=>[...e[76]||(e[76]=[r("保存",-1)])]),_:1},8,["onClick"]),s(f,{style:{"margin-left":"8px"},onClick:g=>Ze(l)},{default:o(()=>[...e[77]||(e[77]=[r("移除",-1)])]),_:1},8,["onClick"])]))])]))),128))])):(d(),y("div",mt," -- 暂未设置互斥项 -- "))])])]),_:1},8,["modelValue","title"]),s(Y,{modelValue:a(ne),"onUpdate:modelValue":e[36]||(e[36]=l=>b(ne)?ne.value=l:ne=l),title:"为 "+a(H).name+" 设置互斥",width:"50%"},{default:o(()=>[me((d(),y("div",null,[e[81]||(e[81]=i("span",{style:{"font-weight":"900"}},"设置互斥时间单位小时0为永久互斥",-1)),(d(!0),y(I,null,U(a(G),(l,m)=>(d(),y("div",{class:"row",key:m},[i("div",pt,V(a(H).name),1),s(ke,null,{default:o(()=>[s(ml)]),_:1}),s(ke,null,{default:o(()=>[s(pl)]),_:1}),i("div",vt,V(l.item_name),1),s(k,{modelValue:a(ue)[m],"onUpdate:modelValue":g=>a(ue)[m]=g,placeholder:"时间,0为永久互斥",style:{width:"150px"}},null,8,["modelValue","onUpdate:modelValue"]),s(f,{type:"danger",style:{"margin-left":"8px"},onClick:g=>ye(a(H).code,l.item_code,a(ue)[m])},{default:o(()=>[...e[80]||(e[80]=[r("添加",-1)])]),_:1},8,["onClick"])]))),128))])),[[re,a(R)]])]),_:1},8,["modelValue","title"]),me((d(),C(Y,{modelValue:a(N),"onUpdate:modelValue":e[38]||(e[38]=l=>b(N)?N.value=l:N=l),title:"时段规则 - "+a(ce).item_name,width:"700px"},{footer:o(()=>[s(f,{onClick:e[37]||(e[37]=l=>b(N)?N.value=!1:N=!1)},{default:o(()=>[...e[90]||(e[90]=[r("取消",-1)])]),_:1}),s(f,{type:"primary",onClick:ol},{default:o(()=>[...e[91]||(e[91]=[r("保存",-1)])]),_:1})]),default:o(()=>[i("div",ft,[s(f,{type:"primary",size:"small",onClick:al},{default:o(()=>[...e[82]||(e[82]=[r("添加规则",-1)])]),_:1}),e[83]||(e[83]=i("span",{style:{"margin-left":"8px",color:"#999","font-size":"12px"}},"无规则表示不限制预约时段",-1))]),(d(!0),y(I,null,U(a(F),(l,m)=>(d(),y("div",{key:m,style:{border:"1px solid #ddd","border-radius":"4px",padding:"12px","margin-bottom":"10px"}},[i("div",gt,[i("span",_t,"规则 "+V(m+1),1),s(f,{type:"danger",size:"small",onClick:g=>sl(m)},{default:o(()=>[...e[84]||(e[84]=[r("删除",-1)])]),_:1},8,["onClick"])]),i("div",yt,[e[85]||(e[85]=i("span",{style:{width:"80px","font-weight":"500"}},"允许星期",-1)),s(xe,{modelValue:l.days,"onUpdate:modelValue":g=>l.days=g},{default:o(()=>[(d(),y(I,null,U(ll,g=>s(de,{key:g,label:g,value:g},null,8,["label","value"])),64))]),_:1},8,["modelValue","onUpdate:modelValue"])]),i("div",ct,[e[86]||(e[86]=i("span",{style:{width:"80px","font-weight":"500"}},"排班资源",-1)),s(v,{modelValue:l.resources_id,"onUpdate:modelValue":g=>l.resources_id=g,placeholder:"不限(规则跳过)",clearable:"",style:{width:"300px"}},{default:o(()=>[(d(!0),y(I,null,U(a(He),g=>(d(),C(_,{key:g.id,label:g.department_resources_name+(g.department_name?""+g.department_name+"":""),value:g.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onUpdate:modelValue"]),e[87]||(e[87]=i("span",{style:{"margin-left":"8px",color:"#999","font-size":"12px"}},"为空时规则跳过,不生效",-1))]),i("div",xt,[e[88]||(e[88]=i("span",{style:{width:"80px","font-weight":"500"}},"允许时段",-1)),s(Ee,{modelValue:l.start_time,"onUpdate:modelValue":g=>l.start_time=g,"max-time":l.end_time,placeholder:"开始时间",start:"06:00",step:"00:30",end:"23:30",style:{width:"140px"}},null,8,["modelValue","onUpdate:modelValue","max-time"]),e[89]||(e[89]=i("span",{style:{margin:"0 8px"}},"~",-1)),s(Ee,{modelValue:l.end_time,"onUpdate:modelValue":g=>l.end_time=g,"min-time":l.start_time,placeholder:"结束时间",start:"06:00",step:"00:30",end:"23:30",style:{width:"140px"}},null,8,["modelValue","onUpdate:modelValue","min-time"])])]))),128)),a(F).length===0?(d(),y("div",kt," 暂未设置时段限制 ")):E("",!0)]),_:1},8,["modelValue","title"])),[[re,a(ae)]]),s(Y,{modelValue:a($),"onUpdate:modelValue":e[41]||(e[41]=l=>b($)?$.value=l:$=l),title:a(Se),width:"40%"},{footer:o(()=>[s(f,{onClick:e[40]||(e[40]=l=>b($)?$.value=!1:$=!1)},{default:o(()=>[...e[92]||(e[92]=[r("取消",-1)])]),_:1}),s(f,{type:"primary",onClick:Pe},{default:o(()=>[...e[93]||(e[93]=[r("确定",-1)])]),_:1})]),default:o(()=>[s(k,{modelValue:a(J),"onUpdate:modelValue":e[39]||(e[39]=l=>b(J)?J.value=l:J=l),type:"textarea",placeholder:"请输入内容",style:{width:"100%"},rows:8},null,8,["modelValue"])]),_:1},8,["modelValue","title"]),s(Y,{modelValue:a(L),"onUpdate:modelValue":e[43]||(e[43]=l=>b(L)?L.value=l:L=l),title:"同步项目",width:"480px","close-on-click-modal":!1},{footer:o(()=>[a(ie)?(d(),C(f,{key:0,type:"primary",onClick:e[42]||(e[42]=l=>b(L)?L.value=!1:L=!1)},{default:o(()=>[...e[99]||(e[99]=[r("确定",-1)])]),_:1})):E("",!0)]),default:o(()=>[a(ie)?(d(),C(fl,{key:1,icon:"success",title:"同步完成"},{extra:o(()=>[i("div",Ct,[i("div",Vt,[i("div",ht,V(a(Z).added),1),e[94]||(e[94]=i("div",{style:{color:"#999","font-size":"13px"}},"新增项目",-1))]),e[97]||(e[97]=i("div",{style:{width:"1px",background:"#e8e8e8",margin:"0 12px"}},null,-1)),i("div",wt,[i("div",It,V(a(Z).removed),1),e[95]||(e[95]=i("div",{style:{color:"#999","font-size":"13px"}},"移除项目",-1))]),e[98]||(e[98]=i("div",{style:{width:"1px",background:"#e8e8e8",margin:"0 12px"}},null,-1)),i("div",Dt,[i("div",Ut,V(a(Z).updated),1),e[96]||(e[96]=i("div",{style:{color:"#999","font-size":"13px"}},"更新项目",-1))])])]),_:1})):(d(),y(I,{key:0},[a(K)?(d(),y("div",bt,[s(ke,{class:"is-loading",style:{"vertical-align":"middle","margin-right":"4px"}},{default:o(()=>[s(a(Vl))]),_:1}),r(" "+V(a(ve)),1)])):E("",!0),s(vl,{active:a(se),"align-center":"","finish-status":"success",style:{"margin-top":"10px"}},{default:o(()=>[s(Te,{title:"同步分类"}),s(Te,{title:"同步项目"})]),_:1},8,["active"]),s(Be,{percentage:a(oe),"stroke-width":14,style:{"margin-top":"24px"}},null,8,["percentage"])],64))]),_:1},8,["modelValue"])])),[[re,a(A)]])}}},Rt=gl(St,[["__scopeId","data-v-d92ea120"]]);export{Rt as default};