webpackJsonp([51],{Gi2r:function(e,t){},lWjU:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a("CCn6");function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}var s={name:"index",data:function(){var e,t=this;return r(e={list:[],dateList:[],propertyList:["title","start_at","total_join_num","total_max_join_num","total_target_join_num","complete_rate","target_diff","wait_join_num","other_wait_join_num"],periodList:[],searchFrom:{payTime:[],start_at:"",end_at:"",invite_type:"",invite_name:"",watch_num:"",periods_id:"",squad:"",teacher_id:"",periods_title:""},periods_id:""},"periodList",[]),r(e,"total",0),r(e,"today",{text:"今天",onClick:function(){t.searchFrom.payTime=[t.formatTime(new Date)+" 00:00:00",t.formatTime(new Date)+" 23:59:59"]}}),r(e,"yesterday",{text:"昨天",onClick:function(){var e=t.formatTime(new Date((new Date).getTime()-864e5));t.searchFrom.payTime=[e+" 00:00:00",e+" 23:59:59"]}}),r(e,"last30Day",{text:"过去30天",onClick:function(){var e=t.formatTime(new Date((new Date).getTime()-2592e6));t.searchFrom.payTime=[e+" 00:00:00",t.formatTime(new Date)+" 23:59:59"]}}),r(e,"last7Day",{text:"过去7天",onClick:function(){var e=t.formatTime(new Date((new Date).getTime()-6048e5));t.searchFrom.payTime=[e+" 00:00:00",t.formatTime(new Date)+" 23:59:59"]}}),r(e,"watchList",[{id:0,title:5},{id:1,title:6},{id:2,title:10},{id:3,title:20}]),e},methods:{selectChange:function(e){this.searchFrom.watch_num=this.watchList[e].title,this.getList()},onPeriodChange:function(e){var t="";t=e.length>1?e.join(","):e[0],this.periods_id=t,console.log(t)},getPeriodsOtherList:function(){var e=this;Object(i._78)({limit:1e3,page:1}).then(function(t){e.periodList=t.list})},getList:function(){var e=this;this.list=[],this.dateList=[];var t={};this.searchFrom.invite_type&&(t.invite_type=this.searchFrom.invite_type),this.searchFrom.sort_value&&(t.sort_value=this.searchFrom.sort_value,t.sort_key=this.searchFrom.sort_key),this.searchFrom.squad&&(t.squad=this.searchFrom.squad),this.searchFrom.watch_num&&(t.watch_num=this.searchFrom.watch_num),this.periods_id&&(t.periods_ids=this.periods_id),this.searchFrom.payTime&&this.searchFrom.payTime.length>0&&(this.searchFrom.payTime[0]&&this.searchFrom.payTime[0].length>0&&(this.searchFrom.start_at=this.searchFrom.payTime[0],t.start_at=this.searchFrom.start_at),this.searchFrom.payTime[1]&&this.searchFrom.payTime[1].length>0&&(this.searchFrom.end_at=this.searchFrom.payTime[1],t.end_at=this.searchFrom.end_at)),Object(i._66)(t).then(function(t){e.list=t,t[0].date&&t[0].date.forEach(function(t){e.dateList.push(t.cur_date)})})},tableRowClassName:function(e){e.row;return 0===e.rowIndex?"warning-row":""},arraySpanMethod:function(e){}},created:function(){this.getList(),this.getPeriodsOtherList()}},n={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-form",{ref:"searchFrom",staticClass:"searchFrom",attrs:{model:e.searchFrom,"label-width":"100px",inline:""}},[a("el-form-item",{attrs:{label:"进量日期"}},[a("el-date-picker",{attrs:{type:"datetimerange","range-separator":"至","value-format":"yyyy-MM-dd HH:mm:ss","start-placeholder":"开始日期","end-placeholder":"结束日期","picker-options":{shortcuts:[e.today,e.yesterday,e.last7Day,e.last30Day]},"default-time":["00:00:00","23:59:59"]},on:{change:e.getList},model:{value:e.searchFrom.payTime,callback:function(t){e.$set(e.searchFrom,"payTime",t)},expression:"searchFrom.payTime"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"商品课时数"}},[a("el-select",{staticStyle:{width:"150px"},attrs:{filterable:"",placeholder:"请选择",clearable:""},on:{change:e.selectChange},model:{value:e.searchFrom.watch_num,callback:function(t){e.$set(e.searchFrom,"watch_num",t)},expression:"searchFrom.watch_num"}},e._l(e.watchList,function(e,t){return a("el-option",{key:t,attrs:{label:e.title,value:e.id}})}))],1),e._v(" "),a("el-form-item",{attrs:{label:"渠道code"}},[a("el-input",{staticStyle:{width:"110px"},model:{value:e.searchFrom.invite_type,callback:function(t){e.$set(e.searchFrom,"invite_type",t)},expression:"searchFrom.invite_type"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"期数名称",prop:"periods_title"}},[a("el-select",{attrs:{placeholder:"请选择",multiple:"",clearable:"",filterable:""},on:{change:e.onPeriodChange},model:{value:e.searchFrom.periods_id,callback:function(t){e.$set(e.searchFrom,"periods_id",t)},expression:"searchFrom.periods_id"}},e._l(e.periodList,function(e){return a("el-option",{key:e.id,attrs:{label:e.title,value:e.id}})}))],1),e._v(" "),a("el-form-item",[a("div",{staticClass:"flexRow"},[a("el-button",{attrs:{type:"primary",plain:""},on:{click:e.getList}},[e._v("搜索")])],1)])],1),e._v(" "),a("el-table",{attrs:{border:"",align:"center","header-cell-style":{background:"#5f5f5f",color:"#fff"},data:e.list,size:"mini",height:"calc(100vh - 210px)","row-class-name":e.tableRowClassName,"span-method":e.arraySpanMethod}},[a("el-table-column",{attrs:{prop:"periods_title",align:"center","min-width":"80",fixed:"",label:"期数名称"}}),e._v(" "),a("el-table-column",{attrs:{prop:"is_other","min-width":"160",align:"left",fixed:"",label:"渠道信息"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n 来源:"+e._s(0==t.row.is_other?"内部":"外部")),a("br"),e._v("\n 类别:"+e._s(t.row.invite_type_name)),a("br"),e._v("\n 名称:"+e._s(t.row.invite_name)),a("br"),e._v("\n 类型:"+e._s(t.row.invite_type)+"\n ")]}}])}),e._v(" "),e._l(e.dateList,function(t,i){return a("el-table-column",{key:i,attrs:{align:"center",label:t}},[a("el-table-column",{attrs:{align:"center","min-width":"60px",prop:"wait_join_num",label:"班级人数"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.date[i].sum_class_num))]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center","min-width":"60px",label:"好友数"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.date[i].sum_friend_num))]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center","min-width":"60px",prop:"wait_join_num",label:"好友率"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.date[i].friend_num_except_class_num)+"%")]}}])})],1)})],2)],1)},staticRenderFns:[]};var o=a("VU/8")(s,n,!1,function(e){a("Gi2r")},"data-v-53a85ef2",null);t.default=o.exports}});