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