From d22df6b353bb1fb6dc8c178bf187bad5f381a3cc Mon Sep 17 00:00:00 2001 From: jiangyy Date: Tue, 22 Nov 2022 09:24:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E5=8C=BA=E7=AE=A1=E7=90=86=E7=89=A9?= =?UTF-8?q?=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/base/community/communityForm.vue | 7 ++++--- src/views/modules/base/community/communityTable.vue | 10 ++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/views/modules/base/community/communityForm.vue b/src/views/modules/base/community/communityForm.vue index 9a0d1418c..3b329ca7d 100644 --- a/src/views/modules/base/community/communityForm.vue +++ b/src/views/modules/base/community/communityForm.vue @@ -6,7 +6,6 @@ :inline="true" :model="dataForm" :rules="dataRule" - :disabled="formType === 'detail'" class="form"> 取 消 确 定 @@ -242,9 +240,11 @@ export default { this.formType = type if (row) { this.dataForm = JSON.parse(JSON.stringify(row)) + this.dataForm.neighborHoodId = this.dataForm.id this.neighborHoodId = this.dataForm.neighborHoodId + } else { this.dataForm.latitude = latitude this.dataForm.longitude = longitude @@ -473,7 +473,8 @@ export default { type: 'success', message: '操作成功' }) - this.dataForm.propertyId = data.propertyId + + this.propertyForm.name = '' this.propertyFormShow = false this.loadProperty() diff --git a/src/views/modules/base/community/communityTable.vue b/src/views/modules/base/community/communityTable.vue index 252ee6529..b7e916e4c 100644 --- a/src/views/modules/base/community/communityTable.vue +++ b/src/views/modules/base/community/communityTable.vue @@ -429,6 +429,7 @@ export default { this.detailShow = true const _data = await this.detail(row) + this.$nextTick(() => { this.$refs.ref_form_detail.initForm(_data) }) @@ -511,7 +512,16 @@ export default { this.formTitle = '修改小区' this.formShow = true const _data = await this.detail(row) + + + this.$nextTick(() => { + console.log(_data) + if (_data.propertyList.length > 0) { + _data.propertyId = _data.propertyList[0].id + } else { + _data.propertyId = '' + } this.$refs.ref_form.initForm('edit', _data, this.agencyObj) }) },