Горячие ссылки
This commit is contained in:
1 parent
ac04fad613
commit
22cf92c28f
5 files changed
+42
-26
No files matched your search
Binary file not shown.
@@ -11,7 +11,8 @@ const routes = [
|
|||||||
name: 'HomePage',
|
name: 'HomePage',
|
||||||
component: () => import('@/views/HomePage.vue'),
|
component: () => import('@/views/HomePage.vue'),
|
||||||
meta:{
|
meta:{
|
||||||
title:"Портал МИ ФНС России по ЦОД №2"
|
title:"Портал МИ ФНС России по ЦОД №2",
|
||||||
|
ico: "mdi-arrow-top-right"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -21,7 +22,7 @@ const routes = [
|
|||||||
component: () => import('@/views/nested_view/o_OKiB.vue'),
|
component: () => import('@/views/nested_view/o_OKiB.vue'),
|
||||||
meta:{
|
meta:{
|
||||||
title:"Отдел кадров и безопасности",
|
title:"Отдел кадров и безопасности",
|
||||||
ico: "mdi-contact-mail"
|
ico: "mdi-arrow-top-right"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -30,7 +31,7 @@ const routes = [
|
|||||||
component: () => import('@/views/ProvidingActivitiesPage.vue'),
|
component: () => import('@/views/ProvidingActivitiesPage.vue'),
|
||||||
meta:{
|
meta:{
|
||||||
title:"Обеспечивающая деятельность",
|
title:"Обеспечивающая деятельность",
|
||||||
ico: "mdi-contact-mail"
|
ico: "mdi-arrow-top-right"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -39,7 +40,7 @@ const routes = [
|
|||||||
component: () => import('@/views/FAQPage.vue'),
|
component: () => import('@/views/FAQPage.vue'),
|
||||||
meta:{
|
meta:{
|
||||||
title:"Часто задаваемые вопросы",
|
title:"Часто задаваемые вопросы",
|
||||||
ico: "mdi-contact-mail"
|
ico: "mdi-arrow-top-right"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -48,7 +49,7 @@ const routes = [
|
|||||||
component: () => import('@/views/FeedbackPage.vue'),
|
component: () => import('@/views/FeedbackPage.vue'),
|
||||||
meta:{
|
meta:{
|
||||||
title:"Обратная связь",
|
title:"Обратная связь",
|
||||||
ico: "mdi-contact-mail"
|
ico: "mdi-arrow-top-right"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -57,7 +58,7 @@ const routes = [
|
|||||||
component: () => import('@/views/LaborProtection.vue'),
|
component: () => import('@/views/LaborProtection.vue'),
|
||||||
meta:{
|
meta:{
|
||||||
title:"Безопасность",
|
title:"Безопасность",
|
||||||
ico: "mdi-contact-mail"
|
ico: "mdi-arrow-top-right"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -66,7 +67,7 @@ const routes = [
|
|||||||
component: () => import('@/views/SecurityPage.vue'),
|
component: () => import('@/views/SecurityPage.vue'),
|
||||||
meta:{
|
meta:{
|
||||||
title:"Охрана труда",
|
title:"Охрана труда",
|
||||||
ico: "mdi-contact-mail"
|
ico: "mdi-arrow-top-right"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -75,7 +76,7 @@ const routes = [
|
|||||||
component: () => import('@/views/AboutInspectionPage.vue'),
|
component: () => import('@/views/AboutInspectionPage.vue'),
|
||||||
meta:{
|
meta:{
|
||||||
title:"Об инспекции",
|
title:"Об инспекции",
|
||||||
ico: "mdi-contact-mail"
|
ico: "mdi-arrow-top-right"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -84,7 +85,7 @@ const routes = [
|
|||||||
component: () => import('@/views/AboutPortalPage.vue'),
|
component: () => import('@/views/AboutPortalPage.vue'),
|
||||||
meta:{
|
meta:{
|
||||||
title:"О портале",
|
title:"О портале",
|
||||||
ico: "mdi-contact-mail"
|
ico: "mdi-arrow-top-right"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -93,7 +94,7 @@ const routes = [
|
|||||||
component: () => import('@/views/NewsPage.vue'),
|
component: () => import('@/views/NewsPage.vue'),
|
||||||
meta:{
|
meta:{
|
||||||
title:"Лента новостей",
|
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,
|
let postdata = {user__id: "user" in accountStore &&"id" in accountStore.user? accountStore.user.id: null,
|
||||||
page: router.currentRoute.value.meta.title,
|
page: router.currentRoute.value.meta.title,
|
||||||
fullPath: router.currentRoute.value.fullPath,
|
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-row class="ma-3">
|
||||||
<v-col
|
<v-col
|
||||||
v-for="x in favorit"
|
|
||||||
:key="x"
|
|
||||||
lg=6
|
|
||||||
class="pa-1"
|
|
||||||
>
|
|
||||||
<v-btn
|
|
||||||
|
|
||||||
block
|
|
||||||
|
class="pa-1 "
|
||||||
|
>
|
||||||
|
<v-btn-toggle
|
||||||
|
v-model="toggle"
|
||||||
|
divided
|
||||||
|
variant="outlined"
|
||||||
|
>
|
||||||
|
<v-btn
|
||||||
|
v-for="x in favorit"
|
||||||
|
:key="x"
|
||||||
|
:icon="x.ico"
|
||||||
|
:to="x.fullPath"/>
|
||||||
|
|
||||||
|
</v-btn-toggle>
|
||||||
|
<!-- <v-btn
|
||||||
|
:prepend-icon="x.ico"
|
||||||
|
size="x-small"
|
||||||
|
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
class="ma-1"
|
class="ma-1"
|
||||||
:to="x.fullPath"
|
:to="x.fullPath"
|
||||||
|
stacked
|
||||||
>
|
>
|
||||||
{{menuTruncated(x.page)}}
|
|
||||||
</v-btn>
|
</v-btn> -->
|
||||||
|
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
<!-- <my-helper :pretext="favorit"/> -->
|
<!-- <my-helper :pretext="favorit"/> -->
|
||||||
@@ -64,7 +78,7 @@
|
|||||||
class="h-100 bg-transparent flex-column d-flex "
|
class="h-100 bg-transparent flex-column d-flex "
|
||||||
elevation="1"
|
elevation="1"
|
||||||
>
|
>
|
||||||
<v-row>
|
<v-row >
|
||||||
<v-col cols="auto" class="pa-0">
|
<v-col cols="auto" class="pa-0">
|
||||||
<v-card height="93vh" class="overflow-auto ">
|
<v-card height="93vh" class="overflow-auto ">
|
||||||
<News-list-home />
|
<News-list-home />
|
||||||
@@ -117,6 +131,7 @@
|
|||||||
setup(){
|
setup(){
|
||||||
const appStore = useAppStore()
|
const appStore = useAppStore()
|
||||||
const favorit = ref([])
|
const favorit = ref([])
|
||||||
|
const toggle = ref(null)
|
||||||
pagecounter()
|
pagecounter()
|
||||||
const accountStore = useAccountStore()
|
const accountStore = useAccountStore()
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
@@ -134,9 +149,7 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const menuTruncated = (menus) => {
|
|
||||||
return menus.slice(0,7).toUpperCase()
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -145,7 +158,8 @@
|
|||||||
appStore,
|
appStore,
|
||||||
favoritLinks,
|
favoritLinks,
|
||||||
favorit,
|
favorit,
|
||||||
menuTruncated
|
|
||||||
|
toggle
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ class Counter(ListAPIView):
|
|||||||
|
|
||||||
|
|
||||||
def post(self, request):
|
def post(self, request):
|
||||||
|
print(request.data['ico'], '----------------------------')
|
||||||
if request.data['user__id'] is not None:
|
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'])
|
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:
|
else:
|
||||||
@@ -52,7 +53,7 @@ class SelectedLinksAPIView(ListAPIView):
|
|||||||
|
|
||||||
def get(self, request):
|
def get(self, request):
|
||||||
user = User.objects.get(username=self.request.user)
|
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]
|
sort = res.order_by('-count__sum')[:6]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user