text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0c53d1"],{"3df0":function(t,e,i){"use strict";i.r(e);var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{ref:"operationChart",class:t.className,style:{height:t.height,width:t.width}})},n=[],r=i("24ce"),s=i.n(r);function o(t,e,i){var a,n,r,s,o,l=function l(){var h=+new Date-s;h<e&&h>0?a=setTimeout(l,e-h):(a=null,i||(o=t.apply(r,n),a||(r=n=null)))};return function(){for(var n=arguments.length,h=new Array(n),d=0;d<n;d++)h[d]=arguments[d];r=this,s=+new Date;var c=i&&!a;return a||(a=setTimeout(l,e)),c&&(o=t.apply(r,h),r=h=null),o}}i("6cbb");var l={props:{className:{type:String,default:"chart"},width:{type:String,default:"100%"},height:{type:String,default:"300px"},chartData:{type:Object,required:!0}},data:function(){return{chart:null,sidebarElm:null}},mounted:function(){var t=this;this.initChart(),this.autoResize&&(this.__resizeHandler=o(function(){t.chart&&(console.log(789),t.chart.resize())},100),window.addEventListener("resize",this.__resizeHandler)),this.sidebarElm=document.getElementsByClassName("sidebar-container")[0],this.sidebarElm&&this.sidebarElm.addEventListener("transitionend",this.sidebarResizeHandler)},beforeDestroy:function(){this.chart&&(this.autoResize&&window.removeEventListener("resize",this.__resizeHandler),this.sidebarElm&&this.sidebarElm.removeEventListener("transitionend",this.sidebarResizeHandler),this.chart.dispose(),this.chart=null)},methods:{sidebarResizeHandler:function(t){"width"===t.propertyName&&this.__resizeHandler()},setOptions:function(t){var e=t.time,i=t.inConcent,a=t.outConcent,n=t.ratio;this.chart=s.a.init(this.$refs.operationChart);var r={xAxis:[{type:"category",name:"时间",data:e,axisTick:{alignWithLabel:!0}}],yAxis:[{type:"value",name:"浓度"},{type:"value",name:"过滤效率 (%)",axisLabel:{show:!0,interval:"auto",formatter:"{value}%"},show:!0}],grid:{left:"3%",right:"8%",bottom:"3%",containLabel:!0},tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},legend:{data:["入口浓度","出口浓度","过滤效率"]},series:[{name:"入口浓度",itemStyle:{normal:{color:"#66CCFF"}},barWidth:"20%",type:"line",smooth:!0,data:i,animationDuration:1e3,animationEasing:"quadraticOut"},{name:"出口浓度",itemStyle:{normal:{color:"#9999FF"}},barWidth:"20%",type:"line",data:a,smooth:!0,animationDuration:1e3,animationEasing:"quadraticOut"},{name:"过滤效率",yAxisIndex:1,itemStyle:{normal:{color:function(t){return t.value>="0.85"?"red":"green"}}},barWidth:"20%",type:"line",data:n,smooth:!0,animationDuration:1e3,animationEasing:"quadraticOut"}],visualMap:{seriesIndex:2,show:!1,pieces:[{gte:0,lte:15,color:"red"},{gte:15,lte:100,color:"green"}]}};this.chart.setOption(r)},initChart:function(){this.chart=s.a.init(this.$el,"macarons"),this.setOptions(this.chartData)}},watch:{chartData:{deep:!0,handler:function(t){this.setOptions(t)}}}},h=l,d=i("6691"),c=Object(d["a"])(h,a,n,!1,null,null,null);e["default"]=c.exports}}]);