DataStatistics.exportData({}).then((res: any) => {
console.log(res)
if (!res.data) {
return
}
const blob = new Blob(['\uFEFF' + res.data], {
type: 'text/csv;charset=utf-8'
})
const downloadElement = document.createElement('a')
downloadElement.style.display = 'none'
const href = window.URL.createObjectURL(blob)
downloadElement.href = href
let fileName = "";
if (!fileName) {
fileName = '下载页数据统计' + moment().format('YYYYMMDD') + '.csv'
}
downloadElement.download = fileName
document.body.appendChild(downloadElement)
downloadElement.click()
document.body.removeChild(downloadElement)
window.URL.revokeObjectURL(href)
});
常见 MIME 类型列表