|
@@ -628,25 +628,49 @@ export default {
|
|
showNum:0
|
|
showNum:0
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+ var afterData=[];
|
|
res.result.list.forEach((ele,index)=>{
|
|
res.result.list.forEach((ele,index)=>{
|
|
- if(!ele.costProportion){
|
|
|
|
|
|
+ if(ele.afterData){
|
|
|
|
+ if(!ele.afterData.costProportion){
|
|
|
|
+ ele.afterData.costProportion='-'
|
|
|
|
+ }
|
|
|
|
+ if(ele.afterData.statHour||ele.afterData.statHour==0){
|
|
|
|
+ ele.afterData.statHour=ele.afterData.statHour > 9 ? `${ele.afterData.statHour}:00` : ` 0${ele.afterData.statHour}:00`
|
|
|
|
+ ele.afterData.statDate=ele.afterData.statDate+' '+ele.afterData.statHour
|
|
|
|
+ }
|
|
|
|
+ ele.afterData.key=index+1
|
|
|
|
+ total.click+=ele.afterData.click
|
|
|
|
+ total.cost+=ele.afterData.cost
|
|
|
|
+ total.showNum+=ele.afterData.showNum;
|
|
|
|
+ afterData.push(ele.afterData)
|
|
|
|
+ }else{
|
|
|
|
+ if(!ele.costProportion){
|
|
ele.costProportion='-'
|
|
ele.costProportion='-'
|
|
- }
|
|
|
|
- if(ele.statHour||ele.statHour==0){
|
|
|
|
- ele.statHour=ele.statHour > 9 ? `${ele.statHour}:00` : ` 0${ele.statHour}:00`
|
|
|
|
- ele.statDate=ele.statDate+' '+ele.statHour
|
|
|
|
- }
|
|
|
|
- ele.key=index+1
|
|
|
|
- total.click+=ele.click
|
|
|
|
- total.cost+=ele.cost
|
|
|
|
- total.showNum+=ele.showNum
|
|
|
|
|
|
+ }
|
|
|
|
+ if(ele.statHour||ele.statHour==0){
|
|
|
|
+ ele.statHour=ele.statHour > 9 ? `${ele.statHour}:00` : ` 0${ele.statHour}:00`
|
|
|
|
+ ele.statDate=ele.statDate+' '+ele.statHour
|
|
|
|
+ }
|
|
|
|
+ ele.key=index+1
|
|
|
|
+ total.click+=ele.click
|
|
|
|
+ total.cost+=ele.cost
|
|
|
|
+ total.showNum+=ele.showNum
|
|
|
|
+ }
|
|
|
|
+
|
|
})
|
|
})
|
|
- total.cost=(total.cost).toFixed(2)
|
|
|
|
- total.clickRate=(total.click/total.showNum*100).toFixed(2)+'%'
|
|
|
|
- total.cp=(total.cost/total.click).toFixed(2)
|
|
|
|
- total.cpm=(total.cost/total.showNum*1000).toFixed(2)
|
|
|
|
- this.tableData=[total,...res.result.list]
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
|
|
+ total.cost=(total.cost).toFixed(2)
|
|
|
|
+ total.clickRate=(total.click/total.showNum*100).toFixed(2)+'%'
|
|
|
|
+ total.cp=(total.cost/total.click).toFixed(2)
|
|
|
|
+ total.cpm=(total.cost/total.showNum*1000).toFixed(2)
|
|
|
|
+ if(afterData.length>0){
|
|
|
|
+ this.tableData=[total,...afterData]
|
|
|
|
+ }else{
|
|
|
|
+ this.tableData=[total,...res.result.list]
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
}
|
|
}
|
|
})
|
|
})
|
|
})
|
|
})
|