Commit 54d2847f authored by neogcg's avatar neogcg

3/8

parent f80e7e2e
......@@ -87,7 +87,22 @@ export default {
current: this.params.pageNum,
size: this.params.pageSize
}
exportLog(params).then(res => {})
exportLog(params).then(res => {
if (res) {
const xlsx = 'application/vnd.ms-excel'
const blob = new Blob([res], { type: xlsx })
const a = document.createElement('a')
a.download = 'fileName.xls'
a.href = window.URL.createObjectURL(blob)
a.click()
a.remove()
} else {
this.$message.error('导出失败')
}
//
})
}
},
mounted() { this.getTableData() },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment