routes.js 14 KB

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