From e6790d88fc5b1ac33d239c0d90ce6cdea666b821 Mon Sep 17 00:00:00 2001
From: mk1990 <153958232@qq.com>
Date: 星期一, 16 五月 2022 10:14:24 +0800
Subject: [PATCH] Merge branch 'wvp-28181-2.0' of https://github.com/mk1990/wvp-GB28181-pro into wvp-28181-2.0

---
 web_src/src/router/index.js |  140 +++++++++++++++++++++++++---------------------
 1 files changed, 75 insertions(+), 65 deletions(-)

diff --git a/web_src/src/router/index.js b/web_src/src/router/index.js
index 3869fa3..8844862 100644
--- a/web_src/src/router/index.js
+++ b/web_src/src/router/index.js
@@ -1,5 +1,6 @@
 import Vue from 'vue'
 import VueRouter from 'vue-router'
+import Layout from "../layout/index.vue"
 
 import control from '../components/control.vue'
 import deviceList from '../components/DeviceList.vue'
@@ -15,6 +16,7 @@
 import sip from '../components/setting/Sip.vue'
 import media from '../components/setting/Media.vue'
 import live from '../components/live.vue'
+import deviceTree from '../components/common/DeviceTree.vue'
 
 import wasmPlayer from '../components/common/jessibuca.vue'
 import rtcPlayer from '../components/dialog/rtcPlayer.vue'
@@ -32,23 +34,76 @@
   routes: [
     {
       path: '/',
-      component: control,
-    },
-    {
-      path: '/live',
-      component: live,
-    },
-    {
-      path: '/deviceList',
-      component: deviceList,
-    },
-    {
-      path: '/pushVideoList',
-      component: pushVideoList,
-    },
-    {
-      path: '/streamProxyList',
-      component: streamProxyList,
+      name: 'home',
+      component: Layout,
+      redirect: '/control',
+      children: [
+        {
+          path: '/control',
+          component: control,
+        },
+        {
+          path: '/live',
+          component: live,
+        },
+        {
+          path: '/deviceList',
+          component: deviceList,
+        },
+        {
+          path: '/pushVideoList',
+          component: pushVideoList,
+        },
+        {
+          path: '/streamProxyList',
+          component: streamProxyList,
+        },
+        {
+          path: '/channelList/:deviceId/:parentChannelId/:count/:page',
+          name: 'channelList',
+          component: channelList,
+        },
+        {
+          path: '/parentPlatformList/:count/:page',
+          name: 'parentPlatformList',
+          component: parentPlatformList,
+        },
+        {
+          path: '/devicePosition/:deviceId/:parentChannelId/:count/:page',
+          name: 'devicePosition',
+          component: devicePosition,
+        },
+        {
+          path: '/cloudRecord',
+          name: 'cloudRecord',
+          component: cloudRecord,
+        },
+        {
+          path: '/mediaServerManger',
+          name: 'mediaServerManger',
+          component: mediaServerManger,
+        },
+        {
+          path: '/setting/web',
+          name: 'web',
+          component: web,
+        },
+        {
+          path: '/setting/sip',
+          name: 'sip',
+          component: sip,
+        },
+        {
+          path: '/setting/media',
+          name: 'media',
+          component: media,
+        },
+        {
+          path: '/map',
+          name: 'devicePosition',
+          component: devicePosition,
+        },
+        ]
     },
     {
       path: '/login',
@@ -56,54 +111,9 @@
       component: login,
     },
     {
-      path: '/channelList/:deviceId/:parentChannelId/:count/:page',
-      name: 'channelList',
-      component: channelList,
-    },
-    {
-      path: '/parentPlatformList/:count/:page',
-      name: 'parentPlatformList',
-      component: parentPlatformList,
-    },
-    {
-      path: '/devicePosition',
-      name: 'devicePosition',
-      component: devicePosition,
-    },
-    {
-      path: '/devicePosition/:deviceId',
-      name: 'devicePosition',
-      component: devicePosition,
-    },
-    {
-      path: '/devicePosition/:deviceId/:parentChannelId',
-      name: 'devicePosition',
-      component: devicePosition,
-    },
-    {
-      path: '/cloudRecord',
-      name: 'cloudRecord',
-      component: cloudRecord,
-    },
-    {
-      path: '/mediaServerManger',
-      name: 'mediaServerManger',
-      component: mediaServerManger,
-    },
-    {
-      path: '/setting/web',
-      name: 'web',
-      component: web,
-    },
-    {
-      path: '/setting/sip',
-      name: 'sip',
-      component: sip,
-    },
-    {
-      path: '/setting/media',
-      name: 'media',
-      component: media,
+      path: '/test',
+      name: 'deviceTree',
+      component: deviceTree,
     },
     {
       path: '/play/wasm/:url',

--
Gitblit v1.8.0