async getDataList() {
const _res = await this.$http.put('total/export', {
caseNumbers: ['cdx12', '131'],
columns: this.codeCol,
},{responseType: 'arraybuffer'})
let blob = new Blob([_res.data], { type: 'application/vnd.ms-excel' })
let objUrl = URL.createObjectURL(blob)
const link = document.createElement('a')
link.href = objUrl
link.download = 'data.xlsx'
link.click()
URL.revokeObjectURL(objUrl)
},
vue接收后端的数据导出为excel表
最新推荐文章于 2023-10-31 16:36:13 发布