Browse Source

小区管理物业

feature/welfareImport
jiangyy 3 years ago
parent
commit
d22df6b353
  1. 7
      src/views/modules/base/community/communityForm.vue
  2. 10
      src/views/modules/base/community/communityTable.vue

7
src/views/modules/base/community/communityForm.vue

@ -6,7 +6,6 @@
:inline="true" :inline="true"
:model="dataForm" :model="dataForm"
:rules="dataRule" :rules="dataRule"
:disabled="formType === 'detail'"
class="form"> class="form">
<el-form-item label="所属组织" <el-form-item label="所属组织"
@ -171,7 +170,6 @@
<el-button size="small" <el-button size="small"
@click="handleCancle"> </el-button> @click="handleCancle"> </el-button>
<el-button size="small" <el-button size="small"
v-if="formType != 'detail'"
type="primary" type="primary"
:disabled="btnDisable" :disabled="btnDisable"
@click="handleComfirm"> </el-button> @click="handleComfirm"> </el-button>
@ -242,9 +240,11 @@ export default {
this.formType = type this.formType = type
if (row) { if (row) {
this.dataForm = JSON.parse(JSON.stringify(row)) this.dataForm = JSON.parse(JSON.stringify(row))
this.dataForm.neighborHoodId = this.dataForm.id this.dataForm.neighborHoodId = this.dataForm.id
this.neighborHoodId = this.dataForm.neighborHoodId this.neighborHoodId = this.dataForm.neighborHoodId
} else { } else {
this.dataForm.latitude = latitude this.dataForm.latitude = latitude
this.dataForm.longitude = longitude this.dataForm.longitude = longitude
@ -473,7 +473,8 @@ export default {
type: 'success', type: 'success',
message: '操作成功' message: '操作成功'
}) })
this.dataForm.propertyId = data.propertyId
this.propertyForm.name = '' this.propertyForm.name = ''
this.propertyFormShow = false this.propertyFormShow = false
this.loadProperty() this.loadProperty()

10
src/views/modules/base/community/communityTable.vue

@ -429,6 +429,7 @@ export default {
this.detailShow = true this.detailShow = true
const _data = await this.detail(row) const _data = await this.detail(row)
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.ref_form_detail.initForm(_data) this.$refs.ref_form_detail.initForm(_data)
}) })
@ -511,7 +512,16 @@ export default {
this.formTitle = '修改小区' this.formTitle = '修改小区'
this.formShow = true this.formShow = true
const _data = await this.detail(row) const _data = await this.detail(row)
this.$nextTick(() => { 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) this.$refs.ref_form.initForm('edit', _data, this.agencyObj)
}) })
}, },

Loading…
Cancel
Save