index_20190320160313.js 2.2 KB

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