|
|
@ -235,7 +235,7 @@ |
|
|
|
border |
|
|
|
style="width: 100%" |
|
|
|
class="resi-table" |
|
|
|
:height="maxTableHeight" |
|
|
|
:height="tableHeight" |
|
|
|
> |
|
|
|
<el-table-column |
|
|
|
label="序号" |
|
|
@ -269,13 +269,12 @@ |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column |
|
|
|
prop="homeName" |
|
|
|
prop="allName" |
|
|
|
label="所属房屋" |
|
|
|
align="center" |
|
|
|
min-width="160" |
|
|
|
:show-overflow-tooltip="true" |
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
/> |
|
|
|
|
|
|
|
<el-table-column |
|
|
|
prop="mobile" |
|
|
@ -317,7 +316,7 @@ |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column |
|
|
|
prop="source" |
|
|
|
prop="sourceAddress" |
|
|
|
min-width="160" |
|
|
|
align="center" |
|
|
|
label="由何地迁入" |
|
|
@ -333,7 +332,7 @@ |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column |
|
|
|
prop="houseName" |
|
|
|
prop="householderName" |
|
|
|
min-width="100" |
|
|
|
align="center" |
|
|
|
label="户主姓名" |
|
|
@ -341,7 +340,7 @@ |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column |
|
|
|
prop="houseRelationName" |
|
|
|
prop="householderRelationName" |
|
|
|
align="center" |
|
|
|
min-width="100" |
|
|
|
label="与户主关系" |
|
|
@ -432,7 +431,7 @@ export default { |
|
|
|
openSearch: false, |
|
|
|
|
|
|
|
formShow: false, |
|
|
|
formTitle: '出生登记', |
|
|
|
formTitle: '迁入登记', |
|
|
|
|
|
|
|
pageNo: 1, |
|
|
|
pageSize: window.localStorage.getItem('pageSize') || 20, |
|
|
@ -475,18 +474,21 @@ export default { |
|
|
|
importBtnTitle: '导入', |
|
|
|
importLoading: false, |
|
|
|
|
|
|
|
//积分记录 |
|
|
|
scoreDiaTitle: '积分记录', |
|
|
|
scoreDiaShow: false |
|
|
|
searchH: 0, |
|
|
|
tableHeight: 0 |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
...mapGetters(['clientHeight', 'iframeHeight']), |
|
|
|
maxTableHeight() { |
|
|
|
return this.$store.state.inIframe |
|
|
|
? this.clientHeight - 360 + this.iframeHeigh |
|
|
|
: this.clientHeight - 360 |
|
|
|
console.log('computed-searchH---', this.searchH) |
|
|
|
const h = this.clientHeight - this.searchH + this.iframeHeight |
|
|
|
const _h = this.clientHeight - this.searchH |
|
|
|
console.log('computed-searchH---_h', _h) |
|
|
|
return this.$store.state.inIframe ? h : _h |
|
|
|
|
|
|
|
}, |
|
|
|
...mapGetters(['clientHeight', 'iframeHeight']), |
|
|
|
|
|
|
|
changeVDisabled() { |
|
|
|
return !this.fmData.villageId |
|
|
|
}, |
|
|
@ -506,12 +508,23 @@ export default { |
|
|
|
this.fmData.startTime = '' |
|
|
|
this.fmData.endTime = '' |
|
|
|
} |
|
|
|
}, |
|
|
|
searchH() { |
|
|
|
const h = this.clientHeight - this.searchH + this.iframeHeight |
|
|
|
const _h = this.clientHeight - this.searchH |
|
|
|
console.log('computed-searchH---_h', _h) |
|
|
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
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; |
|
|
|
} |
|
|
|