|
@@ -97,6 +97,8 @@ import { logout } from '@/utils/page-tab-util';
|
|
|
import { userLogout } from '@/api/system/user';
|
|
import { userLogout } from '@/api/system/user';
|
|
|
import xyy from '@/assets/xyy.jpg';
|
|
import xyy from '@/assets/xyy.jpg';
|
|
|
import router from '@/router/index';
|
|
import router from '@/router/index';
|
|
|
|
|
+import { getCurrentUser,setCurrentUser } from '@/utils/token-util';
|
|
|
|
|
+
|
|
|
export default {
|
|
export default {
|
|
|
components: { HeaderNotice, PasswordModal, SettingDrawer, I18nIcon },
|
|
components: { HeaderNotice, PasswordModal, SettingDrawer, I18nIcon },
|
|
|
props: {
|
|
props: {
|
|
@@ -119,7 +121,7 @@ export default {
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
|
- this.currentUser = JSON.parse(sessionStorage['currentUser']);
|
|
|
|
|
|
|
+ this.currentUser = getCurrentUser()
|
|
|
this.groupId = this.currentUser.currentGroupId;
|
|
this.groupId = this.currentUser.currentGroupId;
|
|
|
this.roleId = this.currentUser.currentRoleId;
|
|
this.roleId = this.currentUser.currentRoleId;
|
|
|
},
|
|
},
|
|
@@ -147,7 +149,7 @@ export default {
|
|
|
this.roleId = val;
|
|
this.roleId = val;
|
|
|
this.currentUser.currentGroupId = this.groupId;
|
|
this.currentUser.currentGroupId = this.groupId;
|
|
|
this.currentUser.currentRoleId = val;
|
|
this.currentUser.currentRoleId = val;
|
|
|
- sessionStorage['currentUser']=JSON.stringify(this.currentUser)
|
|
|
|
|
|
|
+ setCurrentUser(this.currentUser)
|
|
|
this.$store
|
|
this.$store
|
|
|
.dispatch('user/fetchUserInfo')
|
|
.dispatch('user/fetchUserInfo')
|
|
|
.then(({ menus, homePath, authoritiesRouter }) => {
|
|
.then(({ menus, homePath, authoritiesRouter }) => {
|