routes.js 14 KB

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