Explorar el Código

智慧安防/场景空页面路由添加

tianyabing hace 2 años
padre
commit
71eaa258be

+ 11 - 0
src/components/scene/access/sceneAccessBehaviour.vue

@@ -0,0 +1,11 @@
+<template>
+
+</template>
+
+<script>
+export default {}
+</script>
+
+<style lang="less" scoped>
+
+</style>

+ 11 - 0
src/components/scene/access/sceneAccessGuestManage.vue

@@ -0,0 +1,11 @@
+<template>
+
+</template>
+
+<script>
+export default {}
+</script>
+
+<style lang="less" scoped>
+
+</style>

+ 11 - 0
src/components/scene/access/sceneAccessManage.vue

@@ -0,0 +1,11 @@
+<template>
+
+</template>
+
+<script>
+export default {}
+</script>
+
+<style lang="less" scoped>
+
+</style>

+ 11 - 0
src/components/scene/access/sceneAccessParkManage.vue

@@ -0,0 +1,11 @@
+<template>
+
+</template>
+
+<script>
+export default {}
+</script>
+
+<style lang="less" scoped>
+
+</style>

+ 11 - 0
src/components/scene/energy/sceneEnergyAircondition.vue

@@ -0,0 +1,11 @@
+<template>
+
+</template>
+
+<script>
+export default {}
+</script>
+
+<style lang="less" scoped>
+
+</style>

+ 11 - 0
src/components/scene/energy/sceneEnergyLight.vue

@@ -0,0 +1,11 @@
+<template>
+
+</template>
+
+<script>
+export default {}
+</script>
+
+<style lang="less" scoped>
+
+</style>

+ 11 - 0
src/components/scene/energy/sceneEnergyWater.vue

@@ -0,0 +1,11 @@
+<template>
+
+</template>
+
+<script>
+export default {}
+</script>
+
+<style lang="less" scoped>
+
+</style>

+ 11 - 0
src/components/scene/meeting/sceneMeetingConfig.vue

@@ -0,0 +1,11 @@
+<template>
+
+</template>
+
+<script>
+export default {}
+</script>
+
+<style lang="less" scoped>
+
+</style>

+ 11 - 0
src/components/scene/meeting/sceneMeetingOverview.vue

@@ -0,0 +1,11 @@
+<template>
+
+</template>
+
+<script>
+export default {}
+</script>
+
+<style lang="less" scoped>
+
+</style>

+ 43 - 0
src/components/scene/scene.vue

@@ -0,0 +1,43 @@
+<template>
+  <div class="iot-scene">
+    <ContainerAside></ContainerAside>
+    <div class="pageContainer-body">
+      <Breadcrumb></Breadcrumb>
+      <div class="pageContainer-content" >
+        <router-view />
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import {defineAsyncComponent} from "vue";
+
+export default {
+  data() {
+    return {
+    }
+  },
+  components: {
+    ContainerAside: defineAsyncComponent(() => import("@/components/home/ContainerAside.vue")),
+    Breadcrumb: defineAsyncComponent(() => import("@/components/breadcrumb/iotBreadcrumb.vue")),
+  },
+  watch: {
+  },
+  mounted() {
+  },
+  methods: {
+
+  }
+}
+</script>
+
+<style lang="less" scoped>
+.iot-scene {
+  width: 100%;
+  height: 100%;
+}
+.myChart {
+  width: 100%;
+}
+</style>

+ 11 - 0
src/components/security/alarm/securityAlarmGrid.vue

@@ -0,0 +1,11 @@
+<template>
+
+</template>
+
+<script>
+export default {}
+</script>
+
+<style lang="less" scoped>
+
+</style>

+ 11 - 0
src/components/security/alarm/securityAlarmInfo.vue

@@ -0,0 +1,11 @@
+<template>
+
+</template>
+
+<script>
+export default {}
+</script>
+
+<style lang="less" scoped>
+
+</style>

+ 11 - 0
src/components/security/alarm/securityAlarmManage.vue

@@ -0,0 +1,11 @@
+<template>
+
+</template>
+
+<script>
+export default {}
+</script>
+
+<style lang="less" scoped>
+
+</style>

+ 11 - 0
src/components/security/alarm/securityAlarmMap.vue

@@ -0,0 +1,11 @@
+<template>
+
+</template>
+
+<script>
+export default {}
+</script>
+
+<style lang="less" scoped>
+
+</style>

+ 11 - 0
src/components/security/device/securityDevice.vue

@@ -0,0 +1,11 @@
+<template>
+
+</template>
+
+<script>
+export default {}
+</script>
+
+<style lang="less" scoped>
+
+</style>

+ 11 - 0
src/components/security/person/securityPerson.vue

@@ -0,0 +1,11 @@
+<template>
+
+</template>
+
+<script>
+export default {}
+</script>
+
+<style lang="less" scoped>
+
+</style>

