webpackJsonp([31],{Dq6T:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=a("CCn6"),r={name:"index",data:function(){return{searchFrom:{watchTime:[]},dialogLoading:!1,dialogVisible:!1,tableData:[],dialog:{list:[],total:0,register:0,course:0,codeList:[]},tableHead:{}}},methods:{defaultTime:function(){var e=new Date,t=e.getFullYear(),a=e.getMonth()+1;a<10&&(a="0"+a);var l=e.getDate();l<10&&(l="0"+l);var r=t+"-"+a+"-01",i=t+"-"+a+"-"+l;this.searchFrom.watchTime=[r,i]},toDetail:function(e,t){var a=this;this.dialogLoading=!0,this.dialogVisible=!0;var r={cur_date:e,code:t};Object(l._39)(r).then(function(e){a.dialog.list=e.list,a.dialog.register=e.register,a.dialog.course=e.course,a.dialog.code=e.source,a.dialogLoading=!1})},getList:function(){var e=this,t={};this.searchFrom.watchTime&&this.searchFrom.watchTime.length>0&&(t.start_at=this.searchFrom.watchTime[0],t.end_at=this.searchFrom.watchTime[1]),Object(l._45)(t).then(function(t){e.tableHead=t[0],e.tableData=t.slice(1)})}},mounted:function(){this.defaultTime(),this.getList()}},i={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"index"},[a("el-form",{ref:"searchFrom",attrs:{model:e.searchFrom,"label-width":"100px"}},[a("el-row",[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"时间"}},[a("el-date-picker",{attrs:{type:"daterange","range-separator":"至","start-placeholder":"开始日期","value-format":"yyyy-MM-dd","end-placeholder":"结束日期"},model:{value:e.searchFrom.watchTime,callback:function(t){e.$set(e.searchFrom,"watchTime",t)},expression:"searchFrom.watchTime"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:6,offset:6}},[a("el-form-item",{staticStyle:{float:"right"}},[a("el-button",{attrs:{type:"primary"},on:{click:e.getList}},[e._v("搜索")])],1)],1)],1)],1),e._v(" "),a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.tableData,border:""}},e._l(e.tableHead,function(t,l){return a("el-table-column",{key:t,attrs:{label:t},scopedSlots:e._u([{key:"default",fn:function(t){return["cur_date"!==l?a("div",{staticClass:"link",on:{click:function(a){e.toDetail(t.row.cur_date,l)}}},[e._v("\n          "+e._s(t.row[l])+"\n        ")]):e._e(),e._v(" "),"cur_date"===l?a("span",[e._v(" "+e._s(t.row[l]))]):e._e()]}}])})})),e._v(" "),a("el-dialog",{attrs:{title:"详情",visible:e.dialogVisible,width:"80%"},on:{"update:visible":function(t){e.dialogVisible=t}}},[a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.dialogLoading,expression:"dialogLoading"}]},[a("el-row",[a("el-col",{attrs:{span:8}},[e._v("\n          总数："+e._s(e.dialog.total)+"\n        ")]),e._v(" "),a("el-col",{attrs:{span:8}},[e._v("\n          注册数："+e._s(e.dialog.register)+"\n        ")]),e._v(" "),a("el-col",{attrs:{span:8}},[e._v("\n          有课人数："+e._s(e.dialog.course)+"\n        ")])],1),e._v(" "),a("el-row",e._l(e.dialog.code,function(t,l){return a("el-col",{key:l,attrs:{span:8}},[e._v("\n          来源/人："+e._s(t.source_name)+"/"+e._s(t.source_num)+"\n        ")])})),e._v(" "),a("el-table",{ref:"dialogtable",staticStyle:{width:"100%"},attrs:{data:e.dialog.list}},[a("el-table-column",{attrs:{label:"状态"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n          "+e._s(e.tableHead[t.row.type])+"\n        ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"nickname",label:"昵称"}}),e._v(" "),a("el-table-column",{attrs:{prop:"user_id",label:"用户ID"}}),e._v(" "),a("el-table-column",{attrs:{prop:"instructor",label:"讲师"}}),e._v(" "),a("el-table-column",{attrs:{prop:"code",label:"邀请code"}}),e._v(" "),a("el-table-column",{attrs:{prop:"source_title",label:"标题"}})],1)],1)])],1)},staticRenderFns:[]};var o=a("VU/8")(r,i,!1,function(e){a("GeFe")},"data-v-50bc70f1",null);t.default=o.exports},GeFe:function(e,t){}});