index.js 4.78 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: '/monitor/show',
        name: '报表展示',
        component: reslove => require(['@/views/report/show'], reslove),
      },
      {
        path: '/monitor/static',
        name: '基础统计',
        component: reslove => require(['@/views/report/static'], reslove),
      },
      {
        path: '/monitor/timeflow',
        name: '时段客流分布',
        component: reslove => require(['@/views/report/timeflow'], reslove),
      }
    ]
  },
//   {
//   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: '/system/playvideo',
    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: '/activity/report',
        name: '状态报表',
        component: reslove => require(['@/views/activity/report'], 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),
      // },
      {
        path: '/search/dbs',
        name: '人口库管理',
        component: reslove => require(['@/views/Search/facedb/database'], reslove),
      }

    ]
  }
]


export default new Router({
  routes: constantRouterMap
})