Browse Source

Merge branch 'feature/addsearch' into dev

# Conflicts:
#	src/views/modules/base/community/roomTable.vue
test
wanggongfeng 3 years ago
parent
commit
a44136fa63
  1. 83
      src/views/modules/base/community/roomTable.vue

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

@ -209,7 +209,11 @@ export default {
// showImportBtn: false,// // showImportBtn: false,//
agencyObj: {},// agencyObj: {},//
ownerName: '',
ownerPhone: '',
rentFlag: '',
purpose: '',
remark: '',
validTableDataNum: 0,// validTableDataNum: 0,//
selection: [], selection: [],
@ -260,13 +264,13 @@ export default {
return index + 1; return index + 1;
}, },
handleSortOrderChange (value) { handleSortOrderChange (value) {
console.log(value.column, value.prop, value.order)
this.sortType = value.order === 'ascending' ? 'asc' : 'desc' this.sortType = value.order === 'ascending' ? 'asc' : 'desc'
this.loadTable() this.loadTable()
}, },
handleSortChange (value) { handleSortChange (value) {
console.log(value.column, value.prop, value.order)
this.sortType = value.order === 'ascending' ? 'asc' : 'desc' this.sortType = value.order === 'ascending' ? 'asc' : 'desc'
this.loadTable() this.loadTable()
@ -281,7 +285,7 @@ export default {
async handleChangeSort (row, index) { async handleChangeSort (row, index) {
// row.isChange = false // row.isChange = false
console.log(row.sort)
let params = { let params = {
id: row.houseId, id: row.houseId,
sort: row.sort, 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.source = source
this.tableLoading = true this.tableLoading = true
@ -329,10 +333,18 @@ export default {
if (source === 'tree') {//tree if (source === 'tree') {//tree
this.sortType = 'asc' this.sortType = 'asc'
this.agencyObj = treeObj this.agencyObj = treeObj
this.ownerName = null
this.ownerPhone = null
this.rentFlag = null
this.purpose = null
this.remark = null
} else if (source === 'search') {// } else if (source === 'search') {//
this.agencyObj = treeObj this.agencyObj = treeObj
this.ownerName = ownerName
this.ownerPhone = ownerPhone
this.rentFlag = rentFlag
this.purpose = purpose
this.remark = remark
} }
// if (fromTree) { // if (fromTree) {
@ -347,9 +359,9 @@ export default {
ownerName: this.ownerName, ownerName: this.ownerName,
ownerPhone: this.ownerPhone, ownerPhone: this.ownerPhone,
rentFlag: this.rentFlag, rentFlag: this.rentFlag,
purpose: this.purpose,
remark: this.remark,
sortType: this.sortType, sortType: this.sortType,
purpose: this.purpose,
remark: this.remark
} }
const url = "/gov/org/house/houselist" const url = "/gov/org/house/houselist"
@ -399,7 +411,7 @@ export default {
this.formTitle = '新增房屋' this.formTitle = '新增房屋'
this.formShow = true this.formShow = true
this.$nextTick(() => { this.$nextTick(() => {
console.log(this.agencyObj)
this.$refs.ref_form.initForm('add', null, this.agencyObj) this.$refs.ref_form.initForm('add', null, this.agencyObj)
}) })
}, },
@ -543,8 +555,8 @@ export default {
ownerName: this.ownerName, ownerName: this.ownerName,
ownerPhone: this.ownerPhone, ownerPhone: this.ownerPhone,
rentFlag: this.rentFlag, rentFlag: this.rentFlag,
purpose: this.purpose, purpose: this.purpose,
remark: this.remark, remark: this.remark,
buildingId: this.agencyObj.id buildingId: this.agencyObj.id
} }
@ -616,40 +628,15 @@ export default {
let url = "/gov/org/house/exportHouseUser" let url = "/gov/org/house/exportHouseUser"
let params = { let params = {
agencyId: '', agencyId: '',
gridId: '', gridId: '',
ownerName: this.ownerName, ownerName: this.ownerName,
ownerPhone: this.ownerPhone, ownerPhone: this.ownerPhone,
rentFlag: this.rentFlag, rentFlag: this.rentFlag,
purpose: this.purpose, purpose: this.purpose,
remark: this.remark, remark: this.remark,
buildingId: '', buildingId: this.agencyObj.id
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 = ''
} }
app.ajax.exportFilePost( app.ajax.exportFilePost(
@ -805,14 +792,14 @@ export default {
type: String, type: String,
default: '', default: '',
}, },
purpose: { purpose: {
type: String, type: String,
default: '', default: '',
}, },
remark: { remark: {
type: String, type: String,
default: '', default: '',
} }
} }
} }
</script> </script>

Loading…
Cancel
Save