import { createRouter, createWebHistory } from 'vue-router' const routes: Array = [ { path: '/', name: '物联网', title: '物联网', component: () => import('@/layout/layout.vue'), redirect: '/dashboard', children: [ { path: '/dashboard', name: '首页', icon: 'DashboardOutlined', component: () => import('@/pages/iot/dashboard/deviceAccess/index.vue') }, { path: '/product', name: '产品模型', redirect: '/product/index', icon: 'AppstoreOutlined', children: [ { path: '/product/index', name: '产品模型', component: () => import('@/pages/iot/model/index.vue') }, { path: '/product/detail', name: '产品模型详情', hidden: true, component: () => import('@/pages/iot/model/detail.vue') } ] }, { path: '/device', name: '设备', redirect: '/device/index', icon: 'RobotOutlined', children: [ { path: '/device/index', name: '所有设备', component: () => import('@/pages/iot/device/index.vue') }, { path: '/device/detail', name: '设备详情', hidden: true, component: () => import('@/pages/iot/device/detail.vue') }, { path: '/device/group', name: '群组', component: () => import('@/pages/iot/device/group.vue') } ] }, { path: '/rule', name: '规则', redirect: '/rule/forward', icon: 'AimOutlined', children: [ { path: '/rule/forward', name: '转发规则', component: () => import('@/pages/iot/rule/forwardRule.vue') }, { path: '/rule/link', name: '联动规则', component: () => import('@/pages/iot/rule/linkRule.vue') } ] }, { path: '/devOps', name: ' 监控运维', redirect: '/devOps/report', icon: 'CodeOutlined', children: [ { path: '/devOps/report', name: '统计报表', component: () => import('@/pages/iot/devOps/statistReport.vue') }, { path: '/devOps/onlineTest', name: '在线调试', component: () => import('@/pages/iot/devOps/onlineTest.vue') }, { path: '/devOps/mt', name: '消息追踪', component: () => import('@/pages/iot/devOps/msgTracking.vue') }, { path: '/devOps/nowAlert', name: '当前告警', component: () => import('@/pages/iot/devOps/nowAlert.vue') }, { path: '/devOps/nowNotice', name: '当前提醒', component: () => import('@/pages/iot/devOps/nowNotice.vue') } ] }, { path: '/dataServer', name: '数据服务', redirect: '/dataServer/history', icon: 'DatabaseOutlined', children: [ { path: '/dataServer/history', name: '历史数据', component: () => import('@/pages/iot/dataServer/history.vue') }, { path: '/dataServer/openApi', name: '开放接口', component: () => import('@/pages/iot/dataServer/openApi.vue') } ] } ] }, { path: '/rts', name: '视联网', title: '视联网', component: () => import('@/layout/layout.vue'), redirect: '/stream', children: [ { path: '/stream', name: '视频流管理', icon: 'PlayCircleOutlined', component: () => import('@/pages/rts/stream/index.vue') }, { path: '/pull', name: '拉流管理', icon: 'FallOutlined', component: () => import('@/pages/rts/pull/index.vue') }, { path: '/push', name: '推流管理', icon: 'RiseOutlined', component: () => import('@/pages/rts/push/index.vue') }, { path: '/record', name: '存储配置', icon: 'FileAddOutlined', component: () => import('@/pages/rts/record/index.vue') }, { path: '/protocol', name: ' 协议配置', icon: 'DeploymentUnitOutlined', component: () => import('@/pages/rts/protocol/index.vue') }, { path: '/monitor', name: '系统监控', icon: 'ProfileOutlined', component: () => import('@/pages/rts/monitor/index.vue') } ] } ] const router = createRouter({ history: createWebHistory(process.env.BASE_URL), routes }) export default router