(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-cc3be6b8"],{"0c3f":function(t,e,a){},"0fb6":function(t,e,a){},2627:function(t,e,a){"use strict";var n=a("0c3f"),i=a.n(n);i.a},"386d":function(t,e,a){"use strict";var n=a("cb7c"),i=a("83a1"),r=a("5f1b");a("214f")("search",1,function(t,e,a,s){return[function(a){var n=t(this),i=void 0==a?void 0:a[e];return void 0!==i?i.call(a,n):new RegExp(a)[e](String(n))},function(t){var e=s(a,t,this);if(e.done)return e.value;var o=n(t),l=String(this),c=o.lastIndex;i(c,0)||(o.lastIndex=0);var u=r(o,l);return i(o.lastIndex,c)||(o.lastIndex=c),null===u?-1:u.index}]})},5115:function(t,e,a){"use strict";var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{class:t.className,style:{height:t.height,width:t.width}})},i=[],r=(a("6b54"),a("313e")),s=a.n(r);function o(t,e,a){var n,i,r,s,o,l=function l(){var c=+new Date-s;c0?n=setTimeout(l,e-c):(n=null,a||(o=t.apply(r,i),n||(r=i=null)))};return function(){for(var i=arguments.length,c=new Array(i),u=0;u0&&void 0!==arguments[0]?arguments[0]:{},e=t.expectedData;this.chart.setOption({xAxis:{data:e.date,boundaryGap:!1,axisTick:{show:!1},axisLabel:{rotate:60}},grid:{left:10,right:10,bottom:20,top:30,containLabel:!0},tooltip:{trigger:"axis",axisPointer:{type:"cross"},padding:[5,10]},yAxis:{axisTick:{show:!1}},legend:{data:["expected"]},series:[{name:"每日新增",itemStyle:{normal:{color:"#FF005A",lineStyle:{color:"#FF005A",width:2}}},smooth:!0,type:"line",data:e.data,animationDuration:2800,animationEasing:"cubicInOut"}]})}}},u=c,d=a("2877"),h=Object(d["a"])(u,n,i,!1,null,null,null);e["a"]=h.exports},"69d9":function(t,e,a){"use strict";a("8e6e"),a("456d"),a("7f7f"),a("ac6a");var n=a("bd86");function i(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),a.push.apply(a,n)}return a}function r(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};return p["b"].get("profit",{params:t})}function m(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return p["b"].get("profit/statistics",{params:t})}function b(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return p["b"].get("profit/profitTotal",{params:t})}var v=a("873a"),g=a("323a"),_={name:"Index",components:{LineChart:o["a"],Pagination:d["a"],SearchForm:h["a"]},data:function(){return{pickerOptions:{shortcuts:[{text:"最近一周",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-6048e5),t.$emit("pick",[a,e])}},{text:"最近一个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-2592e6),t.$emit("pick",[a,e])}},{text:"最近三个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-7776e6),t.$emit("pick",[a,e])}}]},dateBetween:"",put_areas:[{id:"9999",name:"全部"}],search:[{field:"mobile",label:"手机号"},{field:"nickname",label:"昵称"},{type:"el-select",field:"area_id",label:"骑行区域",options:[{id:"",name:"全部"}]},{type:"el-select",field:"merchant_id",label:"商户",options:[{id:"",name:"全部"}]}],area_id:"9999",todayNewAdd:0,thisMonthTotal:0,profitTotal:0,tableData:[],profitData:[],page:null,first_blood:!0,activeName:"first",lineChartData:{expectedData:{data:[],date:[]}},merchant_data:{},merchant_id_show:!1,merchant_id:null}},mixins:[v["m"]],watch:{$route:{handler:function(){var t=Object(s["a"])(regeneratorRuntime.mark(function t(e){var a,n,i;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.autoPageSize(44,e);case 2:return t.next=4,Promise.all([f(e.query)]);case 4:a=t.sent,n=Object(r["a"])(a,1),i=n[0].data,this.profitData=i.data,this.page=i.meta;case 9:case"end":return t.stop()}},t,this)}));function e(e){return t.apply(this,arguments)}return e}(),immediate:!0}},created:function(){var t=Object(s["a"])(regeneratorRuntime.mark(function t(){var e,a,n,i,s,o,l,c,d,h,p,f,v,_,w,y=this;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Promise.all([Object(u["b"])({all:1})]);case 2:return e=t.sent,a=Object(r["a"])(e,1),n=a[0].data,this.put_areas.push.apply(this.put_areas,n),this.search[2].options.push.apply(this.search[2].options,n),t.next=9,Promise.all([b({area_id:"9999"})]);case 9:return i=t.sent,s=Object(r["a"])(i,1),o=s[0].data,this.profitTotal=o,t.next=15,Promise.all([m({area_id:"9999"})]);case 15:if(l=t.sent,c=Object(r["a"])(l,1),d=c[0].data,this.todayNewAdd=d.new_add_profit,this.thisMonthTotal=d.this_month_total_profit,this.tableData=d.profit_statistics,d.profit_statistics.map(function(t){y.lineChartData.expectedData.data.push(t.profit),y.lineChartData.expectedData.date.push(t.date)}),this.lineChartData.expectedData.data.reverse(),this.lineChartData.expectedData.date.reverse(),"administrator"!==this.$store.state.users.user.roles[0]){t.next=33;break}return this.merchant_id_show=!0,this.merchant_data={options:[{id:"",name:"全部"}]},t.next=29,Promise.all([Object(g["c"])({all:1})]);case 29:h=t.sent,p=Object(r["a"])(h,1),f=p[0].data,this.merchant_data.options.push.apply(this.merchant_data.options,f.data);case 33:if("administrator"!==this.$store.state.users.user.roles[0]){t.next=42;break}return t.next=36,Promise.all([Object(g["c"])({all:1})]);case 36:v=t.sent,_=Object(r["a"])(v,1),w=_[0].data,this.search[3].options.push.apply(this.search[3].options,w.data),t.next=43;break;case 42:this.search.splice(3,1);case 43:case"end":return t.stop()}},t,this)}));function e(){return t.apply(this,arguments)}return e}(),methods:{budata:function(t){t.length<15&&(t.push(0),this.budata(t))},SearchData:function(){var t=Object(s["a"])(regeneratorRuntime.mark(function t(){var e,a,n,i,s,o,l,c=this;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return this.lineChartData.expectedData.data=[],this.lineChartData.expectedData.date=[],e={area_id:this.area_id,merchant_id:this.merchant_id},null!==this.dateBetween&&(e={area_id:this.area_id,dateBetween:this.dateBetween,merchant_id:this.merchant_id}),t.next=6,Promise.all([b(e)]);case 6:return a=t.sent,n=Object(r["a"])(a,1),i=n[0].data,this.profitTotal=i,t.next=12,Promise.all([m(e)]);case 12:s=t.sent,o=Object(r["a"])(s,1),l=o[0].data,this.todayNewAdd=l.new_add_profit,this.thisMonthTotal=l.this_month_total_profit,this.tableData=l.profit_statistics,l.profit_statistics.map(function(t){c.lineChartData.expectedData.data.push(t.profit),c.lineChartData.expectedData.date.push(t.date)}),this.lineChartData.expectedData.data.reverse(),this.lineChartData.expectedData.date.reverse();case 21:case"end":return t.stop()}},t,this)}));function e(){return t.apply(this,arguments)}return e}(),handleClick:function(t,e){this.$router.push({path:this.$route.path+"#"})},tableRowClassName:function(t){t.row;var e=t.rowIndex;return 1===e?"warning-row":3===e?"success-row":""},exportExcel:function(){var t=c.a.utils.table_to_book(document.getElementById("table"));try{c.a.writeFile(t,"profit.xlsx")}catch(e){console.log(e,t),this.$message.error("导出失败请联系管理员")}}}},w=_,y=(a("2627"),a("2877")),x=Object(y["a"])(w,n,i,!1,null,"6af85bee",null);e["default"]=x.exports},"81df":function(t,e,a){"use strict";var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return t.page?a("el-pagination",t._b({ref:"page",attrs:{"page-sizes":t.pageSizes,"current-page":t.currentPage,"page-size":t.perPage,total:t.page.total,layout:t.layout,background:""},on:{"size-change":t.onSizeChange,"current-change":t.onChange,"update:currentPage":function(e){t.currentPage=e},"update:current-page":function(e){t.currentPage=e},"update:pageSize":function(e){t.perPage=e},"update:page-size":function(e){t.perPage=e}}},"el-pagination",t.$attrs,!1)):t._e()},i=[],r={name:"Pagination",data:function(){return{currentPage:1,perPage:10}},props:{page:Object,layout:{type:String,default:"total, prev, pager, next, sizes, jumper"},autoPush:{type:Boolean,default:!0}},computed:{pageSizes:function(){var t=[10,30,50,100,200],e=this.page.per_page;return-1===t.indexOf(e)?[this.page.per_page].concat(t):t}},methods:{push:function(){var t=Object.assign({},this.$route.query,{page:this.currentPage,per_page:this.perPage});this.$router.push({path:this.$route.path,query:t})},onSizeChange:function(t){this.$emit("size-change",t),this.autoPush&&(this.currentPage=1,this.push())},onChange:function(t){this.$emit("current-change",t),this.autoPush&&this.push()}},watch:{page:{handler:function(t){var e=this;t&&(this.currentPage=t.current_page,this.perPage=t.per_page,this.$nextTick(function(){e.$refs.page.internalCurrentPage=t.current_page}))},immediate:!0}}},s=r,o=a("2877"),l=Object(o["a"])(s,n,i,!1,null,"f691fd2e",null);e["a"]=l.exports},"83a1":function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t===1/e:t!=t&&e!=e}},cafd:function(t,e,a){"use strict";var n=a("0fb6"),i=a.n(n);i.a}}]); //# sourceMappingURL=chunk-cc3be6b8.6e043c7c.js.map