(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-3209"],{fQHv:function(e,t,a){},k04T:function(e,t,a){"use strict";a.r(t);var i=a("QbLZ"),n=a.n(i),l=a("L2JU"),s=a("MT78"),o={data:function(){return{pickerOptions:{shortcuts:[{text:"本月",onClick:function(e){e.$emit("pick",[new Date,new Date])}},{text:"今年至今",onClick:function(e){var t=new Date,a=new Date((new Date).getFullYear(),0);e.$emit("pick",[a,t])}},{text:"最近六个月",onClick:function(e){var t=new Date,a=new Date;a.setMonth(a.getMonth()-6),e.$emit("pick",[a,t])}},{text:"最近一年",onClick:function(e){var t=new Date,a=new Date;a.setMonth(a.getMonth()-12),e.$emit("pick",[a,t])}},{text:"最近两年",onClick:function(e){var t=new Date,a=new Date;a.setMonth(a.getMonth()-24),e.$emit("pick",[a,t])}},{text:"最近三年",onClick:function(e){var t=new Date,a=new Date;a.setMonth(a.getMonth()-36),e.$emit("pick",[a,t])}}]},salesVolume:"2",TitlesDrawings:"",salesVolume_check:0,selectStateValue:"",selectionTimeValue:"",selectionTimeValue_check:0,productionName:[],production:[],selectionTime:[{value:"1",label:"前三个月"},{value:"2",label:"前六个月"},{value:"3",label:"前12个月"},{value:"4",label:"前二年"},{value:"5",label:"前三年"},{value:"6",label:"前四年"},{value:"7",label:"前五年"}],Warehouse:"",warehouse:[{value:"1",label:"一号仓库"},{value:"2",label:"二号仓库"}]}},computed:n()({},Object(l.b)(["sidebar","avatar","name","id"])),watch:{salesVolume:function(){this.getProductItemValue2(),this.changeTitlesDrawings()},selectionTimeValue:function(){this.getProductItemValue2()}},created:function(){this.changeTitlesDrawings()},methods:{changeTitlesDrawings:function(){"2"===this.salesVolume?this.TitlesDrawings="各产品销售数量占比":this.TitlesDrawings="各产品销售额占比"},getProductItemValue2:function(){var e=this;if(this.selectionTimeValue){"2"===this.salesVolume?this.salesVolume_check=0:this.salesVolume_check=1;var t=[];t[0]=["销售额_check",this.salesVolume_check],t[1]=["开始时间",this.selectionTimeValue[0]],t[2]=["结束时间",this.selectionTimeValue[1]];var a=this.CreateData("11","jy_产品占比分析_查询",t);this.ExecDatabase(a).then(function(t){if(e.production=[],e.productionName=[],t.data.length>0)for(var a=0;a<t.data.length;a++)e.productionName.push(t.data[a].产品名称),e.production.push({value:t.data[a].数值,name:t.data[a].产品名称})}).then(function(){e.drawLine2()})}},drawLine2:function(){this.myChart4=s.init(document.getElementById("myChart4")),this.myChart4.clear(),this.myChart4.setOption({tooltip:{trigger:"item",formatter:"{a} <br/>{b}: {c} ({d}%)"},legend:{orient:"vertical",top:1,left:1,data:this.productionName},series:[{name:"产品名称",type:"pie",radius:"50%",data:this.production}]})}}},c=(a("vtN2"),a("KHd+")),u=Object(c.a)(o,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-card",[a("el-radio",{attrs:{label:"1"},model:{value:e.salesVolume,callback:function(t){e.salesVolume=t},expression:"salesVolume"}},[e._v("销售额")]),e._v(" "),a("el-radio",{attrs:{label:"2"},model:{value:e.salesVolume,callback:function(t){e.salesVolume=t},expression:"salesVolume"}},[e._v("销售量")]),e._v(" "),a("el-date-picker",{staticStyle:{width:"260px"},attrs:{"picker-options":e.pickerOptions,"value-format":"yyyy-MM",type:"monthrange",align:"right",size:"small","unlink-panels":"","range-separator":"~","start-placeholder":"开始月份","end-placeholder":"结束月份"},model:{value:e.selectionTimeValue,callback:function(t){e.selectionTimeValue=t},expression:"selectionTimeValue"}}),e._v(" "),a("span",{staticStyle:{"margin-left":"200px","font-size":"20px","font-weight":"bold"}},[e._v(e._s(e.TitlesDrawings))]),e._v(" "),a("div",{staticStyle:{width:"1500px",height:"800px","text-align":"center"},attrs:{id:"myChart4"}})],1)],1)},[],!1,null,"9d503062",null);u.options.__file="ProportionOfProducts.vue";t.default=u.exports},vtN2:function(e,t,a){"use strict";var i=a("fQHv");a.n(i).a}}]);