|
@@ -259,6 +259,7 @@ require('echarts/lib/component/graphic')
|
|
|
require('echarts/lib/component/toolbox')
|
|
|
require('echarts/lib/component/legend')
|
|
|
var length = 0
|
|
|
+var active = 1
|
|
|
const columns = [
|
|
|
{
|
|
|
title: '时间',
|
|
@@ -281,7 +282,46 @@ const columns = [
|
|
|
return obj
|
|
|
}
|
|
|
},
|
|
|
- { title: '账户名称', dataIndex: 'accountName', align: 'left' },
|
|
|
+ {
|
|
|
+ title: '账户Id',
|
|
|
+ dataIndex: 'accountId',
|
|
|
+ align: 'center',
|
|
|
+ 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
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return obj
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '账户名称',
|
|
|
+ dataIndex: 'accountName',
|
|
|
+ scopedSlots: { customRender: 'cost' },
|
|
|
+ align: 'center',
|
|
|
+ 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
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return obj
|
|
|
+ }
|
|
|
+ },
|
|
|
{
|
|
|
title: '消耗',
|
|
|
dataIndex: 'cost',
|
|
@@ -329,12 +369,12 @@ const columns = [
|
|
|
align: 'center'
|
|
|
},
|
|
|
{
|
|
|
- title: '表单提交数',
|
|
|
+ title: '转化数',
|
|
|
dataIndex: 'formCount',
|
|
|
align: 'center'
|
|
|
},
|
|
|
{
|
|
|
- title: '表单提交单价',
|
|
|
+ title: '转化单价',
|
|
|
dataIndex: 'formPrice',
|
|
|
align: 'center'
|
|
|
},
|
|
@@ -505,8 +545,8 @@ export default {
|
|
|
params.type = that.active
|
|
|
params.discount = that.discount
|
|
|
if (that.active == 9) {
|
|
|
- params.startDate = dateValue[0]
|
|
|
- params.endDate = dateValue[1]
|
|
|
+ params.startDate = this.allValue[0]
|
|
|
+ params.endDate = this.allValue[1]
|
|
|
}
|
|
|
|
|
|
getReportList(params).then(res => {
|
|
@@ -534,8 +574,8 @@ export default {
|
|
|
params.statHour = this.statHour
|
|
|
params.discount = this.discount
|
|
|
if (this.active == 9) {
|
|
|
- params.startDate = dateValue[0]
|
|
|
- params.endDate = dateValue[1]
|
|
|
+ params.startDate = this.allValue[0]
|
|
|
+ params.endDate = this.allValue[1]
|
|
|
}
|
|
|
this.data = []
|
|
|
getStatistics(params).then(res => {
|
|
@@ -544,14 +584,18 @@ export default {
|
|
|
return {
|
|
|
key: index,
|
|
|
...item,
|
|
|
- accountName: item.accountId,
|
|
|
photoClickRatio: item.photoClickRatio ? (item.photoClickRatio * 100).toFixed(2) + '%' : 0 + '%',
|
|
|
cpm: item.cpm ? '¥' + item.cpm.toFixed(2) : '¥' + 0,
|
|
|
cost: '¥' + item.cost.toFixed(2),
|
|
|
cvr: item.cvr ? (item.cvr * 100).toFixed(2) + '%' : 0 + '%',
|
|
|
costY: '¥' + (item.cost / this.discount).toFixed(2),
|
|
|
- formPrice: item.formPrice ? '¥' + (item.formPrice / this.discount).toFixed(2) : '¥' + 0,
|
|
|
- date: this.statHour ? this.getDate() + ' ' + this.statHour : this.getDate()
|
|
|
+ formPrice: item.formPrice
|
|
|
+ ? '¥' + (item.formPrice / this.discount).toFixed(2)
|
|
|
+ : item.activationPrice
|
|
|
+ ? '¥' + (item.activationPrice / this.discount).toFixed(2)
|
|
|
+ : '¥' + 0,
|
|
|
+ date: this.statHour ? this.getDate() + ' ' + this.statHour : this.getDate(),
|
|
|
+ formCount: item.formCount > 0 ? item.formCount : item.activationCount
|
|
|
}
|
|
|
})
|
|
|
var index = this.data.length
|
|
@@ -564,8 +608,13 @@ export default {
|
|
|
cost: '¥' + res.now.cost.toFixed(2),
|
|
|
cvr: res.now.cvr ? (res.now.cvr * 100).toFixed(2) + '%' : 0 + '%',
|
|
|
costY: '¥' + (res.now.cost / this.discount).toFixed(2),
|
|
|
- accountName: '总计',
|
|
|
- formPrice: res.now.formPrice ? '¥' + (res.now.formPrice / this.discount).toFixed(2) : '¥' + 0
|
|
|
+ accountId: '总计',
|
|
|
+ formPrice: res.now.formPrice
|
|
|
+ ? '¥' + (res.now.formPrice / this.discount).toFixed(2)
|
|
|
+ : res.now.activationPrice
|
|
|
+ ? '¥' + (res.now.activationPrice / this.discount).toFixed(2)
|
|
|
+ : '¥' + 0,
|
|
|
+ formCount: res.now.formCount > 0 ? res.now.formCount : res.now.activationCount
|
|
|
}
|
|
|
var allYesterday = {
|
|
|
key: index + 2,
|
|
@@ -577,8 +626,13 @@ export default {
|
|
|
cost: '¥' + res.yesterday.cost.toFixed(2),
|
|
|
cvr: res.yesterday.cvr ? (res.yesterday.cvr * 100).toFixed(2) + '%' : 0 + '%',
|
|
|
costY: '¥' + (res.yesterday.cost / this.discount).toFixed(2),
|
|
|
- accountName: '昨日总计',
|
|
|
- formPrice: res.yesterday.formPrice ? '¥' + (res.yesterday.formPrice / this.discount).toFixed(2) : '¥' + 0
|
|
|
+ accountId: '昨日总计',
|
|
|
+ formPrice: res.yesterday.formPrice
|
|
|
+ ? '¥' + (res.yesterday.formPrice / this.discount).toFixed(2)
|
|
|
+ : res.yesterday.activationPrice
|
|
|
+ ? '¥' + (res.yesterday.activationPrice / this.discount).toFixed(2)
|
|
|
+ : '¥' + 0,
|
|
|
+ formCount: res.yesterday.formCount > 0 ? res.yesterday.formCount : res.yesterday.activationCount
|
|
|
}
|
|
|
var chainRatio = {
|
|
|
key: index + 3,
|
|
@@ -594,12 +648,16 @@ export default {
|
|
|
bClick: (res.chainRatio.bClickProportion * 100).toFixed(2) + '%',
|
|
|
formCount: res.chainRatio.formCountProportion
|
|
|
? (res.chainRatio.formCountProportion * 100).toFixed(2) + '%'
|
|
|
+ : res.chainRatio.activationCountProportion
|
|
|
+ ? (res.chainRatio.activationCountProportion * 100).toFixed(2) + '%'
|
|
|
: 0 + '%',
|
|
|
formPrice: res.chainRatio.formPriceProportion
|
|
|
? (res.chainRatio.formPriceProportion * 100).toFixed(2) + '%'
|
|
|
+ : res.chainRatio.activationPriceProportion
|
|
|
+ ? (res.chainRatio.activationPriceProportion * 100).toFixed(2) + '%'
|
|
|
: 0 + '%',
|
|
|
costY: (res.chainRatio.costProportion * 100).toFixed(2) + '%',
|
|
|
- accountName: '环比'
|
|
|
+ accountId: '环比'
|
|
|
}
|
|
|
this.data.push(allNow)
|
|
|
this.data.push(allYesterday)
|
|
@@ -620,6 +678,7 @@ export default {
|
|
|
this.allValue = []
|
|
|
}
|
|
|
this.active = checked
|
|
|
+ active = checked
|
|
|
this.addUser(checked)
|
|
|
},
|
|
|
onTabChange(key, type) {
|
|
@@ -971,6 +1030,9 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
wpx: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ wpx: 100
|
|
|
}
|
|
|
] //单元格列宽
|
|
|
|