|
@@ -752,6 +752,28 @@ func GetDataByTableDataConfig(tableDataConfig TableDataConfig) (resultResp reque
|
|
data = append(data, tmpEdbInfoData)
|
|
data = append(data, tmpEdbInfoData)
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ // 处理一下数据格式
|
|
|
|
+ for _, d := range data {
|
|
|
|
+ for k2, d2 := range d.Data {
|
|
|
|
+ // 可能有ShowValue非数值, 转换一下报错则continue
|
|
|
|
+ vf, e := strconv.ParseFloat(d2.ShowValue, 64)
|
|
|
|
+ if e != nil {
|
|
|
|
+ continue
|
|
|
|
+ }
|
|
|
|
+ d.Data[k2].ShowValue = utils.FormatTableDataShowValue(vf)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ for _, d := range textRowListDataResp {
|
|
|
|
+ for k2, d2 := range d {
|
|
|
|
+ // 可能有ShowValue非数值, 转换一下报错则continue
|
|
|
|
+ vf, e := strconv.ParseFloat(d2.ShowValue, 64)
|
|
|
|
+ if e != nil {
|
|
|
|
+ continue
|
|
|
|
+ }
|
|
|
|
+ d[k2].ShowValue = utils.FormatTableDataShowValue(vf)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
resultResp = request.TableDataReq{
|
|
resultResp = request.TableDataReq{
|
|
EdbInfoIdList: edbInfoIdList,
|
|
EdbInfoIdList: edbInfoIdList,
|
|
Sort: tableDataConfig.Sort,
|
|
Sort: tableDataConfig.Sort,
|
|
@@ -1259,7 +1281,7 @@ func GetMixedTableCellData(config [][]request.MixedTableCellDataReq) (newMixedTa
|
|
} else if cell.DataType == 4 {
|
|
} else if cell.DataType == 4 {
|
|
if dateValMap, ok := edbDataListMap[cell.EdbInfoId]; ok {
|
|
if dateValMap, ok := edbDataListMap[cell.EdbInfoId]; ok {
|
|
if val, ok2 := dateValMap[cell.DataTime]; ok2 {
|
|
if val, ok2 := dateValMap[cell.DataTime]; ok2 {
|
|
- cell.ShowValue = fmt.Sprint(val)
|
|
|
|
|
|
+ cell.ShowValue = utils.FormatTableDataShowValue(val)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|