mirror of
https://github.com/crmeb/CRMEB.git
synced 2025-12-15 13:22:51 +00:00
1 line
14 KiB
JavaScript
1 line
14 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3517a11c"],{"0996":function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"i-layout-page-header"},[n("div",{staticClass:"i-layout-page-header"},[n("span",[n("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),n("Divider",{staticClass:"return",attrs:{type:"vertical"}}),n("span",{staticClass:"ivu-page-header-title"},[t._v(t._s(t.$route.meta.title))])],1)]),t.cardLists.length>=0?n("cards-data",{attrs:{cardLists:t.cardLists}}):t._e(),n("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[n("div",{staticClass:"table-head"},[n("h3",[t._v("关注趋势")]),n("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?n("echarts-new",{attrs:{"option-data":t.optionData,styles:t.style,height:"100%",width:"100%"}}):t._e()],1),t.spinShow?n("Spin",{attrs:{size:"large",fix:""}}):t._e()],1)},r=[],i=(n("7f7f"),n("28a5"),n("a584")),s=n("c71e"),o=n("0c9f"),c=n("61f7"),u=n("9901"),l={name:"index",components:{cardsData:i["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){console.log(e);var n=["y_follow","y_scan","all_follow","all_scan"];t.cardLists.map((function(t,a){t.count=e.data[n[a]]})),t.getTrend(e.data.trend.series,e.data.trend.xAxis)}))},timeG:function(t){var e=new Date(t),n=e.getFullYear()+"-"+(e.getMonth()+1)+"-"+e.getDate()+" "+e.getHours()+":"+e.getMinutes()+":"+e.getSeconds();return n},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 n=t.map((function(t){return t.name})),a=e,r=["#5B8FF9","#5AD8A6","#FFAB2B","#5D7092"],i=[];t.map((function(t,e){i.push({name:t.name,type:"line",data:t.data,itemStyle:{normal:{color:r[e]}},smooth:0})})),this.optionData={tooltip:{trigger:"axis",axisPointer:{type:"cross",label:{backgroundColor:"#6a7985"}}},legend:{x:"center",data:n},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:a},yAxis:{type:"value",axisLine:{show:!1},axisTick:{show:!1},axisLabel:{textStyle:{color:"#7F8B9C"}},splitLine:{show:!0,lineStyle:{color:"#F5F7F9"}}},series:i},this.spinShow=!1}}},d=l,h=(n("d733"),n("2877")),f=Object(h["a"])(d,a,r,!1,null,"ae237da2",null);e["default"]=f.exports},"0c9f":function(t,e,n){"use strict";n.d(e,"j",(function(){return r})),n.d(e,"o",(function(){return i})),n.d(e,"m",(function(){return s})),n.d(e,"l",(function(){return o})),n.d(e,"p",(function(){return c})),n.d(e,"r",(function(){return u})),n.d(e,"s",(function(){return l})),n.d(e,"v",(function(){return d})),n.d(e,"t",(function(){return h})),n.d(e,"u",(function(){return f})),n.d(e,"q",(function(){return m})),n.d(e,"n",(function(){return p})),n.d(e,"k",(function(){return g})),n.d(e,"e",(function(){return b})),n.d(e,"h",(function(){return y})),n.d(e,"f",(function(){return v})),n.d(e,"i",(function(){return x})),n.d(e,"g",(function(){return w})),n.d(e,"a",(function(){return O})),n.d(e,"c",(function(){return _})),n.d(e,"b",(function(){return C})),n.d(e,"d",(function(){return j})),n.d(e,"w",(function(){return D}));var a=n("6b6c");function r(t){return Object(a["a"])({url:"/statistic/product/get_basic",method:"get",params:t})}function i(t){return Object(a["a"])({url:"/statistic/product/get_trend",method:"get",params:t})}function s(t){return Object(a["a"])({url:"/statistic/product/get_product_ranking",method:"get",params:t})}function o(t){return Object(a["a"])({url:"/statistic/product/get_excel",method:"get",params:t})}function c(t){return Object(a["a"])({url:"/statistic/user/get_basic",method:"get",params:t})}function u(t){return Object(a["a"])({url:"/statistic/user/get_trend",method:"get",params:t})}function l(t){return Object(a["a"])({url:"/statistic/user/get_wechat",method:"get",params:t})}function d(t){return Object(a["a"])({url:"/statistic/user/get_wechat_trend",method:"get",params:t})}function h(t){return Object(a["a"])({url:"/statistic/user/get_region",method:"get",params:t})}function f(t){return Object(a["a"])({url:"/statistic/user/get_sex",method:"get",params:t})}function m(t){return Object(a["a"])({url:"/statistic/user/get_excel",method:"get",params:t})}function p(t){return Object(a["a"])({url:"/statistic/trade/top_trade",method:"get",params:t})}function g(t){return Object(a["a"])({url:"/statistic/trade/bottom_trade",method:"get",params:t})}function b(t){return Object(a["a"])({url:"/statistic/order/get_basic",method:"get",params:t})}function y(t){return Object(a["a"])({url:"/statistic/order/get_trend",method:"get",params:t})}function v(t){return Object(a["a"])({url:"/statistic/order/get_channel",method:"get",params:t})}function x(t){return Object(a["a"])({url:"/statistic/order/get_type",method:"get",params:t})}function w(t){return Object(a["a"])({url:"/statistic/flow/get_record",method:"get",params:t})}function O(t){return Object(a["a"])({url:"/statistic/balance/get_basic",method:"get",params:t})}function _(t){return Object(a["a"])({url:"/statistic/balance/get_trend",method:"get",params:t})}function C(t){return Object(a["a"])({url:"/statistic/balance/get_channel",method:"get",params:t})}function j(t){return Object(a["a"])({url:"/statistic/balance/get_type",method:"get",params:t})}function D(t,e){return Object(a["a"])({url:"app/wechat_qrcode/statistic/".concat(t),method:"get",params:e})}},"3b2b":function(t,e,n){var a=n("7726"),r=n("5dbc"),i=n("86cc").f,s=n("9093").f,o=n("aae3"),c=n("0bfb"),u=a.RegExp,l=u,d=u.prototype,h=/a/g,f=/a/g,m=new u(h)!==h;if(n("9e1e")&&(!m||n("79e5")((function(){return f[n("2b4c")("match")]=!1,u(h)!=h||u(f)==f||"/a/i"!=u(h,"i")})))){u=function(t,e){var n=this instanceof u,a=o(t),i=void 0===e;return!n&&a&&t.constructor===u&&i?t:r(m?new l(a&&!i?t.source:t,e):l((a=t instanceof u)?t.source:t,a&&i?c.call(t):e),n?this:d,u)};for(var p=function(t){t in u||i(u,t,{configurable:!0,get:function(){return l[t]},set:function(e){l[t]=e}})},g=s(l),b=0;g.length>b;)p(g[b++]);d.constructor=u,u.prototype=d,n("2aba")(a,"RegExp",u)}n("7a56")("RegExp")},"61f7":function(t,e,n){"use strict";n.d(e,"a",(function(){return s})),n.d(e,"c",(function(){return l})),n.d(e,"b",(function(){return d}));n("8e6e"),n("ac6a"),n("456d");var a=n("bd86");n("6b54"),n("3b2b"),n("a481");function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function i(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){Object(a["a"])(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function s(t,e){/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));var n={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};for(var a in n)if(new RegExp("(".concat(a,")")).test(e)){var r=n[a]+"";e=e.replace(RegExp.$1,1===RegExp.$1.length?r:o(r))}return e}function o(t){return("00"+t).substr(t.length)}var c={min:"%s最小长度为:min",max:"%s最大长度为:max",length:"%s长度必须为:length",range:"%s长度为:range",pattern:"$s格式错误"};var u=function(t,e){t.message=function(t){return e.replace("%s",t||"")}};function l(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i({required:!0,message:t,type:"string"},e)}function d(t){return h.pattern(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,t)}u(l,"请输入%s"),u(d,"%s格式不正确");var h=Object.keys(c).reduce((function(t,e){return t[e]=function(t){var n=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(a["a"])({},e,t);return i(i({message:n.replace(":".concat(e),"range"===e?"".concat(t[0],"-").concat(t[1]):t),type:"string"},s),r)},u(t[e],c[e]),t}),{})},"74aa":function(t,e,n){},9901:function(t,e,n){"use strict";var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticStyle:{height:"300px"},attrs:{id:t.echarts}})])},r=[],i=n("313e"),s=n.n(i),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=n("2877"),l=Object(u["a"])(c,a,r,!1,null,"5479249e",null);e["a"]=l.exports},a584:function(t,e,n){"use strict";var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("Row",{staticClass:"ivu-mt",attrs:{type:"flex",align:"middle",gutter:10}},t._l(t.cardLists,(function(e,a){return n("Col",{key:a,staticClass:"ivu-mb",attrs:{xl:e.col,lg:6,md:12,sm:24,xs:24}},[n("Card",{staticClass:"card_cent",attrs:{shadow:"",padding:0}},[n("div",{staticClass:"card_box"},[n("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}},[n("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}},[n("Icon",{attrs:{type:e.className}})],1)]),n("div",{staticClass:"card_box_txt"},[n("span",{staticClass:"sp1",domProps:{textContent:t._s(e.count||0)}}),n("span",{staticClass:"sp2",domProps:{textContent:t._s(e.name)}})])])])],1)})),1)],1)},r=[],i={name:"cards",data:function(){return{}},props:{cardLists:Array},methods:{},created:function(){}},s=i,o=(n("bdf2"),n("2877")),c=Object(o["a"])(s,a,r,!1,null,"2907c959",null);e["a"]=c.exports},bdf2:function(t,e,n){"use strict";var a=n("cc33"),r=n.n(a);r.a},c71e:function(t,e,n){"use strict";var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{style:t.styles,attrs:{id:t.echarts}})])},r=[],i=n("313e"),s=n.n(i),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=n("2877"),l=Object(u["a"])(c,a,r,!1,null,"775dd322",null);e["a"]=l.exports},cc33:function(t,e,n){},d733:function(t,e,n){"use strict";var a=n("74aa"),r=n.n(a);r.a}}]); |