|
|
|
@ -4,7 +4,6 @@
|
|
|
|
|
:default-active="activeIndex"
|
|
|
|
|
class="sidebar-el-menu"
|
|
|
|
|
mode="horizontal"
|
|
|
|
|
@select="handleSelect"
|
|
|
|
|
router
|
|
|
|
|
>
|
|
|
|
|
<template v-for="item in items">
|
|
|
|
@ -61,13 +60,13 @@ export default {
|
|
|
|
|
// },
|
|
|
|
|
{
|
|
|
|
|
icon: "el-icon-camera",
|
|
|
|
|
index: "realTimeMonitor",
|
|
|
|
|
index: "/realTimeMonitor",
|
|
|
|
|
title: "实时监控",
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
icon: "el-icon-film",
|
|
|
|
|
index: "pictureRotation",
|
|
|
|
|
index: "/pictureRotation",
|
|
|
|
|
title: "图片轮巡",
|
|
|
|
|
},
|
|
|
|
|
// {
|
|
|
|
@ -78,35 +77,34 @@ export default {
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
icon: "el-icon-search",
|
|
|
|
|
index: "realTimeSearch",
|
|
|
|
|
index: "/realTimeSearch",
|
|
|
|
|
title: "实时查询",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
icon: "el-icon-files",
|
|
|
|
|
index: "property",
|
|
|
|
|
index: "/property",
|
|
|
|
|
title: "资产管理",
|
|
|
|
|
subs: [
|
|
|
|
|
{
|
|
|
|
|
index: "lineInformation",
|
|
|
|
|
index: "/lineInformation",
|
|
|
|
|
title: "线路信息管理",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
index: "towerInformation",
|
|
|
|
|
index: "/towerInformation",
|
|
|
|
|
title: "杆塔信息管理",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
index: "photographicDevice",
|
|
|
|
|
index: "/photographicDevice",
|
|
|
|
|
title: "拍照装置管理",
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
icon: "el-icon-coin",
|
|
|
|
|
index: "cameraChannel",
|
|
|
|
|
index: "/cameraChannel",
|
|
|
|
|
title: "通道管理",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
icon: "el-icon-setting",
|
|
|
|
|
index: "devicePhotoSchedule",
|
|
|
|
|
index: "/devicePhotoSchedule",
|
|
|
|
|
title: "拍照时间表设置",
|
|
|
|
|
},
|
|
|
|
|
// {
|
|
|
|
@ -130,21 +128,19 @@ export default {
|
|
|
|
|
],
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
this.activeIndex = sessionStorage.getItem("keyPath") || "/realTimeMonitor";
|
|
|
|
|
},
|
|
|
|
|
watch: {
|
|
|
|
|
activeIndex(newValue) {
|
|
|
|
|
if (newValuer != this.$route.path) {
|
|
|
|
|
this.activeIndex = this.$route.path;
|
|
|
|
|
}
|
|
|
|
|
$route() {
|
|
|
|
|
this.setCurrentRoute();
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
handleSelect(keyPath) {
|
|
|
|
|
sessionStorage.setItem("keyPath", keyPath);
|
|
|
|
|
setCurrentRoute() {
|
|
|
|
|
this.activeIndex = this.$route.path; // 通过他就可以监听到当前路由状态并激活当前菜单
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.setCurrentRoute();
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|