modal.600c05df.js 1.9 KB

1
  1. var f=(p,r,o)=>new Promise((c,u)=>{var d=e=>{try{s(o.next(e))}catch(l){u(l)}},i=e=>{try{s(o.throw(e))}catch(l){u(l)}},s=e=>e.done?c(e.value):Promise.resolve(e.value).then(d,i);s((o=o.apply(p,r)).next())});import{a as _,B as F}from"./index.3ccc18ac.js";import{u as w}from"./useECharts.514ffc33.js";import{c as B}from"./busClinicApi.3d8324ac.js";import{a as I,r as t,o as b,Q as k,x as E,f as M,ag as R,R as S,h as m}from"./index.ae52ebae.js";import"./useWindowSizeFn.d176b3a5.js";import"./FullscreenOutlined.b9fd5be6.js";const P=I({__name:"modal",setup(p){const r=t("\u7535\u6C60\u7535\u91CF\u53D8\u52A8\u56FE"),o=t(null),c=t([]),u=t([]),d=t([]),i=t([]),s=t([]),e=t(),l=t("500px"),g=t("100%"),h={title:"\u7535\u6C60\u7535\u91CF\u6298\u7EBF\u56FE",legend:["\u7535\u91CF"]},[v,{setModalProps:C,closeModal:y}]=_(a=>f(this,null,function*(){C({confirmLoading:!1});const n=yield B({validCount:!1,inValidCount:!1,inputDose:!1,electricQuantity:!0,clinicId:a.clinicId,deviceId:a.deviceId,infusionId:a.history?a.infusionId:null});d.value=n.inputDose||[],c.value=n.inValidCount||[],u.value=n.validCount||[],i.value=n.uploadTimes||[],s.value=n.electricQuantity||[],e.value=i.value.length>10?80:0,D()}));function D(){const{setOptions:a}=w(o);a({tooltip:{trigger:"axis"},legend:{data:h.legend,left:"right"},grid:{left:"8%",right:"8%",bottom:"10%",containLabel:!0},xAxis:{type:"category",boundaryGap:!1,data:i.value},yAxis:{type:"value"},dataZoom:[{type:"inside",start:e.value,end:100},{start:e.value,end:100}],series:[{name:h.legend[0],type:"line",symbolSize:10,label:{show:!0,position:"top"},data:s.value||[]}]})}function x(){return f(this,null,function*(){y()})}return(a,n)=>(b(),k(m(F),S(a.$attrs,{destroyOnClose:"",onRegister:m(v),title:r.value,onOk:x,okText:"\u5173\u95ED",showCancelBtn:!1,width:1e3,height:500,canFullscreen:!1}),{default:E(()=>[M("div",{ref_key:"chartRef",ref:o,style:R({height:l.value,width:g.value})},null,4)]),_:1},16,["onRegister","title"]))}});export{P as default};