|
|
@ -2,15 +2,22 @@ |
|
|
|
<div class="resi-container"> |
|
|
|
<el-card ref="searchCard" class="search-card"> |
|
|
|
<el-form ref="searchForm" :inline="true" :model="fmData" class="demo-form-inline"> |
|
|
|
<el-form-item label="所在社区" prop="organizationName"> |
|
|
|
<el-input |
|
|
|
v-model="fmData.organizationName" |
|
|
|
class="resi-cell-input" |
|
|
|
size="small" |
|
|
|
clearable |
|
|
|
placeholder="请输入" |
|
|
|
> |
|
|
|
</el-input> |
|
|
|
<el-form-item label="所在社区" prop="orgId"> |
|
|
|
<el-select |
|
|
|
v-model.trim="fmData.orgId" |
|
|
|
placeholder="所在社区" |
|
|
|
size="small" |
|
|
|
clearable |
|
|
|
class="resi-cell-input" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in communityList" |
|
|
|
:key="item.orgId" |
|
|
|
:label="item.orgName" |
|
|
|
:value="item.orgId" |
|
|
|
> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="居住地址" prop="address"> |
|
|
|
<el-input |
|
|
@ -27,6 +34,7 @@ |
|
|
|
v-model="timeRange" |
|
|
|
type="daterange" |
|
|
|
clearable |
|
|
|
size="small" |
|
|
|
range-separator="至" |
|
|
|
start-placeholder="开始日期" |
|
|
|
end-placeholder="结束日期" |
|
|
@ -42,7 +50,12 @@ |
|
|
|
|
|
|
|
</el-card> |
|
|
|
<el-card class="resi-card-table"> |
|
|
|
|
|
|
|
<div class="resi-row-btn"> |
|
|
|
|
|
|
|
<el-button @click="handleChu" class="diy-button--reset" size="small" |
|
|
|
>导出</el-button |
|
|
|
> |
|
|
|
</div> |
|
|
|
<el-table |
|
|
|
:data="tableData" |
|
|
|
border |
|
|
@ -164,10 +177,12 @@ export default { |
|
|
|
tableData: [], |
|
|
|
timeRange: '', |
|
|
|
fmData: { |
|
|
|
orgId: '', |
|
|
|
startTime: "", |
|
|
|
endTime: "", |
|
|
|
address: '' |
|
|
|
}, |
|
|
|
communityList: [], |
|
|
|
spanIndex: [], // 合并的行 |
|
|
|
importBtnTitle: "导入", |
|
|
|
importLoading: false, |
|
|
@ -175,7 +190,7 @@ export default { |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
maxTableHeight() { |
|
|
|
return this.clientHeight - 320; |
|
|
|
return this.clientHeight - 360; |
|
|
|
}, |
|
|
|
...mapGetters(["clientHeight"]), |
|
|
|
}, |
|
|
@ -191,13 +206,14 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
this.getcommunityList() |
|
|
|
this.getTableData(); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
arraySpanMethod({ row, column, rowIndex, columnIndex }) { |
|
|
|
// console.log('row-----r', row) |
|
|
|
// console.log('column-----c', column) |
|
|
|
if (columnIndex === 0 || columnIndex === 1) { |
|
|
|
if (columnIndex === 0 || columnIndex === 1 || columnIndex === 2 || columnIndex === 3 || columnIndex === 4) { |
|
|
|
let index = this.spanIndex.findIndex(item => item.firstIndex === rowIndex) |
|
|
|
if (index > -1) { |
|
|
|
return { |
|
|
@ -212,7 +228,41 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
async handleChu() { |
|
|
|
const url = |
|
|
|
"/epmetuser/icresicollect/export"; |
|
|
|
const { pageSize, pageNo, fmData } = this; |
|
|
|
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("网络错误"); |
|
|
|
}); |
|
|
|
}, |
|
|
|
handleSizeChange(val) { |
|
|
|
console.log(`每页 ${val} 条`); |
|
|
|
this.pageSize = val; |
|
|
@ -272,7 +322,16 @@ export default { |
|
|
|
this.$message.success("操作失败!"); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
async getcommunityList() { |
|
|
|
const url = |
|
|
|
"/gov/org/agency/community-list"; |
|
|
|
const { data, code, msg } = await requestPost(url); |
|
|
|
if (code === 0) { |
|
|
|
console.log("列表请求成功!!!!!!!!!!!!!!"); |
|
|
|
this.communityList = data |
|
|
|
} else { |
|
|
|
} |
|
|
|
}, |
|
|
|
async getTableData() { |
|
|
|
const url = |
|
|
|
"/epmetuser/icresicollect/list"; |
|
|
@ -286,7 +345,6 @@ export default { |
|
|
|
console.log("列表请求成功!!!!!!!!!!!!!!"); |
|
|
|
this.total = data.total || 0; |
|
|
|
let _i = 0 |
|
|
|
let firstIndex = 0 |
|
|
|
let arr = [] |
|
|
|
this.spanIndex = data.list && data.list.map((item, index) => { |
|
|
|
if (index == 0) _i = 0 |
|
|
|