(window.webpackJsonp=window.webpackJsonp||[]).push([[45],{439:function(t,e,n){},500:function(t,e,n){"use strict";var r=n(439);n.n(r).a},563:function(t,e,n){"use strict";n.r(e);n(57),n(187),n(30);var r=n(3),o={data:function(){return{pageInfo:{page:1,size:20,total:0},tableHeaders:[],tableProps:[],tableData:[]}},mounted:function(){this.getTableData()},methods:{getTableData:function(){var t=this;return Object(r.a)(regeneratorRuntime.mark((function e(){var n,data;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.tableData=[],e.next=3,t.$post("/api/admin/ReportForm/index",{id:"IncomeData"});case 3:n=e.sent,data=n.data,t.tableData=data.list,t.pageInfo.total=Number(data.total),t.pageInfo.page=data.totalPage,t.setTitles(data.titles);case 9:case"end":return e.stop()}}),e)})))()},exportList:function(){return Object(r.a)(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=window.location.host+"/api/admin/ReportForm/export?id=IncomeData",window.location.href="https://"+e;case 2:case"end":return t.stop()}}),t)})))()},setTitles:function(title){for(var i in title)this.tableProps.push(i),this.tableHeaders.push(title[i])},clickProject:function(t,e){var n=2,path="/main/project_form";switch(e){case 1:n=2;break;case 2:n=9;break;case 3:n=4;break;case 4:n=11;break;case 5:n=12;break;case 6:n=55}[11,12,55].includes(n)&&(path="/main/orders");var r=t.month;if(!r||r.length<6)this.$message.error("时间格式不正确");else{var o=r.substring(0,4),c=r.substring(4,6),data={product_type:n,start_time:this.beginTime(o,c),end_time:this.lastTime(o,c)};this.$router.push({path:path,query:data})}},beginTime:function(t,e){if(e.length<=1);return t+"-"+e+"-01 00:00:00"},lastTime:function(t,e){if(e.length<=1);var n=t+"-"+e+"-"+new Date(t,e,0).getDate()+" 23:59:59";return n}}},c=(n(500),n(2)),component=Object(c.a)(o,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticStyle:{"text-align":"right","margin-bottom":"10px"}},[n("el-button",{staticClass:"export-excel",attrs:{type:"primary"},on:{click:t.exportList}},[t._v("导出报表")])],1),t._v(" "),n("div",{staticClass:"table"},[t.tableData.length?n("el-table",{staticStyle:{width:"100%"},attrs:{border:"",data:t.tableData}},t._l(t.tableProps,(function(e,r){return n("el-table-column",{key:r,attrs:{prop:e,label:t.tableHeaders[r]},scopedSlots:t._u([{key:"default",fn:function(r){return["project_amount"===e?n("el-button",{attrs:{type:"text"},on:{click:function(e){return t.clickProject(r.row,1)}}},[t._v(t._s(r.row[e])+"\n          ")]):"cloud_amount"===e?n("el-button",{attrs:{type:"text"},on:{click:function(e){return t.clickProject(r.row,2)}}},[t._v(t._s(r.row[e])+"\n          ")]):"hire_amount"===e?n("el-button",{attrs:{type:"text"},on:{click:function(e){return t.clickProject(r.row,3)}}},[t._v(t._s(r.row[e])+"\n          ")]):"vip_amount"===e?n("el-button",{attrs:{type:"text"},on:{click:function(e){return t.clickProject(r.row,4)}}},[t._v(t._s(r.row[e])+"\n          ")]):"verify_amount"===e?n("el-button",{attrs:{type:"text"},on:{click:function(e){return t.clickProject(r.row,5)}}},[t._v(t._s(r.row[e])+"\n          ")]):"contact_amount"===e?n("el-button",{attrs:{type:"text"},on:{click:function(e){return t.clickProject(r.row,6)}}},[t._v(t._s(r.row[e])+"\n          ")]):n("span",[t._v(t._s(r.row[e]))])]}}],null,!0)})})),1):t._e()],1),t._v(" "),n("div",[n("el-pagination",{attrs:{"current-page":t.pageInfo.page,"page-size":t.pageInfo.size,layout:"total, prev, pager, next",total:t.pageInfo.total},on:{"current-change":t.getTableData,"update:currentPage":function(e){return t.$set(t.pageInfo,"page",e)},"update:current-page":function(e){return t.$set(t.pageInfo,"page",e)}}})],1)])}),[],!1,null,"7d3da4dc",null);e.default=component.exports}}]);