From 4ffb0acc35d85a78959edb97ef80e23a92cefc89 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子Li <15040126243@163.com>
Date: 星期六, 11 三月 2023 23:59:05 +0800
Subject: [PATCH] fix 修复 超管切换租户后 点击个人中心报错

---
 ruoyi-ui/src/layout/components/Navbar.vue |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/ruoyi-ui/src/layout/components/Navbar.vue b/ruoyi-ui/src/layout/components/Navbar.vue
index 85fb1b5..55844db 100644
--- a/ruoyi-ui/src/layout/components/Navbar.vue
+++ b/ruoyi-ui/src/layout/components/Navbar.vue
@@ -48,7 +48,7 @@
           <i class="el-icon-caret-bottom" />
         </div>
         <el-dropdown-menu slot="dropdown">
-          <router-link to="/user/profile">
+          <router-link to="/user/profile" v-if="!dynamic">
             <el-dropdown-item>涓汉涓績</el-dropdown-item>
           </router-link>
           <el-dropdown-item @click.native="setting = true">
@@ -80,10 +80,10 @@
   data() {
     return {
       userId: this.$store.getters.userId,
-      tenantId: undefined,
       companyName: undefined,
       tenantList: [],
-      userList: []
+      // 鏄惁鍒囨崲浜嗙鎴�
+      dynamic: false
     }
   },
   components: {
@@ -124,6 +124,7 @@
     dynamicTenantEvent(tenantId) {
       if (this.companyName != null && this.companyName !== '') {
         dynamicTenant(tenantId).then(res => {
+          this.dynamic = true;
           this.$tab.closeAllPage()
           this.$router.push('/')
         });
@@ -131,6 +132,7 @@
     },
     dynamicClearEvent() {
       dynamicClear().then(res => {
+        this.dynamic = false;
         this.$tab.closeAllPage()
         this.$router.push('/')
       });

--
Gitblit v1.9.3