router.js 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. import Vue from 'vue'
  2. import Router from 'vue-router'
  3. Vue.use(Router)
  4. export default new Router({
  5. routes: [{
  6. path: '/login',
  7. name: 'login',
  8. component: () => import('./views/Login.vue'),
  9. show: 0
  10. },
  11. {
  12. path: '/',
  13. name: '概览',
  14. icon: 'el-icon-menu',
  15. component: () => import('./views/Home.vue'),
  16. show: 1,
  17. isLeaf: 1,
  18. children: [{
  19. path: '/',
  20. component: () => import('./views/Index.vue'),
  21. name: '系统首页'
  22. }, ]
  23. },
  24. {
  25. path: '/',
  26. name: '项目管理',
  27. icon: 'el-icon-menu',
  28. component: () => import('./views/Home.vue'),
  29. show: 1,
  30. isLeaf: 0,
  31. children: [{
  32. path: '/subject',
  33. component: () => import('./views/project/Index.vue'),
  34. name: '培训科目'
  35. }, ]
  36. },
  37. {
  38. path: '/',
  39. name: '报名信息',
  40. icon: 'el-icon-menu',
  41. component: () => import('./views/Home.vue'),
  42. show:1,
  43. isLeaf:0,
  44. children:[
  45. { path: '/new', component: () => import('./views/apply/New.vue'), name: '新办' },
  46. { path: '/update', component: () => import('./views/apply/Update.vue'), name: '复审' },
  47. { path: '/change', component: () => import('./views/apply/Change.vue'), name: '换证' },
  48. { path: '/sign/detail',hide:1, component: () => import('./views/apply/Detail.vue'), name: '修改' },
  49. { path: '/sign/edit',hide:1, component: () => import('./views/apply/Edit.vue'), name: '修改' },
  50. ]
  51. },
  52. {
  53. path: '/',
  54. name: '培训计划',
  55. icon: 'el-icon-menu',
  56. component: () => import('./views/Home.vue'),
  57. show: 1,
  58. isLeaf: 0,
  59. children: [{
  60. path: '/classes',
  61. component: () => import('./views/classes/Index.vue'),
  62. name: '班级管理'
  63. },
  64. {
  65. path: '/classes/add',
  66. hide:1,
  67. component: () => import('./views/classes/Add.vue'),
  68. name: '新增班级'
  69. },
  70. ]
  71. },
  72. {
  73. path: '/',
  74. name: '在线培训',
  75. icon: 'el-icon-menu',
  76. component: () => import('./views/Home.vue'),
  77. show: 1,
  78. isLeaf: 0,
  79. children: [{
  80. path: '/papers',
  81. component: () => import('./views/paper/Index.vue'),
  82. name: '试卷管理'
  83. },
  84. {
  85. path: '/videos',
  86. component: () => import('./views/videos/Index.vue'),
  87. name: '视频管理'
  88. },
  89. {
  90. path: '/videos/add',
  91. hide:1,
  92. component: () => import('./views/videos/Add.vue'),
  93. name: '新增视频'
  94. },
  95. ]
  96. },
  97. {
  98. path: '/',
  99. name: '用户管理',
  100. icon: 'el-icon-menu',
  101. component: () => import('./views/Home.vue'),
  102. show: 1,
  103. isLeaf: 0,
  104. children: [{
  105. path: '/user',
  106. component: () => import('./views/user/Index.vue'),
  107. name: '用户列表'
  108. }, ]
  109. },
  110. {
  111. path: '/content',
  112. name: '内容管理',
  113. icon: 'el-icon-menu',
  114. component: () => import('./views/Home.vue'),
  115. show: 1,
  116. isLeaf: 0,
  117. children: [{
  118. path: '/content',
  119. component: () => import('./views/content/Index.vue'),
  120. name: '栏目管理'
  121. },
  122. {
  123. path: '/article',
  124. component: () => import('./views/content/Article.vue'),
  125. name: '文章管理'
  126. },
  127. {
  128. path: '/addArticle',
  129. component: () => import('./views/content/addArticle.vue'),
  130. name: '新增文章'
  131. },
  132. ]
  133. },
  134. {
  135. path: '/system',
  136. name: '系统管理',
  137. icon: 'el-icon-menu',
  138. component: () => import('./views/Home.vue'),
  139. show: 1,
  140. isLeaf: 0,
  141. children: [{
  142. path: '/system',
  143. component: () => import('./views/system/Index.vue'),
  144. name: '账号管理'
  145. },
  146. {
  147. path: '/system/add',
  148. hide:1,
  149. component: () => import('./views/user/Add.vue'),
  150. name: '新增用户',
  151. },
  152. {
  153. path: '/system/addAccount',
  154. hide:1,
  155. component: () => import('./views/system/AddAccount.vue'),
  156. name: '新增账户'
  157. },
  158. ]
  159. }
  160. ]
  161. })