2d14d0c.js 5.9 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([[30],{488:function(t,e,r){},629:function(t,e,r){"use strict";r(488)},764:function(t,e,r){"use strict";r.r(e);r(18),r(71);var l=r(14),n=r(6),o=(r(61),r(30),r(486)),c=new Date;c.setMonth(0),c.setDate(1),c.setHours(0),c.setMinutes(0),c.setSeconds(0);var m=new Date;m.setMonth(m.getMonth()-12);var _={inheritAttrs:!1,data:function(){return{loading:!0,source:{title:[],data:[]},time_type_data:[{value:"1",label:"按日"},{value:"2",label:"按月"}],time_type:"1",date:[c,new Date],month:[m,c],menu:[{name:"整包",val:"1"},{name:"云端",val:"2"},{name:"雇佣",val:"3"}],menu_val:"1"}},created:function(){},mounted:function(){this.getData_()},methods:{search:function(){var t=this;return Object(n.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.getData_(t.url,t.title);case 1:case"end":return e.stop()}}),e)})))()},showdata:function(t){var e=this;return Object(n.a)(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:e.menu_val=t;case 1:case"end":return r.stop()}}),r)})))()},getData_:function(){var t=this;return Object(n.a)(regeneratorRuntime.mark((function e(){var r,l,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.loading=!0,r="",l="",1==t.time_type?(r=t.formatDate(t.date[0]/1e3),l=t.formatDate(t.date[1]/1e3)):(r=t.formatDate(t.month[0]/1e3),l=t.formatDate(t.month[1]/1e3)),e.next=6,t.$post("/uapi/data/list/zbsc",{time_type:t.time_type,stime:r,etime:l});case 6:n=e.sent,t.loading=!1,1==n.status&&(t.source={title:n.data.title,data:n.data.list});case 9:case"end":return e.stop()}}),e)})))()},formatDate:function(time){if("0"===time)return"--";var t=new Date(1e3*time),e=t.getFullYear(),r=t.getMonth()+1,l=t.getDate(),n=t.getHours(),o=t.getMinutes(),c=t.getSeconds();return l<10&&(l="0"+l),r<10&&(r="0"+r),n<10&&(n="0"+n),o<10&&(o="0"+o),c<10&&(c="0"+c),e+"-"+r+"-"+l+" "+n+":"+o+":"+c},exportExcel:function(){var t=[],header=this.table.tableHeader.map((function(t){return t.title})),e=Object(l.a)(this.table.tableData);e.shift();var r=(t=[Object(l.a)(header)].concat(Object(l.a)(e))).map((function(t){return{wch:10}})),n="",c="";1==this.time_type?(n=this.formatDate(this.date[0]/1e3),c=this.formatDate(this.date[1]/1e3)):(n=this.formatDate(this.month[0]/1e3),c=this.formatDate(this.month[1]/1e3)),Object(o.a)(t,r,"".concat(n," - ").concat(c,"数据看版"))}}},d=(r(629),r(4)),component=Object(d.a)(_,(function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{padding:"20px"}},[e("div",{staticStyle:{"padding-bottom":"20px"}},t._l(t.menu,(function(r){return e("el-tag",{staticStyle:{"margin-right":"10px"},attrs:{type:r.val==t.menu_val?"success":"info"},on:{click:function(e){return t.showdata(r.val)}}},[t._v(t._s(r.name))])})),1),t._v(" "),e("div",{staticStyle:{"padding-bottom":"20px"}},[e("el-select",{attrs:{placeholder:"请选择"},model:{value:t.time_type,callback:function(e){t.time_type=e},expression:"time_type"}},t._l(t.time_type_data,(function(t){return e("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1),t._v(" "),1==t.time_type?e("el-date-picker",{staticStyle:{width:"400px"},attrs:{type:"daterange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:t.date,callback:function(e){t.date=e},expression:"date"}}):t._e(),t._v(" "),2==t.time_type?e("el-date-picker",{staticStyle:{width:"400px"},attrs:{type:"monthrange","range-separator":"至","start-placeholder":"开始月份","end-placeholder":"结束月份"},model:{value:t.month,callback:function(e){t.month=e},expression:"month"}}):t._e(),t._v(" "),e("el-button",{attrs:{type:"primary"},on:{click:t.search}},[t._v("查询")])],1),t._v(" "),1==t.menu_val?e("el-table",{staticStyle:{width:"100%"},attrs:{data:t.source.data}},[e("el-table-column",{attrs:{label:"客户经理",prop:"name"}}),t._v(" "),e("el-table-column",{attrs:{label:"整包",prop:"outsource_project"}}),t._v(" "),e("el-table-column",{attrs:{label:"整包成交",prop:"outsource_project_order"}}),t._v(" "),e("el-table-column",{attrs:{label:"整包转化率",prop:"outsource_project_rate"}}),t._v(" "),e("el-table-column",{attrs:{label:"整包(新)",prop:"outsource_project_new"}}),t._v(" "),e("el-table-column",{attrs:{label:"整包成交(新)",prop:"outsource_project_new_order"}}),t._v(" "),e("el-table-column",{attrs:{label:"整包转化率(新)",prop:"outsource_project_new_rate"}})],1):t._e(),t._v(" "),2==t.menu_val?e("el-table",{staticStyle:{width:"100%"},attrs:{data:t.source.data}},[e("el-table-column",{attrs:{label:"客户经理",prop:"name"}}),t._v(" "),e("el-table-column",{attrs:{label:"云端",prop:"job"}}),t._v(" "),e("el-table-column",{attrs:{label:"云端成交",prop:"job_order"}}),t._v(" "),e("el-table-column",{attrs:{label:"云端转化率",prop:"job_rate"}}),t._v(" "),e("el-table-column",{attrs:{label:"云端(新)",prop:"job_new"}}),t._v(" "),e("el-table-column",{attrs:{label:"云端成交(新)",prop:"job_new_order"}}),t._v(" "),e("el-table-column",{attrs:{label:"云端转化率(新)",prop:"job_new_rate"}})],1):t._e(),t._v(" "),3==t.menu_val?e("el-table",{staticStyle:{width:"100%"},attrs:{data:t.source.data}},[e("el-table-column",{attrs:{label:"客户经理",prop:"name"}}),t._v(" "),e("el-table-column",{attrs:{label:"雇佣",prop:"hire"}}),t._v(" "),e("el-table-column",{attrs:{label:"雇佣成交",prop:"hire_order"}}),t._v(" "),e("el-table-column",{attrs:{label:"雇佣转化率",prop:"hire_rate"}}),t._v(" "),e("el-table-column",{attrs:{label:"雇佣(新)",prop:"hire_new"}}),t._v(" "),e("el-table-column",{attrs:{label:"雇佣成交(新)",prop:"hire_new_order"}}),t._v(" "),e("el-table-column",{attrs:{label:"雇佣转化率(新)",prop:"hire_new_rate"}})],1):t._e()],1)}),[],!1,null,"1158b63a",null);e.default=component.exports}}]);