Merge pull request #202 from dataease/pr@dev@panel

fix:【仪表板】图表明细数据下载数值为0不显示问题
This commit is contained in:
王嘉豪 2021-07-09 18:10:50 +08:00 committed by GitHub
commit 0d4376b1dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,7 +43,7 @@ export default {
debugger
const excelHeader = JSON.parse(JSON.stringify(this.chart.data.fields)).map(item => item.name)
const excelHeaderKeys = JSON.parse(JSON.stringify(this.chart.data.fields)).map(item => item.dataeaseName)
const excelData = JSON.parse(JSON.stringify(this.chart.data.tableRow)).map(item => excelHeaderKeys.map(i => item[i] || ''))
const excelData = JSON.parse(JSON.stringify(this.chart.data.tableRow)).map(item => excelHeaderKeys.map(i => item[i]))
const excelName = this.chart.name
export_json_to_excel(excelHeader, excelData, excelName)
}