增加object_class的处理逻辑

This commit is contained in:
lanrenwo 2023-01-13 15:00:14 +08:00
parent 6cfa92944c
commit 262ad49df6
1 changed files with 15 additions and 12 deletions

View File

@ -500,6 +500,9 @@ export default {
this.ruleForm.auth = JSON.parse(JSON.stringify(this.defAuth)); this.ruleForm.auth = JSON.parse(JSON.stringify(this.defAuth));
return ; return ;
} }
if (row.auth.type == "ldap" && ! row.auth.ldap.object_class) {
row.auth.ldap.object_class = this.defAuth.ldap.object_class;
}
this.ruleForm.auth = Object.assign(JSON.parse(JSON.stringify(this.defAuth)), row.auth); this.ruleForm.auth = Object.assign(JSON.parse(JSON.stringify(this.defAuth)), row.auth);
}, },
handleDel(row) { handleDel(row) {
@ -602,18 +605,18 @@ export default {
axios.post('/group/auth_login', {name:this.authLoginForm.name, axios.post('/group/auth_login', {name:this.authLoginForm.name,
pwd:this.authLoginForm.pwd, pwd:this.authLoginForm.pwd,
auth:this.ruleForm.auth}).then(resp => { auth:this.ruleForm.auth}).then(resp => {
const rdata = resp.data; const rdata = resp.data;
if (rdata.code === 0) { if (rdata.code === 0) {
this.$message.success("登录成功"); this.$message.success("登录成功");
} else { } else {
this.$message.error(rdata.msg); this.$message.error(rdata.msg);
this.authLoginLoading = false; }
} this.authLoginLoading = false;
console.log(rdata); console.log(rdata);
}).catch(error => { }).catch(error => {
this.$message.error('哦,请求出错'); this.$message.error('哦,请求出错');
console.log(error); console.log(error);
this.authLoginLoading = false; this.authLoginLoading = false;
}); });
}); });
}, },