routes.js 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. import Login from './views/Login.vue'
  2. import NotFound from './views/404.vue'
  3. import Home from './views/Home.vue'
  4. import message from './views/message.vue'
  5. import invite from './views/invite.vue'
  6. import map from './views/map/map.vue'
  7. import detection from './views/detection/detection.vue'
  8. import maintenance from './views/detection/maintenance.vue'
  9. import project from './views/project/project.vue'
  10. import projectDetail from './views/project/projectDetail.vue'
  11. import staff from './views/project/staff.vue'
  12. import competence from './views/project/competence.vue'
  13. import moldList from './views/mold/moldList.vue'
  14. import moldDetail from './views/mold/moldDetail.vue'
  15. import moldDownload from './views/mold/moldDownload.vue'
  16. import comp from './views/base/comp.vue'
  17. import factory from './views/base/factory.vue'
  18. import allocation from './views/base/allocation.vue'
  19. import i18n from './i18n/i18n';
  20. var navigation = {};
  21. // if(i18n.locale == "en-US") {
  22. // navigation = require('./i18n/lang/en').default.navigation;
  23. // } else {
  24. // navigation = require('./i18n/lang/zh').default.navigation;
  25. // }
  26. let routes = [
  27. {
  28. path: '/login',
  29. component: Login,
  30. name: '',
  31. hidden: true
  32. },
  33. //地图概览
  34. {
  35. path: '/',
  36. component: Home,
  37. name: '',
  38. iconCls: 'iconfont icon-ditu',
  39. leaf: true,//只有一个节点
  40. children: [
  41. { path: '/map', component: map, name: "navigation.map" },
  42. { path: '/message', component: message, name: "navigation.msg", hidden: true }
  43. ]
  44. },
  45. //运行监测
  46. {
  47. path: '/',
  48. component: Home,
  49. name: '',
  50. iconCls: 'iconfont icon-jiance',
  51. leaf: true,//只有一个节点
  52. children: [
  53. { path: '/detection', component: detection, name: "navigation.test" },
  54. { path: '/detection/:id', component: maintenance, name: '运行检测详情', hidden: true }
  55. ]
  56. },
  57. //项目管理
  58. {
  59. path: '/',
  60. component: Home,
  61. name: "navigation.pro",
  62. iconCls: 'iconfont icon-ic_dashboard',
  63. children: [
  64. { path: '/project', component: project, name: "navigation.proList" },
  65. { path: '/project/:id', component: projectDetail, name: '项目详情', hidden: true },
  66. { path: '/staff', component: staff, name: "navigation.staff" },
  67. { path: '/competence', component: competence, name: "navigation.power" }
  68. ]
  69. },
  70. //模具管理
  71. {
  72. path: '/',
  73. component: Home,
  74. name: "navigation.mold",
  75. iconCls: 'iconfont icon-moxing',
  76. children: [
  77. { path: '/moldList', component: moldList, name: "navigation.moldList" },
  78. { path: '/moldList/:id/:type', component: moldDetail, name: '模具详情', hidden: true },
  79. { path: '/moldDownload', component: moldDownload, name: "navigation.moldDown" }
  80. ]
  81. },
  82. //基础管理
  83. {
  84. path: '/',
  85. component: Home,
  86. name: "navigation.base",
  87. iconCls: 'iconfont icon-setting-fill',
  88. children: [
  89. { path: '/comp', component: comp, name: "navigation.asset" },
  90. { path: '/factory', component: factory, name: "navigation.producer" },
  91. { path: '/allocation', component: allocation, name: "navigation.device" }
  92. ]
  93. },
  94. //邀请
  95. {
  96. path: '/invite/:inviteeId/:projectId/:operatorId',
  97. component: invite,
  98. name: '邀请',
  99. hidden: true
  100. },
  101. {
  102. path: '/404',
  103. component: NotFound,
  104. name: '',
  105. hidden: true
  106. },
  107. {
  108. path: '*',
  109. hidden: true,
  110. redirect: { path: '/404' }
  111. }
  112. ];
  113. export default routes;