chunk-ad2458fe.41a1fcc0.js 14 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-ad2458fe"],{"0325":function(t,e,a){var i,o,n;(function(s,r){o=[e,a("4d28")],i=r,n="function"===typeof i?i.apply(e,o):i,void 0===n||(t.exports=n)})(0,(function(t,e){var a=function(t){"undefined"!==typeof console&&console&&console.error&&console.error(t)};if(e){var i=["#C1232B","#27727B","#FCCE10","#E87C25","#B5C334","#FE8463","#9BCA63","#FAD860","#F3A43B","#60C0DD","#D7504B","#C6E579","#F4E001","#F0805A","#26C0C0"],o={color:i,title:{textStyle:{fontWeight:"normal",color:"#27727B"}},visualMap:{color:["#C1232B","#FCCE10"]},toolbox:{iconStyle:{normal:{borderColor:i[0]}}},tooltip:{backgroundColor:"rgba(50,50,50,0.5)",axisPointer:{type:"line",lineStyle:{color:"#27727B",type:"dashed"},crossStyle:{color:"#27727B"},shadowStyle:{color:"rgba(200,200,200,0.3)"}}},dataZoom:{dataBackgroundColor:"rgba(181,195,52,0.3)",fillerColor:"rgba(181,195,52,0.2)",handleColor:"#27727B"},categoryAxis:{axisLine:{lineStyle:{color:"#27727B"}},splitLine:{show:!1}},valueAxis:{axisLine:{show:!1},splitArea:{show:!1},splitLine:{lineStyle:{color:["#ccc"],type:"dashed"}}},timeline:{itemStyle:{color:"#27727B"},lineStyle:{color:"#27727B"},controlStyle:{color:"#27727B",borderColor:"#27727B"},symbol:"emptyCircle",symbolSize:3},line:{itemStyle:{borderWidth:2,borderColor:"#fff",lineStyle:{width:3},emphasis:{borderWidth:0}},symbol:"circle",symbolSize:3.5},candlestick:{itemStyle:{color:"#c1232b",color0:"#b5c334"},lineStyle:{width:1,color:"#c1232b",color0:"#b5c334"},areaStyle:{color:"#c1232b",color0:"#27727b"}},graph:{itemStyle:{color:"#c1232b"},linkStyle:{color:"#b5c334"}},map:{itemStyle:{color:"#f2385a",areaColor:"#ddd",borderColor:"#eee"},areaStyle:{color:"#fe994e"},label:{color:"#c1232b"}},gauge:{axisLine:{lineStyle:{color:[[.2,"#B5C334"],[.8,"#27727B"],[1,"#C1232B"]]}},axisTick:{splitNumber:2,length:5,lineStyle:{color:"#fff"}},axisLabel:{textStyle:{color:"#fff"}},splitLine:{length:"5%",lineStyle:{color:"#fff"}},title:{offsetCenter:[0,-20]}}};e.registerTheme("infographic",o)}else a("ECharts is not Loaded")}))},"0d8c":function(t,e,a){},"13fe":function(t,e,a){"use strict";a("0d8c")},2145:function(t,e,a){"use strict";a("57d7")},"23c9":function(t,e,a){},"57d7":function(t,e,a){},ad5e:function(t,e,a){},bbbc:function(t,e,a){"use strict";a("23c9")},bd64:function(t,e,a){"use strict";a("ad5e")},ec11:function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t._self._c;return e("a-card",{attrs:{bordere:!1}},[e("div",[e("div",{staticClass:"title"},[t._v("RF分析")]),e("a-table",{staticClass:"tableBox",attrs:{rowKey:function(t,e){return e},bordered:"",columns:t.RFColumns,"data-source":t.RFData,pagination:!1},scopedSlots:t._u([{key:"unit",fn:function(e){return[t._v(t._s(e?e+"人":" -- "))]}}])})],1),e("div",[e("div",{staticClass:"title"},[t._v("RM分析")]),e("a-table",{staticClass:"tableBox",attrs:{rowKey:function(t,e){return e},bordered:"",columns:t.RMColumns,"data-source":t.RMData,pagination:!1},scopedSlots:t._u([{key:"unit",fn:function(e){return[t._v(t._s(e?e+"人":" -- "))]}}])})],1),e("div",{staticClass:"componentsTag"},[e("div",{staticClass:"title"},[t._v("消费分析")]),e("a-radio-group",{style:{marginBottom:"20px"},attrs:{"button-style":"solid"},on:{change:t.radioChange},model:{value:t.componentsTag,callback:function(e){t.componentsTag=e},expression:"componentsTag"}},[e("a-radio-button",{attrs:{value:1}},[t._v("消费力")]),e("a-radio-button",{attrs:{value:2}},[t._v("消费频次")]),e("a-radio-button",{attrs:{value:3}},[t._v("复购周期")])],1)],1),e("p",{staticStyle:{"margin-bottom":"20px",color:"gray"}},[t._v("注:数据每60分钟更新一次")]),e("div",{staticClass:"componentsBox"},[1==t.componentsTag?e("Intensity"):t._e(),2==t.componentsTag?e("Frequency"):t._e(),3==t.componentsTag?e("Repurchase"):t._e()],1)])},o=[],n=(a("9f29"),a("0528"),a("b775")),s={getRf:"/order/rf",getRm:"/order/rm",getClist:"/order/clist",getFlist:"/order/flist",getRepurChase:"/order/repurchase",orderFxExport:"/order/orderFxExport"};function r(t){return Object(n["b"])({url:s.getRf,method:"get",params:t})}function c(t){return Object(n["b"])({url:s.getRm,method:"get",params:t})}function l(t){return Object(n["b"])({url:s.getClist,method:"get",params:t})}function d(t){return Object(n["b"])({url:s.getFlist,method:"get",params:t})}function u(t){return Object(n["b"])({url:s.getRepurChase,method:"get",params:t})}function m(t){return Object(n["b"])({url:s.orderFxExport,method:"get",params:t})}var h=function(){var t=this,e=t._self._c;return e("a-spin",{attrs:{spinning:t.isLoading}},[e("div",{staticClass:"timeSelectContent"},[e("a-radio-group",{staticClass:"m20",on:{change:t.changeChoose},model:{value:t.modeType,callback:function(e){t.modeType=e},expression:"modeType"}},[e("a-radio-button",{attrs:{value:1}},[t._v("今日")]),e("a-radio-button",{attrs:{value:2}},[t._v("本周")]),e("a-radio-button",{attrs:{value:3}},[t._v("本月")]),e("a-radio-button",{attrs:{value:4}},[t._v("本年")])],1),e("a-range-picker",{staticClass:"inputW240 m20",attrs:{placeholder:["开始时间","结束时间"]},on:{change:t.changeCustomTime},model:{value:t.customTime,callback:function(e){t.customTime=e},expression:"customTime"}}),e("a-button",{staticClass:"m20",attrs:{type:"primary"},on:{click:t.orderFxExport}},[t._v("导出用户信息")])],1),e("div",{staticClass:"echartsBody"},[e("div",{staticStyle:{width:"100%",height:"500px"},attrs:{id:"main"}})])])},f=[],p=(a("9b2d"),a("2f42")),y=a.n(p),g=a("4d28"),b=a.n(g),v=(a("0325"),{components:{},data:function(){return{isLoading:!1,queryParam:{},customTime:[y()().startOf("day"),y()().endOf("day")],echartsData:[],modeType:1}},created:function(){this.getData()},mounted:function(){window.onresize=function(){var t=b.a.init(document.getElementById("main"),"infographic");t.resize()}},beforeDestroy:function(){window.onresize=null},methods:{getData:function(){var t=this;this.queryParam.betweenTime=this.customTime,this.queryParam.ftype=this.modeType,this.isLoading=!0,l(this.queryParam).then((function(e){t.echartsData=e.data.data||[],t.changeEcharts(),t.isLoading=!1})).finally((function(){t.isLoading=!1}))},orderFxExport:function(){var t=this;m({betweenTime:this.customTime}).then((function(e){t.$message.success(e.message,1.5),t.exportDataThen(e)})).finally((function(){t.isLoading=!1}))},exportDataThen:function(t){var e=document.createElement("a");e.href=t.data.file,e.setAttribute("download",t.data.filename),e.click(),e=null},changeCustomTime:function(t){this.customTime=t,this.queryParam.ftype=this.modeType=0,this.getData()},changeChoose:function(t){this.modeType=t.target.value||1,2==this.modeType?this.customTime=[y()().weekday(0),y()().weekday(6)]:3==this.modeType?this.customTime=[y()().startOf("month"),y()().endOf("month")]:4==this.modeType?this.customTime=[y()().startOf("year"),y()().endOf("year")]:this.customTime=[y()().startOf("day"),y()().endOf("day")],this.getData()},changeEcharts:function(){var t=this;this.$nextTick((function(){t.myEcharts()}))},myEcharts:function(){var t=["M<200","200≤M<1000","M≥1000"],e=[],a=[];this.echartsData.forEach((function(t,i){e.push(t.title),a.push({name:t.title,type:"bar",areaStyle:{normal:{opacity:.2}},data:t.value})}));var i=b.a.init(document.getElementById("main"),"infographic"),o=["#30B958","#3290FA"],n={color:o,tooltip:{trigger:"axis"},legend:{data:e,y:"bottom"},grid:{left:"8%",right:"5%"},yAxis:{type:"category",data:t},xAxis:{type:"value",axisLabel:{formatter:"{value} 人"},minInterval:1},series:a};n&&i.setOption(n,!0)}}}),x=v,T=(a("2145"),a("829d")),C=Object(T["a"])(x,h,f,!1,null,"25c7d574",null),w=C.exports,S=function(){var t=this,e=t._self._c;return e("a-spin",{attrs:{spinning:t.isLoading}},[e("div",{staticClass:"timeSelectContent"},[e("a-radio-group",{staticClass:"m20",on:{change:t.changeChoose},model:{value:t.modeType,callback:function(e){t.modeType=e},expression:"modeType"}},[e("a-radio-button",{attrs:{value:1}},[t._v("今日")]),e("a-radio-button",{attrs:{value:2}},[t._v("本周")]),e("a-radio-button",{attrs:{value:3}},[t._v("本月")]),e("a-radio-button",{attrs:{value:4}},[t._v("本年")])],1),e("a-range-picker",{staticClass:"inputW240 m20",attrs:{placeholder:["开始时间","结束时间"]},on:{change:t.changeCustomTime},model:{value:t.customTime,callback:function(e){t.customTime=e},expression:"customTime"}}),e("a-button",{staticClass:"m20",attrs:{type:"primary"},on:{click:t.orderFxExport}},[t._v("导出用户信息")])],1),e("div",{staticClass:"echartsBody"},[e("div",{staticStyle:{width:"100%",height:"500px"},attrs:{id:"main"}})])])},D=[],E={components:{},data:function(){return{isLoading:!1,showSelBox:!1,queryParam:{},customTime:[y()().startOf("day"),y()().endOf("day")],timeSelectType:2,modeType:1,echartsData:[]}},created:function(){this.getData()},mounted:function(){window.onresize=function(){var t=b.a.init(document.getElementById("main"),"infographic");t.resize()}},beforeDestroy:function(){window.onresize=null},methods:{getData:function(){var t=this;this.queryParam.betweenTime=this.customTime,this.queryParam.ftype=this.modeType,this.isLoading=!0,d(this.queryParam).then((function(e){t.echartsData=e.data.data||[],t.changeEcharts(),t.isLoading=!1})).finally((function(){t.isLoading=!1}))},orderFxExport:function(){var t=this;m({betweenTime:this.customTime}).then((function(e){t.$message.success(e.message,1.5),t.exportDataThen(e)})).finally((function(){t.isLoading=!1}))},exportDataThen:function(t){var e=document.createElement("a");e.href=t.data.file,e.setAttribute("download",t.data.filename),e.click(),e=null},changeCustomTime:function(t){this.customTime=t,this.queryParam.ftype=this.modeType=0,this.getData()},changeChoose:function(t){this.modeType=t.target.value||1,2==this.modeType?this.customTime=[y()().weekday(0),y()().weekday(6)]:3==this.modeType?this.customTime=[y()().startOf("month"),y()().endOf("month")]:4==this.modeType?this.customTime=[y()().startOf("year"),y()().endOf("year")]:this.customTime=[y()().startOf("day"),y()().endOf("day")],this.getData()},changeEcharts:function(){var t=this;this.$nextTick((function(){t.myEcharts()}))},myEcharts:function(){var t=[],e=[];this.echartsData.forEach((function(a,i){t.push(a.title),e.push({name:a.title,type:"bar",areaStyle:{normal:{opacity:.2}},data:a.value})}));var a=b.a.init(document.getElementById("main"),"infographic"),i=["#30B958","#3290FA"],o={color:i,tooltip:{trigger:"axis"},legend:{data:t,y:"bottom"},grid:{left:"5%",right:"5%"},yAxis:{type:"category",data:["F=1","2≤F<5","F≥5"]},xAxis:{type:"value",axisLabel:{formatter:"{value} 人"},minInterval:1},series:e};o&&a.setOption(o,!0)}}},R=E,B=(a("13fe"),Object(T["a"])(R,S,D,!1,null,"cb34313e",null)),F=B.exports,_=function(){var t=this,e=t._self._c;return e("a-spin",{attrs:{spinning:t.isLoading}},[e("div",{staticClass:"timeSelectContent"},[e("a-range-picker",{staticClass:"inputW240 m20",attrs:{placeholder:["开始时间","结束时间"]},on:{change:t.changeCustomTime},model:{value:t.customTime,callback:function(e){t.customTime=e},expression:"customTime"}}),e("a-button",{staticClass:"m20",attrs:{type:"primary"},on:{click:t.orderFxExport}},[t._v("导出用户信息")])],1),e("div",{staticClass:"echartsBody"},[e("div",{staticStyle:{width:"100%",height:"500px"},attrs:{id:"main"}})])])},k=[],L={components:{},data:function(){return{isLoading:!1,showSelBox:!1,queryParam:{},customTime:[y()().subtract(y()().month(),"month"),y()().subtract(y()().month()-6,"month")],startText:"",endText:"",tables:[],selTablesData:[],timeSelectType:2,modeType:1,echartsData:[]}},created:function(){this.getData()},mounted:function(){window.onresize=function(){var t=b.a.init(document.getElementById("main"),"infographic");t.resize()}},beforeDestroy:function(){window.onresize=null},methods:{getData:function(){var t=this;this.queryParam.betweenTime=this.customTime,this.isLoading=!0,u(this.queryParam).then((function(e){t.echartsData=e.data.data||[],t.changeEcharts(),t.isLoading=!1})).finally((function(){t.isLoading=!1}))},orderFxExport:function(){var t=this;m({betweenTime:this.customTime}).then((function(e){t.$message.success(e.message,1.5),t.exportDataThen(e)})).finally((function(){t.isLoading=!1}))},exportDataThen:function(t){var e=document.createElement("a");e.href=t.data.file,e.setAttribute("download",t.data.filename),e.click(),e=null},changeCustomTime:function(t){this.customTime=t,this.getData()},changeEcharts:function(){var t=this;this.$nextTick((function(){t.myEcharts()}))},myEcharts:function(){var t=[],e=[],a=this.echartsData,i=a.day1,o=a.day2,n=a.day3;e.push({name:"",type:"bar",areaStyle:{normal:{opacity:.2}},data:[i,o,n]});var s=b.a.init(document.getElementById("main"),"infographic"),r=["#3290FA"],c={color:r,tooltip:{trigger:"axis"},legend:{data:t,y:"bottom"},grid:{left:"5%",right:"5%"},yAxis:{type:"category",data:["0<D≤30","30<D≤60","D>60"]},xAxis:{type:"value",axisLabel:{formatter:"{value} 人"},minInterval:1},series:e};c&&s.setOption(c,!0)}}},O=L,I=(a("bbbc"),Object(T["a"])(O,_,k,!1,null,"18eb6b26",null)),A=I.exports,q=[{title:"R购买间隔时间(天)",dataIndex:"itemType",width:"300px"},{title:"F购买频率(次)",children:[{title:"F=1",dataIndex:"r1",width:"120px",scopedSlots:{customRender:"unit"}},{title:"2≤F<5",dataIndex:"r2",width:"120px",scopedSlots:{customRender:"unit"}},{title:"F≥5",dataIndex:"r3",width:"120px",scopedSlots:{customRender:"unit"}},{title:"合计",dataIndex:"r4",width:"120px",scopedSlots:{customRender:"unit"}}]}],M=[{title:"R购买间隔时间(天)",dataIndex:"itemType",width:"300px"},{title:"M购买金额(元)",children:[{title:"M<200",dataIndex:"r1",width:"120px",scopedSlots:{customRender:"unit"}},{title:"200≤M<1000",dataIndex:"r2",width:"120px",scopedSlots:{customRender:"unit"}},{title:"M≥1000",dataIndex:"r3",width:"120px",scopedSlots:{customRender:"unit"}},{title:"合计",dataIndex:"r4",width:"120px",scopedSlots:{customRender:"unit"}}]}],P={components:{Intensity:w,Frequency:F,Repurchase:A},data:function(){return{pageMode:1,componentsTag:1,RFColumns:q,RFData:[],RMColumns:M,RMData:[]}},created:function(){this.getRfData(),this.getRmData()},methods:{radioChange:function(t){},getRfData:function(){var t=this;r().then((function(e){var a=["R<7","7≤R<60","R≥60"],i=e.data.data||[];i.forEach((function(t,e){t.itemType=a[e]||"--"})),t.RFData=i})).finally((function(){t.isLoading=!1}))},getRmData:function(){var t=this;c().then((function(e){var a=["R<7","7≤R<60","R≥60"],i=e.data.data||[];i.forEach((function(t,e){t.itemType=a[e]||"--"})),t.RMData=i})).finally((function(){t.isLoading=!1}))}}},z=P,j=(a("bd64"),Object(T["a"])(z,i,o,!1,null,"9c8443fc",null));e["default"]=j.exports}}]);