1 |
- webpackJsonp([61],{"9scx":function(t,e){},Fub0:function(t,e){},GsA6:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a("Gu7T"),n=a.n(i),s=a("gzej"),r=a("erru"),o={components:{datePicker:s.a,selfChannel:r.a},data:function(){return{loading:!1,page:1,pages:0,total:0,page_size:20,sort_field:"",default_time:[this.$getDay(0,!1),this.$getDay(0,!1)],time:[],account_id:"",height:"",desCol:[{prop:"expense_date",label:"时间",fixed:"left"},{prop:"account_name",label:"公众号",fixed:"left"},{prop:"day_paid",label:"当天消耗"},{prop:"charge_total",label:"当日新用户累计充值",min_width:"160"},{prop:"cost_cover_rate",label:"回本率(%)"},{prop:"scan_follow_count",label:"企微关注数"},{prop:"follow_cost",label:"企微关注成本"},{prop:"charge_user_cost",label:"首日用户成本",notes:"首日用户成本=当天消耗/当天充值人数"},{prop:"charge_user_cost_all",label:"累计用户成本",notes:"累计用户成本=当天消耗/累计充值人数"}],extra:[],closing_date:"",min_paid:"",max_paid:""}},computed:{isCanExport:function(){return!!this.$store.state.dataBoardAuth.can_export}},created:function(){this.time=this.default_time,this.height=document.documentElement.clientHeight-220>400?document.documentElement.clientHeight-220:400,this.init(1)},methods:{changeTime:function(t){!t||t&&0==t.length?this.time=[]:this.time=t,this.init(1)},init:function(t,e){var a=this;if("export"!=e)this.page=t||this.page;else if(0==this.total)return void this.$message({message:"暂无数据可导出",type:"warning"});this.loading=!0,this.$axios.get(this.URL.BASEURL+this.URL.activeFansData,{params:{start_date:this.time[0],end_date:this.time[1],app_id:this.account_id,page:"export"==e?1:this.page,page_size:"export"==e?this.$store.state.exportNumber:this.page_size,closing_date:this.closing_date,min_paid:this.min_paid,max_paid:this.max_paid}}).then(function(t){t=t.data;a.loading=!1,t&&0==t.errno?"export"==e?a.exportEvent(t.rst.data.list):(a.extra=t.rst.data.extra,a.datas=t.rst.data.list,a.$refs.plxTable.reloadData(a.datas),a.total=t.rst.pageInfo.total,a.pages=t.rst.pageInfo.pages):4002!=t.errno&&a.$message({message:t.err,type:"warning"})}).catch(function(t){a.loading=!1})},handleCurrentChange:function(t){this.init(t)},handleSizeChange:function(t){this.page_size=t,this.init(1)},sortFieldEvent:function(t){this.sort_field=t,this.init(1)},exportEvent:function(t){var e=this,a=t,i=this.desCol.map(function(t){return t.label}),s=this.desCol.map(function(t){return t.prop});a.forEach(function(t){for(var i=0;i<s.length;i++)a[s[i]]=a[s[i]]?a[s[i]]:0;for(var n in e.extra)t[e.extra[n]]="人数: "+(t&&t.active_trend&&t.active_trend[n]&&(t.active_trend[n].fans||0==t.active_trend[n].fans)?t.active_trend[n].fans:"-")+" 成本: "+(t&&t.active_trend&&t.active_trend[n]&&(t.active_trend[n].cost||0==t.active_trend[n].cost)?t.active_trend[n].cost:"-")+" 占比: "+(t&&t.active_trend&&t.active_trend[n]&&(t.active_trend[n].rate||0==t.active_trend[n].rate)?t.active_trend[n].rate:"-")});var r=[{tHeader:[].concat(n()(i),n()(this.extra)),filterVal:[].concat(n()(s),n()(this.extra)),tableDatas:a,sheetName:""}];this.$exportOrder({excelDatas:r,name:"短剧粉丝激活趋势(导出时间:"+this.$getDay(0)+")"})}}},l={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"playletFans"},[a("div",{staticClass:"screenBox flex",staticStyle:{"padding-left":"10px"}},[a("div",{staticClass:"flex-align-center",staticStyle:{"flex-wrap":"wrap"}},[a("self-channel",{attrs:{title:"公众号名称",type:"thePublic"},on:{channelDefine:function(e){t.account_id=e,t.init(1)}}}),t._v(" "),a("date-picker",{attrs:{title:"起止时间",quickFlag:!1,afferent_time:t.default_time,clearFlag:!1},on:{changeTime:t.changeTime}}),t._v(" "),a("div",{staticClass:"common-screen-item"},[a("label",{staticClass:"common-screen-label",staticStyle:{"margin-left":"30px"}},[t._v("收益截止日期")]),t._v(" "),a("el-date-picker",{staticStyle:{width:"150px"},attrs:{"value-format":"yyyy-MM-dd",type:"date",placeholder:"选择日期",size:"small"},on:{change:function(e){return t.init(1)}},model:{value:t.closing_date,callback:function(e){t.closing_date=e},expression:"closing_date"}})],1),t._v(" "),a("div",{staticClass:"common-screen-item"},[a("label",{staticClass:"common-screen-label"},[t._v("当天消耗(元)")]),t._v(" "),a("el-input",{staticStyle:{width:"100px"},attrs:{type:"number",placeholder:"最小金额",size:"small"},model:{value:t.min_paid,callback:function(e){t.min_paid=e},expression:"min_paid"}}),t._v(" "),a("label",{staticClass:"common-screen-label",staticStyle:{padding:"0","text-align":"center",width:"20px"}},[t._v("~")]),t._v(" "),a("el-input",{staticStyle:{width:"100px"},attrs:{type:"number",placeholder:"最大金额",size:"small"},model:{value:t.max_paid,callback:function(e){t.max_paid=e},expression:"max_paid"}}),t._v(" "),a("el-button",{staticStyle:{"margin-left":"8px"},attrs:{size:"mini",type:"primary",plain:""},on:{click:function(e){return t.init(1)}}},[t._v("确定")])],1)],1),t._v(" "),t.isCanExport?a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.init(1,"export")}}},[t._v("导出Excel")]):t._e()],1),t._v(" "),a("ux-grid",{ref:"plxTable",staticClass:"plxTable",attrs:{border:!1,"header-cell-style":function(){return{backgroundColor:"#FFFFFF !important",border:"none!important"}},height:t.height,"show-footer-overflow":"tooltip","show-overflow":"tooltip",size:"mini"},on:{"row-click":function(){}}},[t._l(t.desCol,function(e){return a("ux-table-column",{key:e.prop,attrs:{resizable:!0,field:e.prop,title:e.label,"min-width":e.min_width?e.min_width:120,fixed:e.fixed?e.fixed:"",align:"center"},scopedSlots:t._u([{key:"header",fn:function(){return[a("div",{class:["flex-align-jus-center",e.sort?"pointer":"",t.sort_field==e.prop?"sortFieldStyle":""],on:{click:function(a){e.sort&&t.sortFieldEvent(e.prop)}}},[t._v("\n "+t._s(e.label)+"\n "),e.sort?a("i",{staticClass:"el-icon-caret-bottom"}):t._e(),t._v(" "),e.notes?a("el-tooltip",{attrs:{content:e.notes,placement:"top"}},[a("div",[a("i",{staticClass:"el-icon-question"})])]):t._e()],1)]},proxy:!0},{key:"default",fn:function(i){var n=i.row;return[a("span",{class:t.sort_field==e.prop?"sortFieldStyle":""},[t._v(t._s(n[e.prop]||0==n[e.prop]?t.$formatNum(n[e.prop]):"-"))])]}}],null,!0)})}),t._v(" "),t._l(t.extra,function(e,i){return a("ux-table-column",{key:i+"extra",attrs:{width:"100"},scopedSlots:t._u([{key:"header",fn:function(){return[a("div",{staticClass:"flex-align-jus-center"},[t._v(t._s(e)+"\n "),t._e()],1)]},proxy:!0},{key:"default",fn:function(e){var n=e.row;return[a("div",[a("span",{staticClass:"font",staticStyle:{color:"#2C9841"}},[t._v("人数:")]),t._v(" "),a("span",[t._v(t._s(n&&n.active_trend&&n.active_trend[i]&&n.active_trend[i].fans?n.active_trend[i].fans:"-"))])]),t._v(" "),a("div",[a("span",{staticClass:"font",staticStyle:{color:"#F28544"}},[t._v("成本:")]),t._v(" "),a("span",[t._v(t._s(n&&n.active_trend&&n.active_trend[i]&&n.active_trend[i].cost?n.active_trend[i].cost:"-"))])]),t._v(" "),a("div",[a("span",{staticClass:"font",staticStyle:{color:"#EB4315"}},[t._v("占比:")]),t._v(" "),n&&n.active_trend&&n.active_trend[i]&&n.active_trend[i].rate?a("span",[t._v("\n "+t._s(n.active_trend[i].rate)+"\n ")]):a("span",[t._v("-")])])]}}],null,!0)})})],2),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:t.total>0,expression:"total > 0"}],staticClass:"pagination"},[a("el-pagination",{attrs:{background:"","current-page":t.page,layout:"prev, pager, next, sizes","page-sizes":[20,50,100],"page-count":Number(t.pages)},on:{"current-change":t.handleCurrentChange,"size-change":t.handleSizeChange}})],1)],1)},staticRenderFns:[]};var c=a("VU/8")(o,l,!1,function(t){a("9scx"),a("Fub0")},"data-v-7bdb21ac",null);e.default=c.exports}});
|