routes.js 17 KB

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