Browse Source

11

shibei_master
jiangyy 3 years ago
parent
commit
1e3771d983
  1. 8
      src/views/modules/base/community/roomForm.vue
  2. 9
      src/views/modules/base/community/roomTable.vue

8
src/views/modules/base/community/roomForm.vue

@ -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="单元号"
@ -166,14 +166,14 @@ export default {
},
methods: {
async initForm (type, houseId, agencyObj) {
async initForm (type, row, agencyObj) {
this.$refs.ref_form.resetFields();
this.agencyObj = agencyObj
this.formType = type
if (houseId) {
if (row.houseId) {
this.houseId = houseId
this.houseId = row.houseId
await this.loadHouseInfo()
// this.dataForm = JSON.parse(JSON.stringify(row))
// this.houseId = this.dataForm.houseId

9
src/views/modules/base/community/roomTable.vue

@ -2,7 +2,8 @@
<div>
<div class="div_btn">
<el-button style="float:left"
<el-button v-if="agencyObj.level==='building'||source!=='search'"
style="float:left"
class="diy-button--add"
size="small"
@click="handleAdd">新增房屋</el-button>
@ -162,6 +163,7 @@ let loading // 加载动画
export default {
data () {
return {
source: 'tree',//
importRoomLoading: false,
total: 0,
pageSize: 20,
@ -236,6 +238,7 @@ export default {
async loadTable (source, treeObj, ownerName, ownerPhone, rentFlag) {
this.source = source
this.tableLoading = true
if (source === 'tree') {//tree
@ -299,7 +302,7 @@ export default {
this.formShow = true
this.$nextTick(() => {
this.$refs.ref_form.initForm('detail', row.houseId, this.agencyObj)
this.$refs.ref_form.initForm('detail', row, this.agencyObj)
})
},
@ -317,7 +320,7 @@ export default {
this.formTitle = '修改房屋'
this.formShow = true
this.$nextTick(() => {
this.$refs.ref_form.initForm('edit', row.houseId, this.agencyObj)
this.$refs.ref_form.initForm('edit', row, this.agencyObj)
})
},

Loading…
Cancel
Save