index.js
1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import { createRouter, createWebHashHistory } from 'vue-router' // 改用 Hash 模式
const routes = [
{
path: '/',
redirect: '/smart-light'
},
{
path: '/h5',
redirect: '/smart-light-h5'
},
{
path: '/smart-light',
name: 'SmartLight',
component: () => import('../views/SmartLight.vue'),
meta: { title: '动态监控' }
},
{
path: '/smart-light-h5',
name: 'SmartLightH5',
component: () => import('../views/SmartLightH5.vue'),
meta: { title: '智能灯', h5: true }
},
{
path: '/smart-light-h5/oee',
name: 'SmartLightH5Oee',
component: () => import('../views/SmartLightH5Oee.vue'),
meta: { title: 'OEE时序', h5: true }
},
{
path: '/smart-light-h5/utilization',
name: 'SmartLightH5Utilization',
component: () => import('../views/SmartLightH5Utilization.vue'),
meta: { title: '稼动率', h5: true }
},
{
path: '/energy-h5',
name: 'EnergyH5',
component: () => import('../views/EnergyH5.vue'),
meta: { title: '能耗', h5: true }
},
{
path: '/energy-h5/run-status',
name: 'EnergyH5RunStatus',
component: () => import('../views/EnergyH5RunStatus.vue'),
meta: { title: '运行状态', h5: true }
},
{
path: '/energy-h5/usage',
name: 'EnergyH5Usage',
component: () => import('../views/EnergyH5Usage.vue'),
meta: { title: '用时用电', h5: true }
},
{
path: '/energy',
name: 'Energy',
component: () => import('../views/Energy.vue'),
meta: { title: '能耗' }
}
]
const router = createRouter({
history: createWebHashHistory('/iot/'), // 使用 Hash 模式
routes
})
export default router