diff --git a/src/views/modules/base/community/roomTable.vue b/src/views/modules/base/community/roomTable.vue index 29324579b..04488e517 100644 --- a/src/views/modules/base/community/roomTable.vue +++ b/src/views/modules/base/community/roomTable.vue @@ -209,7 +209,11 @@ export default { // showImportBtn: false,//是否显示操作按钮,根据登录人所属组织判断 agencyObj: {},//树所选的小区对象 - + ownerName: '', + ownerPhone: '', + rentFlag: '', + purpose: '', + remark: '', validTableDataNum: 0,//有效的数据数量,即有权限操作的数据数量 selection: [], @@ -260,13 +264,13 @@ export default { return index + 1; }, handleSortOrderChange (value) { - + console.log(value.column, value.prop, value.order) this.sortType = value.order === 'ascending' ? 'asc' : 'desc' this.loadTable() }, handleSortChange (value) { - + console.log(value.column, value.prop, value.order) this.sortType = value.order === 'ascending' ? 'asc' : 'desc' this.loadTable() @@ -281,7 +285,7 @@ export default { async handleChangeSort (row, index) { // row.isChange = false - + console.log(row.sort) let params = { id: row.houseId, sort: row.sort, @@ -321,7 +325,7 @@ export default { }, - async loadTable (source, treeObj) { + async loadTable (source, treeObj, ownerName, ownerPhone, rentFlag, purpose, remark) { this.source = source this.tableLoading = true @@ -329,10 +333,18 @@ export default { if (source === 'tree') {//来源于tree,查询数据清空 this.sortType = 'asc' this.agencyObj = treeObj - + this.ownerName = null + this.ownerPhone = null + this.rentFlag = null + this.purpose = null + this.remark = null } else if (source === 'search') {//来源于查询 this.agencyObj = treeObj - + this.ownerName = ownerName + this.ownerPhone = ownerPhone + this.rentFlag = rentFlag + this.purpose = purpose + this.remark = remark } // if (fromTree) { @@ -347,9 +359,9 @@ export default { ownerName: this.ownerName, ownerPhone: this.ownerPhone, rentFlag: this.rentFlag, - purpose: this.purpose, - remark: this.remark, sortType: this.sortType, + purpose: this.purpose, + remark: this.remark } const url = "/gov/org/house/houselist" @@ -399,7 +411,7 @@ export default { this.formTitle = '新增房屋' this.formShow = true this.$nextTick(() => { - + console.log(this.agencyObj) this.$refs.ref_form.initForm('add', null, this.agencyObj) }) }, @@ -543,8 +555,8 @@ export default { ownerName: this.ownerName, ownerPhone: this.ownerPhone, rentFlag: this.rentFlag, - purpose: this.purpose, - remark: this.remark, + purpose: this.purpose, + remark: this.remark, buildingId: this.agencyObj.id } @@ -616,40 +628,15 @@ export default { let url = "/gov/org/house/exportHouseUser" - let params = { agencyId: '', gridId: '', ownerName: this.ownerName, ownerPhone: this.ownerPhone, rentFlag: this.rentFlag, - purpose: this.purpose, - remark: this.remark, - buildingId: '', - neighborHoodId: '' - } - - if (this.agencyObj.level === 'grid') { - params.gridId = this.agencyObj.id - params.agencyId = '' - params.buildingId = '' - params.neighborHoodId = '' - } else if (this.agencyObj.level === 'neighborHood') { - params.neighborHoodId = this.agencyObj.id - params.agencyId = '' - params.buildingId = '' - params.gridId = '' - } else if (this.agencyObj.level === 'building') { - params.buildingId = this.agencyObj.id - params.agencyId = '' - params.neighborHoodId = '' - params.gridId = '' - } else { - - params.agencyId = this.agencyObj.id - params.buildingId = '' - params.neighborHoodId = '' - params.gridId = '' + purpose: this.purpose, + remark: this.remark, + buildingId: this.agencyObj.id } app.ajax.exportFilePost( @@ -805,14 +792,14 @@ export default { type: String, default: '', }, - purpose: { - type: String, - default: '', - }, - remark: { - type: String, - default: '', - } + purpose: { + type: String, + default: '', + }, + remark: { + type: String, + default: '', + } } }