import{h as v}from"./system.1703796278973.js";import{L as m,i as x}from"./index.1703796278973314.js";import{d as u,k as f,m as y,p as g,o as S,x as b,z as s,A as w,u as L,V as A}from"./vue.1703796278973.js";import{_ as E}from"./_plugin-vue_export-helper.1703796278973.js";import"./comm.1703796278973.js";import"./index.17037962789732.js";import"./index.17037962789733.js";import"./dayjs.min.1703796278973.js";import"./isArray.1703796278973.js";import"./editor.api.1703796278973.js";import"./preload-helper.1703796278973.js";import"./monaco.contribution.1703796278973.js";import"./index.170379627897332.js";import"./index.170379627897315.js";import"./index.170379627897333.js";import"./index.170379627897334.js";import"./default.1703796278973.js";import"./permission.1703796278973.js";import"./consts.1703796278973.js";import"./404.1703796278973.js";const k={class:"environmental-curve"},C={class:"header"},I={class:"header-title"},z=u({name:"EnvironmentalCurve"}),B=u({...z,props:{typeId:{type:[Number],default:1921},cdata:{type:Object,default:()=>{}}},setup(n){const o=n,c=f({}),_=v();let r=null;const i=f("近期环境曲线"),l=(e=[],t=[])=>{var p,d;const a=c.value;if(a){r=x(a);const h={tooltip:{trigger:"axis"},xAxis:{type:"category",boundaryGap:!1},yAxis:{type:"value"},grid:{top:"10%",left:"3%",right:"4%",bottom:"8%",containLabel:!0},series:[{type:"line",name:((p=o.cdata)==null?void 0:p.propertyName)||"",smooth:.6,symbol:"none",lineStyle:{color:"#38B7FF",width:2},areaStyle:{color:new m(0,0,0,1,[{offset:0,color:"rgba(56, 183, 255, 0.8)"},{offset:1,color:"rgba(217, 217, 217, 0)"}])},data:((d=o.cdata)==null?void 0:d.data)||[]}]};A(()=>{r.setOption(h),window.addEventListener("resize",function(){r.resize()})})}};return y(()=>_.collapsed,e=>{setTimeout(()=>{r.resize()},300)}),y(()=>o.cdata,e=>{e!==void 0&&(e.data&&l(),e.xAxis&&(e.series.forEach(t=>{t.areaStyle&&t.areaStyle.colorList&&(t.areaStyle={color:new m(0,0,0,1,[{offset:0,color:t.areaStyle.colorList[0]},{offset:1,color:t.areaStyle.colorList[1]}])})}),r.setOption({xAxis:e.xAxis,series:e.series,legend:{}}),console.log("======value.series========",e)))},{immediate:!0}),g(()=>{l(),o.typeId==1201&&(i.value="近期烟雾报警曲线"),o.typeId==1211&&(i.value="近期空气质量监测"),o.typeId==1401&&(i.value="历史漏水趋势")}),(e,t)=>{var a;return S(),b("div",k,[s("div",C,[s("div",I,w(((a=n.cdata)==null?void 0:a.title)||L(i)),1)]),s("div",{ref_key:"chartRef",ref:c,style:{width:"100%","min-height":"100%"}},null,512)])}}});const Z=E(B,[["__scopeId","data-v-a7753452"]]);export{Z as default};
