/**
* @description: 导出
*/
export(data) {
return request({
url: baseURL + `/problem-management/export`,
method: 'post',
responseType: 'blob',
data: data
});
},
import export"@/api/export"
export(this.obj).then((res) => {
let blob = res,
dateTime = dayjs().format('YYYY年MM月DD日HH时mm分ss秒'),
down_url = window.URL.createObjectURL(blob),
a = document.createElement('a');
a.download ='xxx-' + dateTime + '.xlsx'; //文件命名
a.href = down_url;
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
this.exportLoading = false;
}).catch(() => {
this.exportLoading = false;
})