Commit 19e7e447 authored by “yiyousong”'s avatar “yiyousong”

fix:修改用户站点授权

parent 939c0bbc
......@@ -149,14 +149,17 @@ export default {
onEdit(row) {
this.form = { ...row };
this.form.areaNames = this.form.areaNames.split(",");
// this.form.areaCodes = this.form.areaCodes.split(",");
this.form.loginPwd && this.$delete(this.form, "loginPwd");
},
onSubmit() {
console.log(this.form.areaCodes);
this.$refs.ruleForm.validate(async (valid) => {
if (valid) {
let res = await userSave({
...this.form,
areaNames: this.form.areaNames.join(","),
// areaCodes: this.form.areaCodes.join(","),
});
let { code, msg } = res;
if (code === 1) {
......@@ -173,14 +176,20 @@ export default {
// 选中树节点
handleSelect(value, node, extra) {
let { allCheckedNodes } = extra;
console.log(extra);
let arr = allCheckedNodes.map((v) => {
return v.node.data.props.areaCode;
if (v.node) {
return v.node.data.props.areaCode;
} else {
return v.data.props.areaCode;
}
});
if (arr.length) {
this.form.areaCodes = arr.join(",");
} else {
this.form.areaCodes = "";
}
console.log(this.form.areaCodes);
},
},
};
......
......@@ -214,6 +214,7 @@ export default {
} else {
this.form.areaCodes = "";
}
console.log(this.form.areaCodes);
},
},
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment