mirror of
https://github.com/dataease/dataease.git
synced 2026-05-17 06:50:45 +08:00
fix(X-Pack): 定时报告-选项卡组件中的视图无法导出数据
This commit is contained in:
committed by
fit2cloud-chenyw
parent
cba56d12e3
commit
d74c0e666b
@@ -32,6 +32,7 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
|
||||
@Component
|
||||
@@ -64,6 +65,15 @@ public class CoreVisualizationExportManage {
|
||||
|
||||
String componentsJson = visualization.getComponentData();
|
||||
List<Map<String, Object>> components = JsonUtil.parseList(componentsJson, tokenType);
|
||||
components = components.stream().flatMap(item -> {
|
||||
if (ObjectUtils.isNotEmpty(item.get("innerType")) && StringUtils.equalsIgnoreCase(item.get("innerType").toString(), "DeTabs")) {
|
||||
if (ObjectUtils.isNotEmpty(item.get("propValue"))) {
|
||||
List<Map<String, Object>> deTabs = (List<Map<String, Object>>) item.get("propValue");
|
||||
return deTabs.stream().flatMap(tab -> ((List<Map<String, Object>>) tab.get("componentData")).stream());
|
||||
}
|
||||
}
|
||||
return Stream.of(item);
|
||||
}).toList();
|
||||
List<Long> idList = components.stream().filter(c -> ObjectUtils.isNotEmpty(c.get("id"))).map(component -> Long.parseLong(component.get("id").toString())).toList();
|
||||
|
||||
if (CollectionUtils.isNotEmpty(viewIdList)) {
|
||||
|
||||
Reference in New Issue
Block a user