提交 2d35f27e authored 作者: wangjiahao's avatar wangjiahao

feat: 默认仪表盘指向源仪表盘

上级 c9518c2e
......@@ -141,7 +141,11 @@ public class PanelGroupService {
public PanelGroupWithBLOBs findOne(String panelId) {
return panelGroupMapper.selectByPrimaryKey(panelId);
PanelGroupWithBLOBs panelGroupWithBLOBs = panelGroupMapper.selectByPrimaryKey(panelId);
if(panelGroupWithBLOBs!=null&& StringUtils.isNotEmpty(panelGroupWithBLOBs.getSource())){
return panelGroupMapper.selectByPrimaryKey(panelGroupWithBLOBs.getSource());
}
return panelGroupWithBLOBs;
}
......
......@@ -575,9 +575,7 @@ export default {
this.activeTree = data.panelType
if (data.nodeType === 'panel') {
// 加载视图数据
// 如果是默认仪表盘 需要查询原仪表板的详细数据
const queryPanelId = data.panelType === 'system' ? data.source : data.id
findOne(queryPanelId).then(response => {
findOne(data.id).then(response => {
const componentDatas = JSON.parse(response.data.panelData)
componentDatas.forEach(item => {
item.filters = (item.filters || [])
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论