From 221be28fff3f8518886b577bd132eaaf535a544a Mon Sep 17 00:00:00 2001 From: fanluyan <754122931@qq.com> Date: Fri, 22 Mar 2024 14:34:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Sidebar.vue | 13 ++++------ src/components/passwordDialog.vue | 22 +++++++++++----- src/store/index.js | 9 ++++--- src/utils/api/index.js | 3 ++- src/utils/request.js | 2 +- src/views/login/index.vue | 7 +----- .../components/parameterSetDialog.vue | 5 ++++ src/views/system/deviceUpgrade/index.vue | 25 +++++++++++++++++-- src/views/system/menuManagement/index.vue | 4 +-- .../roleManagement/components/addRole.vue | 11 ++++++-- src/views/system/roleManagement/index.vue | 8 ++++-- src/views/system/user/components/addUser.vue | 13 ++++++++-- src/views/system/user/userManagement.vue | 7 +++--- vue.config.js | 2 +- 14 files changed, 92 insertions(+), 39 deletions(-) diff --git a/src/components/Sidebar.vue b/src/components/Sidebar.vue index cb9c69e..dfb5ad4 100644 --- a/src/components/Sidebar.vue +++ b/src/components/Sidebar.vue @@ -63,7 +63,6 @@ export default { index: "/realTimeMonitor", title: "实时监控", }, - { icon: "el-icon-film", index: "/pictureRotation", @@ -74,7 +73,6 @@ export default { index: "/photoAlarm", title: "告警处理", }, - { icon: "el-icon-search", index: "/realTimeSearch", @@ -289,6 +287,7 @@ export default { }, ], role: "", + menuList: [], }; }, @@ -309,25 +308,23 @@ export default { this.role = localStorage.getItem("role"); console.log("用户管理"); console.log(this.role); - // if (this.role == 0) { // this.items = this.items; // } else { - // this.items = this.items1; + // this.menuList = JSON.parse(localStorage.getItem("menuPermission")); + // this.items = this.menuList; // } + if (this.role == 0) { - console.log("ssssssssssssssssssssssssssssssssssssssss"); this.items = this.items; } else if (this.role == 1) { this.items = this.items1; } else if (this.role == 2) { this.items = this.items2; } else if (this.role == 4) { - console.log("ssssssssssssssssssssssssssssssssssssssss"); this.items = this.hnjcitems; - console.log("ssssssssssssssssssssssssssssssssssssssss", this.items); } - + this.activeIndex = this.items[0].index; console.log(this.items); console.log(this.activeIndex); }, diff --git a/src/components/passwordDialog.vue b/src/components/passwordDialog.vue index e67fe9b..fe7be77 100644 --- a/src/components/passwordDialog.vue +++ b/src/components/passwordDialog.vue @@ -6,9 +6,19 @@ :close-on-click-modal="false" width="420px" > - + - + - -