更新api和路由
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
:collapse="isCollapse"
|
||||
:collapse-transition="false"
|
||||
router
|
||||
:default-openeds="['/device-management', '/monitor', '/pms']"
|
||||
:default-openeds="['/device-management', '/monitor', '/pms', '/alarm']"
|
||||
>
|
||||
<el-menu-item index="/">
|
||||
<el-icon>
|
||||
@@ -203,7 +203,18 @@
|
||||
</el-icon>
|
||||
<span>告警中心</span>
|
||||
</template>
|
||||
<!-- 占位, 后续可添加告警管理和告警配置 -->
|
||||
<el-menu-item index="/alarms">
|
||||
<el-icon>
|
||||
<Warning />
|
||||
</el-icon>
|
||||
<template #title>告警管理</template>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="/alarms/thresholds">
|
||||
<el-icon>
|
||||
<Setting />
|
||||
</el-icon>
|
||||
<template #title>阈值告警配置</template>
|
||||
</el-menu-item>
|
||||
</el-sub-menu>
|
||||
|
||||
</el-menu>
|
||||
@@ -344,7 +355,7 @@ export default {
|
||||
|
||||
const activeMenu = computed(() => {
|
||||
const path = route.path;
|
||||
if (path.startsWith('/monitor') || path.startsWith('/pms') || path.startsWith('/devices') || path.startsWith('/device-templates')) {
|
||||
if (path.startsWith('/monitor') || path.startsWith('/pms') || path.startsWith('/devices') || path.startsWith('/device-templates') || path.startsWith('/alarms')) {
|
||||
return path;
|
||||
}
|
||||
return route.path;
|
||||
@@ -457,4 +468,4 @@ export default {
|
||||
font-size: 14px;
|
||||
border-top: 1px solid #eee;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user