// 引入写api的文件
import * as api from './api.js'
let data = {...}
api.download(data).then(res => {
let url = window.URL.createObjectURL(new Blob([res.data], {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'}))
let link = document.createElement('a')
link.style.display = 'none'
link.href = url
let excelName = '文件名' + new Date().getTime() + '.xlsx'
link.setAttribute('download', excelName)
document.body.appendChild(link)
link.click()
link.remove()
})