From 53c7ba31e2712d54aef47add1e9faee347b51889 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Wed, 3 Nov 2021 10:53:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E5=8C=BA=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/base/community/buildForm.vue | 8 +++- .../modules/base/community/buildTable.vue | 8 ++-- .../modules/base/community/communityForm.vue | 1 + .../modules/base/community/communityTable.vue | 4 +- src/views/modules/base/community/roomForm.vue | 41 +++++++++++++------ .../modules/base/community/roomTable.vue | 4 +- 6 files changed, 45 insertions(+), 21 deletions(-) diff --git a/src/views/modules/base/community/buildForm.vue b/src/views/modules/base/community/buildForm.vue index c0e9208f..b4f74c13 100644 --- a/src/views/modules/base/community/buildForm.vue +++ b/src/views/modules/base/community/buildForm.vue @@ -28,7 +28,7 @@ prop="type" label-width="150px" style="display: block"> - + 商品房 自建房 @@ -120,6 +120,7 @@ export default { formType: 'add', //表单操作类型 add新增,edit编辑,detail详情 buildingId: '', //楼栋ID + buildType: "1", dataForm: { agencyId: '', // 所属组织ID agencyName: '', @@ -130,7 +131,7 @@ export default { totalUnitNum: 0,//单元数 totalFloorNum: 0,//层数 totalHouseNum: 0,//户数 - type: '1',//房屋类型 + type: '',//房屋类型 location: '', //坐标位置 longitude: '', //经度 latitude: '' //纬度 @@ -160,7 +161,9 @@ export default { if (row) { this.buildingId = row.buildingId this.dataForm = row + this.buildType = row.buildingTypeKey } + console.log(row) }, @@ -173,6 +176,7 @@ export default { this.dataForm.buildingId = this.buildingId } + this.dataForm.type = this.buildType const { data, code, msg } = await requestPost(url, this.dataForm) diff --git a/src/views/modules/base/community/buildTable.vue b/src/views/modules/base/community/buildTable.vue index 9557b448..e7df16f1 100644 --- a/src/views/modules/base/community/buildTable.vue +++ b/src/views/modules/base/community/buildTable.vue @@ -83,9 +83,7 @@ - - + { + this.$refs.ref_form.initForm('edit', row, this.agencyObj) + }) }, addFormCancle () { diff --git a/src/views/modules/base/community/communityForm.vue b/src/views/modules/base/community/communityForm.vue index 49a02c53..4604f9c2 100644 --- a/src/views/modules/base/community/communityForm.vue +++ b/src/views/modules/base/community/communityForm.vue @@ -280,6 +280,7 @@ export default { this.neighborHoodId = row.neighborHoodId this.dataForm = row } + console.log(row) await this.loadAgency() await this.loadGrid() diff --git a/src/views/modules/base/community/communityTable.vue b/src/views/modules/base/community/communityTable.vue index 3431bfa1..47dc22d3 100644 --- a/src/views/modules/base/community/communityTable.vue +++ b/src/views/modules/base/community/communityTable.vue @@ -232,7 +232,9 @@ export default { handleEdit (row) { this.formTitle = '修改小区' this.formShow = true - this.$refs.ref_form.initForm('edit', row, this.agencyObj) + this.$nextTick(() => { + this.$refs.ref_form.initForm('edit', row, this.agencyObj) + }) }, addFormCancle () { diff --git a/src/views/modules/base/community/roomForm.vue b/src/views/modules/base/community/roomForm.vue index ac672867..333f77ea 100644 --- a/src/views/modules/base/community/roomForm.vue +++ b/src/views/modules/base/community/roomForm.vue @@ -43,7 +43,7 @@ prop="houseType" label-width="150px" style="display: block"> - + 楼房 平房 @@ -55,11 +55,15 @@ prop="purpose" label-width="150px" style="display: block"> - - - 商品房 - 自建房 - 别墅 + + + 住宅 + 商业 + 办公 + 工业 + 仓储 + 商住混用 + 其他 @@ -67,10 +71,10 @@ prop="rentFlag" label-width="150px" style="display: block"> - + - - + + @@ -80,8 +84,6 @@ label-width="150px" style="display: block"> @@ -132,13 +134,16 @@ export default { unitList: [], houseId: '', //房屋ID + houseType: '1', + purpose: '1', + rentFlag: false, dataForm: { neighborHoodId: '', // 所属小区ID buildingId: '',//所属楼栋ID buildingUnitId: '',//所属单元ID doorName: '',//门牌号 - houseType: '1',//房屋类型【楼房,平房,别墅】 - purpose: '1',//房屋用途【住宅,商业,办公,工业,仓储,商住混用,其他】 + houseType: '',//房屋类型【楼房,平房,别墅】 + purpose: '',//房屋用途【住宅,商业,办公,工业,仓储,商住混用,其他】 rentFlag: 0,//是否出租【是:1,否:0】 ownerPhone: '', //房主电话 ownerName: '', //房主名字 @@ -166,7 +171,13 @@ export default { if (row) { this.houseId = row.houseId this.dataForm = row + + this.dataForm.buildingUnitId = row.unitNumKey + this.houseType = row.houseTypeKey + this.purpose = row.purposeKey + this.rentFlag = row.rentFlagKey } + console.log(row) await this.loadUnitList() @@ -201,6 +212,10 @@ export default { this.dataForm.houseId = this.houseId } + this.dataForm.houseType = this.houseType + this.dataForm.purpose = this.purpose + this.dataForm.rentFlag = this.rentFlag + const { data, code, msg } = await requestPost(url, this.dataForm) if (code === 0) { diff --git a/src/views/modules/base/community/roomTable.vue b/src/views/modules/base/community/roomTable.vue index ef3dbbcd..eeca5029 100644 --- a/src/views/modules/base/community/roomTable.vue +++ b/src/views/modules/base/community/roomTable.vue @@ -244,7 +244,9 @@ export default { handleEdit (row) { this.formTitle = '修改房屋' this.formShow = true - this.$refs.ref_form.initForm('edit', row, this.agencyObj) + this.$nextTick(() => { + this.$refs.ref_form.initForm('edit', row, this.agencyObj) + }) }, addFormCancle () {