router.js 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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 notificationSetting = () => import('./views/alarmMaintenance/notificationSetting.vue');
  15. const maintenanceStaff = () => import('./views/alarmMaintenance/maintenanceStaff.vue');
  16. const historicalData = () => import('./views/historicalData/historicalData.vue');
  17. const operationLog = () => import('./views/operationLog/operationLog.vue');
  18. const companyManagement = () => import('./views/companyManagement.vue');
  19. const routes = [
  20. {
  21. path: '/',
  22. component: dashboard,
  23. },
  24. {
  25. path: '/login',
  26. name: 'login',
  27. component: login
  28. },
  29. {
  30. path: '/dashboard',
  31. name: 'dashboard',
  32. component: dashboard
  33. },
  34. {
  35. path: '/projectManagement',
  36. name: 'projectManagement',
  37. component: projectManagement
  38. },
  39. {
  40. path: '/GIS',
  41. name: 'GIS',
  42. component: GIS
  43. },
  44. {
  45. path: '/userManagement',
  46. name: 'userManagement',
  47. component: userManagement
  48. },
  49. {
  50. path: '/alarmMaintenance',
  51. name: 'alarmMaintenance',
  52. component: alarmMaintenance
  53. },
  54. {
  55. path: '/maintenanceRecord',
  56. name: 'maintenanceRecord',
  57. component: maintenanceRecord
  58. },
  59. {
  60. path: '/repairPersonnel',
  61. name: 'repairPersonnel',
  62. component: repairPersonnel
  63. },
  64. {
  65. path: '/streetLightInformation',
  66. name: 'streetLightInformation',
  67. component: streetLightInformation
  68. },
  69. {
  70. path: '/maintenanceStaff',
  71. name: 'maintenanceStaff',
  72. component: maintenanceStaff
  73. },
  74. {
  75. path: '/historicalData',
  76. name: 'historicalData',
  77. component: historicalData
  78. },
  79. {
  80. path: '/operationLog',
  81. name: 'operationLog',
  82. component: operationLog
  83. },
  84. {
  85. path: '/companyManagement',
  86. name: 'companyManagement',
  87. component: companyManagement
  88. },
  89. ]
  90. const router = new VueRouter({
  91. mode: 'hash',
  92. base: process.env.BASE_URL,
  93. routes
  94. })
  95. export default router