既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,涵盖了95%以上大数据知识点,真正体系化!
由于文件比较多,这里只是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、讲解视频,并且后续会持续更新
method: "get",
url: "api/TemplateDownload/GetAllTemplateZIP",
headers: {
"content-type": "application/json; charset=utf-8",
Authorization: Cookies.get("token") || "",
},
responseType: "blob",
})
.then((response) => {
let blob = new Blob([response.data], { type: "application/zip" });
let url = window.URL.createObjectURL(blob);
const link = document.createElement("a"); // 创建a标签
link.href = url;
link.download = "模板下载"; // 重命名文件
link.click();
URL.revokeObjectURL(url); // 释放内存
this.checkList = [];
})
.catch((error) => {
console.log(error.data);
});
},
//excel
let blob = new Blob([response.data], { type: “application/vnd.ms-excel” });
dl() {
axios({
method: “get”,
url: “http://10.180.170.3:8794/tRptMwStdClt/exportData?time=202104”,
responseType: “arraybuffer”,
})
.then((response) => {
console.log(response);
let blob = new Blob([response.data], {
type: “application/vnd.ms-excel”,
});
let url = window.URL.createObjectURL(blob);
const link = document.createElement(“a”); // 创建a标签
link.href = url;
link.download = “模板下载”; // 重命名文件
link.click();
URL.revokeObjectURL(url); // 释放内存
this.checkList = [];
})
.catch((error) => {
console.log(error.data);
});
},
[获取到了后台传过来的excel文件 前端用vue怎么接收并导出? - 中文 - Vue Forum](https://bbs.csdn.net/forums/4f45ff00ff254613a03fab5e56a57acb)
[vue.js前端实现excel表格导出和获取headers里的信息 - 五个半柠檬 - OSCHINA - 中文开源技术交流社区](https://bbs.csdn.net/forums/4f45ff00ff254613a03fab5e56a57acb)
java后台需要设置
response.addHeader(“Content-Disposition”, “attachment;filename=” + fileName + “.xlsx”);
response.setHeader(“Access-Control-Expose-Headers”,“Content-Disposition”);
才能获取到文件名等信息
// 导出execel2
handleExcel() {
this.KaTeX parse error: Expected '}', got 'EOF' at end of input: … url: this.http.adornUrl(url),
method: “post”,
responseType: “blob”,//!!!
params: this.$http.adornParams({
userAccount: this.userName,
}),
}).then((res) => {
// console.log(res, “res”);
let blob = new Blob([res.data], { type: “application/vnd.ms-excel” });
let fileName = decodeURI(
response.headers[“content-disposition”].split(“;”)[1].split(“=”)[1]
);
let url = window.URL.createObjectURL(blob);
const link = document.createElement(“a”); // 创建a标签
link.href = url;
link.download = fileName; // 重命名文件
既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,涵盖了95%以上大数据知识点,真正体系化!
由于文件比较多,这里只是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、讲解视频,并且后续会持续更新
大纲路线、讲解视频,并且后续会持续更新**