fix: 修复普通用户页面 动作 问题

This commit is contained in:
Eric
2021-08-27 11:30:19 +08:00
committed by Jiangjie.Bai
parent 0b2cfb88a2
commit a88499d10c
2 changed files with 4 additions and 2 deletions

View File

@@ -40,7 +40,7 @@ export default {
autoParam: ['id=key', 'name=n', 'level=lv'],
type: 'get',
headers: {
'X-JMS-ORG': this.$store.getters.currentOrg.id
'X-JMS-ORG': this.$store.getters.currentOrg ? this.$store.getters.currentOrg.id : ''
}
},
callback: {

View File

@@ -4,7 +4,9 @@ const getters = {
token: state => state.users.token,
currentOrg: state => state.users.currentOrg,
currentOrgIsDefault: state => state.users.currentOrg['is_default'],
currentOrgIsRoot: state => state.users.currentOrg['is_root'],
currentOrgIsRoot: state => {
return state.users.currentOrg && state.users.currentOrg['is_root']
},
currentRole: state => state.users.currentRole,
currentUser: state => state.users.profile,
permission_routes: state => state.permission.routes,