feat: 默认仪表盘指向源仪表盘
This commit is contained in:
parent
c9518c2e4e
commit
2d35f27ee3
@ -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 || [])
|
||||
|
||||
Loading…
Reference in New Issue
Block a user