From 60e60cc647fe696a68f211d25d563d677f8b27c2 Mon Sep 17 00:00:00 2001 From: batman <978517621@qq.com> Date: 星期三, 08 三月 2023 10:54:48 +0800 Subject: [PATCH] 新修改添加页面 --- src/router/route.ts | 196 ++++++++++++++++++++++++++++++++---------------- 1 files changed, 129 insertions(+), 67 deletions(-) diff --git a/src/router/route.ts b/src/router/route.ts index 2cc9a9a..7cce428 100644 --- a/src/router/route.ts +++ b/src/router/route.ts @@ -1,77 +1,139 @@ import { RouteRecordRaw } from 'vue-router'; export const dynamicRoutes: Array<RouteRecordRaw> = [ - - { - path: '/', - name: '/', - component: () => import('/@/layout/index.vue'), - redirect: '/home', - meta: { - isKeepAlive: true, - }, - children: [ - { - path: '/home', - name: 'home', - component: () => import('/@/views/home/index.vue'), - meta: { - title: 'message.router.home', - isLink: '', - isHide: false, - isKeepAlive: true, - isAffix: true, - isIframe: false, - roles: ['admin', 'common'], - icon: 'iconfont icon-shouye', - button:'121231' - }, - }, - ], - }, + { + path: '/', + name: '/', + component: () => import('/@/layout/index.vue'), + redirect: '/home', + meta: { + isKeepAlive: false + }, + children: [ + { + path: '/home', + name: 'home', + component: () => import('/@/views/newHome/index.vue'), + meta: { + title: '首页', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: true, + isIframe: false, + roles: ['admin', 'common'], + icon: 'iconfont icon-shouye' + } + } + ] + } ]; - export const notFoundAndNoPower = [ - { - path: '/:path(.*)*', - name: 'notFound', - component: () => import('/@/views/error/404.vue'), - meta: { - title: 'message.staticRoutes.notFound', - isHide: true, - }, - }, - { - path: '/401', - name: 'noPower', - component: () => import('/@/views/error/401.vue'), - meta: { - title: 'message.staticRoutes.noPower', - isHide: true, - }, - }, + { + path: '/:path(.*)*', + name: 'notFound', + component: () => import('/@/views/error/404.vue'), + meta: { + title: 'message.staticRoutes.notFound', + isHide: true + } + }, + { + path: '/401', + name: 'noPower', + component: () => import('/@/views/error/401.vue'), + meta: { + title: 'message.staticRoutes.noPower', + isHide: true + } + } ]; export const staticRoutes: Array<RouteRecordRaw> = [ - { - path: '/', - name: '/', - component: () => import('/@/layout/index.vue'), - meta: { - title: '布局界面', - }, - children: [ - // 请不要往这里 `children` 中添加内容,此内容为了防止 No match found for location with path "xxx" 问题 - ...notFoundAndNoPower, - ], - }, - { - path: '/login', - name: 'login', - component: () => import('/@/views/login/index.vue'), - meta: { - title: '登录', - }, - }, + { + path: '/', + name: '/', + component: () => import('/@/layout/index.vue'), + meta: { + title: '布局界面' + }, + children: [ + // 请不要往这里 `children` 中添加内容,此内容为了防止 No match found for location with path "xxx" 问题 + ...notFoundAndNoPower + ] + }, + { + path: '/login', + name: 'login', + component: () => import('/@/views/loginPage/loginPage.vue'), + meta: { + title: '登录' + } + }, + { + path: '/newMenu', + name: 'newMenu', + component: () => import('/@/views/newHome/index.vue'), + meta: { + title: '首页', + isKeepAlive: false + } + }, + { + path: '/warningScreen', + name: 'warningScreen', + component: () => import('/@/views/riskWarningSys/warningBigScreen/index.vue'), + meta: { + title: '预警预报' + } + }, + { + path: '/msgDetail', + name: 'msgDetail', + component: () => import('/@/views/riskWarningSys/warningBigScreen/indexs/msgDetail.vue'), + meta: { + title: 'spi报告详情' + } + }, + { + path: '/securities', + name: 'securities', + component: () => import('/@/views/facilityManagement/securities/index.vue'), + meta: { + title: '安全物资与设备' + } + }, + { + path: '/inspectIndex2', + name: 'inspectIndex2', + component: () => import('/@/views/intellectInspect/inspectIndex2/index.vue'), + meta: { + title: '巡检首页' + } + }, + { + path: '/video', + name: 'video', + component: () => import('/@/views/system/video/index.vue'), + meta: { + title: '视频设备管理' + } + }, + { + path: '/specialIndex', + name: 'specialIndex', + component: () => import('/@/views/specialWorkSystem/specialIndex/index.vue'), + meta: { + title: '特殊作业首页' + } + }, + { + path: '/facilityIndex', + name: 'facilityIndex', + component: () => import('/@/views/facilityManagement/facilityIndex/index.vue'), + meta: { + title: '设备管理首页' + } + } ]; -- Gitblit v1.9.2