diff --git a/src/views/components/editResi.vue b/src/views/components/editResi.vue index 8459e87c..4a2fdff2 100644 --- a/src/views/components/editResi.vue +++ b/src/views/components/editResi.vue @@ -75,6 +75,7 @@ item.value === val); + if(item && item.type == '1'){ + this.form.IS_TENANT = '1' + console.log('item-----', item) + } else this.form.IS_TENANT = '0' + }, handlerMuscForm () { let arr = [] this.addList.forEach(item => { diff --git a/src/views/components/resiForm.vue b/src/views/components/resiForm.vue index 956377af..eeaaedc0 100644 --- a/src/views/components/resiForm.vue +++ b/src/views/components/resiForm.vue @@ -554,14 +554,11 @@ export default { }, // 为了实现根据房屋类型改版是否租户的需求 handleChangeH(val){ - let item = this.optionsH.find(item => item.value===val); - if(item){ - if(item.type=='1'){ - this.form.IS_TENANT = '1'; - } else { - this.form.IS_TENANT = '0'; - } - } + let item = this.optionsH.find(item => item.value === val); + if(item && item.type == '1'){ + this.form.IS_TENANT = '1' + console.log('item-----', item) + } else this.form.IS_TENANT = '0' }, // 监听基础form handleChangeForm (val) {