routes.js 15 KB

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