index.js 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324
  1. import Vue from 'vue'
  2. import VueRouter from 'vue-router'
  3. import HomeView from '../views/HomeView.vue'
  4. import LoginView from '@/views/LoginView.vue'
  5. import Notice from '@/components/notice/notice.vue'
  6. import Empty from '@/components/Empty.vue'
  7. import IocDashboard from "@/components/dashboard/iocDashboard.vue";
  8. Vue.use(VueRouter)
  9. const router = new VueRouter({
  10. mode: 'history',
  11. base: import.meta.env.BASE_URL,
  12. routes: [
  13. {
  14. path: '/',
  15. name: 'home',
  16. meta: {breadcrumb: '首页'},
  17. component: HomeView,
  18. children: [
  19. {
  20. path: '/empty',
  21. name: 'empty',
  22. meta: {breadcrumb: '空'},
  23. component: Empty,
  24. },
  25. {
  26. path: '/notice',
  27. name: 'notice',
  28. meta: {breadcrumb: '消息通知'},
  29. component: Notice,
  30. },
  31. {
  32. path: '/dashboard',
  33. name: 'dashboard',
  34. meta: {breadcrumb: '智能看板'},
  35. component: IocDashboard,
  36. },
  37. {
  38. path: '/life',
  39. name: 'life',
  40. meta: {breadcrumb: '智享生活'},
  41. component: () => import('@/components/life/life.vue'),
  42. children: [
  43. {
  44. path: '/life/restaurant',
  45. name: 'lifeRestaurant',
  46. meta: {breadcrumb: '智慧餐厅'},
  47. component: () => import('@/components/life/restaurant/lifeRestaurant.vue'),
  48. },
  49. {
  50. path: '/life/parking',
  51. name: 'lifeParking',
  52. meta: {breadcrumb: '智慧停车'},
  53. component: () => import('@/components/life/parking/lifeParking.vue'),
  54. },
  55. {
  56. path: '/life/supermarket',
  57. name: 'lifeSupermarket',
  58. meta: {breadcrumb: '无人商超'},
  59. component: () => import('@/components/life/supermarket/lifeSupermarket.vue'),
  60. },
  61. {
  62. path: '/life/healthyHome',
  63. name: 'lifeHealthyHome',
  64. meta: {breadcrumb: '健康小屋'},
  65. component: () => import('@/components/life/healthyHome/lifeHealthyHome.vue'),
  66. },
  67. ]
  68. },
  69. {
  70. path: '/work',
  71. name: 'work',
  72. meta: {breadcrumb: '智慧办公'},
  73. component: () => import('@/components/work/work.vue'),
  74. children: [
  75. {
  76. path: '/work/overview',
  77. name: 'workOverview',
  78. meta: {breadcrumb: '楼层概览'},
  79. component: () => import('@/components/work/overview/workOverview.vue'),
  80. },
  81. {
  82. path: '/work/meeting',
  83. name: 'workMeeting',
  84. meta: {breadcrumb: '会议管理'},
  85. component: () => import('@/components/work/meeting/workMeeting.vue'),
  86. },
  87. {
  88. path: '/work/print',
  89. name: 'workPrint',
  90. meta: {breadcrumb: '文印管理'},
  91. component: () => import('@/components/work/print/workPrint.vue'),
  92. },
  93. {
  94. path: '/work/bus',
  95. name: 'workBus',
  96. meta: {breadcrumb: '公车管理'},
  97. component: () => import('@/components/work/bus/workBus.vue'),
  98. },
  99. ]
  100. },
  101. {
  102. path: '/doubleCarbon',
  103. name: 'doubleCarbon',
  104. meta: {breadcrumb: '数智双碳'},
  105. component: () => import('@/components/doubleCarbon/doubleCarbon.vue'),
  106. children: [
  107. {
  108. path: '/doubleCarbon/overview',
  109. name: 'doubleCarbonOverview',
  110. meta: {breadcrumb: '双碳概览'},
  111. component: () => import('@/components/doubleCarbon/overview/doubleCarbonOverview.vue'),
  112. },
  113. {
  114. path: '/doubleCarbon/car',
  115. name: 'doubleCarbonCar',
  116. meta: {breadcrumb: '车辆排放'},
  117. component: () => import('@/components/doubleCarbon/car/doubleCarbonCar.vue'),
  118. },
  119. {
  120. path: '/doubleCarbon/print',
  121. name: 'doubleCarbonPrint',
  122. meta: {breadcrumb: '文印排放'},
  123. component: () => import('@/components/doubleCarbon/print/doubleCarbonPrint.vue'),
  124. },
  125. {
  126. path: '/doubleCarbon/pv',
  127. name: 'doubleCarbonPv',
  128. meta: {breadcrumb: '光伏发电'},
  129. component: () => import('@/components/doubleCarbon/PV/doubleCarbonPv.vue'),
  130. },
  131. ]
  132. },
  133. {
  134. path: '/business',
  135. name: 'business',
  136. meta: {breadcrumb: '智慧运营'},
  137. component: () => import('@/components/business/business.vue'),
  138. children: [
  139. {
  140. path: '/business/asset',
  141. name: 'businessAsset',
  142. meta: {breadcrumb: '资产管理'},
  143. component: () => import('@/components/business/asset/asset.vue'),
  144. },
  145. {
  146. path: '/business/space',
  147. name: 'businessSpace',
  148. meta: {breadcrumb: '空间管理'},
  149. component: () => import('@/components/business/space/space.vue'),
  150. },
  151. {
  152. path: '/business/analysis',
  153. name: 'businessAnalysis',
  154. meta: {breadcrumb: '运营分析'},
  155. component: () => import('@/components/business/analysis/analysis.vue'),
  156. }
  157. ]
  158. },
  159. {
  160. path: '/security',
  161. name: 'security',
  162. meta: {breadcrumb: '智慧安防'},
  163. component: () => import('@/components/security/security.vue'),
  164. children: [
  165. {
  166. path: '/security/person',
  167. name: 'securityPerson',
  168. meta: {breadcrumb: '安防人员', hideChild: true},
  169. component: () => import('@/components/security/person/securityPerson.vue'),
  170. children: [
  171. {
  172. path: '/security/person/more',
  173. name: 'securityPersonMore',
  174. meta: {breadcrumb: '更多'},
  175. component: () => import('@/components/security/person/securityPersonMore.vue'),
  176. }
  177. ]
  178. },
  179. {
  180. path: '/security/alarm',
  181. name: 'securityAlarm',
  182. meta: {breadcrumb: '安消联动'},
  183. component: () => import('@/components/security/alarm/securityAlarm.vue'),
  184. children: [
  185. {
  186. path: '/security/alarm/map',
  187. name: 'securityAlarmMap',
  188. meta: {breadcrumb: '地图模式'},
  189. component: () => import('@/components/security/alarm/securityAlarmMap.vue'),
  190. },
  191. {
  192. path: '/security/alarm/grid',
  193. name: 'securityAlarmGrid',
  194. meta: {breadcrumb: '宫格模式'},
  195. component: () => import('@/components/security/alarm/securityAlarmGrid.vue'),
  196. },
  197. {
  198. path: '/security/alarm/manage',
  199. name: 'securityAlarmManage',
  200. meta: {breadcrumb: '告警管理'},
  201. component: () => import('@/components/security/alarm/securityAlarmManage.vue'),
  202. },
  203. {
  204. path: '/security/alarm/info',
  205. name: 'securityAlarmInfo',
  206. meta: {breadcrumb: '告警库'},
  207. component: () => import('@/components/security/alarm/securityAlarmInfo.vue'),
  208. },
  209. ]
  210. },
  211. {
  212. path: '/security/device',
  213. name: 'securityDevice',
  214. meta: {breadcrumb: '设备交互'},
  215. component: () => import('@/components/security/device/securityDevice.vue'),
  216. },
  217. ]
  218. },
  219. {
  220. path: '/scene',
  221. name: 'scene',
  222. meta: {breadcrumb: '智慧场景'},
  223. component: () => import('@/components/scene/scene.vue'),
  224. children: [
  225. {
  226. path: '/scene/meeting',
  227. name: 'sceneMeeting',
  228. meta: {breadcrumb: '智·会议'},
  229. component: () => import('@/components/scene/meeting/sceneMeeting.vue'),
  230. children: [
  231. {
  232. path: '/scene/meeting/config',
  233. name: 'sceneMeetingConfig',
  234. meta: {breadcrumb: '配置会议'},
  235. component: () => import('@/components/scene/meeting/sceneMeetingConfig.vue'),
  236. },
  237. {
  238. path: '/scene/meeting/overview',
  239. name: 'sceneMeetingOverview',
  240. meta: {breadcrumb: '统计分析'},
  241. component: () => import('@/components/scene/meeting/sceneMeetingOverview.vue'),
  242. },
  243. ]
  244. },
  245. {
  246. path: '/scene/energy',
  247. name: 'sceneEnergy',
  248. meta: {breadcrumb: '智·能源'},
  249. component: () => import('@/components/scene/energy/sceneEnergy.vue'),
  250. children: [
  251. {
  252. path: '/scene/energy/aircondition',
  253. name: 'sceneEnergyAircondition',
  254. meta: {breadcrumb: '智能空调'},
  255. component: () => import('@/components/scene/energy/sceneEnergyAircondition.vue'),
  256. },
  257. {
  258. path: '/scene/energy/light',
  259. name: 'sceneEnergyLight',
  260. meta: {breadcrumb: '智能照明'},
  261. component: () => import('@/components/scene/energy/sceneEnergyLight.vue'),
  262. },
  263. {
  264. path: '/scene/energy/water',
  265. name: 'sceneEnergyWater',
  266. meta: {breadcrumb: '智能饮水机'},
  267. component: () => import('@/components/scene/energy/sceneEnergyWater.vue'),
  268. },
  269. ]
  270. },
  271. {
  272. path: '/scene/access',
  273. name: 'sceneAccess',
  274. meta: {breadcrumb: '智·安防'},
  275. component: () => import('@/components/scene/access/sceneAccess.vue'),
  276. children: [
  277. {
  278. path: '/scene/access/manage',
  279. name: 'sceneAccessManage',
  280. meta: {breadcrumb: '门禁管理'},
  281. component: () => import('@/components/scene/access/sceneAccessManage.vue'),
  282. },
  283. {
  284. path: '/scene/access/guest',
  285. name: 'sceneAccessGuest',
  286. meta: {breadcrumb: '访客管理'},
  287. component: () => import('@/components/scene/access/sceneAccessGuestManage.vue'),
  288. },
  289. {
  290. path: '/scene/access/park',
  291. name: 'sceneAccessPark',
  292. meta: {breadcrumb: '停车管理'},
  293. component: () => import('@/components/scene/access/sceneAccessParkManage.vue'),
  294. },
  295. {
  296. path: '/scene/access/behaviour',
  297. name: 'sceneAccessBehaviour',
  298. meta: {breadcrumb: '行为感知'},
  299. component: () => import('@/components/scene/access/sceneAccessBehaviour.vue'),
  300. }
  301. ]
  302. },
  303. ]
  304. },
  305. ],
  306. },
  307. {
  308. path: '/login',
  309. name: 'login',
  310. meta: {breadcrumb: '登录'},
  311. component: LoginView,
  312. },
  313. ],
  314. })
  315. let routerPush = VueRouter.prototype.push;
  316. VueRouter.prototype.push = function push(location) {
  317. return routerPush.call(this, location).catch(err => err)
  318. }
  319. export default router