浏览代码

跳转实现

ming 3 年之前
父节点
当前提交
71e380d921
共有 3 个文件被更改,包括 76 次插入62 次删除
  1. 3 0
      src/main.js
  2. 71 60
      src/router/index.js
  3. 2 2
      src/views/powerQuality/asseReport/loopReport.vue

+ 3 - 0
src/main.js

@@ -53,4 +53,7 @@ router.beforeEach((to) => {
         store.commit("publicSiteList");
         store.commit('publicDeviceList')
     }
+    if (to.path == '/home') {
+        window.open("https://wx.ewoogi.com/vuefiv/#/home");
+    }
 })

+ 71 - 60
src/router/index.js

@@ -31,30 +31,61 @@ export const constantRoutes = [{
 ]
 export const asyncRoutes = [
 
+    // {
+    //     path: '/',
+    //     component: Layout,
+    //     redirect: '/index',
+    //     meta: {
+    //         title: '首页',
+    //         icon: 'home',
+    //         affix: true,
+    //     },
+    //     children: [{
+    //         path: 'index',
+    //         name: 'Index',
+    //         component: () =>
+    //             import ('@/views/index'),
+    //         meta: {
+    //             title: '首页',
+    //             icon: 'home',
+    //             affix: true,
+    //         },
+    //     }, ],
+    // },
+
     {
-        path: '/',
+        path: 'external-link',
         component: Layout,
+        children: [{
+            path: '/home',
+            meta: { title: '首页', icon: 'home', }
+        }]
+    },
+
+    {
+        path: '/',
         redirect: '/index',
         meta: {
-            title: '首页',
-            icon: 'home',
+            title: '告警管理',
+            icon: 'alarmManage',
             affix: true,
         },
+        component: Layout,
         children: [{
-            path: 'index',
-            name: 'Index',
-            component: () =>
-                import ('@/views/index'),
             meta: {
-                title: '首页',
-                icon: 'home',
+                title: '告警管理',
+                icon: 'alarmManage',
                 affix: true,
             },
-        }, ],
+            path: 'index',
+            component: () =>
+                import ('@/views/alarmManage/index'),
+
+        }, ]
     },
     // {
-    //     path: '/',
-    //     redirect: '/index',
+    //     path: '/alarmManage',
+    //     redirect: '/alarmManage/index',
     //     meta: {
     //         title: '告警管理',
     //         icon: 'alarmManage',
@@ -67,33 +98,12 @@ export const asyncRoutes = [
     //             icon: 'alarmManage',
     //             affix: true,
     //         },
-    //         path: 'index',
+    //         path: 'alarmManage',
     //         component: () =>
     //             import ('@/views/alarmManage/index'),
 
     //     }, ]
     // },
-    {
-        path: '/alarmManage',
-        redirect: '/alarmManage/index',
-        meta: {
-            title: '告警管理',
-            icon: 'alarmManage',
-            affix: true,
-        },
-        component: Layout,
-        children: [{
-            meta: {
-                title: '告警管理',
-                icon: 'alarmManage',
-                // affix: true,
-            },
-            path: 'alarmManage',
-            component: () =>
-                import ('@/views/alarmManage/index'),
-
-        }, ]
-    },
     {
         path: '/siteManage',
         redirect: '/siteManage/index',
@@ -498,34 +508,35 @@ export const asyncRoutes = [
     // },
 
     // {
-    //   path: '/error',
-    //   name: 'Error',
-    //   component: Layout,
-    //   redirect: '/error/403',
-    //   meta: {
-    //     title: '错误页',
-    //     icon: 'error-warning-line',
-    //   },
-    //   children: [
-    //     {
-    //       path: '403',
-    //       name: 'Error403',
-    //       component: () => import('@/views/403'),
-    //       meta: {
-    //         title: '403',
-    //         icon: 'error-warning-line',
-    //       },
-    //     },
-    //     {
-    //       path: '404',
-    //       name: 'Error404',
-    //       component: () => import('@/views/404'),
-    //       meta: {
-    //         title: '404',
+    //     path: '/error',
+    //     name: 'Error',
+    //     component: Layout,
+    //     redirect: '/error/403',
+    //     meta: {
+    //         title: '错误页',
     //         icon: 'error-warning-line',
-    //       },
     //     },
-    //   ],
+    //     children: [{
+    //             path: '403',
+    //             name: 'Error403',
+    //             component: () =>
+    //                 import ('@/views/403'),
+    //             meta: {
+    //                 title: '403',
+    //                 icon: 'error-warning-line',
+    //             },
+    //         },
+    //         {
+    //             path: '404',
+    //             name: 'Error404',
+    //             component: () =>
+    //                 import ('@/views/404'),
+    //             meta: {
+    //                 title: '404',
+    //                 icon: 'error-warning-line',
+    //             },
+    //         },
+    //     ],
     // },
     {
         path: '/*',

+ 2 - 2
src/views/powerQuality/asseReport/loopReport.vue

@@ -123,7 +123,7 @@
                   </el-col>
                 </el-row>
                 <el-button class="banlanceBtn" round type="danger">
-                  不合格,会影响设备安全运行
+                  不合格
                 </el-button>
                 <ul>
                   <li>
@@ -309,7 +309,7 @@
                   </el-col>
                 </el-row>
                 <el-button class="banlanceBtn" round type="danger">
-                  不合格,会影响设备安全运行
+                  不合格
                 </el-button>
                 <ul>
                   <li>