| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-417e5b82"],{"0996":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"i-layout-page-header"},[a("div",{staticClass:"i-layout-page-header"},[a("span",[a("Button",{staticClass:"return",attrs:{icon:"ios-arrow-back",size:"small",type:"text",disabled:t.disabled},on:{click:function(e){return t.$router.go(-1)}}},[t._v("返回")])],1),a("Divider",{staticClass:"return",attrs:{type:"vertical"}}),a("span",{staticClass:"ivu-page-header-title"},[t._v(t._s(t.$route.meta.title))])],1)]),t.cardLists.length>=0?a("cards-data",{attrs:{cardLists:t.cardLists}}):t._e(),a("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[a("div",{staticClass:"table-head"},[a("h3",[t._v("关注趋势")]),a("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?a("echarts-new",{attrs:{"option-data":t.optionData,styles:t.style,height:"100%",width:"100%"}}):t._e()],1),t.spinShow?a("Spin",{attrs:{size:"large",fix:""}}):t._e()],1)},i=[],r=(a("d81d"),a("ac1f"),a("1276"),a("a15b"),a("b0c0"),a("a584")),s=a("c71e"),o=a("0c9f"),c=a("61f7"),u=a("9901"),l={name:"index",components:{cardsData:r["a"],echartsNew:s["a"],echartsFrom:u["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(c["a"])(e,"yyyy/MM/dd")+"-"+Object(c["a"])(t,"yyyy/MM/dd"),this.wechatQrcodeStatistic()},methods:{wechatQrcodeStatistic:function(){var t=this;Object(o["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){var e=new Date(t),a=e.getFullYear()+"-"+(e.getMonth()+1)+"-"+e.getDate()+" "+e.getHours()+":"+e.getMinutes()+":"+e.getSeconds();return a},selectChange:function(t){console.log(this.timeG(t.split(",")[0]),this.timeG(t.split(",")[1]))},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=e,i=["#5B8FF9","#5AD8A6","#FFAB2B","#5D7092"],r=[];t.map((function(t,e){r.push({name:t.name,type:"line",data:t.data,itemStyle:{normal:{color:i[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:n},yAxis:{type:"value",axisLine:{show:!1},axisTick:{show:!1},axisLabel:{textStyle:{color:"#7F8B9C"}},splitLine:{show:!0,lineStyle:{color:"#F5F7F9"}}},series:r},this.spinShow=!1}}},d=l,h=(a("1840"),a("2877")),f=Object(h["a"])(d,n,i,!1,null,"350ba98c",null);e["default"]=f.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 o})),a.d(e,"p",(function(){return c})),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 g})),a.d(e,"k",(function(){return p})),a.d(e,"e",(function(){return b})),a.d(e,"h",(function(){return y})),a.d(e,"f",(function(){return v})),a.d(e,"i",(function(){return x})),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 S}));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 o(t){return Object(n["a"])({url:"/statistic/product/get_excel",method:"get",params:t})}function c(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 g(t){return Object(n["a"])({url:"/statistic/trade/top_trade",method:"get",params:t})}function p(t){return Object(n["a"])({url:"/statistic/trade/bottom_trade",method:"get",params:t})}function b(t){return Object(n["a"])({url:"/statistic/order/get_basic",method:"get",params:t})}function y(t){return Object(n["a"])({url:"/statistic/order/get_trend",method:"get",params:t})}function v(t){return Object(n["a"])({url:"/statistic/order/get_channel",method:"get",params:t})}function x(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 S(t,e){return Object(n["a"])({url:"app/wechat_qrcode/statistic/".concat(t),method:"get",params:e})}},1840:function(t,e,a){"use strict";var n=a("ec7d"),i=a.n(n);i.a},"2c3e":function(t,e,a){var n=a("da84"),i=a("83ab"),r=a("9f7f").MISSED_STICKY,s=a("c6b6"),o=a("edd0"),c=a("69f3").get,u=RegExp.prototype,l=n.TypeError;i&&r&&o(u,"sticky",{configurable:!0,get:function(){if(this!==u){if("RegExp"===s(this))return!!c(this).sticky;throw l("Incompatible receiver, RegExp required")}}})},"4c0c":function(t,e,a){},"4d63":function(t,e,a){var n=a("83ab"),i=a("da84"),r=a("e330"),s=a("94ca"),o=a("7156"),c=a("9112"),u=a("241c").f,l=a("3a9b"),d=a("44e7"),h=a("577e"),f=a("90d8"),m=a("9f7f"),g=a("aeb0"),p=a("cb2d"),b=a("d039"),y=a("1a2d"),v=a("69f3").enforce,x=a("2626"),w=a("b622"),_=a("fce3"),C=a("107c"),O=w("match"),j=i.RegExp,S=j.prototype,D=i.SyntaxError,L=r(S.exec),E=r("".charAt),F=r("".replace),A=r("".indexOf),k=r("".slice),R=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,T=/a/g,M=/a/g,$=new j(T)!==T,V=m.MISSED_STICKY,I=m.UNSUPPORTED_Y,B=n&&(!$||V||_||C||b((function(){return M[O]=!1,j(T)!=T||j(M)==M||"/a/i"!=j(T,"i")}))),z=function(t){for(var e,a=t.length,n=0,i="",r=!1;n<=a;n++)e=E(t,n),"\\"!==e?r||"."!==e?("["===e?r=!0:"]"===e&&(r=!1),i+=e):i+="[\\s\\S]":i+=e+E(t,++n);return i},q=function(t){for(var e,a=t.length,n=0,i="",r=[],s={},o=!1,c=!1,u=0,l="";n<=a;n++){if(e=E(t,n),"\\"===e)e+=E(t,++n);else if("]"===e)o=!1;else if(!o)switch(!0){case"["===e:o=!0;break;case"("===e:L(R,k(t,n+1))&&(n+=2,c=!0),i+=e,u++;continue;case">"===e&&c:if(""===l||y(s,l))throw new D("Invalid capture group name");s[l]=!0,r[r.length]=[l,u],c=!1,l="";continue}c?l+=e:i+=e}return[i,r]};if(s("RegExp",B)){for(var N=function(t,e){var a,n,i,r,s,u,m=l(S,this),g=d(t),p=void 0===e,b=[],y=t;if(!m&&g&&p&&t.constructor===N)return t;if((g||l(S,t))&&(t=t.source,p&&(e=f(y))),t=void 0===t?"":h(t),e=void 0===e?"":h(e),y=t,_&&"dotAll"in T&&(n=!!e&&A(e,"s")>-1,n&&(e=F(e,/s/g,""))),a=e,V&&"sticky"in T&&(i=!!e&&A(e,"y")>-1,i&&I&&(e=F(e,/y/g,""))),C&&(r=q(t),t=r[0],b=r[1]),s=o(j(t,e),m?this:S,N),(n||i||b.length)&&(u=v(s),n&&(u.dotAll=!0,u.raw=N(z(t),a)),i&&(u.sticky=!0),b.length&&(u.groups=b)),t!==y)try{c(s,"source",""===y?"(?:)":y)}catch(x){}return s},P=u(j),Y=0;P.length>Y;)g(N,j,P[Y++]);S.constructor=N,N.prototype=S,p(i,"RegExp",N,{constructor:!0})}x("RegExp")},"61f7":function(t,e,a){"use strict";a.d(e,"a",(function(){return r})),a.d(e,"c",(function(){return u})),a.d(e,"b",(function(){return l}));var n=a("fc11"),i=a("f3f3");a("ac1f"),a("00b4"),a("5319"),a("4d63"),a("c607"),a("2c3e"),a("25f0"),a("498a"),a("d3b7"),a("b64b"),a("99af");function r(t,e){/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));var a={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};for(var n in a)if(new RegExp("(".concat(n,")")).test(e)){var i=a[n]+"";e=e.replace(RegExp.$1,1===RegExp.$1.length?i:s(i))}return e}function s(t){return("00"+t).substr(t.length)}var o={min:"%s最小长度为:min",max:"%s最大长度为:max",length:"%s长度必须为:length",range:"%s长度为:range",pattern:"$s格式错误"};var c=function(t,e){t.message=function(t){return e.replace("%s",t||"")}};function u(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(i["a"])({required:!0,message:t,type:"string"},e)}function l(t){return d.pattern(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,t)}c(u,"请输入%s"),c(l,"%s格式不正确");var d=Object.keys(o).reduce((function(t,e){return t[e]=function(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&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],o[e]),t}),{})},"7f2a":function(t,e,a){"use strict";var n=a("4c0c"),i=a.n(n);i.a},9901:function(t,e,a){"use strict";var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticStyle:{height:"300px"},attrs:{id:t.echarts}})])},i=[],r=a("313e"),s=a.n(r),o={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=s.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)}},c=o,u=a("2877"),l=Object(u["a"])(c,n,i,!1,null,"bae6dede",null);e["a"]=l.exports},a15b:function(t,e,a){"use strict";var n=a("23e7"),i=a("e330"),r=a("44ad"),s=a("fc6a"),o=a("a640"),c=i([].join),u=r!=Object,l=o("join",",");n({target:"Array",proto:!0,forced:u||!l},{join:function(t){return c(s(this),void 0===t?",":t)}})},a584:function(t,e,a){"use strict";var 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)},i=[],r={name:"cards",data:function(){return{}},props:{cardLists:Array},methods:{},created:function(){}},s=r,o=(a("7f2a"),a("2877")),c=Object(o["a"])(s,n,i,!1,null,"f9f647ba",null);e["a"]=c.exports},c607:function(t,e,a){var n=a("da84"),i=a("83ab"),r=a("fce3"),s=a("c6b6"),o=a("edd0"),c=a("69f3").get,u=RegExp.prototype,l=n.TypeError;i&&r&&o(u,"dotAll",{configurable:!0,get:function(){if(this!==u){if("RegExp"===s(this))return!!c(this).dotAll;throw l("Incompatible receiver, RegExp required")}}})},c71e:function(t,e,a){"use strict";var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{style:t.styles,attrs:{id:t.echarts}})])},i=[],r=a("313e"),s=a.n(r),o={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=s.a.init(document.getElementById(this.echarts));var t=null;t=this.optionData,this.myChart.setOption(t,!0)}}},c=o,u=a("2877"),l=Object(u["a"])(c,n,i,!1,null,"2e698574",null);e["a"]=l.exports},ec7d:function(t,e,a){},edd0:function(t,e,a){var n=a("13d2"),i=a("9bf2");t.exports=function(t,e,a){return a.get&&n(a.get,e,{getter:!0}),a.set&&n(a.set,e,{setter:!0}),i.f(t,e,a)}}}]);
|