From 0da6ffc479eceef01478c6aaf6621fe293e3f7c3 Mon Sep 17 00:00:00 2001 From: lxl <lixuliang_hd@126.com> Date: 星期三, 26 十月 2022 09:53:19 +0800 Subject: [PATCH] 菜单 --- src/components/navMenu.vue | 16 +++++++++++++++- 1 files changed, 15 insertions(+), 1 deletions(-) diff --git a/src/components/navMenu.vue b/src/components/navMenu.vue index 1bcffec..e502d4d 100644 --- a/src/components/navMenu.vue +++ b/src/components/navMenu.vue @@ -37,7 +37,7 @@ import { logout } from "@/api/api"; import { removeToken, getToken } from "@/utils/auth"; import customElMenu from "../components/customElMenu.vue"; -import { queryMenuTree, updateMenuTree, queryMaxId } from "../api/api"; +import { queryMenuTree, getPerms } from "../api/api"; export default { name: "navMenu", @@ -66,6 +66,7 @@ }, mounted() { this.getMenuTree(); + this.getUserPerms(); }, computed: { // 鎴戜滑浣跨敤璁$畻灞炴�ф潵鑾峰彇鍒板綋鍓嶇偣鍑荤殑鑿滃崟鐨勮矾鐢辫矾寰勶紝鐒跺悗璁剧疆default-active涓殑鍊� @@ -163,6 +164,14 @@ } }, handleselect(index, indexPath) { + if (Window.ws != null) { + Window.ws.close(); + Window.ws.onclose = () => { + console.log("鏈嶅姟鍣ㄥ叧闂�"); + }; + Window.ws = null; + } + if (index.indexOf("http") != -1) { this.$router.push("/databaseMonitoring"); this.$store.commit("getIframe", index); @@ -170,6 +179,11 @@ this.$router.push(index); } }, + getUserPerms() { + getPerms().then((res) => { + this.$commit("getPermsEntity", res.result); + }); + }, }, watch: { $route() { -- Gitblit v1.9.3