webpackJsonp([33],{"Nyg+":function(e,t){},hLMI:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a("kmJW"),s=a("sf/l"),i=a("CCn6"),o={name:"index",components:{page:r.a},data:function(){return{total:0,nowPage:1,limit:10,searchFrom:{source:""},tableData:[]}},created:function(){this.initPage()},methods:{initPage:function(){var e=this,t={limit:this.limit,page:this.nowPage};this.searchFrom.time&&(t.time=this.searchFrom.time),this.searchFrom.source&&(t.source=this.searchFrom.source),this.searchFrom.time&&this.searchFrom.time.length>0&&(t.date_start=s.a.dateFmt(this.searchFrom.time[0],"yyyy-MM-dd hh:mm:ss"),t.date_end=s.a.dateFmt(this.searchFrom.time[1],"yyyy-MM-dd hh:mm:ss")),Object(i._1)(t).then(function(t){e.tableData=t.list,e.total=t.total})},onPageChange:function(e){this.nowPage=e,this.initPage()},onSizeChange:function(e){this.nowPage=1,this.limit=e,this.initPage()},doExport:function(){var e="?type=export";this.searchFrom.source&&(e=e+"&source="+this.searchFrom.source),this.searchFrom.time&&this.searchFrom.time.length>0&&(e=(e=e+"&date_start="+s.a.dateFmt(this.searchFrom.time[0],"yyyy-MM-dd hh:mm:ss"))+"&date_end="+s.a.dateFmt(this.searchFrom.time[1],"yyyy-MM-dd hh:mm:ss")),window.open("/api/public/ads/export/all"+e)}}},l={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":"80px"}},[a("el-row",[a("el-col",{attrs:{lg:10,sm:24,md:24}},[a("el-form-item",{attrs:{label:"购买时间"}},[a("el-date-picker",{attrs:{type:"datetimerange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期","default-time":["00:00:00","23:59:59"]},model:{value:e.searchFrom.time,callback:function(t){e.$set(e.searchFrom,"time",t)},expression:"searchFrom.time"}})],1)],1),e._v(" "),a("el-col",{attrs:{lg:4,sm:24,md:12}},[a("el-form-item",{attrs:{label:"来源"}},[a("el-input",{attrs:{placeholder:"名称",size:"small"},model:{value:e.searchFrom.source,callback:function(t){e.$set(e.searchFrom,"source",t)},expression:"searchFrom.source"}})],1)],1),e._v(" "),a("el-col",{attrs:{lg:4,sm:24,md:12}},[a("el-form-item",[a("el-button",{attrs:{type:"primary",plain:"",size:"small"},on:{click:e.initPage}},[e._v("\n            搜索\n          ")])],1)],1),e._v(" "),a("el-col",{attrs:{lg:4,sm:24,md:12}},[a("el-form-item",[a("el-button",{attrs:{type:"primary",plain:"",size:"small"},on:{click:e.doExport}},[e._v("\n            导出\n          ")])],1)],1)],1)],1),e._v(" "),a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.tableData}},[a("el-table-column",{attrs:{prop:"name",label:"宝贝名称"}}),e._v(" "),a("el-table-column",{attrs:{prop:"create_at",label:"添加时间"}}),e._v(" "),a("el-table-column",{attrs:{prop:"source",label:"来源"}})],1),e._v(" "),a("page",{attrs:{total:e.total,limit:e.limit},on:{pageChange:e.onPageChange,sizeChange:e.onSizeChange}})],1)},staticRenderFns:[]};var m=a("VU/8")(o,l,!1,function(e){a("Nyg+")},"data-v-3da00fae",null);t.default=m.exports}});