Merge pull request #9382 from dataease/pr@dev@refactor_detials-null

refactor(图表): 优化视图导出明细空值显示null的问题
This commit is contained in:
王嘉豪 2024-04-26 18:03:53 +08:00 committed by GitHub
commit e92a4ef4ff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -290,7 +290,7 @@ public class ExportCenterService {
// with DataType
if ((excelTypes[j].equals(DeTypeConstants.DE_INT) || excelTypes[j].equals(DeTypeConstants.DE_FLOAT)) && rowData[j] != null) {
cell.setCellValue(Double.valueOf(rowData[j].toString()));
} else {
} else if(rowData[j] != null){
cell.setCellValue(String.valueOf(rowData[j]));
}
} catch (Exception e) {
@ -496,7 +496,7 @@ public class ExportCenterService {
// with DataType
if ((excelTypes[j].equals(DeTypeConstants.DE_INT) || excelTypes[j].equals(DeTypeConstants.DE_FLOAT)) && StringUtils.isNotEmpty(cellValObj.toString())) {
cell.setCellValue(Double.valueOf(cellValObj.toString()));
} else {
} else if(cellValObj != null){
cell.setCellValue(cellValObj.toString());
}
} catch (Exception e) {

View File

@ -469,7 +469,7 @@ export function getCacheTree(treeName) {
}
export function exportExcelDownload(chart, snapshot, width, height, loadingWrapper, downloadParams, callBack) {
if ((chart.render === 'echarts' || ['text', 'label'.includes(chart.type)]) && !(chart.data?.series?.length && chart.data?.series[0].data?.length)) {
if ((chart.render === 'echarts' || ['text', 'label'].includes(chart.type)) && !(chart.data?.series?.length && chart.data?.series[0].data?.length)) {
callBack()
return
} else if ((chart.render === 'antv' && !['text', 'label'].includes(chart.type)) && !chart.data?.data?.length) {