From 17b8d077f7efe3db20344987cdad9da9d9ab3de6 Mon Sep 17 00:00:00 2001
From: wu <731351411@qq.com>
Date: 星期五, 03 十一月 2023 15:21:11 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/CanadaMes

---
 CanadaMes-ui/src/router/index.js |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/CanadaMes-ui/src/router/index.js b/CanadaMes-ui/src/router/index.js
index 21a76f1..a789434 100644
--- a/CanadaMes-ui/src/router/index.js
+++ b/CanadaMes-ui/src/router/index.js
@@ -33,6 +33,7 @@
         path: '/home',
         component: () => import('../views/home')
       },
+      
 
 
       {
@@ -48,6 +49,7 @@
         component: () => import('../views/device/parameter'),
 
       },
+      
       {
         path: '/device/alarm',
         component: () => import('../views/device/alarm')
@@ -56,6 +58,7 @@
         path: '/device/iostate',
         component: () => import('../views/device/iostate')
       },
+      
       {
         path: '/device/control',
         component: () => import('../views/device/control')
@@ -76,6 +79,10 @@
         path: '/Electrical/State',
         component: () => import('../views/Electrical/State')
       },
+      {
+        path: '/Electrical/alarm',
+        component: () => import('../views/Electrical/alarm')
+      },
 
 
 
@@ -84,7 +91,10 @@
   }
 ];
 
+
+
 const router = new VueRouter({
+  // base: '/canadames/',  
   routes
 });
 
@@ -96,6 +106,18 @@
   // 鑾峰彇token
   const hasToken = getToken();
 
+
+
+
+  const isExist = Vue.prototype.$tagList.some(tag => tag.path === to.fullPath);
+
+  if (!isExist) {
+    Vue.prototype.$tagList.push({
+      path: to.fullPath,
+      data: null
+    });
+  }
+
   // 娌℃湁token鍒欒烦杞埌鐧诲綍椤甸潰
   if (!hasToken) return next('/login');
 

--
Gitblit v1.8.0