|
@@ -1186,7 +1186,7 @@ func GetTableDataByCustomData(excelType int, data request.TableDataReq, lang str
|
|
|
}
|
|
|
|
|
|
// GetTableDataByMixedTableData 通过混合表格数据获取表格数据
|
|
|
-func GetTableDataByMixedTableData(config [][]request.MixedTableCellDataReq) (selfTableData TableData, err error) {
|
|
|
+func GetTableDataByMixedTableData(config [][]request.MixedTableCellDataReq, hideMerged bool) (selfTableData TableData, err error) {
|
|
|
tableDataList := make([][]LuckySheetDataValue, 0)
|
|
|
mergeList := make([]TableDataMerge, 0)
|
|
|
|
|
@@ -1200,6 +1200,16 @@ func GetTableDataByMixedTableData(config [][]request.MixedTableCellDataReq) (sel
|
|
|
Monitor: cell.ShowValue,
|
|
|
MergeCell: LuckySheetDataConfigMerge{},
|
|
|
}
|
|
|
+ // 前端需要隐藏被合并的单元格, 混合表格/平衡表通过这个字段判断, 不通过HandleTableCell方法隐藏
|
|
|
+ if cell.MerData != nil {
|
|
|
+ if hideMerged && cell.MerData.Type == "merged" {
|
|
|
+ continue
|
|
|
+ }
|
|
|
+ tmp.MergeCell.Rs = cell.MerData.Mer.Rowspan
|
|
|
+ tmp.MergeCell.Cs = cell.MerData.Mer.Colspan
|
|
|
+ tmp.MergeCell.Row = cell.MerData.Mer.Row
|
|
|
+ tmp.MergeCell.Column = cell.MerData.Mer.Col
|
|
|
+ }
|
|
|
if cell.ShowStyle != "" {
|
|
|
tmp.Monitor = cell.ShowFormatValue
|
|
|
}
|