| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364 |
- import layoutHeaderAside from '@/layout/header-aside'
- // 由于懒加载页面太多的话会造成webpack热更新太慢,所以开发环境不使用懒加载,只有生产环境使用懒加载
- const _import = require('@/libs/util.import.' + process.env.NODE_ENV)
- /**
- * 在主框架内显示
- */
- const frameIn = [
- { // 大屏首页
- path: '/visualized',
- name: 'visualized',
- meta: {
- auth: true
- },
- component: _import('system/visualized')
- },
- {
- path: '/',
- redirect: { name: 'index' },
- component: layoutHeaderAside,
-
- children: [
- // 大屏首页
- // {
- // path: 'visualized',
- // name: 'visualized',
- // meta: {
- // auth: true
- // },
- // component: _import('system/visualized')
- // },
-
- // 首页
- {
- path: 'index',
- name: 'index',
- meta: {
- auth: true
- },
- component: _import('system/index')
- },
- // 首页
- {
- path: 'feedBack',
- name: 'feedback',
- meta: {
- auth: true
- },
- component: _import('system/feedback')
- },
- // 仓房展示/仓内遨游
- {
- path: 'warehouseTravel',
- name: 'warehouseTravel',
- meta: {
- title: '仓内遨游',
- auth: true
- },
- component: _import('demo/warehouseShow/warehouseTravel')
- },
- // 仓房展示/仓房信息
- {
- path: 'warehouseInfo',
- name: 'warehouseInfo',
- meta: {
- title: '仓房信息',
- auth: true
- },
- component: _import('demo/warehouseShow/warehouseInfo')
- },
- // 仓房展示/仓房信息详情
- {
- path: 'warehouseInfo-check',
- name: 'warehouseInfo-check',
- meta: {
- title: '仓房信息详情',
- auth: true
- },
- component: _import('demo/warehouseShow/warehouseInfo/warehouseInfo-check.vue')
- },
- // 产品管理/产品
- {
- path: 'product',
- name: 'product',
- meta: {
- title: '产品',
- auth: true,
- parent:'产品管理',
- },
- component: _import('demo/productManage/product')
- },
- // 产品管理/产品详情
- {
- path: 'productInfo',
- name: 'productInfo',
- meta: {
- title: '产品详情',
- auth: true
- },
- component: _import('demo/productManage/productInfo')
- },
- // 产品管理/产品
- {
- path: 'productClassify',
- name: 'productClassify',
- meta: {
- title: '产品分类',
- auth: true,
- parent:'产品管理',
- },
- component: _import('demo/productManage/productClassify')
- },
- // 设备管理/设备
- {
- path: 'equipment',
- name: 'equipment',
- meta: {
- title: '设备',
- auth: true,
- parent:'设备管理',
- },
- component: _import('demo/equipmentManage/equipment')
- },
- // 设备管理/设备标签
- {
- path: 'equipmentTag',
- name: 'equipmentTag',
- meta: {
- title: '设备标签',
- auth: true,
- parent:'设备管理',
- },
- component: _import('demo/equipmentManage/equipmentTag')
- },
- // 设备管理/设备详情
- {
- path: 'equipmentInfo',
- name: 'equipmentInfo',
- meta: {
- title: '设备详情',
- auth: true
- },
- component: _import('demo/equipmentManage/equipmentInfo')
- },
- //报警记录
- {
- path: 'alarmRecord',
- name: 'alarmRecord',
- meta: {
- auth: true
- },
- component: _import('demo/alarmRecord/index')
- },
- //数据查询
- {
- path: 'dataQuery',
- name: 'dataQuery',
- meta: {
- auth: true
- },
- component: _import('demo/dataQuery/index')
- },
- // 系统管理/组织机构
- {
- path: 'organization',
- name: 'organization',
- meta: {
- title: '组织机构',
- auth: true,
- parent:'系统管理',
- },
- component: _import('demo/system/organization')
- },
- // 系统管理/用户管理
- {
- path: 'userManagement',
- name: 'userManagement',
- meta: {
- title: '用户管理',
- auth: true,
- parent:'系统管理',
- },
- component: _import('demo/system/userManagement')
- },
- // 系统管理/角色管理
- {
- path: 'roleManagement',
- name: 'roleManagement',
- meta: {
- title: '角色管理',
- auth: true,
- parent:'系统管理',
- },
- component: _import('demo/system/roleManagement')
- },
- // 系统管理/公告管理
- {
- path: 'announcementManagement',
- name: 'announcementManagement',
- meta: {
- title: '公告管理',
- auth: true,
- parent:'系统管理',
- },
- component: _import('demo/system/announcementManagement')
- },
- // 系统管理/操作日志
- {
- path: 'operationLog',
- name: 'operationLog',
- meta: {
- title: '操作日志',
- auth: true,
- parent:'系统管理',
- },
- component: _import('demo/system/operationLog')
- },
- // 参数设置/硬件参数
- {
- path: 'hardwareParame',
- name: 'hardwareParame',
- meta: {
- title: '硬件参数',
- auth: true,
- parent:'参数设置',
- },
- component: _import('demo/parameManagement/hardwareParame')
- },
- // 参数设置/硬件参数
- {
- path: 'scanParame',
- name: 'scanParame',
- meta: {
- title: '扫描参数',
- auth: true,
- parent:'参数设置',
- },
- component: _import('demo/parameManagement/scanParame')
- },
- // 参数设置/报警参数
- {
- path: 'alarmParame',
- name: 'alarmParame',
- meta: {
- title: '扫描参数',
- auth: true,
- parent:'参数设置',
- },
- component: _import('demo/parameManagement/alarmParame')
- },
- // 参数设置/数据字典
- {
- path: 'dataDictionary',
- name: 'dataDictionary',
- meta: {
- title: '数据字典',
- auth: true,
- parent:'参数设置',
- },
- component: _import('demo/parameManagement/dataDictionary')
- },
- // 参数设置/定时任务设置
- {
- path: 'timingTask',
- name: 'timingTask',
- meta: {
- title: '数据字典',
- auth: true,
- parent:'参数设置',
- },
- component: _import('demo/parameManagement/timingTask')
- },
- // 参数设置/协议管理
- {
- path: 'agreement',
- name: 'agreement',
- meta: {
- title: '协议管理',
- auth: true,
- parent:'参数设置',
- },
- component: _import('demo/parameManagement/agreement')
- },
- // 系统 前端日志
- {
- path: 'log',
- name: 'log',
- meta: {
- title: '前端日志',
- auth: true
- },
- component: _import('system/log')
- },
- // 刷新页面 必须保留
- {
- path: 'refresh',
- name: 'refresh',
- hidden: true,
- component: _import('system/function/refresh')
- },
- // 页面重定向 必须保留
- {
- path: 'redirect/:route*',
- name: 'redirect',
- hidden: true,
- component: _import('system/function/redirect')
- }
- ]
- }
- ]
- /**
- * 在主框架之外显示
- */
- const frameOut = [
- // { // 大屏首页
- // path: '/visualized',
- // name: 'visualized',
- // // meta: {
- // // auth: true
- // // },
- // component: _import('system/visualized')
- // },
- // 登录
- {
- path: '/login',
- name: 'login',
- component: _import('system/login')
- },
- //空白页
- {
- path: '/abc',
- name: 'Abc',
- meta: {
- auth: true
- },
- component: _import('system/abc')
- },
- ]
- /**
- * 错误页面
- */
- const errorPage = [
- {
- path: '*',
- name: '404',
- component: _import('system/error/404')
- }
- ]
- // 导出需要显示菜单的
- export const frameInRoutes = frameIn
- // 重新组织后导出
- export default [
- ...frameIn,
- ...frameOut,
- ...errorPage
- ]
|