This commit is contained in:
77
2024-04-26 10:38:46 +08:00
parent e70e52abb5
commit 55aa82c9a3
2 changed files with 28 additions and 2 deletions

View File

@@ -361,7 +361,11 @@ export default {
this.$refs['form'].validate((valid) => {
if (valid) {
this.buttonLoading = true;
addUser(this.form).then(data => {
addUser({
...this.form,
residenceCode: this.getCode(this.form.residenceCode),
addressCode: this.getCode(this.form.addressCode)
}).then(data => {
this.$modal.msgSuccess("新增用户成功");
this.buttonLoading = false;
this.open = false
@@ -371,6 +375,15 @@ export default {
});
}
})
},
getCode(code){
if(!code){
return code;
}
if(Array.isArray(code)){
return code[code.length-1]
}
return code;
}
}
};