chunk-2f4c8e7b.0af193e4.js 12 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-2f4c8e7b"],{"3e01":function(t,e,i){"use strict";i.r(e);var a=i("9901"),s=i("a584"),n=i("c71e"),r=i("b7be"),o=i("61f7"),l=i("d708"),c={name:"marketing_channelStatistic",components:{cardsData:s.a,echartsNew:n.a,echartsFrom:a.a},data:function(){return{roterPre:l.a.roterPre,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(o.a)(e,"yyyy/MM/dd")+"-"+Object(o.a)(t,"yyyy/MM/dd"),this.wechatQrcodeStatistic()},methods:{wechatQrcodeStatistic:function(){var t=this;Object(r.Wb)(this.id,this.formValidate).then((function(e){var i=["y_follow","y_scan","all_follow","all_scan"];t.cardLists.map((function(t,a){t.count=e.data[i[a]]})),t.getTrend(e.data.trend.series,e.data.trend.xAxis)}))},timeG:function(t){var e=new Date(t);return e.getFullYear()+"-"+(e.getMonth()+1)+"-"+e.getDate()+" "+e.getHours()+":"+e.getMinutes()+":"+e.getSeconds()},onchangeTime:function(t){this.timeVal=t,this.formValidate.time=this.timeVal[0]?this.timeVal.join("-"):"",this.name=this.formValidate.time,this.wechatQrcodeStatistic()},getTrend:function(t,e){this.spinShow=!0;var i=t.map((function(t){return t.name})),a=e,s=["#5B8FF9","#5AD8A6","#FFAB2B","#5D7092"],n=[];t.map((function(t,e){n.push({name:t.name,type:"line",data:t.data,itemStyle:{normal:{color:s[e]}},smooth:0})})),this.optionData={tooltip:{trigger:"axis",axisPointer:{type:"cross",label:{backgroundColor:"#6a7985"}}},legend:{x:"center",data:i},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:n},this.spinShow=!1}}},h=(i("89287"),i("2877")),d=Object(h.a)(c,(function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("div",{staticClass:"i-layout-page-header"},[i("PageHeader",{staticClass:"product_tabs",attrs:{"hidden-breadcrumb":""}},[i("div",{attrs:{slot:"title"},slot:"title"},[i("router-link",{attrs:{to:{path:t.roterPre+"/marketing/channel_code"}}},[i("div",{staticClass:"font-sm after-line"},[i("span",{staticClass:"iconfont iconfanhui"}),i("span",{staticClass:"pl10"},[t._v("返回")])])]),i("span",{staticClass:"ml16",domProps:{textContent:t._s(t.$route.meta.title)}})],1)])],1),t.cardLists.length>=0?i("cards-data",{attrs:{cardLists:t.cardLists}}):t._e(),i("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[i("div",{staticClass:"table-head"},[i("h3",[t._v("关注趋势")]),i("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?i("echarts-new",{attrs:{"option-data":t.optionData,styles:t.style,height:"100%",width:"100%"}}):t._e()],1),t.spinShow?i("Spin",{attrs:{size:"large",fix:""}}):t._e()],1)}),[],!1,null,"b9e1c846",null);e.default=d.exports},"5dd9":function(t,e,i){"use strict";var a=i("fd59");i.n(a).a},"61f7":function(t,e,i){"use strict";function a(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,a)}return i}function s(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?a(i,!0).forEach((function(e){n(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):a(i).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function n(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function r(t,e){/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));var i={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};for(var a in i)if(new RegExp("(".concat(a,")")).test(e)){var s=i[a]+"";e=e.replace(RegExp.$1,1===RegExp.$1.length?s:o(s))}return e}function o(t){return("00"+t).substr(t.length)}i.d(e,"a",(function(){return r})),i.d(e,"c",(function(){return h})),i.d(e,"b",(function(){return d}));var l={min:"%s最小长度为:min",max:"%s最大长度为:max",length:"%s长度必须为:length",range:"%s长度为:range",pattern:"$s格式错误"},c=function(t,e){t.message=function(t){return e.replace("%s",t||"")}};function h(t){return s({required:!0,message:t,type:"string"},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}function d(t){return u.pattern(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,t)}c(h,"请输入%s"),c(d,"%s格式不正确");var u=Object.keys(l).reduce((function(t,e){return t[e]=function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r="range"===e?{min:t[0],max:t[1]}:n({},e,t);return s({message:i.replace(":".concat(e),"range"===e?"".concat(t[0],"-").concat(t[1]):t),type:"string"},r,{},a)},c(t[e],l[e]),t}),{})},6817:function(t,e,i){},89287:function(t,e,i){"use strict";var a=i("6817");i.n(a).a},"8dd3":function(t,e,i){"use strict";var a=i("b93c");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("8dd3"),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,"e03fd378",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("5dd9"),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,"4e72687f",null);e.a=o.exports},b93c:function(t,e,i){},c71e:function(t,e,i){"use strict";var a=i("313e"),s=i.n(a),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(){var t;this.myChart=s.a.init(document.getElementById(this.echarts)),t=this.optionData,this.myChart.setOption(t,!0)}}},r=i("2877"),o=Object(r.a)(n,(function(){var t=this.$createElement,e=this._self._c||t;return e("div",[e("div",{style:this.styles,attrs:{id:this.echarts}})])}),[],!1,null,"458f4634",null);e.a=o.exports},fd59:function(t,e,i){}}]);