69 lines
1.7 KiB
JavaScript
69 lines
1.7 KiB
JavaScript
/*
|
|
* @Description: router
|
|
* @Author: zenghua.wang
|
|
* @Date: 2023-06-20 11:48:41
|
|
* @LastEditors: zenghua.wang
|
|
* @LastEditTime: 2025-02-28 13:50:00
|
|
*/
|
|
import { createRouter, createWebHistory } from 'vue-router';
|
|
import Layout from '@/layouts/index.vue';
|
|
|
|
import resourceRouter from './modules/resource';
|
|
import plantingAndBreedingRouter from './modules/plantingAndBreeding';
|
|
import landsRoutes from './modules/lands';
|
|
import annualplanRoutes from './modules/annualplan';
|
|
import statisticsRoutes from './modules/statistics';
|
|
import dictRoutes from './modules/dict';
|
|
|
|
export const constantRoutes = [
|
|
{
|
|
path: '/sub-government-affairs-service/404',
|
|
name: '404',
|
|
component: () => import('@/views/error/404.vue'),
|
|
hidden: true,
|
|
},
|
|
{
|
|
path: '/sub-government-affairs-service/403',
|
|
name: '403',
|
|
component: () => import('@/views/error/403.vue'),
|
|
hidden: true,
|
|
},
|
|
{
|
|
path: '/sub-government-affairs-service',
|
|
name: 'layout',
|
|
component: Layout,
|
|
redirect: '/sub-government-affairs-service/home',
|
|
meta: { title: '政务服务', icon: 'House' },
|
|
children: [
|
|
{
|
|
path: '/sub-government-affairs-service/home',
|
|
component: () => import('@/views/home/index.vue'),
|
|
name: 'home',
|
|
meta: { title: '首页', icon: 'House' },
|
|
},
|
|
],
|
|
},
|
|
...resourceRouter,
|
|
...plantingAndBreedingRouter,
|
|
...annualplanRoutes,
|
|
...landsRoutes,
|
|
...statisticsRoutes,
|
|
...dictRoutes,
|
|
];
|
|
|
|
/**
|
|
* @Title notFoundRouter(找不到路由)
|
|
*/
|
|
export const notFoundRouter = {
|
|
path: '/sub-government-affairs-service/:pathMatch(.*)',
|
|
name: 'notFound',
|
|
redirect: '/sub-government-affairs-service/404',
|
|
};
|
|
|
|
const router = createRouter({
|
|
history: createWebHistory(),
|
|
routes: constantRoutes,
|
|
});
|
|
|
|
export default router;
|