+ 43 - 0
src/components/security/security.vue

@@ -0,0 +1,43 @@
+<template>
+  <div class="iot-security">
+    <ContainerAside></ContainerAside>
+    <div class="pageContainer-body">
+      <Breadcrumb></Breadcrumb>
+      <div class="pageContainer-content" >
+        <router-view />
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import {defineAsyncComponent} from "vue";
+
+export default {
+  data() {
+    return {
+    }
+  },
+  components: {
+    ContainerAside: defineAsyncComponent(() => import("@/components/home/ContainerAside.vue")),
+    Breadcrumb: defineAsyncComponent(() => import("@/components/breadcrumb/iotBreadcrumb.vue")),
+  },
+  watch: {
+  },
+  mounted() {
+  },
+  methods: {
+
+  }
+}
+</script>
+
+<style lang="less" scoped>
+.iot-security {
+  width: 100%;
+  height: 100%;
+}
+.myChart {
+  width: 100%;
+}
+</style>

+ 85 - 12
src/data/json/menuList.json

@@ -131,17 +131,39 @@
     "children": [
       {
         "name": "安防人员",
-        "router": "",
+        "router": "/security/person",
         "icon": ""
       },
       {
         "name": "安消联动",
-        "router": "",
-        "icon": ""
+        "router": "/security/alarm",
+        "icon": "",
+        "children": [
+          {
+            "name": "地图模式",
+            "router": "/security/alarm/map",
+            "icon": ""
+          },
+          {
+            "name": "宫格模式",
+            "router": "/security/alarm/grid",
+            "icon": ""
+          },
+          {
+            "name": "告警管理",
+            "router": "/security/alarm/manage",
+            "icon": ""
+          },
+          {
+            "name": "告警库",
+            "router": "/security/alarm/info",
+            "icon": ""
+          }
+        ]
       },
       {
         "name": "设备交互",
-        "router": "",
+        "router": "/security/device",
         "icon": ""
       }
     ]
@@ -153,18 +175,69 @@
     "children": [
       {
         "name": "智•会议",
-        "router": "",
-        "icon": ""
+        "router": "/scene/meeting",
+        "icon": "",
+        "children": [
+          {
+            "name": "配置会议",
+            "router": "/scene/meeting/config",
+            "icon": ""
+          },
+          {
+            "name": "统计分析",
+            "router": "/scene/meeting/overview",
+            "icon": ""
+          }
+        ]
       },
       {
-        "name": "智能源",
-        "router": "",
-        "icon": ""
+        "name": "智•能源",
+        "router": "/scene/energy",
+        "icon": "",
+        "children": [
+          {
+            "name": "智能空调",
+            "router": "/scene/energy/aircondition",
+            "icon": ""
+          },
+          {
+            "name": "智能照明",
+            "router": "/scene/energy/light",
+            "icon": ""
+          },
+          {
+            "name": "智能饮水机",
+            "router": "/scene/energy/water",
+            "icon": ""
+          }
+        ]
       },
       {
-        "name": "智安防",
-        "router": "",
-        "icon": ""
+        "name": "智•安防",
+        "router": "/scene/access",
+        "icon": "",
+        "children": [
+          {
+            "name": "门禁管理",
+            "router": "/scene/access/manage",
+            "icon": ""
+          },
+          {
+            "name": "访客管理",
+            "router": "/scene/access/guest",
+            "icon": ""
+          },
+          {
+            "name": "停车管理",
+            "router": "/scene/access/park",
+            "icon": ""
+          },
+          {
+            "name": "行为感知",
+            "router": "/scene/access/behaviour",
+            "icon": ""
+          }
+        ]
       }
     ]
   },

+ 135 - 0
src/router/index.js

@@ -158,6 +158,141 @@ const router = new VueRouter({
             }
           ]
         },
