//导出
export function eportEnergyPlan(data) {
return request({
url: '/data/energyPlan/export',
method: 'get',
params: data,
responseType: 'blob',
});
}
const exportPlan = async () => {
let res: any = await eportEnergyPlan(null)
console.log(res, 'resv');
const blob = new Blob([res], { type: 'application/vnd.ms-excel' })
const url = URL.createObjectURL(blob)
const link = document.createElement('a')
link.href = url
link.download = 'Excel测试'
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
}