routes.js 16 KB

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