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.
84 lines
1.8 KiB
84 lines
1.8 KiB
import { createRouter, createWebHistory } from 'vue-router';
|
|
// 还有 createWebHashHistory 和 createMemoryHistory
|
|
|
|
export const routes = [
|
|
{
|
|
path: '/corrosion/overview',
|
|
name: 'overview',
|
|
meta: {
|
|
title: '设备概览',
|
|
icon: 'el-icon-data-board',
|
|
},
|
|
component: () => import('@/views/overview.vue'),
|
|
},
|
|
{
|
|
path: '/corrosion/devices',
|
|
name: 'devices',
|
|
meta: {
|
|
title: '设备管理',
|
|
icon: 'el-icon-box',
|
|
},
|
|
component: () => import('@/views/device-list.vue'),
|
|
},
|
|
{
|
|
path: '/corrosion/config',
|
|
name: 'config',
|
|
meta: {
|
|
title: '参数配置',
|
|
icon: 'el-icon-set-up',
|
|
},
|
|
component: () => import('@/views/config.vue'),
|
|
},
|
|
{
|
|
path: '/corrosion/data-realtime',
|
|
name: 'data-realtime',
|
|
meta: {
|
|
title: '实时数据',
|
|
icon: 'el-icon-odometer',
|
|
},
|
|
component: () => import('@/views/data-realtime.vue'),
|
|
},
|
|
{
|
|
path: '/corrosion/history',
|
|
name: 'history',
|
|
meta: {
|
|
title: '历史数据',
|
|
icon: 'el-icon-document',
|
|
},
|
|
component: () => import('@/views/history.vue'),
|
|
},
|
|
{
|
|
path: '/corrosion/statistical',
|
|
name: 'statistical',
|
|
meta: {
|
|
title: '数据统计',
|
|
icon: 'el-icon-data-line',
|
|
},
|
|
component: () => import('@/views/statistical-report.vue'),
|
|
},
|
|
{
|
|
path: '/corrosion/commands',
|
|
name: 'commands',
|
|
meta: {
|
|
title: '平台日志',
|
|
icon: 'el-icon-moon-night',
|
|
},
|
|
component: () => import('@/views/commands.vue'),
|
|
},
|
|
];
|
|
|
|
const router = createRouter({
|
|
history: createWebHistory(),
|
|
routes: [
|
|
{
|
|
path: '/',
|
|
redirect: '/corrosion/devices',
|
|
},
|
|
{
|
|
path: '/corrosion',
|
|
redirect: '/corrosion/devices',
|
|
},
|
|
].concat(routes),
|
|
});
|
|
|
|
export default router;
|
|
|