router.js 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. import Vue from 'vue'
  2. import VueRouter from 'vue-router'
  3. Vue.use(VueRouter)
  4. // const login = resolve => require(['../views/login.vue'], resolve);
  5. const login = () => import('./views/login.vue');
  6. const dashboard = () => import('./views/dashboard.vue');
  7. const projectManagement = () => import('./views/projectManagement.vue');
  8. const GIS = () => import('./views/GISMap.vue');
  9. const userManagement = () => import('./views/userManagement.vue');
  10. const alarmMaintenance = () => import('./views/alarmMaintenance/alarmMaintenance.vue');
  11. const maintenanceRecord = () => import('./views/alarmMaintenance/maintenanceRecord.vue');
  12. const repairPersonnel = () => import('./views/alarmMaintenance/repairPersonnel.vue');
  13. const streetLightInformation = () => import('./views/alarmMaintenance/streetLightInformation.vue');
  14. const historicalData = () => import('./views/historicalData/historicalData.vue');
  15. const operationLog = () => import('./views/operationLog/operationLog.vue');
  16. const companyManagement = () => import('./views/companyManagement.vue');
  17. const routes = [
  18. {
  19. path: '/',
  20. component: dashboard,
  21. },
  22. {
  23. path: '/login',
  24. name: 'login',
  25. component: login
  26. },
  27. {
  28. path: '/dashboard',
  29. name: 'dashboard',
  30. component: dashboard
  31. },
  32. {
  33. path: '/projectManagement',
  34. name: 'projectManagement',
  35. component: projectManagement
  36. },
  37. {
  38. path: '/GIS',
  39. name: 'GIS',
  40. component: GIS
  41. },
  42. {
  43. path: '/userManagement',
  44. name: 'userManagement',
  45. component: userManagement
  46. },
  47. {
  48. path: '/alarmMaintenance',
  49. name: 'alarmMaintenance',
  50. component: alarmMaintenance
  51. },
  52. {
  53. path: '/maintenanceRecord',
  54. name: 'maintenanceRecord',
  55. component: maintenanceRecord
  56. },
  57. {
  58. path: '/repairPersonnel',
  59. name: 'repairPersonnel',
  60. component: repairPersonnel
  61. },
  62. {
  63. path: '/streetLightInformation',
  64. name: 'streetLightInformation',
  65. component: streetLightInformation
  66. },
  67. {
  68. path: '/historicalData',
  69. name: 'historicalData',
  70. component: historicalData
  71. },
  72. {
  73. path: '/operationLog',
  74. name: 'operationLog',
  75. component: operationLog
  76. },
  77. {
  78. path: '/companyManagement',
  79. name: 'companyManagement',
  80. component: companyManagement
  81. },
  82. ]
  83. const router = new VueRouter({
  84. mode: 'hash',
  85. base: process.env.BASE_URL,
  86. routes
  87. })
  88. export default router