|
@@ -1749,13 +1749,24 @@ func GetTableDataByMixedTableData(config [][]request.MixedTableCellDataReq, hide
|
|
|
if err := json.Unmarshal([]byte(cell.ShowStyle), &styleConfig); err != nil {
|
|
|
utils.FileLog.Info("表格样式showStyle解析失败", err.Error())
|
|
|
}
|
|
|
- showFormatValue := fmt.Sprintf("%v", cell.ShowFormatValue)
|
|
|
if styleConfig.BackgroundColor != "" {
|
|
|
tmp.Background = styleConfig.BackgroundColor
|
|
|
}
|
|
|
if styleConfig.Color != "" {
|
|
|
tmp.FontColor = styleConfig.Color
|
|
|
}
|
|
|
+ switch styleConfig.Align {
|
|
|
+ case "center":
|
|
|
+ tmp.HorizontalType = 0
|
|
|
+ tmp.Ht = 0
|
|
|
+ case "left":
|
|
|
+ tmp.HorizontalType = 1
|
|
|
+ tmp.Ht = 1
|
|
|
+ case "right":
|
|
|
+ tmp.HorizontalType = 2
|
|
|
+ tmp.Ht = 2
|
|
|
+ }
|
|
|
+ showFormatValue := fmt.Sprintf("%v", cell.ShowFormatValue)
|
|
|
tmp.Monitor = showFormatValue
|
|
|
tmpShowValue, err := strconv.ParseFloat(cell.Value, 64)
|
|
|
if err == nil {
|