Merge branch 'dev' of github.com:dataease/dataease into dev
This commit is contained in:
commit
a8453dbba7
@ -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">
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
panel_link_jump_info.jump_type,
|
||||
panel_link_jump_info.target_panel_id,
|
||||
panel_link_jump_info.content,
|
||||
panel_link_mapping.id as publicJumpId,
|
||||
ifnull( panel_link_mapping.uuid, panel_link_mapping.id ) AS publicJumpId,
|
||||
ifnull( panel_link_jump_info.checked, 0 ) AS checked,
|
||||
panel_link_jump_target_view_info.target_view_id,
|
||||
panel_link_jump_target_view_info.target_field_id
|
||||
|
||||
@ -34,7 +34,6 @@ public class ChartViewController {
|
||||
@Resource
|
||||
private ChartViewService chartViewService;
|
||||
|
||||
@RequiresPermissions("data:read")
|
||||
@DePermission(type = DePermissionType.PANEL, level = ResourceAuthLevel.PANNEL_LEVEL_MANAGE)
|
||||
@ApiOperation("保存")
|
||||
@PostMapping("/save/{panelId}")
|
||||
@ -56,7 +55,6 @@ public class ChartViewController {
|
||||
return chartViewService.listAndGroup(chartViewRequest);
|
||||
}
|
||||
|
||||
@RequiresPermissions("data:read")
|
||||
@DePermission(type = DePermissionType.PANEL, level = ResourceAuthLevel.PANNEL_LEVEL_VIEW, paramIndex = 1)
|
||||
@ApiOperation("详细信息")
|
||||
@PostMapping("/get/{id}/{panelId}")
|
||||
@ -71,7 +69,6 @@ public class ChartViewController {
|
||||
chartViewService.delete(id);
|
||||
}
|
||||
|
||||
@RequiresPermissions("data:read")
|
||||
@DePermission(type = DePermissionType.PANEL, level = ResourceAuthLevel.PANNEL_LEVEL_VIEW, paramIndex = 1)
|
||||
@ApiOperation("数据")
|
||||
@PostMapping("/getData/{id}/{panelId}")
|
||||
@ -79,7 +76,6 @@ public class ChartViewController {
|
||||
return chartViewService.getData(id, requestList);
|
||||
}
|
||||
|
||||
@RequiresPermissions("data:read")
|
||||
@DePermission(type = DePermissionType.PANEL, level = ResourceAuthLevel.PANNEL_LEVEL_VIEW, paramIndex = 1)
|
||||
@ApiOperation("视图详情")
|
||||
@PostMapping("chartDetail/{id}/{panelId}")
|
||||
@ -87,7 +83,6 @@ public class ChartViewController {
|
||||
return chartViewService.getChartDetail(id);
|
||||
}
|
||||
|
||||
@RequiresPermissions("data:read")
|
||||
@DePermission(type = DePermissionType.PANEL, level = ResourceAuthLevel.PANNEL_LEVEL_MANAGE, paramIndex = 1)
|
||||
@ApiOperation("复制")
|
||||
@PostMapping("chartCopy/{id}/{panelId}")
|
||||
@ -101,13 +96,13 @@ public class ChartViewController {
|
||||
return chartViewService.searchAdviceSceneId(panelId);
|
||||
}
|
||||
|
||||
@ApiIgnore
|
||||
@ApiOperation("搜索")
|
||||
@PostMapping("search")
|
||||
public List<ChartViewDTO> search(@RequestBody ChartViewRequest chartViewRequest) {
|
||||
return chartViewService.search(chartViewRequest);
|
||||
}
|
||||
|
||||
@RequiresPermissions("data:read")
|
||||
@DePermission(type = DePermissionType.PANEL, level = ResourceAuthLevel.PANNEL_LEVEL_VIEW)
|
||||
@ApiOperation("计算结果")
|
||||
@PostMapping("/calcData/{panelId}")
|
||||
|
||||
@ -84,7 +84,6 @@ public class DataSetTableController {
|
||||
dataSetTableService.delete(id);
|
||||
}
|
||||
|
||||
@RequiresPermissions("data:read")
|
||||
@DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_USE, value = "sceneId")
|
||||
@ApiOperation("查询")
|
||||
@PostMapping("list")
|
||||
@ -92,7 +91,6 @@ public class DataSetTableController {
|
||||
return dataSetTableService.list(dataSetTableRequest);
|
||||
}
|
||||
|
||||
@RequiresPermissions("data:read")
|
||||
@DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_USE, value = "sceneId")
|
||||
@ApiOperation("查询组")
|
||||
@PostMapping("listAndGroup")
|
||||
@ -100,7 +98,6 @@ public class DataSetTableController {
|
||||
return dataSetTableService.listAndGroup(dataSetTableRequest);
|
||||
}
|
||||
|
||||
@RequiresPermissions("data:read")
|
||||
@DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_USE)
|
||||
@ApiOperation("详息")
|
||||
@PostMapping("get/{id}")
|
||||
@ -108,7 +105,6 @@ public class DataSetTableController {
|
||||
return dataSetTableService.get(id);
|
||||
}
|
||||
|
||||
@RequiresPermissions("data:read")
|
||||
@DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_USE)
|
||||
@ApiOperation("带权限查询")
|
||||
@PostMapping("getWithPermission/{id}")
|
||||
@ -116,7 +112,6 @@ public class DataSetTableController {
|
||||
return dataSetTableService.getWithPermission(id, null);
|
||||
}
|
||||
|
||||
@RequiresPermissions("data:read")
|
||||
@DePermission(type = DePermissionType.DATASOURCE, level = ResourceAuthLevel.DATASOURCE_LEVEL_USE, value = "dataSourceId")
|
||||
@ApiOperation("查询原始字段")
|
||||
@PostMapping("getFields")
|
||||
@ -124,7 +119,6 @@ public class DataSetTableController {
|
||||
return dataSetTableService.getFields(datasetTable);
|
||||
}
|
||||
|
||||
@RequiresPermissions("data:read")
|
||||
@DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_USE, value = "id")
|
||||
@ApiOperation("查询生成字段")
|
||||
@PostMapping("getFieldsFromDE")
|
||||
@ -132,7 +126,6 @@ public class DataSetTableController {
|
||||
return dataSetTableService.getFieldsFromDE(dataSetTableRequest);
|
||||
}
|
||||
|
||||
@RequiresPermissions("data:read")
|
||||
@DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_USE, value = "id")
|
||||
@ApiOperation("查询预览数据")
|
||||
@PostMapping("getPreviewData/{page}/{pageSize}")
|
||||
@ -140,7 +133,6 @@ public class DataSetTableController {
|
||||
return dataSetTableService.getPreviewData(dataSetTableRequest, page, pageSize, null);
|
||||
}
|
||||
|
||||
@RequiresPermissions("data:read")
|
||||
@DePermission(type = DePermissionType.DATASOURCE, level = ResourceAuthLevel.DATASOURCE_LEVEL_USE, value = "dataSourceId")
|
||||
@ApiOperation("根据sql查询预览数据")
|
||||
@PostMapping("sqlPreview")
|
||||
@ -148,7 +140,6 @@ public class DataSetTableController {
|
||||
return dataSetTableService.getSQLPreview(dataSetTableRequest);
|
||||
}
|
||||
|
||||
@RequiresPermissions("data:read")
|
||||
@DePermission(type = DePermissionType.DATASOURCE, level = ResourceAuthLevel.DATASOURCE_LEVEL_USE, value = "dataSourceId")
|
||||
@ApiOperation("预览自定义数据数据")
|
||||
@PostMapping("customPreview")
|
||||
@ -172,7 +163,6 @@ public class DataSetTableController {
|
||||
dataSetTableService.saveIncrementalConfig(datasetTableIncrementalConfig);
|
||||
}
|
||||
|
||||
@RequiresPermissions("data:read")
|
||||
@DePermission(type = DePermissionType.DATASET)
|
||||
@ApiOperation("数据集详息")
|
||||
@PostMapping("datasetDetail/{id}")
|
||||
@ -206,7 +196,6 @@ public class DataSetTableController {
|
||||
return dataSetTableService.search(dataSetTableRequest);
|
||||
}
|
||||
|
||||
@RequiresPermissions("data:read")
|
||||
@DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_MANAGE)
|
||||
@ApiOperation("数据集同步表结构")
|
||||
@PostMapping("syncField/{id}")
|
||||
|
||||
@ -58,7 +58,6 @@ public class DataSetTableFieldController {
|
||||
@Resource
|
||||
private PermissionService permissionService;
|
||||
|
||||
@RequiresPermissions("data:read")
|
||||
@DePermission(type = DePermissionType.DATASET)
|
||||
@ApiOperation("查询表下属字段")
|
||||
@PostMapping("list/{tableId}")
|
||||
@ -70,7 +69,6 @@ public class DataSetTableFieldController {
|
||||
return fields;
|
||||
}
|
||||
|
||||
@RequiresPermissions("data:read")
|
||||
@DePermission(type = DePermissionType.DATASET)
|
||||
@ApiOperation("查询表下属字段")
|
||||
@PostMapping("listWithPermission/{tableId}")
|
||||
@ -85,7 +83,6 @@ public class DataSetTableFieldController {
|
||||
}
|
||||
|
||||
//管理权限,可以列出所有字段
|
||||
@RequiresPermissions("data:read")
|
||||
@DePermission(type = DePermissionType.DATASET)
|
||||
@ApiOperation("查询表下属字段")
|
||||
@PostMapping("listForPermissionSeting/{tableId}")
|
||||
@ -97,7 +94,6 @@ public class DataSetTableFieldController {
|
||||
}
|
||||
|
||||
//管理权限,可以列出所有字段
|
||||
@RequiresPermissions("data:read")
|
||||
@DePermission(type = DePermissionType.DATASET)
|
||||
@ApiOperation("分组查询表下属字段")
|
||||
@PostMapping("listByDQ/{tableId}")
|
||||
@ -115,7 +111,6 @@ public class DataSetTableFieldController {
|
||||
return datasetTableField4Type;
|
||||
}
|
||||
|
||||
@RequiresPermissions("data:read")
|
||||
@DePermission(type = DePermissionType.DATASET, value = "tableId", level = ResourceAuthLevel.DATASET_LEVEL_MANAGE)
|
||||
@ApiOperation("批量更新")
|
||||
@PostMapping("batchEdit")
|
||||
@ -123,7 +118,6 @@ public class DataSetTableFieldController {
|
||||
dataSetTableFieldsService.batchEdit(list);
|
||||
}
|
||||
|
||||
@RequiresPermissions("data:read")
|
||||
@DePermission(type = DePermissionType.DATASET, value = "tableId", level = ResourceAuthLevel.DATASET_LEVEL_MANAGE)
|
||||
@ApiOperation("保存")
|
||||
@PostMapping("save")
|
||||
@ -141,7 +135,6 @@ public class DataSetTableFieldController {
|
||||
return dataSetTableFieldsService.save(datasetTableField);
|
||||
}
|
||||
|
||||
@RequiresPermissions("data:read")
|
||||
@DePermissions(value = {
|
||||
@DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_MANAGE, paramIndex = 1)
|
||||
})
|
||||
|
||||
@ -29,7 +29,6 @@ public class DatasetFunctionController {
|
||||
@Resource
|
||||
private DatasetFunctionService datasetFunctionService;
|
||||
|
||||
@RequiresPermissions("data:read")
|
||||
@DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_MANAGE)
|
||||
@ApiOperation("查询")
|
||||
@PostMapping("listByTableId/{tableId}")
|
||||
|
||||
@ -54,7 +54,6 @@ public class DatasourceController {
|
||||
return datasourceService.validate(datasourceId);
|
||||
}
|
||||
|
||||
@RequiresPermissions("datasource:read")
|
||||
@ApiOperation("查询当前用户数据源")
|
||||
@GetMapping("/list")
|
||||
public List<DatasourceDTO> getDatasourceList() throws Exception {
|
||||
@ -63,7 +62,6 @@ public class DatasourceController {
|
||||
return datasourceService.getDatasourceList(request);
|
||||
}
|
||||
|
||||
@RequiresPermissions("datasource:read")
|
||||
@ApiOperation("查询当前用户数据源")
|
||||
@GetMapping("/list/{type}")
|
||||
public List<DatasourceDTO> getDatasourceListByType(@PathVariable String type) throws Exception {
|
||||
@ -86,7 +84,6 @@ public class DatasourceController {
|
||||
datasourceService.updateDatasource(Datasource);
|
||||
}
|
||||
|
||||
@RequiresPermissions("datasource:read")
|
||||
@DePermission(type = DePermissionType.DATASOURCE, value = "id")
|
||||
@ApiOperation("查询数据源下属所有表")
|
||||
@PostMapping("/getTables")
|
||||
|
||||
@ -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 => {
|
||||
|
||||
@ -721,6 +721,7 @@ export default {
|
||||
|
||||
.chart-class {
|
||||
height: 100%;
|
||||
padding: 0px!important;
|
||||
}
|
||||
|
||||
.table-class {
|
||||
|
||||
@ -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