import{a5 as c,b as m,r as u,aA as f,o as g,c as b,bL as p,v as y}from"./index.8d733f79.js";import{b as _}from"./dashboard.62cdb0f4.js";const x={style:{flex:"1"}},C=y("div",{id:"alarmTrend_combine",style:{height:"100%",width:"100%"}},null,-1),L=[C],v=c({name:"AlarmTrend"}),E=Object.assign(v,{setup(A){const{t:e}=m();let a=null;const i={1:e("month1"),2:e("month2"),3:e("month3"),4:e("month4"),5:e("month5"),6:e("month6"),7:e("month7"),8:e("month8"),9:e("month9"),10:e("month10"),11:e("month11"),12:e("month12")},h=u(0);f(()=>{a&&(clearInterval(a),a=null)});function l(){_({}).then(t=>{h.value=t.data.total||0;const o=[],n=[];if(t.data)for(let r=0;r<t.data.length;r++){const s=t.data[r];o.push(i[s.month]),n.push(Number(s.alarmCount))}setTimeout(()=>{d(o,n)},0)}).catch(()=>{})}l(),a=setInterval(()=>{l()},10*60*1e3);function d(t,o){p.chart("alarmTrend_combine",{colors:["#3596FE"],title:{useHTML:!0,text:null,align:"left",x:-8,y:6,style:{color:"#A9C1E0",fontSize:"15px"}},time:{useUTC:!1},chart:{type:"areaspline",backgroundColor:"transparent",marginTop:20,marginRight:28,marginBottom:40,marginLeft:40},exporting:{enabled:!1},yAxis:{title:{text:null},lineColor:"rgba(255,255,255,0)",gridLineDashStyle:"ShortDash",gridLineColor:"rgba(255,255,255,0.2)",gridLineWidth:1,labels:{style:{color:"#93B3E0"}}},xAxis:{categories:t,gridLineDashStyle:"ShortDash",gridLineColor:"rgba(255,255,255,0.2)",lineColor:"#364A64",gridLineWidth:1,tickLength:4,labels:{y:16,style:{color:"#93B3E0",fontSize:"12px"}},crosshair:{color:"#93B3E0",dashStyle:"dash",width:1}},credits:{enabled:!1},legend:{enabled:!1},tooltip:{backgroundColor:"#004584",style:{color:"#EAF2FF"},borderColor:"#004584",shadow:!1,useHTML:!0,shared:!0,shape:"rect",formatter(){return`${this.x}: ${this.y}`}},plotOptions:{area:{fillOpacity:1,lineWidth:0,marker:{enabled:!1,states:{hover:{enabled:!0,radius:5}}},shadow:!1,states:{hover:{lineWidth:1}},threshold:null},series:{label:{connectorAllowed:!1},marker:{enabled:!1,lineWidth:0,lineColor:"#3596FE",width:0,height:0,symbol:"circle",radius:2}}},series:[{data:o,lineWidth:3,line:{smooth:!0},fillColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"rgba(27,172,255,0.4)"],[1,"rgba(27,172,255,0)"]]}}]})}return(t,o)=>(g(),b("div",x,L))}});export{E as default};