+        {
+          path: '/security',
+          name: 'security',
+          meta: {breadcrumb: '智慧安防'},
+          component: () => import('@/components/security/security.vue'),
+          children: [
+            {
+              path: '/security/person',
+              name: 'securityPerson',
+              meta: {breadcrumb: '安防人员'},
+              component: () => import('@/components/security/person/securityPerson.vue'),
+            },
+            {
+              path: '/security/alarm',
+              name: 'securityAlarm',
+              meta: {breadcrumb: '安消联动'},
+              children: [
+                {
+                  path: '/security/alarm/map',
+                  name: 'securityAlarmMap',
+                  meta: {breadcrumb: '地图模式'},
+                  component: () => import('@/components/security/alarm/securityAlarmMap.vue'),
+                },
+                {
+                  path: '/security/alarm/grid',
+                  name: 'securityAlarmGrid',
+                  meta: {breadcrumb: '宫格模式'},
+                  component: () => import('@/components/security/alarm/securityAlarmGrid.vue'),
+                },
+                {
+                  path: '/security/alarm/manage',
+                  name: 'securityAlarmManage',
+                  meta: {breadcrumb: '告警管理'},
+                  component: () => import('@/components/security/alarm/securityAlarmManage.vue'),
+                },
+                {
+                  path: '/security/alarm/info',
+                  name: 'securityAlarmInfo',
+                  meta: {breadcrumb: '告警库'},
+                  component: () => import('@/components/security/alarm/securityAlarmInfo.vue'),
+                },
+              ]
+            },
+            {
+              path: '/security/device',
+              name: 'securityDevice',
+              meta: {breadcrumb: '设备交互'},
+              component: () => import('@/components/security/device/securityDevice.vue'),
+            },
+          ]
+        },
+        {
+          path: '/scene',
+          name: 'scene',
+          meta: {breadcrumb: '智慧场景'},
+          component: () => import('@/components/scene/scene.vue'),
+          children: [
+            {
+              path: '/scene/meeting',
+              name: 'sceneMeeting',
+              meta: {breadcrumb: '智·会议'},
+              children: [
+                {
+                  path: '/scene/meeting/config',
+                  name: 'sceneMeetingConfig',
+                  meta: {breadcrumb: '配置会议'},
+                  component: () => import('@/components/scene/meeting/sceneMeetingConfig.vue'),
+                },
+                {
+                  path: '/scene/meeting/overview',
+                  name: 'sceneMeetingOverview',
+                  meta: {breadcrumb: '统计分析'},
+                  component: () => import('@/components/scene/meeting/sceneMeetingOverview.vue'),
+                },
+              ]
+            },
+            {
+              path: '/scene/energy',
+              name: 'sceneEnergy',
+              meta: {breadcrumb: '智·能源'},
+              children: [
+                {
+                  path: '/scene/energy/aircondition',
+                  name: 'sceneEnergyAircondition',
+                  meta: {breadcrumb: '智能空调'},
+                  component: () => import('@/components/scene/energy/sceneEnergyAircondition.vue'),
+                },
+                {
+                  path: '/scene/energy/light',
+                  name: 'sceneEnergyLight',
+                  meta: {breadcrumb: '智能照明'},
+                  component: () => import('@/components/scene/energy/sceneEnergyLight.vue'),
+                },
+                {
+                  path: '/scene/energy/water',
+                  name: 'sceneEnergyWater',
+                  meta: {breadcrumb: '智能饮水机'},
+                  component: () => import('@/components/scene/energy/sceneEnergyWater.vue'),
+                },
+              ]
+            },
+            {
+              path: '/scene/access',
+              name: 'sceneAccess',
+              meta: {breadcrumb: '智·安防'},
+              children: [
+                {
+                  path: '/scene/access/manage',
+                  name: 'sceneAccessManage',
+                  meta: {breadcrumb: '门禁管理'},
+                  component: () => import('@/components/scene/access/sceneAccessManage.vue'),
+                },
+                {
+                  path: '/scene/access/guest',
+                  name: 'sceneAccessGuest',
+                  meta: {breadcrumb: '访客管理'},
+                  component: () => import('@/components/scene/access/sceneAccessGuestManage.vue'),
+                },
+                {
+                  path: '/scene/access/park',
+                  name: 'sceneAccessPark',
+                  meta: {breadcrumb: '停车管理'},
+                  component: () => import('@/components/scene/access/sceneAccessParkManage.vue'),
+                },
+                {
+                  path: '/scene/access/behaviour',
+                  name: 'sceneAccessBehaviour',
+                  meta: {breadcrumb: '行为感知'},
+                  component: () => import('@/components/scene/access/sceneAccessBehaviour.vue'),
+                }
+              ]
+            },
+          ]
+        },
+
       ],
     },
     {

+ 12 - 2
src/views/HomeView.vue

@@ -9,7 +9,7 @@
         <a-layout-sider
           v-model="collapse"
           :trigger="null"
-          width="160"
+          :width="asideWidth"
           style="background: #fff"
           :collapsible="true"
           :collapsed-width="60"
@@ -37,7 +37,7 @@ export default {
   data() {
     return {
       collapse: false, // 侧边栏是否收起
-      asideWidth: "16%",
+      asideWidth: 160,
       contentWidth: "84%",
       contentHeight: 450,
     };
@@ -49,14 +49,24 @@ export default {
         app.suitHeight();
       }, 100);
     },
+    $route() {
+      //this.judgeHideAside();
+    },
   },
   mounted() {
     this.suitHeight();
+    //this.judgeHideAside();
     if (this.$route.matched.length===1) {
       this.$router.push({path: '/dashboard'})
     }
   },
   methods: {
+    judgeHideAside() {
+      let name = this.$route.name
+      if (['dashboard'].indexOf(name)>-1) {
+        this.asideWidth = 0;
+      }
+    },
     suitHeight() {
       let app = this;
       this.$nextTick(() => {