1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-56e993f0"],{"365c":function(t,e,r){"use strict";r.d(e,"l",(function(){return n})),r.d(e,"e",(function(){return i})),r.d(e,"b",(function(){return o})),r.d(e,"n",(function(){return s})),r.d(e,"d",(function(){return l})),r.d(e,"k",(function(){return d})),r.d(e,"h",(function(){return c})),r.d(e,"g",(function(){return u})),r.d(e,"c",(function(){return h})),r.d(e,"i",(function(){return m})),r.d(e,"a",(function(){return p})),r.d(e,"o",(function(){return f})),r.d(e,"f",(function(){return g})),r.d(e,"j",(function(){return _})),r.d(e,"m",(function(){return b}));var a=r("b775"),n=function(t){return Object(a["a"])({url:"/goods/get_goods_sku_sales_value",method:"get",params:t})},i=function(t){return Object(a["a"])({url:"/goods/get_goods_sales_value",method:"get",params:t})},o=function(t){return Object(a["a"])({url:"/order/get_order_daily_sales",method:"get",params:t})},s=function(t){return Object(a["a"])({url:"/order/get_store_top10",method:"get",params:t})},l=function(t){return Object(a["a"])({url:"/index/index",method:"get",params:t})},d=function(t){return Object(a["a"])({url:"/index/get_warea_order_by",method:"get",params:t})},c=function(t){return Object(a["a"])({url:"/goods/get_province_sales_orderBy",method:"get",params:t})},u=function(t){return Object(a["a"])({url:"/index/get_province_sales_attr",method:"get",params:t})},h=function(t){return Object(a["a"])({url:"/goods/get_city_sales_orderBy",method:"get",params:t})},m=function(t){return Object(a["a"])({url:"/index/get_sale_info",method:"get",params:t})},p=function(t){return Object(a["a"])({url:"/index/all_order_by",method:"get",params:t})},f=function(t){return Object(a["a"])({url:"/index/yesterday_order_by",method:"get",params:t})},g=function(t){return Object(a["a"])({url:"/index/get_history_total",method:"get",params:t})},_=function(t){return Object(a["a"])({url:"/index/get_sku_history_num",method:"get",params:t})},b=function(t){return Object(a["a"])({url:"/index/get_sku_order_by",method:"get",params:t})}},9690:function(t,e,r){"use strict";r.r(e);var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("div",[r("el-date-picker",{attrs:{"value-format":"yyyy-MM-dd",format:"yyyy-MM-dd",type:"datetimerange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},on:{change:t.changeDate},model:{value:t.dateVal,callback:function(e){t.dateVal=e},expression:"dateVal"}})],1),r("div",{ref:"style_num_echart",staticStyle:{"margin-top":"20px"},style:{height:t.height,width:t.width}})])},n=[],i=r("1da1"),o=(r("96cf"),r("313e")),s=r("feb2"),l=r("365c"),d={mixins:[s["a"]],props:{width:{type:String,default:"600px"},height:{type:String,default:"600px"}},data:function(){return{chart:null,timeLineMap:[],lengedMap:[],accountMap:[],cotton:[],old:[],simple:[],super:[],dateVal:""}},created:function(){this.getData()},beforeDestroy:function(){this.chart&&(this.chart.dispose(),this.chart=null)},methods:{getDefault:function(){var t=new Date,e=t.getDate(),r=t.getMonth(),a=t.getDay(),n=a||7,i=this.formatDate(new Date(t.getFullYear(),r,e+1-n)),o=this.formatDate(new Date(t.getFullYear(),r,e+7-n));this.dateVal=[i,o],this.getData(i,o)},formatDate:function(t){var e=t.getFullYear(),r=t.getMonth()+1,a=t.getDate();return r<10&&(r="0"+r),a<10&&(a="0"+a),e+"-"+r+"-"+a},changeDate:function(){if(this.timeLineMap=[],this.cotton=[],this.old=[],this.simple=[],this.super=[],this.dateVal){var t=this.dateVal[0],e=this.dateVal[1];this.getData(t,e)}else this.getData()},getData:function(t,e){var r=this;return Object(i["a"])(regeneratorRuntime.mark((function a(){var n,i,o,s,d,c,u;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return n=r.$loading(),a.prev=1,a.next=4,Object(l["i"])({startdate:t,enddate:e});case 4:if(i=a.sent,o=i.code,s=i.data,n.close(),200===o){for(c in d=[],s)for(u in s[c])-1===r.timeLineMap.indexOf(u)&&(d.push(u),r.timeLineMap=d.sort()),"cotton"===c&&r.cotton.push(s[c][u].total),"old"===c&&r.old.push(s[c][u].total),"simple"===c&&r.simple.push(s[c][u].total),"super"===c&&r.super.push(s[c][u].total);r.initChart()}a.next=15;break;case 11:a.prev=11,a.t0=a["catch"](1),n.close(),console.log("".concat(a.t0));case 15:case"end":return a.stop()}}),a,null,[[1,11]])})))()},initChart:function(){var t=this;this.$nextTick((function(){t.chart=o["init"](t.$refs.style_num_echart),t.chart.clear(),t.chart.setOption({title:{text:"款式日销售数量"},tooltip:{trigger:"axis"},legend:{data:["精装版","简约版","老人版","纯棉老人版"]},dataZoom:[{type:"slider"},{type:"inside"}],xAxis:{type:"category",name:"日期",data:t.timeLineMap,axisLabel:{textStyle:{color:"#000"}}},yAxis:{type:"value",name:"数量",axisLabel:{textStyle:{color:"#000"}},axisLine:{show:!0}},series:[{data:t.super,type:"line",name:"精装版",stack:"总量",label:{show:!0,position:"top",color:"black"},barWidth:60,itemStyle:{normal:{color:"#9BCA63"}}},{data:t.simple,type:"line",name:"简约版",stack:"总量",label:{show:!0,position:"top",color:"black"},barWidth:60,itemStyle:{normal:{color:"#F4E001"}}},{data:t.old,type:"line",stack:"总量",name:"老人版",label:{show:!0,position:"top",color:"black"},barWidth:60,itemStyle:{normal:{color:"#D7504B"}}},{data:t.cotton,type:"line",stack:"总量",name:"纯棉老人版",label:{show:!0,position:"top",color:"black"},barWidth:60,itemStyle:{normal:{color:"#f00"}}}]}),window.onresize=t.chart.resize}))}}},c=d,u=r("2877"),h=Object(u["a"])(c,a,n,!1,null,null,null);e["default"]=h.exports},feb2:function(t,e,r){"use strict";var a=r("ed08");e["a"]={data:function(){return{$_sidebarElm:null}},mounted:function(){var t=this;this.__resizeHandler=Object(a["b"])((function(){t.chart&&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(){window.removeEventListener("resize",this.__resizeHandler),this.$_sidebarElm&&this.$_sidebarElm.removeEventListener("transitionend",this.$_sidebarResizeHandler)},methods:{$_sidebarResizeHandler:function(t){"width"===t.propertyName&&this.__resizeHandler()}}}}}]);
|