Index-2745c28d.js 9.2 KB

1
  1. import{d as Y,i as v,n as j,r as u,o as n,b as ee,w as l,c as e,C as f,e as o,t as c,v as R,y as i,f as $,F as te,M as H,E as N,D as B,G as le,H as L,I as U,p as oe,j as ae,J as se,_ as ne}from"./index-bed2942a.js";import{C as ie}from"./CusNavigation-b2e56c9f.js";import{p as b}from"./index-d139c558.js";import{R as de}from"./ReloadOutlined-a8f7fbcd.js";const ce={style:{overflow:"visible"}},ue=Y({__name:"Detail",setup(g,{expose:S}){const D=r=>{console.log(r),_.value=!1},_=v(!1),w=v(),I=r=>{_.value=!0,w.value=r},T=()=>{_.value=!1};return j(()=>{}),S({show:I,hidden:T}),(r,h)=>{const d=u("a-button"),m=u("a-modal");return n(),ee(m,{title:"设备日志",visible:_.value,"onUpdate:visible":h[0]||(h[0]=E=>_.value=E),maskClosable:!1,width:580,bodyStyle:{height:"500px",overflow:"auto",padding:"10px"}},{footer:l(()=>[e(d,{type:"primary",onClick:D},{default:l(()=>[f("知道了")]),_:1})]),default:l(()=>[o("pre",ce,c(w.value),1)]),_:1},8,["visible"])}}}),z=g=>(oe("data-v-5532da3b"),g=g(),ae(),g),pe={class:"cus-animation",style:{height:"100%",width:"100%",padding:"16px 20px",display:"flex","flex-direction":"column"}},_e={style:{display:"flex","justify-content":"space-between","align-items":"flex-end"}},re={style:{display:"flex"}},fe={style:{display:"flex","align-items":"center"}},ve=z(()=>o("span",{style:{"font-size":"16px","margin-right":"5px"}},"当前数据文件大小为",-1)),me={style:{"font-size":"16px","margin-right":"5px"}},ye=z(()=>o("span",{style:{"font-size":"16px"}},",可",-1)),he=z(()=>o("span",{style:{"font-size":"16px","margin-right":"5px"}},",删除",-1)),xe=z(()=>o("span",{style:{"font-size":"16px","margin-left":"5px"}},"前的数据",-1)),ge={style:{"margin-left":"50px"}},we={style:{"text-align":"center"}},ke={key:0},Ce={key:1},be={style:{"text-align":"center"}},ze={key:0},Se={key:1},De={style:{"white-space":"nowrap","text-overflow":"ellipsis",overflow:"hidden"}},Ie={style:{"white-space":"nowrap","text-overflow":"ellipsis",overflow:"hidden"}},Te={key:0,style:{color:"green"}},Ee={key:1,style:{color:"red"}},Pe={key:2,style:{color:"wheat"}},Re={key:0,style:{color:"grey"}},Be={key:1,style:{color:"green"}},Le={key:2,style:{color:"red"}},Ue={key:3,style:{color:"wheat"}},We={key:0,style:{color:"grey"}},Me={key:1,style:{color:"green"}},Oe={key:2,style:{color:"red"}},$e={key:3,style:{color:"wheat"}},He=["onClick"],Ne=z(()=>o("a",{style:{"margin-left":"26px"}},"删除",-1)),Ye=Y({__name:"Index",setup(g){const S=v(null),D=R({x:1300}),_=R({pageSize:20,current:1,size:"default",showQuickJumper:!0,showTotal:function(a){return`共 ${a} 条数据`},onChange:function(a,s){this.current=a,this.pageSize=s,m()}}),w=v([]),I=v(0),T=()=>{b({url:"/system/data-file-size"},a=>{console.log(a),I.value=a.data})},r=v("status"),h=v(!1),d=R({size:20,page:1,sort:"time",order:"desc",keyWord:void 0,status:void 0,deviceId:void 0,patientCode:void 0}),m=()=>{h.value=!0,d.size=_.pageSize,d.page=_.current,b({url:"/device-log/search",data:d},a=>{console.log(a),_.total=a.total,w.value=a.data,h.value=!1}),T()},E=function(){se(d)},F=function(){_.current=1,m()},W=v(null),V=a=>{var s;console.log(a),(s=W.value)==null||s.show(a)},J=a=>{console.log(a);const s={id:a.id};b({url:"/device-log/delete",data:s},y=>{console.log(y),B.info(y.msg),m()})},G=()=>{H.confirm({title:"确定清理数据?",icon:e(N),content:"操作耗时较长,且影响系统的正常运行,请在空闲时操作!",onOk(){b({url:"/system/vacuum"},a=>{console.log(a)})},onCancel(){}})},k=v(null),Q=()=>{if(console.log(k.value),!k.value){B.error("日期不能为空");return}H.confirm({title:"确定删除数据?",icon:e(N),content:"操作将会批量删除数据,且不可恢复,请谨慎操作!",onOk(){const a=le(k.value).format("YYYY-MM-DD HH:mm:ss");console.log(a),b({url:"/device-log/delete-batch",data:{date:a}},s=>{console.log(s),B.info("删除成功"),m()})},onCancel(){}})};return j(()=>{var a;D.y=((a=S.value)==null?void 0:a.clientHeight)-113,m()}),(a,s)=>{const y=u("a-select-option"),M=u("a-select"),C=u("a-form-item"),O=u("a-input"),P=u("a-button"),q=u("a-form"),A=u("a-date-picker"),x=u("a-tooltip"),p=u("a-table-column"),K=u("a-popconfirm"),X=u("a-table");return n(),i(te,null,[o("div",pe,[e($(ie),{title:"设备日志"}),o("div",_e,[o("div",re,[e(q,{layout:"inline",model:d},{default:l(()=>[e(C,null,{default:l(()=>[e(M,{ref:"select",value:r.value,"onUpdate:value":s[0]||(s[0]=t=>r.value=t),size:"default",style:{width:"100px"}},{default:l(()=>[e(y,{value:"status"},{default:l(()=>[f("处理状态")]),_:1}),e(y,{value:"deviceId"},{default:l(()=>[f("泵号")]),_:1}),e(y,{value:"patientCode"},{default:l(()=>[f("住院号")]),_:1})]),_:1},8,["value"])]),_:1}),L(e(C,null,{default:l(()=>[e(M,{placeholder:"请选择状态",value:d.status,"onUpdate:value":s[1]||(s[1]=t=>d.status=t),size:"default",allowClear:"",style:{width:"160px"}},{default:l(()=>[e(y,{value:1},{default:l(()=>[f("成功")]),_:1}),e(y,{value:2},{default:l(()=>[f("失败")]),_:1})]),_:1},8,["value"])]),_:1},512),[[U,r.value=="status"]]),L(e(C,null,{default:l(()=>[e(O,{allowClear:"",value:d.deviceId,"onUpdate:value":s[2]||(s[2]=t=>d.deviceId=t),placeholder:"请输入泵号",style:{width:"160px"}},null,8,["value"])]),_:1},512),[[U,r.value=="deviceId"]]),L(e(C,null,{default:l(()=>[e(O,{allowClear:"",value:d.patientCode,"onUpdate:value":s[3]||(s[3]=t=>d.patientCode=t),placeholder:"请输入住院号",style:{width:"160px"}},null,8,["value"])]),_:1},512),[[U,r.value=="patientCode"]]),e(C,null,{default:l(()=>[e(P,{size:"small",style:{"margin-right":"10px"},onClick:E},{default:l(()=>[f("重置")]),_:1}),e(P,{size:"small",type:"primary",onClick:F},{default:l(()=>[f("查询")]),_:1})]),_:1})]),_:1},8,["model"])]),o("div",fe,[o("div",null,[ve,o("span",me,c(I.value),1),ye,o("span",{style:{"font-size":"16px"}},[o("a",{onClick:G},"清理")]),he,e(A,{"show-time":"",style:{width:"195px"},value:k.value,"onUpdate:value":s[4]||(s[4]=t=>k.value=t)},null,8,["value"]),xe,e(P,{size:"small",type:"primary",style:{"margin-left":"10px"},onClick:Q},{default:l(()=>[f("删除")]),_:1})]),o("div",ge,[e(x,{onClick:m},{default:l(()=>[e($(de),{style:{"font-size":"20px"},spin:h.value},null,8,["spin"])]),_:1})])])]),o("div",{ref_key:"table_container",ref:S,style:{"margin-top":"9px","border-top":"1px solid #eee",display:"flex","flex-direction":"column",overflow:"hidden",height:"0px","flex-grow":"1"}},[e(X,{"data-source":w.value,pagination:_,scroll:D,bordered:!0,loading:h.value,size:"middle"},{default:l(()=>[e(p,{title:"序号",width:60,fixed:"left",align:"center"},{default:l(({index:t})=>[o("div",null,c(t+1),1)]),_:1}),e(p,{title:"编号","data-index":"id",width:200,fixed:"left",align:"center"}),e(p,{title:"来源",width:60,fixed:"left"},{default:l(({record:t})=>[o("div",null,[o("span",null,c(t.source),1)])]),_:1}),e(p,{title:"设备编号",width:150,fixed:"left"},{default:l(({record:t})=>[o("div",we,[t.deviceId?(n(),i("span",ke,c(t.deviceId),1)):(n(),i("span",Ce,"未知"))])]),_:1}),e(p,{title:"住院号",width:100,fixed:"left"},{default:l(({record:t})=>[o("div",be,[t.patientCode?(n(),i("span",ze,c(t.patientCode),1)):(n(),i("span",Se,"未知"))])]),_:1}),e(p,{title:"原始数据",width:180,ellipsis:!0},{default:l(({record:t})=>[e(x,{placement:"topLeft",mouseEnterDelay:.8,overlayStyle:{"max-width":"900px"}},{title:l(()=>[o("div",null,c(t.rawData),1)]),default:l(()=>[o("div",De,c(t.rawData),1)]),_:2},1024)]),_:1}),e(p,{title:"解析结果",width:200,ellipsis:!0},{default:l(({record:t})=>[e(x,{placement:"topLeft",mouseEnterDelay:.8,overlayStyle:{"max-width":"500px"}},{title:l(()=>[o("div",null,c(t.analysisResult),1)]),default:l(()=>[o("div",Ie,c(t.analysisResult),1)]),_:2},1024)]),_:1}),e(p,{title:"处理结果",width:80,ellipsis:!0},{default:l(({record:t})=>[e(x,{placement:"topLeft",mouseEnterDelay:.8,overlayStyle:{"max-width":"500px"}},{title:l(()=>[o("div",null,c(t.items),1)]),default:l(()=>[o("div",null,[t.status==1?(n(),i("span",Te,"成功")):t.status==2?(n(),i("span",Ee,"失败")):(n(),i("span",Pe,"未知"))])]),_:2},1024)]),_:1}),e(p,{title:"发送到PC端",width:100,ellipsis:!0},{default:l(({record:t})=>[e(x,{placement:"topLeft",mouseEnterDelay:.8,overlayStyle:{"max-width":"500px"}},{title:l(()=>[o("div",null,c(t.toPcResult),1)]),default:l(()=>[o("div",null,[t.isToPc==0?(n(),i("span",Re,"未存储")):t.isToPc==1?(n(),i("span",Be,"成功")):t.isToPc==2?(n(),i("span",Le,"失败")):(n(),i("span",Ue,"未知"))])]),_:2},1024)]),_:1}),e(p,{title:"发送到WEB端",width:100,ellipsis:!0},{default:l(({record:t})=>[e(x,{placement:"topLeft",mouseEnterDelay:.8,overlayStyle:{"max-width":"500px"}},{title:l(()=>[o("div",null,c(t.toWebResult),1)]),default:l(()=>[o("div",null,[t.isToWeb==0?(n(),i("span",We,"未发送")):t.isToWeb==1?(n(),i("span",Me,"成功")):t.isToWeb==2?(n(),i("span",Oe,"失败")):(n(),i("span",$e,"未知"))])]),_:2},1024)]),_:1}),e(p,{title:"添加时间","data-index":"createTime",width:200}),e(p,{title:"操作",width:160,fixed:"right"},{default:l(({record:t})=>[o("div",null,[o("a",{style:{"margin-left":"0px"},onClick:Z=>V(t)},"查看",8,He),e(K,{title:"确定删除?",okText:"确定",cancelText:"取消",onConfirm:Z=>J(t)},{default:l(()=>[Ne]),_:2},1032,["onConfirm"])])]),_:1})]),_:1},8,["data-source","pagination","scroll","loading"])],512)]),e(ue,{ref_key:"detailRef",ref:W},null,512)],64)}}});const Ge=ne(Ye,[["__scopeId","data-v-5532da3b"]]);export{Ge as default};