Горячие ссылки
This commit is contained in:
1 parent
ac04fad613
commit
22cf92c28f
5 files changed
+41
-25
No files matched your search
Binary file not shown.
@@ -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"
|
||||
}
|
||||
},
|
||||
],
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -37,20 +37,34 @@
|
||||
>
|
||||
<v-row class="ma-3">
|
||||
<v-col
|
||||
v-for="x in favorit"
|
||||
:key="x"
|
||||
lg=6
|
||||
class="pa-1"
|
||||
|
||||
|
||||
class="pa-1 "
|
||||
>
|
||||
<v-btn
|
||||
<v-btn-toggle
|
||||
v-model="toggle"
|
||||
divided
|
||||
variant="outlined"
|
||||
>
|
||||
<v-btn
|
||||
v-for="x in favorit"
|
||||
:key="x"
|
||||
:icon="x.ico"
|
||||
:to="x.fullPath"/>
|
||||
|
||||
block
|
||||
</v-btn-toggle>
|
||||
<!-- <v-btn
|
||||
:prepend-icon="x.ico"
|
||||
size="x-small"
|
||||
|
||||
variant="outlined"
|
||||
class="ma-1"
|
||||
:to="x.fullPath"
|
||||
stacked
|
||||
>
|
||||
{{menuTruncated(x.page)}}
|
||||
</v-btn>
|
||||
|
||||
</v-btn> -->
|
||||
|
||||
</v-col>
|
||||
</v-row>
|
||||
<!-- <my-helper :pretext="favorit"/> -->
|
||||
@@ -64,7 +78,7 @@
|
||||
class="h-100 bg-transparent flex-column d-flex "
|
||||
elevation="1"
|
||||
>
|
||||
<v-row>
|
||||
<v-row >
|
||||
<v-col cols="auto" class="pa-0">
|
||||
<v-card height="93vh" class="overflow-auto ">
|
||||
<News-list-home />
|
||||
@@ -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
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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]
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user