master
lion 4 months ago
parent 4486bd9feb
commit 46b3f974a6

@ -428,6 +428,7 @@ export default {
},
submit() {
let promiseAll = [];
if (this.type === "add") {
if (this.form.hasOwnProperty("id")) {
@ -543,6 +544,8 @@ export default {
delete copyForm[info._relations?.link_with_name];
}
});
// console.log("this.copyForm",copyForm)
// return
promiseAll.push(
save(Object.assign(copyForm, { table_name: this.tableName }))
);
@ -622,6 +625,7 @@ export default {
} else {
this.id = "";
this.type = "";
this.selectLand = {}
this.init();
this.$refs['landLinkTable']?.setCurrentRow();
this.$refs["elForm"].clearValidate();
@ -632,15 +636,19 @@ export default {
}
},
selectLand (newVal) {
console.log("selectLand",newVal)
if (newVal && newVal.id) {
this.form.land_id = newVal.id;
this.form.zichanweizhi = newVal.zichanweizhi;
this.form.quanzhenghao = newVal.tudizhenghao;
this.form.guanliantudizhengquanzheng = newVal.name
this.form = Object.assign({}, this.form);
console.log("this.form",this.form)
} else {
this.form.land_id = "";
this.form.zichanweizhi = "";
this.form.quanzhenghao = "";
this.form.guanliantudizhengquanzheng = ''
this.form = Object.assign({}, this.form);
}
}

@ -552,7 +552,7 @@ export default {
) {
throw new Error("fields或relation格式错误");
}
console.log(fieldRes);
console.log("fieldRes",fieldRes);
fieldRes?.forEach((i, index) => {
i._relations = relation.find(
(j) => j.link_table_name.split("_")[1] === i.field
@ -645,6 +645,7 @@ export default {
</a>
);
} else {
console.log("link_with_name",row[link_with_name])
return (
<span>
{row[link_with_name]?.name ||

Loading…
Cancel
Save