(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-6f68"],{"1zuz":function(t,e,a){},"42nD":function(t,e,a){"use strict";var n=a("1zuz");a.n(n).a},vjVw:function(t,e,a){"use strict";a.r(e);var n=a("QbLZ"),i=a.n(n),r=a("L2JU"),s=a("MT78"),d={data:function(){return{dateRange:"",TitlesDrawings:"",product:[],productValue:"",yName:"",selectionProductValue:"",selectionProduct:[]}},computed:i()({},Object(r.b)(["sidebar","avatar","name","id"])),created:function(){this.getTreeData(),this.changeTitlesDrawings()},methods:{getTreeData:function(){var t=this,e=[];e[0]=["子节点",0];var a=this.CreateData("11","产品关系_查询节点",e);this.ExecDatabase(a).then(function(e){var a=e.data;t.product=t.tree(a,0)})},tree:function(t,e){for(var a=[],n=void 0,i=0;i<t.length;i++)if(t[i].父节点===e){var r={label:t[i].节点名称,value:t[i].子节点};(n=this.tree(t,t[i].子节点)).length>0&&(r.children=n),a.push(r)}return a},getData:function(t){this.productValue=t[t.length-1],this.getProductItemValue1()},changeTitlesDrawings:function(){this.TitlesDrawings="产品定价分析图",this.yName="销\n售\n额"},getProduct:function(){var t=this,e=this.CreateData("11","数据分析_产品信息_基础表_查询数据",[]);this.ExecDatabase(e).then(function(e){for(var a=0;a<e.data.length;a++)t.selectionProduct.push({label:e.data[a].产品名称,value:e.data[a].产品流水号})})},getProductItemValue1:function(){var t=this;if(this.productValue){var e=void 0;console.log(this.dateRange,123),this.dateRange?e=1:(e=0,this.dateRange=""),console.log(e,234);var a=[];a[0]=["选择产品",this.productValue],a[1]=["时间_check",e],a[2]=["开始时间",this.dateRange[0]],a[3]=["结束时间",this.dateRange[1]];var n=this.CreateData("11","jy_产品定价分析_查询",a);this.ExecDatabase(n).then(function(e){if(t.xdata=[],t.y1data=[],e.data.length>0)for(var a=0;a<e.data.length;a++)t.xdata.push(e.data[a].单价),t.downdate||(t.downdate=0),t.y1data.push(e.data[a].销售额)}).then(function(e){t.drawLine1()})}else this.$message.warning("请先选择产品")},drawLine1:function(){this.myChart1=s.init(document.getElementById("myChart1")),this.myChart1.clear();var t=this;this.myChart1.setOption({xAxis:[{axisLabel:{interval:0,rotate:0,formatter:function(t){return t.split(" ").join("\n")}},name:"单价",type:"category",data:this.xdata,nameLocation:"middle",nameTextStyle:{padding:[20,0,0,0]}}],yAxis:[{name:this.yName,type:"value",nameTextStyle:{padding:[10,135,-180,20]},max:function(e){return t.update>e.max?(1.2*t.update).toFixed(2):(1.2*e.max).toFixed(2)}}],series:[{markLine:{lineStyle:{normal:{type:"dashed"}}},label:{show:!0},data:this.y1data,type:"line"}],grid:{left:"3%",right:"5%",bottom:"8%",containLabel:!0}})}}},l=(a("42nD"),a("KHd+")),o=Object(l.a)(d,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",[a("el-cascader",{ref:"cascader",attrs:{options:t.product,"show-all-levels":!1,placeholder:"产品名称",clearable:"",size:"small"},on:{clear:t.clearData,change:t.getData}}),t._v(" "),a("el-date-picker",{staticStyle:{width:"260px"},attrs:{size:"small",type:"daterange",align:"center","value-format":"yyyy-MM-dd",format:"yyyy-MM-dd","range-separator":"～","start-placeholder":"开始日期","end-placeholder":"结束日期"},on:{change:function(e){t.getProductItemValue1()}},model:{value:t.dateRange,callback:function(e){t.dateRange=e},expression:"dateRange"}}),t._v(" "),a("span",{staticStyle:{"margin-left":"200px","font-size":"20px","font-weight":"bold"}},[t._v(t._s(t.TitlesDrawings))]),t._v(" "),a("div",{staticStyle:{width:"1500px",height:"820px","text-align":"center"},attrs:{id:"myChart1"}})],1)],1)},[],!1,null,"42428d96",null);o.options.__file="ProductPricing.vue";e.default=o.exports}}]);