提交 5d7ecda0 编写于 作者: bo.dang's avatar bo.dang

下载优化

上级 aceecab6
......@@ -1133,13 +1133,9 @@ export default {
downlodExcel(){
let params = {
// rtcId: this.rtcId
rtcId: 372
}
rtcId: this.rtcId
// rtcId: 372
};
downloadSigninfo(params).then((res) => {
// vm.GET(`rtc/liveAdmin/download/signInfo/` + params.rtcId, { responseType: 'blob' }).then((res) => {
closeLoading(this);
......@@ -1152,17 +1148,17 @@ export default {
// aLink.click();
// this.$refs.loadElement.appendChild(aLink);
this.downloadExcelFile(res.data, 2);
// setTimeout(() => {
// window.open(downloadUrl);
// }, 500);
// if(res.code == "000000") {
// this.$message.success("下载成功");
// // vm.getLiveList("", "");
// } else {
// this.$message.error("下载失败,请重试");
// }
if(res.code == "000000") {
this.downloadExcelFile(res.data);
this.$message.success("下载成功");
// vm.getLiveList("", "");
} else {
this.$message.error("下载失败,请重试");
}
}).catch((error) => {
this.$message.error("请重试");
})
......@@ -1170,7 +1166,7 @@ export default {
},
/* 文件下载*/
downloadExcelFile(base64, flag) {
downloadExcelFile(base64) {
let a = document.createElement('a');
vm.uploadHref = 'data:application/xls;base64,' + base64;
a.setAttribute('href',vm.uploadHref);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册