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="所属楼栋" <el-form-item label="所属楼栋"
label-width="150px" label-width="150px"
style="display: block"> style="display: block">
<span>{{ agencyObj.neighborHoodName }}{{agencyObj.buildingName}}</span> <span>{{ agencyObj.neighborHoodName }}{{agencyObj.label}}</span>
</el-form-item> </el-form-item>
<el-form-item label="单元号" <el-form-item label="单元号"
@ -166,14 +166,14 @@ export default {
}, },
methods: { methods: {
async initForm (type, houseId, agencyObj) { async initForm (type, row, agencyObj) {
this.$refs.ref_form.resetFields(); this.$refs.ref_form.resetFields();
this.agencyObj = agencyObj this.agencyObj = agencyObj
this.formType = type this.formType = type
if (houseId) { if (row.houseId) {
this.houseId = houseId this.houseId = row.houseId
await this.loadHouseInfo() await this.loadHouseInfo()
// this.dataForm = JSON.parse(JSON.stringify(row)) // this.dataForm = JSON.parse(JSON.stringify(row))
// this.houseId = this.dataForm.houseId // this.houseId = this.dataForm.houseId

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

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

Loading…
Cancel
Save