routes.js 16 KB

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