import{i as u}from"./index.1703796278973314.js";import{d as i,k as _,m as h,p as m,o as x,x as y,z as e,V as v,G as w,H as g,t as n}from"./vue.1703796278973.js";import{_ as S}from"./_plugin-vue_export-helper.1703796278973.js";const l=s=>(w("data-v-f44847de"),s=s(),g(),s),C={class:"temperature-sensor"},k=l(()=>e("div",{class:"header"},[e("div",null,[n(" 上限"),e("span",{style:{"font-size":"16px",color:"#fa3e2e"}},"40℃")]),e("div",null,[n(" 下限"),e("span",{style:{"font-size":"16px",color:"#4277ff"}},"0℃")])],-1)),T={class:"content"},b={class:"box",style:{"--w":"200px","--n":"40","--t":"8px","--d":"3deg","--c":"#15C646"}},z=l(()=>e("div",{class:"flag"},[e("span",null,"-20℃"),e("span",null,"60℃")],-1)),I=i({name:"TemperatureSensor"}),L=i({...I,props:{propertyData:{type:Object,default:()=>{}}},setup(s){const p=s,a=_({});let o=null;h(()=>p.propertyData,t=>{t&&t.value&&t.value.property&&o&&t.value.property=="temperature"&&o.setOption({series:[{data:[{value:t.value.value,name:"温度"}]}]})},{immediate:!0});const c=(t=[],d=[])=>{const r=a.value;if(r){o=u(r);const f={series:[{type:"gauge",startAngle:220,endAngle:320,min:0,max:80,progress:{show:!0,roundCap:!0,width:9,itemStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"blue"},{offset:1,color:"white"}],global:!1}}},pointer:{show:!1},axisLine:{roundCap:!0,lineStyle:{width:9}},axisTick:{show:!1},splitLine:{show:!1},axisLabel:{show:!1},title:{show:!0,offsetCenter:[0,"30%"],color:"#828282"},detail:{offsetCenter:[0,"0%"],formatter:"{value}℃"},data:[{value:0,name:"温度"}]}]};v(()=>{o.setOption(f),window.addEventListener("resize",function(){o.resize()})})}};return m(()=>{c()}),(t,d)=>(x(),y("div",C,[k,e("div",T,[e("div",b,[e("div",{ref_key:"chartRef",ref:a,style:{width:"200px","min-height":"200px"}},null,512)]),z])]))}});const A=S(L,[["__scopeId","data-v-f44847de"]]);export{A as default};
