diff --git a/src/db.sqlite3 b/src/db.sqlite3 index 5ee5eeeb6..9da4afa86 100644 Binary files a/src/db.sqlite3 and b/src/db.sqlite3 differ diff --git a/src/front/src/router/index.js b/src/front/src/router/index.js index 990587822..07dfee4d7 100644 --- a/src/front/src/router/index.js +++ b/src/front/src/router/index.js @@ -11,7 +11,8 @@ const routes = [ name: 'HomePage', component: () => import('@/views/HomePage.vue'), meta:{ - title:"Портал МИ ФНС России по ЦОД №2" + title:"Портал МИ ФНС России по ЦОД №2", + ico: "mdi-arrow-top-right" } }, @@ -21,7 +22,7 @@ const routes = [ component: () => import('@/views/nested_view/o_OKiB.vue'), meta:{ title:"Отдел кадров и безопасности", - ico: "mdi-contact-mail" + ico: "mdi-arrow-top-right" } }, { @@ -30,7 +31,7 @@ const routes = [ component: () => import('@/views/ProvidingActivitiesPage.vue'), meta:{ title:"Обеспечивающая деятельность", - ico: "mdi-contact-mail" + ico: "mdi-arrow-top-right" } }, { @@ -39,7 +40,7 @@ const routes = [ component: () => import('@/views/FAQPage.vue'), meta:{ title:"Часто задаваемые вопросы", - ico: "mdi-contact-mail" + ico: "mdi-arrow-top-right" } }, { @@ -48,7 +49,7 @@ const routes = [ component: () => import('@/views/FeedbackPage.vue'), meta:{ title:"Обратная связь", - ico: "mdi-contact-mail" + ico: "mdi-arrow-top-right" } }, { @@ -57,7 +58,7 @@ const routes = [ component: () => import('@/views/LaborProtection.vue'), meta:{ title:"Безопасность", - ico: "mdi-contact-mail" + ico: "mdi-arrow-top-right" } }, { @@ -66,7 +67,7 @@ const routes = [ component: () => import('@/views/SecurityPage.vue'), meta:{ title:"Охрана труда", - ico: "mdi-contact-mail" + ico: "mdi-arrow-top-right" } }, { @@ -75,7 +76,7 @@ const routes = [ component: () => import('@/views/AboutInspectionPage.vue'), meta:{ title:"Об инспекции", - ico: "mdi-contact-mail" + ico: "mdi-arrow-top-right" } }, { @@ -84,7 +85,7 @@ const routes = [ component: () => import('@/views/AboutPortalPage.vue'), meta:{ title:"О портале", - ico: "mdi-contact-mail" + ico: "mdi-arrow-top-right" } }, { @@ -93,7 +94,7 @@ const routes = [ component: () => import('@/views/NewsPage.vue'), meta:{ title:"Лента новостей", - ico: "mdi-contact-mail" + ico: "mdi-arrow-top-right" } }, ], diff --git a/src/front/src/utils/universal_functions.js b/src/front/src/utils/universal_functions.js index 0a3993056..049a0f710 100644 --- a/src/front/src/utils/universal_functions.js +++ b/src/front/src/utils/universal_functions.js @@ -67,7 +67,7 @@ export function pagecounter(){ let postdata = {user__id: "user" in accountStore &&"id" in accountStore.user? accountStore.user.id: null, page: router.currentRoute.value.meta.title, fullPath: router.currentRoute.value.fullPath, - ico: router.currentRoute.value.ico + ico: router.currentRoute.value.meta.ico } diff --git a/src/front/src/views/HomePage.vue b/src/front/src/views/HomePage.vue index 357c199ac..092f8b2be 100644 --- a/src/front/src/views/HomePage.vue +++ b/src/front/src/views/HomePage.vue @@ -37,20 +37,34 @@ > - + - block + + + @@ -64,7 +78,7 @@ class="h-100 bg-transparent flex-column d-flex " elevation="1" > - + @@ -117,6 +131,7 @@ setup(){ const appStore = useAppStore() const favorit = ref([]) + const toggle = ref(null) pagecounter() const accountStore = useAccountStore() onMounted(() => { @@ -134,9 +149,7 @@ } - const menuTruncated = (menus) => { - return menus.slice(0,7).toUpperCase() - } + @@ -145,7 +158,8 @@ appStore, favoritLinks, favorit, - menuTruncated + + toggle } } diff --git a/src/watcher/views.py b/src/watcher/views.py index 3762cae35..4b2896ccc 100644 --- a/src/watcher/views.py +++ b/src/watcher/views.py @@ -34,6 +34,7 @@ class Counter(ListAPIView): def post(self, request): + print(request.data['ico'], '----------------------------') if request.data['user__id'] is not None: watch,create = CountVisitor.objects.get_or_create(user = User(id=request.data['user__id']),page=request.data['page'], visitdate=date.today(), fullPath=request.data['fullPath'], ico=request.data['ico']) else: @@ -52,7 +53,7 @@ class SelectedLinksAPIView(ListAPIView): def get(self, request): user = User.objects.get(username=self.request.user) - res = CountVisitor.objects.values('page','fullPath').filter(user_id=user).annotate(Sum('count')).exclude(fullPath='/') + res = CountVisitor.objects.values('page','fullPath','ico').filter(user_id=user).annotate(Sum('count')).exclude(fullPath='/') sort = res.order_by('-count__sum')[:6]