mirror of
https://github.com/jumpserver/lina.git
synced 2025-07-13 06:54:18 +00:00
perf: 优化用户中角色显示问题
This commit is contained in:
parent
2274b65d83
commit
dd4aed9cf4
@ -9,7 +9,6 @@
|
|||||||
import { GenericCreateUpdatePage } from '@/layout/components'
|
import { GenericCreateUpdatePage } from '@/layout/components'
|
||||||
import UserPassword from '@/components/UserPassword'
|
import UserPassword from '@/components/UserPassword'
|
||||||
import RoleCheckbox from '@/views/users/User/components/RoleCheckbox'
|
import RoleCheckbox from '@/views/users/User/components/RoleCheckbox'
|
||||||
import { mapGetters } from 'vuex'
|
|
||||||
import rules from '@/components/DataForm/rules'
|
import rules from '@/components/DataForm/rules'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -82,7 +81,7 @@ export default {
|
|||||||
role: {
|
role: {
|
||||||
label: this.$t('users.SuperRole'),
|
label: this.$t('users.SuperRole'),
|
||||||
hidden: () => {
|
hidden: () => {
|
||||||
return !this.currentOrgIsRoot && this.publicSettings.role === 'Admin'
|
return !this.$store.getters.currentUserIsSuperAdmin
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
org_roles: {
|
org_roles: {
|
||||||
@ -90,10 +89,10 @@ export default {
|
|||||||
label: this.$t('users.OrgRole'),
|
label: this.$t('users.OrgRole'),
|
||||||
component: RoleCheckbox,
|
component: RoleCheckbox,
|
||||||
hidden: () => {
|
hidden: () => {
|
||||||
return !this.publicSettings.XPACK_LICENSE_IS_VALID
|
return !this.$store.getters.hasValidLicense
|
||||||
},
|
},
|
||||||
el: {
|
el: {
|
||||||
disabled: false,
|
disabled: this.$store.getters.currentOrgIsRoot,
|
||||||
rule: []
|
rule: []
|
||||||
},
|
},
|
||||||
helpText: this.$t('users.HelpText.OrgRoleHelpText')
|
helpText: this.$t('users.HelpText.OrgRoleHelpText')
|
||||||
@ -110,14 +109,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
|
||||||
...mapGetters(['publicSettings', 'currentOrgIsRoot'])
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
if (this.currentOrgIsRoot) {
|
|
||||||
this.fieldsMeta.org_roles.el.disabled = true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
cleanFormValue(value) {
|
cleanFormValue(value) {
|
||||||
const method = this.getMethod()
|
const method = this.getMethod()
|
||||||
|
Loading…
Reference in New Issue
Block a user