猎户系统

25.15d61c80a5b8a0de63dc.js 12KB

1
  1. webpackJsonp([25],{KatS:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a("Xxa5"),i=a.n(n),r=a("exGp"),o=a.n(r),s=a("gzej"),c=a("RGxS"),l=a("K1Y0"),u=a("vieU"),d=a("K7TI"),m={mixins:[d.a],components:{TableList:u.a},props:{propObj:{type:Object,default:{}}},data:function(){return{tableheight:"",descolList:[{name:"时间",column:"last_d",isfixed:"left",slotFlag:!0},{name:"销售额",column:"sell_money"},{name:"佣金",column:"commission"},{name:"佣金率",column:"commission_rate"},{name:"点击次数",column:"click_cnt"},{name:"点击率",column:"click_rate",notes:"点击人数/群人数"},{name:"点击人数",column:"click_ucnt"},{name:"下单率(PV)",column:"order_rate",notes:"下单数/点击数"},{name:"下单率(UV)",column:"order_urate",notes:"下单人数/点击人数"},{name:"下单数",column:"order_cnt"},{name:"留存人数",column:"chat_ucnt"},{name:"退群率",column:"chat_loss_rate",notes:"退群人数/群人数"},{name:"人均点击次数",column:"click_cnt_avg"},{name:"ROI",column:"roi"},{name:"平均单笔收益",column:"commission_avg"}]}},created:function(){this.tableheight=document.documentElement.clientHeight-80},methods:{init:function(){var e=this;return o()(i.a.mark(function t(){var a,n,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e.loading=!0,t.next=3,e.$axios.post(e.URL.BASEURL+e.URL.data_putData_performance,{chat_id:e.propObj.chat_id});case 3:a=t.sent,n=a.data,(r=void 0===n?{}:n)&&0==r.errno?e.tableList=r.rst:e.$message.warning(r.err),e.loading=!1;case 8:case"end":return t.stop()}},t,e)}))()},init_total:function(){var e=this;return o()(i.a.mark(function t(){var a,n,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e.loading=!0,t.next=3,e.$axios.post(e.URL.BASEURL+e.URL.data_putData_performance_total,{chat_id:e.propObj.chat_id,managerName:e.propObj.managerName,start:e.propObj.start,end:e.propObj.end});case 3:a=t.sent,n=a.data,(r=void 0===n?{}:n)&&0==r.errno?e.tableList=r.rst:e.$message.warning(r.err),e.loading=!1;case 8:case"end":return t.stop()}},t,e)}))()}}},f={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"detialBox"},[a("div",{staticClass:"title"},[e._v(e._s(e.propObj.title||"标题"))]),e._v(" "),a("TableList",{ref:"tableListRef",attrs:{loading:e.loading,tableData:e.tableList,descol:e.descolList,tableHeight:e.tableheight},scopedSlots:e._u([{key:"last_d",fn:function(t){return[a("div",{staticClass:"text-center"},[e._v("\n D"+e._s(t.row.last_d)+"\n ")])]}}])})],1)},staticRenderFns:[]};var p=a("VU/8")(m,f,!1,function(e){a("buot")},"data-v-209d5841",null).exports,h={name:"dataSummary",mixins:[d.a],components:{selectModule:l.a,datePicker:s.a,TableList:u.a,detail:p,downLoadTable:c.a},data:function(){return{default_time:[this.$getDay(-30,!1),this.$getDay(0,!1)],groupMasterOption:[],groupNamerOption:[],descolList:[{name:"创建日期",column:"idate",isfixed:"left",minWidth:"150px"},{name:"群主",column:"group_manager",slotFlag:!0},{name:"群名称",column:"chat_name",slotFlag:!0,minWidth:"250px"},{name:"群人数",column:"chat_ucnt"},{name:"进群人数(总)",column:"chat_join_ucnt"},{name:"退群人数(总)",column:"chat_loss_ucnt"},{name:"实际新增",column:"chat_keep_ucnt"},{name:"消耗",column:"paid"},{name:"公众号进粉人数",column:"follow_uv"},{name:"公众号成本",column:"follow_uv_cost"},{name:"企微进粉",column:"scan_follow_user_count"},{name:"企微成本",column:"scan_follow_user_cost"},{name:"入群成本",column:"chat_keep_cost"},{name:"操作",column:"operate",slotFlag:!0,alignSelf:"center",minWidth:"100px",isfixed:"right"}],tableheight:"",cPage:1,managerRef:null,chatRef:null,detailDrawerVisible:!1,propObj:{title:"",chat_id:"",managerName:"",start:"",end:""},detailRef:null}},created:function(){this.tableheight=document.documentElement.clientHeight-210},mounted:function(){var e=this;this.$nextTick(function(){e.init_groupManagerList(),e.init_chatList(),e.init()})},methods:{rowStyleObj:function(e){if("汇总"==e.row.idate)return{backgroundColor:"#f5f5f5"}},onChangeTime:function(e){this.default_time=e,this.init()},turnPageEvent:function(e){this.page=e,this.init()},init:function(e){var t=this;return o()(i.a.mark(function a(){var n,r,o;return i.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return t.loading=!0,a.next=3,t.$axios.get(t.URL.BASEURL+t.URL.data_chatAdvert,{params:{st_time:t.default_time[0],en_time:t.default_time[1],manager_name:t.$refs.managerRef.value,chat_id:t.$refs.chatRef.value,page:e?t.page:1,pageSize:t.pageSize}});case 3:n=a.sent,r=n.data,(o=void 0===r?{}:r)&&0==o.errno?(t.cPage=e?t.page:1,t.tableList=o.rst.data,e&&1!=t.page||(o.rst.extra.summary.idate="汇总",t.tableList.unshift(o.rst.extra.summary)),t.total=o.rst.pageInfo.total):t.$message.warning(o.err),t.loading=!1;case 8:case"end":return a.stop()}},a,t)}))()},init_groupManagerList:function(){var e=this;return o()(i.a.mark(function t(){var a,n,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.$axios.get(e.URL.BASEURL+e.URL.data_groupManagerList);case 2:a=t.sent,n=a.data,(r=void 0===n?{}:n)&&0==r.errno?(e.groupMasterOption=[],r.rst.forEach(function(t){e.groupMasterOption.push({key:t,val:t})})):e.$message.warning(r.err);case 6:case"end":return t.stop()}},t,e)}))()},init_chatList:function(){var e=this;return o()(i.a.mark(function t(){var a,n,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.$axios.get(e.URL.BASEURL+e.URL.data_chatList,{params:{page:1,pageSize:500}});case 2:a=t.sent,n=a.data,(r=void 0===n?{}:n)&&0==r.errno?e.groupNamerOption=r.rst.data:e.$message.warning(r.err);case 6:case"end":return t.stop()}},t,e)}))()},goDataDetial:function(e){var t=this;this.detailDrawerVisible=!0,this.$nextTick(function(){e.chat_id?(t.propObj.title=e.chat_name,t.propObj.chat_id=e.chat_id,t.$refs.detailRef.init()):(t.propObj.title="汇总",t.propObj.chat_id=t.$refs.chatRef.value,t.propObj.managerName=t.$refs.managerRef.value,t.propObj.start=t.default_time[0],t.propObj.end=t.default_time[1],t.$refs.detailRef.init_total())})}}},g={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("div",{staticClass:"screenBox"},[a("datePicker",{attrs:{title:"",quickFlag:!0,afferent_time:e.default_time,clearFlag:!1},on:{changeTime:e.onChangeTime}}),e._v(" "),a("selectModule",{ref:"managerRef",attrs:{title:"运营",options:e.groupMasterOption},on:{change:function(t){return e.init()}}}),e._v(" "),a("selectModule",{ref:"chatRef",attrs:{title:"群名称",options:e.groupNamerOption,k:"chat_id",v:"name"},on:{change:function(t){return e.init()}}}),e._v(" "),1==e.$cookie.getCookie("if_can_export")?a("downLoadTable",{attrs:{tableDataList:e.tableList,descolList:e.descolList,excleName:"投放数据"}}):e._e()],1),e._v(" "),a("div",{staticClass:"tMar10"},[a("TableList",{ref:"tableListRef",attrs:{currentPageProp:e.cPage,rowStyleObj:e.rowStyleObj,total:e.total,loading:e.loading,showPagination:!0,tableData:e.tableList,descol:e.descolList,tableHeight:e.tableheight},on:{turnPageEvent:e.turnPageEvent},scopedSlots:e._u([{key:"operate",fn:function(t){return[a("div",{staticClass:"text-center"},[a("span",{staticClass:"c-theme pointer",on:{click:function(a){return e.goDataDetial(t.row)}}},[e._v("表现")])])]}},{key:"group_manager",fn:function(t){return[a("div",{staticClass:"text-center"},[a("div",{staticClass:"clampOne",attrs:{title:t.row.group_manager}},[e._v(e._s(t.row.group_manager||"-"))])])]}},{key:"chat_name",fn:function(t){return[a("div",{staticClass:"text-center"},[a("div",{staticClass:"clampTwo line21",attrs:{title:t.row.chat_name}},[e._v(e._s(t.row.chat_name||"-"))])])]}}])})],1),e._v(" "),a("el-drawer",{attrs:{size:"70%",visible:e.detailDrawerVisible,"with-header":!1},on:{"update:visible":function(t){e.detailDrawerVisible=t}}},[e.detailDrawerVisible?a("detail",{ref:"detailRef",attrs:{propObj:e.propObj}}):e._e()],1)],1)},staticRenderFns:[]};var v=a("VU/8")(h,g,!1,function(e){a("jXHq")},"data-v-597d4bdd",null);t.default=v.exports},RGxS:function(e,t,a){"use strict";var n=a("Xxa5"),i=a.n(n),r=a("exGp"),o=a.n(r),s=a("//Fk"),c=a.n(s),l=a("woOf"),u=a.n(l),d=function(e,t){var a;"ie"==((a=window.navigator.userAgent).indexOf("MSIE")>=0?"ie":a.indexOf("Firefox")>=0?"Firefox":a.indexOf("Chrome")>=0?"Chrome":a.indexOf("Opera")>=0?"Opera":a.indexOf("Safari")>=0?"Safari":void 0)?m(e,t):f(e,t)},m=function(e,t){var a=e,n=new ActiveXObject("Excel.Application"),i=n.Workbooks.Add(),r=i.Worksheets(1),o=document.body.createTextRange();o.moveToElementText(a),o.select,o.execCommand("Copy"),r.Paste(),n.Visible=!0;try{n.Application.GetSaveAsFilename("Excel.xls","Excel Spreadsheets (*.xls), *.xls")}catch(e){print("Nested catch caught "+e)}finally{i.SaveAs(fname),i.Close(savechanges=!1),n.Quit(),n=null,window.setInterval("Cleanup();",1),window.setInterval("Cleanup();",1)}},f=function(e,t){var a,n="data:application/vnd.ms-excel;base64,"+function(e){return window.btoa(unescape(encodeURIComponent(e)))}((a={worksheet:t,table:e},'<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><meta charset="UTF-8">\x3c!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--\x3e</head><body><table>{table}</table></body></html>'.replace(/{(\w+)}/g,function(e,t){return a[t]})));if(navigator.userAgent.indexOf("Firefox")>-1)window.location.href=n;else{var i=document.createElement("a");i.href=n,i.download=t||"";var r=void 0;window.MouseEvent?r=new MouseEvent("click"):(r=document.createEvent("MouseEvents")).initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),i.dispatchEvent(r)}},p=function(e,t,a){var n={image:function(e,t){return'<td style="width: '+(t=u()({width:40,height:60},t)).width+"px; height: "+t.height+'px; text-align: center; vertical-align: middle"><img src="'+e+'" width='+t.width+" height="+t.height+"></td>"},text:function(e){return'<td style="text-align: center">'+(e||0==e?e:"-")+"</td>"}},i=e.reduce(function(e,t){return e+="<th>"+t.title+"</th>"},"");i="<thead><tr>"+i+"</tr></thead>";var r=t.reduce(function(t,a){return t+="<tr>"+e.reduce(function(e,t){return e+=(t.hasPercent||"对比"==a.time)&&a[t.key]&&"time"!=t.key&&"serName"!=t.key?n[t.type||"text"](a[t.key]+"%",t):n[t.type||"text"](a[t.key],t)},"")+"</tr>"},"");d(i+(r="<tbody>"+r+"</tbody>"),a)};function h(e,t,a,n,i){return new c.a(function(r,o){var s=[];if(e&&e.length>0){t.forEach(function(t){e.forEach(function(e,i){if(0==i){var r={title:t[a],key:t[n],type:"text",hasPercent:t.hasPercent};s.push(r)}})});var c=i+(new Date).toLocaleString();p(s,e,c)}r()})}var g={props:{tableDataList:{type:Array,default:[]},descolList:{type:Array,default:[]},title:{type:String,default:"name"},listKey:{type:String,default:"column"},exportName:{type:String,default:"导出"},excleName:{type:String,default:"数据报表"},haveUpdateFlag:{type:Boolean,default:!1}},data:function(){return{}},methods:{handleCheck:function(){var e=this;return new c.a(function(t,a){e.tableDataList&&0==e.tableDataList.length?(e.$message({message:"暂无数据可导出",type:"warning"}),a()):e.descolList&&0==e.descolList.length?(e.$message({message:"表头数据缺失",type:"warning"}),a()):t()})},downLoad:function(){var e=this;return o()(i.a.mark(function t(){return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.haveUpdateFlag){t.next=4;break}e.$emits("updateEvent"),t.next=10;break;case 4:return t.next=6,e.handleCheck();case 6:return e.$loading(e.$loadingConfig),t.next=9,h(e.tableDataList,e.descolList,e.title,e.listKey,e.excleName);case 9:setTimeout(function(){e.$loading(e.$loadingConfig).close()},2e3);case 10:case"end":return t.stop()}},t,e)}))()}}},v={render:function(){var e=this.$createElement;return(this._self._c||e)("div",{staticClass:"exportBtn",on:{click:this.downLoad}},[this._v(this._s(this.exportName))])},staticRenderFns:[]};var _=a("VU/8")(g,v,!1,function(e){a("rnLS")},"data-v-7582e5f9",null);t.a=_.exports},buot:function(e,t){},jXHq:function(e,t){},rnLS:function(e,t){}});