diff --git a/src/front/src/components/UI/aboutportal/top-user.vue b/src/front/src/components/UI/aboutportal/top-user.vue index d3ff28cde..1fe5364d3 100644 --- a/src/front/src/components/UI/aboutportal/top-user.vue +++ b/src/front/src/components/UI/aboutportal/top-user.vue @@ -19,7 +19,7 @@ - {{users.count}} + {{users.count.size}} diff --git a/src/front/src/views/AboutPortalPage.vue b/src/front/src/views/AboutPortalPage.vue index c76f05085..6ae4bc66a 100644 --- a/src/front/src/views/AboutPortalPage.vue +++ b/src/front/src/views/AboutPortalPage.vue @@ -95,6 +95,8 @@ + + @@ -150,6 +152,7 @@ + {{val}} { - + if (Object.keys(acc).length <3) { if (!acc[splitname(item.author)]) { - acc[splitname(item.author)] = {count: 0, login: ''} + acc[splitname(item.author)] = {count: new Set(), login: '', fio: '', post: ''} } - + console.log(acc,'-----------------------------------'); acc[splitname(item.author)]['fio'] = splitname(item.author) - acc[splitname(item.author)]['count'] += item.count + acc[splitname(item.author)]['count'].add(item.pages) acc[splitname(item.author)]['login'] = item.author.login acc[splitname(item.author)]['post'] = item.author.post diff --git a/src/watcher/views.py b/src/watcher/views.py index 15a369917..c02e965a4 100644 --- a/src/watcher/views.py +++ b/src/watcher/views.py @@ -20,8 +20,10 @@ class Counter(ListAPIView): def get(self, request): res = CountVisitor.objects.filter(visitdate__range=[request.GET.get("start"), request.GET.get("end")]).annotate(Sum('count')) + result = CountSerializer(res, many=True).data + # Обратная связь feed = RatingStatus.objects.filter(usercom__time_create__range=[request.GET.get("start"), request.GET.get("end")]) feedback = RatingStatusStatSerializer(feed, many=True).data