我需要下载的东西在浏览器的下方展示出来
download(val) {
this.furl = null;
let param = {
userId: this.$store.state.Login.userInfo.ID,
deptId: this.$store.state.Login.userInfo.DEPARTMENTID,
docIds: val
};
this.$store.dispatch("downloadFileAsZip", param).then(res => {
let data = JSON.parse(res);
if (data.status == "0") {
this.furl = this.neiwangDownload + data.data;
let link = document.createElement("a");
link.style.display = "none";
link.href = this.furl;
link.setAttribute("download", ".zip");
document.body.appendChild(link);
link.click();
this.$message.success("下载成功");
this.getlist();
}
});
},