|
|
@ -11,7 +11,7 @@ |
|
|
|
<el-form-item label="所属楼栋" |
|
|
|
label-width="150px" |
|
|
|
style="display: block"> |
|
|
|
<span>{{ agencyObj.neighborHoodName }}{{agencyObj.buildingName}}</span> |
|
|
|
<span>{{ agencyObj.neighborHoodName }}{{agencyObj.label}}</span> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item label="单元号" |
|
|
@ -127,7 +127,8 @@ |
|
|
|
<script> |
|
|
|
import { mapGetters } from 'vuex' |
|
|
|
import { Loading } from 'element-ui' // 引入Loading服务 |
|
|
|
import { requestPost } from '@/js/dai/request' |
|
|
|
import { requestPost, requestGet } from '@/js/dai/request' |
|
|
|
|
|
|
|
|
|
|
|
let loading // 加载动画 |
|
|
|
export default { |
|
|
@ -165,29 +166,28 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
async initForm (type, row) { |
|
|
|
async initForm (type, row, agencyObj) { |
|
|
|
|
|
|
|
this.$refs.ref_form.resetFields(); |
|
|
|
this.agencyObj = row |
|
|
|
this.dataForm.neighborHoodId = this.agencyObj.neighborHoodId |
|
|
|
this.dataForm.buildingId = this.agencyObj.buildingId |
|
|
|
|
|
|
|
this.agencyObj = agencyObj |
|
|
|
this.formType = type |
|
|
|
if (row) { |
|
|
|
this.dataForm = JSON.parse(JSON.stringify(row)) |
|
|
|
this.houseId = this.dataForm.houseId |
|
|
|
|
|
|
|
this.dataForm.buildingUnitId = this.dataForm.unitNumKey |
|
|
|
this.dataForm = { ... this.dataForm } |
|
|
|
this.houseType = this.dataForm.houseTypeKey |
|
|
|
this.purpose = this.dataForm.purposeKey |
|
|
|
this.rentFlag = parseInt(this.dataForm.rentFlagKey) |
|
|
|
// if (this.dataForm.rentFlagKey==='2') { |
|
|
|
|
|
|
|
this.houseId = row.houseId |
|
|
|
await this.loadHouseInfo() |
|
|
|
// this.dataForm = JSON.parse(JSON.stringify(row)) |
|
|
|
// this.houseId = this.dataForm.houseId |
|
|
|
|
|
|
|
// this.dataForm.buildingUnitId = this.dataForm.unitNumKey |
|
|
|
// this.dataForm = { ... this.dataForm } |
|
|
|
// this.houseType = this.dataForm.houseTypeKey |
|
|
|
// this.purpose = this.dataForm.purposeKey |
|
|
|
// this.rentFlag = parseInt(this.dataForm.rentFlagKey) |
|
|
|
// } else { |
|
|
|
// this.rentFlag = 0 |
|
|
|
// } |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.dataForm.neighborHoodId = this.agencyObj.neighborHoodId |
|
|
|
this.dataForm.buildingId = this.agencyObj.id |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -195,12 +195,33 @@ export default { |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
async loadHouseInfo () { |
|
|
|
|
|
|
|
const url = "/gov/org/ichouse/" + this.houseId |
|
|
|
|
|
|
|
const { data, code, msg } = await requestGet(url) |
|
|
|
|
|
|
|
if (code === 0) { |
|
|
|
// debugger |
|
|
|
this.dataForm = { ...data } |
|
|
|
|
|
|
|
this.houseType = this.dataForm.houseType |
|
|
|
this.purpose = this.dataForm.purpose |
|
|
|
this.rentFlag = parseInt(this.dataForm.rentFlag) |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
this.$message.error(msg) |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//加载单元 |
|
|
|
async loadUnitList () { |
|
|
|
const url = '/gov/org/building/buildingunitlist' |
|
|
|
|
|
|
|
let params = { |
|
|
|
buildingId: this.agencyObj.buildingId |
|
|
|
buildingId: this.dataForm.buildingId |
|
|
|
} |
|
|
|
|
|
|
|
const { data, code, msg } = await requestPost(url, params) |
|
|
|