routes.js 17 KB

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