From 3fe27a3b570a7d6d8f8d66d0fab34d011257b56d Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Mon, 16 Dec 2024 19:43:47 +0800
Subject: [PATCH] 突发事件模拟内容调整,路由拦截跳转调整

---
 src/permission.js                        |   18 ++++++++++++------
 src/pages/single/index.vue               |    4 ++--
 src/views/pd/components/dynamicPanel.vue |    8 ++++----
 src/router/index.js                      |    2 +-
 4 files changed, 19 insertions(+), 13 deletions(-)

diff --git a/src/pages/single/index.vue b/src/pages/single/index.vue
index 711b4d3..1129943 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..93f066b 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 {
@@ -45,3 +50,4 @@
 router.afterEach(to => {
 
 })
+
diff --git a/src/router/index.js b/src/router/index.js
index d25382c..c10d0f3 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -22,7 +22,7 @@
   //   redirect: '/layout',
   // },
   {
-    path: '',
+    path: '/',
     redirect: '/layout',
   },
   {
diff --git a/src/views/pd/components/dynamicPanel.vue b/src/views/pd/components/dynamicPanel.vue
index 03487bd..234e843 100644
--- a/src/views/pd/components/dynamicPanel.vue
+++ b/src/views/pd/components/dynamicPanel.vue
@@ -2,7 +2,7 @@
  * @Author: shuishen 1109946754@qq.com
  * @Date: 2024-11-09 15:41:35
  * @LastEditors: shuishen 1109946754@qq.com
- * @LastEditTime: 2024-12-06 16:50:50
+ * @LastEditTime: 2024-12-16 19:42:20
  * @FilePath: \bigScreen\src\views\pd\components\dynamicPanel.vue
  * @Description: 
  * 
@@ -132,21 +132,21 @@
       },
       onetime: 10000,
 
-      twoContent: '调度金龙水库清水,稀释污染团。',
+      twoContent: '关闭雨水阀闸,调度金龙水库清水,稀释污染团。',
       twoPointPosition: {
         lng: 115.10488545,
         lat: 27.27678110
       },
       twotime: 13000,
 
-      threeContent: '转输至江西粤鹏环保高新技术开发有限公司事故应急池、初期雨水池。',
+      threeContent: '转输至江西粤鹏环保高新技术开发有限公司事故应急池。',
       threePointPosition: {
         lng: 115.10545135,
         lat: 27.28043872
       },
       threetime: 18000,
 
-      fourContent: '转输至江西腾龙源环保科技有限公司事故应急池、初期雨水池。',
+      fourContent: '转输至江西腾龙源环保科技有限公司事故应急池。',
       fourPointPosition: {
         lng: 115.10332118,
         lat: 27.27831698

--
Gitblit v1.9.3