企微助手 ,仓库名 短剧

68.bda7446254db0d565d30.js 6.9KB

1
  1. webpackJsonp([68],{YuWX:function(e,t){},qYG3:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a("Xxa5"),r=a.n(n),i=a("exGp"),o=a.n(i),s=a("gzej"),l=a("erru"),p=a("3ivx"),c=a("la//"),d={components:{datePicker:s.a,selfChannel:l.a,switchMpAdq:p.a},data:function(){return{loading:!1,page:1,pages:0,total:0,page_size:20,sort_field:"charge_total",time:[],account_id:"",playlet_id:"",order_type:c.D.ADQ,desCol:[{prop:"date",label:"日期"},{prop:"cost",label:"投放消耗"},{prop:"fan_new",label:"新增用户"},{prop:"new_pay_uc",label:"新增充值用户"},{prop:"new_pay_money",label:"新用户充值"},{prop:"new_roi",label:"新用户roi",notes:"新用户roi=新用户充值/投放消耗"},{prop:"new_cost",label:"下单成本",notes:"下单成本=当日总消耗/当日新增用户首单人数"}],desColFlag:!1,height:"",isShowEmpty:!1}},computed:{isMP:function(){return this.order_type===c.D.MP},isADQ:function(){return this.order_type===c.D.ADQ},isShowAdqBtn:function(){return!!this.$store.state.dataBoardAuth.adq_auth},isShowMpBtn:function(){return!!this.$store.state.dataBoardAuth.mp_auth},isShowSumBtn:function(){return this.isShowAdqBtn&&this.isShowMpBtn},isCanExport:function(){return!!this.$store.state.dataBoardAuth.can_export}},created:function(){this.getDefaultOrderType()?(this.height=document.documentElement.clientHeight-200>400?document.documentElement.clientHeight-200:400,this.init(1)):this.isShowEmpty=!0},methods:{getDefaultOrderType:function(){return this.isShowAdqBtn?(this.order_type=c.D.ADQ,c.D.ADQ):this.isShowMpBtn?(this.order_type=c.D.MP,c.D.MP):(this.$message.warning('暂无数据权限,请前往"账号管理"添加配置'),!1)},changeTime:function(e){this.time=Array.isArray(e)&&e.length?e:[],this.init(1)},init:function(e,t){var a=this;return o()(r.a.mark(function n(){var i,o,s,l,p;return r.a.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(n.prev=0,"export"==t){n.next=5;break}a.page=e||a.page,n.next=8;break;case 5:if(0!=a.total){n.next=8;break}return a.$message({message:"暂无数据可导出",type:"warning"}),n.abrupt("return");case 8:return a.loading=!0,i={start:a.time[0]||"",end:a.time[1]||"",order_type:a.order_type,drama_id:a.isMP?a.playlet_id:"",app_id:a.isMP?a.account_id:"",page:"export"==t?1:a.page,pagesize:"export"==t?a.$store.state.exportNumber:a.page_size},o=""+a.URL.BASEURL+a.URL.stat_operateDayRetrieveByAccount,n.next=13,a.$axios.get(o,{params:i});case 13:if(s=n.sent,l=s.data,!(p=void 0===l?{}:l)||0!=p.errno){n.next=31;break}if("export"!=t){n.next=21;break}a.exportEvent(p.rst.data),n.next=29;break;case 21:if(a.total=p.rst.pageInfo.total,a.pages=p.rst.pageInfo.pages,p.rst.data&&0!=p.rst.data.length){n.next=27;break}return a.datas=[],a.$refs.plxTable.reloadData(a.datas),n.abrupt("return");case 27:a.desColFlag||(p.rst.extra.forEach(function(e){e.name&&e.name.length>6&&(e.min_width=20*e.name.length),a.desCol.push({prop:e.column.toString(),label:e.name,self_type:"extra",notes:"运营总回收"==e.name?"运营以来的总数据":"",min_width:e.min_width})}),a.desColFlag=!0),a.$nextTick(function(){a.datas=p.rst.data,a.$refs.plxTable.reloadData(a.datas)});case 29:n.next=32;break;case 31:4002!=p.errno&&a.$message({message:p.err,type:"warning"});case 32:n.next=37;break;case 34:n.prev=34,n.t0=n.catch(0),console.log("error => ",n.t0);case 37:return n.prev=37,a.loading=!1,n.finish(37);case 40:case"end":return n.stop()}},n,a,[[0,34,37,40]])}))()},handleCurrentChange:function(e){this.init(e)},handleSizeChange:function(e){this.page_size=e,this.init(1)},sortFieldEvent:function(e){this.sort_field=e,this.init(1)},exportEvent:function(e){var t=e,a=this.desCol.map(function(e){return e.label}),n=[],r=[];this.desCol.forEach(function(e){"extra"==e.self_type?(n.push("slef_"+e.prop),r.push(e.prop)):n.push(e.prop)}),t.forEach(function(e){r.forEach(function(t){e["slef_"+t]=e.retrieveInfo[t]})});var i=[{tHeader:a,filterVal:n,tableDatas:t,sheetName:""}];this.$exportOrder({excelDatas:i,name:"短剧业务数据(导出时间:"+this.$getDay(0)+")"})}}},u={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"operateDayRetrieve-wrap"},[e.isShowEmpty?a("el-empty",{staticClass:"empty-wrap",attrs:{description:"暂无数据权限"}}):[a("div",{staticClass:"screenBox flex"},[a("switchMpAdq",{attrs:{isShowAdqBtn:e.isShowAdqBtn,isShowMpBtn:e.isShowMpBtn},on:{change:function(t){return e.init(1)}},model:{value:e.order_type,callback:function(t){e.order_type=t},expression:"order_type"}}),e._v(" "),e.isCanExport?a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(t){return e.init(1,"export")}}},[e._v("导出Excel")]):e._e()],1),e._v(" "),a("div",{staticClass:"screenBox filter-wrap"},[a("date-picker",{attrs:{labelWidth:!0,title:"选择日期",quickFlag:!0},on:{changeTime:e.changeTime}}),e._v(" "),a("self-channel",{directives:[{name:"show",rawName:"v-show",value:e.isMP,expression:"isMP"}],staticStyle:{"margin-right":"30px","margin-left":"-10px"},attrs:{title:"公众号",type:"thePublic",labelWidth:""},on:{channelDefine:function(t){e.account_id=t,e.init(1)}}}),e._v(" "),a("self-channel",{directives:[{name:"show",rawName:"v-show",value:e.isMP,expression:"isMP"}],staticStyle:{"margin-right":"30px","margin-left":"-30px"},attrs:{title:"剧集",type:"dramaList",labelWidth:""},on:{channelDefine:function(t){e.playlet_id=t,e.init(1)}}})],1),e._v(" "),a("ux-grid",{ref:"plxTable",staticStyle:{"margin-top":"10px"},attrs:{border:!1,"header-cell-style":function(){return{backgroundColor:"#FFFFFF !important",border:"none!important"}},height:e.height,"show-footer-overflow":"tooltip","show-overflow":"tooltip",size:"mini"},on:{"row-click":function(){}}},e._l(e.desCol,function(t){return a("ux-table-column",{key:t.prop,attrs:{resizable:!0,field:t.prop,title:t.label,"min-width":t.min_width?t.min_width:120,fixed:"date"==t.prop?"left":"",align:"center"},scopedSlots:e._u([{key:"header",fn:function(){return[a("div",{staticClass:"flex-align-jus-center"},[e._v(e._s(t.label)+"\n "),t.notes?a("el-tooltip",{attrs:{content:t.notes,placement:"top"}},[a("div",[a("i",{staticClass:"el-icon-question"})])]):e._e()],1)]},proxy:!0},{key:"default",fn:function(n){var r=n.row;return["extra"==t.self_type?a("span",[e._v(e._s(r.retrieveInfo[t.prop]||0==r.retrieveInfo[t.prop]?e.$formatNum(r.retrieveInfo[t.prop]):"-"))]):a("span",[e._v(e._s(r[t.prop]||0==r[t.prop]?e.$formatNum(r[t.prop]):"-"))])]}}],null,!0)})}),1),e._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total>0"}],staticClass:"pagination"},[a("el-pagination",{attrs:{background:"","current-page":e.page,layout:"prev, pager, next, sizes, jumper","page-sizes":[20,50,100],"page-count":Number(e.pages)},on:{"current-change":e.handleCurrentChange,"size-change":e.handleSizeChange}})],1)]],2)},staticRenderFns:[]};var h=a("VU/8")(d,u,!1,function(e){a("YuWX"),a("ytOO")},"data-v-462e0abd",null);t.default=h.exports},ytOO:function(e,t){}});