疯狂的狮子Li
2023-03-11 4ffb0acc35d85a78959edb97ef80e23a92cefc89
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,9 +80,10 @@
  data() {
    return {
      userId: this.$store.getters.userId,
      tenantId: undefined,
      companyName: undefined,
      tenantList: []
      tenantList: [],
      // 是否切换了租户
      dynamic: false
    }
  },
  components: {
@@ -123,6 +124,7 @@
    dynamicTenantEvent(tenantId) {
      if (this.companyName != null && this.companyName !== '') {
        dynamicTenant(tenantId).then(res => {
          this.dynamic = true;
          this.$tab.closeAllPage()
          this.$router.push('/')
        });
@@ -130,6 +132,7 @@
    },
    dynamicClearEvent() {
      dynamicClear().then(res => {
        this.dynamic = false;
        this.$tab.closeAllPage()
        this.$router.push('/')
      });