You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
33 KiB
1 lines
33 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6b899475"],{1171:function(t,a,e){},1239:function(t,a,e){},"20af":function(t,a,e){},"4ae0":function(t,a,e){"use strict";e("20af")},5058:function(t,a,e){"use strict";e("d5ac")},8495:function(t,a,e){"use strict";e("ae7d")},9406:function(t,a,e){"use strict";e.r(a);var s=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"divBox",staticStyle:{background:"#F0F2F5",padding:"0 20px 20px"}},[e("base-info",{ref:"baseInfo",staticClass:"mb15"}),t._v(" "),e("to-day",{staticClass:"mb15"}),t._v(" "),e("user-data",{staticClass:"mb15"}),t._v(" "),e("user-from")],1)},r=[],n=e("db72"),i=e("0c6d");function o(){return i["a"].get("statistics/main")}function c(){return i["a"].get("statistics/order")}function l(){return i["a"].get("statistics/order_num")}function d(){return i["a"].get("statistics/order_user")}function u(t){return i["a"].get("statistics/merchant_stock",t)}function m(t){return i["a"].get("statistics/merchant_rate",t)}function p(t){return i["a"].get("statistics/merchant_visit",t)}function v(t){return i["a"].get("statistics/user",t)}function f(t){return i["a"].get("statistics/user_rate",t)}function h(t){return i["a"].get("statistics/user_data",t)}var _=e("f955"),g=e("2f62"),y=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"box-card statistics"},[t.statisticsData?e("el-row",{staticClass:"panel-group",attrs:{gutter:18}},[e("el-col",{staticClass:"content",attrs:{span:6}},[e("div",{staticClass:"card-panel"},[e("div",{staticClass:"card-panel-description"},[e("div",{staticClass:"card-panel-text"},[e("span",{staticClass:"card-order"},[t._v("新增用户")]),t._v(" "),e("span",{staticClass:"card-date"},[t._v("今日")])]),t._v(" "),e("count-to",{staticClass:"card-panel-num",attrs:{"start-val":0,"end-val":t.statisticsData.today.userNum,duration:3e3}}),t._v(" "),e("div",{staticClass:"card-panel-compared"},[t._v(" \n 周环比:\n "),e("i",{class:Number(t.statisticsData.lastWeekRate.userNum)>=0?"up":"down"},[t._v("\n "+t._s(t.statisticsData.lastWeekRate.userNum?(100*t.statisticsData.lastWeekRate.userNum*1e3/1e3).toFixed(2):0)+"%")]),t._v(" "),e("i",{class:Number(t.statisticsData.lastWeekRate.userNum)>=0?"el-icon-caret-top":"el-icon-caret-bottom"})]),t._v(" "),e("div",{staticClass:"card-panel-date"},[e("span",{staticClass:"date_text"},[t._v("昨日数据")]),t._v(" "),e("span",{staticClass:"date_num"},[t._v(t._s(t.statisticsData.yesterday.userNum))])])],1)])]),t._v(" "),e("el-col",{staticClass:"content",attrs:{span:6}},[e("div",{staticClass:"card-panel"},[e("div",{staticClass:"card-panel-description"},[e("div",{staticClass:"card-panel-text"},[e("span",{staticClass:"card-order"},[t._v("浏览量")]),t._v(" "),e("span",{staticClass:"card-date"},[t._v("今日")])]),t._v(" "),e("count-to",{staticClass:"card-panel-num",attrs:{"start-val":0,"end-val":t.statisticsData.today.visitNum,duration:3e3}}),t._v(" "),e("div",{staticClass:"card-panel-compared"},[t._v(" \n 周环比:\n "),e("i",{class:Number(t.statisticsData.lastWeekRate.visitNum)>=0?"up":"down"},[t._v(t._s(t.statisticsData.lastWeekRate.visitNum?(100*t.statisticsData.lastWeekRate.visitNum*1e3/1e3).toFixed(2):0)+"%")]),t._v(" "),e("i",{class:Number(t.statisticsData.lastWeekRate.visitNum)>=0?"el-icon-caret-top":"el-icon-caret-bottom"})]),t._v(" "),e("div",{staticClass:"card-panel-date"},[e("span",{staticClass:"date_text"},[t._v("昨日数据")]),t._v(" "),e("span",{staticClass:"date_num"},[t._v(t._s(t.statisticsData.yesterday.visitNum))])])],1)])]),t._v(" "),e("el-col",{staticClass:"content",attrs:{span:6}},[e("div",{staticClass:"card-panel"},[e("div",{staticClass:"card-panel-description"},[e("div",{staticClass:"card-panel-text"},[e("span",{staticClass:"card-order"},[t._v("访客数")]),t._v(" "),e("span",{staticClass:"card-date"},[t._v("今日")])]),t._v(" "),e("count-to",{staticClass:"card-panel-num",attrs:{"start-val":0,"end-val":t.statisticsData.today.visitUserNum,duration:3e3}}),t._v(" "),e("div",{staticClass:"card-panel-compared"},[t._v(" \n 周环比:\n "),e("i",{class:Number(t.statisticsData.lastWeekRate.visitUserNum)>=0?"up":"down"},[t._v("\n "+t._s(t.statisticsData.lastWeekRate.visitUserNum?(100*t.statisticsData.lastWeekRate.visitUserNum*1e3/1e3).toFixed(2):0)+"%")]),t._v(" "),e("i",{class:Number(t.statisticsData.lastWeekRate.visitUserNum)>=0?"el-icon-caret-top":"el-icon-caret-bottom"})]),t._v(" "),e("div",{staticClass:"card-panel-date"},[e("span",{staticClass:"date_text"},[t._v("昨日数据")]),t._v(" "),e("span",{staticClass:"date_num"},[t._v(t._s(t.statisticsData.yesterday.visitUserNum))])])],1)])]),t._v(" "),e("el-col",{staticClass:"content",staticStyle:{border:"none"},attrs:{span:6}},[e("div",{staticClass:"card-panel"},[e("div",{staticClass:"card-panel-description"},[e("div",{staticClass:"card-panel-text"},[e("span",{staticClass:"card-order"},[t._v("店铺数")]),t._v(" "),e("span",{staticClass:"card-date"},[t._v("今日")])]),t._v(" "),e("count-to",{staticClass:"card-panel-num",attrs:{"start-val":0,"end-val":t.statisticsData.today.storeNum,duration:3e3}}),t._v(" "),e("div",{staticClass:"card-panel-compared"},[t._v(" \n 周环比:\n "),e("i",{class:Number(t.statisticsData.lastWeekRate.storeNum)>=0?"up":"down"},[t._v("\n "+t._s(t.statisticsData.lastWeekRate.storeNum?(100*t.statisticsData.lastWeekRate.storeNum*1e3/1e3).toFixed(2):0)+"%")]),t._v(" "),e("i",{class:Number(t.statisticsData.lastWeekRate.storeNum)>=0?"el-icon-caret-top":"el-icon-caret-bottom"})]),t._v(" "),e("div",{staticClass:"card-panel-date"},[e("span",{staticClass:"date_text"},[t._v("昨日数据")]),t._v(" "),e("span",{staticClass:"date_num"},[t._v(t._s(t.statisticsData.yesterday.storeNum))])])],1)])])],1):t._e(),t._v(" "),e("el-row",{staticClass:"panel-group-count",attrs:{gutter:18}},[e("el-col",{staticClass:"card-panel-item",attrs:{span:3}},[e("router-link",{attrs:{to:{path:t.roterPre+"/product/examine"}}},[e("div",{staticClass:"card-panel-count"},[e("span",{staticClass:"iconfont icon-shangpinguanli",staticStyle:{color:"#5CC7C1"}}),t._v(" "),e("span",{staticClass:"panel-text"},[t._v("商品管理")])])])],1),t._v(" "),e("el-col",{staticClass:"card-panel-item",attrs:{span:3}},[e("router-link",{attrs:{to:{path:t.roterPre+"/user/list"}}},[e("div",{staticClass:"card-panel-count"},[e("span",{staticClass:"iconfont icon-yonghuguanli",staticStyle:{color:"#69C0FD"}}),t._v(" "),e("span",{staticClass:"panel-text"},[t._v("用户管理")])])])],1),t._v(" "),e("el-col",{staticClass:"card-panel-item",attrs:{span:3}},[e("router-link",{attrs:{to:{path:t.roterPre+"/order/list"}}},[e("div",{staticClass:"card-panel-count"},[e("span",{staticClass:"iconfont icon-dingdanguanli",staticStyle:{color:"#EF9B6F"}}),t._v(" "),e("span",{staticClass:"panel-text"},[t._v("订单管理")])])])],1),t._v(" "),e("el-col",{staticClass:"card-panel-item",attrs:{span:3}},[e("router-link",{attrs:{to:{path:t.roterPre+"/promoter/user"}}},[e("div",{staticClass:"card-panel-count"},[e("span",{staticClass:"iconfont icon-fenxiaoguanli",staticStyle:{color:"#B27FEB"}}),t._v(" "),e("span",{staticClass:"panel-text"},[t._v("分销管理")])])])],1),t._v(" "),e("el-col",{staticClass:"card-panel-item",attrs:{span:3}},[e("router-link",{attrs:{to:{path:t.roterPre+"/setting/sms/sms_config/index"}}},[e("div",{staticClass:"card-panel-count"},[e("span",{staticClass:"iconfont icon-duanxinpeizhi",staticStyle:{color:"#F0AA0B"}}),t._v(" "),e("span",{staticClass:"panel-text"},[t._v("一号通")])])])],1),t._v(" "),e("el-col",{staticClass:"card-panel-item",attrs:{span:3}},[e("router-link",{attrs:{to:{path:t.roterPre+"/cms/article"}}},[e("div",{staticClass:"card-panel-count"},[e("span",{staticClass:"iconfont icon-wenzhangguanli",staticStyle:{color:"#5CC7C1"}}),t._v(" "),e("span",{staticClass:"panel-text"},[t._v("文章管理")])])])],1),t._v(" "),e("el-col",{staticClass:"card-panel-item",attrs:{span:3}},[e("router-link",{attrs:{to:{path:t.roterPre+"/marketing/coupon/list"}}},[e("div",{staticClass:"card-panel-count"},[e("span",{staticClass:"iconfont icon-youhuiquan",staticStyle:{color:"#EF9B6F"}}),t._v(" "),e("span",{staticClass:"panel-text"},[t._v("优惠券")])])])],1),t._v(" "),e("el-col",{staticClass:"card-panel-item",attrs:{span:3}},[e("router-link",{attrs:{to:{path:t.roterPre+"/systemForm/Basics/system_tabs"}}},[e("div",{staticClass:"card-panel-count"},[e("span",{staticClass:"iconfont icon-xitongshezhi",staticStyle:{color:"#F0AA0B"}}),t._v(" "),e("span",{staticClass:"panel-text"},[t._v("系统设置")])])])],1)],1)],1)},C=[],b=e("ec1b"),x=e.n(b),D=e("83d6"),w={name:"BaseInfo",components:{CountTo:x.a},data:function(){return{statisticsData:null,roterPre:D["roterPre"]}},mounted:function(){this.getList()},methods:{getdate:function(){var t=new Date,a=t.getFullYear(),e=t.getMonth()+1,s=t.getDate();e>=1&&e<=9&&(e="0"+e),s>=0&&s<=9&&(s="0"+s);var r=a+" 年 "+e+" 月 "+s+" 日 ";return r},getList:function(){var t=this;this.listLoading=!0,o(this.tableFrom).then((function(a){200===a.status&&(t.statisticsData=a.data),t.listLoading=!1})).catch((function(a){t.listLoading=!1,t.$message.error(a.message)}))}}},k=w,L=(e("5058"),e("2877")),R=Object(L["a"])(k,y,C,!1,null,"11855cfa",null),S=R.exports,F=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("el-card",{staticClass:"box-card",staticStyle:{"box-shadow":"none"}},[e("el-row",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}]},[t.statisticsData?e("el-col",t._b({},"el-col",t.grid,!1),[e("div",[e("div",{staticClass:"title mb15"},[t._v("当日订单金额")]),t._v(" "),e("div",{staticClass:"price"},[t._v("¥"),e("i",[t._v(t._s(t.statisticsData.todayPrice))])])]),t._v(" "),t.statisticsData?e("echarts-from",{key:"1",ref:"visitChart",attrs:{height:"100%",width:"100%","option-data":t.optionData,styles:t.style}}):t._e()],1):t._e(),t._v(" "),t.orderData?e("el-col",t._b({staticClass:"bl"},"el-col",t.grid,!1),[e("div",{staticClass:"title mb15 pl25"},[t._v("数据统计")]),t._v(" "),e("div",{staticClass:"pl25"},[e("div",{staticClass:"toDay"},[e("span",{staticClass:"toDay-title spBlock mb10"},[t._v("当日订单数")]),t._v(" "),e("span",{staticClass:"toDay-number spBlock mb10"},[t._v(t._s(t.orderData.orderNum))]),t._v(" "),e("span",{staticClass:"toDay-time spBlock"},[t._v("日同比:"),e("i",{staticClass:"content-is",class:Number(t.orderData.orderRate)>=0?"up":"down"},[t._v(t._s(Math.floor(100*t.orderData.orderRate))+"%")]),e("i",{class:Number(t.orderData.orderRate)>=0?"el-icon-caret-top":"el-icon-caret-bottom"})]),t._v(" "),t.orderData?e("echarts-from",{key:"2",ref:"visitChart",attrs:{height:"100%",width:"100%","option-data":t.optionDataOrder,styles:t.styleToday}}):t._e(),t._v(" "),e("span",{staticClass:"toDay-title spBlock mb10"},[t._v("当月订单数")]),t._v(" "),e("span",{staticClass:"toDay-number spBlock mb10"},[t._v(t._s(t.orderData.monthOrderNum))]),t._v(" "),e("span",{staticClass:"toDay-time spBlock"},[t._v("月同比:"),e("i",{staticClass:"content-is",class:Number(t.orderData.monthRate)>=0?"up":"down"},[t._v(t._s(Math.floor(100*t.orderData.monthRate))+"%")]),e("i",{class:Number(t.orderData.monthRate)>=0?"el-icon-caret-top":"el-icon-caret-bottom"})])],1),t._v(" "),e("div",{staticClass:"toDay",staticStyle:{border:"none"}},[e("span",{staticClass:"toDay-title spBlock mb10"},[t._v("当日支付人数")]),t._v(" "),e("span",{staticClass:"toDay-number spBlock mb10"},[t._v(t._s(t.orderUserData.orderNum))]),t._v(" "),e("span",{staticClass:"toDay-time spBlock"},[t._v("日同比:"),e("i",{staticClass:"content-is",class:Number(t.orderUserData.orderRate)>=0?"up":"down"},[t._v(t._s(Math.floor(100*t.orderUserData.orderRate))+"%")]),e("i",{class:Number(t.orderData.orderRate)>=0?"el-icon-caret-top":"el-icon-caret-bottom"})]),t._v(" "),t.orderUserData?e("echarts-from",{key:"3",ref:"visitChart",attrs:{height:"100%",width:"100%","option-data":t.optionOrderUser,styles:t.styleToday}}):t._e(),t._v(" "),e("span",{staticClass:"toDay-title spBlock mb10"},[t._v("当月支付人数")]),t._v(" "),e("span",{staticClass:"toDay-number spBlock mb10"},[t._v(t._s(t.orderUserData.monthOrderNum))]),t._v(" "),e("span",{staticClass:"toDay-time spBlock"},[t._v("月同比:"),e("i",{staticClass:"content-is",class:Number(t.orderUserData.monthRate)>=0?"up":"down"},[t._v(t._s(Math.floor(100*t.orderUserData.monthRate))+"%")]),e("i",{class:Number(t.orderUserData.monthRate)>=0?"el-icon-caret-top":"el-icon-caret-bottom"})])],1)])]):t._e()],1)],1)},N=[],T=(e("c5f6"),function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",[e("div",{style:t.styles,attrs:{id:t.echarts}})])}),O=[],B=e("313e"),U=e.n(B),A={name:"Index",props:{styles:{type:Object,default:null},optionData:{type:Object,default:null}},data:function(){return{myChart:null}},computed:{echarts:function(){return"echarts"+Math.ceil(100*Math.random())}},watch:{optionData:{handler:function(t,a){this.handleSetVisitChart()},deep:!0}},mounted:function(){var t=this,a=this;a.$nextTick((function(){a.handleSetVisitChart(),window.addEventListener("resize",t.wsFunc)}))},beforeDestroy:function(){window.removeEventListener("resize",this.wsFunc),this.myChart&&(this.myChart.dispose(),this.myChart=null)},methods:{wsFunc:function(){this.myChart.resize()},handleSetVisitChart:function(){this.myChart=U.a.init(document.getElementById(this.echarts));var t=null;t=this.optionData,this.myChart.setOption(t,!0)}}},P=A,z=Object(L["a"])(P,T,O,!1,null,"1f51a187",null),E=z.exports,W={name:"ToDay",components:{echartsFrom:E},data:function(){return{style:{height:"200px"},styleToday:{height:"130px"},legendData:["今天","昨天"],seriesData:[],timer:[],grid:{xl:12,lg:12,md:12,sm:24,xs:24},statisticsData:{},orderData:{},orderUserData:{},optionData:{},listLoading:!1,optionDataOrder:{},optionOrderUser:{}}},beforeDestroy:function(){this.visitChart&&(this.visitChart.dispose(),this.visitChart=null)},mounted:function(){this.getList(),this.getOrder(),this.getOrderUser()},methods:{getList:function(){var t=this;this.listLoading=!0,c().then((function(a){if(200===a.status){t.statisticsData=a.data;var e=t.statisticsData.order.filter((function(t){return 0!==t.yesterday||0!==t.today}));e.unshift({time:"00:00",today:0,yesterday:0});var s=[{name:"今天",type:"line",stack:"订单额",areaStyle:{normal:{color:new U.a.graphic.LinearGradient(0,0,0,1,[{offset:0,color:"#fff"},{offset:.5,color:"#fff"},{offset:1,color:"#fff"}])}},itemStyle:{normal:{color:"#5B8FF9",lineStyle:{color:"#5B8FF9"}}},data:e.map((function(t){return Number(t.today)})),smooth:!0},{name:"昨天",type:"line",stack:"订单额",areaStyle:{normal:{color:new U.a.graphic.LinearGradient(0,0,0,1,[{offset:0,color:"#fff"},{offset:.5,color:"#fff"},{offset:1,color:"#fff"}])}},itemStyle:{normal:{color:"#5D7092",lineStyle:{color:"#5D7092"}}},data:e.map((function(t){return Number(t.yesterday)}))}];t.optionData={tooltip:{trigger:"axis"},legend:{x:"1px",y:"10px",data:t.legendData},grid:{left:"0%",right:"4%",bottom:"3%",containLabel:!0},xAxis:[{boundaryGap:!1,data:e.map((function(t){return t.time})),axisLine:{show:!1},show:!1}],yAxis:{show:!1},series:s},t.listLoading=!1}})).catch((function(a){t.listLoading=!1,t.$message.error(a.message)}))},getOrder:function(){var t=this;l().then((function(a){if(200===a.status){t.orderData=a.data;var e=t.orderData.today.filter((function(t){return 0!==t.total}));e.unshift({time:"00:00",total:0});var s=[{name:"今天",type:"line",stack:"订单额",areaStyle:{normal:{color:new U.a.graphic.LinearGradient(0,0,0,1,[{offset:0,color:"#5B8FF9"},{offset:.5,color:"#fff"},{offset:1,color:"#fff"}])}},itemStyle:{normal:{color:"#5B8FF9",lineStyle:{color:"#5B8FF9"}}},data:e.map((function(t){return t.total})),smooth:!0}];t.optionDataOrder={tooltip:{trigger:"axis",axisPointer:{type:"cross",label:{backgroundColor:"#6a7985"}}},legend:{x:"1px",y:"10px",data:["今天"]},grid:{left:"0%",right:"4%",bottom:"3%",containLabel:!0},axisLine:{show:!1},xAxis:[{type:"category",boundaryGap:!1,data:e.map((function(t){return t.time})),axisLine:{show:!1},show:!1}],yAxis:{show:!1},series:s}}})).catch((function(a){t.$message.error(a.message)}))},getOrderUser:function(){var t=this;d().then((function(a){if(200===a.status){t.orderUserData=a.data;var e=t.orderUserData.today.filter((function(t){return 0!==t.total}));e.unshift({time:"00:00",total:0});var s=[{name:"今天",type:"line",stack:"人数",areaStyle:{normal:{color:new U.a.graphic.LinearGradient(0,0,0,1,[{offset:0,color:"#5B8FF9"},{offset:.5,color:"#fff"},{offset:1,color:"#fff"}])}},itemStyle:{normal:{color:"#5B8FF9",lineStyle:{color:"#5B8FF9"}}},data:e.map((function(t){return t.total})),smooth:!0}];t.optionOrderUser={tooltip:{trigger:"axis",axisPointer:{type:"cross",label:{backgroundColor:"#6a7985"}}},legend:{x:"1px",y:"10px",data:["今天"]},grid:{left:"0%",right:"4%",bottom:"3%",containLabel:!0},axisLine:{show:!1},xAxis:[{type:"category",boundaryGap:!1,data:e.map((function(t){return t.time})),axisLine:{show:!1},show:!1}],yAxis:{show:!1},series:s}}})).catch((function(a){t.$message.error(a.message)}))}}},$=W,j=(e("8495"),Object(L["a"])($,F,N,!1,null,"3761d802",null)),M=j.exports,V=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("el-card",{staticClass:"box-card",staticStyle:{height:"346px"}},[e("div",{staticClass:"acea-row row-between-wrapper mb20"},[e("span",{staticClass:"header-title",domProps:{textContent:t._s(t.merTitle)}}),t._v(" "),e("span",{staticClass:"header-time"},[e("el-dropdown",[e("span",{staticClass:"el-dropdown-link curP"},[e("i",{staticClass:"el-icon-date mr5"}),t._v(t._s(t.name)),e("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),t._v(" "),e("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.fromList.fromTxt,(function(a,s){return e("el-dropdown-item",{key:s,nativeOn:{click:function(e){return t.setTime(a.val,a.text)}}},[t._v(t._s(a.text))])})),1)],1)],1)]),t._v(" "),t._l(t.merchantData,(function(a,s){return e("div",{key:s,staticClass:"acea-row row-middle mb20"},[e("span",{staticClass:"circle mr10",class:s<3?"circlelan":"circlehui",domProps:{textContent:t._s(s+1)}}),t._v(" "),e("span",{staticClass:"name mr10",domProps:{textContent:t._s("商品销量排行"===t.merTitle?a.cart_info.product.store_name:a.mer_name)}}),t._v(" "),e("div",{staticClass:"progress mr5"},[e("el-progress",{attrs:{percentage:Number(100*a.rate)}})],1),t._v(" "),e("span",{domProps:{textContent:t._s(a.total)}})])}))],2)},G=[],I=e("e572"),J={name:"Ranking",props:{merchantData:{type:Array,default:function(){return[]}},merTitle:{type:String,default:""},xAxisData:{type:Array,default:function(){return[]}}},data:function(){return{fromList:I["a"],name:"最近30天"}},methods:{setTime:function(t,a){this.name=a,this.$emit("getList",t)}}},X=J,q=(e("a2ba"),Object(L["a"])(X,V,G,!1,null,"4af7d514",null)),H=q.exports,Y=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("el-card",{staticClass:"box-card",staticStyle:{height:"346px"}},[e("div",{staticClass:"acea-row row-between-wrapper mb20"},[e("span",{staticClass:"header-title"},[t._v("商户销售额占比")]),t._v(" "),e("span",{staticClass:"header-time"},[e("el-dropdown",[e("span",{staticClass:"el-dropdown-link curP"},[e("i",{staticClass:"el-icon-date mr5"}),t._v(t._s(t.name)),e("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),t._v(" "),e("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.fromList.fromTxt,(function(a,s){return e("el-dropdown-item",{key:s,nativeOn:{click:function(e){return t.setTime(a.val,a.text)}}},[t._v(t._s(a.text))])})),1)],1)],1)]),t._v(" "),t.merchantRate.length?e("echarts-from",{attrs:{"option-data":t.optionData,styles:t.style}}):t._e()],1)},K=[],Q={name:"MerchantRate",components:{echartsFrom:E},data:function(){return{style:{height:"281px"},merchantRate:[],optionData:{},fromList:I["a"],name:"最近30天"}},mounted:function(){this.getList("lately30")},methods:{setTime:function(t,a){this.name=a,this.getList(t)},getList:function(t){var a=this;m({date:t}).then((function(t){if(200===t.status){a.merchantRate=t.data.list;var e=[],s=[],r=["#5AD8A6","#5B8FF9","#F6BD16","#5D7092","#C6C6C6"];a.merchantRate.map((function(t,a){e.push(t.category_name),s.push({value:t.pay_price,name:t.category_name,itemStyle:{normal:{color:r[a]}}})})),a.optionData={tooltip:{trigger:"item",formatter:"{a} <br/>{b} : {c} ({d}%)"},legend:{orient:"vertical",left:"left",data:e},series:[{name:"访问来源",type:"pie",radius:"65%",center:["60%","65%"],data:s,emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]}}})).catch((function(t){a.$message.error(t.message)}))}}},Z=Q,tt=(e("fb99"),Object(L["a"])(Z,Y,K,!1,null,"1df7eb2c",null)),at=tt.exports,et=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("el-card",{staticClass:"box-card",staticStyle:{"box-shadow":"none"}},[e("div",{staticClass:"acea-row row-between-wrapper mb20"},[e("span",{staticClass:"header-title"},[t._v("用户数据")]),t._v(" "),e("span",{staticClass:"header-time"},[e("el-radio-group",{attrs:{size:"mini"},on:{change:function(a){return t.setTime(t.name)}},model:{value:t.name,callback:function(a){t.name=a},expression:"name"}},t._l(t.fromList.fromTxt,(function(a,s){return e("el-radio-button",{key:s,attrs:{label:a.val}},[t._v(t._s(a.text))])})),1)],1)]),t._v(" "),t.listLoading?t._e():e("echarts-from",{attrs:{"option-data":t.optionData,styles:t.style,height:"100%",width:"100%"}})],1)},st=[],rt=(e("ac6a"),e("4f7f"),e("5df3"),e("1c4c"),{name:"UserData",components:{echartsFrom:E},data:function(){return{style:{height:"400px"},optionData:{},name:"lately30",listLoading:!1,fromList:{title:"选择时间",custom:!0,fromTxt:[{text:"近7天",val:"lately7"},{text:"近30天",val:"lately30"},{text:"本月",val:"month"}]}}},mounted:function(){this.getList("lately30")},methods:{setTime:function(t,a){this.getList(t)},getList:function(t){var a=this;h({date:t}).then((function(t){if(console.log(t),200===t.status){var e=t.data,s=[],r=[],n=[],i=[];e.map((function(t){r.push(t.new),n.push(t.total),s.push(t.visit),i.push(t.day)}));var o=[{name:"新用户",type:"line",stack:"用户量",itemStyle:{normal:{color:"#5AD8A6",lineStyle:{color:"#5AD8A6"}}},data:r,smooth:!1},{name:"访问用户",type:"line",stack:"用户量",itemStyle:{normal:{color:"#5D7092",lineStyle:{color:"#5D7092"}}},data:s,smooth:!1},{name:"累计用户",type:"line",stack:"用户量",yAxisIndex:1,itemStyle:{normal:{color:"#5B8FF9",lineStyle:{color:"#5B8FF9"}}},data:n,smooth:!1}];a.optionData={tooltip:{trigger:"axis",axisPointer:{type:"cross",label:{backgroundColor:"#6a7985"}}},legend:{x:"1px",y:"10px",data:["新用户","访问用户","累计用户"]},grid:{left:"0%",right:"4%",bottom:"3%",containLabel:!0},axisLine:{show:!1},xAxis:[{type:"category",boundaryGap:!0,axisLine:{show:!1},axisTick:{alignWithLabel:!0,lineStyle:{color:"#D7DDE4"}},splitLine:{show:!1},axisLabel:{interval:0,rotate:40,textStyle:{color:"#7F8B9C"}},data:Array.from(new Set(i))}],yAxis:[{name:"新/访",type:"value",inverse:!1,boundaryGap:["0","0.1"]},{name:"累计用户",type:"value",max:a.arrayMax(n)+40,min:a.arrayMin(n)-10,splitLine:{show:!1}}],series:o},a.listLoading=!1}})).catch((function(t){a.$message.error(t.message)}))},arrayMin:function(t){for(var a=t[0],e=1,s=t.length;e<s;e+=1)t[e]<a&&(a=t[e]);return a},arrayMax:function(t){for(var a=t[0],e=1,s=t.length;e<s;e++)t[e]>a&&(a=t[e]);return a}}}),nt=rt,it=(e("4ae0"),Object(L["a"])(nt,et,st,!1,null,"3deccf14",null)),ot=it.exports,ct=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("el-row",{staticClass:"mb15",attrs:{gutter:20}},[t.users?e("el-col",{attrs:{xl:16,lg:14,md:12,sm:24,xs:24}},[e("el-card",{staticClass:"box-card"},[e("div",{staticClass:"acea-row row-between-wrapper mb20"},[e("span",{staticClass:"header-title"},[t._v("成交用户")]),t._v(" "),e("div",{staticClass:"header-time"},[e("el-radio-group",{attrs:{size:"mini"},on:{change:function(a){return t.setTime(t.name)}},model:{value:t.name,callback:function(a){t.name=a},expression:"name"}},t._l(t.fromList.fromTxt,(function(a,s){return e("el-radio-button",{key:s,attrs:{label:a.val}},[t._v(t._s(a.text))])})),1)],1)]),t._v(" "),e("div",{staticClass:"user"},[e("el-row",{staticStyle:{background:"#fff",height:"320px",padding:"0 20px",position:"relative"}},[e("span",{staticClass:"grid-floating",staticStyle:{position:"absolute"}},[t._v("\n 访客-下单转化率:\n "),e("span",{staticClass:"grid-conversion-number"},[t._v("\n "+t._s(Math.floor(100*t.users.orderRate))+" %")])]),t._v(" "),e("span",{staticClass:"grid-floating"},[t._v("\n 下单-支付转化率:\n "),e("span",{staticClass:"grid-conversion-number"},[t._v("\n "+t._s(Math.floor(100*t.users.payOrderRate))+" %\n ")])]),t._v(" "),e("el-col",{attrs:{span:24}},[e("div",{staticClass:"grid-content"},[e("el-col",{staticClass:"bg-color bg-blue",attrs:{span:18}},[e("span",{staticClass:"grid-count"},[t._v(t._s(t.users.visitUser))]),t._v("访客人数\n ")]),t._v(" "),e("el-col",{staticClass:"blue-trapezoid bg-trapezoid",attrs:{span:10}},[e("span",[t._v("访客")])])],1)]),t._v(" "),e("el-col",{attrs:{span:24}},[e("div",{staticClass:"grid-content"},[e("el-col",{staticClass:"bg-color bg-green",attrs:{span:4}},[e("span",{staticClass:"grid-count"},[t._v(t._s(t.users.orderUser))]),t._v("下单人数\n ")]),t._v(" "),e("el-col",{staticClass:"bg-color bg-green",attrs:{span:4}},[e("span",{staticClass:"grid-count"},[t._v(t._s(t.users.payOrderPrice))]),t._v("下单金额\n ")]),t._v(" "),e("el-col",{staticClass:"bg-color bg-green",staticStyle:{height:"100px"},attrs:{span:8}}),t._v(" "),e("el-col",{staticClass:"green-trapezoid bg-trapezoid",attrs:{span:10}},[e("span",[t._v("下单")])])],1)]),t._v(" "),e("el-col",{attrs:{span:24}},[e("div",{staticClass:"grid-content"},[e("el-col",{staticClass:"bg-color bg-gray-dark",attrs:{span:4}},[e("span",{staticClass:"grid-count"},[t._v(t._s(t.users.payOrderUser))]),t._v("支付人数\n ")]),t._v(" "),e("el-col",{staticClass:"bg-color bg-gray-dark",attrs:{span:4}},[e("span",{staticClass:"grid-count"},[t._v(t._s(t.users.payOrderPrice))]),t._v("支付金额\n ")]),t._v(" "),e("el-col",{staticClass:"bg-color bg-gray-dark",attrs:{span:4}},[e("span",{staticClass:"grid-count"},[t._v(t._s(t.users.userRate))]),t._v("客单价 \n ")]),t._v(" "),e("el-col",{staticClass:"bg-color bg-gray-dark",staticStyle:{height:"100px"},attrs:{span:2}}),t._v(" "),e("el-col",{staticClass:"gray-dark-trapezoid bg-trapezoid",attrs:{span:10}},[e("span",[t._v("支付")])])],1)])],1)],1)])],1):t._e(),t._v(" "),e("el-col",{attrs:{xl:8,lg:10,md:12,sm:24,xs:24}},[e("el-card",{staticClass:"box-card",staticStyle:{height:"408px"}},[e("div",{staticClass:"acea-row row-between-wrapper mb20",staticStyle:{"padding-bottom":"60px"}},[e("span",{staticClass:"header-title"},[t._v("成交用户占比")]),t._v(" "),e("span",{staticClass:"header-time"},[e("el-radio-group",{attrs:{size:"mini"},on:{change:function(a){return t.setTimeRate(t.nameRate)}},model:{value:t.nameRate,callback:function(a){t.nameRate=a},expression:"nameRate"}},t._l(t.fromList.fromTxt,(function(a,s){return e("el-radio-button",{key:s,attrs:{label:a.val}},[t._v(t._s(a.text))])})),1)],1)]),t._v(" "),e("el-row",{staticClass:"echart-btn"},[e("el-button",{class:"price"==t.rateType?"active":"",nativeOn:{click:function(a){return t.changeLabel("price")}}},[t._v("金额")]),t._v(" "),e("el-button",{class:"price"!=t.rateType?"active":"",nativeOn:{click:function(a){return t.changeLabel("user")}}},[t._v("客户数")])],1),t._v(" "),t.usersRate?e("echarts-from",{ref:"visitChart",attrs:{height:"100%",width:"100%","option-data":t.optionData,styles:t.style}}):t._e()],1)],1)],1)},lt=[],dt={name:"User",components:{echartsFrom:E},data:function(){return{fullWidth:document.body.clientWidth,style:{height:"200px"},name:"lately30",users:null,nameRate:"lately30",nameVal:"lately30",usersRate:{},rateType:"price",optionData:{},fromList:{title:"选择时间",custom:!0,fromTxt:[{text:"近一周",val:"lately7"},{text:"近30天",val:"lately30"},{text:"近一个月",val:"month"},{text:"近一年",val:"year"}]}}},mounted:function(){this.getList("lately30"),this.getRate("lately30")},created:function(){window.addEventListener("resize",this.handleResize)},beforeDestroy:function(){window.removeEventListener("resize",this.handleResize)},methods:{handleResize:function(t){this.fullWidth=document.body.clientWidth},setTime:function(t){this.getList(t)},getList:function(t){var a=this;v({date:t}).then((function(t){a.users=t.data})).catch((function(t){a.$message.error(t.message)}))},setTimeRate:function(t){this.getRate(t)},changeLabel:function(t){this.rateType=t,this.getRate(this.nameVal)},changeRate:function(){this.getRate(this.nameVal)},getRate:function(t){var a=this;f({date:t}).then((function(t){if(200===t.status){var e=[];a.usersRate=t.data,e="price"===a.rateType?[{value:a.usersRate.newTotalPrice,name:"新用户",itemStyle:{normal:{color:"#6394F9"}}},{value:a.usersRate.oldTotalPrice,name:"老用户",itemStyle:{normal:{color:"#EFAE23"}}}]:[{value:a.usersRate.newUser,name:"新用户",itemStyle:{normal:{color:"#6394F9"}}},{value:a.usersRate.oldUser,name:"老用户",itemStyle:{normal:{color:"#EFAE23"}}}],a.optionData={tooltip:{trigger:"item",formatter:"{a} <br/>{b} : {c} ({d}%)"},legend:{orient:"vertical",bottom:0,left:"2%",data:["新用户","老用户"]},series:[{name:"price"===a.rateType?"金额":"客户数",type:"pie",radius:["40%","70%"],avoidLabelOverlap:!1,data:e,label:{show:!1,position:"center"},emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]}}})).catch((function(t){a.$message.error(t.message)}))}}},ut=dt,mt=(e("e3b4"),Object(L["a"])(ut,ct,lt,!1,null,"582b7b26",null)),pt=mt.exports,vt=e("a78e"),ft=e.n(vt),ht={name:"Dashboard",components:{baseInfo:S,toDay:M,myRanking:H,merchantRate:at,userData:ot,userFrom:pt},data:function(){return{merTitle:"商品销量排行",visitTitle:"商户访客量排行",currentRole:"adminDashboard",grid:{xl:8,lg:8,md:12,sm:12,xs:24},merchantStock:[],merchantVisit:[]}},computed:Object(n["a"])({},Object(g["b"])(["roles"])),mounted:function(){var t=this;console.log(!ft.a.get("auth")),this.getAuth(),this.getList("lately30"),this.getVisit("lately30"),ft.a.get("auth")||Object(_["e"])().then((function(a){if("success"!==a.message)return t.$notify.warning({title:"授权提醒",duration:0,dangerouslyUseHTMLString:!0,message:a.message,render:function(t){return t("div",[t("a",{attrs:{href:"http://www.crmeb.com/home/grant/applyauthorize.html",target:"_blank"}},a.message)])},onClose:function(){ft.a.set("auth",!0)}})})).catch((function(t){}))},methods:{getAuth:function(){var t=this;Object(_["c"])().then((function(a){var e=a.data||{};e.auth_code&&e.auth&&(t.authCode=e.auth_code,t.auth=!0)}))},getList:function(t){var a=this;u({date:t}).then((function(t){200===t.status&&(a.merchantStock=t.data.list)})).catch((function(t){a.$message.error(t.message)}))},getVisit:function(t){var a=this;p({date:t}).then((function(t){200===t.status&&(a.merchantVisit=t.data.list)})).catch((function(t){a.$message.error(t.message)}))}}},_t=ht,gt=Object(L["a"])(_t,s,r,!1,null,null,null);a["default"]=gt.exports},a2ba:function(t,a,e){"use strict";e("e751")},ae7d:function(t,a,e){},d5ac:function(t,a,e){},e3b4:function(t,a,e){"use strict";e("1171")},e572:function(t,a,e){"use strict";e.d(a,"c",(function(){return s})),e.d(a,"a",(function(){return r})),e.d(a,"b",(function(){return n}));var s=[{label:"开启",value:1},{label:"关闭",value:0}],r={title:"选择时间",custom:!0,fromTxt:[{text:"全部",val:""},{text:"今天",val:"today"},{text:"昨天",val:"yesterday"},{text:"最近7天",val:"lately7"},{text:"最近30天",val:"lately30"},{text:"本月",val:"month"},{text:"本年",val:"year"}]},n={title:"状态",custom:!0,fromTxt:[{text:"全部",val:""},{text:"待审核",val:"0"},{text:"审核已通过",val:"1"},{text:"审核未通过",val:"2"}]}},e751:function(t,a,e){},f955:function(t,a,e){"use strict";e.d(a,"i",(function(){return r})),e.d(a,"j",(function(){return n})),e.d(a,"g",(function(){return i})),e.d(a,"d",(function(){return o})),e.d(a,"m",(function(){return c})),e.d(a,"l",(function(){return l})),e.d(a,"h",(function(){return d})),e.d(a,"c",(function(){return u})),e.d(a,"k",(function(){return m})),e.d(a,"b",(function(){return p})),e.d(a,"e",(function(){return v})),e.d(a,"a",(function(){return f})),e.d(a,"f",(function(){return h})),e.d(a,"n",(function(){return _}));var s=e("0c6d");function r(){return s["a"].get("safety/database/fileList")}function n(t){return s["a"].delete("safety/database/delete",t)}function i(){return s["a"].get("safety/database/lst")}function o(t){return s["a"].post("safety/database/backups",t)}function c(t){return s["a"].post("safety/database/repair",t)}function l(t){return s["a"].post("safety/database/optimize",t)}function d(t){return s["a"].get("safety/database/detail/".concat(t))}function u(){return s["a"].get("auth")}function m(){return s["a"].get("copyright/auth")}function p(t){return s["a"].post("auth_apply",t)}function v(){return s["a"].get("check_auth")}function f(){return s["a"].get("pay/auth")}function h(t){return s["a"].post("clear/cache",t)}function _(t){return s["a"].post("copyright/save",t)}},fb99:function(t,a,e){"use strict";e("1239")}}]); |