Files
PORTAL_COD2/front/src/router/index.js
T
2023-10-16 09:28:31 +03:00

104 lines
2.5 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// Composables
import { createRouter, createWebHistory } from 'vue-router'
const routes = [
{
path: '/',
component: () => import('@/layouts/default/DefaultPortal.vue'),
children: [
{
path: '/',
name: 'HomePage',
component: () => import('@/views/HomePage.vue'),
meta:{
title:"Портал МиФНС по ЦОД №2"
}
},
{
path: '/okib',
name: 'OKiBPage',
component: () => import('@/views/nested_view/o_OKiB.vue'),
meta:{
title:"Отдел кадров и безопасности"
}
},
{
path: '/providing',
name: 'ProvidingActivitiesPage',
component: () => import('@/views/ProvidingActivitiesPage.vue'),
meta:{
title:"Обеспечивающая деятельность"
}
},
{
path: '/faq',
name: 'FAQPage',
component: () => import('@/views/FAQPage.vue'),
meta:{
title:"Часто задаваемые вопросы"
}
},
{
path: '/feedback',
name: 'FeedbackPage',
component: () => import('@/views/FeedbackPage.vue'),
meta:{
title:"Обратная связь"
}
},
{
path: '/labor',
name: 'LaborProtection',
component: () => import('@/views/LaborProtection.vue'),
meta:{
title:"Безопасность"
}
},
{
path: '/securyty',
name: 'SecurityPage',
component: () => import('@/views/SecurityPage.vue'),
meta:{
title:"Охрана труда"
}
},
{
path: '/inspection',
name: 'AboutInspectionPage',
component: () => import('@/views/AboutInspectionPage.vue'),
meta:{
title:"Об инспекции"
}
},
{
path: '/portal',
name: 'AboutPortalPage',
component: () => import('@/views/AboutPortalPage.vue'),
meta:{
title:"О портале"
}
},
{
path: '/news',
name: 'AboutNewsPage',
component: () => import('@/views/NewsPage.vue'),
meta:{
title:"Лента новостей"
}
},
],
},
]
const router = createRouter({
history: createWebHistory(process.env.BASE_URL),
routes,
})
router.beforeEach((to,from, next)=>{
document.title = to.meta.title;
next()
})
export default router