From b8440d9a6b1671cdf0c8f06cdaba2f80a8dac1e6 Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Wed, 13 Nov 2024 14:17:15 +0800
Subject: [PATCH] 退出图标按钮修复
---
src/router/index.js | 127 +++++++++++++++++++++++++++++------------
1 files changed, 89 insertions(+), 38 deletions(-)
diff --git a/src/router/index.js b/src/router/index.js
index 0ff1b79..fb0514f 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -2,59 +2,109 @@
* @Author: shuishen 1109946754@qq.com
* @Date: 2024-10-25 16:35:31
* @LastEditors: shuishen 1109946754@qq.com
- * @LastEditTime: 2024-10-29 17:48:52
+ * @LastEditTime: 2024-11-11 18:38:01
* @FilePath: \bigScreen\src\router\index.js
* @Description:
*
* Copyright (c) 2024 by shuishen, All Rights Reserved.
*/
-import { createRouter, createWebHistory } from 'vue-router'
-
+import { createRouter, createWebHistory, createWebHashHistory } from 'vue-router'
+const layout = () => import("@/pages/layout/index.vue")
+const firstLayout = () => import('@/pages/first/index.vue')
+const subLayout = () => import('@/pages/sub/index.vue')
+const companyInfo = () => import('@/views/companyInfo/index.vue')
const routes = [
{
path: '',
redirect: '/layout',
},
{
+ path: '/login',
+ name: '登录页',
+ component: () => import('@/pages/login.vue'),
+ meta: {
+ keepAlive: true,
+ isTab: false,
+ isAuth: false,
+ },
+ },
+ {
path: '/layout',
name: 'layout',
- redirect: '/layout/survey',
- component: () => import("@/views/layout/index.vue"),
+ redirect: '/layout/first/survey',
+ component: layout,
children: [
{
- path: 'survey',
- meta: {
- title: '园区概况'
- },
- component: () => import('@/views/survey/index.vue')
+ path: 'first',
+ name: 'first',
+ component: firstLayout,
+ redirect: '/layout/first/survey',
+ children: [
+ {
+ path: 'survey',
+ meta: {
+ title: '园区概况'
+ },
+ component: () => import('@/views/survey/index.vue')
+ },
+ {
+ path: 'rs',
+ meta: {
+ title: '风险源'
+ },
+ component: () => import('@/views/rs/index.vue')
+ },
+ {
+ path: 'space',
+ meta: {
+ title: '应急空间'
+ },
+ component: () => import('@/views/space/index.vue')
+ },
+ {
+ path: 'supplies',
+ meta: {
+ title: '应急物资'
+ },
+ component: () => import('@/views/supplies/index.vue')
+ },
+ {
+ path: 'pac',
+ meta: {
+ title: '三级防控'
+ },
+ component: () => import('@/views/pac/index.vue')
+ },
+ {
+ path: 'rt',
+ meta: {
+ title: '救援队伍'
+ },
+ component: () => import('@/views/rt/index.vue')
+ },
+ {
+ path: 'pd',
+ meta: {
+ title: '污染物处理'
+ },
+ component: () => import('@/views/pd/index.vue')
+ },
+ ]
},
{
- path: 'space',
- meta: {
- title: '应急空间'
- },
- component: () => import('@/views/space/index.vue')
- },
- {
- path: 'supplies',
- meta: {
- title: '应急物资'
- },
- component: () => import('@/views/supplies/index.vue')
- },
- {
- path: 'equipment',
- meta: {
- title: '应急设备'
- },
- component: () => import('@/views/equipment/index.vue')
- },
- {
- path: 'pac',
- meta: {
- title: '三级防控'
- },
- component: () => import('@/views/pac/index.vue')
+ path: 'sub',
+ name: 'sub',
+ component: subLayout,
+ redirect: '/layout/sub/companyInfo',
+ children: [
+ {
+ path: 'companyInfo',
+ meta: {
+ title: '企业详情'
+ },
+ component: companyInfo
+ },
+ ]
}
]
},
@@ -63,8 +113,9 @@
const { VITE_APP_BASE } = import.meta.env
const router = createRouter({
- history: createWebHistory(VITE_APP_BASE),
+ base: VITE_APP_BASE,
+ history: createWebHashHistory(VITE_APP_BASE),
routes
})
-export default router
\ No newline at end of file
+export default router
--
Gitblit v1.9.3