| 1 |
- import{d as G,r as d,u as H,j as p,b as h,c as o,f as l,e,M as Z,C as j,h as ee,v as te,x as i,D as W,F as O,w as oe,o as se,y as ne,k as A,z as le,E as q}from"./index-16aedc47.js";import{B as ie}from"./index-2c804440.js";import{P as ae}from"./index-4573f484.js";import{S as de}from"./index-2dad9477.js";import{C as ce}from"./index-188028a1.js";import{B as K}from"./index-8a614103.js";import{F as X}from"./index-a4e4d9e7.js";import{p as F}from"./index-45b71b48.js";import{C as re}from"./CusNavigation-8f3731b1.js";import{t as pe}from"./index-9c8b4e4e.js";import{T as ue}from"./index-05a06ecb.js";import{Q as ve}from"./Index-cb2d80ea.js";import{I as Y}from"./index-3075fd64.js";import{P as _e}from"./index-0810be85.js";import{s as me}from"./function-call-d61169bc.js";import"./index-2b121e0e.js";import"./use-scope-id-c38e64b2.js";import"./on-popup-reopen-b90101a6.js";import"./use-route-64216f9c.js";import"./constant-7967f80c.js";import"./axios-9cbf0d09.js";import"./vue-qrcode-reader-40aaedb2.js";import"./mount-component-060eea4b.js";const fe={style:{padding:"16px"}},he={style:{"background-color":"#eee","border-radius":"2.5rem",margin:"0px 5px"}},ye={style:{"margin-top":"16px",display:"flex"}},ge={style:{"flex-grow":"1"}},xe=e("div",{style:{width:"10px"}},null,-1),we={style:{"flex-grow":"1"}},be={style:{position:"fixed",width:"100vw",height:"100vh",top:"0",left:"0","z-index":"999999","background-color":"#ccc"}},ke={style:{display:"flex","justify-content":"space-between",padding:"0px 16px","margin-top":"10px"}},$e={style:{"font-weight":"bold"}},ze=e("span",null,"设备别名:",-1),Ce={key:0},je={key:1,style:{color:"#888"}},Se={style:{"margin-top":"10px",padding:"0px 10px"}},Ne={style:{"background-color":"#eee",padding:"10px 6px","border-radius":"10px"}},Pe={style:{display:"flex","justify-content":"space-between"}},Ve={style:{"font-weight":"bold"}},Be=e("span",null,"住院号:",-1),Ie={style:{display:"flex","justify-content":"space-between","font-size":"0.9rem",color:"#888","margin-top":"5px"}},Re={style:{"font-weight":"bold"}},Te={style:{"margin-top":"10px",padding:"0px 10px"}},De={style:{"background-color":"#eee",padding:"10px 6px","border-radius":"10px"}},Ee={style:{display:"flex","align-items":"center","line-height":"0"}},Fe={style:{"font-weight":"bold"}},Oe={style:{"margin-left":"5px"}},Je={style:{display:"flex","justify-content":"space-between","font-size":"0.9rem",color:"#888","margin-top":"5px"}},Le={style:{"font-weight":"bold"}},Me={style:{padding:"0px 16px","margin-top":"30px"}},Qe={style:{display:"flex"}},Ue={style:{width:"0px","flex-grow":"1",display:"flex"}},We=e("div",{style:{width:"0px","flex-grow":"1"}},[e("span",null,"总量")],-1),Ae={style:{width:"0px","flex-grow":"1"}},qe=e("span",null,"ml",-1),Ge={style:{width:"0px","flex-grow":"1",display:"flex"}},He=e("div",{style:{width:"0px","flex-grow":"1"}},[e("span",null,"已输入量")],-1),Ke={style:{width:"0px","flex-grow":"1"}},Xe=e("span",null,"ml",-1),Ye={style:{display:"flex","margin-top":"50px"}},Ze={style:{width:"0px","flex-grow":"1",display:"flex","justify-content":"center"}},et=e("div",{style:{"margin-left":"3px"}},"位置",-1),tt={key:1,style:{display:"flex",color:"#888"}},ot=e("div",{style:{"margin-left":"3px"}},"位置",-1),st={style:{width:"0px","flex-grow":"1",display:"flex","justify-content":"center"}},nt=e("div",{style:{"margin-left":"3px"}},"日志",-1),lt=G({__name:"Pump",props:{device:{type:Object,default:void 0}},setup(a){const $=d(""),y=d(!1),B=d(),z=c=>{console.log(c),y.value=!1,$.value=c[0]},D=()=>{y.value=!1},x=d(!1),w=()=>{y.value=!0,B.value.open()},E=()=>{},v=H(),b=c=>{console.log(c),v.push("/device/location/"+c)},k=c=>{console.log(c),v.push("/device/log/"+c)},S=d(!1),C=()=>{x.value=!0,S.value=!1},I=()=>{x.value=!0,S.value=!0};return(c,r)=>{var u,g,N,R,T,n,J,L,M,Q,U;const _=Y,t=X,s=K,m=_e,f=ue;return p(),h(O,null,[o(m,{show:x.value,"onUpdate:show":r[2]||(r[2]=P=>x.value=P),position:"top","close-on-click-overlay":!0},{default:l(()=>[e("div",fe,[e("div",he,[o(t,{style:{padding:"6px 16px",height:"44px","line-height":"25px","align-items":"center"},modelValue:$.value,"onUpdate:modelValue":r[0]||(r[0]=P=>$.value=P),size:"normal",clearable:""},Z({_:2},[S.value?{name:"right-icon",fn:l(()=>[e("div",null,[o(_,{name:"scan",size:"1.5rem",onClick:w})])]),key:"0"}:void 0]),1032,["modelValue"])]),e("div",ye,[e("div",ge,[o(s,{type:"warning",size:"normal",round:"",block:"",onClick:r[1]||(r[1]=()=>{x.value=!1})},{default:l(()=>[j("取消")]),_:1})]),xe,e("div",we,[o(s,{type:"primary",size:"normal",round:"",block:"",onClick:E},{default:l(()=>[j("确定")]),_:1})])])])]),_:1},8,["show"]),ee(e("div",be,[o(ve,{ref_key:"scanQR",ref:B,onSuccess:z,onClose:D},null,512)],512),[[te,y.value]]),e("div",null,[e("div",ke,[e("div",$e,[ze,(u=a.device)!=null&&u.data.name?(p(),h("span",Ce,i((g=a.device)==null?void 0:g.data.name.value),1)):(p(),h("span",je,"未命名"))]),e("div",null,[o(_,{name:"edit",color:"green",onClick:C})])]),e("div",Se,[e("div",Ne,[e("div",Pe,[e("div",Ve,[Be,e("span",null,i((N=a.device)==null?void 0:N.data.patientCode.value),1)]),e("div",null,[o(_,{name:"edit",color:"green",onClick:I})])]),e("div",Ie,[e("div",Re,[e("span",null,i((R=a.device)==null?void 0:R.username),1)]),e("div",null,[e("span",null,i((T=a.device)==null?void 0:T.modifytime),1)])])])]),e("div",Te,[e("div",De,[e("div",Ee,[e("div",Fe,[e("span",null,i((n=a.device)==null?void 0:n.mac),1)]),e("div",Oe,[o(f,{round:"",size:"medium",type:"success"},{default:l(()=>[j("在线")]),_:1})])]),e("div",Je,[e("div",Le,[e("span",null,i((J=a.device)==null?void 0:J.productName),1)]),e("div",null,[e("span",null,i((L=a.device)==null?void 0:L.createtime),1)])])])]),e("div",Me,[e("div",Qe,[e("div",Ue,[We,e("div",Ae,[e("span",null,i((M=a.device)==null?void 0:M.data.totalDose.value),1),qe])]),e("div",Ge,[He,e("div",Ke,[e("span",null,i((Q=a.device)==null?void 0:Q.data.finishDose.value),1),Xe])])])]),e("div",Ye,[e("div",Ze,[(U=a.device)!=null&&U.data.lat?(p(),h("div",{key:0,style:{display:"flex",color:"#000"},onClick:r[3]||(r[3]=W(P=>{var V;return b((V=a.device)==null?void 0:V.mac)},["stop"]))},[e("div",null,[o(_,{name:"static/images/icon-location2.png",size:"1.5rem"})]),et])):(p(),h("div",tt,[e("div",null,[o(_,{name:"static/images/icon-location2.png",size:"1.5rem"})]),ot]))]),e("div",st,[e("div",{style:{display:"flex",color:"#000"},onClick:r[4]||(r[4]=W(P=>{var V;return k((V=a.device)==null?void 0:V.mac)},["stop"]))},[e("div",null,[o(_,{name:"static/images/icon-log.png",size:"1.5rem"})]),nt])])])])],64)}}}),it={style:{display:"flex","flex-direction":"column",height:"100vh"}},at={style:{padding:"16px"}},dt={style:{"background-color":"#eee","border-radius":"2.5rem",margin:"0px 5px"}},ct={style:{"margin-top":"16px",display:"flex"}},rt={style:{"flex-grow":"1"}},pt=e("div",{style:{width:"10px"}},null,-1),ut={style:{"flex-grow":"1"}},vt={style:{padding:"16px"}},_t={style:{"margin-top":"10px"}},mt={class:"container",style:{"overflow-y":"auto","flex-grow":"1","background-color":"#F7F8FA"}},ft={style:{"text-align":"left"}},ht={style:{display:"flex","justify-content":"space-between","margin-bottom":"5px"}},yt={style:{color:"#000","font-weight":"bold","font-size":"1.1rem"}},gt=e("div",{style:{"font-size":"0.9rem"}},"设备编号",-1),xt={style:{display:"flex","justify-content":"space-between"}},wt={style:{"font-weight":"bold","font-size":"0.9rem",height:"31px"}},bt={style:{"text-align":"left"}},kt={style:{display:"flex","justify-content":"space-between","margin-bottom":"5px"}},$t={style:{color:"#000","font-weight":"bold","font-size":"1.1rem"}},zt={key:0,style:{"margin-left":"5px"}},Ct=e("span",null,"(",-1),jt=e("span",null,")",-1),St={style:{"font-size":"0.9rem"}},Nt={style:{display:"flex","justify-content":"space-between"}},Pt={style:{"font-weight":"bold","font-size":"0.9rem"}},Vt={style:{display:"flex",color:"#000"}},Bt=e("div",{style:{"margin-left":"3px","font-size":"1rem"}},"查看数据",-1),It={key:0},Rt={key:1,style:{"text-align":"center",padding:"20px",color:"#ccc"}},Tt=e("span",null,"暂无数据",-1),Dt=[Tt],io=G({__name:"Index",setup(a){const $=d(!1),y=d(!0),B=()=>{y.value=!y.value,$.value=!y.value,z.value.closePlusPopup()},z=d(),D=()=>{console.log("jjj"),I(),z.value.closeSearchPopup()},x=()=>{z.value.closeSearchPopup()},w=d(!1),E=()=>{console.log("onrefresh..."),console.log(w.value),c(),w.value=!1},v=d(),b=d(),k=d([]),S=t=>{var m;const s=(m=b.value)==null?void 0:m.model;for(let f=0;f<s.length;f++){const u=s[f];if(t==u.title)return u}},C=d(""),I=function(){var s;k.value=[];const t=(s=v.value)==null?void 0:s.data;for(const m in t){const f=S(m);if(Object.prototype.hasOwnProperty.call(t,m)&&f){const u=t[m],g={name:f.name,value:u.value,date:pe(u.time),model:f};C.value?JSON.stringify(g).includes(C.value)&&k.value.push(g):k.value.push(g)}}},c=async()=>{await F({url:"/device/search",data:{size:200,page:1,sort:"createtime",order:"desc",keyWord:_.value}}).then(t=>t.data[0].data?(v.value=t.data[0],v.value.data=JSON.parse(t.data[0].data),console.log(v.value),Promise.resolve(v.value)):(v.value={data:[]},Promise.reject("ok"))).then(t=>(console.log(t.productId),b.value?(console.log("else..........."),Promise.reject("ok")):(b.value={id:"",name:t.productName,model:[]},F({url:"/model/search",data:{size:200,page:1,sort:"code",order:"asc",productId:t.productId}})))).then(t=>(console.log(t),t.data.forEach(s=>{s.define=JSON.parse(s.define),b.value.model.push(s)}),F({url:"/model/searchCommon",data:{size:200,page:1,sort:"code",order:"asc"}}))).then(t=>{console.log(t),t.data.forEach(s=>{s.define=JSON.parse(s.define),b.value.model.push(s)})}).catch(t=>{t!="ok"&&(console.log(t),me(t))}),I()},r=H(),_=d("");return oe(()=>r.currentRoute.value.params,(t,s)=>{console.log("路由参数发生了变化",t,s),t.deviceId&&(_.value=t.deviceId,c())}),se(()=>{_.value=r.currentRoute.value.params.deviceId,c()}),(t,s)=>{const m=Y,f=X,u=K,g=ce,N=de,R=ae,T=ie;return p(),h("div",it,[o(ne(re),{ref_key:"cusNavigation",ref:z,gobackabled:"",title:"设备详情",searchabled:$.value,plusabled:""},{search:l(()=>[e("div",at,[e("div",dt,[o(f,{style:{padding:"6px 16px",height:"44px","line-height":"25px","align-items":"center"},modelValue:C.value,"onUpdate:modelValue":s[0]||(s[0]=n=>C.value=n),size:"normal",clearable:""},{"right-icon":l(()=>[e("div",null,[o(m,{name:"scan",size:"1.5rem"})])]),_:1},8,["modelValue"])]),e("div",ct,[e("div",rt,[o(u,{type:"primary",size:"normal",round:"",block:"",onClick:D},{default:l(()=>[j("搜索")]),_:1})]),pt,e("div",ut,[o(u,{type:"warning",size:"normal",round:"",block:"",onClick:x},{default:l(()=>[j("取消")]),_:1})])])])]),plus:l(()=>[e("div",vt,[e("div",_t,[o(u,{type:"primary",size:"normal",round:"",block:"",onClick:B},{default:l(()=>[j("切换布局")]),_:1})])])]),_:1},8,["searchabled"]),e("div",mt,[o(R,{style:{"min-height":"100%"},modelValue:w.value,"onUpdate:modelValue":s[1]||(s[1]=n=>w.value=n),onRefresh:E},{default:l(()=>[y.value?(p(),A(lt,{key:0,device:v.value},null,8,["device"])):(p(),h(O,{key:1},[o(N,{style:{"background-color":"#fff","margin-bottom":"10px"}},{default:l(()=>[o(g,{clickable:""},{default:l(()=>{var n;return[e("div",ft,[e("div",ht,[e("div",yt,[e("span",null,i(_.value),1)]),gt]),e("div",xt,[e("div",wt,[e("span",null,i((n=v.value)==null?void 0:n.modifytime),1)])])])]}),_:1})]),_:1}),(p(!0),h(O,null,le(k.value,n=>(p(),A(N,{style:{"background-color":"#fff","margin-bottom":"10px"}},{default:l(()=>[o(g,{clickable:""},{default:l(()=>[e("div",bt,[e("div",kt,[e("div",$t,[e("span",null,i(n.value),1),n.model.type=="enum"?(p(),h("span",zt,[Ct,e("span",null,i(n.model.define.range[n.value]),1),jt])):q("",!0)]),e("div",St,i(n.name),1)]),e("div",Nt,[e("div",Pt,[e("span",null,i(n.date),1)]),e("div",Vt,[e("div",null,[o(m,{name:"static/images/icon-check.png",size:"1.5rem"})]),Bt])])])]),_:2},1024)]),_:2},1024))),256)),e("div",null,[w.value?(p(),h("div",It)):k.value.length==0?(p(),h("div",Rt,Dt)):q("",!0)])],64))]),_:1},8,["modelValue"]),o(T,{target:".container",right:"5vw",bottom:"80px"})])])}}});export{io as default};
|