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