index_20190320163630.js 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. import Vue from 'vue';
  2. import Router from 'vue-router';
  3. Vue.use(Router);
  4. import Layout from '../pages/layout/Layout.vue';
  5. import Login from '../pages/login/index';
  6. // import Team from '../pages/team/index'
  7. export const pageRoter = [{
  8. path: '/',
  9. component: Login,
  10. redirect: '/login/index',
  11. // name: 'Team',
  12. // hidden: true,
  13. // children: [{
  14. // path: 'team',
  15. // component: {template:"<div>有机蔬菜organic</div>"}
  16. // }]
  17. },
  18. {
  19. path: '/team',
  20. component: Layout,
  21. children: [{
  22. path: 'index',
  23. name: 'Team',
  24. component: () => import('@/pages/team/index'),
  25. }]
  26. },
  27. {
  28. path: '/user',
  29. component: Layout,
  30. children: [{
  31. path: 'index',
  32. name: 'User',
  33. component: () => import('@/pages/user/index'),
  34. }]
  35. },
  36. {
  37. path: '/project',
  38. component: Layout,
  39. children: [{
  40. path: 'index',
  41. name: 'Project',
  42. component: () => import('@/pages/project/index'),
  43. }]
  44. },
  45. {
  46. path: '/product',
  47. component: Layout,
  48. children: [{
  49. path: 'index',
  50. name: 'Product',
  51. component: () => import('@/pages/product/index'),
  52. }]
  53. },
  54. {
  55. path: '/costType',
  56. component: Layout,
  57. children: [{
  58. path: 'index',
  59. name: 'CostType',
  60. component: () => import('@/pages/costType/index'),
  61. }]
  62. },
  63. {
  64. path: '/costTeam',
  65. component: Layout,
  66. children: [{
  67. path: 'index',
  68. name: 'CostTeam',
  69. component: () => import('@/pages/costTeam/index'),
  70. }]
  71. },
  72. {
  73. path: '/manage',
  74. component: Layout,
  75. children: [{
  76. path: 'index',
  77. name: 'Manage',
  78. component: () => import('@/pages/manage/index'),
  79. },
  80. {
  81. path: 'query',
  82. name: 'Manage',
  83. component: () => import('@/pages/manage/query'),
  84. }, {
  85. path: 'cost',
  86. name: 'Manage',
  87. component: () => import('@/pages/manage/cost'),
  88. }
  89. ]
  90. }
  91. ]
  92. export default new Router({
  93. // mode: 'history', //后端支持可开
  94. scrollBehavior: () => ({
  95. y: 0
  96. }),
  97. routes: pageRoter
  98. })