mirror of
https://github.com/crmeb/CRMEB.git
synced 2025-12-15 21:32:50 +00:00
1 line
19 KiB
JavaScript
1 line
19 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-bf1fee24"],{"0c9f":function(t,e,a){"use strict";a.d(e,"j",(function(){return n})),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 l})),a.d(e,"s",(function(){return u})),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 b})),a.d(e,"h",(function(){return v})),a.d(e,"f",(function(){return y})),a.d(e,"i",(function(){return x})),a.d(e,"g",(function(){return w})),a.d(e,"a",(function(){return C})),a.d(e,"c",(function(){return _})),a.d(e,"b",(function(){return L})),a.d(e,"d",(function(){return O})),a.d(e,"w",(function(){return j}));var i=a("6b6c");function n(t){return Object(i.a)({url:"/statistic/product/get_basic",method:"get",params:t})}function r(t){return Object(i.a)({url:"/statistic/product/get_trend",method:"get",params:t})}function s(t){return Object(i.a)({url:"/statistic/product/get_product_ranking",method:"get",params:t})}function c(t){return Object(i.a)({url:"/statistic/product/get_excel",method:"get",params:t})}function o(t){return Object(i.a)({url:"/statistic/user/get_basic",method:"get",params:t})}function l(t){return Object(i.a)({url:"/statistic/user/get_trend",method:"get",params:t})}function u(t){return Object(i.a)({url:"/statistic/user/get_wechat",method:"get",params:t})}function d(t){return Object(i.a)({url:"/statistic/user/get_wechat_trend",method:"get",params:t})}function h(t){return Object(i.a)({url:"/statistic/user/get_region",method:"get",params:t})}function f(t){return Object(i.a)({url:"/statistic/user/get_sex",method:"get",params:t})}function m(t){return Object(i.a)({url:"/statistic/user/get_excel",method:"get",params:t})}function p(t){return Object(i.a)({url:"/statistic/trade/top_trade",method:"get",params:t})}function g(t){return Object(i.a)({url:"/statistic/trade/bottom_trade",method:"get",params:t})}function b(t){return Object(i.a)({url:"/statistic/order/get_basic",method:"get",params:t})}function v(t){return Object(i.a)({url:"/statistic/order/get_trend",method:"get",params:t})}function y(t){return Object(i.a)({url:"/statistic/order/get_channel",method:"get",params:t})}function x(t){return Object(i.a)({url:"/statistic/order/get_type",method:"get",params:t})}function w(t){return Object(i.a)({url:"/statistic/flow/get_record",method:"get",params:t})}function C(t){return Object(i.a)({url:"/statistic/balance/get_basic",method:"get",params:t})}function _(t){return Object(i.a)({url:"/statistic/balance/get_trend",method:"get",params:t})}function L(t){return Object(i.a)({url:"/statistic/balance/get_channel",method:"get",params:t})}function O(t){return Object(i.a)({url:"/statistic/balance/get_type",method:"get",params:t})}function j(t,e){return Object(i.a)({url:"app/wechat_qrcode/statistic/".concat(t),method:"get",params:e})}},"0ddf":function(t,e,a){"use strict";a.r(e);var i=a("c964"),n=(a("96cf"),a("d81d"),a("a15b"),a("b0c0"),a("a584")),r=a("c71e"),s=a("0c9f"),c=a("61f7"),o=a("9901"),l=a("fd73");n={name:"index",components:{cardsData:n.a,echartsNew:r.a,echartsFrom:o.a,dateRadio:l.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"}],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"}],tabList:[],tabList2:[]}},created:function(){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.onInit()},methods:{onInit:function(){this.getBalanceBasic(),this.getBalanceTrend(),this.getBalanceChannel(),this.getBalanceType()},onSelectDate:function(t){this.formValidate.time=t,this.onInit()},getBalanceBasic:function(){var t=this;Object(s.a)(this.formValidate).then((function(e){var a=["now_balance","add_balance","sub_balance"];t.cardLists.map((function(t,i){t.count=e.data[a[i]]}))}))},getBalanceChannel:function(){var t=this;this.loading=!0,Object(s.b)(this.formValidate).then((function(e){t.infoList=e.data,t.tabList=e.data.list,t.loading=!1}))},getBalanceType:function(){var t=this;this.loading2=!0,Object(s.d)(this.formValidate).then((function(e){t.infoList2=e.data,t.tabList2=e.data.list,t.loading2=!1}))},onchangeTime:function(t){this.timeVal=t,this.formValidate.time=this.timeVal.join("-"),this.name=this.formValidate.time,this.getBalanceBasic(),this.getBalanceTrend()},getBalanceTrend:function(){var t=this;this.spinShow=!0,Object(s.c)(this.formValidate).then(function(){var e=Object(i.a)(regeneratorRuntime.mark((function e(a){var i,n,r,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=a.data.series.map((function(t){return t.name})),n=a.data.xAxis,r=["#5B8FF9","#5AD8A6","#FFAB2B","#5D7092"],s=[],a.data.series.map((function(t,e){s.push({name:t.name,type:"line",data:t.data,itemStyle:{normal:{color:r[e]}},smooth:0})})),t.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:n},yAxis:{type:"value",axisLine:{show:!1},axisTick:{show:!1},axisLabel:{textStyle:{color:"#7F8B9C"}},splitLine:{show:!0,lineStyle:{color:"#F5F7F9"}}},series:s},t.spinShow=!1;case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.$Message.error(e.msg),t.spinShow=!1}))}}},a("55bb"),r=a("2877"),o=Object(r.a)(n,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("Card",{staticClass:"ivu-mb-16",attrs:{bordered:!1,"dis-hover":""}},[a("dateRadio",{on:{selectDate:t.onSelectDate}}),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),0<=t.cardLists.length?a("cards-data",{attrs:{cardLists:t.cardLists}}):t._e(),a("Card",{staticClass:"ivu-mb-16",attrs:{bordered:!1,"dis-hover":""}},[a("h3",[t._v("余额使用趋势")]),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(),a("div",{staticClass:"code-row-bg"},[a("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[a("div",{staticClass:"acea-row row-between-wrapper"},[a("h3",{staticClass:"header-title"},[t._v("余额来源分析")]),a("div",{staticClass:"change-style",on:{click:function(e){t.echartLeft=!t.echartLeft}}},[t._v("切换样式")])]),a("div",{staticClass:"ech-box"},[t.echartLeft?a("echarts-from",{ref:"visitChart",attrs:{infoList:t.infoList,echartsTitle:"circle"}}):t._e(),a("Table",{directives:[{name:"show",rawName:"v-show",value:!t.echartLeft,expression:"!echartLeft"}],ref:"selection",attrs:{columns:t.columns,data:t.tabList,loading:t.loading,"no-data-text":"暂无数据","highlight-row":"","no-filtered-data-text":"暂无筛选结果"},scopedSlots:t._u([{key:"percent",fn:function(e){return e=e.row,[a("div",{staticClass:"percent-box"},[a("div",{staticClass:"line"},[a("div",{staticClass:"bg"}),a("div",{staticClass:"percent",style:"width:"+e.percent+"%;"})]),a("div",{staticClass:"num"},[t._v(t._s(e.percent)+"%")])])]}}])})],1)]),a("Card",{staticClass:"ivu-mt ml10",attrs:{bordered:!1,"dis-hover":""}},[a("div",{staticClass:"acea-row row-between-wrapper"},[a("h3",{staticClass:"header-title"},[t._v("余额消耗")]),a("div",{staticClass:"change-style",on:{click:function(e){t.echartRight=!t.echartRight}}},[t._v("切换样式")])]),a("div",{staticClass:"ech-box"},[t.echartRight?a("echarts-from",{ref:"visitChart",attrs:{infoList:t.infoList2,echartsTitle:"circle"}}):t._e(),a("Table",{directives:[{name:"show",rawName:"v-show",value:!t.echartRight,expression:"!echartRight"}],ref:"selection",attrs:{columns:t.columns,data:t.tabList2,loading:t.loading2,"no-data-text":"暂无数据","highlight-row":"","no-filtered-data-text":"暂无筛选结果"},scopedSlots:t._u([{key:"percent",fn:function(e){return e=e.row,[a("div",{staticClass:"percent-box"},[a("div",{staticClass:"line"},[a("div",{staticClass:"bg"}),a("div",{staticClass:"percent",style:"width:"+e.percent+"%;"})]),a("div",{staticClass:"num"},[t._v(t._s(e.percent)+"%")])])]}}])})],1)])],1)],1)}),[],!1,null,"f3a45e6c",null);e.default=o.exports},"2c3e":function(t,e,a){var i=a("da84"),n=a("83ab"),r=a("9f7f").MISSED_STICKY,s=a("c6b6"),c=a("edd0"),o=a("69f3").get,l=RegExp.prototype,u=i.TypeError;n&&r&&c(l,"sticky",{configurable:!0,get:function(){if(this!==l){if("RegExp"===s(this))return!!o(this).sticky;throw u("Incompatible receiver, RegExp required")}}})},"4d63":function(t,e,a){var i=a("83ab"),n=a("da84"),r=a("e330"),s=a("94ca"),c=a("7156"),o=a("9112"),l=a("241c").f,u=a("3a9b"),d=a("44e7"),h=a("577e"),f=a("90d8"),m=a("9f7f"),p=a("aeb0"),g=a("cb2d"),b=a("d039"),v=a("1a2d"),y=a("69f3").enforce,x=a("2626"),w=a("b622"),C=a("fce3"),_=a("107c"),L=w("match"),O=n.RegExp,j=O.prototype,D=n.SyntaxError,S=r(j.exec),T=r("".charAt),E=r("".replace),R=r("".indexOf),k=r("".slice),F=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,A=/a/g,B=/a/g,$=(a=new O(A)!==A,m.MISSED_STICKY),M=m.UNSUPPORTED_Y;w=i&&(!a||$||C||_||b((function(){return B[L]=!1,O(A)!=A||O(B)==B||"/a/i"!=O(A,"i")})));if(s("RegExp",w)){function V(t,e){var a,i,n=u(j,this),r=d(t),s=void 0===e,l=[],m=t;if(!n&&r&&s&&t.constructor===V)return t;if((r||u(j,t))&&(t=t.source,s&&(e=f(m))),t=void 0===t?"":h(t),e=void 0===e?"":h(e),m=t,r=e=C&&"dotAll"in A&&(a=!!e&&-1<R(e,"s"))?E(e,/s/g,""):e,$&&"sticky"in A&&(i=!!e&&-1<R(e,"y"))&&M&&(e=E(e,/y/g,"")),_&&(t=(s=function(t){for(var e,a=t.length,i=0,n="",r=[],s={},c=!1,o=!1,l=0,u="";i<=a;i++){if("\\"===(e=T(t,i)))e+=T(t,++i);else if("]"===e)c=!1;else if(!c)switch(!0){case"["===e:c=!0;break;case"("===e:S(F,k(t,i+1))&&(i+=2,o=!0),n+=e,l++;continue;case">"===e&&o:if(""===u||v(s,u))throw new D("Invalid capture group name");s[u]=!0,o=!(r[r.length]=[u,l]),u="";continue}o?u+=e:n+=e}return[n,r]}(t))[0],l=s[1]),s=c(O(t,e),n?this:j,V),(a||i||l.length)&&(e=y(s),a&&(e.dotAll=!0,e.raw=V(function(t){for(var e,a=t.length,i=0,n="",r=!1;i<=a;i++)"\\"===(e=T(t,i))?n+=e+T(t,++i):r||"."!==e?("["===e?r=!0:"]"===e&&(r=!1),n+=e):n+="[\\s\\S]";return n}(t),r)),i&&(e.sticky=!0),l.length&&(e.groups=l)),t!==m)try{o(s,"source",""===m?"(?:)":m)}catch(t){}return s}for(var I=l(O),z=0;I.length>z;)p(V,O,I[z++]);(j.constructor=V).prototype=j,g(n,"RegExp",V,{constructor:!0})}x("RegExp")},"55bb":function(t,e,a){"use strict";var i=a("baf8");a.n(i).a},"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 l}));var i=a("fc11"),n=a("f3f3");function r(t,e){/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));var a,i,n={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};for(a in n)new RegExp("(".concat(a,")")).test(e)&&(i=n[a]+"",e=e.replace(RegExp.$1,1===RegExp.$1.length?i:("00"+i).substr(i.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(n.a)({required:!0,message:t,type:"string"},e)}function l(t){return u.pattern(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,t)}c(o,"请输入%s"),c(l,"%s格式不正确");var u=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(i.a)({},e,t);return Object(n.a)(Object(n.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}),{})},7443:function(t,e,a){"use strict";var i=a("b627");a.n(i).a},9901:function(t,e,a){"use strict";var i=a("313e"),n=a.n(i);i={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=n.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)(i,(function(){var t=this.$createElement;t=this._self._c||t;return t("div",[t("div",{staticStyle:{height:"300px"},attrs:{id:this.echarts}})])}),[],!1,null,"00217dc6",null);e.a=a.exports},a584:function(t,e,a){"use strict";var i={name:"cards",data:function(){return{}},props:{cardLists:Array},methods:{},created:function(){}};a("7443"),a=a("2877"),a=Object(a.a)(i,(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,i){return a("Col",{key:i,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:i%5==0,two:i%5==1,three:i%5==2,four:i%5==3,five:i%5==4}},[a("div",{staticClass:"card_box_cir1",class:{one1:i%5==0,two1:i%5==1,three1:i%5==2,four1:i%5==3,five1:i%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,"e3e38522",null);e.a=a.exports},b627:function(t,e,a){},baf8:function(t,e,a){},c607:function(t,e,a){var i=a("da84"),n=a("83ab"),r=a("fce3"),s=a("c6b6"),c=a("edd0"),o=a("69f3").get,l=RegExp.prototype,u=i.TypeError;n&&r&&c(l,"dotAll",{configurable:!0,get:function(){if(this!==l){if("RegExp"===s(this))return!!o(this).dotAll;throw u("Incompatible receiver, RegExp required")}}})},c71e:function(t,e,a){"use strict";var i=a("313e"),n=a.n(i);i={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=n.a.init(document.getElementById(this.echarts));var t=this.optionData;this.myChart.setOption(t,!0)}}},a=a("2877"),a=Object(a.a)(i,(function(){var t=this.$createElement;t=this._self._c||t;return t("div",[t("div",{style:this.styles,attrs:{id:this.echarts}})])}),[],!1,null,"4a0d7a27",null);e.a=a.exports},edd0:function(t,e,a){var i=a("13d2"),n=a("9bf2");t.exports=function(t,e,a){return a.get&&i(a.get,e,{getter:!0}),a.set&&i(a.set,e,{setter:!0}),n.f(t,e,a)}},fd73:function(t,e,a){"use strict";a("a15b");var i=a("61f7"),n={filters:{formatDate:function(t){if(0!==t)return t=new Date(t),Object(i.a)(t,"yyyy/MM/dd")}},data:function(){return{timeVal:[],options:this.$timeOptions,selectIndexTime:""}},methods:{onSelectTime:function(t){var e=[this.$options.filters.formatDate(this.dateToMs(this.$timeOptions.shortcuts[this.selectIndexTime].value()[0])),this.$options.filters.formatDate(this.dateToMs(this.$timeOptions.shortcuts[this.selectIndexTime].value()[1]))];this.$emit("selectDate",e.join("-"))},dateToMs:function(t){return new Date(t).getTime()}}};a=a("2877"),a=Object(a.a)(n,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("RadioGroup",{attrs:{type:"button"},on:{"on-change":t.onSelectTime},model:{value:t.selectIndexTime,callback:function(e){t.selectIndexTime=e},expression:"selectIndexTime"}},t._l(t.options.shortcuts,(function(e,i){return a("Radio",{key:i,attrs:{label:i}},[t._v(t._s(e.text))])})),1)}),[],!1,null,null,null);e.a=a.exports}}]); |