mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-20 18:15:56 +08:00
fix 修复 切换租户 页面tab未清空问题
This commit is contained in:
parent
6b4c1b4c94
commit
0e172d2aa1
@ -21,6 +21,7 @@
|
|||||||
:label="item.companyName"
|
:label="item.companyName"
|
||||||
:value="item.tenantId">
|
:value="item.tenantId">
|
||||||
</el-option>
|
</el-option>
|
||||||
|
<svg-icon slot="prefix" icon-class="company" class="el-input__icon input-icon" />
|
||||||
</el-select>
|
</el-select>
|
||||||
|
|
||||||
<search id="header-search" class="right-menu-item" />
|
<search id="header-search" class="right-menu-item" />
|
||||||
@ -123,13 +124,15 @@ export default {
|
|||||||
dynamicTenantEvent(tenantId) {
|
dynamicTenantEvent(tenantId) {
|
||||||
if (this.companyName != null && this.companyName !== '') {
|
if (this.companyName != null && this.companyName !== '') {
|
||||||
dynamicTenant(tenantId).then(res => {
|
dynamicTenant(tenantId).then(res => {
|
||||||
this.$router.push("/index");
|
this.$tab.closeAllPage()
|
||||||
|
this.$router.push('/')
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
dynamicClearEvent() {
|
dynamicClearEvent() {
|
||||||
dynamicClear().then(res => {
|
dynamicClear().then(res => {
|
||||||
this.$router.push("/index");
|
this.$tab.closeAllPage()
|
||||||
|
this.$router.push('/')
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 租户列表
|
// 租户列表
|
||||||
|
|||||||
@ -3,16 +3,16 @@ import { getToken, setToken, removeToken } from '@/utils/auth'
|
|||||||
|
|
||||||
const user = {
|
const user = {
|
||||||
state: {
|
state: {
|
||||||
|
userId: undefined,
|
||||||
token: getToken(),
|
token: getToken(),
|
||||||
name: '',
|
name: '',
|
||||||
avatar: '',
|
avatar: '',
|
||||||
roles: [],
|
roles: [],
|
||||||
permissions: [],
|
permissions: []
|
||||||
userId: null
|
|
||||||
},
|
},
|
||||||
|
|
||||||
mutations: {
|
mutations: {
|
||||||
SET_USERID: (state, userId) => {
|
SET_USER_ID: (state, userId) => {
|
||||||
state.userId = userId
|
state.userId = userId
|
||||||
},
|
},
|
||||||
SET_TOKEN: (state, token) => {
|
SET_TOKEN: (state, token) => {
|
||||||
@ -65,7 +65,7 @@ const user = {
|
|||||||
}
|
}
|
||||||
commit('SET_NAME', user.userName)
|
commit('SET_NAME', user.userName)
|
||||||
commit('SET_AVATAR', avatar)
|
commit('SET_AVATAR', avatar)
|
||||||
commit('SET_USERID', user.userId)
|
commit('SET_USER_ID', user.userId)
|
||||||
resolve(res)
|
resolve(res)
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
reject(error)
|
reject(error)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user