forked from github/dataease
commit
762df101c0
@ -15,7 +15,7 @@ public interface ExtPanelGroupMapper {
|
||||
//会级联删除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);
|
||||
|
||||
@ -24,4 +24,6 @@ public interface ExtPanelGroupMapper {
|
||||
|
||||
List<PanelGroupDTO> panelGroupInit();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -12,8 +12,8 @@
|
||||
<result column="is_default" property="isDefault"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="panelGroup" resultMap="BaseResultMapDTO">
|
||||
select panel_group.*,panel_group.name as label from panel_group where id =#{id}
|
||||
<select id="findOneWithPrivileges" resultMap="BaseResultMapDTO">
|
||||
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 id="panelGroupInit" resultMap="BaseResultMapDTO">
|
||||
|
@ -206,9 +206,9 @@ public class PanelGroupService {
|
||||
|
||||
|
||||
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())) {
|
||||
return panelGroupMapper.selectByPrimaryKey(panelGroupWithBLOBs.getSource());
|
||||
return extPanelGroupMapper.findOneWithPrivileges(panelGroupWithBLOBs.getSource(),String.valueOf(AuthUtils.getUser().getUserId()));
|
||||
}
|
||||
return panelGroupWithBLOBs;
|
||||
}
|
||||
|
@ -141,7 +141,8 @@ export function initPanelData(panelId, callback) {
|
||||
// 设置当前仪表板全局信息
|
||||
store.dispatch('panel/setPanelInfo', {
|
||||
id: response.data.id,
|
||||
name: response.data.name
|
||||
name: response.data.name,
|
||||
privileges: response.data.privileges
|
||||
})
|
||||
// 刷新联动信息
|
||||
getPanelAllLinkageInfo(panelId).then(rsp => {
|
||||
|
@ -255,7 +255,9 @@ const data = {
|
||||
for (let index = 0; index < state.componentData.length; index++) {
|
||||
const element = state.componentData[index]
|
||||
if (!element.type || element.type !== 'view') continue
|
||||
const currentFilters = element.linkageFilters || [] // 当前联动filter
|
||||
// const currentFilters = element.linkageFilters || [] // 当前联动filter
|
||||
// 联动的视图情况历史条件
|
||||
const currentFilters = []
|
||||
|
||||
data.dimensionList.forEach(dimension => {
|
||||
const sourceInfo = viewId + '#' + dimension.id
|
||||
|
@ -48,7 +48,7 @@ export const buildFilterMap = panelItems => {
|
||||
}
|
||||
if (element.type === 'de-tabs') {
|
||||
element.options.tabList && element.options.tabList.forEach(tab => {
|
||||
if (tab.content.propValue && tab.content.propValue.viewId) {
|
||||
if (tab.content && tab.content.propValue && tab.content.propValue.viewId) {
|
||||
result[tab.content.propValue.viewId] = []
|
||||
}
|
||||
})
|
||||
|
@ -39,7 +39,8 @@ export default {
|
||||
loadResource(this.resourceId).then(res => {
|
||||
this.$store.dispatch('panel/setPanelInfo', {
|
||||
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))
|
||||
|
Loading…
Reference in New Issue
Block a user