fix: 更新用户,密码规则根据当前用户的原角色(非当前表单角色)进行处理

This commit is contained in:
Bai
2021-08-17 17:08:52 +08:00
committed by Jiangjie.Bai
parent a7aa763e37
commit 679103db03
2 changed files with 8 additions and 2 deletions

View File

@@ -61,7 +61,8 @@ export default {
return !formValue.update_password
},
el: {
required: false
required: false,
userIsOrgAdmin: false
}
},
need_update_password: {
@@ -165,6 +166,7 @@ export default {
methods: {
afterGetUser(user) {
this.user = user
this.fieldsMeta.password.el.userIsOrgAdmin = user.role === 'Admin' || user.org_roles.indexOf('Admin') !== -1
if (this.$route.query.clone_from) {
this.user.groups = []
}