// 导出明细
redEnvelopeItemDetailExport(row) {
let loading = this.$loading({
lock: true,
spinner: 'el-icon-loading',
text:"正在导出中...",//显示在加载图标下方的加载文案
background:"rgba(0, 0, 0, 0.3)",//遮罩背景色
})
let oParam = {
id: row.id,
pageNo: this.PageInfoDetail.Page,
pageSize: this.PageInfoDetail.PageSize
}
// 添加过滤条件
for (let key in this.redEnvelopeItemDetailDTO) {
if (this.redEnvelopeItemDetailDTO[key] !== '') {
oParam[key] = this.redEnvelopeItemDetailDTO[key]
}
}
this.$api.redEnvelopeApi.redEnvelopeItemDetailExport(oParam).then(res => {
const blob = new Blob([res], {
type: "application/vnd.ms-excel"
});
let link = document.createElement('a');
link.href = URL.createObjectURL(blob);
link.setAttribute('download', '导出文件.xlsx');
link.click();
link = null;
this.$message.success('导出成功');
loading.close()
})
}
elementui添加loading
最新推荐文章于 2024-05-06 16:11:33 发布