easypay-admin/crmebadmin/static/js/chunk-45d58813.c8ec3702.js
2023-12-20 21:43:49 +08:00

1 line
48 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-45d58813"],{"0278":function(t,e,r){},"0c9f":function(t,e,r){"use strict";r.d(e,"a",(function(){return i})),r.d(e,"b",(function(){return a})),r.d(e,"c",(function(){return o})),r.d(e,"d",(function(){return s})),r.d(e,"e",(function(){return c})),r.d(e,"f",(function(){return u})),r.d(e,"l",(function(){return l})),r.d(e,"g",(function(){return h})),r.d(e,"h",(function(){return d})),r.d(e,"i",(function(){return f})),r.d(e,"k",(function(){return m})),r.d(e,"j",(function(){return p}));var n=r("b775");function i(t){return Object(n["a"])({url:"/admin/statistics/product/data",method:"GET",params:t})}function a(t){return Object(n["a"])({url:"/admin/statistics/product/ranking",method:"GET",params:t})}function o(t){return Object(n["a"])({url:"/admin/statistics/product/trend",method:"GET",params:t})}function s(){return Object(n["a"])({url:"/admin/statistics/trade/data",method:"GET"})}function c(t){return Object(n["a"])({url:"/admin/statistics/trade/overview",method:"GET",params:t})}function u(t){return Object(n["a"])({url:"/admin/statistics/trade/trend",method:"GET",params:t})}function l(){return Object(n["a"])({url:"/admin/statistics/user/total/data",method:"GET"})}function h(){return Object(n["a"])({url:"/admin/statistics/user/area",method:"GET"})}function d(){return Object(n["a"])({url:"/admin/statistics/user/channel",method:"GET"})}function f(t){return Object(n["a"])({url:"/admin/statistics/user/overview",method:"GET",params:t})}function m(){return Object(n["a"])({url:"/admin/statistics/user/sex",method:"GET"})}function p(t){return Object(n["a"])({url:"/admin/statistics/user/overview/list",method:"GET",params:t})}},"1b0e":function(t,e,r){"use strict";r("6d88")},"1e74":function(t,e,r){"use strict";r("46fc")},"2df1":function(t,e,r){},"2f0d":function(t,e,r){"use strict";r("2df1")},"3ef3":function(t,e,r){"use strict";r("6c7f")},"46fc":function(t,e,r){},"6c7f":function(t,e,r){},"6d88":function(t,e,r){},"80d1":function(t,e,r){"use strict";r("0278")},9406:function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[t.checkPermi(["admin:statistics:home:index"])?r("base-info",{ref:"baseInfo"}):t._e(),t._v(" "),r("grid-menu",{staticClass:"mb20"}),t._v(" "),r("user-overview"),t._v(" "),r("visit-chart",{ref:"visitChart"}),t._v(" "),t.checkPermi(["admin:statistics:home:chart:user"])?r("user-chart",{ref:"userChart",staticClass:"mb20"}):t._e()],1)},i=[],a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"divBox",staticStyle:{"padding-bottom":"0"}},[r("el-row",{staticClass:"baseInfo",attrs:{gutter:20}},[r("el-col",t._b({staticClass:"ivu-mb"},"el-col",t.grid,!1),[r("el-card",{attrs:{bordered:!1,"dis-hover":"",padding:12}},[r("div",{staticClass:"acea-row row-between-wrapper"},[r("div",{staticClass:"acea-row align-center"},[r("span",{staticClass:"main_tit"},[t._v("销售额")])]),t._v(" "),r("el-tag",{attrs:{type:"primary"}},[t._v("今日")])],1),t._v(" "),t.viewData?r("div",{staticClass:"content"},[r("span",{staticClass:"content-number spBlock my15"},[t._v(t._s(t.viewData.sales))]),t._v(" "),r("el-divider"),t._v(" "),r("div",{staticClass:"acea-row row-between-wrapper"},[r("span",{staticClass:"content-time"},[t._v("昨日数据")]),t._v(" "),r("span",{staticClass:"content-time"},[t._v(t._s(t.viewData.yesterdaySales)+" 元")])])],1):t._e()])],1),t._v(" "),r("el-col",t._b({staticClass:"ivu-mb"},"el-col",t.grid,!1),[r("el-card",{attrs:{bordered:!1,"dis-hover":"",padding:12}},[r("div",{staticClass:"acea-row row-between-wrapper"},[r("div",{staticClass:"acea-row align-center"},[r("span",{staticClass:"main_tit"},[t._v("用户访问量")])]),t._v(" "),r("el-tag",{attrs:{type:"primary"}},[t._v("今日")])],1),t._v(" "),t.viewData?r("div",{staticClass:"content"},[r("span",{staticClass:"content-number spBlock my15"},[t._v(t._s(t.viewData.pageviews))]),t._v(" "),r("el-divider"),t._v(" "),r("div",{staticClass:"acea-row row-between-wrapper"},[r("span",{staticClass:"content-time"},[t._v("昨日数据")]),t._v(" "),r("span",{staticClass:"content-time"},[t._v(t._s(t.viewData.yesterdayPageviews))])])],1):t._e()])],1),t._v(" "),r("el-col",t._b({staticClass:"ivu-mb"},"el-col",t.grid,!1),[r("el-card",{attrs:{bordered:!1,"dis-hover":"",padding:12}},[r("div",{staticClass:"acea-row row-between-wrapper"},[r("div",{staticClass:"acea-row align-center"},[r("span",{staticClass:"main_tit"},[t._v("订单量")])]),t._v(" "),r("el-tag",{attrs:{type:"primary"}},[t._v("今日")])],1),t._v(" "),t.viewData?r("div",{staticClass:"content"},[r("span",{staticClass:"content-number spBlock my15"},[t._v(t._s(t.viewData.orderNum))]),t._v(" "),r("el-divider"),t._v(" "),r("div",{staticClass:"acea-row row-between-wrapper"},[r("span",{staticClass:"content-time"},[t._v("昨日数据")]),t._v(" "),r("span",{staticClass:"content-time"},[t._v(t._s(t.viewData.yesterdayOrderNum)+"单")])])],1):t._e()])],1),t._v(" "),r("el-col",t._b({staticClass:"ivu-mb"},"el-col",t.grid,!1),[r("el-card",{attrs:{bordered:!1,"dis-hover":"",padding:12}},[r("div",{staticClass:"acea-row row-between-wrapper"},[r("div",{staticClass:"acea-row align-center"},[r("span",{staticClass:"main_tit"},[t._v("新增用户")])]),t._v(" "),r("el-tag",{attrs:{type:"primary"}},[t._v("今日")])],1),t._v(" "),t.viewData?r("div",{staticClass:"content"},[r("span",{staticClass:"content-number spBlock my15"},[t._v(t._s(t.viewData.newUserNum))]),t._v(" "),r("el-divider"),t._v(" "),r("div",{staticClass:"acea-row row-between-wrapper"},[r("span",{staticClass:"content-time"},[t._v("昨日数据")]),t._v(" "),r("span",{staticClass:"content-time"},[t._v(t._s(t.viewData.yesterdayNewUserNum)+" 人")])])],1):t._e()])],1)],1)],1)},o=[],s=r("b775");function c(){return Object(s["a"])({url:"/admin/statistics/home/index",method:"GET"})}function u(){return Object(s["a"])({url:"/admin/statistics/home/chart/user",method:"get"})}function l(){return Object(s["a"])({url:"/admin/statistics/home/chart/order",method:"get"})}function h(){return Object(s["a"])({url:"/admin/statistics/home/chart/order/month",method:"get"})}function d(){return Object(s["a"])({url:"/admin/statistics/home/chart/order/week",method:"get"})}function f(){return Object(s["a"])({url:"/admin/statistics/home/chart/order/year",method:"get"})}function m(){return Object(s["a"])({url:"/admin/statistics/home/operating/data",method:"get"})}function p(t){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p(t)}function v(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */v=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var a=e&&e.prototype instanceof w?e:w,o=Object.create(a.prototype),s=new N(n||[]);return i(o,"_invoke",{value:k(t,r,s)}),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var d="suspendedStart",f="suspendedYield",m="executing",y="completed",g={};function w(){}function b(){}function _(){}var x={};u(x,o,(function(){return this}));var C=Object.getPrototypeOf,L=C&&C(C(F([])));L&&L!==r&&n.call(L,o)&&(x=L);var E=_.prototype=w.prototype=Object.create(x);function O(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function D(t,e){function r(i,a,o,s){var c=h(t[i],t,a);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==p(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,o,s)}),(function(t){r("throw",t,o,s)})):e.resolve(l).then((function(t){u.value=t,o(u)}),(function(t){return r("throw",t,o,s)}))}s(c.arg)}var a;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return a=a?a.then(i,i):i()}})}function k(e,r,n){var i=d;return function(a,o){if(i===m)throw new Error("Generator is already running");if(i===y){if("throw"===a)throw o;return{value:t,done:!0}}for(n.method=a,n.arg=o;;){var s=n.delegate;if(s){var c=S(s,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var u=h(e,r,n);if("normal"===u.type){if(i=n.done?y:f,u.arg===g)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(i=y,n.method="throw",n.arg=u.arg)}}}function S(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(i,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var o=a.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function F(e){if(e||""===e){var r=e[o];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(p(e)+" is not iterable")}return b.prototype=_,i(E,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:b,configurable:!0}),b.displayName=u(_,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,u(t,c,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},O(D.prototype),u(D.prototype,s,(function(){return this})),e.AsyncIterator=D,e.async=function(t,r,n,i,a){void 0===a&&(a=Promise);var o=new D(l(t,r,n,i),a);return e.isGeneratorFunction(r)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},O(E),u(E,c,"Generator"),u(E,o,(function(){return this})),u(E,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=F,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return s.type="throw",s.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(c&&u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=t,o.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;A(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:F(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function y(t,e,r,n,i,a,o){try{var s=t[a](o),c=s.value}catch(u){return void r(u)}s.done?e(c):Promise.resolve(c).then(n,i)}function g(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function o(t){y(a,n,i,o,s,"next",t)}function s(t){y(a,n,i,o,s,"throw",t)}o(void 0)}))}}var w={data:function(){return{grid:{xl:6,lg:6,md:12,sm:12,xs:24},viewData:{}}},methods:{statisticsOrder:function(){var t=this;c().then(function(){var e=g(v().mark((function e(r){return v().wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.viewData=r;case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}},mounted:function(){this.statisticsOrder()}},b=w,_=(r("1e74"),r("2877")),x=Object(_["a"])(b,a,o,!1,null,"257ad663",null),C=x.exports,L=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"divBox"},[r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{xs:24,sm:24,md:24,lg:12}},[r("el-card",{staticClass:"box-card"},[r("div",{staticClass:"header_title"},[t._v("快捷入口")]),t._v(" "),r("div",{staticClass:"nav_grid"},t._l(t.permList,(function(e,n){return r("div",{key:n,staticClass:"nav_grid_item",on:{click:function(r){return t.navigatorTo(e.url)}}},[r("div",{staticClass:"pic_badge",style:{backgroundColor:e.bgColor}},[r("span",{staticClass:"iconfont",class:e.icon})]),t._v(" "),r("p",[t._v(t._s(e.title))])])})),0)])],1),t._v(" "),r("el-col",{attrs:{xs:24,sm:24,md:24,lg:12}},[r("el-card",{staticClass:"box-card"},[r("div",{staticClass:"header_title"},[t._v("经营数据")]),t._v(" "),r("div",{staticClass:"nav_grid"},t._l(t.businessList,(function(e,n){return r("div",{key:n,staticClass:"nav_grid_item",on:{click:function(r){return t.navigatorTo(e.path)}}},[r("p",{staticClass:"num_data"},[t._v(t._s(e.num))]),t._v(" "),r("p",{staticClass:"label"},[t._v(t._s(e.title))])])})),0)])],1)],1)],1)},E=[],O=r("c71e"),D=r("e350"),k={components:{echartsNew:O["a"]},data:function(){return{grid:{xl:3,lg:3,md:6,sm:8,xs:8},nav_list:[{bgColor:"#1890FF",icon:"iconhuiyuanguanli",title:"用户管理",url:"/user/index",perms:["admin:user:list"]},{bgColor:"#1BBE6B",icon:"iconxitongshezhi",title:"系统设置",url:"/operation/setting",perms:["admin:system:config:info"]},{bgColor:"#EF9C20",icon:"iconshangpinguanli",title:"商品管理",url:"/store/index",perms:["admin:product:list"]},{bgColor:"#F56C6C",icon:"icondingdanguanli",title:"订单管理",url:"/order/index",perms:["admin:order:list"]},{bgColor:"#A277FF",icon:"iconduanxinpeizhi",title:"一号通",url:"/operation/onePass",perms:["admin:pass:login"]},{bgColor:"#E8B600",icon:"iconwenzhangguanli",title:"文章管理",url:"/content/articleManager",perms:["admin:article:list"]},{bgColor:"#4BCAD5",icon:"iconfenxiaoguanli",title:"分销管理",url:"/distribution/index",perms:["admin:retail:list"]},{bgColor:"#1890FF",icon:"iconyouhuiquan",title:"优惠券",url:"/marketing/coupon/list",perms:["admin:coupon:list"]}],statisticData:[{title:"待发货订单",num:0,path:"/order/index",perms:["admin:order:list"]},{title:"退款中订单",num:0,path:"/order/index",perms:["admin:order:list"]},{title:"待核销订单",num:0,path:"/order/index",perms:["admin:order:list"]},{title:"库存预警",num:0,path:"/store/index",perms:["admin:product:list"]},{title:"上架商品",num:0,path:"/store/index",perms:["admin:product:list"]},{title:"仓库商品",num:0,path:"/store/index",perms:["admin:product:list"]},{title:"提现待审核",num:0,path:"/financial/commission/template",perms:["admin:finance:apply:list"]},{title:"账户充值",num:0,path:"/financial/record/charge",perms:["admin:recharge:list"]}],optionData:{},applyNum:0,style:{height:"250px"}}},computed:{permList:function(){var t=this,e=[];return this.nav_list.forEach((function(r){t.checkPermi(r.perms)&&e.push(r)})),e},businessList:function(){var t=this,e=[];return this.statisticData.forEach((function(r){t.checkPermi(r.perms)&&e.push(r)})),e}},mounted:function(){this.getbusinessData()},methods:{checkPermi:D["a"],navigatorTo:function(t){this.$router.push(t)},getbusinessData:function(){var t=this;m().then((function(e){t.statisticData[0].num=e.notShippingOrderNum,t.statisticData[1].num=e.refundingOrderNum,t.statisticData[2].num=e.notWriteOffOrderNum,t.statisticData[3].num=e.vigilanceInventoryNum,t.statisticData[4].num=e.onSaleProductNum,t.statisticData[5].num=e.notSaleProductNum,t.statisticData[6].num=e.notAuditNum,t.statisticData[7].num=e.totalRechargeAmount}))}}},S=k,j=(r("3ef3"),Object(_["a"])(S,L,E,!1,null,"f41cbaea",null)),A=j.exports,N=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"divBox"},[t.checkPermi(["admin:statistics:home:chart:order","admin:statistics:home:chart:order:week","admin:statistics:home:chart:order:month","admin:statistics:home:chart:order:year"])?r("el-row",{attrs:{gutter:24}},[r("el-col",{attrs:{san:"24"}},[r("el-card",{staticClass:"dashboard-console-visit",attrs:{bordered:!1}},[r("div",{attrs:{slot:"header"},slot:"header"},[r("div",{staticClass:"acea-row row-between-wrapper"},[r("div",{staticClass:"acea-row row-middle"},[r("div",{staticClass:"header_title"},[t._v("订单统计")])]),t._v(" "),r("div",{staticClass:"checkTime"},[r("el-radio-group",{staticClass:"ivu-mr-8",on:{change:t.radioChange},model:{value:t.visitDate,callback:function(e){t.visitDate=e},expression:"visitDate"}},[r("el-radio-button",{attrs:{label:"last30"}},[t._v("30天")]),t._v(" "),r("el-radio-button",{attrs:{label:"week"}},[t._v("周")]),t._v(" "),r("el-radio-button",{attrs:{label:"month"}},[t._v("月")]),t._v(" "),r("el-radio-button",{attrs:{label:"year"}},[t._v("年")])],1)],1)])]),t._v(" "),r("h4",[t._v("订单量趋势")]),t._v(" "),t.info?r("echarts-from",{ref:"visitChart",attrs:{yAxisData:t.yAxisData,seriesData:t.series,xAxis:t.xAxis,legendData:t.legendData}}):t._e()],1)],1)],1):t._e()],1)},F=[],P=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("div",{style:t.styles,attrs:{id:t.echarts}})])},T=[],B=r("313e"),G=r.n(B),V={name:"index",props:{seriesData:{type:Array,default:function(){return[]}},xAxis:{type:Array,default:function(){return[]}},echartsTitle:{type:String,default:""},yAxisData:{type:Array,default:function(){return[]}},legendData:{type:Array,default:function(){return[]}}},data:function(){return{styles:"height:300px",infoLists:this.infoList,seriesArray:this.seriesData}},watch:{seriesData:{handler:function(t,e){this.seriesArray=t,this.handleSetVisitChart()},deep:!0}},computed:{echarts:function(){return"echarts"+Math.ceil(100*Math.random())}},mounted:function(){var t=this,e=this;e.$nextTick((function(){e.handleSetVisitChart(),window.addEventListener("resize",t.wsFunc)}))},methods:{wsFunc:function(){this.myChart.resize()},handleSetVisitChart:function(){this.myChart=G.a.init(document.getElementById(this.echarts));var t=null;t="circle"===this.echartsTitle?{tooltip:{trigger:"item",formatter:"{a} <br/>{b} : {c} ({d}%)"},legend:{orient:"vertical",left:"right",data:this.legendData||[]},series:[{name:"访问来源",type:"pie",radius:"70%",center:["50%","60%"],data:this.seriesArray||[],emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]}:{tooltip:{trigger:"axis"},toolbox:{},legend:{data:this.legendData||[]},color:["#1495EB","#00CC66","#F9D249","#ff9900","#9860DF"],grid:{left:16,right:25,bottom:10,top:40,containLabel:!0},xAxis:[{type:"category",axisLine:{lineStyle:{color:"#D7DDE4"}},axisTick:{alignWithLabel:!0,lineStyle:{color:"#D7DDE4"}},splitLine:{show:!1,lineStyle:{color:"#F5F7F9"}},axisLabel:{interval:0,rotate:40,textStyle:{color:"#7F8B9C"}},data:this.xAxis}],yAxis:this.yAxisData.length?this.yAxisData:{axisLine:{show:!1},axisTick:{show:!1},axisLabel:{textStyle:{color:"#7F8B9C"}},splitLine:{show:!0,lineStyle:{color:"#F5F7F9"}},type:"value"},series:this.seriesArray},this.myChart.setOption(t,!0)},handleResize:function(){this.myChart.resize()}},beforeDestroy:function(){window.removeEventListener("resize",this.wsFunc),this.myChart&&(this.myChart.dispose(),this.myChart=null)}},I=V,U=Object(_["a"])(I,P,T,!1,null,"b878bdec",null),$=U.exports;function z(t){return z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},z(t)}function M(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */M=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var a=e&&e.prototype instanceof y?e:y,o=Object.create(a.prototype),s=new j(n||[]);return i(o,"_invoke",{value:O(t,r,s)}),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var d="suspendedStart",f="suspendedYield",m="executing",p="completed",v={};function y(){}function g(){}function w(){}var b={};u(b,o,(function(){return this}));var _=Object.getPrototypeOf,x=_&&_(_(A([])));x&&x!==r&&n.call(x,o)&&(b=x);var C=w.prototype=y.prototype=Object.create(b);function L(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(i,a,o,s){var c=h(t[i],t,a);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==z(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,o,s)}),(function(t){r("throw",t,o,s)})):e.resolve(l).then((function(t){u.value=t,o(u)}),(function(t){return r("throw",t,o,s)}))}s(c.arg)}var a;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return a=a?a.then(i,i):i()}})}function O(e,r,n){var i=d;return function(a,o){if(i===m)throw new Error("Generator is already running");if(i===p){if("throw"===a)throw o;return{value:t,done:!0}}for(n.method=a,n.arg=o;;){var s=n.delegate;if(s){var c=D(s,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var u=h(e,r,n);if("normal"===u.type){if(i=n.done?p:f,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(i=p,n.method="throw",n.arg=u.arg)}}}function D(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,D(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var a=h(i,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,v;var o=a.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function A(e){if(e||""===e){var r=e[o];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(z(e)+" is not iterable")}return g.prototype=w,i(C,"constructor",{value:w,configurable:!0}),i(w,"constructor",{value:g,configurable:!0}),g.displayName=u(w,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,u(t,c,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},L(E.prototype),u(E.prototype,s,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,i,a){void 0===a&&(a=Promise);var o=new E(l(t,r,n,i),a);return e.isGeneratorFunction(r)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},L(C),u(C,c,"Generator"),u(C,o,(function(){return this})),u(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=A,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(S),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return s.type="throw",s.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(c&&u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=t,o.arg=e,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;S(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:A(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function R(t,e,r,n,i,a,o){try{var s=t[a](o),c=s.value}catch(u){return void r(u)}s.done?e(c):Promise.resolve(c).then(n,i)}function q(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function o(t){R(a,n,i,o,s,"next",t)}function s(t){R(a,n,i,o,s,"throw",t)}o(void 0)}))}}var Q={components:{echartsFrom:$},data:function(){return{infoList:null,visitDate:"last30",series:[],xAxis:[],info:{},legendData:[],yAxisData:[]}},mounted:function(){this.yAxisData=[{type:"value",name:"金额",axisLine:{show:!1},axisTick:{show:!1},axisLabel:{textStyle:{color:"#7F8B9C"}},splitLine:{show:!0,lineStyle:{color:"#F5F7F9"}}},{type:"value",name:"数量",axisLine:{show:!1},axisTick:{show:!1},axisLabel:{textStyle:{color:"#7F8B9C"}},splitLine:{show:!0,lineStyle:{color:"#F5F7F9"}}}]},methods:{checkPermi:D["a"],radioChange:function(t){switch(t){case"week":this.handleChangeWeek();break;case"month":this.handleChangeMonth();break;case"year":this.handleChangeYear();break;default:this.handleChangeVisitType();break}},handleChangeVisitType:function(){var t=this;this.xAxis=[],this.legendData=[],l().then(function(){var e=q(M().mark((function e(r){var n,i,a,o;return M().wrap((function(e){while(1)switch(e.prev=e.next){case 0:for(a in t.info=r,n=[],i=[],r.price)n.push(Number(r.price[a])),t.xAxis.push(a);for(o in r.quality)i.push(Number(r.quality[o]));t.legendData=["订单金额","订单数"],t.series=[{name:"订单金额",type:"bar",itemStyle:{normal:{color:"#5B8FF9"}},data:n},{name:"订单数",type:"line",smooth:!0,itemStyle:{normal:{color:"#4BCAD5"}},yAxisIndex:1,data:i}];case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())},handleChangeWeek:function(){var t=this;this.xAxis=[],this.legendData=[],d().then(function(){var e=q(M().mark((function e(r){var n,i,a,o,s,c,u,l;return M().wrap((function(e){while(1)switch(e.prev=e.next){case 0:for(s in t.info=r,t.legendData=["上周金额","本周金额","上周订单数","本周订单数"],n=[],i=[],a=[],o=[],r.prePrice)n.push(Number(r.prePrice[s])),t.xAxis.push(s);for(c in r.price)i.push(Number(r.price[c]));for(u in r.preQuality)o.push(Number(r.preQuality[u]));for(l in r.quality)a.push(Number(r.quality[l]));t.series=[{name:"上周金额",type:"bar",itemStyle:{normal:{color:"#5B8FF9"}},data:n},{name:"本周金额",type:"bar",itemStyle:{normal:{color:"#4BCAD5"}},data:i},{name:"上周订单数",type:"line",smooth:!0,itemStyle:{normal:{color:"#E6A23C"}},yAxisIndex:1,data:o},{name:"本周订单数",type:"line",smooth:!0,itemStyle:{normal:{color:"#768A9C"}},yAxisIndex:1,data:a}];case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())},handleChangeMonth:function(){var t=this;this.xAxis=[],this.legendData=[],h().then(function(){var e=q(M().mark((function e(r){var n,i,a,o,s,c,u,l;return M().wrap((function(e){while(1)switch(e.prev=e.next){case 0:for(s in t.info=r,t.legendData=["上月金额","本月金额","上月订单数","本月订单数"],n=[],i=[],a=[],o=[],r.prePrice)n.push(Number(r.prePrice[s])),t.xAxis.push(s);for(c in r.price)i.push(Number(r.price[c]));for(u in r.preQuality)o.push(Number(r.preQuality[u]));for(l in r.quality)a.push(Number(r.quality[l]));t.series=[{name:"上月金额",type:"bar",itemStyle:{normal:{color:"#5B8FF9"}},data:n},{name:"本月金额",type:"bar",itemStyle:{normal:{color:"#4BCAD5"}},data:i},{name:"上月订单数",type:"line",smooth:!0,itemStyle:{normal:{color:"#E6A23C"}},yAxisIndex:1,data:o},{name:"本月订单数",type:"line",smooth:!0,itemStyle:{normal:{color:"#768A9C"}},yAxisIndex:1,data:a}];case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())},handleChangeYear:function(){var t=this;this.xAxis=[],this.legendData=[],f().then(function(){var e=q(M().mark((function e(r){var n,i,a,o,s,c,u,l;return M().wrap((function(e){while(1)switch(e.prev=e.next){case 0:for(s in t.info=r,t.legendData=["去年金额","今年金额","去年订单数","今年订单数"],n=[],i=[],a=[],o=[],r.prePrice)n.push(Number(r.prePrice[s])),t.xAxis.push(s);for(c in r.price)i.push(Number(r.price[c]));for(u in r.preQuality)o.push(Number(r.preQuality[u]));for(l in r.quality)a.push(Number(r.quality[l]));t.series=[{name:"去年金额",type:"bar",itemStyle:{normal:{color:"#5B8FF9"}},data:n},{name:"今年金额",type:"bar",itemStyle:{normal:{color:"#4BCAD5"}},data:i},{name:"去年订单数",type:"line",smooth:!0,itemStyle:{normal:{color:"#E6A23C"}},yAxisIndex:1,data:o},{name:"今年订单数",type:"line",smooth:!0,itemStyle:{normal:{color:"#768A9C"}},yAxisIndex:1,data:a}];case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())},handleResize:function(){this.infoList&&this.$refs.visitChart.handleResize()}},created:function(){this.handleChangeVisitType()}},Y=Q,H=(r("2f0d"),Object(_["a"])(Y,N,F,!1,null,"e07582c6",null)),J=H.exports,W=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"divBox"},[r("el-row",{attrs:{gutter:24}},[r("el-col",{staticClass:"ivu-mb mb10 dashboard-console-visit"},[r("el-card",{attrs:{bordered:!1,"dis-hover":""}},[r("div",{attrs:{slot:"header"},slot:"header"},[r("div",{staticClass:"acea-row row-middle"},[r("div",{staticClass:"header_title"},[t._v("用户统计")])])]),t._v(" "),t.infoList?r("echarts-from",{ref:"userChart",attrs:{echartsTitle:t.line,xAxis:t.xAxis,seriesData:t.series}}):t._e()],1)],1)],1)],1)},X=[];function K(t){return K="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},K(t)}function Z(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Z=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var a=e&&e.prototype instanceof y?e:y,o=Object.create(a.prototype),s=new j(n||[]);return i(o,"_invoke",{value:O(t,r,s)}),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var d="suspendedStart",f="suspendedYield",m="executing",p="completed",v={};function y(){}function g(){}function w(){}var b={};u(b,o,(function(){return this}));var _=Object.getPrototypeOf,x=_&&_(_(A([])));x&&x!==r&&n.call(x,o)&&(b=x);var C=w.prototype=y.prototype=Object.create(b);function L(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(i,a,o,s){var c=h(t[i],t,a);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==K(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,o,s)}),(function(t){r("throw",t,o,s)})):e.resolve(l).then((function(t){u.value=t,o(u)}),(function(t){return r("throw",t,o,s)}))}s(c.arg)}var a;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return a=a?a.then(i,i):i()}})}function O(e,r,n){var i=d;return function(a,o){if(i===m)throw new Error("Generator is already running");if(i===p){if("throw"===a)throw o;return{value:t,done:!0}}for(n.method=a,n.arg=o;;){var s=n.delegate;if(s){var c=D(s,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var u=h(e,r,n);if("normal"===u.type){if(i=n.done?p:f,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(i=p,n.method="throw",n.arg=u.arg)}}}function D(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,D(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var a=h(i,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,v;var o=a.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function A(e){if(e||""===e){var r=e[o];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(K(e)+" is not iterable")}return g.prototype=w,i(C,"constructor",{value:w,configurable:!0}),i(w,"constructor",{value:g,configurable:!0}),g.displayName=u(w,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,u(t,c,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},L(E.prototype),u(E.prototype,s,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,i,a){void 0===a&&(a=Promise);var o=new E(l(t,r,n,i),a);return e.isGeneratorFunction(r)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},L(C),u(C,c,"Generator"),u(C,o,(function(){return this})),u(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=A,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(S),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return s.type="throw",s.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(c&&u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=t,o.arg=e,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;S(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:A(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function tt(t,e,r,n,i,a,o){try{var s=t[a](o),c=s.value}catch(u){return void r(u)}s.done?e(c):Promise.resolve(c).then(n,i)}function et(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function o(t){tt(a,n,i,o,s,"next",t)}function s(t){tt(a,n,i,o,s,"throw",t)}o(void 0)}))}}var rt={name:"user-chart",components:{echartsFrom:$},data:function(){return{line:"line",circle:"circle",xAxis:[],infoList:{},series:[],xData:[],y1Data:[],y2Data:[],lists:[],bing_data:[],bing_xdata:[],legendData:[],seriesUser:[],chartBuy:{}}},methods:{getStatistics:function(){var t=this;u().then(function(){var e=et(Z().mark((function e(r){var n,i;return Z().wrap((function(e){while(1)switch(e.prev=e.next){case 0:for(i in t.infoList=r,n=[],r)n.push(r[i]),t.xAxis.push(i);t.series=[{data:n,name:"人数(人)",type:"line",tooltip:!0,smooth:!0,symbol:"none",areaStyle:{normal:{opacity:.2}}}];case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())},handleResize:function(){this.infoList&&0!==this.series.length&&this.$refs.userChart.handleResize(),this.infoList&&this.$refs.visitChart.handleResize()}},mounted:function(){this.getStatistics()},beforeDestroy:function(){this.visitChart&&(this.visitChart.dispose(),this.visitChart=null)}},nt=rt,it=(r("80d1"),Object(_["a"])(nt,W,X,!1,null,"f1e23dec",null)),at=it.exports,ot=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"divBox",staticStyle:{"padding-top":"0"}},[r("el-row",{attrs:{gutter:20}},[t.checkPermi(["admin:statistics:user:overview"])?r("el-col",{attrs:{xs:24,sm:24,md:24,lg:18}},[r("el-card",{staticClass:"box-card card_show"},[r("div",{staticClass:"flex flex-wrap justify-between mb30"},[r("div",{staticClass:"header_title"},[t._v("用户概览")]),t._v(" "),r("div",[r("el-radio-group",{staticClass:"mr20",attrs:{type:"button",size:"small"},on:{change:function(e){return t.selectChange(t.dateLimit)}},model:{value:t.dateLimit,callback:function(e){t.dateLimit=e},expression:"dateLimit"}},t._l(t.fromList.fromTxt,(function(e,n){return r("el-radio-button",{key:n,attrs:{label:e.val}},[t._v(t._s(e.text))])})),1),t._v(" "),r("el-date-picker",{staticStyle:{width:"220px",height:"34px","margin-right":"20px"},attrs:{size:"small",type:"daterange",placement:"bottom-end","picker-options":t.pickerOptions,"value-format":"yyyy-MM-dd",format:"yyyy-MM-dd","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期",align:"right"},on:{change:t.onchangeTime},model:{value:t.timeVal,callback:function(e){t.timeVal=e},expression:"timeVal"}}),t._v(" "),r("el-button",{staticClass:"mr15",attrs:{type:"primary",size:"small"},on:{click:t.onSeach}},[t._v("查询")])],1)]),t._v(" "),r("el-row",[r("el-col",{attrs:{xs:24,sm:24,md:18,lg:18}},[r("div",{staticClass:"user_chart"},[r("div",{staticClass:"acea-row"},[r("div",{staticClass:"user-visitUser"},[r("div",{staticClass:"data_num acea-row"},[r("div",{staticClass:"inone"},[r("div",{staticClass:"user_reg_tit"},[t._v("注册用户数量:"+t._s(t.userView.registerNum))]),t._v(" "),r("div",{staticClass:"reg_time"},[t._v("环比增长率:"+t._s(t.userView.registerNumRatio))])])])]),t._v(" "),r("div",{staticClass:"user-visitUser-ti column_center"},[r("span",{staticClass:"num_data"},[t._v(t._s(t.userView.pageviews))]),t._v(" "),r("span",[t._v("访客")])])]),t._v(" "),r("div",{staticClass:"orderUser"},[r("div",{staticClass:"user-orderUser acea-row"},[r("div",{staticClass:"data_num acea-row"},[r("div",{staticClass:"inone"},[r("div",{staticClass:"user_reg_tit"},[t._v("活跃用户数量:"+t._s(t.userView.activeUserNum))]),t._v(" "),r("div",{staticClass:"reg_time"},[t._v("环比增长率:"+t._s(t.userView.activeUserNumRatio))])])])]),t._v(" "),r("div",{staticClass:"user-orderUser-ti column_center"},[r("span",{staticClass:"num_data"},[t._v(t._s(t.userView.orderUserNum))]),t._v(" "),r("span",[t._v("下单")])])]),t._v(" "),r("div",{staticClass:"acea-row payOrderUser"},[r("div",{staticClass:"user-payOrderUser acea-row"},[r("div",{staticClass:"data_num acea-row"},[r("div",{staticClass:"inone"},[r("div",{staticClass:"user_reg_tit"},[t._v("充值用户数量:"+t._s(t.userView.rechargeUserNum))]),t._v(" "),r("div",{staticClass:"reg_time"},[t._v("环比增长率:"+t._s(t.userView.rechargeUserNumRatio))])]),t._v(" "),r("div",{staticClass:"inone"},[r("div",{staticClass:"user_reg_tit"},[t._v("客单价:"+t._s(t.userView.customerPrice))])])])]),t._v(" "),r("div",{staticClass:"user-payOrderUser-ti column_center"},[r("span",{staticClass:"num_data"},[t._v(" "+t._s(t.userView.orderPayUserNum))]),t._v(" "),r("span",[t._v("成交用户")])])])])])],1)],1)],1):t._e(),t._v(" "),t.checkPermi(["admin:statistics:user:channel"])?r("el-col",{attrs:{xs:24,sm:24,md:24,lg:6}},[r("el-card",{staticClass:"box-card"},[r("div",{staticClass:"header_title"},[t._v("用户渠道")]),t._v(" "),t.optionData?r("echarts-new",{attrs:{"option-data":t.optionData,styles:t.style,height:"100%",width:"100%"}}):t._e()],1)],1):t._e()],1)],1)},st=[],ct=r("0c9f"),ut={data:function(){return{optionData:{},style:{height:"370px"},timeVal:[],dateLimit:"",list:[],fromList:this.$constants.timeList,userView:{},pickerOptions:this.$timeOptions}},components:{echartsNew:O["a"]},created:function(){var t=new Date,e=new Date;e.setTime(e.getTime()-6048e5),this.timeVal=[e,t]},mounted:function(){this.dateLimit="lately7",this.dateLimitPram="lately7",this.getUserView(),this.getChannel()},methods:{checkPermi:D["a"],onchangeTime:function(t){this.timeVal=t,this.dateLimit=t?this.timeVal.join(","):"",this.dateLimitPram=t?this.timeVal.join(","):""},onSeach:function(){this.getUserView()},exports:function(){},selectChange:function(t){""==t?(this.$set(this,"dateLimitPram","yesterday"),this.getUserView()):(this.dateLimitPram=t,this.getUserView())},getUserView:function(){var t=this;Object(ct["i"])({dateLimit:this.dateLimitPram}).then((function(e){t.userView=e}))},getChannel:function(){var t=this;Object(ct["h"])().then((function(e){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(t){e.forEach((function(e){t.channel==e.channel&&n.push({name:t.name,value:e.num?e.num:0,channel:e.channel})}))})),t.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(t){var e=["#1BBE6B","#1890FF","#EF9C20","#4BCAD5"];return e[t.dataIndex]}}},labelLine:{show:!1},data:n}]}}))}}},lt=ut,ht=(r("1b0e"),Object(_["a"])(lt,ot,st,!1,null,"73c2f55e",null)),dt=ht.exports,ft=r("7dae"),mt=r("2b9b"),pt=r("63f0"),vt={name:"Dashboard",components:{baseInfo:C,gridMenu:A,visitChart:J,userChart:at,userOverview:dt},data:function(){return{authStatus:null,authHost:"",authQueryStatus:!1,notInformation:null}},mounted:function(){-1==window.location.host.indexOf("localhost")&&(this.authStatus=pt["a"].local.has("auth-information")?pt["a"].local.getJSON("auth-information"):null,this.notInformation=pt["a"].local.has("not-information")?pt["a"].local.getJSON("not-information"):null,this.authStatus||this.getUniq())},methods:{checkPermi:D["a"],authInformationQuery:function(){var t=this;Object(ft["authCertQuery"])({host:this.authHost}).then((function(e){var r=864e5;-1==e.data.status||2==e.data.status?(pt["a"].local.setItem({name:"not-information",value:!0,expires:r}),notInformation||t.$modal.confirm(e.data.msg).then((function(){t.$router.push({path:"/maintain/authCRMEB"})})).catch((function(){}))):1==e.data.status?(t.$modal.msgSuccess(e.data.msg),pt["a"].local.setItem({name:"auth-information",value:!0,expires:7*r})):3!=e.data.status&&0!=e.data.status||t.$modal.msg(e.data.msg)}))},getUniq:function(){var t=this;Object(mt["e"])({key:"authHost"}).then((function(e){t.authHost=e.value,""!==e.value?t.authInformationQuery():t.$modal.confirm("您尚未提交授权申请").then((function(){t.$router.push({path:"/maintain/authCRMEB"})}))}))}}},yt=vt,gt=Object(_["a"])(yt,n,i,!1,null,null,null);e["default"]=gt.exports}}]);