routes.js 14 KB

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