index.js 3.8 KB
import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)

/**
 * 公共路由
 */
export const constantRouterMap = [{
    path: '/',
    name: 'login',
    component: reslove => require(['@/views/login/login'], reslove),
  },
  {
    path: '/show',
    name: '首页',
    redirect: "/display",
    component: reslove => require(['@/views/layout'], reslove),
    meta: {
      icon: 'gy-icon-shouye'
    },
    children: [{
      path: '/display',
      name: '首页',
      component: reslove => require(['@/views/Home/show'], reslove),
    }]
  },

  // {
  //   path: '/home',
  //   name: '首页',
  //   component: reslove => require(['@/views/layout'], reslove),
  //   children: [{
  //     path: '/show',
  //     name: '首页',
  //     component: reslove => require(['@/views/home/show'], reslove),
  //   }]
  // },

  {
    path: '/illaudit',
    name: '违法审核',
    component: reslove => require(['@/views/Enforcelaw/aduit'], reslove)
  }
]

/**
 * 异步路由
 */
export const asyncRouterMap = [{
  path: '/monitor',
  name: '实时视频',
  component: reslove => require(['@/views/layout'], reslove),
  meta: {
    icon: 'gy-icon-jianguan'
  },
  children: [
    {
      path: '/system/playvideo',
      name: '实时视频',
      component: reslove => require(['@/views/videos/playvideo'], reslove),
    }
  ]
},{
    path: '/enforcelaw/config',
    name: '数据检索',
    meta: {
      icon: 'el-icon-search'
    },
    component: reslove => require(['@/views/layout'], reslove),
    children: [{
        path: '/search/filmedrecords',
        name: '抓拍记录',
        component: reslove => require(['@/views/Search/FilmedRecords'], reslove),
      },
      {
        path: '/search/pices',
        name: '以图搜图',
        component: reslove => require(['@/views/Search/Searchpic'], reslove),
      }, {
        path: '/search/dbs',
        name: '人口库管理',
        component: reslove => require(['@/views/Search/facedb/database'], reslove),
      }
    ]
  },
  {
    path: '/activity',
    name: '活动状态',
    meta: {
      icon: 'el-icon-map-location'
    },
    component: reslove => require(['@/views/layout'], reslove),
    children: [
      // {
      //   path: '/activity/status',
      //   name: '轨迹查询',
      //   component: reslove => require(['@/views/activity/status'], reslove),
      // },
      {
        path: '/activity/report',
        name: '状态报表',
        component: reslove => require(['@/views/activity/report'], reslove),
      }
    ]
  },{
    path: '/equipment',
    name: '设备管理',
    component: reslove => require(['@/views/layout'], reslove),
    meta: {
      icon: 'el-icon-video-camera'
    },
    children: [{
      path: '/equipment/org',
      name: '组织机构管理',
      component: reslove => require(['@/views/Equipment/org.vue'], reslove),
    },{
      path: '/equipment/vchan',
      name: '相机配置',
      component: reslove => require(['@/views/Equipment/vchan.vue'], reslove),
    }
    // ,{
    //   path: '/equipment/dev',
    //   name: '设备状态',
    //   component: reslove => require(['@/views/Equipment/dev.vue'], reslove),
    // }
  ]
  }, {
    path: '/system',
    name: '系统管理',
    component: reslove => require(['@/views/layout'], reslove),
    meta: {
      icon: 'gy-icon-xitong'
    },

    children: [{
        path: '/system/user',
        name: '用户管理',
        component: reslove => require(['@/views/System/Sysuser'], reslove),
      }, {
        path: '/system/role',
        name: '角色管理',
        component: reslove => require(['@/views/System/role'], reslove),
      },{
        path: '/system/setting',
        name: '其他配置',
        component: reslove => require(['@/views/System/Setting'], reslove),
      }
    ]
  }
]


export default new Router({
  routes: constantRouterMap
})