|
@@ -340,6 +340,17 @@ const columns = [
|
|
|
dataIndex: 'costY',
|
|
|
align: 'center'
|
|
|
},
|
|
|
+ {
|
|
|
+ title: '次留数',
|
|
|
+ dataIndex: 'eventNextDayStay',
|
|
|
+ scopedSlots: { customRender: 'eventNextDayStay' },
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '次留率',
|
|
|
+ dataIndex: 'eventNextDayStayRatio',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
{
|
|
|
title: '封面展示',
|
|
|
dataIndex: 'photoShow',
|
|
@@ -424,6 +435,178 @@ const columns = [
|
|
|
}
|
|
|
]
|
|
|
|
|
|
+
|
|
|
+const columnsWu = [
|
|
|
+ {
|
|
|
+ title: '时间',
|
|
|
+ dataIndex: 'date',
|
|
|
+ align: 'center',
|
|
|
+ width: 150,
|
|
|
+ customRender: function(text, record, index) {
|
|
|
+ const obj = {
|
|
|
+ children: text,
|
|
|
+ attrs: {}
|
|
|
+ }
|
|
|
+ for (let i = 0; i < length; i++) {
|
|
|
+ if (index == 0 && i == 0) {
|
|
|
+ obj.attrs.rowSpan = length
|
|
|
+ } else {
|
|
|
+ if (index == i) {
|
|
|
+ obj.attrs.rowSpan = 0
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return obj
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '账户Id',
|
|
|
+ dataIndex: 'accountId',
|
|
|
+ align: 'center',
|
|
|
+ width: 150,
|
|
|
+ customRender: function(text, record, index) {
|
|
|
+ const obj = {
|
|
|
+ children: text,
|
|
|
+ attrs: {}
|
|
|
+ }
|
|
|
+ if (active == 1) {
|
|
|
+ for (let i = 0; i < length; i++) {
|
|
|
+ if (index >= length - 3) {
|
|
|
+ obj.attrs.colSpan = 2
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ for (let i = 0; i < length; i++) {
|
|
|
+ if (index >= length - 1) {
|
|
|
+ obj.attrs.colSpan = 2
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return obj
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '账户昵称',
|
|
|
+ dataIndex: 'accountName',
|
|
|
+ scopedSlots: { customRender: 'cost' },
|
|
|
+ align: 'center',
|
|
|
+ width: 150,
|
|
|
+ customRender: function(text, record, index) {
|
|
|
+ const obj = {
|
|
|
+ children: text,
|
|
|
+ attrs: {}
|
|
|
+ }
|
|
|
+ if (active == 1) {
|
|
|
+ for (let i = 0; i < length; i++) {
|
|
|
+ if (index >= length - 3) {
|
|
|
+ obj.attrs.colSpan = 0
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ for (let i = 0; i < length; i++) {
|
|
|
+ if (index >= length - 1) {
|
|
|
+ obj.attrs.colSpan = 0
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return obj
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '消耗(¥)',
|
|
|
+ dataIndex: 'cost',
|
|
|
+ scopedSlots: { customRender: 'cost' },
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '折后消耗(¥)',
|
|
|
+ dataIndex: 'costY',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '封面展示',
|
|
|
+ dataIndex: 'photoShow',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '封面点击',
|
|
|
+ dataIndex: 'photoClick',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '素材曝光数',
|
|
|
+ dataIndex: 'aclick',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '封面点击率',
|
|
|
+ dataIndex: 'photoClickRatio',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: 'cvr',
|
|
|
+ dataIndex: 'cvr',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: 'cpm(¥)',
|
|
|
+ dataIndex: 'cpm',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '行为数',
|
|
|
+ dataIndex: 'bClick',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '转化数',
|
|
|
+ dataIndex: 'formCount',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '折前转化单价(¥)',
|
|
|
+ dataIndex: 'beforeFormPrice',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '折后转化单价(¥)',
|
|
|
+ dataIndex: 'afterFormPrice',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ title: '注册数',
|
|
|
+ dataIndex: 'eventRegister',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '注册成本(¥)',
|
|
|
+ dataIndex: 'eventRegisterCost',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '单价区间',
|
|
|
+ dataIndex: 'price',
|
|
|
+ align: 'center',
|
|
|
+ customRender: function(text, record, index) {
|
|
|
+ const obj = {
|
|
|
+ children: text,
|
|
|
+ attrs: {}
|
|
|
+ }
|
|
|
+ for (let i = 0; i < length; i++) {
|
|
|
+ if (index == 0 && i == 0) {
|
|
|
+ obj.attrs.rowSpan = length
|
|
|
+ } else {
|
|
|
+ if (index == i) {
|
|
|
+ obj.attrs.rowSpan = 0
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return obj
|
|
|
+ }
|
|
|
+ }
|
|
|
+]
|
|
|
export default {
|
|
|
name: 'data-display-statistics',
|
|
|
components: {
|
|
@@ -440,7 +623,7 @@ export default {
|
|
|
title: '账户数据展示',
|
|
|
show: true,
|
|
|
data: [],
|
|
|
- columns,
|
|
|
+ columns:columnsWu,
|
|
|
options: [],
|
|
|
list: [],
|
|
|
appId: [],
|
|
@@ -530,6 +713,11 @@ export default {
|
|
|
// this.appId = value
|
|
|
},
|
|
|
getElseData(value) {
|
|
|
+ if(value){
|
|
|
+ this.columns = columnsWu
|
|
|
+ }else{
|
|
|
+ this.columns = columns
|
|
|
+ }
|
|
|
this.getStatistics()
|
|
|
},
|
|
|
handleBlur() {
|
|
@@ -598,6 +786,11 @@ export default {
|
|
|
addUser() {
|
|
|
var that = this
|
|
|
if (this.appId.length > 0) {
|
|
|
+ if(that.active == 1){
|
|
|
+ that.columns = columnsWu
|
|
|
+ }else{
|
|
|
+ that.columns = columns
|
|
|
+ }
|
|
|
var params = {}
|
|
|
params.accountIds = JSON.stringify(that.appId)
|
|
|
params.type = that.active
|
|
@@ -637,10 +830,12 @@ export default {
|
|
|
params.startDate = this.allValue[0]
|
|
|
params.endDate = this.allValue[1]
|
|
|
}
|
|
|
+
|
|
|
this.data = []
|
|
|
getStatistics(params).then(res => {
|
|
|
console.log(res)
|
|
|
if (res.success) {
|
|
|
+
|
|
|
if (res.result.accountDetail) {
|
|
|
this.statDate = res.result.statDate
|
|
|
this.data = res.result.accountDetail.map((item, index) => {
|
|
@@ -665,7 +860,8 @@ export default {
|
|
|
date: this.statHour ? res.result.statDate + ' ' + this.statHour : res.result.statDate,
|
|
|
formCount: item.formCount > 0 ? item.formCount : item.activationCount,
|
|
|
eventRegister: item.eventRegister,
|
|
|
- eventRegisterCost: item.eventRegisterCost.toFixed(2)
|
|
|
+ eventRegisterCost: item.eventRegisterCost.toFixed(2),
|
|
|
+ eventNextDayStayRatio:item.eventNextDayStayRatio?item.eventNextDayStayRatio.toFixed(2) + '%' : 0 + '%'
|
|
|
}
|
|
|
})
|
|
|
var index = this.data.length
|
|
@@ -784,7 +980,8 @@ export default {
|
|
|
beforeFormPrice: res.result.ratioJson.conversionPrice.toFixed(2),
|
|
|
afterFormPrice: res.result.ratioJson.discountConversionPrice.toFixed(2),
|
|
|
eventRegister: res.result.ratioJson.eventRegister,
|
|
|
- eventRegisterCost: res.result.ratioJson.eventRegisterCost.toFixed(2)
|
|
|
+ eventRegisterCost: res.result.ratioJson.eventRegisterCost.toFixed(2),
|
|
|
+ eventNextDayStayRatio:item.eventNextDayStayRatio?item.eventNextDayStayRatio.toFixed(2) + '%' : 0 + '%'
|
|
|
}
|
|
|
this.data.push(allNow)
|
|
|
this.statDate = res.result.statDate
|
|
@@ -809,6 +1006,11 @@ export default {
|
|
|
}
|
|
|
this.active = checked
|
|
|
active = checked
|
|
|
+ if(this.active == 1){
|
|
|
+ this.columns = columnsWu
|
|
|
+ }else{
|
|
|
+ this.columns = columns
|
|
|
+ }
|
|
|
this.addUser(checked)
|
|
|
},
|
|
|
onTabChange(key, type) {
|