Статистика

This commit is contained in:
iriska-gri committed 2024-01-30 09:05:42 +03:00
1 parent bf06fa4363
commit 9e8ff9c033
2 files changed
+50 -18

No files matched your search

@@ -8,7 +8,30 @@
</v-card-title>
<v-card-text class="pl-0">
<v-list density="compact" class="text-start text-subtitle-1 pt-0">
<v-table fixed-header
height="430px">
<thead>
<tr >
<th></th>
<th>Уникальные пользователи</th>
<!-- <th class="text-center"> на {{selected_days.today}} </th> -->
<th class="text-center">за период</th>
</tr>
</thead>
<tbody>
<tr v-for="(val, key) in traffic" :key = key>
<my-helper :pretext="val"/>
<!-- {{val}} {{key}} -->
<!-- <td class="text-left">{{key}}</td>
<td class="text-center">{{ modelrating?val.now.unique.size:val.now.countall }} </td>
<td class="text-center">{{ modelrating?val.year.unique.size:val.year.countall }}</td> -->
</tr>
</tbody>
</v-table>
<!-- <v-list density="compact" class="text-start text-subtitle-1 pt-0">
<v-list-item >
на
<span class="font-weight-bold">
@@ -16,7 +39,8 @@
</span>
: {{traffic.now.unique.size}}
/ {{traffic.now.percentage_staff}}
/ {{traffic.now.comparison_period.size}}
/{{traffic.now.comparison_period.size}}
/ {{traffic.now.percentage_period}}
</v-list-item>
@@ -31,9 +55,10 @@
</span>
{{traffic.year.unique.size}}
/ {{traffic.year.percentage_staff}}
/ {{traffic.year.comparison_period.size}}
/{{traffic.year.comparison_period.size}}
/ {{traffic.year.percentage_period }}
</v-list-item>
</v-list>
</v-list> -->
</v-card-text>
</v-card>
</template>
@@ -42,10 +67,6 @@
export default {
props: {
selected_days: {
type: Object,
default: () => {}
},
traffic: {
type: Object,
+21 -10
View File
@@ -1,7 +1,7 @@
<template>
<v-row no-gutters class="ma-1">
<v-col class="d-flex flex-column gap">
<my-helper :pretext="traffic"/>
<v-row no-gutters class="flex-grow-0">
<v-col>
<v-toolbar
@@ -35,7 +35,7 @@
<v-row no-gutters class="gap flex-grow-0">
<v-col lg=3>
<portal-traffic
:selected_days=selected_days
:traffic=traffic
/>
</v-col>
@@ -159,14 +159,18 @@ setup(){
const selected_days = ref({today: '', year: ''})
const traffic = ref({
now: {
title: '',
unique: new Set(),
percentage_staff: 0,
comparison_period: new Set()
comparison_period: new Set(),
percentage_period: 0
},
year: {
title: '',
unique: new Set(),
percentage_staff: 0,
comparison_period: new Set()
comparison_period: new Set(),
percentage_period: 0
}
})
const crit = ref([])
@@ -227,14 +231,18 @@ setup(){
let us = {}
let portal_traffic = {
now: {
title: '',
unique: new Set(),
percentage_staff: 0,
comparison_period: new Set()
comparison_period: new Set(),
percentage_period: 0
},
year: {
title: 'За период',
unique: new Set(),
percentage_staff: 0,
comparison_period: new Set()
comparison_period: new Set(),
percentage_period: 0
}
}
@@ -298,8 +306,11 @@ setup(){
return acc
}, {});
portal_traffic.now.percentage_staff = percentageStaff(portal_traffic.now.unique)
portal_traffic.year.percentage_staff = percentageStaff(portal_traffic.year.unique)
portal_traffic.now.percentage_staff = percentageStaff(portal_traffic.now.unique, staff.value)
portal_traffic.now.percentage_period = percentageStaff(portal_traffic.now.comparison_period, portal_traffic.now.unique.size)
portal_traffic.year.percentage_staff = percentageStaff(portal_traffic.year.unique, staff.value)
portal_traffic.year.percentage_period = percentageStaff(portal_traffic.year.comparison_period, portal_traffic.year.unique.size)
portal_traffic.now.title = selected_days.value.today
console.log(portal_traffic, 'portal_traffic');
pages_count.value = groupedData
traffic.value = portal_traffic
@@ -308,8 +319,8 @@ setup(){
const percentageStaff = (customers) => {
return Math.round((customers.size*100)/staff.value)+'%'
const percentageStaff = (customers, delitel) => {
return Math.round((customers.size*100)/delitel)+'%'
}