routes.js 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455
  1. import Vue from 'vue'
  2. import Router from 'vue-router'
  3. import Login from './views/Login.vue'
  4. import Register from './views/Register.vue'
  5. import NotFound from './views/404.vue'
  6. import Home from './views/Home.vue'
  7. // new router
  8. // 今日桌面
  9. import desktop from './views/desktop'
  10. import desktopDetail from './views/desktop/detail.vue'
  11. import unusual from './views/desktop/unusual.vue'
  12. // 工作报告
  13. import statistics from './views/workReport/statistics.vue'
  14. import daily from './views/workReport/daily.vue'
  15. import review from './views/workReport/list.vue'
  16. import reviewImport from './views/workReport/list_import.vue'
  17. import timer from './views/workReport/timer.vue'
  18. import reviewProfession from './views/workReport/list_profession.vue'
  19. import reviewDepartment from './views/workReport/list_department.vue'
  20. // 项目管理
  21. import list from './views/project/list.vue'
  22. import cost from './views/project/cost.vue'
  23. import proDetail from './views/project/detail.vue'
  24. import depDetail from './views/project/detailDep.vue'
  25. import task from './views/task/list.vue'
  26. import projectInside from './views/project/projectInside.vue'
  27. import info from './views/project/info.vue'
  28. import projectGantt from './views/project/project_gantt.vue'
  29. // 团队管理
  30. import team from './views/team/index.vue'
  31. // 系统设置
  32. import timetype from './views/settings/timetype.vue';
  33. import role from './views/role/role';
  34. import finance from './views/project/finance';
  35. import Market from './views/market/list';
  36. import PdfView from './views/pdf/pdfview';
  37. // 费用报销
  38. import expense from './views/expense/expense';
  39. //客户管理
  40. import customer from './views/customer/list';
  41. //专业管理
  42. import profession from './views/profession/list';
  43. //企业报表
  44. import corpReport from './views/corpreport/list';
  45. //审批流程
  46. import workflow from './views/workflow/report';
  47. // 权限管理
  48. // import jurisdiction from './views/jurisdiction/jurisdiction'
  49. //简易工时统计表
  50. import simpleReport from './views/simplereport/list';
  51. // 任务管理
  52. import tasks from './views/task/list';
  53. // 请假
  54. import leave from './views/leave/list';
  55. import customData from './views/project/custom_data';
  56. // 出差
  57. import awayOffice from './views/awayOffice/awayOffice';
  58. // 研究中心
  59. // import research from './views/research/list';
  60. // 角色权限
  61. import quanx from './views/quanx/quanx'
  62. // 研究中心管理
  63. import centerManage from './views/centerManage/centerManage'
  64. // 供应商模块
  65. import provider from './views/provider/provider'
  66. Vue.use(Router)
  67. export const fixedRouter = [
  68. {
  69. path: '/login',
  70. component: Login,
  71. name: '',
  72. hidden: true
  73. },
  74. {
  75. path: '/register',
  76. component: Register,
  77. name: '',
  78. hidden: true
  79. },
  80. {
  81. path: '/market',
  82. component: Market,
  83. name: '',
  84. hidden: true
  85. },
  86. //tab页签切换
  87. {
  88. path: '/',
  89. component: Home,
  90. name: '项目管理',
  91. iconCls: 'fa fa-sticky-note',
  92. hidden:true,
  93. leaf: true,
  94. children: [
  95. { path: 'projectInside/:id', component: projectInside, name: '任务看板' },
  96. { path: 'files/:id', component: projectInside, name: '文件中心' },
  97. { path: 'info/:id', component: projectInside, name: '项目概览' },
  98. { path: 'summary/:id', component: projectInside, name: '数据统计' },
  99. { path: 'costbaseline/:id', component: projectInside, name: '成本管理' },
  100. { path: 'earning/:id', component: projectInside, name: '挣值分析' },
  101. ],
  102. // 其他信息
  103. meta: { text: 'navigation.projectManagement' }
  104. },
  105. {
  106. path: '/projectGantt',
  107. component: projectGantt,
  108. name: '项目甘特图',
  109. hidden: true
  110. },
  111. {
  112. path: '/viewonline',
  113. component: PdfView,
  114. name: '',
  115. hidden: true
  116. },
  117. ];
  118. export const allRouters = [//组织架构
  119. //工时报告
  120. {
  121. path: '/',
  122. component: Home,
  123. name: '工时报告',
  124. text: 'navigation.reports',
  125. iconCls: 'iconfont firerock-icontianbao1',
  126. leaf: true,
  127. children: [
  128. { path: '/daily', component: daily, name: '工时报告' },
  129. ],
  130. // 其他信息
  131. meta: { text: 'reports' }
  132. },
  133. // {
  134. // path: '/',
  135. // component: Home,
  136. // name: '自动计时',
  137. // iconCls: 'iconfont firerock-iconmiaobiao',
  138. // leaf: true,
  139. // children: [
  140. // { path: '/timer', component: timer, name: '自动计时' },
  141. // ]
  142. // },
  143. //工时审核
  144. {
  145. path: '/',
  146. component: Home,
  147. name: '专业审核',
  148. iconCls: 'iconfont firerock-iconshenhe',
  149. leaf: true,
  150. children: [
  151. { path: '/reviewProfession', component: reviewProfession, name: '专业审核' },
  152. ],
  153. // 其他信息
  154. meta: { text: 'navigation.professionalAudit' }
  155. },
  156. {
  157. path: '/',
  158. component: Home,
  159. name: '部门审核',
  160. iconCls: 'iconfont firerock-iconshenhe',
  161. leaf: true,
  162. children: [
  163. { path: '/reviewDepartment', component: reviewDepartment, name: '部门审核' },
  164. ],
  165. // 其他信息
  166. meta: { text: 'navigation.departmentAudit' }
  167. },
  168. {
  169. path: '/',
  170. component: Home,
  171. name: '项目报告审核',
  172. iconCls: 'iconfont firerock-iconshenhe',
  173. leaf: true,
  174. children: [
  175. { path: '/review', component: review, name: '项目报告审核' },
  176. ],
  177. // 其他信息
  178. meta: { text: 'navigation.projectReportReview' }
  179. },
  180. {
  181. path: '/',
  182. component: Home,
  183. name: '导入日报审核',
  184. iconCls: 'iconfont firerock-iconshenhe',
  185. leaf: true,
  186. children: [
  187. { path: '/reviewImport', component: reviewImport, name: '导入日报审核' },
  188. ],
  189. // 其他信息
  190. meta: { text: 'navigation.ImportDailyReview' }
  191. },
  192. //成本统计
  193. {
  194. path: '/',
  195. component: Home,
  196. name: '工时成本统计',
  197. iconCls: 'iconfont firerock-icontongji',
  198. leaf: true,
  199. children: [
  200. { path: '/cost', component: cost, name: '工时成本统计' },
  201. { path: '/cost/:id/:name', component: proDetail, name: '成本详情', hidden: true },
  202. { path: '/costDep/:id/:name', component: depDetail, name: '成本详情', hidden: true },
  203. ],
  204. // 其他信息
  205. meta: { text: 'navigation.laborCostStatistics' }
  206. },
  207. //自定义数值统计
  208. {
  209. path: '/',
  210. component: Home,
  211. name: '自定义数值统计',
  212. iconCls: 'iconfont firerock-icontongji',
  213. leaf: true,
  214. children: [
  215. { path: '/customData', component: customData, name: '自定义数值统计' }
  216. ],
  217. // 其他信息
  218. meta: { text: 'navigation.customizeNumericalStatistics' }
  219. },
  220. //每月财务成本
  221. {
  222. path: '/',
  223. component: Home,
  224. name: '财务核算成本',
  225. iconCls: 'iconfont firerock-iconcaiwu',
  226. leaf: true,
  227. children: [
  228. { path: '/finance', component: finance, name: '财务核算成本' },
  229. ],
  230. // 其他信息
  231. meta: { text: 'navigation.financialAccountingCost' }
  232. },
  233. // 任务管理
  234. {
  235. path: '/',
  236. component: Home,
  237. name: '待办任务',
  238. iconCls: 'iconfont firerock-icondaibanshixiang',
  239. leaf: true,
  240. children: [
  241. { path: '/task', component: tasks, name: '待办任务' },
  242. ]
  243. },
  244. //项目管理
  245. {
  246. path: '/',
  247. component: Home,
  248. name: '项目管理',
  249. iconCls: 'iconfont firerock-iconxiangmu',
  250. leaf: true,
  251. children: [
  252. { path: '/list', component: list, name: '项目管理' },
  253. ]
  254. },
  255. {
  256. path: '/',
  257. component: Home,
  258. name: '项目报表服务',
  259. iconCls: 'iconfont firerock-iconbaobiao',
  260. leaf: true,
  261. children: [
  262. { path: '/corpreport', component: corpReport, name: '项目报表服务' }
  263. ]
  264. },
  265. {
  266. path: '/',
  267. component: Home,
  268. name: '请假管理',
  269. iconCls: 'iconfont firerock-iconwj-qjd',
  270. leaf: true,
  271. children: [
  272. { path: '/leave', component: leave, name: '请假管理' }
  273. ]
  274. },
  275. {
  276. path: '/',
  277. component: Home,
  278. name: '出差管理',
  279. iconCls: 'iconfont firerock-iconwj-qjd',
  280. leaf: true,
  281. children: [
  282. { path: '/awayOffice', component: awayOffice, name: '出差管理' }
  283. ]
  284. },
  285. {
  286. path: '/',
  287. component: Home,
  288. name: '客户管理',
  289. iconCls: 'iconfont firerock-iconkehu',
  290. leaf: true,
  291. children: [
  292. { path: '/customer', component: customer, name: '客户管理' }
  293. ]
  294. },
  295. {
  296. path: '/',
  297. component: Home,
  298. name: '工程专业管理',
  299. iconCls: 'iconfont firerock-iconjianzhugongchenglei',
  300. leaf: true,
  301. children: [
  302. { path: '/profession', component: profession, name: '工程专业管理' }
  303. ]
  304. },
  305. // 费用报销模块
  306. {
  307. path: '/',
  308. component: Home,
  309. name: '费用报销',
  310. iconCls: 'iconfont firerock-iconbaoxiao',
  311. leaf: true,
  312. children: [
  313. { path: '/expense', component: expense, name: '费用报销' }
  314. ]
  315. },
  316. {
  317. path: '/',
  318. component: Home,
  319. name: '研究中心管理',
  320. iconCls: 'iconfont firerock-icondaibanshixiang',
  321. leaf: true,//只有一个节点
  322. children: [
  323. { path: '/centerManage', component: centerManage, name: '研究中心管理' },
  324. ]
  325. },
  326. {
  327. path: '/',
  328. component: Home,
  329. name: '供应商管理',
  330. iconCls: 'iconfont firerock-iconzuzhijiagou1',
  331. leaf: true,//只有一个节点
  332. children: [
  333. { path: '/provider', component: provider, name: '供应商管理' },
  334. ]
  335. },
  336. {
  337. path: '/',
  338. component: Home,
  339. name: '组织架构',
  340. iconCls: 'iconfont firerock-iconzuzhijiagou1',
  341. leaf: true,//只有一个节点
  342. children: [
  343. { path: '/team', component: team, name: '组织架构' },
  344. ]
  345. },
  346. {
  347. path: '/',
  348. component: Home,
  349. name: '审批流设置',
  350. iconCls: 'iconfont firerock-iconliucheng',
  351. leaf: true,//只有一个节点
  352. children: [
  353. { path: '/workflow', component: workflow, name: '审批流设置' },
  354. ]
  355. },
  356. //设置时间类型
  357. // {
  358. // path: '/',
  359. // component: Home,
  360. // name: '',
  361. // iconCls: 'iconfont firerock-iconsetting',
  362. // leaf: true,//只有一个节点
  363. // children: [
  364. // { path: '/timetype', component: timetype, name: '系统基础设置' },
  365. // ]
  366. // },
  367. // {
  368. // path: '/',
  369. // component: Home,
  370. // name: '基础数据管理',
  371. // iconCls: 'iconfont firerock-iconsetting',
  372. // leaf: false,//只有一个节点
  373. // children: [
  374. // { path: '/timetype', component: infrastructure, name: '系统基础设置', iconCls: 'iconfont firerock-iconsetting' },
  375. // { path: '/quanx', component: quanx, name: '角色权限管理', iconCls: 'iconfont firerock-iconsetting' }
  376. // ]
  377. // },
  378. {
  379. path: '/',
  380. component: Home,
  381. name: '基础数据管理',
  382. iconCls: 'iconfont firerock-iconsetting',
  383. leaf: false,//只有一个节点
  384. children: [
  385. { path: '/timetype', component: timetype, name: '系统基础设置', iconCls: 'iconfont firerock-iconxitong-'},
  386. { path: '/role', component: quanx, name: '角色权限管理', iconCls: 'iconfont firerock-iconquanxian1' }
  387. ]
  388. },
  389. {
  390. path: '/404',
  391. component: NotFound,
  392. name: '',
  393. hidden: true
  394. },
  395. {
  396. path: '*',
  397. hidden: true,
  398. redirect: { path: '/404' }
  399. }
  400. ]
  401. export const simpleRouters = [
  402. //工时统计表
  403. {
  404. path: '/',
  405. component: Home,
  406. name: '',
  407. iconCls: 'iconfont firerock-icontianbao1',
  408. leaf: true,
  409. children: [
  410. { path: '/simple', component: simpleReport, name: '工时统计表' },
  411. ]
  412. },
  413. {
  414. path: '/404',
  415. component: NotFound,
  416. name: '',
  417. hidden: true
  418. },
  419. {
  420. path: '*',
  421. hidden: true,
  422. redirect: { path: '/404' }
  423. }
  424. ]
  425. export default new Router({
  426. routes: fixedRouter
  427. })