|
@@ -19,7 +19,7 @@
|
|
.search-box .ant-card-body {
|
|
.search-box .ant-card-body {
|
|
padding: 5px 15px;
|
|
padding: 5px 15px;
|
|
}
|
|
}
|
|
-.search-box p {
|
|
|
|
|
|
+.search-box p {
|
|
display: inline-block;
|
|
display: inline-block;
|
|
border: 1px solid #f2f2f2;
|
|
border: 1px solid #f2f2f2;
|
|
border-radius: 5px;
|
|
border-radius: 5px;
|
|
@@ -369,7 +369,7 @@
|
|
:activeTabKey="noTitleKeyTableTwo"
|
|
:activeTabKey="noTitleKeyTableTwo"
|
|
@tabChange="key => onTabChange(key, 'noTitleKeyTableTwo')"
|
|
@tabChange="key => onTabChange(key, 'noTitleKeyTableTwo')"
|
|
>
|
|
>
|
|
- <a-table :columns="columns" :dataSource="dataTableTwo" :pagination="false"></a-table>
|
|
|
|
|
|
+ <a-table :columns="columnsDb" :dataSource="dataTableTwo" :pagination="false"></a-table>
|
|
</a-card>
|
|
</a-card>
|
|
</a-col>
|
|
</a-col>
|
|
</a-row>
|
|
</a-row>
|
|
@@ -419,6 +419,14 @@ export default {
|
|
return {
|
|
return {
|
|
columns: [
|
|
columns: [
|
|
{ title: '时间', dataIndex: 'statDate' },
|
|
{ title: '时间', dataIndex: 'statDate' },
|
|
|
|
+ { title: '升降值', dataIndex: 'proportion' },
|
|
|
|
+ { title: '总消耗', dataIndex: 'cost' },
|
|
|
|
+ { title: '封面点击数', dataIndex: 'photoClick' },
|
|
|
|
+ { title: '封面曝光数', dataIndex: 'photoShow' },
|
|
|
|
+ { title: '素材曝光数', dataIndex: 'aclick' }
|
|
|
|
+ ],
|
|
|
|
+ columnsDb: [
|
|
|
|
+ { title: '时间', dataIndex: 'statDate' },
|
|
{ title: '总消耗', dataIndex: 'cost' },
|
|
{ title: '总消耗', dataIndex: 'cost' },
|
|
{ title: '封面点击数', dataIndex: 'photoClick' },
|
|
{ title: '封面点击数', dataIndex: 'photoClick' },
|
|
{ title: '封面曝光数', dataIndex: 'photoShow' },
|
|
{ title: '封面曝光数', dataIndex: 'photoShow' },
|
|
@@ -428,6 +436,7 @@ export default {
|
|
dataTableTwo: [],
|
|
dataTableTwo: [],
|
|
dataAllTableTwo: null,
|
|
dataAllTableTwo: null,
|
|
dataAllTable: null,
|
|
dataAllTable: null,
|
|
|
|
+ dataAllTableYester: null,
|
|
title: '快手大盘',
|
|
title: '快手大盘',
|
|
visible: false,
|
|
visible: false,
|
|
statistics: [],
|
|
statistics: [],
|
|
@@ -579,18 +588,48 @@ export default {
|
|
params.startDate = dateValue[0]
|
|
params.startDate = dateValue[0]
|
|
params.endDate = dateValue[1]
|
|
params.endDate = dateValue[1]
|
|
}
|
|
}
|
|
- getReportList(params).then(res => {
|
|
|
|
- if (this.active == 1) {
|
|
|
|
- this.dataAllTable = res[0]
|
|
|
|
- this.dataTable = res[0].now.map((item, index) => {
|
|
|
|
- return {
|
|
|
|
- key: index,
|
|
|
|
- ...item,
|
|
|
|
- statDate:
|
|
|
|
- this.active == 1 || this.active == 2 ? item.statDate + ' ' + item.statHour + '时' : item.statDate
|
|
|
|
|
|
+ // proportion
|
|
|
|
+ if (this.active == 1) {
|
|
|
|
+ getKsDetail(params).then(res => {
|
|
|
|
+ var nDate = res.filter(item => {
|
|
|
|
+ if (item.now) {
|
|
|
|
+ return item.now.statDate
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- } else {
|
|
|
|
|
|
+ console.log(nDate)
|
|
|
|
+ this.dataTable = res.map((item, index) => {
|
|
|
|
+ if (item.now) {
|
|
|
|
+ console.log(item.now)
|
|
|
|
+ return {
|
|
|
|
+ key: index,
|
|
|
|
+ ...item.now,
|
|
|
|
+ statDate:
|
|
|
|
+ this.active == 1 || this.active == 2
|
|
|
|
+ ? item.now.statDate + ' ' + item.now.statHour + '时'
|
|
|
|
+ : item.now.statDate,
|
|
|
|
+ proportion: (item.now.proportion * 100).toFixed(2) + '%'
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ return {
|
|
|
|
+ key: index,
|
|
|
|
+ cost: 0,
|
|
|
|
+ photoClick: 0,
|
|
|
|
+ photoShow: 0,
|
|
|
|
+ aclick: 0,
|
|
|
|
+ statDate:
|
|
|
|
+ this.active == 1 || this.active == 2
|
|
|
|
+ ? nDate[0].now.statDate + ' ' + item.statHour + '时'
|
|
|
|
+ : nDate[0].now.statDate,
|
|
|
|
+ proportion: 0
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ this.dataAllTable = this.dataTable
|
|
|
|
+ this.dataAllTableYester = res
|
|
|
|
+ console.log(this.dataTable)
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ getReportList(params).then(res => {
|
|
this.dataTable = res.map((item, index) => {
|
|
this.dataTable = res.map((item, index) => {
|
|
return {
|
|
return {
|
|
key: index,
|
|
key: index,
|
|
@@ -599,8 +638,9 @@ export default {
|
|
this.active == 1 || this.active == 2 ? item.statDate + ' ' + item.statHour + '时' : item.statDate
|
|
this.active == 1 || this.active == 2 ? item.statDate + ' ' + item.statHour + '时' : item.statDate
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ // }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
},
|
|
},
|
|
drawPieAll(data) {
|
|
drawPieAll(data) {
|
|
var colorList = ['#afa3f5', '#00d488', '#3feed4', '#3bafff', '#f1bb4c', 'rgba(250,250,250,0.5)']
|
|
var colorList = ['#afa3f5', '#00d488', '#3feed4', '#3bafff', '#f1bb4c', 'rgba(250,250,250,0.5)']
|
|
@@ -860,15 +900,24 @@ export default {
|
|
} else if (type == 'noTitleKeyTable') {
|
|
} else if (type == 'noTitleKeyTable') {
|
|
this.dataTable = []
|
|
this.dataTable = []
|
|
if (key == 'now') {
|
|
if (key == 'now') {
|
|
- this.dataTable = this.dataAllTable.now.map((item, index) => {
|
|
|
|
- return {
|
|
|
|
- key: index,
|
|
|
|
- ...item,
|
|
|
|
- statDate: item.statDate + ' ' + item.statHour + '时'
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ this.columns = [
|
|
|
|
+ { title: '时间', dataIndex: 'statDate' },
|
|
|
|
+ { title: '升降值', dataIndex: 'proportion' },
|
|
|
|
+ { title: '总消耗', dataIndex: 'cost' },
|
|
|
|
+ { title: '封面点击数', dataIndex: 'photoClick' },
|
|
|
|
+ { title: '封面曝光数', dataIndex: 'photoShow' },
|
|
|
|
+ { title: '素材曝光数', dataIndex: 'aclick' }
|
|
|
|
+ ]
|
|
|
|
+ this.dataTable = this.dataAllTable
|
|
} else {
|
|
} else {
|
|
- this.dataTable = this.dataAllTable.yesterday.map((item, index) => {
|
|
|
|
|
|
+ this.columns = [
|
|
|
|
+ { title: '时间', dataIndex: 'statDate' },
|
|
|
|
+ { title: '总消耗', dataIndex: 'cost' },
|
|
|
|
+ { title: '封面点击数', dataIndex: 'photoClick' },
|
|
|
|
+ { title: '封面曝光数', dataIndex: 'photoShow' },
|
|
|
|
+ { title: '素材曝光数', dataIndex: 'aclick' }
|
|
|
|
+ ]
|
|
|
|
+ this.dataTable = this.dataAllTableYester.map((item, index) => {
|
|
return {
|
|
return {
|
|
key: index,
|
|
key: index,
|
|
...item,
|
|
...item,
|
|
@@ -928,6 +977,7 @@ export default {
|
|
tab: '昨天'
|
|
tab: '昨天'
|
|
}
|
|
}
|
|
]
|
|
]
|
|
|
|
+ var columns = []
|
|
switch (checked) {
|
|
switch (checked) {
|
|
case 1:
|
|
case 1:
|
|
arr = [
|
|
arr = [
|
|
@@ -940,6 +990,14 @@ export default {
|
|
tab: '昨天'
|
|
tab: '昨天'
|
|
}
|
|
}
|
|
]
|
|
]
|
|
|
|
+ columns = [
|
|
|
|
+ { title: '时间', dataIndex: 'statDate' },
|
|
|
|
+ { title: '升降值', dataIndex: 'proportion' },
|
|
|
|
+ { title: '总消耗', dataIndex: 'cost' },
|
|
|
|
+ { title: '封面点击数', dataIndex: 'photoClick' },
|
|
|
|
+ { title: '封面曝光数', dataIndex: 'photoShow' },
|
|
|
|
+ { title: '素材曝光数', dataIndex: 'aclick' }
|
|
|
|
+ ]
|
|
break
|
|
break
|
|
case 2:
|
|
case 2:
|
|
arr = [
|
|
arr = [
|
|
@@ -948,6 +1006,13 @@ export default {
|
|
tab: '昨天'
|
|
tab: '昨天'
|
|
}
|
|
}
|
|
]
|
|
]
|
|
|
|
+ columns = [
|
|
|
|
+ { title: '时间', dataIndex: 'statDate' },
|
|
|
|
+ { title: '总消耗', dataIndex: 'cost' },
|
|
|
|
+ { title: '封面点击数', dataIndex: 'photoClick' },
|
|
|
|
+ { title: '封面曝光数', dataIndex: 'photoShow' },
|
|
|
|
+ { title: '素材曝光数', dataIndex: 'aclick' }
|
|
|
|
+ ]
|
|
break
|
|
break
|
|
case 3:
|
|
case 3:
|
|
arr = [
|
|
arr = [
|
|
@@ -956,6 +1021,13 @@ export default {
|
|
tab: '近一周'
|
|
tab: '近一周'
|
|
}
|
|
}
|
|
]
|
|
]
|
|
|
|
+ columns = [
|
|
|
|
+ { title: '时间', dataIndex: 'statDate' },
|
|
|
|
+ { title: '总消耗', dataIndex: 'cost' },
|
|
|
|
+ { title: '封面点击数', dataIndex: 'photoClick' },
|
|
|
|
+ { title: '封面曝光数', dataIndex: 'photoShow' },
|
|
|
|
+ { title: '素材曝光数', dataIndex: 'aclick' }
|
|
|
|
+ ]
|
|
break
|
|
break
|
|
case 4:
|
|
case 4:
|
|
arr = [
|
|
arr = [
|
|
@@ -964,6 +1036,13 @@ export default {
|
|
tab: '近十五天'
|
|
tab: '近十五天'
|
|
}
|
|
}
|
|
]
|
|
]
|
|
|
|
+ columns = [
|
|
|
|
+ { title: '时间', dataIndex: 'statDate' },
|
|
|
|
+ { title: '总消耗', dataIndex: 'cost' },
|
|
|
|
+ { title: '封面点击数', dataIndex: 'photoClick' },
|
|
|
|
+ { title: '封面曝光数', dataIndex: 'photoShow' },
|
|
|
|
+ { title: '素材曝光数', dataIndex: 'aclick' }
|
|
|
|
+ ]
|
|
break
|
|
break
|
|
case 5:
|
|
case 5:
|
|
arr = [
|
|
arr = [
|
|
@@ -972,6 +1051,13 @@ export default {
|
|
tab: '近一月'
|
|
tab: '近一月'
|
|
}
|
|
}
|
|
]
|
|
]
|
|
|
|
+ columns = [
|
|
|
|
+ { title: '时间', dataIndex: 'statDate' },
|
|
|
|
+ { title: '总消耗', dataIndex: 'cost' },
|
|
|
|
+ { title: '封面点击数', dataIndex: 'photoClick' },
|
|
|
|
+ { title: '封面曝光数', dataIndex: 'photoShow' },
|
|
|
|
+ { title: '素材曝光数', dataIndex: 'aclick' }
|
|
|
|
+ ]
|
|
break
|
|
break
|
|
case 6:
|
|
case 6:
|
|
arr = [
|
|
arr = [
|
|
@@ -980,6 +1066,13 @@ export default {
|
|
tab: '近三月'
|
|
tab: '近三月'
|
|
}
|
|
}
|
|
]
|
|
]
|
|
|
|
+ columns = [
|
|
|
|
+ { title: '时间', dataIndex: 'statDate' },
|
|
|
|
+ { title: '总消耗', dataIndex: 'cost' },
|
|
|
|
+ { title: '封面点击数', dataIndex: 'photoClick' },
|
|
|
|
+ { title: '封面曝光数', dataIndex: 'photoShow' },
|
|
|
|
+ { title: '素材曝光数', dataIndex: 'aclick' }
|
|
|
|
+ ]
|
|
break
|
|
break
|
|
case 7:
|
|
case 7:
|
|
arr = [
|
|
arr = [
|
|
@@ -988,6 +1081,13 @@ export default {
|
|
tab: '近半年'
|
|
tab: '近半年'
|
|
}
|
|
}
|
|
]
|
|
]
|
|
|
|
+ columns = [
|
|
|
|
+ { title: '时间', dataIndex: 'statDate' },
|
|
|
|
+ { title: '总消耗', dataIndex: 'cost' },
|
|
|
|
+ { title: '封面点击数', dataIndex: 'photoClick' },
|
|
|
|
+ { title: '封面曝光数', dataIndex: 'photoShow' },
|
|
|
|
+ { title: '素材曝光数', dataIndex: 'aclick' }
|
|
|
|
+ ]
|
|
break
|
|
break
|
|
case 8:
|
|
case 8:
|
|
arr = [
|
|
arr = [
|
|
@@ -996,6 +1096,13 @@ export default {
|
|
tab: '所有'
|
|
tab: '所有'
|
|
}
|
|
}
|
|
]
|
|
]
|
|
|
|
+ columns = [
|
|
|
|
+ { title: '时间', dataIndex: 'statDate' },
|
|
|
|
+ { title: '总消耗', dataIndex: 'cost' },
|
|
|
|
+ { title: '封面点击数', dataIndex: 'photoClick' },
|
|
|
|
+ { title: '封面曝光数', dataIndex: 'photoShow' },
|
|
|
|
+ { title: '素材曝光数', dataIndex: 'aclick' }
|
|
|
|
+ ]
|
|
break
|
|
break
|
|
case 9:
|
|
case 9:
|
|
arr = [
|
|
arr = [
|
|
@@ -1004,9 +1111,17 @@ export default {
|
|
tab: this.allValue[1] + ' ~ ' + this.allValue[0]
|
|
tab: this.allValue[1] + ' ~ ' + this.allValue[0]
|
|
}
|
|
}
|
|
]
|
|
]
|
|
|
|
+ columns = [
|
|
|
|
+ { title: '时间', dataIndex: 'statDate' },
|
|
|
|
+ { title: '总消耗', dataIndex: 'cost' },
|
|
|
|
+ { title: '封面点击数', dataIndex: 'photoClick' },
|
|
|
|
+ { title: '封面曝光数', dataIndex: 'photoShow' },
|
|
|
|
+ { title: '素材曝光数', dataIndex: 'aclick' }
|
|
|
|
+ ]
|
|
break
|
|
break
|
|
}
|
|
}
|
|
this.tableNowCard = arr
|
|
this.tableNowCard = arr
|
|
|
|
+ this.columns = columns
|
|
this.getReportList(checked, this.allValue)
|
|
this.getReportList(checked, this.allValue)
|
|
this.drawLine(checked, this.allValue)
|
|
this.drawLine(checked, this.allValue)
|
|
this.getKsDetail(checked, this.allValue).then(res => {
|
|
this.getKsDetail(checked, this.allValue).then(res => {
|
|
@@ -1060,16 +1175,16 @@ export default {
|
|
var dataDate = []
|
|
var dataDate = []
|
|
var that = this
|
|
var that = this
|
|
if (this.active == 1 || this.active == 2) {
|
|
if (this.active == 1 || this.active == 2) {
|
|
- data.sort(function(a, b) {
|
|
|
|
- return a.statHour - b.statHour
|
|
|
|
- })
|
|
|
|
|
|
+ // data.sort(function(a, b) {
|
|
|
|
+ // return a.statHour - b.statHour
|
|
|
|
+ // })
|
|
dataDate = data.map(item => {
|
|
dataDate = data.map(item => {
|
|
return item.statHour
|
|
return item.statHour
|
|
})
|
|
})
|
|
} else {
|
|
} else {
|
|
- data.sort(function(a, b) {
|
|
|
|
- return a.statDate - b.statDate
|
|
|
|
- })
|
|
|
|
|
|
+ // data.sort(function(a, b) {
|
|
|
|
+ // return a.statDate - b.statDate
|
|
|
|
+ // })
|
|
dataDate = data.map(item => {
|
|
dataDate = data.map(item => {
|
|
return item.statDate
|
|
return item.statDate
|
|
})
|
|
})
|