diff --git a/src/components/Sidebar.vue b/src/components/Sidebar.vue index d4470d9d..8d2062e9 100644 --- a/src/components/Sidebar.vue +++ b/src/components/Sidebar.vue @@ -1,13 +1,31 @@
@@ -17,6 +35,7 @@ export default { return { hostName: "", isProduction: "", + activeIndex: "/home", routeItem: [ { path: "/home", @@ -34,14 +53,26 @@ export default { // path: "/systemManagement", // name: "系统管理", // }, + { - path: "/icdConfig", - name: "icd配置", - }, - { - path: "/paramBinding", - name: "参数绑定", + path: "/61850config", + name: "61850配置", + subs: [ + { + path: "/icdConfig", + name: "icd配置", + }, + { + path: "/paramBinding", + name: "icd绑定", + }, + { + path: "/rptparam", + name: "rptparam配置", + }, + ], }, + { path: "/alarmRules", name: "告警规则", @@ -72,14 +103,24 @@ export default { this.hostName = "http://localhost:9527/#/"; // 这里使用你的本地 target 地址 } }, - watch: {}, + watch: { + $route() { + this.setCurrentRoute(); + }, + }, methods: { - linkHome() { - console.log(this.hostName); - window.location.href = this.hostName; + setCurrentRoute() { + console.log(this.$route.path); + this.$nextTick(() => { + this.activeIndex = this.$route.path; // 通过他就可以监听到当前路由状态并激活当前菜单 + console.log(this.activeIndex); + localStorage.setItem("menuActive", this.activeIndex); + }); }, }, - created() {}, + created() { + this.setCurrentRoute(); + }, }; @@ -89,6 +130,71 @@ export default { // margin: 0 auto; display: flex; align-items: center; + width: 100%; + .el-menu { + background: transparent; + border-bottom: none; + height: 40px; + line-height: 40px; + width: 100%; + display: flex; + //justify-content: space-around; + li { + margin-right: 2%; + } + } + .el-menu--horizontal > .el-menu-item { + background-image: url(../assets/menu.png); + height: 40px; + line-height: 40px; + padding: 0 12px; + background-size: 100% 100%; + background-repeat: no-repeat; + overflow: hidden; + width: 120px; + text-align: center; + color: #fff; + border-bottom: 0px solid transparent; + } + .el-menu--horizontal > .el-submenu .el-submenu__title { + background-image: url(../assets/menu.png); + height: 40px; + line-height: 40px; + padding: 0 12px; + background-size: 100% 100%; + background-repeat: no-repeat; + overflow: hidden; + width: 120px; + text-align: center; + color: #fff; + border-bottom: 0px solid transparent; + } + .el-submenu__title i { + color: #fff; + } + .el-menu--horizontal > .el-menu-item.is-active { + color: #6de1ff; + border-bottom: 0px solid #337ab7; + } + .el-menu--horizontal > .el-submenu.is-active .el-submenu__title { + color: #6de1ff; + border-bottom: 0px solid #337ab7; + i { + color: #6de1ff; + } + } + .el-menu-item:focus, + .el-menu-item:hover { + background-color: transparent !important; + color: #6de1ff !important; + } + .el-menu--horizontal > .el-submenu .el-submenu__title:hover { + background-color: transparent !important; + color: #6de1ff !important; + i { + color: #6de1ff; + } + } .menuBoxUl { flex: 1; display: flex; diff --git a/src/router/index.js b/src/router/index.js index e4fb1d18..865ba7b3 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -127,7 +127,15 @@ const routes = [ component: () => import("../views/paramBinding/index.vue"), name: "paramBinding", meta: { - title: "参数绑定", + title: "icd绑定", + }, + }, + { + path: "/rptparam", + component: () => import("../views/rptparam/index.vue"), + name: "rptparam", + meta: { + title: "rptparam配置", }, }, { diff --git a/src/utils/api/index.js b/src/utils/api/index.js index 08d70b0d..2efaa30e 100644 --- a/src/utils/api/index.js +++ b/src/utils/api/index.js @@ -794,3 +794,36 @@ export function listRecordApi(data) { }, }); } + +//rptparam相关接口 +//查询绑定信息 +export function getRptApi(data) { + return request({ + url: "/rptparam/getRpt", + method: "get", + params: data, + headers: { + "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8", + }, + }); +} + +// 查询可用rptparam +export function listRptApi(data) { + return request({ + url: "/rptparam/listRpt", + method: "get", + params: data, + headers: { + "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8", + }, + }); +} +//绑定 +export function updateRptApi(data) { + return request({ + url: "/rptparam/updateRpt", + method: "post", + data, + }); +} diff --git a/src/views/paramBinding/index.vue b/src/views/paramBinding/index.vue index 92804493..1f56eee9 100644 --- a/src/views/paramBinding/index.vue +++ b/src/views/paramBinding/index.vue @@ -45,7 +45,7 @@
+
+
+ {{ processedItem.comment }}
+ ({{ processedItem.name }})
+
+