Доделать обработку для верха
This commit is contained in:
1 parent
0d30cffbf3
commit
f48a98e253
1 file changed
+14
-4
@@ -81,6 +81,9 @@ setup(){
|
||||
|
||||
const selected_days = ref({today: 'сегодня', year: {start: new Date(), end: new Date()}})
|
||||
const pages_count = ref({data: {}, title: {}})
|
||||
// const dataAttendance = ref({
|
||||
|
||||
// })
|
||||
|
||||
|
||||
|
||||
@@ -201,8 +204,7 @@ setup(){
|
||||
if (!data[item.visitdate][item.pages]) {
|
||||
data[item.visitdate][item.pages] = 0
|
||||
}
|
||||
console.log(format2(filterStore.date_period.enddate), item.visitdate, '------------filterStore.date_period.enddate')
|
||||
|
||||
|
||||
data[item.visitdate][item.pages] += item.count
|
||||
}
|
||||
// console.log(format2(filterStore.date_period.enddate) <= item.visitdate, '------------filterStore.date_period.enddate');
|
||||
@@ -210,9 +212,11 @@ setup(){
|
||||
}
|
||||
|
||||
const data_collection = (data, obj) => {
|
||||
console.log(data, obj);
|
||||
let attendance = {}
|
||||
|
||||
const groupedData = data.reduce((acc, item) => {
|
||||
|
||||
|
||||
|
||||
if (!acc[item.pages]) {
|
||||
acc[item.pages] = {
|
||||
@@ -235,10 +239,16 @@ setup(){
|
||||
}
|
||||
|
||||
if (item.visitdate == format2(new Date())) {
|
||||
console.log(item, 'item');
|
||||
if (!attendance[splitname(item.author)]) {
|
||||
attendance[splitname(item.author)] ={}
|
||||
|
||||
}
|
||||
|
||||
checking_for_entry(acc[item.pages].now.unique, splitname(item.author))
|
||||
acc[item.pages].now.countall += item.count
|
||||
}
|
||||
|
||||
console.log(attendance, 'attendance[splitname(item.author)]');
|
||||
return acc
|
||||
}, {})
|
||||
return groupedData
|
||||
|
||||
Reference in new issue
Block a user