// 导出 bjkacrjrybhtjExport为接口名,this.form是参数
exportExcel() {
bjkacrjrybhtjExport(this.form).then(res => {
const type = "application/vnd.ms-excel;charset=utf-8"; //excel文件
//const type = "application/x-msdownload;charset=utf-8"; //文件
// 下载附件表格附件测试
const blob = new Blob([res], { type: type });
const downloadElement = document.createElement("a");
const href = window.URL.createObjectURL(blob);
downloadElement.href = href;
downloadElement.download = `边境口岸出入境人员变化情况统计${new Date().Format(
"yyyyMMddHHmmss"
)}.xls`;
document.body.appendChild(downloadElement);
downloadElement.click();
document.body.removeChild(downloadElement); // 下载完成移除元素
window.URL.revokeObjectURL(href); // 释放掉blob对象
}).catch(err => {});
},