(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4642b82d"],{"0c9f":function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return i})),r.d(t,"d",(function(){return s})),r.d(t,"e",(function(){return c})),r.d(t,"f",(function(){return u})),r.d(t,"l",(function(){return l})),r.d(t,"g",(function(){return d})),r.d(t,"h",(function(){return p})),r.d(t,"i",(function(){return m})),r.d(t,"k",(function(){return h})),r.d(t,"j",(function(){return f}));var n=r("b775");function o(e){return Object(n["a"])({url:"/admin/statistics/product/data",method:"GET",params:e})}function a(e){return Object(n["a"])({url:"/admin/statistics/product/ranking",method:"GET",params:e})}function i(e){return Object(n["a"])({url:"/admin/statistics/product/trend",method:"GET",params:e})}function s(){return Object(n["a"])({url:"/admin/statistics/trade/data",method:"GET"})}function c(e){return Object(n["a"])({url:"/admin/statistics/trade/overview",method:"GET",params:e})}function u(e){return Object(n["a"])({url:"/admin/statistics/trade/trend",method:"GET",params:e})}function l(){return Object(n["a"])({url:"/admin/statistics/user/total/data",method:"GET"})}function d(){return Object(n["a"])({url:"/admin/statistics/user/area",method:"GET"})}function p(){return Object(n["a"])({url:"/admin/statistics/user/channel",method:"GET"})}function m(e){return Object(n["a"])({url:"/admin/statistics/user/overview",method:"GET",params:e})}function h(){return Object(n["a"])({url:"/admin/statistics/user/sex",method:"GET"})}function f(e){return Object(n["a"])({url:"/admin/statistics/user/overview/list",method:"GET",params:e})}},"1b16":function(e,t,r){},"2e83":function(e,t,r){"use strict";function n(e,t){t&&(e+=1462);var r=Date.parse(e);return(r-new Date(Date.UTC(1899,11,30)))/864e5}function o(e,t){for(var r={},o={s:{c:1e7,r:1e7},e:{c:0,r:0}},a=0;a!=e.length;++a)for(var i=0;i!=e[a].length;++i){o.s.r>a&&(o.s.r=a),o.s.c>i&&(o.s.c=i),o.e.r1?t:this.data.length),r,this.encoding)},a.toString=function(){return"[object Blob]"},a.close=function(){this.size=this.data.length=0},r}(e);e.Blob=function(e,r){var n=r&&r.type||"",o=new t;if(e)for(var a=0,i=e.length;a=0;--a){var i=this.tryEntries[a],s=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:U(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function m(e,t,r,n,o,a,i){try{var s=e[a](i),c=s.value}catch(u){return void r(u)}s.done?t(c):Promise.resolve(c).then(n,o)}function h(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function i(e){m(a,n,o,i,s,"next",e)}function s(e){m(a,n,o,i,s,"throw",e)}i(void 0)}))}}var f={name:"userInfo",components:{echartsNew:u["a"]},data:function(){return{spinShow:!1,grid:{xl:4,lg:8,md:12,sm:24,xs:24},userView:{},name:"近30天",fromList:this.$constants.timeList,dateLimit:"",dateLimitPram:"",pickerOptions:this.$timeOptions,timeVal:[],dataTime:"",optionData:{},style:{height:"375px"}}},created:function(){var e=new Date,t=new Date;t.setTime(t.getTime()-6048e5),this.timeVal=[t,e]},mounted:function(){this.dateLimit="lately7",this.dateLimitPram="lately7",this.getUserView(),this.getChannel()},methods:{checkPermi:l["a"],onSeach:function(){this.getUserView()},selectChange:function(e){""==e?(this.dateLimitPram="yesterday",this.getUserView()):(this.dateLimitPram=e,this.getUserView())},onchangeTime:function(e){this.timeVal=e,this.$set(this,"dateLimitPram",e?this.timeVal.join(","):"")},getUserView:function(){var e=this;Object(s["i"])({dateLimit:this.dateLimitPram}).then((function(t){e.userView=t}))},exports:function(){var e=h(p().mark((function e(){var t,r,n,o,a;return p().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=[],r=[],n=[],o="",e.next=3,this.getExcelData();case 3:a=e.sent,o||(o="用户统计表"),r.length||(r=a.filekey),t.length||(t=a.header),n=n.concat(a.exportData),Object(c["a"])(t,r,o,n);case 9:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),getExcelData:function(e){var t=this;return new Promise((function(e,r){Object(s["j"])({dateLimit:t.dateLimitPram}).then((function(t){var r=["日期/时间","活跃用户数","客单价","成交用户数量","下单用户数量","浏览量","成交金额","充值用户数","注册用户数"],n=["date","activeUserNum","customerPrice","orderPayUserNum","orderUserNum","pageviews","payOrderAmount","rechargeUserNum","registerNum"],o=new Array;o=t.map((function(e){return{date:e.date,activeUserNum:e.activeUserNum,customerPrice:e.customerPrice,orderPayUserNum:e.orderPayUserNum,orderUserNum:e.orderUserNum,pageviews:e.pageviews,payOrderAmount:e.payOrderAmount,rechargeUserNum:e.rechargeUserNum,registerNum:e.registerNum}})),e({header:r,filekey:n,exportData:o})}))}))},getChannel:function(){var e=this;Object(s["h"])().then((function(t){var r=new Array;r=[{name:"H5",value:0,channel:"h5"},{name:"APP",value:0,channel:"ios"},{name:"小程序",value:0,channel:"routine"},{name:"公众号",value:0,channel:"wechat"}];var n=new Array;r.forEach((function(e){t.forEach((function(t){e.channel==t.channel&&n.push({name:e.name,value:t.num?t.num:0,channel:t.channel})}))})),e.optionData={tooltip:{trigger:"item"},legend:{orient:"vertical",left:"right"},series:[{name:"访问来源",type:"pie",radius:["40%","70%"],avoidLabelOverlap:!1,label:{show:!1,position:"center"},itemStyle:{emphasis:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"},normal:{color:function(e){var t=["#1BBE6B","#1890FF","#EF9C20","#4BCAD5"];return t[e.dataIndex]}}},labelLine:{show:!1},data:n}]}}))}}},y=f,g=(r("4c07"),r("2877")),v=Object(g["a"])(y,a,i,!1,null,"5ceb4adc",null),w=v.exports,b=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("el-row",{attrs:{gutter:20}},[e.checkPermi(["admin:statistics:user:area"])?r("el-col",{attrs:{xs:24,sm:24,md:24,lg:18}},[r("el-card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[r("div",{staticClass:"acea-row row-between-wrapper"},[r("div",{staticClass:"header_title mb20"},[e._v("用户地域分布")])]),e._v(" "),r("el-row",[r("el-col",{attrs:{xs:24,sm:24,md:24,lg:10}},[r("div",{staticClass:"echarts"},[r("div",{ref:"myEchart",style:{height:"400px",width:"100%"}})])]),e._v(" "),r("el-col",{attrs:{xs:24,sm:24,md:24,lg:14}},[r("div",{staticClass:"tables"},[r("el-table",{attrs:{data:e.resdataList,"default-sort":{prop:"area",order:"descending"},"max-height":"400"}},e._l(e.columns1,(function(e,t){return r("el-table-column",{key:t,attrs:{label:e.title,prop:e.key,sortable:""}})})),1)],1)])],1)],1)],1):e._e(),e._v(" "),e.checkPermi(["admin:statistics:user:sex"])?r("el-col",{attrs:{xs:24,sm:24,md:24,lg:6}},[r("el-card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[r("div",{staticClass:"acea-row row-between-wrapper"},[r("div",{staticClass:"header_title mb20"},[e._v("用户性别比例")])]),e._v(" "),e.optionData?r("echarts-new",{attrs:{"option-data":e.optionSex,styles:e.style1,height:"100%",width:"100%"}}):e._e()],1)],1):e._e()],1)],1)},x=[],_=r("313e"),O=r.n(_),k=(r("3139"),{name:"userRegion",components:{echartsNew:u["a"]},props:{formInline:{type:Object,default:function(){return{channel_type:"",data:""}}}},data:function(){return{chart:null,resdata:[],resdataList:[],columns1:[{title:"TOP省份",key:"area"},{title:"支付金额",key:"payAmount",sortable:!0},{title:"成交用户数量",key:"payUserNum",sortable:!0},{title:"累计用户数量",key:"userNum",sortable:!0}],style:{height:"400px"},style1:{height:"400px"},optionData:{},optionSex:{}}},mounted:function(){this.getTrend(),this.getSource(),this.getSex()},beforeDestroy:function(){this.chart&&(this.chart.dispose(),this.chart=null)},methods:{checkPermi:l["a"],chinaConfigure:function(){var e=O.a.init(this.$refs.myEchart);window.onresize=e.resize,e.setOption({backgroundColor:"#fff",tooltip:{trigger:"item",formatter:function(e){return e.data?"地区:".concat(e.name,"
支付金额: ").concat(e.data.value,"
成交用户数量: ").concat(e.data.newNum,"
累计用户数量: ").concat(e.data.payPrice):"地区:".concat(e.name,"
支付金额: 0
成交用户数量: 0
累计用户数量: 0")}},dataRange:{show:!1,min:0,max:1e3,text:["High","Low"],realtime:!0,calculable:!0,color:["orangered","yellow","lightskyblue"]},geo:{map:"china",roam:!1,label:{normal:{show:!1,textStyle:{color:"rgba(0,0,0,0.4)"}}},itemStyle:{normal:{borderColor:"rgba(0, 0, 0, 0.2)"},emphasis:{areaColor:null,shadowOffsetX:0,shadowOffsetY:0,shadowBlur:10,borderWidth:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}},series:[{type:"scatter",zoom:1.2,aspectScale:1.75,coordinateSystem:"geo"},{type:"map",geoIndex:0,data:this.resdata}]})},getTrend:function(){var e=this;Object(s["g"])().then((function(t){e.resdataList=t,e.resdata=t.map((function(e){var t={};return t.name=e.area,t.value=e.payAmount,t.newNum=e.payUserNum,t.payPrice=e.userNum,t})),e.chinaConfigure()}))},getSource:function(){var e=this;Object(s["h"])().then((function(t){var r=new Array;r=[{name:"H5",value:0,channel:"h5"},{name:"APP",value:0,channel:"ios"},{name:"小程序",value:0,channel:"routine"},{name:"公众号",value:0,channel:"wechat"}];var n=new Array;r.forEach((function(e){t.forEach((function(t){e.channel==t.channel&&n.push({name:e.name,value:t.num?t.num:0,channel:t.channel})}))})),e.optionData={tooltip:{trigger:"item"},legend:{orient:"vertical",left:"right"},series:[{name:"访问来源",type:"pie",radius:["40%","70%"],avoidLabelOverlap:!1,label:{show:!1,position:"center"},itemStyle:{emphasis:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"},normal:{color:function(e){var t=["#F8C348","#1991FF","#40C9D3","#F94748","#854FF8"];return t[e.dataIndex]}}},labelLine:{show:!1},data:n}]}}))},getSex:function(){var e=this;Object(s["k"])().then((function(t){var r=new Array;r=[{name:"未知",value:"",sex:"0"},{name:"男",value:"",sex:"1"},{name:"女",value:"",sex:"2"},{name:"保密",value:"",sex:"3"}];var n=[];r.forEach((function(e){t.forEach((function(t){e.sex==t.sex&&n.push({name:e.name,value:t.num,sex:t.sex})}))})),e.optionSex={tooltip:{trigger:"item"},legend:{orient:"vertical",left:"right"},series:[{name:"用户性别",type:"pie",radius:"70%",itemStyle:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"},normal:{color:function(e){var t=["#1890FF","#EF9C20","#4BCAD5","#854FF8","#F94748"];return t[e.dataIndex]}}},labelLine:{show:!0},data:n}]}}))}}}),N=k,C=(r("faea"),Object(g["a"])(N,b,x,!1,null,"01d5a840",null)),j=C.exports,L=r("0f56"),P={components:{userInfo:w,userRegion:j,cardsData:L["a"]},data:function(){return{list:[],formInline:{channel_type:"",data:""}}},mounted:function(){this.getStatistics()},methods:{checkPermi:l["a"],getStatistics:function(){var e=this;Object(s["l"])().then((function(t){e.list=[{name:"累计用户数",icon:"iconleijiyonghushu",count:t.userNum,class:"one",color:"#1890FF"},{name:"累计充值人数",icon:"iconyonghu",count:t.rechargePeopleNum,class:"two",color:"#A277FF"},{name:"累计充值金额",icon:"iconchongzhijine",count:t.rechargeTotalAmount,class:"three",color:"#EF9C20"},{name:"累计消费金额",icon:"iconzhichujine1",count:t.consumptionAmount,class:"four",color:"#1BBE6B"}]}))}}},F=P,E=(r("7855"),Object(g["a"])(F,n,o,!1,null,"6681288e",null));t["default"]=E.exports},c80d:function(e,t,r){},faea:function(e,t,r){"use strict";r("75c0")}}]);