routes.js 16 KB

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