You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
1.8 KiB
66 lines
1.8 KiB
import { createRouter, createWebHistory } from 'vue-router';
|
|
// 还有 createWebHashHistory 和 createMemoryHistory
|
|
|
|
export const routes = [
|
|
{
|
|
path: '/network-config',
|
|
name: 'network-config',
|
|
meta: { title: '网络参数配置', icon: 'el-icon-setting' },
|
|
component: () => import('@/views/network-config.vue'),
|
|
},
|
|
{
|
|
path: '/function-config',
|
|
name: 'function-config',
|
|
meta: { title: '功能参数配置', icon: 'el-icon-set-up' },
|
|
component: () => import('@/views/function-config.vue'),
|
|
},
|
|
{
|
|
path: '/device-create',
|
|
name: 'device-create',
|
|
meta: { title: '设备添加', icon: 'el-icon-plus' },
|
|
component: () => import('@/views/device-create.vue'),
|
|
},
|
|
{
|
|
path: '/devices',
|
|
name: 'devices',
|
|
meta: { title: '设备管理', icon: 'el-icon-box' },
|
|
component: () => import('@/views/device-list.vue'),
|
|
},
|
|
{
|
|
path: '/data-history',
|
|
name: 'data-history',
|
|
meta: { title: '历史数据查看', icon: 'el-icon-data-line' },
|
|
component: () => import('@/views/data-history.vue'),
|
|
},
|
|
{
|
|
path: '/statistical-realtime',
|
|
name: 'statistical-realtime',
|
|
meta: { title: '实时数据统计' },
|
|
component: () => import('@/views/statistical-realtime.vue'),
|
|
},
|
|
{
|
|
path: '/statistical-history',
|
|
name: 'statistical-history',
|
|
meta: { title: '历史数据统计' },
|
|
component: () => import('@/views/statistical-history.vue'),
|
|
},
|
|
{
|
|
path: '/months',
|
|
name: 'months',
|
|
meta: { title: '月累计数据分析', icon: 'el-icon-data-analysis' },
|
|
component: () => import('@/views/month-data.vue'),
|
|
},
|
|
{
|
|
path: '/test',
|
|
name: 'test',
|
|
meta: { title: '测试' },
|
|
component: () => import('@/views/test.vue'),
|
|
},
|
|
];
|
|
|
|
const router = createRouter({
|
|
history: createWebHistory(),
|
|
routes,
|
|
});
|
|
|
|
export default router;
|
|
|