forked from github/dataease
fix: 默认仪表板管理权限未生效问题
This commit is contained in:
parent
feec812267
commit
16ea97339e
@ -68,7 +68,7 @@ public class PanelGroupController {
|
||||
@ApiOperation("详细信息")
|
||||
@DePermission(type = DePermissionType.PANEL, level = ResourceAuthLevel.PANNEL_LEVEL_VIEW)
|
||||
@GetMapping("/findOne/{id}")
|
||||
public PanelGroupWithBLOBs findOne(@PathVariable String id) throws Exception {
|
||||
public PanelGroupDTO findOne(@PathVariable String id) throws Exception {
|
||||
return panelGroupService.findOne(id);
|
||||
}
|
||||
|
||||
|
@ -200,12 +200,16 @@ public class PanelGroupService {
|
||||
}
|
||||
|
||||
|
||||
public PanelGroupWithBLOBs findOne(String panelId) {
|
||||
PanelGroupWithBLOBs panelGroupWithBLOBs = extPanelGroupMapper.findOneWithPrivileges(panelId, String.valueOf(AuthUtils.getUser().getUserId()));
|
||||
if (panelGroupWithBLOBs != null && StringUtils.isNotEmpty(panelGroupWithBLOBs.getSource())) {
|
||||
return extPanelGroupMapper.findOneWithPrivileges(panelGroupWithBLOBs.getSource(), String.valueOf(AuthUtils.getUser().getUserId()));
|
||||
public PanelGroupDTO findOne(String panelId) {
|
||||
PanelGroupDTO panelGroup = extPanelGroupMapper.findOneWithPrivileges(panelId, String.valueOf(AuthUtils.getUser().getUserId()));
|
||||
// 默认仪表板取源仪表板样式
|
||||
if (panelGroup != null && StringUtils.isNotEmpty(panelGroup.getSource())) {
|
||||
PanelGroupDTO sourcePanel = extPanelGroupMapper.findOneWithPrivileges(panelGroup.getSource(), String.valueOf(AuthUtils.getUser().getUserId()));
|
||||
panelGroup.setPanelData(sourcePanel.getPanelData());
|
||||
panelGroup.setPanelStyle(sourcePanel.getPanelStyle());
|
||||
panelGroup.setSourcePanelName(sourcePanel.getName());
|
||||
}
|
||||
return panelGroupWithBLOBs;
|
||||
return panelGroup;
|
||||
}
|
||||
|
||||
|
||||
|
@ -142,7 +142,8 @@ export function initPanelData(panelId, callback) {
|
||||
store.dispatch('panel/setPanelInfo', {
|
||||
id: response.data.id,
|
||||
name: response.data.name,
|
||||
privileges: response.data.privileges
|
||||
privileges: response.data.privileges,
|
||||
sourcePanelName: response.data.sourcePanelName
|
||||
})
|
||||
// 刷新联动信息
|
||||
getPanelAllLinkageInfo(panelId).then(rsp => {
|
||||
|
Loading…
Reference in New Issue
Block a user