chunk-67eda092.5ab065b1.js 12 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-67eda092"],{"0f3f":function(t,e,i){},"2ea4":function(t,e,i){},"365c":function(t,e,i){"use strict";i.d(e,"b",(function(){return s})),i.d(e,"c",(function(){return n})),i.d(e,"e",(function(){return r})),i.d(e,"d",(function(){return o})),i.d(e,"a",(function(){return c}));var a=i("b6bd");function s(){return Object(a.a)({url:"home/header",method:"get"})}function n(t){return Object(a.a)({url:"home/order",method:"get",params:t})}function r(){return Object(a.a)({url:"home/user",method:"get"})}function o(){return Object(a.a)({url:"home/rank",method:"get"})}function c(){return Object(a.a)({url:"check_auth",method:"get"})}},"3d3b":function(t,e,i){"use strict";var a=i("2ea4");i.n(a).a},9901:function(t,e,i){"use strict";var a=i("313e"),s=i.n(a),n={name:"index",props:{infoList:{type:Object,default:null},styles:{type:Object,default:null},series:Array,echartsTitle:{type:String,default:""},yAxisData:{type:Array,default:function(){return[]}},bingXdata:Array},data:function(){return{infoLists:this.infoList,seriesArray:this.series}},watch:{infoList:{handler:function(t,e){this.infoLists=t,this.handleSetVisitChart()},deep:!0},series:{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(){var t=this;this.myChart=s.a.init(document.getElementById(this.echarts));var e=null;e="circle"===this.echartsTitle?{tooltip:{trigger:"item",formatter:"{a} <br/>{b} : {c} ({d}%)"},legend:{orient:"vertical",left:"left",data:this.infoLists.bing_xdata||[]},series:[{name:"",type:"pie",radius:"60%",center:["50%","50%"],data:this.infoLists.bing_data||[],emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]}:"circle1"===this.echartsTitle?{tooltip:{trigger:"item",formatter:"{b} : {c} ({d}%)"},legend:{icon:"circle",top:"5%",left:"center",fontSize:"12",data:this.infoLists.bing_xdata||[]},series:[{name:"访问来源",type:"pie",radius:["30%","60%"],avoidLabelOverlap:!1,label:{show:!0,formatter:"{d}%",position:"inner",fontSize:"12"},emphasis:{label:{show:!0,fontSize:"15",fontWeight:"bold"}},labelLine:{show:!1},data:this.infoLists.bing_data||[]}]}:"inlie"===this.echartsTitle?{tooltip:{trigger:"axis"},toolbox:{},legend:{icon:"line",left:"left",fontWeight:"100",data:this.infoLists.legend||[]},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.infoLists.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}:{tooltip:{trigger:"axis"},toolbox:{},legend:{data:this.infoLists.legend||[]},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.infoLists.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},setTimeout((function(){t.wsFunc(),t.myChart.setOption(e,!0)}),200)},handleResize:function(){this.myChart.resize()}},beforeDestroy:function(){window.removeEventListener("resize",this.wsFunc),this.myChart&&(this.myChart.dispose(),this.myChart=null)}},r=(i("df86"),i("2877")),o=Object(r.a)(n,(function(){var t=this.$createElement,e=this._self._c||t;return e("div",[e("div",{staticClass:"styles",style:this.styles,attrs:{id:this.echarts}})])}),[],!1,null,"7b0883a1",null);e.a=o.exports},a584:function(t,e,i){"use strict";var a;function s(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var n=(s(a={name:"cards",data:function(){return{}},props:{cardLists:Array}},"data",(function(){return{}})),s(a,"methods",{}),s(a,"created",(function(){})),a),r=(i("bcf5"),i("2877")),o=Object(r.a)(n,(function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("Row",{staticClass:"ivu-mt",attrs:{type:"flex",align:"middle",gutter:16}},t._l(t.cardLists,(function(e,a){return i("Col",{key:a,staticClass:"ivu-mb",attrs:{xs:24,sm:24,md:24,lg:12,xl:8,xxl:{span:e.col}}},[i("Card",{staticClass:"card_cent",attrs:{shadow:"",padding:0}},[i("div",{staticClass:"card_box"},[i("div",{staticClass:"card_box_cir",class:{one:a%5==0,two:a%5==1,three:a%5==2,four:a%5==3,five:a%5==4}},[i("div",{staticClass:"card_box_cir1",class:{one1:a%5==0,two1:a%5==1,three1:a%5==2,four1:a%5==3,five1:a%5==4}},[e.type?i("span",{staticClass:"iconfont",class:e.className}):i("Icon",{attrs:{type:e.className}})],1)]),i("div",{staticClass:"card_box_txt"},[i("span",{staticClass:"sp1",domProps:{textContent:t._s(e.count||0)}}),i("span",{staticClass:"sp2",domProps:{textContent:t._s(e.name)}})])])])],1)})),1)],1)}),[],!1,null,"79aa0883",null);e.a=o.exports},bcf5:function(t,e,i){"use strict";var a=i("f052");i.n(a).a},df86:function(t,e,i){"use strict";var a=i("0f3f");i.n(a).a},f052:function(t,e,i){},faf6:function(t,e,i){"use strict";i.r(e);var a=i("a34a"),s=i.n(a),n=i("365c"),r=i("9901");function o(t,e,i,a,s,n,r){try{var o=t[n](r),c=o.value}catch(t){return void i(t)}o.done?e(c):Promise.resolve(c).then(a,s)}function c(t){return function(){var e=this,i=arguments;return new Promise((function(a,s){var n=t.apply(e,i);function r(t){o(n,a,s,r,c,"next",t)}function c(t){o(n,a,s,r,c,"throw",t)}r(void 0)}))}}var l={name:"home",components:{cardsData:i("a584").a,echartsFrom:r.a},data:function(){return{loading:!1,optionData:{},formValidate:{status:"",extract_type:"",nireid:"",data:"",page:1,limit:20},timeVal:[],fromList:{title:"选择时间",custom:!0,fromTxt:[{text:"全部",val:""},{text:"近一周",val:"week"},{text:"近30天",val:"month"},{text:"近半年",val:"year"}]},cardLists:[],extractStatistics:{price:"11",brokerage_count:"23",priced:"34"},series:[],yAxisData:[],infoList:{},infoLists:{},circle:"circle1",inlie:"inlie",columns4:[{title:"店员名称",key:"name",minWidth:80},{title:"推广用户数",width:180,key:"store_name"},{title:"推广用户消费金额",key:"visit",minWidth:100},{title:"推广付费会员数",key:"user",minWidth:100},{title:"推广付费会员金额",key:"cart",minWidth:100}],tabList:[{name:"小四",store_name:"12",pay:"122",cart:"22",user:"55",visit:"22"},{name:"李三",store_name:"145",pay:"645",cart:"22",user:"224",visit:"2"},{name:"王五",store_name:"43",pay:"353",cart:"22",user:"75",visit:"98"},{name:"王五",store_name:"43",pay:"353",cart:"22",user:"75",visit:"98"},{name:"王五",store_name:"43",pay:"353",cart:"22",user:"75",visit:"98"}]}},computed:{labelWidth:function(){return this.isMobile?void 0:80},labelPosition:function(){return this.isMobile?"top":"left"}},created:function(){this.cardList(),this.getStatistics()},methods:{getStatistics:function(){var t=this,e={cycle:this.visitDate};Object(n.c)(e).then(function(){var e=c(s.a.mark((function e(i){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.infoList=i.data||{},t.series=t.infoList.series||[],t.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"}}}];case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.$Message.error(e.msg)})),Object(n.e)().then(function(){var e=c(s.a.mark((function e(i){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.infoLists=i.data;case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())},selectChange:function(t){this.formValidate.page=1,this.formValidate.data=t,this.timeVal=[]},onchangeTime:function(t){this.timeVal=t,this.formValidate.data=this.timeVal[0]?this.timeVal.join("-"):"",this.formValidate.page=1},cardList:function(){this.cardLists=[{col:6,count:this.extractStatistics.price,name:"门店实际收款",className:"md-basket"},{col:6,count:this.extractStatistics.brokerage_count,name:"余额消耗金额",className:"md-pricetags"},{col:6,count:this.extractStatistics.priced,name:"用户充值金额",className:"md-cash"},{col:6,count:this.extractStatistics.priced,name:"收银订单金额",className:"ios-cash"},{col:6,count:this.extractStatistics.priced,name:"付费会员金额",className:"md-cash"},{col:6,count:this.extractStatistics.priced,name:"分配订单金额",className:"ios-cash"},{col:6,count:this.extractStatistics.priced,name:"核销订单金额",className:"md-cash"},{col:6,count:this.extractStatistics.priced,name:"门店新增用户数",className:"md-cash"},{col:6,count:this.extractStatistics.priced,name:"门店成交用户数",className:"md-cash"},{col:6,count:this.extractStatistics.priced,name:"门店会员卡激活数",className:"md-cash"}]},handleResize:function(){this.infoList&&this.$refs.visitChart.handleResize()}}},d=(i("3d3b"),i("2877")),h=Object(d.a)(l,(function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{directives:[{name:"resize",rawName:"v-resize",value:t.handleResize,expression:"handleResize"}]},[i("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[i("Form",{ref:"formValidate",attrs:{model:t.formValidate,"label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[i("FormItem",{attrs:{label:"时间筛选:"}},[i("RadioGroup",{staticClass:"time",attrs:{type:"button"},on:{"on-change":function(e){return t.selectChange(t.formValidate.data)}},model:{value:t.formValidate.data,callback:function(e){t.$set(t.formValidate,"data",e)},expression:"formValidate.data"}},t._l(t.fromList.fromTxt,(function(e,a){return i("Radio",{key:a,attrs:{label:e.val}},[t._v(t._s(e.text))])})),1),i("DatePicker",{staticClass:"width20",attrs:{editable:!1,value:t.timeVal,format:"yyyy/MM/dd",type:"daterange",placement:"bottom-end",placeholder:"自定义时间"},on:{"on-change":t.onchangeTime}})],1)],1)],1),i("cards-data",{attrs:{cardLists:t.cardLists}}),i("Card",{attrs:{bordered:!1,"dis-hover":""}},[i("div",{staticClass:"ivu-pl-8 fonts"},[t._v("营业趋势")]),t.infoList?i("echarts-from",{ref:"visitChart",attrs:{series:t.series,echartsTitle:t.inlie,infoList:t.infoList,yAxisData:t.yAxisData}}):t._e()],1),i("Row",{staticClass:"ivu-mt",attrs:{gutter:24}},[i("Col",{staticClass:"ivu-mb dashboard-console-visit",attrs:{xl:16,lg:12,md:24,sm:24,xs:24}},[i("Card",{staticClass:"tablebox",attrs:{bordered:!1,"dis-hover":""}},[i("div",{staticClass:"ivu-pl-8 fonts"},[t._v("交易数据")]),i("Table",{ref:"selection",attrs:{columns:t.columns4,data:t.tabList,loading:t.loading,"no-data-text":"暂无数据","highlight-row":"","no-filtered-data-text":"暂无筛选结果"}})],1)],1),i("Col",{attrs:{xl:8,lg:12,md:24,sm:24,xs:24}},[i("Card",{staticClass:"dashboard-console-visit",attrs:{bordered:!1,"dis-hover":""}},[i("div",{attrs:{slot:"title"},slot:"title"},[i("div",{staticClass:"ivu-pl-8 fonts"},[t._v("购买用户统计")])]),i("echarts-from",{ref:"visitChart",attrs:{infoList:t.infoLists,echartsTitle:t.circle}})],1)],1)],1),i("Card",{staticClass:"ivu-mt box",attrs:{bordered:!1,"dis-hover":""}},[i("div",{staticClass:"fonts"},[t._v("店员业绩")]),i("Table",{ref:"selection",attrs:{columns:t.columns4,data:t.tabList,loading:t.loading,"no-data-text":"暂无数据","highlight-row":"","no-filtered-data-text":"暂无筛选结果"}})],1)],1)}),[],!1,null,"5c72fc5c",null);e.default=h.exports}}]);