Browse Source

一区一户

shibei_master
jiangyy 3 years ago
parent
commit
afd969583f
  1. 48
      src/views/modules/base/community/buildTable.vue
  2. 21
      src/views/modules/base/community/community.vue
  3. 55
      src/views/modules/base/community/communityTable.vue
  4. 46
      src/views/modules/base/community/roomTable.vue

48
src/views/modules/base/community/buildTable.vue

@ -52,6 +52,10 @@
class="diy-button--more" class="diy-button--more"
size="small" size="small"
@click="deleteBatch">批量删除</el-button> @click="deleteBatch">批量删除</el-button>
<el-button style=";margin-left:10px"
class="diy-button--export"
size="small"
@click="handleExportYihuyidang()">导出一户一档</el-button>
</div> </div>
<div class="div_table_item"> <div class="div_table_item">
@ -582,6 +586,38 @@ export default {
); );
}, },
//
handleExportYihuyidang () {
let title = this.agencyObj.label
title = title + '-一户一档'
let url = "/gov/org/house/exportHouseUser"
let params = {
agencyId: '',
gridId: '',
ownerName: this.ownerName,
ownerPhone: this.ownerPhone,
rentFlag: this.rentFlag,
neighborHoodId: this.agencyObj.id
}
app.ajax.exportFilePost(
url,
params,
(data, rspMsg) => {
this.download(data, title + '.xls')
},
(rspMsg, data) => {
this.$message.error(rspMsg);
}
);
},
// //
beforeUpload (file, type) { beforeUpload (file, type) {
@ -725,6 +761,18 @@ export default {
type: Boolean, type: Boolean,
default: false, default: false,
}, },
ownerName: {
type: String,
default: '',
},
ownerPhone: {
type: String,
default: '',
},
rentFlag: {
type: String,
default: '',
},
} }
} }
</script> </script>

21
src/views/modules/base/community/community.vue

