diff --git a/src/views/modules/base/community/buildTable.vue b/src/views/modules/base/community/buildTable.vue
index 290d53a4..125a8feb 100644
--- a/src/views/modules/base/community/buildTable.vue
+++ b/src/views/modules/base/community/buildTable.vue
@@ -52,6 +52,10 @@
class="diy-button--more"
size="small"
@click="deleteBatch">批量删除
+ 导出一户一档
@@ -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) {
@@ -725,6 +761,18 @@ export default {
type: Boolean,
default: false,
},
+ ownerName: {
+ type: String,
+ default: '',
+ },
+ ownerPhone: {
+ type: String,
+ default: '',
+ },
+ rentFlag: {
+ type: String,
+ default: '',
+ },
}
}
diff --git a/src/views/modules/base/community/community.vue b/src/views/modules/base/community/community.vue
index 156903b8..01f94046 100644
--- a/src/views/modules/base/community/community.vue
+++ b/src/views/modules/base/community/community.vue
@@ -62,7 +62,7 @@
@@ -92,18 +92,27 @@
ref="ref_neighTable"
:staffAgencyId="staffAgencyId"
:showImportBtn="showImportBtn"
+ :ownerName="ownerName"
+ :ownerPhone="ownerPhone"
+ :rentFlag="rentFlag"
@toNextLevel="toNextLevel"
@refreshTree="refreshTree">
@@ -156,7 +165,7 @@ export default {
],
ownerName: '',
ownerPhone: '',
- rentState: '',
+ rentFlag: '',
showRoomTable: false,
selObj: {},
}
@@ -197,11 +206,11 @@ export default {
methods: {
handleSearch () {
- if (this.ownerName || this.ownerPhone || this.rentState) {
+ if (this.ownerName || this.ownerPhone || this.rentFlag) {
this.showRoomTable = true
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 {
this.$message.warning('请输入查询条件')
@@ -214,7 +223,7 @@ export default {
resetSearch () {
this.ownerName = ''
this.ownerPhone = ''
- this.rentState = ''
+ this.rentFlag = ''
this.pageSize = 10
this.pageNo = 1
@@ -285,7 +294,7 @@ export default {
handleNodeClick (obj) {
this.ownerName = ''
this.ownerPhone = ''
- this.rentState = ''
+ this.rentFlag = ''
this.showRoomTable = false
this.selObj = JSON.parse(JSON.stringify(obj))
diff --git a/src/views/modules/base/community/communityTable.vue b/src/views/modules/base/community/communityTable.vue
index e93868af..11aaf2be 100644
--- a/src/views/modules/base/community/communityTable.vue
+++ b/src/views/modules/base/community/communityTable.vue
@@ -61,6 +61,7 @@
size="small"
class="diy-button--delete">导入房屋数据
+
批量删除
+
导出一户一档
@@ -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) {
this.files = file;
@@ -717,6 +760,18 @@ export default {
type: String,
default: '',
},
+ ownerName: {
+ type: String,
+ default: '',
+ },
+ ownerPhone: {
+ type: String,
+ default: '',
+ },
+ rentFlag: {
+ type: String,
+ default: '',
+ },
}
}
diff --git a/src/views/modules/base/community/roomTable.vue b/src/views/modules/base/community/roomTable.vue
index 49574f4c..5f4c75f0 100644
--- a/src/views/modules/base/community/roomTable.vue
+++ b/src/views/modules/base/community/roomTable.vue
@@ -35,6 +35,10 @@
class="diy-button--more"
size="small"
@click="deleteBatch">批量删除
+ 导出一户一档
@@ -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) {
this.files = file;
@@ -730,6 +764,18 @@ export default {
type: Boolean,
default: false,
},
+ ownerName: {
+ type: String,
+ default: '',
+ },
+ ownerPhone: {
+ type: String,
+ default: '',
+ },
+ rentFlag: {
+ type: String,
+ default: '',
+ },
}
}
diff --git a/src/views/modules/base/huji/immigration/edit.vue b/src/views/modules/base/huji/immigration/edit.vue
index 437ac47e..55830b1c 100644
--- a/src/views/modules/base/huji/immigration/edit.vue
+++ b/src/views/modules/base/huji/immigration/edit.vue
@@ -123,8 +123,6 @@
>
@@ -288,27 +286,26 @@
0) {
const labels = this.$refs.nowArea.getCheckedNodes()[0].pathLabels
- this.fmData.presentAddressCode = val[val.length - 1]
- this.fmData.presentAddress = labels.join('-')
- this.fmData.presentAddressPathCode = val.join(',')
- console.log('presentAddress', this.formData.presentAddress)
- this.$refs.ref_form.clearValidate('presentAddress')
+ this.fmData.sourceAddressCode = val[val.length - 1]
+ this.fmData.sourceAddress = labels.join('-')
+ this.fmData.sourceAddressPathCode = val.join(',')
+ console.log('sourceAddress', this.fmData.sourceAddressPathCode)
+ this.$refs.ref_form.clearValidate('sourceAddress')
} else {
- this.fmData.presentAddressCode = ''
- this.fmData.presentAddress = ''
- this.fmData.presentAddressPathCode = ''
+ this.fmData.sourceAddressCode = ''
+ this.fmData.sourceAddress = ''
+ this.fmData.sourceAddressPathCode = ''
}
},
handleBlurId(val) {
@@ -707,9 +709,10 @@ export default {
return this.$message.error(res.msg)
} else {
console.log('获取户主信息成功', res.data)
- const { name } = res.data
- if (name) {
- this.fmData.houseHolderName = name
+
+ if (res.data) {
+ const { name } = res.data
+ this.fmData.householderName = name
this.alreadyHaveMaster = true
} else {
this.alreadyHaveMaster = false
@@ -725,8 +728,14 @@ export default {
this.$refs.ref_form.resetFields()
this.formType = type
+
if (id) {
- this.getDatail(id)
+ await this.getDatail(id)
+ }
+ if (this.formType != 'add') {
+ this.getBuildList()
+ this.getUniList()
+ this.getHouseList()
}
},
async getDatail(moveInId) {
@@ -735,17 +744,18 @@ export default {
const params = {
moveInId: moveInId || ''
}
- const { data, code, msg } = await requestPost(url, this.fmData)
+ const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.fmData = { ...data }
+ this.nowAllCode = data.sourceAddressPathCode && data.sourceAddressPathCode.split(',')
} else this.$message.error(msg)
},
async handleComfirm() {
this.btnDisable = true
- setTimeout(() => {
- this.btnDisable = false
- }, 10000)
+ // setTimeout(() => {
+ // this.btnDisable = false
+ // }, 10000)
this.$refs['ref_form'].validate((valid, messageObj) => {
if (!valid) {
app.util.validateRule(messageObj)
@@ -763,9 +773,27 @@ export default {
},
async submit() {
+ if (this.fmData.isCHeck && this.userInfo && this.userInfo.resiHomeId) {
+ const { user } = this.$store.state
+ if (user.agencyId == this.userInfo.resiAgencyId) {
+ if (this.userInfo.resiHomeId !== this.fmData.homeId) {
+ this.$confirm('居民信息中房屋信息与当前选择房屋不一致,是否更新?', '提示', {
+ confirmButtonText: '更新',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ this.fmData.isReplace = '1'
+ }).catch(() => {
+ this.fmData.isReplace = '0'
+ });
+ return
+ }
+ }
+
+ }
let url = ''
if (this.formType === 'add') {
- url = '/epmetuser/icMoveIn/save'
+ url = '/epmetuser/icMoveIn/add'
} else {
url = '/epmetuser/icMoveIn/edit'
@@ -795,6 +823,7 @@ export default {
resetData() {
this.orgId = ''
this.nowAllCode = []
+ this.btnDisable = false
this.fmData = iniFmData()
}
}
diff --git a/src/views/modules/base/huji/immigration/index.vue b/src/views/modules/base/huji/immigration/index.vue
index f49e38cd..897365ca 100644
--- a/src/views/modules/base/huji/immigration/index.vue
+++ b/src/views/modules/base/huji/immigration/index.vue
@@ -235,7 +235,7 @@
border
style="width: 100%"
class="resi-table"
- :height="maxTableHeight"
+ :height="tableHeight"
>
-
+ />
{
+ this.tableHeight = this.$store.state.inIframe ? h : _h
+ })
}
},
mounted() {
this.getGridList()
this.getValiheList()
this.getTableData()
+ this.searchH = this.$refs.searchCard.$el.offsetHeight + 260
+ console.log('searchH----', this.$refs.searchCard.$el.offsetHeight)
},
methods: {
handleClearVillage() {
@@ -796,38 +809,99 @@ export default {
async handleChu() {
const url =
- '/heart/iccommunityselforganization/exportcommunityselforganization'
+ '/epmetuser/icMoveIn/export'
const { pageSize, pageNo, fmData } = this
- axios({
- url: window.SITE_CONFIG['apiURL'] + url,
- method: 'post',
+ await this.$http({
+ method: 'POST',
+ url,
+ responseType: 'blob',
data: {
pageSize,
pageNo,
...fmData
- },
- responseType: 'blob'
+ }
})
- .then((res) => {
- let fileName = window.decodeURI(
- res.headers['content-disposition'].split(';')[1].split('=')[1]
- )
- console.log('filename', fileName)
- let blob = new Blob([res.data], { type: 'application/vnd.ms-excel' })
- var url = window.URL.createObjectURL(blob)
- var aLink = document.createElement('a')
- aLink.style.display = 'none'
- aLink.href = url
- aLink.setAttribute('download', fileName)
- document.body.appendChild(aLink)
- aLink.click()
- document.body.removeChild(aLink) //下载完成移除元素
- window.URL.revokeObjectURL(url) //释放掉blob对象
+ .then(res => {
+ console.log('res----dddd', res)
+ // this.download(res.data, title + '.xls')
+ // this.getTemplateList()
+
+ // this.exportLoading = false
+ // if (res.data.code && res.data.code == 9999) {
+ // return this.$message.error(res.data.msg)
+ // }
+ this.formatData(res)
+
})
- .catch((err) => {
- console.log('获取导出情失败', err)
+ .catch(err => {
+ console.log('err', err)
+ this.exportLoading = false
return this.$message.error('网络错误')
})
+ // axios({
+ // url: window.SITE_CONFIG['apiURL'] + url,
+ // method: 'post',
+ // data: {
+ // pageSize,
+ // pageNo,
+ // ...fmData
+ // },
+ // responseType: 'blob'
+ // })
+ // .then((res) => {
+ // let fileName = window.decodeURI(
+ // res.headers['content-disposition'].split(';')[1].split('=')[1]
+ // )
+ // console.log('filename', fileName)
+ // let blob = new Blob([res.data], { type: 'application/vnd.ms-excel' })
+ // var url = window.URL.createObjectURL(blob)
+ // var aLink = document.createElement('a')
+ // aLink.style.display = 'none'
+ // aLink.href = url
+ // aLink.setAttribute('download', fileName)
+ // document.body.appendChild(aLink)
+ // aLink.click()
+ // document.body.removeChild(aLink) //下载完成移除元素
+ // window.URL.revokeObjectURL(url) //释放掉blob对象
+ // })
+ // .catch((err) => {
+ // console.log('获取导出情失败', err)
+ // return this.$message.error('网络错误')
+ // })
+ },
+ formatData(res) {
+ const fileReader = new FileReader()
+ fileReader.onloadend = () => {
+ try {
+ const jsonData = JSON.parse(fileReader.result) // 说明是普通对象数据,后台转换失败
+ // 后台信息
+ console.log('jsonData---1', jsonData)
+ return this.$message.error(jsonData.msg)
+ } catch (err) { // 解析成对象失败,说明是正常的文件流
+ // 下载文件
+ console.log('errr-----', err, this)
+ this.downloadFile(res)
+ }
+ }
+ fileReader.readAsText(res.data)
+ },
+ downloadFile(res) {
+ if (res.headers["content-disposition"]) {
+ let fileName = window.decodeURI(res.headers["content-disposition"].split(";")[1].split("=")[1])
+ console.log('filename', fileName)
+ let blob = new Blob([res.data], { type: 'application/vnd.ms-excel' })
+ var url = window.URL.createObjectURL(blob)
+ var aLink = document.createElement('a')
+ aLink.style.display = 'none'
+ aLink.href = url
+ aLink.setAttribute('download', fileName)
+ document.body.appendChild(aLink)
+ aLink.click()
+ document.body.removeChild(aLink) //下载完成移除元素
+ window.URL.revokeObjectURL(url) //释放掉blob对象
+ this.$message.success('导出成功')
+ this.$emit('close')
+ } else this.$message.error('下载失败')
},
async handleWatch(rowIndex) {
@@ -923,9 +997,9 @@ export default {
overflow: visible;
}
-.demo-form-inline .resi-cell {
- display: flex;
- align-items: center;
+.demo-form-inline {
+ // display: flex;
+ // align-items: center;
// margin-bottom: 20px;
.resi-cell-label {
@@ -965,6 +1039,7 @@ export default {
margin-right: 0;
}
}
+
.mt10 {
margin-top: 10px;
}