企微助手 ,仓库名 短剧

38.7ccc4ba1b260df28cc9c.js 37KB

1
  1. webpackJsonp([38],{"1zIV":function(t,e,a){"use strict";var i=a("Dd8w"),n=a.n(i),s=a("Xxa5"),r=a.n(s),o=a("exGp"),l=a.n(o),c=a("Gu7T"),d=a.n(c),h=a("la//"),p={props:{afferent_value:"",clearable:{type:Boolean,default:!0},reset:{type:Boolean,default:!1},title:{type:String,default:"添加渠道"},type:{type:String,default:""},labelWidth:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},afferent_params:{type:Object,default:function(){return{}}},width:{type:String},placeholder:{type:String,default:function(){return""}}},watch:{reset:function(){this.value=[]},options:function(){this.options&&this.options.length>0&&this.init_afferent()}},data:function(){return{value:[],options:[],placeholderVal:""}},created:function(){"assignment_status"==this.type?this.options=[{key:1,val:"已转接"},{key:2,val:"客户转接中"},{key:3,val:"客户已拒绝"},{key:4,val:"接替成员客户达到上限"},{key:5,val:"无接替记录"},{key:-1,val:"迁移失败"}]:"remove_status"==this.type?this.options=[{key:1,val:"待迁移"},{key:2,val:"迁移中"},{key:3,val:"迁移完成"},{key:-1,val:"迁移失败"}]:"remove_type"==this.type?this.options=[{key:1,val:"在职"},{key:2,val:"离职"}]:"chat_group_status"==this.type?this.options=[{key:1,val:"群主已发送"},{key:2,val:"群主未发送"},{key:3,val:"发送失败"}]:"thePublic"==this.type?(this.placeholderVal="公众号",this.thePublic_init()):"officialAccount"==this.type?(this.placeholderVal="公众号",this.getOfficialAccount()):"dramaList"==this.type?this.dramaList_init():"popularizCompanys"==this.type?this.popularizCompanys_init():"pitcher"==this.type?this.pitcher_init():"chargePay"==this.type?(this.options=[{key:1,val:"已付款"},{key:2,val:"未付款"}],this.placeholderVal="支付状态"):"orderType"==this.type?(this.options=[{key:1,val:"通用充值"},{key:2,val:"充值活动"},{key:3,val:"会员充值"},{key:4,val:"平台会员充值"}],this.placeholderVal="订单类型"):"paySource"==this.type?(this.options=[{key:1,val:"柚子"},{key:2,val:"嘉书"},{key:3,val:"迈步"},{key:4,val:"点众-阳光"}],this.placeholderVal="付费来源"):"wx_reportRule"==this.type?this.reportRule_init():"corpIdList"==this.type?this.getCorpIdList():"circleCreate"==this.type?(this.getsysUserList(),this.placeholderVal="选择创建人"):"circleType"==this.type?(this.options=[{key:2,val:"个人发表"},{key:1,val:"企业发表"}],this.placeholderVal="朋友圈类型"):"importRecordDetial_addStatus"==this.type?(this.options=[{key:0,val:"全部"},{key:1,val:"待添加"},{key:2,val:"待通过"},{key:3,val:"已添加"},{key:4,val:"待分配"}],this.placeholderVal="添加状态"):"promotionType"==this.type?(this.options=[{key:h.p.h5,val:"H5"},{key:h.p.mini_program,val:"小程序"}],this.placeholderVal="推广类型"):"incomeSource"==this.type?(this.options=[{key:h.d.launch,val:"投放推广"},{key:h.d.operation,val:"运营推广"}],this.placeholderVal="收入来源"):"launchType"==this.type?(this.options=[{key:h.h.mp,val:"MP投放"},{key:h.h.adq,val:"ADQ投放"}],this.placeholderVal="投放类型"):"adqAccount"==this.type?(this.getAdqAccountList(),this.placeholderVal="ADQ账号"):"allAccount"==this.type?(this.getAllAccountList(),this.placeholderVal="总表账号"):"platform"==this.type?(this.getPlatformList(),this.placeholderVal="请选择平台"):"mpAccountHS"==this.type?(this.getMpAccountHSList(),this.placeholderVal="请选择账号"):"isActive"==this.type?(this.options=[{key:h.f.NOT_ACTIVATED,val:"未激活"},{key:h.f.ACTIVATED,val:"已激活"}],this.placeholderVal="请选择激活状态"):"orderSource"==this.type?(this.getOrderSource(),this.placeholderVal="付费来源"):"orderSourceHS"==this.type?(this.getOrderSourceHS(),this.placeholderVal="订单来源"):"operatorGroup"==this.type?(this.getOperatorGroup(),this.placeholderVal="运营组"):"customerStaffStatus"==this.type?(this.options=[{key:h.b.USING,val:"运营中"},{key:h.b.STOPPED,val:"已停用"},{key:h.b.BANNED,val:"已封禁"}],this.placeholderVal="请选择"):"expireDays"==this.type?(this.options=[{key:3,val:"3天"},{key:7,val:"7天"},{key:15,val:"15天"}],this.placeholderVal="请选择"):"chatGroupOwner"==this.type?(this.getChatGroupOwner(),this.placeholderVal="请选择群主"):"orderPayType"==this.type?(this.options=[{key:1,val:"小程序虚拟支付"},{key:2,val:"其他类型支付"}],this.placeholderVal="支付类型"):"licenseTaskStatus"==this.type?this.options=[].concat(d()(h.l)):this.init()},methods:{onVisibleChange:function(t){this.$emit("visible-change",t)},getChatGroupOwner:function(){var t=this;return l()(r.a.mark(function e(){var a,i,n,s,o,l,c,d,h,p;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(a=""+t.URL.BASEURL+t.URL.chatGroup_chatGroupOwnerIndex,i={},n=t.afferent_params,s=n.isSelectedCorp,o=void 0!==s&&s,l=n.corpid,c=void 0===l?"":l,!o||c){e.next=8;break}return t.options=[],e.abrupt("return");case 8:o&&c&&(i.corpid=c);case 9:return e.next=11,t.$axios.get(a,{params:i});case 11:d=e.sent,h=d.data,(p=void 0===h?{}:h)&&0==p.errno&&(t.options=Array.isArray(p.rst)?p.rst:[],t.options.forEach(function(t){t.val=t.name,t.key=t.user_id}));case 15:case"end":return e.stop()}},e,t)}))()},getOperatorGroup:function(){var t=this;this.$axios.get(this.URL.BASEURL+this.URL.operatorGroup_groupList,{params:{page:1,page_size:500,operator_id:""}}).then(function(e){(e=e.data)&&0==e.errno&&Array.isArray(e.rst.data)?(t.options=e.rst.data,t.options.forEach(function(t){t.val=t.group_name,t.key=t.group_id})):e.errno}).catch(function(t){})},getOrderSourceHS:function(){var t=this;this.$axios.get(this.URL.BASEURL+this.URL.dataBoardHS_platformList,{params:{}}).then(function(e){(e=e.data)&&0==e.errno?(t.options=e.rst,t.options.forEach(function(t){t.val=t.desc,t.key=t.order_source})):e.errno}).catch(function(t){})},getOrderSource:function(){var t=this;this.$axios.get(this.URL.BASEURL+this.URL.order_platformList,{params:{}}).then(function(e){(e=e.data)&&0==e.errno?(t.options=e.rst,t.options.forEach(function(t){t.val=t.platform_title,t.key=t.platform_id})):e.errno}).catch(function(t){})},getMpAccountHSList:function(){var t=this;this.$axios.get(this.URL.BASEURL+this.URL.dataBoardHS_wxAccountList,{params:{is_select:1}}).then(function(e){(e=e.data)&&0==e.errno?(t.options=e.rst,t.options.forEach(function(t){t.val=t.account_name,t.key=t.wechat_account_id})):e.errno}).catch(function(t){})},getPlatformList:function(){var t=this;this.$axios.post(this.URL.BASEURL+this.URL.getPlatformOptions,{}).then(function(e){(e=e.data)&&0==e.errno?(t.options=e.rst,t.options.forEach(function(t){t.val=t.platform_name,t.key=t.platform_id})):e.errno}).catch(function(t){})},getAdqAccountList:function(){var t=this;this.$axios.get(this.URL.BASEURL+this.URL.adqAccount_list,{params:{is_select:1}}).then(function(e){(e=e.data)&&0==e.errno?(t.options=e.rst,t.options.forEach(function(t){t.val=t.account_id,t.key=t.account_id})):e.errno}).catch(function(t){})},getAllAccountList:function(){var t=this;this.$axios.get(this.URL.BASEURL+this.URL.dataBoard_allAccountOptions,{params:{keyword:""}}).then(function(e){(e=e.data)&&0==e.errno?(t.options=e.rst,t.options.forEach(function(t){t.val=t.account_name,t.key=t.account_id})):e.errno}).catch(function(t){})},getsysUserList:function(){var t=this;this.$axios.get(this.URL.BASEURL+this.URL.getsysUserList,{params:n()({},this.afferent_params)}).then(function(e){(e=e.data)&&0==e.errno?(t.options=e.rst,t.options.forEach(function(t){t.val=t.name,t.key=t.admin_id})):e.errno}).catch(function(t){})},init_afferent:function(){this.afferent_value&&(this.value=this.afferent_value)},clear:function(){this.value=[],this.$emit("channelDefine",[])},change:function(){this.$emit("channelDefine",this.value)},init:function(){var t=this;this.$axios.get(this.URL.BASEURL+this.URL.addWayList,{}).then(function(e){(e=e.data)&&0==e.errno?t.options=e.rst:e.errno}).catch(function(t){})},thePublic_init:function(){var t=this;this.$axios.get(this.URL.BASEURL+this.URL.pitcher_wxAccountList,{params:{is_select:1}}).then(function(e){(e=e.data)&&0==e.errno?(t.options=e.rst,t.options.forEach(function(t){t.val=t.account_name,t.key=t.wechat_account_id})):e.errno}).catch(function(t){})},getOfficialAccount:function(){var t=this;this.$axios.get(this.URL.BASEURL+this.URL.pitcher_officialAccountsList,{params:{is_select:1}}).then(function(e){(e=e.data)&&0==e.errno?(t.options=e.rst,t.options.forEach(function(t){t.val=t.account_name,t.key=t.wechat_account_id})):e.errno}).catch(function(t){})},dramaList_init:function(){var t=this;this.$axios.get(this.URL.BASEURL+this.URL.pitcher_dramaList,{params:{is_select:1}}).then(function(e){(e=e.data)&&0==e.errno?(t.options=e.rst,t.options.forEach(function(t){t.val=t.name,t.key=t.id})):e.errno}).catch(function(t){})},popularizCompanys_init:function(){var t=this;this.$axios.get(this.URL.BASEURL+this.URL.stat_popularizCompanys,{params:this.afferent_params}).then(function(e){(e=e.data)&&0==e.errno?(t.options=e.rst,t.options.forEach(function(t){t.val=t.principalName,t.key=t.principalName})):e.errno}).catch(function(t){})},pitcher_init:function(){var t=this;this.$axios.get(this.URL.BASEURL+this.URL.pitcher_pitcherList,{params:this.afferent_params}).then(function(e){(e=e.data)&&0==e.errno?(t.options=e.rst,t.options.forEach(function(t){t.val=t.name,t.key=t.id})):e.errno}).catch(function(t){})},reportRule_init:function(){var t=this;this.$axios.get(this.URL.BASEURL+this.URL.pitcher_reportRuleList,{}).then(function(e){(e=e.data)&&0==e.errno?(t.options=e.rst,t.options.forEach(function(t){t.val=t.name,t.key=t.id})):e.errno}).catch(function(t){})},getCorpIdList:function(){var t=this;this.$axios.get(this.URL.BASEURL+this.URL.pitcher_getCorpIdList,{}).then(function(e){(e=e.data)&&0==e.errno?(t.options=e.rst,t.options.forEach(function(t){t.val=t.corp_name,t.key=t.corpid})):e.errno}).catch(function(t){})}}},u={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"common-screen-item"},[t.title&&""!=t.title?a("label",{staticClass:"common-screen-label",style:t.labelWidth?"width:auto;padding-left:30px":""},[t._v(t._s(t.title))]):t._e(),t._v(" "),a("el-select",{staticClass:"select-cls",style:{width:t.width||"210px"},attrs:{size:"small",placeholder:t.placeholder||t.placeholderVal||"请选择",clearable:t.clearable,filterable:"",disabled:t.disabled,multiple:"","collapse-tags":""},on:{change:t.change,"visible-change":t.onVisibleChange},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}},t._l(t.options,function(t){return a("el-option",{key:t.key,attrs:{label:t.val,value:t.key}})}),1)],1)},staticRenderFns:[]};var _=a("VU/8")(p,u,!1,function(t){a("atPV")},"data-v-f7c9194e",null);e.a=_.exports},MDze:function(t,e){},Trmj:function(t,e){},atPV:function(t,e){},sBsN:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a("Gu7T"),n=a.n(i),s=a("Dd8w"),r=a.n(s),o=a("//Fk"),l=a.n(o),c=a("d7EF"),d=a.n(c),h=a("Xxa5"),p=a.n(h),u=a("exGp"),_=a.n(u),f=a("u2KI"),m=a.n(f),y=a("gzej"),g=a("KnvP"),v=a("erru"),L=a("1zIV"),x=a("3ivx"),k=a("la//"),S=a("M4fF"),C=a.n(S),w={components:{datePicker:y.a,inputRange:g.a,selfChannel:v.a,selfChannelMultiple:L.a,switchMpAdq:x.a},data:function(){var t=[this.$getDay(-30,!1),this.$getDay(0,!1)];return{default_time:t,reset:!1,height:"",pageLoading:!1,chartLoading:!1,myChart:null,chartDataList:[],legendList:[{name:"消耗",key:"paid",color:"#2983DF",selectFlag:!0},{name:"首日roi",key:"first_roi",color:"#EB4315",selectFlag:!0},{name:"首日新增用户充值金额",key:"pay_money",color:"#EFAF47",selectFlag:!0},{name:"付费成本",key:"first_charge_user_cost",color:"#00B38A",selectFlag:!0},{name:"当日付费用户arpu值",key:"day_paid_user_arpu",color:"#84CDFC",selectFlag:!0},{name:"3天倍率",key:"three_days_rate",color:"#AED570",selectFlag:!0},{name:"7天倍率",key:"seven_days_rate",color:"#7366FF",selectFlag:!0},{name:"15天倍率",key:"fifteen_days_rate",color:"#F28544",selectFlag:!0},{name:"30天倍率",key:"thirty_days_rate",color:"#E360C8",selectFlag:!0}],percentFields:m()(["首日roi","3天倍率","7天倍率","15天倍率","30天倍率"]),summaryLoading:!1,summaryTableCol:[],detailLoading:!1,detailsTableCol:[],detailsTableColDays:[],pagination:{page:1,page_size:20,pages:0,total:0},filter:{order_type:"",time:t,account_id:[],account_id_adq:[],account_id_sum:[],closing_date:"",plat_order_type:"",costCover:["",""],sort_field:"paid",sort_type:"desc"},updateTime:"",isShowEmpty:!1}},computed:{isMP:function(){return this.filter.order_type===k.n.MP},isADQ:function(){return this.filter.order_type===k.n.ADQ},isSUM:function(){return this.filter.order_type===k.n.SUM},isShowTimes:function(){return!(this.isMP&&this.filter.account_id&&this.filter.account_id.length||this.isADQ&&this.filter.account_id_adq&&this.filter.account_id_adq.length||this.isSUM&&this.filter.account_id_sum&&this.filter.account_id_sum.length)},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.initTableHeight(),this.handleGetChart(),this.handleGetSummaryList(),this.handleGetList(),this.handleGetUpdateTime()):this.isShowEmpty=!0},beforeDestroy:function(){this.myChart&&this.myChart.clear()},methods:{getDefaultOrderType:function(){return this.isShowAdqBtn?(this.filter.order_type=k.n.ADQ,k.n.ADQ):this.isShowMpBtn?(this.filter.order_type=k.n.MP,k.n.MP):(this.$message.warning('暂无数据权限,请前往"账号管理"添加配置'),!1)},initTableHeight:function(){this.height=document.documentElement.clientHeight-200>400?document.documentElement.clientHeight-200:400},handleGetUpdateTime:function(){var t=this;return _()(p.a.mark(function e(){var a,i,n,s;return p.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,a={type:""},t.isMP&&(a.type="account_data_trend_mp"),t.isADQ&&(a.type="account_data_trend_adq"),t.isSUM&&(a.type="account_data_trend"),e.next=7,t.$axios.get(""+t.URL.BASEURL+t.URL.dataBoard_uptime,{params:a});case 7:i=e.sent,n=i.data,(s=void 0===n?{}:n)&&0==s.errno?t.updateTime=s.rst.uptime:4002!=s.errno&&(t.$message.warning(s.err),t.updateTime=""),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(0),t.updateTime="";case 16:case"end":return e.stop()}},e,t,[[0,13]])}))()},handleGetSummaryList:function(){var t=this;return _()(p.a.mark(function e(){var a,i,n,s,r,o,l,c,d,h,u,_;return p.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t.summaryLoading=!0,a={start_date:t.filter.time[0],end_date:t.filter.time[1],closing_date:t.filter.closing_date,plat_order_type:t.filter.plat_order_type,cost_cover_min:t.filter.costCover[0],cost_cover_max:t.filter.costCover[1]},i="",n="",s=t.filter,r=s.account_id_adq,o=s.account_id,l=s.account_id_sum,t.isADQ?(a.account_id=r&&r.length?r.join(","):"",a.ad_type=1,i=""+t.URL.BASEURL+t.URL.dataBoard_allAccountSummary,n="isADQ"):t.isMP?(a.account_id=o&&o.length?o.join(","):"",a.ad_type=2,i=""+t.URL.BASEURL+t.URL.dataBoard_allAccountSummary,n="isMP"):t.isSUM&&(a.account_id=l&&l.length?l.join(","):"",a.ad_type="",i=""+t.URL.BASEURL+t.URL.dataBoard_allAccountSummary,n="isSUM"),e.next=9,t.$axios.post(i,a);case 9:if(c=e.sent,d=c.data,!(h=void 0===d?{}:d)||0!=h.errno){e.next=22;break}return u=[],h.rst.header.forEach(function(t){t.tableName=n,t.name&&t.name.length>6&&(t.min_width=20*t.name.length),u.push(t)}),t.summaryTableCol=m()(u),e.next=18,t.$nextTick();case 18:_=Array.isArray(h.rst.data)?h.rst.data:[h.rst.data],t.$refs.summaryTable.reloadData(_),e.next=23;break;case 22:4002!=h.errno&&(t.$message.warning(h.err),t.$refs.summaryTable.reloadData([]));case 23:e.next=29;break;case 25:e.prev=25,e.t0=e.catch(0),console.log(e.t0),t.$refs.summaryTable.reloadData([]);case 29:return e.prev=29,t.summaryLoading=!1,e.finish(29);case 32:case"end":return e.stop()}},e,t,[[0,25,29,32]])}))()},handleGetList:function(){var t=this;return _()(p.a.mark(function e(){var a,i,n,s,r,o,l,c,d,h,u,_,f;return p.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t.detailLoading=!0,a={page:t.pagination.page,page_size:t.pagination.page_size,start_date:t.filter.time[0],end_date:t.filter.time[1],closing_date:t.filter.closing_date,plat_order_type:t.filter.plat_order_type,cost_cover_min:t.filter.costCover[0],cost_cover_max:t.filter.costCover[1],sort_field:t.filter.sort_field,sort_type:t.filter.sort_type},i="",n="",s=t.filter,r=s.account_id_adq,o=s.account_id,l=s.account_id_sum,t.isADQ?(a.account_id=r&&r.length?r.join(","):"",a.ad_type=1,i=""+t.URL.BASEURL+t.URL.dataBoard_allAccount,n="isADQ"):t.isMP?(a.account_id=o&&o.length?o.join(","):"",a.ad_type=2,i=""+t.URL.BASEURL+t.URL.dataBoard_allAccount,n="isMP"):t.isSUM&&(a.account_id=l&&l.length?l.join(","):"",a.ad_type="",i=""+t.URL.BASEURL+t.URL.dataBoard_allAccount,n="isSUM"),e.next=9,t.$axios.post(i,a);case 9:if(c=e.sent,d=c.data,!(h=void 0===d?{}:d)||0!=h.errno){e.next=28;break}return h.rst.extra[0].fixed="left",h.rst.extra[1].fixed="left",u=[],_=[],h.rst.extra.forEach(function(e){e.tableName=n,e.name.includes("DAY")?_.push(e):(e.name&&e.name.length>6&&(e.min_width=20*e.name.length),"ref_date"===e.column&&t.isShowTimes&&(e.min_width=200),u.push(e))}),t.detailsTableCol=m()(u),t.detailsTableColDays=m()(_),e.next=22,t.$nextTick();case 22:f=Array.isArray(h.rst.data)?h.rst.data:[],t.$refs.detailsTable.reloadData(f),t.pagination.total=h.rst.pageInfo.total,t.pagination.pages=h.rst.pageInfo.pages,e.next=29;break;case 28:4002!=h.errno&&(t.$message.warning(h.err),t.$refs.detailsTable.reloadData([]),t.pagination.total=0,t.pagination.pages=0);case 29:e.next=37;break;case 31:e.prev=31,e.t0=e.catch(0),console.log(e.t0),t.$refs.detailsTable.reloadData([]),t.pagination.total=0,t.pagination.pages=0;case 37:return e.prev=37,t.detailLoading=!1,e.finish(37);case 40:case"end":return e.stop()}},e,t,[[0,31,37,40]])}))()},handleGetChart:function(){var t=this;return _()(p.a.mark(function e(){var a,i,n,s,r,o,l,c,d;return p.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t.chartLoading=!0,a={start_date:t.filter.time[0],end_date:t.filter.time[1],closing_date:t.filter.closing_date,plat_order_type:t.filter.plat_order_type,cost_cover_min:t.filter.costCover[0],cost_cover_max:t.filter.costCover[1]},i="",n=t.filter,s=n.account_id_adq,r=n.account_id,o=n.account_id_sum,t.isADQ?(a.account_id=s&&s.length?s.join(","):"",a.ad_type=1,i=""+t.URL.BASEURL+t.URL.dataBoard_allAccountCurve):t.isMP?(a.account_id=r&&r.length?r.join(","):"",a.ad_type=2,i=""+t.URL.BASEURL+t.URL.dataBoard_allAccountCurve):t.isSUM&&(a.account_id=o&&o.length?o.join(","):"",a.ad_type="",i=""+t.URL.BASEURL+t.URL.dataBoard_allAccountCurve),e.next=8,t.$axios.post(i,a);case 8:if(l=e.sent,c=l.data,!(d=void 0===c?{}:c)||0!=d.errno){e.next=18;break}return t.chartDataList=Array.isArray(d.rst.data)?d.rst.data:[],e.next=15,t.$nextTick();case 15:t.handleDrawChart(),e.next=24;break;case 18:if(4002==d.errno){e.next=24;break}return t.$message.warning(d.err),t.chartDataList=[],e.next=23,t.$nextTick();case 23:t.myChart&&t.myChart.clear();case 24:e.next=33;break;case 26:return e.prev=26,e.t0=e.catch(0),console.log(e.t0),t.chartDataList=[],e.next=32,t.$nextTick();case 32:t.myChart&&t.myChart.clear();case 33:return e.prev=33,t.chartLoading=!1,e.finish(33);case 36:case"end":return e.stop()}},e,t,[[0,26,33,36]])}))()},handleDrawChart:function(){var t=this;this.myChart&&this.myChart.clear();var e=this,a=[],i=[],n=this.chartDataList.map(function(t){return t.expense_date});this.legendList.forEach(function(s){if(s.selectFlag){i.push({type:"value",name:"",show:!1,position:"left",axisTick:{show:!1},splitLine:{lineStyle:{color:"#F2F2f2",type:"dashed"}},axisLine:{show:!0,lineStyle:{color:"#F2F2f2"}},nameTextStyle:{color:"#999999",fontSize:13},axisLabel:{color:"#999999",fontSize:12,show:!0,formatter:function(t){return e.percentFields.includes(s.name)?e.$formatNum(t)+"%":e.$NumberHandle(t)}}});var r=t.chartDataList.map(function(t){return t[s.key]||0==t[s.key]?t[s.key]:"-"});a.push({type:"line",smooth:!0,name:s.name,yAxisIndex:0,data:r,lineStyle:{width:2},symbol:1==n.length?"emptyCircle":"none",itemStyle:{color:s.color,borderType:"emptyCircle"}})}}),i.forEach(function(t,e){t.show=0==e}),a.forEach(function(t,e){t.yAxisIndex=e});var s={title:"",tooltip:{trigger:"axis",show:!0,formatter:function(t){var a=t[0].name+"<br/>";return t.forEach(function(t){e.percentFields.includes(t.seriesName)?a+=""+t.marker+t.seriesName+":"+e.$formatNum(t.value)+"%<br/>":a+=""+t.marker+t.seriesName+":"+e.$formatNum(t.value)+"<br/>"}),a}},legend:{itemWidth:8,itemHeight:2,icon:"plain",show:!1,textStyle:{fontSize:12,color:"#666666"}},grid:{top:"6%",left:"5%",right:"4%",bottom:"16%",containLabel:!1},xAxis:[{type:"category",data:n,boundaryGap:!1,axisLine:{show:!0,lineStyle:{color:"#F2F2f2"}},axisTick:{show:!1},splitLine:{show:!1},axisLabel:{color:"#666",fontSize:10,rotate:30}}],yAxis:i,series:a};this.myChart=this.myChart?this.myChart:this.$echarts.init(document.getElementById("trend")),this.myChart.setOption(s)},onClickLegend:function(t,e){var a=this;return _()(p.a.mark(function i(){var n,s;return p.a.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(1!=(n=a.legendList.filter(function(t){return t.selectFlag})).length||n[0].key!=t.key){i.next=3;break}return i.abrupt("return",a.$message.warning("至少存在一条曲线"));case 3:return(s=C.a.cloneDeep(t)).selectFlag=!s.selectFlag,a.$set(a.legendList,e,s),i.next=8,a.$nextTick();case 8:a.handleDrawChart();case 9:case"end":return i.stop()}},i,a)}))()},onChangeOrderType:function(){this.handleGetChart(),this.handleGetSummaryList(),this.filter.sort_field=this.isShowTimes?"paid":"expense_date",this.filter.sort_type="desc",this.pagination.page=1,this.handleGetList(),this.handleGetUpdateTime()},onChangeTime:function(t){this.filter.time=Array.isArray(t)?t:[],this.handleGetChart(),this.handleGetSummaryList(),this.pagination.page=1,this.handleGetList(),this.handleGetUpdateTime()},onChangeAccountId:function(t){this.filter.account_id=t,this.handleGetChart(),this.handleGetSummaryList(),this.filter.sort_field=this.isShowTimes?"paid":"expense_date",this.filter.sort_type="desc",this.pagination.page=1,this.handleGetList(),this.handleGetUpdateTime()},onChangeAccountIdAdq:function(t){this.filter.account_id_adq=t,this.handleGetChart(),this.handleGetSummaryList(),this.filter.sort_field=this.isShowTimes?"paid":"expense_date",this.filter.sort_type="desc",this.pagination.page=1,this.handleGetList(),this.handleGetUpdateTime()},onChangeAccountIdSum:function(t){this.filter.account_id_sum=t,this.handleGetChart(),this.handleGetSummaryList(),this.filter.sort_field=this.isShowTimes?"paid":"expense_date",this.filter.sort_type="desc",this.pagination.page=1,this.handleGetList(),this.handleGetUpdateTime()},onChangeClosingDate:function(t){this.filter.closing_date=t||"",this.handleGetChart(),this.handleGetSummaryList(),this.pagination.page=1,this.handleGetList(),this.handleGetUpdateTime()},onChangePromotionType:function(t){this.filter.plat_order_type=t,this.handleGetChart(),this.handleGetSummaryList(),this.pagination.page=1,this.handleGetList(),this.handleGetUpdateTime()},handleCurrentChange:function(t){this.handleGetChart(),this.handleGetSummaryList(),this.pagination.page=t,this.handleGetList(),this.handleGetUpdateTime()},handleSizeChange:function(t){this.handleGetChart(),this.handleGetSummaryList(),this.pagination.page_size=t,this.pagination.page=1,this.handleGetList(),this.handleGetUpdateTime()},onClickSearch:function(){this.handleGetChart(),this.handleGetSummaryList(),this.pagination.page=1,this.handleGetList(),this.handleGetUpdateTime()},onClickSort:function(t,e){this.filter.sort_field===t?this.filter.sort_type===e?(this.filter.sort_field=this.isShowTimes?"paid":"expense_date",this.filter.sort_type="desc"):this.filter.sort_type=e:(this.filter.sort_field=t,this.filter.sort_type=e),this.pagination.page=1,this.handleGetList(),this.handleGetChart(),this.handleGetSummaryList(),this.handleGetUpdateTime()},onClickReset:function(){this.reset=!this.reset,this.filter.order_type=this.getDefaultOrderType(),this.filter.time=this.default_time,this.filter.account_id=[],this.filter.account_id_adq=[],this.filter.account_id_sum=[],this.filter.closing_date="",this.filter.plat_order_type="",this.filter.costCover=["",""],this.filter.sort_field="paid",this.filter.sort_type="desc",this.pagination.page=1,this.handleGetChart(),this.handleGetSummaryList(),this.handleGetList(),this.handleGetUpdateTime()},onClickExport:function(){var t=this;return _()(p.a.mark(function e(){var a,i,n,s,o,c,h,u,_,f,m,y;return p.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t.pagination.total){e.next=2;break}return e.abrupt("return",t.$message.warning("暂无数据可导出"));case 2:return e.prev=2,t.pageLoading=!0,a={summary:"",detail:""},i={start_date:t.filter.time[0],end_date:t.filter.time[1],closing_date:t.filter.closing_date,plat_order_type:t.filter.plat_order_type,cost_cover_min:t.filter.costCover[0],cost_cover_max:t.filter.costCover[1]},n=t.filter,s=n.account_id_adq,o=n.account_id,c=n.account_id_sum,t.isADQ?(i.account_id=s&&s.length?s.join(","):"",i.ad_type=1,a.summary=""+t.URL.BASEURL+t.URL.dataBoard_allAccountSummary,a.detail=""+t.URL.BASEURL+t.URL.dataBoard_allAccount):t.isMP?(i.account_id=o&&o.length?o.join(","):"",i.ad_type=2,a.summary=""+t.URL.BASEURL+t.URL.dataBoard_allAccountSummary,a.detail=""+t.URL.BASEURL+t.URL.dataBoard_allAccount):t.isSUM&&(i.account_id=c&&c.length?c.join(","):"",i.ad_type="",a.summary=""+t.URL.BASEURL+t.URL.dataBoard_allAccountSummary,a.detail=""+t.URL.BASEURL+t.URL.dataBoard_allAccount),e.next=10,l.a.all([t.$axios.post(a.summary,i),t.$axios.post(a.detail,r()({},i,{sort_field:t.filter.sort_field,sort_type:t.filter.sort_type,page:1,page_size:t.$store.state.exportNumber}))]);case 10:h=e.sent,u=d()(h,2),_=u[0].data,f=void 0===_?{}:_,m=u[1].data,y=void 0===m?{}:m,f&&0==f.errno&&y&&0==y.errno?t.handleExport({summaryData:f.rst,detailData:y.rst}):4002==f.errno&&4002==y.errno||(t.$message.warning(f.err),t.$message.warning(y.err)),e.next=23;break;case 19:e.prev=19,e.t0=e.catch(2),console.log(e.t0),t.$message.warning("导出失败,请重试");case 23:return e.prev=23,t.pageLoading=!1,e.finish(23);case 26:case"end":return e.stop()}},e,t,[[2,19,23,26]])}))()},handleExport:function(t){var e=t.summaryData,a=void 0===e?{}:e,i=t.detailData,s=void 0===i?{}:i,r=[];r=s.extra.filter(function(t){return t.name.includes("DAY")}),a.header.forEach(function(t){"时间"===t.name?t.column="ref_date":"账户"===t.name&&(t.column="app_name")}),a.data.ref_date="汇总",a.data.app_name="汇总",s.data.forEach(function(t){t.ref_date=t.expense_date+(t.expense_date_end?" ~ "+t.expense_date_end:""),t.app_name=t.app_name||t.account_name||t.account_id,r.forEach(function(e,a){t[e.column]="充: "+(t&&t.day_info&&t.day_info[a]&&(t.day_info[a].pay_money||0==t.day_info[a].pay_money)?t.day_info[a].pay_money:"-")+" 回: "+(t&&t.day_info&&t.day_info[a]&&(t.day_info[a].total_roi||0==t.day_info[a].total_roi)?t.day_info[a].total_roi:"-")+" 增: "+(t&&t.day_info&&t.day_info[a]&&(t.day_info[a].new_roi||0==t.day_info[a].new_roi)?t.day_info[a].new_roi:"-")+" 倍: "+(t&&t.day_info&&t.day_info[a]&&(t.day_info[a].income_times||0==t.day_info[a].income_times)?t.day_info[a].income_times:"-")+" 充值人数: "+(t&&t.day_info&&t.day_info[a]&&(t.day_info[a].charge_user||0==t.day_info[a].charge_user)?t.day_info[a].charge_user:"-")})});var o=[{tHeader:[].concat(n()(a.header.map(function(t){return t.name})),n()(r.map(function(t){return t.name}))),filterVal:[].concat(n()(a.header.map(function(t){return t.column})),n()(r.map(function(t){return t.column}))),tableDatas:[a.data].concat(n()(s.data)),sheetName:""}];this.$exportOrder({excelDatas:o,name:"账号数据趋势(导出时间:"+this.$getDay(0)+")"})},getHeaderCellStyle:function(){return{backgroundColor:"#FFFFFF !important",border:"none!important"}}}},A={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.pageLoading,expression:"pageLoading"}],staticClass:"accountTrends-wrap"},[t.isShowEmpty?a("el-empty",{staticClass:"empty-wrap",attrs:{description:"暂无数据权限"}}):[a("div",{staticClass:"screenBox flex"},[a("switchMpAdq",{attrs:{isShowAdqBtn:t.isShowAdqBtn,isShowMpBtn:t.isShowMpBtn,isShowSumBtn:t.isShowSumBtn},on:{change:t.onChangeOrderType},model:{value:t.filter.order_type,callback:function(e){t.$set(t.filter,"order_type",e)},expression:"filter.order_type"}}),t._v(" "),t.isCanExport?a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:t.onClickExport}},[t._v("导出Excel")]):t._e()],1),t._v(" "),a("div",{staticClass:"screenBox filter-wrap"},[a("datePicker",{staticStyle:{"margin-right":"30px"},attrs:{reset:t.reset,title:"自定义",quickFlag:!0,afferent_time:t.default_time,clearFlag:!1},on:{changeTime:t.onChangeTime}}),t._v(" "),a("selfChannelMultiple",{directives:[{name:"show",rawName:"v-show",value:t.isMP,expression:"isMP"}],staticStyle:{"margin-right":"30px","margin-left":"-30px"},attrs:{reset:t.reset,title:"账号",type:"thePublic",labelWidth:""},on:{channelDefine:t.onChangeAccountId}}),t._v(" "),a("selfChannelMultiple",{directives:[{name:"show",rawName:"v-show",value:t.isADQ,expression:"isADQ"}],staticStyle:{"margin-right":"30px","margin-left":"-30px"},attrs:{reset:t.reset,title:"账号",type:"adqAccount",labelWidth:""},on:{channelDefine:t.onChangeAccountIdAdq}}),t._v(" "),a("selfChannelMultiple",{directives:[{name:"show",rawName:"v-show",value:t.isSUM,expression:"isSUM"}],staticStyle:{"margin-right":"30px","margin-left":"-30px"},attrs:{reset:t.reset,title:"账号",type:"allAccount",labelWidth:""},on:{channelDefine:t.onChangeAccountIdSum}}),t._v(" "),a("div",{staticClass:"common-screen-item",staticStyle:{"margin-right":"30px"}},[a("label",{staticClass:"common-screen-label"},[t._v("收益截止日期")]),t._v(" "),a("el-date-picker",{staticStyle:{width:"150px"},attrs:{"value-format":"yyyy-MM-dd",type:"date",placeholder:"选择日期",size:"small"},on:{change:t.onChangeClosingDate},model:{value:t.filter.closing_date,callback:function(e){t.$set(t.filter,"closing_date",e)},expression:"filter.closing_date"}})],1),t._v(" "),a("div",{staticClass:"flex"},[a("selfChannel",{staticStyle:{"margin-right":"30px","margin-left":"-30px"},attrs:{reset:t.reset,title:"推广类型",type:"promotionType",labelWidth:""},on:{channelDefine:t.onChangePromotionType}}),t._v(" "),a("el-button",{attrs:{size:"mini",type:"primary",plain:""},on:{click:t.onClickSearch}},[t._v("确定")]),t._v(" "),a("el-button",{attrs:{size:"mini",plain:""},on:{click:t.onClickReset}},[t._v("重置")])],1)],1),t._v(" "),a("div",{staticClass:"update-time"},[a("i",{staticClass:"el-icon-warning-outline"}),t._v("数据更新时间:"+t._s(t.updateTime||"-"))]),t._v(" "),a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.chartLoading,expression:"chartLoading"}],staticClass:"trendBox mt-10"},[a("div",{staticClass:"legendBox"},t._l(t.legendList,function(e,i){return a("div",{key:i,staticClass:"legendItem",on:{click:function(a){return t.onClickLegend(e,i)}}},[t._v(t._s(e.name)+"\n "),a("div",{class:["checkbox",e.selectFlag?"checkbox_active":""],style:e.selectFlag?"background: "+e.color+";border-color: "+e.color+";":""},[a("i",{staticClass:"el-icon-check"})])])}),0),t._v(" "),a("div",{staticStyle:{width:"100%",height:"250px"},attrs:{id:"trend"}}),t._v(" "),t.chartDataList&&t.chartDataList.length?t._e():a("div",{staticStyle:{"text-align":"center",color:"#333","font-size":"14px",position:"relative",top:"-100px"}},[t._v("暂无数据")])]),t._v(" "),a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.summaryLoading,expression:"summaryLoading"}]},[a("ux-grid",{ref:"summaryTable",staticClass:"summaryTable",attrs:{border:!1,"header-cell-style":t.getHeaderCellStyle,"show-footer-overflow":"tooltip","show-overflow":"tooltip",size:"mini"},on:{"row-click":function(){}}},t._l(t.summaryTableCol,function(e,i){return a("ux-table-column",{key:e.column+e.name+e.tableName,attrs:{resizable:!0,field:e.column,title:e.name,"min-width":e.min_width?e.min_width:140,fixed:e.fixed?e.fixed:"",align:"center"},scopedSlots:t._u([{key:"header",fn:function(){return[a("div",{staticClass:"flex-align-jus-center"},[t._v("\n "+t._s(e.name)+"\n "),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["时间"===e.name||"账户"===e.name?a("div",[a("span",[t._v("汇总")])]):a("span",[t._v(t._s(n[e.column]||0==n[e.column]?t.$formatNum(n[e.column]):"-"))])]}}],null,!0)})}),1)],1),t._v(" "),a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.detailLoading,expression:"detailLoading"}]},[a("ux-grid",{ref:"detailsTable",staticClass:"detailsTable",attrs:{border:!1,"header-cell-style":t.getHeaderCellStyle,"show-footer-overflow":"tooltip","show-overflow":"tooltip",size:"mini",height:t.height},on:{"row-click":function(){}}},[t._l(t.detailsTableCol,function(e,i){return a("ux-table-column",{key:e.column+e.name+e.tableName,attrs:{resizable:!0,field:e.column,title:e.name,"min-width":e.min_width?e.min_width:140,fixed:e.fixed?e.fixed:"",align:"center"},scopedSlots:t._u([{key:"header",fn:function(){return[a("div",{staticClass:"flex-align-jus-center"},[t._v("\n "+t._s(e.name)+"\n "),e.notes?a("el-tooltip",{attrs:{content:e.notes,placement:"top"}},[a("div",[a("i",{staticClass:"el-icon-question"})])]):t._e(),t._v(" "),e.enable_to_sort?a("div",{staticClass:"sort-wrap"},[a("i",{staticClass:"el-icon-caret-top",class:{active:t.filter.sort_field===e.column&&"asc"===t.filter.sort_type},on:{click:function(a){return t.onClickSort(e.column,"asc")}}}),t._v(" "),a("i",{staticClass:"el-icon-caret-bottom",class:{active:t.filter.sort_field===e.column&&"desc"===t.filter.sort_type},on:{click:function(a){return t.onClickSort(e.column,"desc")}}})]):t._e()],1)]},proxy:!0},{key:"default",fn:function(i){var n=i.row;return["ref_date"===e.column?a("div",[a("span",[t._v(t._s(n.expense_date))]),n.expense_date_end?a("span",[t._v(" ~ "+t._s(n.expense_date_end))]):t._e()]):"account_id"===e.column?a("span",[t._v("\n "+t._s(n.account_id||"-")+"\n ")]):"account_name"===e.column?a("div",[n.account_name.split(",")&&n.account_name.split(",").length>1?[n.account_name.split(",").length<6?t._l(n.account_name.split(","),function(e,i){return a("div",{key:i},[t._v("\n "+t._s(e)+"\n ")])}):[a("el-popover",{attrs:{placement:"top-start",width:"200",trigger:"hover"}},[t._l(n.account_name.split(","),function(e,i){return a("div",{key:i},[t._v("\n "+t._s(e)+"\n ")])}),t._v(" "),a("div",{attrs:{slot:"reference"},slot:"reference"},[t._l(n.account_name.split(","),function(e,i){return a("div",{key:i},[i<4?a("span",[t._v(t._s(e))]):t._e()])}),t._v(" "),a("div",[t._v(" ... ")])],2)],2)]]:a("span",[t._v("\n "+t._s(n.account_name||"-")+"\n ")])],2):a("span",[t._v(t._s(n[e.column]||0==n[e.column]?t.$formatNum(n[e.column]):"-"))])]}}],null,!0)})}),t._v(" "),t._l(t.detailsTableColDays,function(e,i){return a("ux-table-column",{key:i+e.tableName+e.name,attrs:{width:"120"},scopedSlots:t._u([{key:"header",fn:function(){return[a("div",{staticClass:"flex-align-jus-center"},[t._v(t._s(e.name)+"\n "),0===i?a("el-tooltip",{attrs:{placement:"top"}},[a("div",{attrs:{slot:"content"},slot:"content"},[t._v("充:这天的充值金额"),a("br"),t._v("回:截止这天的累计金额/当天消耗"),a("br"),t._v("增:这天回收金额/当天消耗"),a("br"),t._v("倍:累计金额/第一天累计金额"),a("br"),t._v("充值人数:充值总人数")]),t._v(" "),a("div",[a("i",{staticClass:"el-icon-question"})])]):t._e()],1)]},proxy:!0},{key:"default",fn:function(e){var n=e.row;return[a("div",{staticClass:"day_class_info"},[a("span",{staticClass:"font",staticStyle:{color:"#2C9841"}},[t._v("充:")]),t._v(" "),a("span",[t._v(t._s(n&&n.day_info&&n.day_info[i]&&n.day_info[i].pay_money?n.day_info[i].pay_money:"-"))])]),t._v(" "),a("div",{staticClass:"day_class_info"},[a("span",{staticClass:"font",staticStyle:{color:"#EB4315"}},[t._v("回:")]),t._v(" "),a("span",[t._v(t._s(n&&n.day_info&&n.day_info[i]&&n.day_info[i].total_roi?n.day_info[i].total_roi:"-"))])]),t._v(" "),a("div",{staticClass:"day_class_info"},[a("span",{staticClass:"font",staticStyle:{color:"#F28544"}},[t._v("增:")]),t._v(" "),a("span",[t._v(t._s(n&&n.day_info&&n.day_info[i]&&n.day_info[i].new_roi?n.day_info[i].new_roi:"-"))])]),t._v(" "),a("div",{staticClass:"day_class_info"},[a("span",{staticClass:"font",staticStyle:{color:"#2983DF"}},[t._v("倍:")]),t._v(" "),a("span",[t._v(t._s(n&&n.day_info&&n.day_info[i]&&n.day_info[i].income_times?n.day_info[i].income_times:"-"))])]),t._v(" "),a("div",{staticClass:"day_class_info"},[a("span",{staticClass:"font",staticStyle:{color:"#7366FF"}},[t._v("充值人数:")]),t._v(" "),a("span",[t._v(t._s(n&&n.day_info&&n.day_info[i]&&n.day_info[i].charge_user?n.day_info[i].charge_user:"-"))])])]}}],null,!0)})})],2),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:t.pagination.total>0,expression:"pagination.total > 0"}],staticClass:"pagination"},[a("el-pagination",{attrs:{background:"","current-page":t.pagination.page,layout:"prev, pager, next, sizes","page-sizes":[20,50,100],"page-count":Number(t.pagination.pages)},on:{"current-change":t.handleCurrentChange,"size-change":t.handleSizeChange}})],1)],1)]],2)},staticRenderFns:[]};var U=a("VU/8")(w,A,!1,function(t){a("Trmj"),a("MDze")},"data-v-be11f8e8",null);e.default=U.exports}});