(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0f0c0e"],{"9e5a":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("Echart",{ref:"barChart",attrs:{id:t.id,options:t.options,height:t.height,width:t.width},on:{click:t.mapClick}})],1)},i=[],r=(a("d81d"),a("b0c0"),a("33de")),o={name:"mapechart",props:{id:{type:String,default:"barChart"},width:{type:String,default:"100%"},height:{type:String,default:"100px"},cdata:{type:Array,default:function(){return[]}}},data:function(){return{options:{}}},components:{Echart:r["a"]},watch:{cdata:{handler:function(t){this.resetOption(t)},immediate:!0,deep:!0}},methods:{mapClick:function(t){this.$emit("click",t)},resetOption:function(t){var e=t.map((function(t){return t.name}));this.options={tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},legend:{},grid:{left:"6%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"category",data:e,axisLabel:{interval:0,color:"#fff"}},yAxis:{type:"value",axisLine:{show:!0},minInterval:1,splitLine:{show:!1,lineStyle:{color:"#fff"}},axisLabel:{color:"#fff"},max:function(t){return t}},animationDurationUpdate:1e3,series:[{name:"捐献医院数月度统计",type:"line",data:t.map((function(t){return t.value})),universalTransition:!0,itemStyle:{normal:{label:{show:!0,position:"top",textStyle:{color:"#fff"}}}}}]}},startInterval:function(){var t=this,e=2e3;null!==this.intervalId&&clearInterval(this.intervalId),this.intervalId=setInterval((function(){t.reSelectMapRandomArea()}),e)},reSelectMapRandomArea:function(){var t=this,e=9;this.$nextTick((function(){var a=t.$refs.mapChart.chart,n=Math.floor(Math.random()*e);while(n===t.preSelectMapIndex||n>=e)n=Math.floor(Math.random()*e);a.dispatchAction({type:"mapUnSelect",seriesIndex:0,dataIndex:t.preSelectMapIndex}),a.dispatchAction({type:"showTip",seriesIndex:0,dataIndex:n}),a.dispatchAction({type:"mapSelect",seriesIndex:0,dataIndex:n}),t.preSelectMapIndex=n}))},handleMapRandomSelect:function(){var t=this;this.$nextTick((function(){var e=t.$refs.mapChart.chart,a=t;setTimeout((function(){a.reSelectMapRandomArea()}),0),e.on("mouseover",(function(t){clearInterval(a.intervalId),e.dispatchAction({type:"mapUnSelect",seriesIndex:0,dataIndex:a.preSelectMapIndex}),e.dispatchAction({type:"mapSelect",seriesIndex:0,dataIndex:t.dataIndex}),a.preSelectMapIndex=t.dataIndex})),e.on("globalout",(function(){a.reSelectMapRandomArea(),a.startInterval()})),t.startInterval()}))}}},c=o,l=a("2877"),d=Object(l["a"])(c,n,i,!1,null,null,null);e["default"]=d.exports}}]);