refactor(图表): 优化视图导出明细空值显示null的问题
This commit is contained in:
parent
39aa75f4f8
commit
ead2d5c8c3
@ -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) {
|
||||
|
||||
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user