routes.js 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290
  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. import review from './views/workReport/list.vue'
  11. import reviewImport from './views/workReport/list_import.vue'
  12. import reviewProfession from './views/workReport/list_profession.vue'
  13. import reviewDepartment from './views/workReport/list_department.vue'
  14. // 项目管理
  15. import list from './views/project/list.vue'
  16. import cost from './views/project/cost.vue'
  17. import proDetail from './views/project/detail.vue'
  18. import depDetail from './views/project/detailDep.vue'
  19. import projectInside from './views/project/projectInside.vue'
  20. import info from './views/project/info.vue'
  21. import projectGantt from './views/project/project_gantt.vue'
  22. // 团队管理
  23. import team from './views/team/index.vue'
  24. // 系统设置
  25. import timetype from './views/settings/timetype.vue';
  26. import role from './views/role/role';
  27. import finance from './views/project/finance';
  28. import PdfView from './views/pdf/pdfview';
  29. // 费用报销
  30. import expense from './views/expense/expense';
  31. //客户管理
  32. import customer from './views/customer/list';
  33. //企业报表
  34. import corpReport from './views/corpreport/list';
  35. import customData from './views/project/custom_data';
  36. // 角色权限
  37. import quanx from './views/quanx/quanx'
  38. // 研究中心管理
  39. import centerManage from './views/centerManage/centerManage'
  40. // 项目表单设置
  41. import projectForm from './views/project/projectForm'
  42. // 日报表单设置
  43. import reportForm from './views/corpreport/reportForm'
  44. Vue.use(Router)
  45. export const fixedRouter = [
  46. {
  47. path: '/login',
  48. component: Login,
  49. name: '',
  50. hidden: true
  51. },
  52. {
  53. path: '/expire',
  54. component: Expire,
  55. name: '',
  56. hidden: true
  57. },
  58. {
  59. path: '/register',
  60. component: Register,
  61. name: '',
  62. hidden: true
  63. },
  64. //tab页签切换
  65. {
  66. path: '/',
  67. component: Home,
  68. name: '项目管理',
  69. iconCls: 'fa fa-sticky-note',
  70. hidden:true,
  71. leaf: true,
  72. children: [
  73. { path: 'projectInside/:id', component: projectInside, name: '任务看板' },
  74. { path: 'files/:id', component: projectInside, name: '文件中心' },
  75. { path: 'info/:id', component: projectInside, name: '项目概览' },
  76. { path: 'summary/:id', component: projectInside, name: '数据统计' },
  77. { path: 'costbaseline/:id', component: projectInside, name: '成本管理' },
  78. ],
  79. // 其他信息
  80. meta: { text: 'navigation.projectManagement' }
  81. },
  82. {
  83. path: '/projectGantt',
  84. component: projectGantt,
  85. name: '项目甘特图',
  86. hidden: true
  87. },
  88. {
  89. path: '/viewonline',
  90. component: PdfView,
  91. name: '',
  92. hidden: true
  93. },
  94. ];
  95. export const allRouters = [//组织架构
  96. //工时报告
  97. {
  98. path: '/',
  99. component: Home,
  100. name: '工时报告',
  101. text: 'navigation.reports',
  102. iconCls: 'iconfont firerock-icontianbao1',
  103. leaf: true,
  104. children: [
  105. { path: '/daily', component: daily, name: '工时报告' },
  106. ],
  107. // 其他信息
  108. meta: { text: 'navigation.reports' }
  109. },
  110. {
  111. path: '/',
  112. component: Home,
  113. name: '导入日报审核',
  114. iconCls: 'iconfont firerock-iconshenhe',
  115. leaf: true,
  116. children: [
  117. { path: '/reviewImport', component: reviewImport, name: '导入日报审核' },
  118. ],
  119. // 其他信息
  120. meta: { text: 'navigation.ImportDailyReview' }
  121. },
  122. //成本统计
  123. {
  124. path: '/',
  125. component: Home,
  126. name: '工时成本统计',
  127. iconCls: 'iconfont firerock-icontongji',
  128. leaf: true,
  129. children: [
  130. { path: '/cost', component: cost, name: '工时成本统计' },
  131. { path: '/cost/:id/:name', component: proDetail, name: '成本详情', hidden: true },
  132. { path: '/costDep/:id/:name', component: depDetail, name: '成本详情', hidden: true },
  133. ],
  134. // 其他信息
  135. meta: { text: 'navigation.laborCostStatistics' }
  136. },
  137. //自定义数值统计
  138. {
  139. path: '/',
  140. component: Home,
  141. name: '自定义数值统计',
  142. iconCls: 'iconfont firerock-icontongji',
  143. leaf: true,
  144. children: [
  145. { path: '/customData', component: customData, name: '自定义数值统计' }
  146. ],
  147. // 其他信息
  148. meta: { text: 'navigation.customizeNumericalStatistics' }
  149. },
  150. //每月财务成本
  151. {
  152. path: '/',
  153. component: Home,
  154. name: '财务核算成本',
  155. iconCls: 'iconfont firerock-iconcaiwu',
  156. leaf: true,
  157. children: [
  158. { path: '/finance', component: finance, name: '财务核算成本' },
  159. ],
  160. // 其他信息
  161. meta: { text: 'navigation.financialAccountingCost' }
  162. },
  163. //项目管理
  164. {
  165. path: '/',
  166. component: Home,
  167. name: '项目管理',
  168. iconCls: 'iconfont firerock-iconxiangmu',
  169. leaf: true,
  170. children: [
  171. { path: '/list', component: list, name: '项目管理' },
  172. ],
  173. // 其他信息
  174. meta: { text: 'navigation.projectManagement' }
  175. },
  176. {
  177. path: '/',
  178. component: Home,
  179. name: '项目报表服务',
  180. iconCls: 'iconfont firerock-iconbaobiao',
  181. leaf: true,
  182. children: [
  183. { path: '/corpreport', component: corpReport, name: '项目报表服务' }
  184. ],
  185. // 其他信息
  186. meta: { text: 'navigation.projectReportingService' }
  187. },
  188. {
  189. path: '/',
  190. component: Home,
  191. name: '客户管理',
  192. iconCls: 'iconfont firerock-iconkehu',
  193. leaf: true,
  194. children: [
  195. { path: '/customer', component: customer, name: '客户管理' }
  196. ],
  197. // 其他信息
  198. meta: { text: 'navigation.customerManagement' }
  199. },
  200. // 费用报销模块
  201. {
  202. path: '/',
  203. component: Home,
  204. name: '费用报销',
  205. iconCls: 'iconfont firerock-iconbaoxiao',
  206. leaf: true,
  207. children: [
  208. { path: '/expense', component: expense, name: '费用报销' }
  209. ],
  210. // 其他信息
  211. meta: { text: 'navigation.reimbursement' }
  212. },
  213. {
  214. path: '/',
  215. component: Home,
  216. name: '研究中心管理',
  217. iconCls: 'iconfont firerock-icondaibanshixiang',
  218. leaf: true,//只有一个节点
  219. children: [
  220. { path: '/centerManage', component: centerManage, name: '研究中心管理' },
  221. ],
  222. // 其他信息
  223. meta: { text: 'navigation.researchCenterManagement' }
  224. },
  225. {
  226. path: '/',
  227. component: Home,
  228. name: '组织架构',
  229. iconCls: 'iconfont firerock-iconzuzhijiagou1',
  230. leaf: true,//只有一个节点
  231. children: [
  232. { path: '/team', component: team, name: '组织架构' },
  233. ],
  234. // 其他信息
  235. meta: { text: 'navigation.organizationalStructure' }
  236. },
  237. {
  238. path: '/',
  239. component: Home,
  240. name: '基础数据管理',
  241. iconCls: 'iconfont firerock-iconsetting',
  242. leaf: false,//只有一个节点
  243. children: [
  244. { path: '/timetype', component: timetype, name: '系统基础设置', iconCls: 'iconfont firerock-iconxitong-', meta: { text: 'navigation.basicSystemSettings' }},
  245. { path: '/role', component: quanx, name: '角色权限管理', iconCls: 'iconfont firerock-iconquanxian1', meta: { text: 'navigation.roleRightsManagement' } },
  246. { path: '/projectForm', component: projectForm, name: '项目表单设置', iconCls: 'iconfont firerock-iconquanxian1', meta: { text: 'navigation.projectFormSettings' } },
  247. { path: '/reportForm', component: reportForm, name: '日报表单设置', iconCls: 'iconfont firerock-iconquanxian1', meta: { text: 'navigation.reportFormSettings' } },
  248. ],
  249. // 其他信息
  250. meta: { text: 'navigation.basicDataManagement' }
  251. },
  252. {
  253. path: '/404',
  254. component: NotFound,
  255. name: '',
  256. hidden: true
  257. },
  258. {
  259. path: '*',
  260. hidden: true,
  261. redirect: { path: '/404' }
  262. }
  263. ]
  264. export default new Router({
  265. routes: fixedRouter
  266. })