Quellcode durchsuchen

新增两个页面

shaogen1995 vor 4 Jahren
Ursprung
Commit
88c1e2cbfa
4 geänderte Dateien mit 108 neuen und 6 gelöschten Zeilen
  1. 2 0
      src/pages/layout/aside.vue
  2. 45 0
      src/pages/scene/index.vue
  3. 45 0
      src/pages/video/index.vue
  4. 16 6
      src/router/index.js

+ 2 - 0
src/pages/layout/aside.vue

@@ -12,6 +12,8 @@
       <!-- <div @click="go(2,'/information')" :class="{active:activeIdx === 2}">资讯管理</div> -->
       <div @click="go(3,'/display')" :class="{active:activeIdx === 3}">展示管理</div>
       <div @click="go(4,'/cultural-relic')" :class="{active:activeIdx === 4}">文物库</div>
+      <div @click="go(11,'/scene')" :class="{active:activeIdx === 11}">场景管理</div>
+      <div @click="go(12,'/video')" :class="{active:activeIdx === 12}">视频管理</div>
       <!-- <div @click="go(5,'/questionnaire')" :class="{active:activeIdx === 5}">问卷管理</div> -->
 
     </div>

+ 45 - 0
src/pages/scene/index.vue

@@ -0,0 +1,45 @@
+<template>
+<div class='scene'>
+  <h1>scene</h1>
+</div>
+</template>
+
+<script>
+
+export default {
+  name: 'Scene',
+  components: {},
+  data () {
+    // 这里存放数据
+    return {
+
+    }
+  },
+  // 监听属性 类似于data概念
+  computed: {},
+  // 监控data中的数据变化
+  watch: {},
+  // 方法集合
+  methods: {
+
+  },
+  // 生命周期 - 创建完成(可以访问当前this实例)
+  created () {
+
+  },
+  // 生命周期 - 挂载完成(可以访问DOM元素)
+  mounted () {
+
+  },
+  beforeCreate () {}, // 生命周期 - 创建之前
+  beforeMount () {}, // 生命周期 - 挂载之前
+  beforeUpdate () {}, // 生命周期 - 更新之前
+  updated () {}, // 生命周期 - 更新之后
+  beforeDestroy () {}, // 生命周期 - 销毁之前
+  destroyed () {}, // 生命周期 - 销毁完成
+  activated () {} // 如果页面有keep-alive缓存功能,这个函数会触发
+}
+</script>
+<style scoped>
+
+</style>

+ 45 - 0
src/pages/video/index.vue

@@ -0,0 +1,45 @@
+<template>
+<div class='video'>
+  <h1>video</h1>
+</div>
+</template>
+
+<script>
+
+export default {
+  name: 'Video',
+  components: {},
+  data () {
+    // 这里存放数据
+    return {
+
+    }
+  },
+  // 监听属性 类似于data概念
+  computed: {},
+  // 监控data中的数据变化
+  watch: {},
+  // 方法集合
+  methods: {
+
+  },
+  // 生命周期 - 创建完成(可以访问当前this实例)
+  created () {
+
+  },
+  // 生命周期 - 挂载完成(可以访问DOM元素)
+  mounted () {
+
+  },
+  beforeCreate () {}, // 生命周期 - 创建之前
+  beforeMount () {}, // 生命周期 - 挂载之前
+  beforeUpdate () {}, // 生命周期 - 更新之前
+  updated () {}, // 生命周期 - 更新之后
+  beforeDestroy () {}, // 生命周期 - 销毁之前
+  destroyed () {}, // 生命周期 - 销毁完成
+  activated () {} // 如果页面有keep-alive缓存功能,这个函数会触发
+}
+</script>
+<style scoped>
+
+</style>

+ 16 - 6
src/router/index.js

@@ -12,6 +12,8 @@ import WorkLog from '@/pages/work-log'
 import Modify from '@/pages/modify'
 import Role from '@/pages/role'
 import Device from '@/pages/device'
+import Scene from '@/pages/scene'
+import Video from '@/pages/video'
 
 import editInformation from '@/pages/editPages/message'
 import editDisplay from '@/pages/editPages/display'
@@ -141,12 +143,20 @@ export default new Router({
           component: Device,
           meta: {index: 10}
         },
-        // {
-        //   path: '/scene',
-        //   name: 'scene',
-        //   component: Scene,
-        //   meta: {index: 11}
-        // }
+        // 场景管理
+        {
+          path: '/scene',
+          name: 'scene',
+          component: Scene,
+          meta: {index: 11}
+        },
+        // 视频管理
+        {
+          path: '/video',
+          name: 'video',
+          component: Video,
+          meta: {index: 12}
+        }
       ]
     },
     {