Browse Source

fix:混合表格别名修改后,查看表格时不生效

Roc 1 year ago
parent
commit
a07c49021e
1 changed files with 6 additions and 2 deletions
  1. 6 2
      services/data/excel/mixed_table.go

+ 6 - 2
services/data/excel/mixed_table.go

@@ -147,8 +147,12 @@ func GetMixedTableCellData(mixedTableReq request.MixedTableReq) (newMixedTableCe
 		for i, cell := range row {
 			switch cell.DataType {
 			case request.EdbDT: // 指标类型
-				if edbInfo, ok := edbInfoMap[cell.EdbInfoId]; ok {
-					cell.ShowValue = edbInfo.EdbName
+				if cell.Value == `` {
+					if edbInfo, ok := edbInfoMap[cell.EdbInfoId]; ok {
+						cell.ShowValue = edbInfo.EdbName
+					}
+				} else {
+					cell.ShowValue = cell.Value
 				}
 			case request.InsertDataDT, request.PopInsertDataDT: // 数据类型
 				// 数值先清空