Index-63803f99.js 4.8 KB

1
  1. import{d as O,i as g,v as w,a as V,n as E,r as c,o as p,y as u,c as t,f as k,e,w as l,S as H,t as x,h as J,D as L,p as P,j as Q,_ as U}from"./index-bed2942a.js";import{C as q}from"./CusNavigation-b2e56c9f.js";import{p as I}from"./index-d139c558.js";import{R as A}from"./ReloadOutlined-a8f7fbcd.js";const r=v=>(P("data-v-d67680c9"),v=v(),Q(),v),G={class:"cus-animation",style:{height:"100%",width:"100%",padding:"16px 20px",display:"flex","flex-direction":"column"}},K={style:{display:"flex","justify-content":"space-between","align-items":"flex-end"}},X={style:{display:"flex"}},Y={style:{"text-align":"left"}},Z={key:0,style:{color:"green"}},ee=r(()=>e("span",null,"持续泵",-1)),te=[ee],oe={key:1,style:{color:"pink"}},ne=r(()=>e("span",null,"脉冲泵",-1)),ie=[ne],le={key:2,style:{color:"blue"}},ae=r(()=>e("span",null,"智能泵",-1)),se=[ae],de={key:3,style:{color:"pink"}},ce=r(()=>e("span",null,"化疗泵",-1)),_e=[ce],pe={key:4},ue=r(()=>e("span",{style:{color:"#dba7a7"}},"未知",-1)),re=[ue],fe=["onClick"],me=r(()=>e("a",{style:{"margin-left":"26px"}},"删除",-1)),he=O({__name:"Index",setup(v){const C=g(null),b=w({x:1300}),f=w({pageSize:20,current:1,size:"default",showSizeChanger:!0,showQuickJumper:!0,showTotal:function(n){return`共 ${n} 条数据`},onChange:function(n,d){console.log("111",n,d),this.current=n,this.pageSize=d,m()}}),S=g([]),y=g(!1),_=w({size:20,page:1,sort:"createtime",order:"desc",keyWord:"",mac:""}),m=()=>{y.value=!0,_.size=f.pageSize,_.page=f.current,I({url:"/device/search",data:_},n=>{console.log(n),f.total=n.total,S.value=n.data,y.value=!1})},N=function(){f.current=1,m()},D=V(),B=n=>{console.log(n),D.push("/"+J+"/device/detail/"+n.id)},R=n=>{console.log(n);const d={id:n.id};I({url:"/device/delete",data:d},h=>{console.log(h),L.info(h.msg),m()})};return E(()=>{var n;console.log("device onMounted..."),b.y=((n=C.value)==null?void 0:n.clientHeight)-113,m()}),(n,d)=>{const h=c("a-tooltip"),W=c("a-input"),$=c("a-form-item"),j=c("a-form"),a=c("a-table-column"),F=c("a-popconfirm"),M=c("a-table");return p(),u("div",G,[t(k(q),{title:"设备"}),e("div",K,[e("div",X,[t(j,{layout:"inline",model:_},{default:l(()=>[t($,null,{default:l(()=>[t(W,{allowClear:"",value:_.keyWord,"onUpdate:value":d[0]||(d[0]=o=>_.keyWord=o),placeholder:"请输入要查询的内容",style:{width:"280px"}},{suffix:l(()=>[t(h,{title:"点击搜索",onClick:N},{default:l(()=>[t(k(H),{style:{color:"rgba(0, 0, 0, 0.45)"}})]),_:1})]),_:1},8,["value"])]),_:1})]),_:1},8,["model"])]),e("div",null,[t(h,{onClick:m},{default:l(()=>[t(k(A),{style:{"font-size":"16px"},spin:y.value},null,8,["spin"])]),_:1})])]),e("div",{ref_key:"table_container",ref:C,style:{"margin-top":"9px","border-top":"1px solid #eee",display:"flex","flex-direction":"column",overflow:"hidden",height:"0px","flex-grow":"1"}},[t(M,{"data-source":S.value,pagination:f,scroll:b,bordered:!0,loading:y.value,size:"middle"},{default:l(()=>[t(a,{title:"序号",width:60,fixed:"left",align:"center"},{default:l(({index:o})=>[e("div",null,x(o+1),1)]),_:1}),t(a,{title:"设备编号","data-index":"id",width:180,fixed:"left"}),t(a,{title:"设备类型",width:100,fixed:"left"},{default:l(({record:o})=>{var i,s,z,T;return[e("div",Y,[((i=o.items)==null?void 0:i.pumpType)==1?(p(),u("div",Z,te)):((s=o.items)==null?void 0:s.pumpType)==2?(p(),u("div",oe,ie)):((z=o.items)==null?void 0:z.pumpType)==3?(p(),u("div",le,se)):((T=o.items)==null?void 0:T.pumpType)==4?(p(),u("div",de,_e)):(p(),u("div",pe,re))])]}),_:1}),t(a,{title:"住院号","data-index":"patientCode",width:120,fixed:"left"}),t(a,{title:"输注总量","data-index":"productName",width:80},{default:l(({record:o})=>{var i;return[e("div",null,[e("span",null,x((i=o.items)==null?void 0:i.totalDose),1)])]}),_:1}),t(a,{title:"持续量","data-index":"productName",width:80},{default:l(({record:o})=>{var i,s;return[e("div",null,[e("span",null,x((s=(i=o.items)==null?void 0:i.continueDose)==null?void 0:s.toFixed(1)),1)])]}),_:1}),t(a,{title:"已输入量","data-index":"productName",width:80},{default:l(({record:o})=>{var i,s;return[e("div",null,[e("span",null,x((s=(i=o.items)==null?void 0:i.finishDose)==null?void 0:s.toFixed(1)),1)])]}),_:1}),t(a,{title:"电量","data-index":"productName",width:80},{default:l(({record:o})=>{var i;return[e("div",null,[e("span",null,x((i=o.items)==null?void 0:i.electricity),1)])]}),_:1}),t(a,{title:"添加时间","data-index":"createTime",width:200}),t(a,{title:"最近更新时间","data-index":"updateTime",width:200,fixed:"right"}),t(a,{title:"操作",width:160,fixed:"right"},{default:l(({record:o})=>[e("div",null,[e("a",{style:{"margin-left":"0px"},onClick:i=>B(o)},"查看",8,fe),t(F,{title:"确定删除?",okText:"确定",cancelText:"取消",onConfirm:i=>R(o)},{default:l(()=>[me]),_:2},1032,["onConfirm"])])]),_:1})]),_:1},8,["data-source","pagination","scroll","loading"])],512)])}}});const we=U(he,[["__scopeId","data-v-d67680c9"]]);export{we as default};