routes.js 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. import Vue from 'vue'
  2. import Router from 'vue-router'
  3. import Login from './views/Login.vue'
  4. import Expire from './views/Expire.vue'
  5. import Register from './views/Register.vue'
  6. import NotFound from './views/404.vue'
  7. import Home from './views/Home.vue'
  8. // 工作报告
  9. import daily from './views/workReport/daily.vue'
  10. // 项目管理
  11. import list from './views/project/list.vue'
  12. import cost from './views/project/cost.vue'
  13. import proDetail from './views/project/detail.vue'
  14. import depDetail from './views/project/detailDep.vue'
  15. import projectInside from './views/project/projectInside.vue'
  16. // 团队管理
  17. import team from './views/team/index.vue'
  18. // 系统设置
  19. import timetype from './views/settings/timetype.vue';
  20. //企业报表
  21. import corpReport from './views/corpreport/list';
  22. // 任务管理
  23. import tasks from './views/task/list';
  24. // 角色权限
  25. import quanx from './views/quanx/quanx'
  26. // 项目表单设置
  27. import projectForm from './views/project/projectForm'
  28. Vue.use(Router)
  29. export const fixedRouter = [
  30. {
  31. path: '/login',
  32. component: Login,
  33. name: '',
  34. hidden: true
  35. },
  36. {
  37. path: '/expire',
  38. component: Expire,
  39. name: '',
  40. hidden: true
  41. },
  42. {
  43. path: '/register',
  44. component: Register,
  45. name: '',
  46. hidden: true
  47. },
  48. //tab页签切换
  49. {
  50. path: '/',
  51. component: Home,
  52. name: '项目管理',
  53. iconCls: 'fa fa-sticky-note',
  54. hidden:true,
  55. leaf: true,
  56. children: [
  57. { path: 'projectInside/:id', component: projectInside, name: '任务看板' },
  58. { path: 'info/:id', component: projectInside, name: '项目概览' },
  59. ],
  60. // 其他信息
  61. meta: { text: 'navigation.projectManagement' }
  62. },
  63. ];
  64. export const allRouters = [//组织架构
  65. //工时报告
  66. {
  67. path: '/',
  68. component: Home,
  69. name: '工时报告',
  70. text: 'navigation.reports',
  71. iconCls: 'iconfont firerock-icontianbao1',
  72. leaf: true,
  73. children: [
  74. { path: '/daily', component: daily, name: '工时报告' },
  75. ],
  76. // 其他信息
  77. meta: { text: 'navigation.reports' }
  78. },
  79. //成本统计
  80. {
  81. path: '/',
  82. component: Home,
  83. name: '工时成本统计',
  84. iconCls: 'iconfont firerock-icontongji',
  85. leaf: true,
  86. children: [
  87. { path: '/cost', component: cost, name: '工时成本统计' },
  88. { path: '/cost/:id/:name', component: proDetail, name: '成本详情', hidden: true },
  89. { path: '/costDep/:id/:name', component: depDetail, name: '成本详情', hidden: true },
  90. ],
  91. // 其他信息
  92. meta: { text: 'navigation.laborCostStatistics' }
  93. },
  94. // 任务管理
  95. {
  96. path: '/',
  97. component: Home,
  98. name: '待办任务',
  99. iconCls: 'iconfont firerock-icondaibanshixiang',
  100. leaf: true,
  101. children: [
  102. { path: '/task', component: tasks, name: '待办任务' },
  103. ],
  104. // 其他信息
  105. meta: { text: 'navigation.upcomingTasks' }
  106. },
  107. //项目管理
  108. {
  109. path: '/',
  110. component: Home,
  111. name: '项目管理',
  112. iconCls: 'iconfont firerock-iconxiangmu',
  113. leaf: true,
  114. children: [
  115. { path: '/list', component: list, name: '项目管理' },
  116. ],
  117. // 其他信息
  118. meta: { text: 'navigation.projectManagement' }
  119. },
  120. {
  121. path: '/',
  122. component: Home,
  123. name: '项目报表服务',
  124. iconCls: 'iconfont firerock-iconbaobiao',
  125. leaf: true,
  126. children: [
  127. { path: '/corpreport', component: corpReport, name: '项目报表服务' }
  128. ],
  129. // 其他信息
  130. meta: { text: 'navigation.projectReportingService' }
  131. },
  132. {
  133. path: '/',
  134. component: Home,
  135. name: '组织架构',
  136. iconCls: 'iconfont firerock-iconzuzhijiagou1',
  137. leaf: true,//只有一个节点
  138. children: [
  139. { path: '/team', component: team, name: '组织架构' },
  140. ],
  141. // 其他信息
  142. meta: { text: 'navigation.organizationalStructure' }
  143. },
  144. {
  145. path: '/',
  146. component: Home,
  147. name: '基础数据管理',
  148. iconCls: 'iconfont firerock-iconsetting',
  149. leaf: false,//只有一个节点
  150. children: [
  151. { path: '/timetype', component: timetype, name: '系统基础设置', iconCls: 'iconfont firerock-iconxitong-', meta: { text: 'navigation.basicSystemSettings' }},
  152. { path: '/role', component: quanx, name: '角色权限管理', iconCls: 'iconfont firerock-iconquanxian1', meta: { text: 'navigation.roleRightsManagement' } },
  153. { path: '/projectForm', component: projectForm, name: '项目表单设置', iconCls: 'iconfont firerock-iconquanxian1', meta: { text: 'navigation.projectFormSettings' } },
  154. ],
  155. // 其他信息
  156. meta: { text: 'navigation.basicDataManagement' }
  157. },
  158. {
  159. path: '/404',
  160. component: NotFound,
  161. name: '',
  162. hidden: true
  163. },
  164. {
  165. path: '*',
  166. hidden: true,
  167. redirect: { path: '/404' }
  168. }
  169. ]
  170. export default new Router({
  171. routes: fixedRouter
  172. })