1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-98090c98"],{"365c":function(t,e,n){"use strict";n.d(e,"l",(function(){return a})),n.d(e,"e",(function(){return i})),n.d(e,"b",(function(){return o})),n.d(e,"n",(function(){return s})),n.d(e,"d",(function(){return c})),n.d(e,"k",(function(){return l})),n.d(e,"h",(function(){return u})),n.d(e,"g",(function(){return d})),n.d(e,"c",(function(){return h})),n.d(e,"i",(function(){return m})),n.d(e,"a",(function(){return p})),n.d(e,"o",(function(){return f})),n.d(e,"f",(function(){return g})),n.d(e,"j",(function(){return _})),n.d(e,"m",(function(){return b}));var r=n("b775"),a=function(t){return Object(r["a"])({url:"/goods/get_goods_sku_sales_value",method:"get",params:t})},i=function(t){return Object(r["a"])({url:"/goods/get_goods_sales_value",method:"get",params:t})},o=function(t){return Object(r["a"])({url:"/order/get_order_daily_sales",method:"get",params:t})},s=function(t){return Object(r["a"])({url:"/order/get_store_top10",method:"get",params:t})},c=function(t){return Object(r["a"])({url:"/index/index",method:"get",params:t})},l=function(t){return Object(r["a"])({url:"/index/get_warea_order_by",method:"get",params:t})},u=function(t){return Object(r["a"])({url:"/goods/get_province_sales_orderBy",method:"get",params:t})},d=function(t){return Object(r["a"])({url:"/index/get_province_sales_attr",method:"get",params:t})},h=function(t){return Object(r["a"])({url:"/goods/get_city_sales_orderBy",method:"get",params:t})},m=function(t){return Object(r["a"])({url:"/index/get_sale_info",method:"get",params:t})},p=function(t){return Object(r["a"])({url:"/index/all_order_by",method:"get",params:t})},f=function(t){return Object(r["a"])({url:"/index/yesterday_order_by",method:"get",params:t})},g=function(t){return Object(r["a"])({url:"/index/get_history_total",method:"get",params:t})},_=function(t){return Object(r["a"])({url:"/index/get_sku_history_num",method:"get",params:t})},b=function(t){return Object(r["a"])({url:"/index/get_sku_order_by",method:"get",params:t})}},ebbe:function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",[n("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),n("div",{ref:"style_num_echart",staticStyle:{"margin-top":"20px"},style:{height:t.height,width:t.width}})])},a=[],i=n("1da1"),o=(n("96cf"),n("313e")),s=n("feb2"),c=n("365c"),l={mixins:[s["a"]],props:{width:{type:String,default:"600px"},height:{type:String,default:"600px"}},data:function(){return{chart:null,timeLineMap:[],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(),n=t.getMonth(),r=t.getDay(),a=r||7,i=this.formatDate(new Date(t.getFullYear(),n,e+1-a)),o=this.formatDate(new Date(t.getFullYear(),n,e+7-a));this.dateVal=[i,o],this.getData(i,o)},formatDate:function(t){var e=t.getFullYear(),n=t.getMonth()+1,r=t.getDate();return n<10&&(n="0"+n),r<10&&(r="0"+r),e+"-"+n+"-"+r},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 n=this;return Object(i["a"])(regeneratorRuntime.mark((function r(){var a,i,o,s,l,u,d;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return a=n.$loading(),r.prev=1,r.next=4,Object(c["i"])({startdate:t,enddate:e});case 4:if(i=r.sent,o=i.code,s=i.data,a.close(),200===o){for(u in l=[],s)for(d in s[u])-1===n.timeLineMap.indexOf(d)&&(l.push(d),n.timeLineMap=l.sort()),"cotton"===u&&n.cotton.push(s[u][d].account),"old"===u&&n.old.push(s[u][d].account),"simple"===u&&n.simple.push(s[u][d].account),"super"===u&&n.super.push(s[u][d].account);n.initChart()}r.next=15;break;case 11:r.prev=11,r.t0=r["catch"](1),a.close(),console.log("".concat(r.t0));case 15:case"end":return r.stop()}}),r,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}))}}},u=l,d=n("2877"),h=Object(d["a"])(u,r,a,!1,null,null,null);e["default"]=h.exports},feb2:function(t,e,n){"use strict";var r=n("ed08");e["a"]={data:function(){return{$_sidebarElm:null}},mounted:function(){var t=this;this.__resizeHandler=Object(r["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()}}}}}]);
|