From 9c3050a2b8e140f91c830cfafd1f5300f4b5dd72 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Mon, 16 Dec 2024 19:40:06 +0800
Subject: [PATCH] 新干路由配置调整、作战图显示调整
---
/dev/null | 0
src/permission.js | 17 +++++++++++------
src/pages/single/index.vue | 4 ++--
src/pages/single/components/mainMenu.vue | 6 +++++-
public/img/ochart.jpg | 0
src/pages/main/components/mainMenu.vue | 6 +++++-
src/views/ochart/index.vue | 4 ++--
src/router/index.js | 23 +++++++++++++++++++----
8 files changed, 44 insertions(+), 16 deletions(-)
diff --git a/public/img/ochart.jpeg b/public/img/ochart.jpeg
deleted file mode 100644
index 8df49b7..0000000
--- a/public/img/ochart.jpeg
+++ /dev/null
Binary files differ
diff --git a/public/img/ochart.jpg b/public/img/ochart.jpg
new file mode 100644
index 0000000..508425e
--- /dev/null
+++ b/public/img/ochart.jpg
Binary files differ
diff --git a/src/pages/main/components/mainMenu.vue b/src/pages/main/components/mainMenu.vue
index c4f9602..90f120c 100644
--- a/src/pages/main/components/mainMenu.vue
+++ b/src/pages/main/components/mainMenu.vue
@@ -30,7 +30,11 @@
{
menuName: '360全景',
path: '/layout/map/main/pd'
- }
+ },
+ {
+ menuName: '作战图',
+ path: '/layout/single/ochart'
+ },
]
)
diff --git a/src/pages/single/components/mainMenu.vue b/src/pages/single/components/mainMenu.vue
index c4f9602..90f120c 100644
--- a/src/pages/single/components/mainMenu.vue
+++ b/src/pages/single/components/mainMenu.vue
@@ -30,7 +30,11 @@
{
menuName: '360全景',
path: '/layout/map/main/pd'
- }
+ },
+ {
+ menuName: '作战图',
+ path: '/layout/single/ochart'
+ },
]
)
diff --git a/src/pages/single/index.vue b/src/pages/single/index.vue
index 8742944..d995494 100644
--- a/src/pages/single/index.vue
+++ b/src/pages/single/index.vue
@@ -136,10 +136,10 @@
.main-container {
position: absolute;
- top: 40px;
+ top: 54px;
left: 40px;
right: 40px;
- bottom: 40px;
+ bottom: 54px;
}
}
}
diff --git a/src/permission.js b/src/permission.js
index 652bd76..aaf2d43 100644
--- a/src/permission.js
+++ b/src/permission.js
@@ -2,7 +2,7 @@
* @Author: shuishen 1109946754@qq.com
* @Date: 2024-10-30 17:03:57
* @LastEditors: shuishen 1109946754@qq.com
- * @LastEditTime: 2024-10-30 17:07:40
+ * @LastEditTime: 2024-12-16 19:35:12
* @FilePath: \bigScreen\src\permission.js
* @Description:
*
@@ -22,14 +22,19 @@
const meta = to.meta || {}
if (token) {
- if (to.path === '/login') {
- //如果登录成功访问登录页跳转到主页
+ if (!to.matched.length) {
+ // 如果路由不存在
next({ path: '/' })
} else {
- if (token.length === 0) {
- next({ path: '/login' })
+ if (to.path === '/login') {
+ //如果登录成功访问登录页跳转到主页
+ next({ path: '/' })
} else {
- next()
+ if (token.length === 0) {
+ next({ path: '/login' })
+ } else {
+ next()
+ }
}
}
} else {
diff --git a/src/router/index.js b/src/router/index.js
index b9a477d..ccb919d 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -2,7 +2,7 @@
* @Author: shuishen 1109946754@qq.com
* @Date: 2024-10-25 16:35:31
* @LastEditors: shuishen 1109946754@qq.com
- * @LastEditTime: 2024-12-10 16:46:59
+ * @LastEditTime: 2024-12-16 19:19:09
* @FilePath: \bigScreen\src\router\index.js
* @Description:
*
@@ -22,8 +22,8 @@
// redirect: '/layout',
// },
{
- path: '',
- redirect: '/layout',
+ path: '/',
+ redirect: '/layout/map/main/space',
},
{
path: '/login',
@@ -75,7 +75,22 @@
]
},
]
- }
+ },
+ {
+ path: 'single',
+ name: 'single',
+ component: singleLayout,
+ children: [
+ {
+ path: 'ochart',
+ meta: {
+ title: '作战图'
+ },
+ component: () => import('@/views/ochart/index.vue')
+ },
+ ]
+ },
+
]
},
]
diff --git a/src/views/ochart/index.vue b/src/views/ochart/index.vue
index e1a09d2..461ba6b 100644
--- a/src/views/ochart/index.vue
+++ b/src/views/ochart/index.vue
@@ -2,7 +2,7 @@
* @Author: shuishen 1109946754@qq.com
* @Date: 2023-03-10 15:27:59
* @LastEditors: shuishen 1109946754@qq.com
- * @LastEditTime: 2024-11-27 19:05:04
+ * @LastEditTime: 2024-12-16 19:25:30
* @FilePath: \bigScreen\src\views\ochart\index.vue
* @Description: 综合设计
*
@@ -11,7 +11,7 @@
<script setup>
import { Picture } from '@element-plus/icons-vue'
const { VITE_APP_BASE } = import.meta.env
-let image = ref(VITE_APP_BASE + 'img/ochart.jpeg')
+let image = ref(VITE_APP_BASE + 'img/ochart.jpg')
</script>
<template>
--
Gitblit v1.9.3