webpackJsonp([26],{C3Ae:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var l={name:"index",data:function(){return{currents:{currentPage:1,currentTotal:0},ps:{pageNo:1,pageSize:20},currents1:{currentPage:1,currentTotal:0},ps1:{pageNo:1,pageSize:20},date:20,tableData:[],userData:[],dialogFormVisible:!1,tableTitleData:[{label:"用户昵称",prop:"userName"},{label:"手机号",prop:"phone"},{label:"中奖类型",prop:"winDesc"}]}},mounted:function(){this.getInfo()},methods:{getInfo:function(){var t=this,e={pageNum:this.ps.pageNo,pageSize:this.ps.pageSize};this.$axios("post","/activityBack/getActivityList",e).then(function(e){200===e.code&&(t.tableData=e.data.dataList,t.currents.currentTotal=e.data.total)})},handleCurrentChange:function(t){this.ps.pageNo=t,this.getInfo()},pickLuckyUsers:function(){var t=this,e={date:this.date};this.$axios("post","/activityBack/pickLuckyUsers",e).then(function(e){200===e.code&&(t.userData=e.data,t.dialogFormVisible=!0)})},handleDownloadData:function(){for(var t=this,e=this.tableTitleData,l=[],n=[],s=0;s<e.length;s++)l[s]=e[s].label,n[s]=e[s].prop;a.e(32).then(function(){var e=a("zWO4").export_json_to_excel,s=l,i=n,r=t.userData;e(s,t.formatJson(i,r),"中奖用户记录")}.bind(null,a)).catch(a.oe)},formatJson:function(t,e){return e.map(function(e){return t.map(function(t){return e[t]})})},fromDate:function(t){var e=t.getFullYear(),a=t.getMonth()+1;a=a<10?"0"+a:a;var l=t.getDate();return e+"-"+a+"-"+(l=l<10?"0"+l:l)}}},n={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"info-table"},[a("div",{staticClass:"fx align-items justify-between mt-15 mb-15 ml-10 mr-10"},[a("div",{staticClass:"fs-18 fw-600"},[t._v("参与活动用户名单")]),t._v(" "),a("div",{staticClass:"fx align-items"},[a("div",[t._v("\n        抽取\n        "),a("el-select",{staticStyle:{width:"100px"},attrs:{placeholder:"请选择",size:"small"},model:{value:t.date,callback:function(e){t.date=e},expression:"date"}},[a("el-option",{attrs:{value:20,label:"20"}}),t._v(" "),a("el-option",{attrs:{value:30,label:"30"}})],1),t._v("\n        号颁奖的幸运用户\n      ")],1),t._v(" "),a("div",{staticClass:"ml-10"},[a("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.pickLuckyUsers}},[t._v("抽取幸运用户")])],1)])]),t._v(" "),a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.tableData,"header-cell-class-name":"bg-f5"}},[a("el-table-column",{attrs:{fixed:"",type:"index",label:"序号",align:"center",width:"100"}}),t._v(" "),a("el-table-column",{attrs:{prop:"userName",label:"用户昵称"}}),t._v(" "),a("el-table-column",{attrs:{prop:"phone",label:"手机号"}}),t._v(" "),a("el-table-column",{attrs:{label:"收获地址"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.address))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"创建时间"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.createTime))])]}}])})],1),t._v(" "),a("el-pagination",{staticClass:"pagination",attrs:{background:"","hide-on-single-page":!0,"current-page":t.currents.currentPage,"page-sizes":[15,20,30],"page-size":15,layout:"total, prev, pager, next, jumper",total:t.currents.currentTotal},on:{"current-change":t.handleCurrentChange}}),t._v(" "),a("el-dialog",{attrs:{title:"幸运用户列表",visible:t.dialogFormVisible,width:"80%"},on:{"update:visible":function(e){t.dialogFormVisible=e}}},[a("div",{staticClass:"fx fx-end"},[a("el-button",{staticClass:"ml-10",staticStyle:{"margin-right":"10px"},attrs:{type:"success",size:"small",icon:"el-icon-folder-checked"},on:{click:t.handleDownloadData}},[t._v("导出中奖用户记录")])],1),t._v(" "),a("el-table",{staticStyle:{width:"100%","margin-top":"20px"},attrs:{data:t.userData,"header-cell-class-name":"bg-f5"}},[a("el-table-column",{attrs:{fixed:"",type:"index",label:"序号",align:"center",width:"200"}}),t._v(" "),a("el-table-column",{attrs:{prop:"userName",label:"用户昵称"}}),t._v(" "),a("el-table-column",{attrs:{prop:"phone",label:"手机号"}}),t._v(" "),a("el-table-column",{attrs:{prop:"winDesc",label:"中奖类型"}})],1)],1)],1)},staticRenderFns:[]};var s=a("VU/8")(l,n,!1,function(t){a("WWVc")},"data-v-576f53b0",null);e.default=s.exports},WWVc:function(t,e,a){var l=a("wfV/");"string"==typeof l&&(l=[[t.i,l,""]]),l.locals&&(t.exports=l.locals);a("rjj0")("b13cf5e0",l,!0,{})},"wfV/":function(t,e,a){(t.exports=a("FZ+f")(!1)).push([t.i,"\n.w-100[data-v-576f53b0]{\n  width: 100px;\n}\n.w-150[data-v-576f53b0]{\n  width: 150px;\n}\n.w-185[data-v-576f53b0]{\n  width: 185px;\n}\n",""])}});