From 9e8ff9c033130c10cfa239b4e3a33b8cf6e983ff Mon Sep 17 00:00:00 2001
From: iriska-gri <79623434+iriska-gri@users.noreply.github.com>
Date: Tue, 30 Jan 2024 09:05:42 +0300
Subject: [PATCH] =?UTF-8?q?=D0=A1=D1=82=D0=B0=D1=82=D0=B8=D1=81=D1=82?=
=?UTF-8?q?=D0=B8=D0=BA=D0=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../UI/aboutportal/portal-traffic.vue | 37 +++++++++++++++----
src/front/src/views/AboutPortalPage.vue | 31 +++++++++++-----
2 files changed, 50 insertions(+), 18 deletions(-)
diff --git a/src/front/src/components/UI/aboutportal/portal-traffic.vue b/src/front/src/components/UI/aboutportal/portal-traffic.vue
index fd49c9748..332ef8f23 100644
--- a/src/front/src/components/UI/aboutportal/portal-traffic.vue
+++ b/src/front/src/components/UI/aboutportal/portal-traffic.vue
@@ -8,7 +8,30 @@
-
+
+
+
+ |
+ Уникальные пользователи |
+
+ за период |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -42,10 +67,6 @@
export default {
props: {
- selected_days: {
- type: Object,
- default: () => {}
- },
traffic: {
type: Object,
diff --git a/src/front/src/views/AboutPortalPage.vue b/src/front/src/views/AboutPortalPage.vue
index 71d0982b7..6c007c74d 100644
--- a/src/front/src/views/AboutPortalPage.vue
+++ b/src/front/src/views/AboutPortalPage.vue
@@ -1,7 +1,7 @@
-
+
@@ -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)+'%'
}