routes.js 15 KB

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