routes.js 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436
  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. {
  104. path: '/projectGantt',
  105. component: projectGantt,
  106. name: '项目甘特图',
  107. hidden: true
  108. },
  109. {
  110. path: '/viewonline',
  111. component: PdfView,
  112. name: '',
  113. hidden: true
  114. },
  115. ];
  116. export const allRouters = [//组织架构
  117. //工时报告
  118. {
  119. path: '/',
  120. component: Home,
  121. name: '工时报告',
  122. iconCls: 'iconfont firerock-icontianbao1',
  123. leaf: true,
  124. children: [
  125. { path: '/daily', component: daily, name: '工时报告' },
  126. ]
  127. },
  128. // {
  129. // path: '/',
  130. // component: Home,
  131. // name: '自动计时',
  132. // iconCls: 'iconfont firerock-iconmiaobiao',
  133. // leaf: true,
  134. // children: [
  135. // { path: '/timer', component: timer, name: '自动计时' },
  136. // ]
  137. // },
  138. //工时审核
  139. {
  140. path: '/',
  141. component: Home,
  142. name: '专业审核',
  143. iconCls: 'iconfont firerock-iconshenhe',
  144. leaf: true,
  145. children: [
  146. { path: '/reviewProfession', component: reviewProfession, name: '专业审核' },
  147. ]
  148. },
  149. {
  150. path: '/',
  151. component: Home,
  152. name: '部门审核',
  153. iconCls: 'iconfont firerock-iconshenhe',
  154. leaf: true,
  155. children: [
  156. { path: '/reviewDepartment', component: reviewDepartment, name: '部门审核' },
  157. ]
  158. },
  159. {
  160. path: '/',
  161. component: Home,
  162. name: '项目报告审核',
  163. iconCls: 'iconfont firerock-iconshenhe',
  164. leaf: true,
  165. children: [
  166. { path: '/review', component: review, name: '项目报告审核' },
  167. ]
  168. },
  169. {
  170. path: '/',
  171. component: Home,
  172. name: '导入日报审核',
  173. iconCls: 'iconfont firerock-iconshenhe',
  174. leaf: true,
  175. children: [
  176. { path: '/reviewImport', component: reviewImport, name: '导入日报审核' },
  177. ]
  178. },
  179. //成本统计
  180. {
  181. path: '/',
  182. component: Home,
  183. name: '工时成本统计',
  184. iconCls: 'iconfont firerock-icontongji',
  185. leaf: true,
  186. children: [
  187. { path: '/cost', component: cost, name: '工时成本统计' },
  188. { path: '/cost/:id/:name', component: proDetail, name: '成本详情', hidden: true },
  189. { path: '/costDep/:id/:name', component: depDetail, name: '成本详情', hidden: true },
  190. ]
  191. },
  192. //自定义数值统计
  193. {
  194. path: '/',
  195. component: Home,
  196. name: '自定义数值统计',
  197. iconCls: 'iconfont firerock-icontongji',
  198. leaf: true,
  199. children: [
  200. { path: '/customData', component: customData, name: '自定义数值统计' }
  201. ]
  202. },
  203. //每月财务成本
  204. {
  205. path: '/',
  206. component: Home,
  207. name: '财务核算成本',
  208. iconCls: 'iconfont firerock-iconcaiwu',
  209. leaf: true,
  210. children: [
  211. { path: '/finance', component: finance, name: '财务核算成本' },
  212. ]
  213. },
  214. // 任务管理
  215. {
  216. path: '/',
  217. component: Home,
  218. name: '待办任务',
  219. iconCls: 'iconfont firerock-icondaibanshixiang',
  220. leaf: true,
  221. children: [
  222. { path: '/task', component: tasks, name: '待办任务' },
  223. ]
  224. },
  225. //项目管理
  226. {
  227. path: '/',
  228. component: Home,
  229. name: '项目管理',
  230. iconCls: 'iconfont firerock-iconxiangmu',
  231. leaf: true,
  232. children: [
  233. { path: '/list', component: list, name: '项目管理' },
  234. ]
  235. },
  236. {
  237. path: '/',
  238. component: Home,
  239. name: '项目报表服务',
  240. iconCls: 'iconfont firerock-iconbaobiao',
  241. leaf: true,
  242. children: [
  243. { path: '/corpreport', component: corpReport, name: '项目报表服务' }
  244. ]
  245. },
  246. {
  247. path: '/',
  248. component: Home,
  249. name: '请假管理',
  250. iconCls: 'iconfont firerock-iconwj-qjd',
  251. leaf: true,
  252. children: [
  253. { path: '/leave', component: leave, name: '请假管理' }
  254. ]
  255. },
  256. {
  257. path: '/',
  258. component: Home,
  259. name: '出差管理',
  260. iconCls: 'iconfont firerock-iconwj-qjd',
  261. leaf: true,
  262. children: [
  263. { path: '/awayOffice', component: awayOffice, name: '出差管理' }
  264. ]
  265. },
  266. {
  267. path: '/',
  268. component: Home,
  269. name: '客户管理',
  270. iconCls: 'iconfont firerock-iconkehu',
  271. leaf: true,
  272. children: [
  273. { path: '/customer', component: customer, name: '客户管理' }
  274. ]
  275. },
  276. {
  277. path: '/',
  278. component: Home,
  279. name: '工程专业管理',
  280. iconCls: 'iconfont firerock-iconjianzhugongchenglei',
  281. leaf: true,
  282. children: [
  283. { path: '/profession', component: profession, name: '工程专业管理' }
  284. ]
  285. },
  286. // 费用报销模块
  287. {
  288. path: '/',
  289. component: Home,
  290. name: '费用报销',
  291. iconCls: 'iconfont firerock-iconbaoxiao',
  292. leaf: true,
  293. children: [
  294. { path: '/expense', component: expense, name: '费用报销' }
  295. ]
  296. },
  297. {
  298. path: '/',
  299. component: Home,
  300. name: '研究中心管理',
  301. iconCls: 'iconfont firerock-icondaibanshixiang',
  302. leaf: true,//只有一个节点
  303. children: [
  304. { path: '/centerManage', component: centerManage, name: '研究中心管理' },
  305. ]
  306. },
  307. {
  308. path: '/',
  309. component: Home,
  310. name: '供应商管理',
  311. iconCls: 'iconfont firerock-iconzuzhijiagou1',
  312. leaf: true,//只有一个节点
  313. children: [
  314. { path: '/provider', component: provider, name: '供应商管理' },
  315. ]
  316. },
  317. {
  318. path: '/',
  319. component: Home,
  320. name: '组织架构',
  321. iconCls: 'iconfont firerock-iconzuzhijiagou1',
  322. leaf: true,//只有一个节点
  323. children: [
  324. { path: '/team', component: team, name: '组织架构' },
  325. ]
  326. },
  327. {
  328. path: '/',
  329. component: Home,
  330. name: '审批流设置',
  331. iconCls: 'iconfont firerock-iconliucheng',
  332. leaf: true,//只有一个节点
  333. children: [
  334. { path: '/workflow', component: workflow, name: '审批流设置' },
  335. ]
  336. },
  337. //设置时间类型
  338. // {
  339. // path: '/',
  340. // component: Home,
  341. // name: '',
  342. // iconCls: 'iconfont firerock-iconsetting',
  343. // leaf: true,//只有一个节点
  344. // children: [
  345. // { path: '/timetype', component: timetype, name: '系统基础设置' },
  346. // ]
  347. // },
  348. // {
  349. // path: '/',
  350. // component: Home,
  351. // name: '基础数据管理',
  352. // iconCls: 'iconfont firerock-iconsetting',
  353. // leaf: false,//只有一个节点
  354. // children: [
  355. // { path: '/timetype', component: infrastructure, name: '系统基础设置', iconCls: 'iconfont firerock-iconsetting' },
  356. // { path: '/quanx', component: quanx, name: '角色权限管理', iconCls: 'iconfont firerock-iconsetting' }
  357. // ]
  358. // },
  359. {
  360. path: '/',
  361. component: Home,
  362. name: '基础数据管理',
  363. iconCls: 'iconfont firerock-iconsetting',
  364. leaf: false,//只有一个节点
  365. children: [
  366. { path: '/timetype', component: timetype, name: '系统基础设置', iconCls: 'iconfont firerock-iconxitong-'},
  367. { path: '/role', component: quanx, name: '角色权限管理', iconCls: 'iconfont firerock-iconquanxian1' }
  368. ]
  369. },
  370. {
  371. path: '/404',
  372. component: NotFound,
  373. name: '',
  374. hidden: true
  375. },
  376. {
  377. path: '*',
  378. hidden: true,
  379. redirect: { path: '/404' }
  380. }
  381. ]
  382. export const simpleRouters = [
  383. //工时统计表
  384. {
  385. path: '/',
  386. component: Home,
  387. name: '',
  388. iconCls: 'iconfont firerock-icontianbao1',
  389. leaf: true,
  390. children: [
  391. { path: '/simple', component: simpleReport, name: '工时统计表' },
  392. ]
  393. },
  394. {
  395. path: '/404',
  396. component: NotFound,
  397. name: '',
  398. hidden: true
  399. },
  400. {
  401. path: '*',
  402. hidden: true,
  403. redirect: { path: '/404' }
  404. }
  405. ]
  406. export default new Router({
  407. routes: fixedRouter
  408. })