webpackJsonp([32],{ANgs:function(t,e){},H9qS:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=a("Xxa5"),i=a.n(n),r=a("exGp"),s=a.n(r),l={props:{rule_id:{type:Number|String,default:function(){return""}}},data:function(){return{loading:!1,dataPreview:[{bigTitle:"扫码总客户数",smallTitle:"今日扫码总客户数",note:["扫码总人数:扫描渠道群活码的总客户数","今日扫码人数:今日扫描渠道群活码的总客户数"],bigNum:0,smallNum:0,bigParams:"scan_total",smallParams:"scan_today"},{bigTitle:"进群客户数",smallTitle:"今日进群客户数",note:["进群客户数:扫描渠道群活码进群的总客户数","今日进群客户数:今日扫描渠道群活码进群的总客户数"],bigNum:0,smallNum:0,bigParams:"join_total",smallParams:"join_today"},{bigTitle:"退群客户数",smallTitle:"今日退群客户数",note:["退群客户数:扫描渠道群活码退群的总客户数","今日退群客户数:今日扫描渠道群活码退群的总客户数"],bigNum:0,smallNum:0,bigParams:"loss_total",smallParams:"loss_today"},{bigTitle:"流失率",smallTitle:"",note:["扫描渠道群活码退群总客户数占比"],bigNum:"0.00%",smallNum:"",bigParams:"loss_rate",smallParams:""},{bigTitle:"留存率",smallTitle:"",note:["扫描渠道群活码在群客户数占比"],bigNum:"0.00%",smallNum:"",bigParams:"keep_rate",smallParams:""}]}},created:function(){this.handleGetData()},methods:{handleGetData:function(){var t=this;return s()(i.a.mark(function e(){var a,n,r;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t.loading=!0,e.next=4,t.$axios.get(t.URL.BASEURL+t.URL.groupCode_condition,{params:{rule_id:t.rule_id}});case 4:a=e.sent,n=a.data,(r=void 0===n?{}:n)&&0==r.errno?t.dataPreview.forEach(function(t){t.bigTitle&&(t.bigNum=r.rst[t.bigParams]),t.smallTitle&&(t.smallNum=r.rst[t.smallParams])}):4002!=r.errno&&t.$message.warning(r.err),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("error => ",e.t0);case 13:return e.prev=13,t.loading=!1,e.finish(13);case 16:case"end":return e.stop()}},e,t,[[0,10,13,16]])}))()}}},o={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"dataBox"},t._l(t.dataPreview,function(e,n){return a("div",{key:n,staticClass:"box_item"},[a("div",{staticClass:"flex-align-center"},[a("span",{staticClass:"c-000 fWeight600"},[t._v(t._s(e.bigTitle?e.bigTitle:"-"))]),t._v(" "),e.note&&e.note.length>0?a("span",{staticClass:"lMarauto"},[a("el-tooltip",{staticClass:"disinblock",attrs:{placement:"top",effect:"light"}},[a("div",{attrs:{slot:"content"},slot:"content"},t._l(e.note,function(e,n){return a("div",{key:n},[t._v(t._s(e))])}),0),t._v(" "),a("i",{staticClass:"el-icon-question c-999"})])],1):t._e()]),t._v(" "),a("div",{staticClass:"f28 pad120"},[t._v("\n "+t._s(e.bigNum||0==e.bigNum?e.bigNum:"-")+"\n ")]),t._v(" "),a("div",{style:{opacity:e.smallTitle?"1":"0"}},[a("div",{staticClass:"splitLine"}),t._v(" "),a("div",{staticClass:"pad120"},[a("span",{staticClass:"c-666 f13"},[t._v(t._s(e.smallTitle?e.smallTitle:"-"))]),t._v(" "),a("span",{staticClass:"c-000 f13"},[t._v(t._s(e.smallNum||0==e.smallNum?e.smallNum:"-"))])])])])}),0)},staticRenderFns:[]};var c=a("VU/8")(l,o,!1,function(t){a("ANgs")},"data-v-f4f99998",null).exports,d={name:"channelAnalysis",components:{datePicker:a("gzej").a},props:{rule_id:{type:Number|String,default:function(){return""}}},data:function(){return{loading:!1,height:"",desCol:[{prop:"ref_date",label:"统计时间"},{prop:"scan_total",label:"扫码总人数"},{prop:"keep_total",label:"留存总人数"}],default_time:[this.$getDay(-30,!1),this.$getDay(0,!1)],resetFlag:!1,myChart:null,time:[],xDate:[],scan_code_Data:[],scan_code_keep_Data:[],tableData:[]}},created:function(){this.height=document.documentElement.clientHeight-300>400?document.documentElement.clientHeight-300:400,this.time=this.default_time,this.init()},methods:{changeTime:function(t){!t||t&&0==t.length?this.time=[]:this.time=t,this.init()},trendEvent:function(){this.myChart&&this.myChart.clear();var t={title:"",tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},grid:{left:"3%",right:"3%",bottom:"3%",top:"2%",containLabel:!0},xAxis:[{type:"category",data:this.xDate,axisTick:{show:!1,alignWithLabel:!1}}],yAxis:[{type:"value"}],series:[{name:"当日扫码人数",type:"bar",barWidth:"40%",data:this.scan_code_Data},{name:"当日扫码留存人数",type:"bar",barWidth:"40%",data:this.scan_code_keep_Data}]};this.myChart=this.myChart?this.myChart:this.$echarts.init(document.getElementById("trend")),this.myChart.setOption(t,!0)},init:function(){var t=this;return s()(i.a.mark(function e(){var a,n,r;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t.loading=!0,e.next=4,t.$axios.get(t.URL.BASEURL+t.URL.groupCode_dailyReport,{params:{rule_id:t.rule_id,start_date:t.time[0],end_date:t.time[1]}});case 4:if(a=e.sent,n=a.data,!(r=void 0===n?{}:n)||0!=r.errno){e.next=18;break}return t.xDate=[],t.scan_code_Data=[],t.scan_code_keep_Data=[],r.rst.forEach(function(e){t.xDate.push(e.ref_date),t.scan_code_Data.push(e.scan_total),t.scan_code_keep_Data.push(e.keep_total)}),t.tableData=r.rst.reverse(),e.next=15,t.$nextTick();case 15:t.trendEvent(),e.next=19;break;case 18:4002!=r.errno&&t.$message.warning(r.err);case 19:e.next=24;break;case 21:e.prev=21,e.t0=e.catch(0),console.log("error => ",e.t0);case 24:return e.prev=24,t.loading=!1,e.finish(24);case 27:case"end":return e.stop()}},e,t,[[0,21,24,27]])}))()}}},u={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}]},[a("div",{staticClass:"timeBox"},[a("date-picker",{attrs:{title:"",quickFlag:!0,afferent_time:t.default_time,clearFlag:!1,reset:t.resetFlag},on:{changeTime:t.changeTime}})],1),t._v(" "),a("div",{staticStyle:{width:"100%",height:"300px"},attrs:{id:"trend"}}),t._v(" "),a("el-table",{staticStyle:{width:"100%"},attrs:{border:"",height:t.height,data:t.tableData,"tooltip-effect":"dark","header-cell-style":function(){return{backgroundColor:"#f9f9f9 !important"}}}},[t._l(t.desCol,function(e){return[a("el-table-column",{key:e.prop,attrs:{label:e.label,"min-width":e.min_width?e.min_width:120,align:"center"},scopedSlots:t._u([{key:"default",fn:function(n){var i=n.row;return[a("div",[t._v("\n "+t._s(i[e.prop]||0==i[e.prop]?i[e.prop]:"-")+"\n ")])]}}],null,!0)})]})],2)],1)},staticRenderFns:[]};var p=a("VU/8")(d,u,!1,function(t){a("V2Op")},"data-v-1c3be122",null).exports,m=a("McOJ"),g=a("M4fF"),h=a.n(g),_={name:"groupAnalysis",components:{selfInput:m.a},props:{rule_id:{type:Number|String,default:function(){return""}}},data:function(){return{loading:!1,height:"",desCol:[{prop:"chat_id",label:"客户群id"},{prop:"name",label:"客户信息"},{prop:"group_nickname",label:"群内昵称"},{prop:"user_id",label:"userId"},{prop:"status",label:"在群状态"},{prop:"join_time",label:"进群时间"}],tableData:[],keyword:"",total:0,page:1,pages:0,page_size:20}},created:function(){this.height=document.documentElement.clientHeight-300>400?document.documentElement.clientHeight-300:400,this.init()},methods:{handleCurrentChange:function(t){this.page=t,this.init()},onChangeKeyword:function(t){this.keyword=t,this.page=1,this.init()},init:function(t){var e=this;return s()(i.a.mark(function a(){var n,r,s;return i.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(a.prev=0,"export"!==t||e.tableData.length){a.next=4;break}return e.$message.warning("暂无数据可导出"),a.abrupt("return");case 4:return e.loading=!0,a.next=7,e.$axios.get(e.URL.BASEURL+e.URL.groupCode_customerList,{params:{rule_id:e.rule_id,keyword:e.keyword,page:"export"===t?1:e.page,page_size:"export"===t?e.$store.state.exportNumber:e.page_size}});case 7:n=a.sent,r=n.data,(s=void 0===r?{}:r)&&0==s.errno?"export"===t?e.exportEvent(s.rst.data):(e.tableData=s.rst.data,e.total=s.rst.pageInfo.total,e.pages=s.rst.pageInfo.pages):4002!=s.errno&&e.$message.warning(s.err),a.next=16;break;case 13:a.prev=13,a.t0=a.catch(0),console.log("error => ",a.t0);case 16:return a.prev=16,e.loading=!1,a.finish(16);case 19:case"end":return a.stop()}},a,e,[[0,13,16,19]])}))()},exportEvent:function(t){var e=this.desCol.map(function(t){return t.label}),a=this.desCol.map(function(t){return t.prop}),n=h.a.cloneDeep(t);n.forEach(function(t){t.status=1==t.status?"正常":2==t.status?"退群":"-"});var i=[{tHeader:e,filterVal:a,tableDatas:n,sheetName:""}];this.$exportOrder({excelDatas:i,name:"渠道群活码-分析数据-客户列表(导出时间:"+this.$getDay(0)+")"})}}},f={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}]},[a("div",{staticClass:"flex"},[a("self-input",{attrs:{hasLabel:!1,label_name:"搜索客户"},on:{inputChange:t.onChangeKeyword}}),t._v(" "),a("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.init("export")}}},[t._v("导出excle")])],1),t._v(" "),a("el-table",{staticStyle:{width:"100%"},attrs:{border:"",height:t.height,data:t.tableData,"tooltip-effect":"dark","header-cell-style":function(){return{backgroundColor:"#f9f9f9 !important"}}}},[t._l(t.desCol,function(e){return[a("el-table-column",{key:e.prop,attrs:{label:e.label,"min-width":e.min_width?e.min_width:120,align:"center"},scopedSlots:t._u([{key:"default",fn:function(n){var i=n.row;return["status"==e.prop?a("div",[t._v("\n "+t._s(1==i.status?"正常":2==i.status?"退群":"-")+"\n ")]):a("div",[t._v("\n "+t._s(i[e.prop]||0===i[e.prop]?i[e.prop]:"-")+"\n ")])]}}],null,!0)})]})],2),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:t.total>0,expression:"total > 0"}],staticClass:"pagination"},[a("el-pagination",{attrs:{background:"","current-page":t.page,layout:"prev, pager, next","page-count":Number(t.pages)},on:{"current-change":t.handleCurrentChange}})],1)],1)},staticRenderFns:[]};var v=a("VU/8")(_,f,!1,function(t){a("RGKA")},"data-v-37838e5c",null).exports,b={name:"groupAnalysis",props:{rule_id:{type:Number|String,default:function(){return""}}},data:function(){return{loading:!1,height:"",desCol:[{prop:"chat_id",label:"客户群id"},{prop:"chat_group_name",label:"群聊名称"},{prop:"join_total",label:"入群人数"},{prop:"loss_total",label:"退群人数"},{prop:"keep_rate",label:"留存率"}],tableData:[]}},created:function(){this.height=document.documentElement.clientHeight-300>400?document.documentElement.clientHeight-300:400,this.init()},methods:{init:function(){var t=this;return s()(i.a.mark(function e(){var a,n,r;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t.loading=!0,e.next=4,t.$axios.get(t.URL.BASEURL+t.URL.groupCode_analysis,{params:{rule_id:t.rule_id}});case 4:a=e.sent,n=a.data,(r=void 0===n?{}:n)&&0==r.errno?t.tableData=r.rst:4002!=r.errno&&t.$message.warning(r.err),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("error => ",e.t0);case 13:return e.prev=13,t.loading=!1,e.finish(13);case 16:case"end":return e.stop()}},e,t,[[0,10,13,16]])}))()}}},y={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}]},[a("el-table",{staticStyle:{width:"100%"},attrs:{border:"",height:t.height,data:t.tableData,"tooltip-effect":"dark","header-cell-style":function(){return{backgroundColor:"#f9f9f9 !important"}}}},[t._l(t.desCol,function(e){return[a("el-table-column",{key:e.prop,attrs:{label:e.label,"min-width":e.min_width?e.min_width:120,align:"center"},scopedSlots:t._u([{key:"default",fn:function(n){var i=n.row;return[a("div",[t._v("\n "+t._s(i[e.prop]||0==i[e.prop]?i[e.prop]:"-")+"\n ")])]}}],null,!0)})]})],2)],1)},staticRenderFns:[]};var x={name:"groupCodeAnalyse",components:{condition:c,channelAnalysis:p,customerList:v,groupAnalysis:a("VU/8")(b,y,!1,function(t){a("j0x3")},"data-v-40e47e47",null).exports},data:function(){return{id:this.$route.params.id,tagType:0,switchList:[{name:"渠道分析",id:0},{name:"客户列表",id:1},{name:"群分析",id:2}]}},created:function(){},methods:{}},k={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"con"},[a("div",{staticClass:"backBox",on:{click:function(e){return t.$router.go(-1)}}},[t._m(0)]),t._v(" "),a("condition",{attrs:{rule_id:t.id}}),t._v(" "),a("div",{staticClass:"topTagBox"},[a("div",{staticClass:"flex-align-center bMar15"},t._l(t.switchList,function(e){return a("div",{key:e.id,class:["tagItem",t.tagType===e.id?"tagItem_active":""],on:{click:function(a){t.tagType=e.id}}},[t._v("\n "+t._s(e.name?e.name:"-")+"\n ")])}),0),t._v(" "),0===t.tagType?a("channelAnalysis",{attrs:{rule_id:t.id}}):t._e(),t._v(" "),1===t.tagType?a("customerList",{attrs:{rule_id:t.id}}):t._e(),t._v(" "),2===t.tagType?a("groupAnalysis",{staticStyle:{"margin-top":"30px"},attrs:{rule_id:t.id}}):t._e()],1)],1)},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"back"},[e("i",{staticClass:"el-icon-back"}),this._v(" "),e("span",[this._v("返回")])])}]};var C=a("VU/8")(x,k,!1,function(t){a("eNsu")},"data-v-4d84f7f2",null);e.default=C.exports},RGKA:function(t,e){},V2Op:function(t,e){},eNsu:function(t,e){},j0x3:function(t,e){}});