34.js 2.2 KB

1
  1. webpackJsonp([34],{IHCh:function(t,e,n){var o=n("R5ow");"string"==typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);n("rjj0")("53da499e",o,!0)},QHfB:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n("Pg0u"),r=n.n(o),a={data:function(){return{chartLine:null,chartBar:null,chartPie:null,chartScatter:null,proportion:null}},mounted:function(){this.initChartPie()},activated:function(){this.initChartPie()},methods:{initChartPie:function(){var t=this;this.$http({url:this.$http.adornUrl("/management/yearpigbase/outAndInProportion"),method:"get",params:this.$http.adornParams()}).then(function(e){var n=e.data;if(console.log(n.data),n&&0===n.code){t.proportion=n.data;var o={backgroundColor:"#2c343c",title:{text:"认养比例饼状图",left:"center",top:20,textStyle:{color:"#fff"}},tooltip:{trigger:"item",formatter:"{a} <br/>{b} : {c} ({d}%)"},visualMap:{show:!1,min:80,max:600,inRange:{colorLightness:[0,1]}},series:[{name:"访问来源",type:"pie",radius:"65%",center:["50%","55%"],data:[{value:t.proportion.notAdopted,name:"未认养 "+t.proportion.notAdopted+"头 "+t.proportion.notAdoptedPercent},{value:t.proportion.adopted,name:"已认养 "+t.proportion.adopted+"头 "+t.proportion.adoptedPercent}].sort(function(t,e){return t.value-e.value}),roseType:"radius",label:{normal:{textStyle:{color:"rgba(255, 255, 255, 0.8)"}}},labelLine:{normal:{lineStyle:{color:"rgba(255, 255, 255, 0.8)"},smooth:.2,length:10,length2:20}},itemStyle:{normal:{color:"#c23531",shadowBlur:200,shadowColor:"rgba(0, 0, 0, 0.5)"}},animationType:"scale",animationEasing:"elasticOut",animationDelay:function(t){return 200*Math.random()}}]};t.chartPie=r.a.init(document.getElementById("J_chartPieBox")),t.chartPie.setOption(o),window.addEventListener("resize",function(){t.chartPie.resize()})}else t.proportion=null})}}},i={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"in-and-out"},[e("el-card",[e("div",{staticClass:"chart-box",attrs:{id:"J_chartPieBox"}})])],1)},staticRenderFns:[]};var l=n("VU/8")(a,i,!1,function(t){n("IHCh")},null,null);e.default=l.exports},R5ow:function(t,e,n){(t.exports=n("FZ+f")(!1)).push([t.i,"\n.in-and-out .chart-box {\n min-height: 640px;\n}\n",""])}});