require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/admin/statistics/index"],{1990:function(t,e,i){"use strict";i.r(e);var a=i("d5c4"),n=i("e5c9");for(var s in n)["default"].indexOf(s)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(s);i("41f4");var r=i("f0c5"),o=Object(r["a"])(n["default"],a["b"],a["c"],!1,null,null,null,!1,a["a"],void 0);e["default"]=o.exports},"318d":function(t,e,i){},"41f4":function(t,e,i){"use strict";var a=i("318d"),n=i.n(a);n.a},"81d0":function(t,e,i){"use strict";(function(t,e){var a=i("4ea4");i("248d");a(i("66fd"));var n=a(i("1990"));t.__webpack_require_UNI_MP_PLUGIN__=i,e(n.default)}).call(this,i("bc2e")["default"],i("543d")["createPage"])},c96a:function(t,e,i){"use strict";(function(t){var a=i("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(i("208d")),s=i("a27d"),r=null,o=(new Date).getFullYear(),h=(new Date).getMonth()+1,c=(new Date).getDate(),l={name:"Statistics",components:{uniCalendar:function(){Promise.all([i.e("pages/admin/common/vendor"),i.e("pages/admin/components/uni-calendar/uni-calendar")]).then(function(){return resolve(i("eca7"))}.bind(null,i)).catch(i.oe)}},props:{},data:function(){return{value:[[o,h,c-1],[o,h,c]],isrange:!0,weekSwitch:!1,ismulti:!1,monFirst:!0,clean:!1,lunar:!1,renderValues:[],monthRange:[],current:!1,where:{start:"",stop:"",type:""},types:"",time:"",title:"",growth_rate:"",increase_time:"",increase_time_status:"",time_price:"",loaded:!1,loading:!1,filter:{page:1,limit:10,start:"",stop:""},list:[],cWidth:"",cHeight:"",pixelRatio:1,textarea:"",LineA:{categories:["2012","2013","2014","2015","2016","2017"],series:[{data:[35,8,25,37,4,20]}]},info:{startDate:"",endDate:"",lunar:!1,range:!0,insert:!1,selected:[],showMonth:!1},type:"",before:"",after:""}},watch:{"$route.params":function(t){void 0!=t&&(this.setType(t.type),this.setTime(t.time),this.getIndex())}},onLoad:function(e){this.type=e.type,e.before&&(this.before=e.before),e.after&&(this.after=e.after),this.setType(e.type),this.setTime(e.time),this.cWidth=t.upx2px(690),this.cHeight=t.upx2px(500),this.getInfo()},computed:{monthRangeText:function(){return this.monthRange.length?this.$t("固定"):this.$t("指定范围")}},methods:{getIndex:function(){var t=[],e=[],i=this;(0,s.getStatisticsTime)(i.where).then((function(a){var n=a.data.chart,s=[],r=[];n.forEach((function(t){s.push(t.time),r.push(t.num)})),i.growth_rate=a.data.growth_rate,i.increase_time=a.data.increase_time,i.increase_time_status=a.data.increase_time_status,i.time_price=a.data.time,a.data.chart.forEach((function(i,a){t.push(i.time),e.push(i.num)})),i.LineA.categories=t,i.LineA.series[0].data=e,i.showLineA("canvasLineA",i.LineA)}),(function(t){i.$util.Tips({title:t})}))},setTime:function(t){this.time=t;var e=(new Date).getFullYear(),i=(new Date).getMonth()+1,a=(new Date).getDate();switch(this.list=[],this.filter.page=1,this.loaded=!1,this.loading=!1,t){case"today":this.where.start=new Date(Date.parse(e+"/"+i+"/"+a)).getTime()/1e3,this.where.stop=new Date(Date.parse(e+"/"+i+"/"+a)).getTime()/1e3+86400-1,this.title=this.$t("今天"),this.getIndex(),this.getInfo();break;case"yesterday":this.where.start=new Date(Date.parse(e+"/"+i+"/"+a)).getTime()/1e3-86400,this.where.stop=new Date(Date.parse(e+"/"+i+"/"+a)).getTime()/1e3-1,this.title=this.$t("昨天"),this.getIndex(),this.getInfo();break;case"month":this.where.start=new Date(e,(new Date).getMonth(),1).getTime()/1e3,this.where.stop=new Date(e,i,1).getTime()/1e3-1,this.title=this.$t("本月"),this.getIndex(),this.getInfo();break;case"seven":this.where.start=new Date(Date.parse(e+"/"+i+"/"+a)).getTime()/1e3+86400-604800,this.where.stop=new Date(Date.parse(e+"/"+i+"/"+a)).getTime()/1e3+86400-1,this.title=this.$t("最近7天"),this.getIndex(),this.getInfo();break;case"date":var n=this.before.split("-"),s=this.after.split("-"),r=this.getTimestamp(n[0],n[1],n[2],0,0,0),o=this.getTimestamp(s[0],s[1],s[2],23,59,59);this.where.start=r,this.where.stop=o,Promise.all([this.getIndex(),this.getInfo()]);break}},getTimestamp:function(t,e,i,a,n,s){return new Date(t,e-1,i,a,n,s).getTime()/1e3},setType:function(t){switch(t){case"price":this.where.type=1;break;case"order":this.where.type=2;break}},dateTitle:function(){t.navigateTo({url:"/pages/admin/custom_date/index?type="+this.type})},close:function(){this.current=!1},getInfo:function(){var t=this;t.loading||t.loaded||(t.loading=!0,t.filter.start=t.where.start,t.filter.stop=t.where.stop,(0,s.getStatisticsMonth)(t.filter).then((function(e){t.loading=!1,t.loaded=e.data.length