mirror of
https://github.com/dataease/dataease.git
synced 2025-02-24 19:42:56 +08:00
Merge pull request #4660 from dataease/pr@dev@fix_app-custom
fix(应用): 修复仪表板应用导出时,携带单独数据集定义的组件导入新环境组件会报错问题 #4620
This commit is contained in:
commit
9fef1dad66
@ -932,6 +932,28 @@ public class PanelGroupService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 兼容过滤组件使用独立的数据集情况
|
||||||
|
PanelGroupDTO panelGroupInfo = this.findOne(panelId);
|
||||||
|
String panelData = panelGroupInfo.getPanelData();
|
||||||
|
try {
|
||||||
|
if (StringUtils.isNotEmpty(panelData)) {
|
||||||
|
JSONArray panelDataArray = JSONObject.parseArray(panelData);
|
||||||
|
for (int i = 0; i < panelDataArray.size(); i++) {
|
||||||
|
JSONObject element = panelDataArray.getJSONObject(i);
|
||||||
|
if ("custom".equals(element.getString("type"))) {
|
||||||
|
JSONObject fieldsParent = element.getJSONObject("options").getJSONObject("attrs").getJSONObject("fieldsParent");
|
||||||
|
if (ObjectUtils.isNotEmpty(fieldsParent)) {
|
||||||
|
allTableIds.add(fieldsParent.getString("id"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
//ignore
|
||||||
|
LogUtil.warn("custom component dataset id get error");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
datasetTablesInfo = extDataSetTableMapper.findByTableIds(allTableIds);
|
datasetTablesInfo = extDataSetTableMapper.findByTableIds(allTableIds);
|
||||||
//4.获取所有数据集字段信息
|
//4.获取所有数据集字段信息
|
||||||
|
Loading…
Reference in New Issue
Block a user