| 1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-4fec683e"],{"0996":function(t,e,a){"use strict";a.r(e),a("d81d"),a("a15b"),a("b0c0");var n=a("a584"),i=a("c71e"),r=a("0c9f"),s=a("61f7"),c=a("9901");n={name:"index",components:{cardsData:n.a,echartsNew:i.a,echartsFrom:c.a},data:function(){return{timeVal:[],style:{height:"400px"},infoList:{},infoList2:{},echartLeft:!0,echartRight:!1,loading:!1,loading2:!1,fromList:{title:"选择时间",custom:!0,fromTxt:[{text:"全部",val:""},{text:"今天",val:"today"},{text:"本周",val:"week"},{text:"本月",val:"month"},{text:"本季度",val:"quarter"},{text:"本年",val:"year"}]},formValidate:{time:""},cardLists:[{col:6,count:0,name:"昨日新增关注",className:"md-rose"},{col:6,count:0,name:"昨日参与",className:"ios-speedometer-outline"},{col:6,count:0,name:"总关注",className:"ios-speedometer-outline"},{col:6,count:0,name:"参与总人数",className:"md-rose"}],optionData:{},spinShow:!1,options:this.$timeOptions,columns:[{title:"序号",type:"index",width:60,align:"center"},{title:"来源",key:"name",minWidth:80,align:"center"},{title:"金额",width:180,key:"value",align:"center"},{title:"占比率",slot:"percent",minWidth:100,align:"center"}]}},created:function(){this.id=this.$route.query.id;var t=new Date,e=new Date;e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-29))),this.timeVal=[e,t],this.formValidate.time=Object(s.a)(e,"yyyy/MM/dd")+"-"+Object(s.a)(t,"yyyy/MM/dd"),this.wechatQrcodeStatistic()},methods:{wechatQrcodeStatistic:function(){var t=this;Object(r.w)(this.id,this.formValidate).then((function(e){var a=["y_follow","y_scan","all_follow","all_scan"];t.cardLists.map((function(t,n){t.count=e.data[a[n]]})),t.getTrend(e.data.trend.series,e.data.trend.xAxis)}))},timeG:function(t){return t=new Date(t),t.getFullYear()+"-"+(t.getMonth()+1)+"-"+t.getDate()+" "+t.getHours()+":"+t.getMinutes()+":"+t.getSeconds()},selectChange:function(t){},onchangeTime:function(t){this.timeVal=t,this.formValidate.time=this.timeVal.join("-"),this.name=this.formValidate.time,this.wechatQrcodeStatistic()},getTrend:function(t,e){this.spinShow=!0;var a=t.map((function(t){return t.name})),n=["#5B8FF9","#5AD8A6","#FFAB2B","#5D7092"],i=[];t.map((function(t,e){i.push({name:t.name,type:"line",data:t.data,itemStyle:{normal:{color:n[e]}},smooth:0})})),this.optionData={tooltip:{trigger:"axis",axisPointer:{type:"cross",label:{backgroundColor:"#6a7985"}}},legend:{x:"center",data:a},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},toolbox:{feature:{saveAsImage:{}}},xAxis:{type:"category",boundaryGap:!0,axisLabel:{interval:0,rotate:40,textStyle:{color:"#000000"}},data:e},yAxis:{type:"value",axisLine:{show:!1},axisTick:{show:!1},axisLabel:{textStyle:{color:"#7F8B9C"}},splitLine:{show:!0,lineStyle:{color:"#F5F7F9"}}},series:i},this.spinShow=!1}}},a("896a"),i=a("2877"),c=Object(i.a)(n,(function(){var t=this,e=t.$createElement;e=t._self._c||e;return e("div",[e("div",{staticClass:"i-layout-page-header header-title"},[e("div",{staticClass:"fl_header"},[e("span",[e("Button",{attrs:{icon:"ios-arrow-back",size:"small",type:"text"},on:{click:function(e){return t.$router.go(-1)}}},[t._v("返回")])],1),e("Divider",{attrs:{type:"vertical"}}),e("span",{staticClass:"ivu-page-header-title"},[t._v(t._s(t.$route.meta.title))])],1)]),0<=t.cardLists.length?e("cards-data",{attrs:{cardLists:t.cardLists}}):t._e(),e("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[e("div",{staticClass:"table-head"},[e("h3",[t._v("关注趋势")]),e("DatePicker",{staticClass:"mr20",staticStyle:{width:"200px"},attrs:{editable:!1,clearable:!1,value:t.timeVal,format:"yyyy/MM/dd",type:"daterange",placement:"bottom-start",placeholder:"请选择时间",options:t.options},on:{"on-change":t.onchangeTime}})],1),t.optionData?e("echarts-new",{attrs:{"option-data":t.optionData,styles:t.style,height:"100%",width:"100%"}}):t._e()],1),t.spinShow?e("Spin",{attrs:{size:"large",fix:""}}):t._e()],1)}),[],!1,null,"963a5a4a",null);e.default=c.exports},"0c9f":function(t,e,a){"use strict";a.d(e,"j",(function(){return i})),a.d(e,"o",(function(){return r})),a.d(e,"m",(function(){return s})),a.d(e,"l",(function(){return c})),a.d(e,"p",(function(){return o})),a.d(e,"r",(function(){return u})),a.d(e,"s",(function(){return l})),a.d(e,"v",(function(){return d})),a.d(e,"t",(function(){return h})),a.d(e,"u",(function(){return f})),a.d(e,"q",(function(){return m})),a.d(e,"n",(function(){return p})),a.d(e,"k",(function(){return g})),a.d(e,"e",(function(){return y})),a.d(e,"h",(function(){return b})),a.d(e,"f",(function(){return x})),a.d(e,"i",(function(){return v})),a.d(e,"g",(function(){return w})),a.d(e,"a",(function(){return _})),a.d(e,"c",(function(){return C})),a.d(e,"b",(function(){return O})),a.d(e,"d",(function(){return j})),a.d(e,"w",(function(){return L}));var n=a("6b6c");function i(t){return Object(n.a)({url:"/statistic/product/get_basic",method:"get",params:t})}function r(t){return Object(n.a)({url:"/statistic/product/get_trend",method:"get",params:t})}function s(t){return Object(n.a)({url:"/statistic/product/get_product_ranking",method:"get",params:t})}function c(t){return Object(n.a)({url:"/statistic/product/get_excel",method:"get",params:t})}function o(t){return Object(n.a)({url:"/statistic/user/get_basic",method:"get",params:t})}function u(t){return Object(n.a)({url:"/statistic/user/get_trend",method:"get",params:t})}function l(t){return Object(n.a)({url:"/statistic/user/get_wechat",method:"get",params:t})}function d(t){return Object(n.a)({url:"/statistic/user/get_wechat_trend",method:"get",params:t})}function h(t){return Object(n.a)({url:"/statistic/user/get_region",method:"get",params:t})}function f(t){return Object(n.a)({url:"/statistic/user/get_sex",method:"get",params:t})}function m(t){return Object(n.a)({url:"/statistic/user/get_excel",method:"get",params:t})}function p(t){return Object(n.a)({url:"/statistic/trade/top_trade",method:"get",params:t})}function g(t){return Object(n.a)({url:"/statistic/trade/bottom_trade",method:"get",params:t})}function y(t){return Object(n.a)({url:"/statistic/order/get_basic",method:"get",params:t})}function b(t){return Object(n.a)({url:"/statistic/order/get_trend",method:"get",params:t})}function x(t){return Object(n.a)({url:"/statistic/order/get_channel",method:"get",params:t})}function v(t){return Object(n.a)({url:"/statistic/order/get_type",method:"get",params:t})}function w(t){return Object(n.a)({url:"/statistic/flow/get_record",method:"get",params:t})}function _(t){return Object(n.a)({url:"/statistic/balance/get_basic",method:"get",params:t})}function C(t){return Object(n.a)({url:"/statistic/balance/get_trend",method:"get",params:t})}function O(t){return Object(n.a)({url:"/statistic/balance/get_channel",method:"get",params:t})}function j(t){return Object(n.a)({url:"/statistic/balance/get_type",method:"get",params:t})}function L(t,e){return Object(n.a)({url:"app/wechat_qrcode/statistic/".concat(t),method:"get",params:e})}},"61f7":function(t,e,a){"use strict";a.d(e,"a",(function(){return r})),a.d(e,"c",(function(){return o})),a.d(e,"b",(function(){return u}));var n=a("fc11"),i=a("f3f3");function r(t,e){/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));var a,n,i={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};for(a in i)new RegExp("(".concat(a,")")).test(e)&&(n=i[a]+"",e=e.replace(RegExp.$1,1===RegExp.$1.length?n:("00"+n).substr(n.length)));return e}a("ac1f"),a("00b4"),a("5319"),a("4d63"),a("c607"),a("2c3e"),a("25f0"),a("498a"),a("d3b7"),a("b64b"),a("99af");var s={min:"%s最小长度为:min",max:"%s最大长度为:max",length:"%s长度必须为:length",range:"%s长度为:range",pattern:"$s格式错误"};function c(t,e){t.message=function(t){return e.replace("%s",t||"")}}function o(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return Object(i.a)({required:!0,message:t,type:"string"},e)}function u(t){return l.pattern(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,t)}c(o,"请输入%s"),c(u,"%s格式不正确");var l=Object.keys(s).reduce((function(t,e){return t[e]=function(t){var a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},s="range"===e?{min:t[0],max:t[1]}:Object(n.a)({},e,t);return Object(i.a)(Object(i.a)({message:a.replace(":".concat(e),"range"===e?"".concat(t[0],"-").concat(t[1]):t),type:"string"},s),r)},c(t[e],s[e]),t}),{})},"7f2a":function(t,e,a){"use strict";var n=a("cf46");a.n(n).a},"896a":function(t,e,a){"use strict";var n=a("ccad");a.n(n).a},9901:function(t,e,a){"use strict";var n=a("313e"),i=a.n(n);n={name:"index",props:{infoList:{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(){this.myChart=i.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.infoLists.bing_xdata||[]},series:[{name:"访问来源",type:"pie",radius:"70%",center:["50%","60%"],data:this.infoLists.bing_data||[],emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]}:{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};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)}},a=a("2877"),a=Object(a.a)(n,(function(){var t=this.$createElement;t=this._self._c||t;return t("div",[t("div",{staticStyle:{height:"300px"},attrs:{id:this.echarts}})])}),[],!1,null,"bae6dede",null);e.a=a.exports},a584:function(t,e,a){"use strict";var n={name:"cards",data:function(){return{}},props:{cardLists:Array},methods:{},created:function(){}};a("7f2a"),a=a("2877"),a=Object(a.a)(n,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("Row",{staticClass:"ivu-mt",attrs:{type:"flex",align:"middle",gutter:10}},t._l(t.cardLists,(function(e,n){return a("Col",{key:n,staticClass:"ivu-mb",attrs:{xl:e.col,lg:6,md:12,sm:24,xs:24}},[a("Card",{staticClass:"card_cent",attrs:{shadow:"",padding:0}},[a("div",{staticClass:"card_box"},[a("div",{staticClass:"card_box_cir",class:{one:n%5==0,two:n%5==1,three:n%5==2,four:n%5==3,five:n%5==4}},[a("div",{staticClass:"card_box_cir1",class:{one1:n%5==0,two1:n%5==1,three1:n%5==2,four1:n%5==3,five1:n%5==4}},[a("Icon",{attrs:{type:e.className}})],1)]),a("div",{staticClass:"card_box_txt"},[a("span",{staticClass:"sp1",domProps:{textContent:t._s(e.count||0)}}),a("span",{staticClass:"sp2",domProps:{textContent:t._s(e.name)}})])])])],1)})),1)],1)}),[],!1,null,"f9f647ba",null);e.a=a.exports},c71e:function(t,e,a){"use strict";var n=a("313e"),i=a.n(n);n={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,e){this.handleSetVisitChart()},deep:!0}},mounted:function(){var t=this,e=this;e.$nextTick((function(){e.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=i.a.init(document.getElementById(this.echarts));var t=this.optionData;this.myChart.setOption(t,!0)}}},a=a("2877"),a=Object(a.a)(n,(function(){var t=this.$createElement;t=this._self._c||t;return t("div",[t("div",{style:this.styles,attrs:{id:this.echarts}})])}),[],!1,null,"2e698574",null);e.a=a.exports},ccad:function(t,e,a){},cf46:function(t,e,a){}}]);
|