webpackJsonp([7],{"W2+l":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a("Xxa5"),r=a.n(n),i=a("exGp"),l=a.n(i),s={name:"agentJoin",data:function(){return{pageTitle:"代理加盟",tableData:[],dateScope:[],gridSelected:[],pageIndex:1,pageSize:30,tableHeight:0}},computed:{dataTotal:function(){return this.tableData.length},computTabelData:function(){var e=(this.pageIndex-1)*this.pageSize,t=this.pageIndex*this.pageSize;return this.tableData.slice(e,t)},computSerialNumber:function(){return(this.pageIndex-1)*this.pageSize}},methods:{handleSizeChange:function(e){this.pageSize=e},handleCurrentChange:function(e){this.pageIndex=e},exportData:function(){var e=this;return l()(r.a.mark(function t(){var a;return r.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(0!=e.gridSelected.length){t.next=3;break}return e.$common.createMessage({Vue:e,title:"请勾选要导出的数据",type:"warning"}),t.abrupt("return");case 3:return t.next=6,e.$common.Ajax(e,{url:"api/ToJoin/ToJoinExportExcel",params:e.gridSelected});case 6:(a=t.sent).Success&&window.open("http://ttcmsapi.sxgjprj.com/"+a.ResData,"_self");case 8:case"end":return t.stop()}},t,e)}))()},clearGridSelected:function(){this.$refs.multipleTable.clearSelection()},handleSelectionChange:function(e){this.gridSelected=e},doSearch:function(){this.getList()},getDate:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.time,a=void 0===t?new Date:t,n=e.intervalDay,r=void 0===n?0:n,i=new Date(a),l=new Date(i);return l.setDate(i.getDate()+r),l.getFullYear()+"-"+(l.getMonth()+1)+"-"+l.getDate()},getList:function(){var e=this;return l()(r.a.mark(function t(){var a;return r.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.$common.Ajax(e,{url:"api/ToJoin/GetToJoin",params:{startDate:e.dateScope[0],endDate:e.dateScope[1]}});case 2:(a=t.sent).Success&&(e.tableData=a.ResData);case 4:case"end":return t.stop()}},t,e)}))()}},mounted:function(){},created:function(){this.dateScope[0]=this.getDate({intervalDay:-7}),this.dateScope[1]=this.getDate(),this.getList(),this.tableHeight=document.documentElement.clientHeight-340}},c={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"solution-wrapper"},[a("div",{staticClass:"content-header"},[a("div",{staticClass:"header-title"},[e._v(e._s(e.pageTitle))])]),e._v(" "),a("transition",{attrs:{name:"fade"}},[a("div",{staticClass:"body-wrapper"},[a("div",{staticClass:"operate-wrapper"},[a("el-date-picker",{attrs:{type:"daterange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期",size:"small"},model:{value:e.dateScope,callback:function(t){e.dateScope=t},expression:"dateScope"}}),e._v(" "),a("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.doSearch}},[e._v("查询")]),e._v(" "),a("el-button",{attrs:{size:"small"},on:{click:e.exportData}},[e._v("导出")])],1),e._v(" "),a("div",{staticClass:"operate-record"},[a("i",{staticClass:"el-icon-warning"}),e._v("\n                已选择\n                "),a("span",{staticClass:"selectedNum"},[e._v(e._s(e.gridSelected.length))]),e._v("\n                项\n                "),a("span",{staticClass:"clear-operate",on:{click:e.clearGridSelected}},[e._v("清空")])]),e._v(" "),a("el-table",{ref:"multipleTable",staticClass:"_el-table",staticStyle:{width:"100%"},attrs:{data:e.computTabelData,"row-key":"Id",border:"",height:e.tableHeight},on:{"selection-change":e.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"40"}}),e._v(" "),a("el-table-column",{attrs:{prop:"Category",label:"序号",width:"50",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(e.computSerialNumber+1+t.$index))])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"SignDate",label:"时间",width:"160"}}),e._v(" "),a("el-table-column",{attrs:{prop:"Name",label:"姓名",width:"150"}}),e._v(" "),a("el-table-column",{attrs:{prop:"CompanyName",label:"公司名称"}}),e._v(" "),a("el-table-column",{attrs:{prop:"City",label:"城市",width:"150"}}),e._v(" "),a("el-table-column",{attrs:{prop:"PhoneNumber",label:"电话",width:"150"}}),e._v(" "),a("el-table-column",{attrs:{prop:"Url",label:"入口url"}})],1),e._v(" "),a("el-pagination",{attrs:{"current-page":e.pageIndex,"page-sizes":[30,50,100,200],"page-size":e.pageSize,layout:"prev, pager, next,sizes,total",total:e.dataTotal},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1)])],1)},staticRenderFns:[]};var o=a("VU/8")(s,c,!1,function(e){a("cD/K")},null,null);t.default=o.exports},"cD/K":function(e,t){}});
//# sourceMappingURL=7.e8b4b15c94628f8f421b.js.map