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

This commit is contained in:
wangjiahao 2021-06-16 18:05:47 +08:00
parent c9518c2e4e
commit 2d35f27ee3
2 changed files with 6 additions and 4 deletions

View File

@ -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;
}

View File

@ -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 || [])