Переделать статистику активности

This commit is contained in:
iriska-gri committed 2024-01-23 16:59:52 +03:00
1 parent 2930e7a1a2
commit 10472337d0
3 files changed
+10 -5

No files matched your search

@@ -19,7 +19,7 @@
<v-col class="pt-8 text-center">
<span class="subheading text-h6">
{{users.count}}
{{users.count.size}}
</span>
</v-col>
</v-row>
+7 -4
View File
@@ -95,6 +95,8 @@
<v-row no-gutters class="gap">
<v-col lg=3>
<feedmodul :feedback="feedback"/>
</v-col>
<v-col class="d-flex flex-column">
<v-row no-gutters class="ma-0 pb-1">
@@ -150,6 +152,7 @@
</v-row>
<v-row no-gutters class="ma-0 flex-grow-0 gap" >
<v-col class="" v-for="(val, key) in activuser()" :key = key>
{{val}}
<top-user
:users="val"
:ico="icons[Object.keys(activuser()).indexOf(key)]"
@@ -446,17 +449,17 @@ setup(){
const groupedData =
visiting.value.reduce((acc, item) => {
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
+2
View File
@@ -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