@ -62,7 +62,7 @@
<div class="resi-cell-value"> <div class="resi-cell-value">
<el-select class="item_width_1" <el-select class="item_width_1"
v-model="rentState" v-model="rentFlag"
placeholder="请选择" placeholder="请选择"
size="small" size="small"
clearable> clearable>
@ -92,18 +92,27 @@
ref="ref_neighTable" ref="ref_neighTable"
:staffAgencyId="staffAgencyId" :staffAgencyId="staffAgencyId"
:showImportBtn="showImportBtn" :showImportBtn="showImportBtn"
:ownerName="ownerName"
:ownerPhone="ownerPhone"
:rentFlag="rentFlag"
@toNextLevel="toNextLevel" @toNextLevel="toNextLevel"
@refreshTree="refreshTree"></build-table> @refreshTree="refreshTree"></build-table>
<room-table v-if="showRoomTable||selTreeObj.level==='building'" <room-table v-if="showRoomTable||selTreeObj.level==='building'"
:staffAgencyId="staffAgencyId" :staffAgencyId="staffAgencyId"
:showImportBtn="showImportBtn" :showImportBtn="showImportBtn"
:ownerName="ownerName"
:ownerPhone="ownerPhone"
:rentFlag="rentFlag"
ref="ref_buildingTable" ref="ref_buildingTable"
@refreshTree="refreshTree"></room-table> @refreshTree="refreshTree"></room-table>
<community-table v-if="selTreeObj.level!=='building'&&selTreeObj.level!=='neighborHood'&&!showRoomTable" <community-table v-if="selTreeObj.level!=='building'&&selTreeObj.level!=='neighborHood'&&!showRoomTable"
@toNextLevel="toNextLevel" @toNextLevel="toNextLevel"
:staffAgencyId="staffAgencyId" :staffAgencyId="staffAgencyId"
:ownerName="ownerName"
:ownerPhone="ownerPhone"
:rentFlag="rentFlag"
ref="ref_communityTable" ref="ref_communityTable"
@refreshTree="refreshTree"></community-table> @refreshTree="refreshTree"></community-table>
@ -156,7 +165,7 @@ export default {
], ],
ownerName: '', ownerName: '',
ownerPhone: '', ownerPhone: '',
rentState: '', rentFlag: '',
showRoomTable: false, showRoomTable: false,
selObj: {}, selObj: {},
} }
@ -197,11 +206,11 @@ export default {
methods: { methods: {
handleSearch () { handleSearch () {
if (this.ownerName || this.ownerPhone || this.rentState) { if (this.ownerName || this.ownerPhone || this.rentFlag) {
this.showRoomTable = true this.showRoomTable = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['ref_buildingTable'].loadTable('search', this.selTreeObj, this.ownerName, this.ownerPhone, this.rentState) this.$refs['ref_buildingTable'].loadTable('search', this.selTreeObj, this.ownerName, this.ownerPhone, this.rentFlag)
}) })
} else { } else {
this.$message.warning('请输入查询条件') this.$message.warning('请输入查询条件')
@ -214,7 +223,7 @@ export default {
resetSearch () { resetSearch () {
this.ownerName = '' this.ownerName = ''
this.ownerPhone = '' this.ownerPhone = ''
this.rentState = '' this.rentFlag = ''
this.pageSize = 10 this.pageSize = 10
this.pageNo = 1 this.pageNo = 1
@ -285,7 +294,7 @@ export default {
handleNodeClick (obj) { handleNodeClick (obj) {
this.ownerName = '' this.ownerName = ''
this.ownerPhone = '' this.ownerPhone = ''
this.rentState = '' this.rentFlag = ''
this.showRoomTable = false this.showRoomTable = false
this.selObj = JSON.parse(JSON.stringify(obj)) this.selObj = JSON.parse(JSON.stringify(obj))

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

@ -61,6 +61,7 @@
size="small" size="small"
class="diy-button--delete">导入房屋数据</el-button> class="diy-button--delete">导入房屋数据</el-button>
</el-upload> </el-upload>
</div> </div>
<el-button style="margin-left:10px" <el-button style="margin-left:10px"
class="diy-button--reset" class="diy-button--reset"
@ -75,6 +76,10 @@
class="diy-button--more" class="diy-button--more"
size="small" size="small"
@click="deleteBatch">批量删除</el-button> @click="deleteBatch">批量删除</el-button>
<el-button style=";margin-left:10px"
class="diy-button--export"
size="small"
@click="handleExportYihuyidang()">导出一户一档</el-button>
</div> </div>
@ -562,6 +567,44 @@ export default {
); );
}, },
//
handleExportYihuyidang () {
let title = this.agencyObj.label
title = title + '-一户一档'
let url = "/gov/org/house/exportHouseUser"
let params = {
agencyId: '',
gridId: '',
ownerName: this.ownerName,
ownerPhone: this.ownerPhone,
rentFlag: this.rentFlag,
}
if (this.agencyObj.level === 'grid') {
params.gridId = this.agencyObj.id
params.agencyId = ''
} else {
params.gridId = ''
params.agencyId = this.agencyObj.id
}
app.ajax.exportFilePost(
url,
params,
(data, rspMsg) => {
this.download(data, title + '.xls')
},
(rspMsg, data) => {
this.$message.error(rspMsg);
}
);
},
// //
beforeUpload (file, type) { beforeUpload (file, type) {
this.files = file; this.files = file;
@ -717,6 +760,18 @@ export default {
type: String, type: String,
default: '', default: '',
}, },
ownerName: {
type: String,
default: '',
},
ownerPhone: {
type: String,
default: '',
},
rentFlag: {
type: String,
default: '',
},
} }
} }

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

@ -35,6 +35,10 @@
class="diy-button--more" class="diy-button--more"
size="small" size="small"
@click="deleteBatch">批量删除</el-button> @click="deleteBatch">批量删除</el-button>
<el-button style=";margin-left:10px"
class="diy-button--export"
size="small"
@click="handleExportYihuyidang()">导出一户一档</el-button>
</div> </div>
<div class="div_table_item "> <div class="div_table_item ">
@ -603,6 +607,36 @@ export default {
); );
}, },
//
handleExportYihuyidang () {
let title = this.agencyObj.label
title = title + '-一户一档'
let url = "/gov/org/house/exportHouseUser"
let params = {
agencyId: '',
gridId: '',
ownerName: this.ownerName,
ownerPhone: this.ownerPhone,
rentFlag: this.rentFlag,
buildingId: this.agencyObj.id
}
app.ajax.exportFilePost(
url,
params,
(data, rspMsg) => {
this.download(data, title + '.xls')
},
(rspMsg, data) => {
this.$message.error(rspMsg);
}
);
},
// //
beforeUpload (file) { beforeUpload (file) {
this.files = file; this.files = file;
@ -730,6 +764,18 @@ export default {
type: Boolean, type: Boolean,
default: false, default: false,
}, },
ownerName: {
type: String,
default: '',
},
ownerPhone: {
type: String,
default: '',
},
rentFlag: {
type: String,
default: '',
},
} }
} }
</script> </script>

Loading…
Cancel
Save