69 lines
1.7 KiB
JavaScript
Raw Normal View History

2025-01-23 01:10:59 +00:00
/*
* @Description: router
* @Author: zenghua.wang
* @Date: 2023-06-20 11:48:41
2025-01-23 09:27:53 +00:00
* @LastEditors: zenghua.wang
2025-02-28 06:28:54 +00:00
* @LastEditTime: 2025-02-28 13:50:00
2025-01-23 01:10:59 +00:00
*/
2025-01-23 09:27:53 +00:00
import { createRouter, createWebHistory } from 'vue-router';
2025-01-23 01:10:59 +00:00
import Layout from '@/layouts/index.vue';
import resourceRouter from './modules/resource';
2025-01-23 09:27:53 +00:00
import plantingAndBreedingRouter from './modules/plantingAndBreeding';
2025-02-26 13:36:43 +08:00
import landsRoutes from './modules/lands';
2025-02-27 14:57:30 +08:00
import annualplanRoutes from './modules/annualplan';
2025-02-28 17:25:23 +08:00
import statisticsRoutes from './modules/statistics';
2025-03-03 16:50:51 +08:00
import dictRoutes from './modules/dict';
2025-01-23 01:10:59 +00:00
export const constantRoutes = [
{
2025-02-28 06:28:54 +00:00
path: '/sub-government-affairs-service/404',
2025-01-23 01:10:59 +00:00
name: '404',
component: () => import('@/views/error/404.vue'),
hidden: true,
},
{
2025-02-28 06:28:54 +00:00
path: '/sub-government-affairs-service/403',
2025-01-23 01:10:59 +00:00
name: '403',
component: () => import('@/views/error/403.vue'),
hidden: true,
},
{
2025-02-28 06:28:54 +00:00
path: '/sub-government-affairs-service',
2025-01-23 01:10:59 +00:00
name: 'layout',
component: Layout,
2025-02-28 06:28:54 +00:00
redirect: '/sub-government-affairs-service/home',
2025-01-23 01:10:59 +00:00
meta: { title: '政务服务', icon: 'House' },
children: [
{
2025-02-28 06:28:54 +00:00
path: '/sub-government-affairs-service/home',
2025-01-23 01:10:59 +00:00
component: () => import('@/views/home/index.vue'),
name: 'home',
2025-02-17 06:43:55 +00:00
meta: { title: '首页', icon: 'House' },
2025-01-23 01:10:59 +00:00
},
],
},
2025-02-27 01:24:25 +00:00
...resourceRouter,
2025-01-23 09:27:53 +00:00
...plantingAndBreedingRouter,
2025-02-27 14:57:30 +08:00
...annualplanRoutes,
2025-02-26 13:36:43 +08:00
...landsRoutes,
2025-02-28 17:25:23 +08:00
...statisticsRoutes,
2025-03-03 16:50:51 +08:00
...dictRoutes,
2025-01-23 01:10:59 +00:00
];
/**
* @Title notFoundRouter(找不到路由)
*/
export const notFoundRouter = {
2025-02-28 06:28:54 +00:00
path: '/sub-government-affairs-service/:pathMatch(.*)',
2025-02-27 01:24:25 +00:00
name: 'notFound',
2025-02-28 06:28:54 +00:00
redirect: '/sub-government-affairs-service/404',
2025-01-23 01:10:59 +00:00
};
const router = createRouter({
2025-02-28 06:28:54 +00:00
history: createWebHistory(),
2025-01-23 01:10:59 +00:00
routes: constantRoutes,
});
export default router;