mirror of
https://github.com/dataease/dataease.git
synced 2025-02-24 19:42:56 +08:00
fix: 自己创建的仪表板右上角没有编辑按钮
This commit is contained in:
parent
a0893ae0e0
commit
7aaad18dd9
@ -15,7 +15,7 @@ public interface ExtPanelGroupMapper {
|
|||||||
//会级联删除pid 下的所有数据
|
//会级联删除pid 下的所有数据
|
||||||
int deleteCircle(@Param("pid") String pid);
|
int deleteCircle(@Param("pid") String pid);
|
||||||
|
|
||||||
PanelGroupDTO panelGroup(String id);
|
PanelGroupDTO findOneWithPrivileges(@Param("panelId") String panelId,@Param("userId") String userId);
|
||||||
|
|
||||||
void copyPanelView(@Param("pid") String panelId);
|
void copyPanelView(@Param("pid") String panelId);
|
||||||
|
|
||||||
@ -24,4 +24,6 @@ public interface ExtPanelGroupMapper {
|
|||||||
|
|
||||||
List<PanelGroupDTO> panelGroupInit();
|
List<PanelGroupDTO> panelGroupInit();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
<result column="is_default" property="isDefault"/>
|
<result column="is_default" property="isDefault"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<select id="panelGroup" resultMap="BaseResultMapDTO">
|
<select id="findOneWithPrivileges" resultMap="BaseResultMapDTO">
|
||||||
select panel_group.*,panel_group.name as label from panel_group where id =#{id}
|
select panel_group.*,panel_group.name as label , get_auths(panel_group.id,'panel',#{userId}) as `privileges` from panel_group where id =#{panelId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="panelGroupInit" resultMap="BaseResultMapDTO">
|
<select id="panelGroupInit" resultMap="BaseResultMapDTO">
|
||||||
|
@ -206,9 +206,9 @@ public class PanelGroupService {
|
|||||||
|
|
||||||
|
|
||||||
public PanelGroupWithBLOBs findOne(String panelId) {
|
public PanelGroupWithBLOBs findOne(String panelId) {
|
||||||
PanelGroupWithBLOBs panelGroupWithBLOBs = panelGroupMapper.selectByPrimaryKey(panelId);
|
PanelGroupWithBLOBs panelGroupWithBLOBs = extPanelGroupMapper.findOneWithPrivileges(panelId,String.valueOf(AuthUtils.getUser().getUserId()));
|
||||||
if (panelGroupWithBLOBs != null && StringUtils.isNotEmpty(panelGroupWithBLOBs.getSource())) {
|
if (panelGroupWithBLOBs != null && StringUtils.isNotEmpty(panelGroupWithBLOBs.getSource())) {
|
||||||
return panelGroupMapper.selectByPrimaryKey(panelGroupWithBLOBs.getSource());
|
return extPanelGroupMapper.findOneWithPrivileges(panelGroupWithBLOBs.getSource(),String.valueOf(AuthUtils.getUser().getUserId()));
|
||||||
}
|
}
|
||||||
return panelGroupWithBLOBs;
|
return panelGroupWithBLOBs;
|
||||||
}
|
}
|
||||||
|
@ -141,7 +141,8 @@ export function initPanelData(panelId, callback) {
|
|||||||
// 设置当前仪表板全局信息
|
// 设置当前仪表板全局信息
|
||||||
store.dispatch('panel/setPanelInfo', {
|
store.dispatch('panel/setPanelInfo', {
|
||||||
id: response.data.id,
|
id: response.data.id,
|
||||||
name: response.data.name
|
name: response.data.name,
|
||||||
|
privileges: response.data.privileges
|
||||||
})
|
})
|
||||||
// 刷新联动信息
|
// 刷新联动信息
|
||||||
getPanelAllLinkageInfo(panelId).then(rsp => {
|
getPanelAllLinkageInfo(panelId).then(rsp => {
|
||||||
|
@ -39,7 +39,8 @@ export default {
|
|||||||
loadResource(this.resourceId).then(res => {
|
loadResource(this.resourceId).then(res => {
|
||||||
this.$store.dispatch('panel/setPanelInfo', {
|
this.$store.dispatch('panel/setPanelInfo', {
|
||||||
id: res.data.id,
|
id: res.data.id,
|
||||||
name: res.data.name
|
name: res.data.name,
|
||||||
|
privileges: res.data.privileges
|
||||||
})
|
})
|
||||||
|
|
||||||
panelInit(JSON.parse(res.data.panelData), JSON.parse(res.data.panelStyle))
|
panelInit(JSON.parse(res.data.panelData), JSON.parse(res.data.panelStyle))
|
||||||
|
Loading…
Reference in New Issue
Block a user