diff --git a/src/views/assets/component/addHouse.vue b/src/views/assets/component/addHouse.vue index 395b136..ab8bf7c 100644 --- a/src/views/assets/component/addHouse.vue +++ b/src/views/assets/component/addHouse.vue @@ -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); } } diff --git a/src/views/assets/house.vue b/src/views/assets/house.vue index 4421790..af53daf 100644 --- a/src/views/assets/house.vue +++ b/src/views/assets/house.vue @@ -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 { ); } else { + console.log("link_with_name",row[link_with_name]) return ( {row[link_with_name]?.name ||