From 1b22c133447aa0580ea87264f55e4d09d6d0c2bd Mon Sep 17 00:00:00 2001 From: jiangyy Date: Wed, 20 Apr 2022 10:55:24 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B5=E7=A0=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/base/community/community.vue | 4 +- .../modules/base/community/roomTable.vue | 54 +++++++------------ 2 files changed, 20 insertions(+), 38 deletions(-) diff --git a/src/views/modules/base/community/community.vue b/src/views/modules/base/community/community.vue index 6fcb0779..caf10569 100644 --- a/src/views/modules/base/community/community.vue +++ b/src/views/modules/base/community/community.vue @@ -195,7 +195,7 @@ export default { if (this.ownerName || this.ownerPhone || this.rentState) { this.showRoomTable = true this.$nextTick(() => { - this.$refs['ref_buildingTable'].loadTable(true, this.selTreeObj, this.ownerName, this.ownerPhone, this.rentState) + this.$refs['ref_buildingTable'].loadTable('search', this.selTreeObj, this.ownerName, this.ownerPhone, this.rentState) }) } else { this.$message.warning('请输入查询条件') @@ -287,7 +287,7 @@ export default { this.$nextTick(() => { if (obj.level === 'building') {//点击楼栋 - this.$refs['ref_buildingTable'].loadTable(true, this.selTreeObj) + this.$refs['ref_buildingTable'].loadTable('tree', this.selTreeObj) } else if (obj.level === 'neighborHood') {//点击小区 this.$refs['ref_neighTable'].loadTable(true, this.selTreeObj) diff --git a/src/views/modules/base/community/roomTable.vue b/src/views/modules/base/community/roomTable.vue index 91e30c8e..4f220ff9 100644 --- a/src/views/modules/base/community/roomTable.vue +++ b/src/views/modules/base/community/roomTable.vue @@ -234,51 +234,33 @@ export default { }, - async loadTable (fromTree, treeObj, ownerName, ownerPhone, rentFlag) { + async loadTable (source, treeObj, ownerName, ownerPhone, rentFlag) { this.tableLoading = true - this.ownerName = ownerName - this.ownerPhone = ownerPhone - this.rentFlag = rentFlag - let params - - if (fromTree) { + if (source === 'tree') {//来源于tree,查询数据清空 this.agencyObj = treeObj - // if (this.agencyObj.level === 'community') {//只有社区和网格显示操作按钮 - // if (this.agencyObj.id === this.staffAgencyId) {//如果所选树的组织id和登录人员id相同,有权限 - // this.showImportBtn = true - // } else { - // this.showImportBtn = false - // } - // } else if (this.agencyObj.level === 'grid') {//网格下 - // if (this.agencyObj.pid === this.staffAgencyId) {//如果所选树的父级组织id和登录人员id相同,有权限 - // this.showImportBtn = true - // } else { - // this.showImportBtn = false - // } - // } else { - // this.showImportBtn = false - // } - + this.ownerName = null + this.ownerPhone = null + this.rentFlag = null + } else if (source === 'search') {//来源于查询 + this.ownerName = ownerName + this.ownerPhone = ownerPhone + this.rentFlag = rentFlag } - params = { + + // if (fromTree) { + // this.agencyObj = treeObj + + // } + let params = { pageSize: this.pageSize, pageNo: this.pageNo, level: this.agencyObj.level, id: this.agencyObj.id, - } - - if (ownerName) { - params.ownerName = ownerName - - } - if (ownerPhone) { - params.ownerPhone = ownerPhone - - } - if (rentFlag) { - params.rentFlag = rentFlag + ownerName: this.ownerName, + ownerPhone: this.ownerPhone, + rentFlag: this.rentFlag, } const url = "/gov/org/house/houselist"