forked from github/dataease
Merge pull request #11907 from dataease/pr@dev-v2@fixDS
Pr@dev v2@fix ds
This commit is contained in:
commit
6d4a4f63d5
@ -9,6 +9,7 @@ import io.dataease.chart.constant.ChartConstants;
|
||||
import io.dataease.chart.manage.ChartDataManage;
|
||||
import io.dataease.constant.AuthConstant;
|
||||
import io.dataease.constant.CommonConstants;
|
||||
import io.dataease.dataset.manage.PermissionManage;
|
||||
import io.dataease.dataset.server.DatasetFieldServer;
|
||||
import io.dataease.engine.constant.DeTypeConstants;
|
||||
import io.dataease.exception.DEException;
|
||||
@ -39,7 +40,9 @@ import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
import java.io.OutputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Author Junjun
|
||||
@ -56,7 +59,8 @@ public class ChartDataServer implements ChartDataApi {
|
||||
private VisualizationTemplateExtendDataManage extendDataManage;
|
||||
@Value("${dataease.export.views.limit:100000}")
|
||||
private Integer limit;
|
||||
|
||||
@Resource
|
||||
private PermissionManage permissionManage;
|
||||
@Resource
|
||||
private DatasetFieldServer datasetFieldServer;
|
||||
|
||||
@ -92,15 +96,17 @@ public class ChartDataServer implements ChartDataApi {
|
||||
if ("dataset".equals(request.getDownloadType())) {
|
||||
viewDTO.setType("table-info");
|
||||
List<DatasetTableFieldDTO> sourceFields = datasetFieldServer.listByDatasetGroup(viewDTO.getTableId());
|
||||
List<String> fileNames = permissionManage.filterColumnPermissions(sourceFields, new HashMap<>(), viewDTO.getTableId(), null).stream().map(DatasetTableFieldDTO::getDataeaseName).collect(Collectors.toList());
|
||||
sourceFields = sourceFields.stream().filter(datasetTableFieldDTO -> fileNames.contains(datasetTableFieldDTO.getDataeaseName())).collect(Collectors.toList());
|
||||
dsHeader = sourceFields.stream()
|
||||
.map(DatasetTableFieldDTO::getName)
|
||||
.toArray(String[]::new);
|
||||
dsTypes = sourceFields.stream()
|
||||
.map(DatasetTableFieldDTO::getDeType)
|
||||
.toArray(Integer[]::new);
|
||||
TypeReference<List<ChartViewFieldDTO>> listTypeReference = new TypeReference<List<ChartViewFieldDTO>>(){
|
||||
TypeReference<List<ChartViewFieldDTO>> listTypeReference = new TypeReference<List<ChartViewFieldDTO>>() {
|
||||
};
|
||||
viewDTO.setXAxis(JsonUtil.parseList(JsonUtil.toJSONString(sourceFields).toString(),listTypeReference));
|
||||
viewDTO.setXAxis(JsonUtil.parseList(JsonUtil.toJSONString(sourceFields).toString(), listTypeReference));
|
||||
}
|
||||
Integer curLimit = getExportLimit();
|
||||
if (ChartConstants.VIEW_RESULT_MODE.CUSTOM.equals(viewDTO.getResultMode())) {
|
||||
|
@ -69,7 +69,7 @@ alter table `core_chart_view`
|
||||
add ext_color longtext comment '颜色维度field';
|
||||
|
||||
update visualization_outer_params_target_view_info tvi INNER JOIN core_chart_view ccv on tvi.target_view_id = ccv.id
|
||||
set tvi.target_ds_id = ccv.table_id
|
||||
set tvi.target_ds_id = ccv.table_id;
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS `core_font`;
|
||||
|
@ -335,7 +335,6 @@ const exportDataset = () => {
|
||||
showExport.value = true
|
||||
exportForm.value.name = nodeInfo.name
|
||||
exportForm.value.expressionTree = ''
|
||||
console.log(computedFiledList)
|
||||
nextTick(() => {
|
||||
rowAuth.value.init({})
|
||||
rowAuth.value.relationList = []
|
||||
|
Loading…
Reference in New Issue
Block a user