forked from github/dataease
Merge branch 'dev' into pr@dev@fix_dataset
This commit is contained in:
commit
4e25a992c7
@ -149,7 +149,7 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="findByTableIds" resultMap="BaseResultMapDTO">
|
<select id="findByTableIds" resultMap="BaseResultMapDTO">
|
||||||
select dataset_table.*
|
select distinct dataset_table.*
|
||||||
from dataset_table
|
from dataset_table
|
||||||
where dataset_table.id in
|
where dataset_table.id in
|
||||||
<foreach collection="tableIds" item="item" open="(" separator="," close=")">
|
<foreach collection="tableIds" item="item" open="(" separator="," close=")">
|
||||||
|
@ -390,7 +390,11 @@ public class DorisQueryProvider extends QueryProvider {
|
|||||||
originField = String.format(DorisConstants.KEYWORD_FIX, tableObj.getTableAlias(), x.getDataeaseName());
|
originField = String.format(DorisConstants.KEYWORD_FIX, tableObj.getTableAlias(), x.getDataeaseName());
|
||||||
} else {
|
} else {
|
||||||
if (x.getDeType() == 2 || x.getDeType() == 3) {
|
if (x.getDeType() == 2 || x.getDeType() == 3) {
|
||||||
originField = String.format(DorisConstants.CAST, String.format(DorisConstants.KEYWORD_FIX, tableObj.getTableAlias(), x.getDataeaseName()), DorisConstants.DEFAULT_FLOAT_FORMAT);
|
if (x.getDeExtractType() == 1) {
|
||||||
|
originField = String.format(DorisConstants.KEYWORD_FIX, tableObj.getTableAlias(), x.getDataeaseName());
|
||||||
|
} else {
|
||||||
|
originField = String.format(DorisConstants.CAST, String.format(DorisConstants.KEYWORD_FIX, tableObj.getTableAlias(), x.getDataeaseName()), DorisConstants.DEFAULT_FLOAT_FORMAT);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
originField = String.format(DorisConstants.KEYWORD_FIX, tableObj.getTableAlias(), x.getDataeaseName());
|
originField = String.format(DorisConstants.KEYWORD_FIX, tableObj.getTableAlias(), x.getDataeaseName());
|
||||||
}
|
}
|
||||||
|
@ -2,11 +2,16 @@ package io.dataease.service.dataset;
|
|||||||
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.reflect.TypeToken;
|
import com.google.gson.reflect.TypeToken;
|
||||||
import io.dataease.ext.ExtChartViewMapper;
|
|
||||||
import io.dataease.commons.constants.*;
|
import io.dataease.commons.constants.*;
|
||||||
import io.dataease.commons.model.AuthURD;
|
import io.dataease.commons.model.AuthURD;
|
||||||
import io.dataease.commons.utils.*;
|
import io.dataease.commons.utils.*;
|
||||||
import io.dataease.controller.request.datasource.ApiDefinition;
|
import io.dataease.controller.request.datasource.ApiDefinition;
|
||||||
|
import io.dataease.dto.dataset.DataTableInfoDTO;
|
||||||
|
import io.dataease.dto.dataset.ExcelSheetData;
|
||||||
|
import io.dataease.dto.datasource.*;
|
||||||
|
import io.dataease.exception.DataEaseException;
|
||||||
|
import io.dataease.ext.ExtChartViewMapper;
|
||||||
|
import io.dataease.listener.util.CacheUtils;
|
||||||
import io.dataease.plugins.common.base.domain.*;
|
import io.dataease.plugins.common.base.domain.*;
|
||||||
import io.dataease.plugins.common.constants.DatasetType;
|
import io.dataease.plugins.common.constants.DatasetType;
|
||||||
import io.dataease.plugins.common.constants.DatasourceTypes;
|
import io.dataease.plugins.common.constants.DatasourceTypes;
|
||||||
@ -17,14 +22,9 @@ import io.dataease.plugins.datasource.entity.JdbcConfiguration;
|
|||||||
import io.dataease.plugins.datasource.provider.Provider;
|
import io.dataease.plugins.datasource.provider.Provider;
|
||||||
import io.dataease.plugins.datasource.query.QueryProvider;
|
import io.dataease.plugins.datasource.query.QueryProvider;
|
||||||
import io.dataease.provider.DDLProvider;
|
import io.dataease.provider.DDLProvider;
|
||||||
import io.dataease.provider.datasource.JdbcProvider;
|
|
||||||
import io.dataease.provider.ProviderFactory;
|
import io.dataease.provider.ProviderFactory;
|
||||||
import io.dataease.dto.datasource.*;
|
import io.dataease.provider.datasource.JdbcProvider;
|
||||||
import io.dataease.service.datasource.DatasourceService;
|
import io.dataease.service.datasource.DatasourceService;
|
||||||
import io.dataease.dto.dataset.DataTableInfoDTO;
|
|
||||||
import io.dataease.dto.dataset.ExcelSheetData;
|
|
||||||
import io.dataease.exception.DataEaseException;
|
|
||||||
import io.dataease.listener.util.CacheUtils;
|
|
||||||
import io.dataease.service.engine.EngineService;
|
import io.dataease.service.engine.EngineService;
|
||||||
import io.dataease.service.kettle.KettleService;
|
import io.dataease.service.kettle.KettleService;
|
||||||
import io.dataease.service.message.DeMsgutil;
|
import io.dataease.service.message.DeMsgutil;
|
||||||
@ -413,7 +413,7 @@ public class ExtractDataService {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<DatasetTableField> getDatasetTableFields(String datasetTableId) {
|
public List<DatasetTableField> getDatasetTableFields(String datasetTableId) {
|
||||||
List<DatasetTableField> datasetTableFields = dataSetTableFieldsService.list(DatasetTableField.builder().tableId(datasetTableId).build());
|
List<DatasetTableField> datasetTableFields = dataSetTableFieldsService.list(DatasetTableField.builder().tableId(datasetTableId).build());
|
||||||
datasetTableFields = datasetTableFields.stream().filter(datasetTableField -> datasetTableField.getExtField() == 0).collect(Collectors.toList());
|
datasetTableFields = datasetTableFields.stream().filter(datasetTableField -> datasetTableField.getExtField() == 0).collect(Collectors.toList());
|
||||||
datasetTableFields.sort((o1, o2) -> {
|
datasetTableFields.sort((o1, o2) -> {
|
||||||
@ -617,7 +617,7 @@ public class ExtractDataService {
|
|||||||
dataSetTableTaskLogService.save(datasetTableTaskLog, hasTask);
|
dataSetTableTaskLogService.save(datasetTableTaskLog, hasTask);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createEngineTable(String tableName, List<DatasetTableField> datasetTableFields) throws Exception {
|
public void createEngineTable(String tableName, List<DatasetTableField> datasetTableFields) throws Exception {
|
||||||
Datasource engine = engineService.getDeEngine();
|
Datasource engine = engineService.getDeEngine();
|
||||||
JdbcProvider jdbcProvider = CommonBeanFactory.getBean(JdbcProvider.class);
|
JdbcProvider jdbcProvider = CommonBeanFactory.getBean(JdbcProvider.class);
|
||||||
DatasourceRequest datasourceRequest = new DatasourceRequest();
|
DatasourceRequest datasourceRequest = new DatasourceRequest();
|
||||||
@ -793,7 +793,7 @@ public class ExtractDataService {
|
|||||||
Thread.sleep(1000);
|
Thread.sleep(1000);
|
||||||
}
|
}
|
||||||
if (jobStatus.getStatusDescription().equals("Finished")) {
|
if (jobStatus.getStatusDescription().equals("Finished")) {
|
||||||
LogUtil.info(datasetTable.getId()+ ": " + jobStatus.getLoggingString());
|
LogUtil.info(datasetTable.getId() + ": " + jobStatus.getLoggingString());
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
DataEaseException.throwException(jobStatus.getLoggingString());
|
DataEaseException.throwException(jobStatus.getLoggingString());
|
||||||
@ -1029,7 +1029,7 @@ public class ExtractDataService {
|
|||||||
if (extractType.equalsIgnoreCase("all_scope") && datasetTable.getType().equalsIgnoreCase(DatasetType.SQL.name())) {
|
if (extractType.equalsIgnoreCase("all_scope") && datasetTable.getType().equalsIgnoreCase(DatasetType.SQL.name())) {
|
||||||
DataTableInfoDTO dataTableInfoDTO = new Gson().fromJson(datasetTable.getInfo(), DataTableInfoDTO.class);
|
DataTableInfoDTO dataTableInfoDTO = new Gson().fromJson(datasetTable.getInfo(), DataTableInfoDTO.class);
|
||||||
selectSQL = dataTableInfoDTO.getSql();
|
selectSQL = dataTableInfoDTO.getSql();
|
||||||
if(dataTableInfoDTO.isBase64Encryption()){
|
if (dataTableInfoDTO.isBase64Encryption()) {
|
||||||
selectSQL = new String(java.util.Base64.getDecoder().decode(selectSQL));
|
selectSQL = new String(java.util.Base64.getDecoder().decode(selectSQL));
|
||||||
}
|
}
|
||||||
QueryProvider qp = ProviderFactory.getQueryProvider(datasource.getType());
|
QueryProvider qp = ProviderFactory.getQueryProvider(datasource.getType());
|
||||||
@ -1056,13 +1056,13 @@ public class ExtractDataService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private List<StepMeta> excelInputStep(String Info, List<DatasetTableField> datasetTableFields) {
|
private List<StepMeta> excelInputStep(String Info, List<DatasetTableField> datasetTableFields) {
|
||||||
List<StepMeta>inputSteps = new ArrayList<>();
|
List<StepMeta> inputSteps = new ArrayList<>();
|
||||||
DataTableInfoDTO dataTableInfoDTO = new Gson().fromJson(Info, DataTableInfoDTO.class);
|
DataTableInfoDTO dataTableInfoDTO = new Gson().fromJson(Info, DataTableInfoDTO.class);
|
||||||
List<ExcelSheetData> excelSheetDataList = dataTableInfoDTO.getExcelSheetDataList();
|
List<ExcelSheetData> excelSheetDataList = dataTableInfoDTO.getExcelSheetDataList();
|
||||||
|
|
||||||
List<String> sheetNames = new ArrayList<>();
|
List<String> sheetNames = new ArrayList<>();
|
||||||
|
|
||||||
int size =1;
|
int size = 1;
|
||||||
for (ExcelSheetData excelSheetData : excelSheetDataList) {
|
for (ExcelSheetData excelSheetData : excelSheetDataList) {
|
||||||
StepMeta fromStep = null;
|
StepMeta fromStep = null;
|
||||||
String suffix = excelSheetData.getPath().substring(excelSheetDataList.get(0).getPath().lastIndexOf(".") + 1);
|
String suffix = excelSheetData.getPath().substring(excelSheetDataList.get(0).getPath().lastIndexOf(".") + 1);
|
||||||
@ -1090,7 +1090,7 @@ public class ExtractDataService {
|
|||||||
fromStep.setDraw(true);
|
fromStep.setDraw(true);
|
||||||
fromStep.setLocation(100, 100 * size);
|
fromStep.setLocation(100, 100 * size);
|
||||||
inputSteps.add(fromStep);
|
inputSteps.add(fromStep);
|
||||||
}else {
|
} else {
|
||||||
List<String> files = new ArrayList<>();
|
List<String> files = new ArrayList<>();
|
||||||
files.add(excelSheetData.getPath());
|
files.add(excelSheetData.getPath());
|
||||||
|
|
||||||
@ -1240,7 +1240,7 @@ public class ExtractDataService {
|
|||||||
if (StringUtils.isNotEmpty(charset)) {
|
if (StringUtils.isNotEmpty(charset)) {
|
||||||
String varcharFields = datasetTableFields.stream().filter(datasetTableField -> datasetTableField.getDeExtractType() == 0).map(DatasetTableField::getOriginName).collect(Collectors.joining(","));
|
String varcharFields = datasetTableFields.stream().filter(datasetTableField -> datasetTableField.getDeExtractType() == 0).map(DatasetTableField::getOriginName).collect(Collectors.joining(","));
|
||||||
tmp_code = tmp_code.replace("handleCharset", handleCharset.replace("Datasource_Charset", charset).replace("Target_Charset", targetCharset).replace("varcharFields", varcharFields));
|
tmp_code = tmp_code.replace("handleCharset", handleCharset.replace("Datasource_Charset", charset).replace("Target_Charset", targetCharset).replace("varcharFields", varcharFields));
|
||||||
}else {
|
} else {
|
||||||
tmp_code = tmp_code.replace("handleCharset", "");
|
tmp_code = tmp_code.replace("handleCharset", "");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -20,6 +20,7 @@ import io.dataease.service.chart.ChartViewService;
|
|||||||
import io.dataease.service.dataset.DataSetGroupService;
|
import io.dataease.service.dataset.DataSetGroupService;
|
||||||
import io.dataease.service.dataset.DataSetTableFieldsService;
|
import io.dataease.service.dataset.DataSetTableFieldsService;
|
||||||
import io.dataease.service.dataset.DataSetTableService;
|
import io.dataease.service.dataset.DataSetTableService;
|
||||||
|
import io.dataease.service.dataset.ExtractDataService;
|
||||||
import io.dataease.service.datasource.DatasourceService;
|
import io.dataease.service.datasource.DatasourceService;
|
||||||
import io.dataease.service.staticResource.StaticResourceService;
|
import io.dataease.service.staticResource.StaticResourceService;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
@ -68,6 +69,8 @@ public class PanelAppTemplateService {
|
|||||||
private DataSetGroupService dataSetGroupService;
|
private DataSetGroupService dataSetGroupService;
|
||||||
@Resource
|
@Resource
|
||||||
private StaticResourceService staticResourceService;
|
private StaticResourceService staticResourceService;
|
||||||
|
@Resource
|
||||||
|
private ExtractDataService extractDataService;
|
||||||
|
|
||||||
public List<PanelAppTemplateWithBLOBs> list(PanelAppTemplateRequest request) {
|
public List<PanelAppTemplateWithBLOBs> list(PanelAppTemplateRequest request) {
|
||||||
return extPanelAppTemplateMapper.queryBaseInfo(request.getNodeType(), request.getPid());
|
return extPanelAppTemplateMapper.queryBaseInfo(request.getNodeType(), request.getPid());
|
||||||
@ -209,6 +212,7 @@ public class PanelAppTemplateService {
|
|||||||
DatasetTableField newTableField = dataSetTableFieldsService.save(datasetTableField);
|
DatasetTableField newTableField = dataSetTableFieldsService.save(datasetTableField);
|
||||||
datasetFieldsRealMap.put(oldId, newTableField.getId());
|
datasetFieldsRealMap.put(oldId, newTableField.getId());
|
||||||
datasetFieldsMd5FormatRealMap.put(TableUtils.fieldNameShort(oldTableId + "_" + datasetTableField.getOriginName()), TableUtils.fieldNameShort(newTableField.getTableId() + "_" + datasetTableField.getOriginName()));
|
datasetFieldsMd5FormatRealMap.put(TableUtils.fieldNameShort(oldTableId + "_" + datasetTableField.getOriginName()), TableUtils.fieldNameShort(newTableField.getTableId() + "_" + datasetTableField.getOriginName()));
|
||||||
|
datasetFieldsMd5FormatRealMap.put(TableUtils.fieldName(oldTableId + "_" + datasetTableField.getDataeaseName()), TableUtils.fieldName(newTableField.getTableId() + "_" + datasetTableField.getDataeaseName()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//数据集计算字段替换
|
//数据集计算字段替换
|
||||||
@ -225,6 +229,8 @@ public class PanelAppTemplateService {
|
|||||||
DatasetTableField newTableField = dataSetTableFieldsService.save(datasetTableField);
|
DatasetTableField newTableField = dataSetTableFieldsService.save(datasetTableField);
|
||||||
datasetFieldsRealMap.put(oldId, newTableField.getId());
|
datasetFieldsRealMap.put(oldId, newTableField.getId());
|
||||||
datasetFieldsMd5FormatRealMap.put(TableUtils.fieldNameShort(oldTableId + "_" + oldOriginName), TableUtils.fieldNameShort(newTableField.getTableId() + "_" + datasetTableField.getOriginName()));
|
datasetFieldsMd5FormatRealMap.put(TableUtils.fieldNameShort(oldTableId + "_" + oldOriginName), TableUtils.fieldNameShort(newTableField.getTableId() + "_" + datasetTableField.getOriginName()));
|
||||||
|
datasetFieldsMd5FormatRealMap.put(TableUtils.fieldName(oldTableId + "_" + datasetTableField.getDataeaseName()), TableUtils.fieldName(newTableField.getTableId() + "_" + datasetTableField.getDataeaseName()));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -233,13 +239,28 @@ public class PanelAppTemplateService {
|
|||||||
if (DatasetType.UNION.name().equalsIgnoreCase(datasetTypeRealMap.get(datasetTableField.getTableId())) || DatasetType.CUSTOM.name().equalsIgnoreCase(datasetTypeRealMap.get(datasetTableField.getTableId()))) {
|
if (DatasetType.UNION.name().equalsIgnoreCase(datasetTypeRealMap.get(datasetTableField.getTableId())) || DatasetType.CUSTOM.name().equalsIgnoreCase(datasetTypeRealMap.get(datasetTableField.getTableId()))) {
|
||||||
DatasetTableField updateField = new DatasetTableField();
|
DatasetTableField updateField = new DatasetTableField();
|
||||||
updateField.setId(datasetTableField.getId());
|
updateField.setId(datasetTableField.getId());
|
||||||
updateField.setOriginName(datasetFieldsMd5FormatRealMap.get(datasetTableField.getOriginName()));
|
String newOriginName = datasetFieldsMd5FormatRealMap.get(datasetTableField.getOriginName());
|
||||||
dataSetTableFieldsService.updateByPrimaryKeySelective(updateField);
|
String dataeaseName = datasetFieldsMd5FormatRealMap.get(datasetTableField.getDataeaseName());
|
||||||
|
if (StringUtils.isNotEmpty(newOriginName) || StringUtils.isNotEmpty(dataeaseName)) {
|
||||||
|
updateField.setOriginName(datasetFieldsMd5FormatRealMap.get(datasetTableField.getOriginName()));
|
||||||
|
updateField.setDataeaseName(datasetFieldsMd5FormatRealMap.get(datasetTableField.getDataeaseName()));
|
||||||
|
dataSetTableFieldsService.updateByPrimaryKeySelective(updateField);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return datasetFieldsRealMap;
|
return datasetFieldsRealMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void createDorisTable(List<DatasetTable> datasetTablesInfo) throws Exception {
|
||||||
|
for (DatasetTable datasetTable : datasetTablesInfo) {
|
||||||
|
if (1 == datasetTable.getMode() && !(DatasetType.CUSTOM.name().equalsIgnoreCase(datasetTable.getType()) || DatasetType.UNION.name().equalsIgnoreCase(datasetTable.getType()))) {
|
||||||
|
List<DatasetTableField> fields = extractDataService.getDatasetTableFields(datasetTable.getId());
|
||||||
|
extractDataService.createEngineTable(TableUtils.tableName(datasetTable.getId()), fields);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void resetCustomAndUnionDataset(List<DatasetTable> datasetTablesInfo, Map<String, String> datasetRealMap, Map<String, String> datasetFieldsRealMap) throws Exception {
|
public void resetCustomAndUnionDataset(List<DatasetTable> datasetTablesInfo, Map<String, String> datasetRealMap, Map<String, String> datasetFieldsRealMap) throws Exception {
|
||||||
for (DatasetTable datasetTable : datasetTablesInfo) {
|
for (DatasetTable datasetTable : datasetTablesInfo) {
|
||||||
|
@ -30,7 +30,6 @@ import io.dataease.listener.util.CacheUtils;
|
|||||||
import io.dataease.plugins.common.base.domain.*;
|
import io.dataease.plugins.common.base.domain.*;
|
||||||
import io.dataease.plugins.common.base.mapper.*;
|
import io.dataease.plugins.common.base.mapper.*;
|
||||||
import io.dataease.plugins.common.constants.DeTypeConstants;
|
import io.dataease.plugins.common.constants.DeTypeConstants;
|
||||||
import io.dataease.service.SystemInfoService;
|
|
||||||
import io.dataease.service.chart.ChartViewService;
|
import io.dataease.service.chart.ChartViewService;
|
||||||
import io.dataease.service.dataset.DataSetGroupService;
|
import io.dataease.service.dataset.DataSetGroupService;
|
||||||
import io.dataease.service.dataset.DataSetTableService;
|
import io.dataease.service.dataset.DataSetTableService;
|
||||||
@ -135,8 +134,6 @@ public class PanelGroupService {
|
|||||||
private DatasetGroupMapper datasetGroupMapper;
|
private DatasetGroupMapper datasetGroupMapper;
|
||||||
@Resource
|
@Resource
|
||||||
private PanelWatermarkMapper panelWatermarkMapper;
|
private PanelWatermarkMapper panelWatermarkMapper;
|
||||||
@Resource
|
|
||||||
private SystemInfoService systemInfoService;
|
|
||||||
|
|
||||||
public List<PanelGroupDTO> tree(PanelGroupRequest panelGroupRequest) {
|
public List<PanelGroupDTO> tree(PanelGroupRequest panelGroupRequest) {
|
||||||
String userId = String.valueOf(AuthUtils.getUser().getUserId());
|
String userId = String.valueOf(AuthUtils.getUser().getUserId());
|
||||||
@ -811,29 +808,6 @@ public class PanelGroupService {
|
|||||||
List<ChartViewField> chartViewFieldsInfo = extChartViewFieldMapper.findByPanelId(panelId);
|
List<ChartViewField> chartViewFieldsInfo = extChartViewFieldMapper.findByPanelId(panelId);
|
||||||
//3.获取所有数据集信息
|
//3.获取所有数据集信息
|
||||||
List<DatasetTable> datasetTablesInfo = extDataSetTableMapper.findByPanelId(panelId);
|
List<DatasetTable> datasetTablesInfo = extDataSetTableMapper.findByPanelId(panelId);
|
||||||
List<String> attachTableIds = new ArrayList<>();
|
|
||||||
if (CollectionUtils.isNotEmpty(datasetTablesInfo)) {
|
|
||||||
for (DatasetTable datasetTable : datasetTablesInfo) {
|
|
||||||
if ("union".equals(datasetTable.getType()) && StringUtils.isNotEmpty(datasetTable.getInfo())) {
|
|
||||||
DataTableInfoDTO dt = gson.fromJson(datasetTable.getInfo(), DataTableInfoDTO.class);
|
|
||||||
DatasetUtils.getUnionTable(attachTableIds, dt.getUnion());
|
|
||||||
} else if ("custom".equals(datasetTable.getType()) && StringUtils.isNotEmpty(datasetTable.getInfo())) {
|
|
||||||
Map result = gson.fromJson(datasetTable.getInfo(), Map.class);
|
|
||||||
List<Map> list = (List<Map>) result.get("list");
|
|
||||||
if (CollectionUtils.isNotEmpty(list)) {
|
|
||||||
for (Map details : list) {
|
|
||||||
attachTableIds.add(String.valueOf(details.get("tableId")));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (CollectionUtils.isNotEmpty(attachTableIds)) {
|
|
||||||
List<DatasetTable> attachDatasetTables = extDataSetTableMapper.findByTableIds(attachTableIds);
|
|
||||||
if (CollectionUtils.isNotEmpty(attachDatasetTables)) {
|
|
||||||
datasetTablesInfo.addAll(attachDatasetTables);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// dataset check
|
// dataset check
|
||||||
if (CollectionUtils.isEmpty(datasetTablesInfo)) {
|
if (CollectionUtils.isEmpty(datasetTablesInfo)) {
|
||||||
return new PanelExport2App(Translator.get("I18N_APP_NO_DATASET_ERROR"));
|
return new PanelExport2App(Translator.get("I18N_APP_NO_DATASET_ERROR"));
|
||||||
@ -841,6 +815,23 @@ public class PanelGroupService {
|
|||||||
return new PanelExport2App(Translator.get("I18N_APP_ERROR_DATASET"));
|
return new PanelExport2App(Translator.get("I18N_APP_ERROR_DATASET"));
|
||||||
}
|
}
|
||||||
List<String> allTableIds = datasetTablesInfo.stream().map(DatasetTable::getId).collect(Collectors.toList());
|
List<String> allTableIds = datasetTablesInfo.stream().map(DatasetTable::getId).collect(Collectors.toList());
|
||||||
|
if (CollectionUtils.isNotEmpty(datasetTablesInfo)) {
|
||||||
|
for (DatasetTable datasetTable : datasetTablesInfo) {
|
||||||
|
if ("union".equals(datasetTable.getType()) && StringUtils.isNotEmpty(datasetTable.getInfo())) {
|
||||||
|
DataTableInfoDTO dt = gson.fromJson(datasetTable.getInfo(), DataTableInfoDTO.class);
|
||||||
|
DatasetUtils.getUnionTable(allTableIds, dt.getUnion());
|
||||||
|
} else if ("custom".equals(datasetTable.getType()) && StringUtils.isNotEmpty(datasetTable.getInfo())) {
|
||||||
|
Map result = gson.fromJson(datasetTable.getInfo(), Map.class);
|
||||||
|
List<Map> list = (List<Map>) result.get("list");
|
||||||
|
if (CollectionUtils.isNotEmpty(list)) {
|
||||||
|
for (Map details : list) {
|
||||||
|
allTableIds.add(String.valueOf(details.get("tableId")));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
datasetTablesInfo = extDataSetTableMapper.findByTableIds(allTableIds);
|
||||||
//4.获取所有数据集字段信息
|
//4.获取所有数据集字段信息
|
||||||
List<DatasetTableField> datasetTableFieldsInfo = extDataSetTableFieldMapper.findByTableIds(allTableIds);
|
List<DatasetTableField> datasetTableFieldsInfo = extDataSetTableFieldMapper.findByTableIds(allTableIds);
|
||||||
//5.获取所有任务信息
|
//5.获取所有任务信息
|
||||||
@ -917,6 +908,8 @@ public class PanelGroupService {
|
|||||||
|
|
||||||
Map<String, String> datasetFieldsRealMap = panelAppTemplateService.applyDatasetField(datasetTableFieldsInfo, datasetsRealMap, datasetTypeRealMap, datasetFieldsMd5FormatRealMap);
|
Map<String, String> datasetFieldsRealMap = panelAppTemplateService.applyDatasetField(datasetTableFieldsInfo, datasetsRealMap, datasetTypeRealMap, datasetFieldsMd5FormatRealMap);
|
||||||
|
|
||||||
|
panelAppTemplateService.createDorisTable(datasetTablesInfo);
|
||||||
|
|
||||||
panelAppTemplateService.resetCustomAndUnionDataset(datasetTablesInfo, datasetsRealMap, datasetFieldsRealMap);
|
panelAppTemplateService.resetCustomAndUnionDataset(datasetTablesInfo, datasetsRealMap, datasetFieldsRealMap);
|
||||||
|
|
||||||
Map<String, String> chartViewsRealMap = panelAppTemplateService.applyViews(chartViewsInfo, datasetsRealMap, datasetFieldsRealMap, datasetFieldsMd5FormatRealMap, newPanelId);
|
Map<String, String> chartViewsRealMap = panelAppTemplateService.applyViews(chartViewsInfo, datasetsRealMap, datasetFieldsRealMap, datasetFieldsMd5FormatRealMap, newPanelId);
|
||||||
|
@ -247,3 +247,16 @@ I18N_LOG_FORMAT_POSITION=IN\u3010%s\u3011
|
|||||||
I18N_LOG_FORMAT=TO %s\u3010%s\u3011
|
I18N_LOG_FORMAT=TO %s\u3010%s\u3011
|
||||||
I18N_LOG_FORMAT_PREFIX=With authority of %s\u3010%s\u3011
|
I18N_LOG_FORMAT_PREFIX=With authority of %s\u3010%s\u3011
|
||||||
|
|
||||||
|
\u4E0A\u4F20\u63D2\u4EF6=Upload
|
||||||
|
\u5378\u8F7D\u63D2\u4EF6=Uninstall
|
||||||
|
\u67E5\u770B\u7CFB\u7EDF\u6A21\u677F=System templates
|
||||||
|
\u7F16\u8F91\u62A5\u544A=Edit report
|
||||||
|
\u521B\u5EFA\u62A5\u544A=Create report
|
||||||
|
\u5220\u9664\u62A5\u544A=Delete report
|
||||||
|
\u5BFC\u51FA\u65E5\u5FD7=Export log
|
||||||
|
\u5BFC\u5165\u7528\u6237=Import user
|
||||||
|
\u6570\u636E\u96C6\u8868\u5355=Dataset form
|
||||||
|
\u7F16\u8F91\u8BB0\u5F55=Edit record
|
||||||
|
\u5220\u9664\u8BB0\u5F55=Delete record
|
||||||
|
\u6C34\u5370\u7BA1\u7406=Watermark
|
||||||
|
|
||||||
|
@ -247,3 +247,17 @@ I18N_LOG_FORMAT_POSITION=\u5728\u3010%s\u3011
|
|||||||
I18N_LOG_FORMAT=\u7ED9%s\u3010%s\u3011
|
I18N_LOG_FORMAT=\u7ED9%s\u3010%s\u3011
|
||||||
I18N_LOG_FORMAT_PREFIX=\u4EE5%s\u3010%s\u3011\u6743\u9650
|
I18N_LOG_FORMAT_PREFIX=\u4EE5%s\u3010%s\u3011\u6743\u9650
|
||||||
|
|
||||||
|
\u4E0A\u4F20\u63D2\u4EF6=\u4E0A\u4F20\u63D2\u4EF6
|
||||||
|
\u5378\u8F7D\u63D2\u4EF6=\u5378\u8F7D\u63D2\u4EF6
|
||||||
|
\u67E5\u770B\u7CFB\u7EDF\u6A21\u677F=\u7CFB\u7EDF\u6A21\u7248
|
||||||
|
\u7F16\u8F91\u62A5\u544A=\u7F16\u8F91\u62A5\u544A
|
||||||
|
\u521B\u5EFA\u62A5\u544A=\u521B\u5EFA\u62A5\u544A
|
||||||
|
\u5220\u9664\u62A5\u544A=\u5220\u9664\u62A5\u544A
|
||||||
|
\u5BFC\u51FA\u65E5\u5FD7=\u5BFC\u51FA\u65E5\u5FD7
|
||||||
|
\u5BFC\u5165\u7528\u6237=\u5BFC\u5165\u7528\u6237
|
||||||
|
\u6570\u636E\u96C6\u8868\u5355=\u6570\u636E\u96C6\u8868\u5355
|
||||||
|
\u7F16\u8F91\u8BB0\u5F55=\u7F16\u8F91\u8BB0\u5F55
|
||||||
|
\u5220\u9664\u8BB0\u5F55=\u5220\u9664\u8BB0\u5F55
|
||||||
|
\u6C34\u5370\u7BA1\u7406=\u6C34\u5370\u7BA1\u7406
|
||||||
|
|
||||||
|
|
||||||
|
@ -242,3 +242,16 @@ I18N_PROHIBIT_SCANNING_TO_CREATE_USER=\u7981\u6B62\u6383\u78BC\u5275\u5EFA\u7528
|
|||||||
I18N_LOG_FORMAT_POSITION=\u5728\u3010%s\u3011
|
I18N_LOG_FORMAT_POSITION=\u5728\u3010%s\u3011
|
||||||
I18N_LOG_FORMAT=\u7D66%s\u3010%s\u3011
|
I18N_LOG_FORMAT=\u7D66%s\u3010%s\u3011
|
||||||
I18N_LOG_FORMAT_PREFIX=\u4EE5%s\u3010%s\u3011\u6B0A\u9650
|
I18N_LOG_FORMAT_PREFIX=\u4EE5%s\u3010%s\u3011\u6B0A\u9650
|
||||||
|
|
||||||
|
\u4E0A\u4F20\u63D2\u4EF6=\u4E0A\u50B3\u63D2\u4EF6
|
||||||
|
\u5378\u8F7D\u63D2\u4EF6=\u5378\u8F09\u63D2\u4EF6
|
||||||
|
\u67E5\u770B\u7CFB\u7EDF\u6A21\u677F=\u7CFB\u7D71\u6A21\u7248
|
||||||
|
\u7F16\u8F91\u62A5\u544A=\u7DE8\u8F2F\u5831\u544A
|
||||||
|
\u521B\u5EFA\u62A5\u544A=\u5275\u5EFA\u5831\u544A
|
||||||
|
\u5220\u9664\u62A5\u544A=\u522A\u9664\u5831\u544A
|
||||||
|
\u5BFC\u51FA\u65E5\u5FD7=\u5C0E\u51FA\u65E5\u8A8C
|
||||||
|
\u5BFC\u5165\u7528\u6237=\u5C0E\u5165\u7528\u6236
|
||||||
|
\u6570\u636E\u96C6\u8868\u5355=\u6578\u64DA\u96C6\u8868\u55AE
|
||||||
|
\u7F16\u8F91\u8BB0\u5F55=\u7DE8\u8F2F\u8A18\u9304
|
||||||
|
\u5220\u9664\u8BB0\u5F55=\u522A\u9664\u8A18\u9304
|
||||||
|
\u6C34\u5370\u7BA1\u7406=\u6C34\u5370\u7BA1\u7406
|
||||||
|
@ -293,14 +293,18 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
elementMouseDown(e) {
|
elementMouseDown(e) {
|
||||||
// private 设置当前组件数据及状态
|
// // private 设置当前组件数据及状态
|
||||||
this.$store.commit('setClickComponentStatus', true)
|
this.$store.commit('setClickComponentStatus', true)
|
||||||
if (this.config.component !== 'v-text' && this.config.component !== 'rect-shape' && this.config.component !== 'de-input-search' && this.config.component !== 'de-select-grid' && this.config.component !== 'de-number-range' && this.config.component !== 'de-date') {
|
if (this.config.component !== 'v-text' && this.config.component !== 'rect-shape' && this.config.component !== 'de-input-search' && this.config.component !== 'de-select-grid' && this.config.component !== 'de-number-range' && this.config.component !== 'de-date') {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
}
|
}
|
||||||
// 阻止冒泡事件
|
// 阻止冒泡事件
|
||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
this.$store.commit('setCurComponent', { component: this.config, index: this.index })
|
const _this = this
|
||||||
|
setTimeout(() => {
|
||||||
|
_this.$store.commit('setCurComponent', { component: _this.config, index: _this.index })
|
||||||
|
}, 200)
|
||||||
|
|
||||||
},
|
},
|
||||||
showViewDetails(params) {
|
showViewDetails(params) {
|
||||||
this.$refs.wrapperChild.openChartDetailsDialog(params)
|
this.$refs.wrapperChild.openChartDetailsDialog(params)
|
||||||
|
@ -372,7 +372,7 @@ export default {
|
|||||||
])
|
])
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
if (navigator.platform.indexOf('Mac') == -1) {
|
if (navigator.platform.indexOf('Mac') === -1) {
|
||||||
this.systemOS = 'Other'
|
this.systemOS = 'Other'
|
||||||
}
|
}
|
||||||
this.initCurFields()
|
this.initCurFields()
|
||||||
|
@ -17,8 +17,7 @@
|
|||||||
v-if="curComponent.type != 'custom-button'"
|
v-if="curComponent.type != 'custom-button'"
|
||||||
icon="el-icon-document-copy"
|
icon="el-icon-document-copy"
|
||||||
@click.native="copy"
|
@click.native="copy"
|
||||||
><span>{{ $t('panel.copy') }}(<span v-show="systemOS==='Mac'"><i class="icon iconfont icon-command"
|
><span>{{ $t('panel.copy') }}(<span v-show="systemOS==='Mac'"><i class="icon iconfont icon-command" />+ D</span> <span v-show="systemOS!=='Mac'">Control + D</span>)</span>
|
||||||
/>+ D</span> <span v-show="systemOS!=='Mac'">Control + D</span>)</span>
|
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@ -210,7 +209,7 @@ export default {
|
|||||||
])
|
])
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
if (navigator.platform.indexOf('Mac') == -1) {
|
if (navigator.platform.indexOf('Mac') === -1) {
|
||||||
this.systemOS = 'Other'
|
this.systemOS = 'Other'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -112,9 +112,9 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//eslint-disable-next-line
|
// eslint-disable-next-line
|
||||||
this.showPrevMore = showPrevMore
|
this.showPrevMore = showPrevMore
|
||||||
//eslint-disable-next-line
|
// eslint-disable-next-line
|
||||||
this.showNextMore = showNextMore
|
this.showNextMore = showNextMore
|
||||||
|
|
||||||
return array
|
return array
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-input
|
<el-input
|
||||||
v-count="value"
|
v-count="{value, maxlength}"
|
||||||
:placeholder="$t('fu.search_bar.please_input')"
|
:placeholder="$t('fu.search_bar.please_input')"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
:value="value"
|
:value="value"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
maxlength="200"
|
:maxlength="maxlength"
|
||||||
@input="handleChange"
|
@input="handleChange"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
@ -16,14 +16,14 @@ export default {
|
|||||||
directives: {
|
directives: {
|
||||||
count: {
|
count: {
|
||||||
update: function(el, binding) {
|
update: function(el, binding) {
|
||||||
const lg = binding.value?.length || 0
|
const lg = binding.value.value?.length || 0
|
||||||
const count = el.querySelector('.el-input__count')
|
const count = el.querySelector('.el-input__count')
|
||||||
if (!count) return
|
if (!count) return
|
||||||
if (!lg) {
|
if (!lg) {
|
||||||
if (count?.classList?.contains('no-zore')) {
|
if (count?.classList?.contains('no-zore')) {
|
||||||
count.classList.remove('no-zore')
|
count.classList.remove('no-zore')
|
||||||
}
|
}
|
||||||
count.innerHTML = '0/200'
|
count.innerHTML = `0/${binding.value.maxlength || 200}`
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (el.querySelector('.no-zore')) {
|
if (el.querySelector('.no-zore')) {
|
||||||
@ -34,7 +34,7 @@ export default {
|
|||||||
const num = document.createElement('span')
|
const num = document.createElement('span')
|
||||||
const total = document.createElement('span')
|
const total = document.createElement('span')
|
||||||
num.style.color = '#1F2329'
|
num.style.color = '#1F2329'
|
||||||
total.innerHTML = '/200'
|
total.innerHTML = `/${binding.value.maxlength || 200}`
|
||||||
num.innerHTML = lg
|
num.innerHTML = lg
|
||||||
if (!newCount) return
|
if (!newCount) return
|
||||||
newCount.classList.add('el-input__count', 'no-zore')
|
newCount.classList.add('el-input__count', 'no-zore')
|
||||||
@ -46,7 +46,11 @@ export default {
|
|||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
disabled: Boolean,
|
disabled: Boolean,
|
||||||
value: String
|
value: String,
|
||||||
|
maxlength: {
|
||||||
|
type: Number,
|
||||||
|
default: 200
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleChange(val) {
|
handleChange(val) {
|
||||||
|
@ -135,6 +135,7 @@ export default {
|
|||||||
default_login: 'Normal'
|
default_login: 'Normal'
|
||||||
},
|
},
|
||||||
commons: {
|
commons: {
|
||||||
|
collapse_navigation: 'Collapse navigation',
|
||||||
operate_cancelled: 'Operation cancelled',
|
operate_cancelled: 'Operation cancelled',
|
||||||
bind: 'Bind',
|
bind: 'Bind',
|
||||||
unbind: 'Unbind',
|
unbind: 'Unbind',
|
||||||
@ -815,6 +816,7 @@ export default {
|
|||||||
edite_organization: 'Edit organization'
|
edite_organization: 'Edit organization'
|
||||||
},
|
},
|
||||||
system_parameter_setting: {
|
system_parameter_setting: {
|
||||||
|
email_server_config: 'Mailbox server configuration',
|
||||||
edit_success: 'Edit success',
|
edit_success: 'Edit success',
|
||||||
mailbox_service_settings: 'Mail Setting',
|
mailbox_service_settings: 'Mail Setting',
|
||||||
test_connection: 'Test connection',
|
test_connection: 'Test connection',
|
||||||
@ -1904,7 +1906,7 @@ export default {
|
|||||||
},
|
},
|
||||||
panel: {
|
panel: {
|
||||||
position_adjust_component: 'Position adjust',
|
position_adjust_component: 'Position adjust',
|
||||||
active_font_size: 'Active font size',
|
active_font_size: 'Selected font size',
|
||||||
carousel: 'Carousel',
|
carousel: 'Carousel',
|
||||||
switch_time: 'Switch time',
|
switch_time: 'Switch time',
|
||||||
position_adjust: 'Position',
|
position_adjust: 'Position',
|
||||||
@ -2555,6 +2557,14 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
emailtask: {
|
emailtask: {
|
||||||
|
week_mon: 'Mon',
|
||||||
|
week_tue: 'Tue',
|
||||||
|
week_wed: 'Wed',
|
||||||
|
week_thu: 'Thu',
|
||||||
|
week_fri: 'Fri',
|
||||||
|
week_sat: 'Sat',
|
||||||
|
week_sun: 'Sun',
|
||||||
|
send_config: 'Send configuration',
|
||||||
title: 'Title',
|
title: 'Title',
|
||||||
panel: 'Panel',
|
panel: 'Panel',
|
||||||
content: 'Content',
|
content: 'Content',
|
||||||
|
@ -135,6 +135,7 @@ export default {
|
|||||||
default_login: '普通登錄'
|
default_login: '普通登錄'
|
||||||
},
|
},
|
||||||
commons: {
|
commons: {
|
||||||
|
collapse_navigation: '收起導航',
|
||||||
operate_cancelled: '已取消操作',
|
operate_cancelled: '已取消操作',
|
||||||
bind: '綁定',
|
bind: '綁定',
|
||||||
unbind: '解綁',
|
unbind: '解綁',
|
||||||
@ -814,6 +815,7 @@ export default {
|
|||||||
edite_organization: '編輯組織'
|
edite_organization: '編輯組織'
|
||||||
},
|
},
|
||||||
system_parameter_setting: {
|
system_parameter_setting: {
|
||||||
|
email_server_config: '郵箱服務器配置',
|
||||||
edit_success: '編輯成功',
|
edit_success: '編輯成功',
|
||||||
mailbox_service_settings: '郵件設置',
|
mailbox_service_settings: '郵件設置',
|
||||||
test_connection: '測試連接',
|
test_connection: '測試連接',
|
||||||
@ -1903,7 +1905,7 @@ export default {
|
|||||||
},
|
},
|
||||||
panel: {
|
panel: {
|
||||||
position_adjust_component: '位置調整',
|
position_adjust_component: '位置調整',
|
||||||
active_font_size: '激活字體大小',
|
active_font_size: '选中字體大小',
|
||||||
carousel: '輪播',
|
carousel: '輪播',
|
||||||
switch_time: '切換時間',
|
switch_time: '切換時間',
|
||||||
position_adjust: '位置',
|
position_adjust: '位置',
|
||||||
@ -2555,6 +2557,14 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
emailtask: {
|
emailtask: {
|
||||||
|
week_mon: '周一',
|
||||||
|
week_tue: '周二',
|
||||||
|
week_wed: '周三',
|
||||||
|
week_thu: '周四',
|
||||||
|
week_fri: '周五',
|
||||||
|
week_sat: '周六',
|
||||||
|
week_sun: '周日',
|
||||||
|
send_config: '發送設置',
|
||||||
title: '報告主題',
|
title: '報告主題',
|
||||||
panel: '儀表闆',
|
panel: '儀表闆',
|
||||||
content: '報告正文',
|
content: '報告正文',
|
||||||
@ -2579,9 +2589,9 @@ export default {
|
|||||||
emial_preview: '報告預覽',
|
emial_preview: '報告預覽',
|
||||||
chart_data_range: '視圖數據範圍',
|
chart_data_range: '視圖數據範圍',
|
||||||
simple_repeat: '簡單重複',
|
simple_repeat: '簡單重複',
|
||||||
once_a_day: '每天一次',
|
once_a_day: '每天',
|
||||||
once_a_week: '每周一次',
|
once_a_week: '每周',
|
||||||
once_a_month: '每月一次',
|
once_a_month: '每月',
|
||||||
complex_repeat: '複雜重複',
|
complex_repeat: '複雜重複',
|
||||||
pixel_tip: '可直接輸入分辨率(例如:2560 * 1600)或者選擇',
|
pixel_tip: '可直接輸入分辨率(例如:2560 * 1600)或者選擇',
|
||||||
task_type: '任務類型',
|
task_type: '任務類型',
|
||||||
|
@ -135,6 +135,7 @@ export default {
|
|||||||
default_login: '普通登录'
|
default_login: '普通登录'
|
||||||
},
|
},
|
||||||
commons: {
|
commons: {
|
||||||
|
collapse_navigation: '收起导航',
|
||||||
operate_cancelled: '已取消操作',
|
operate_cancelled: '已取消操作',
|
||||||
bind: '绑定',
|
bind: '绑定',
|
||||||
unbind: '解绑',
|
unbind: '解绑',
|
||||||
@ -813,6 +814,7 @@ export default {
|
|||||||
edite_organization: '编辑组织'
|
edite_organization: '编辑组织'
|
||||||
},
|
},
|
||||||
system_parameter_setting: {
|
system_parameter_setting: {
|
||||||
|
email_server_config: '邮箱服务器配置',
|
||||||
edit_success: '编辑成功',
|
edit_success: '编辑成功',
|
||||||
mailbox_service_settings: '邮件设置',
|
mailbox_service_settings: '邮件设置',
|
||||||
test_connection: '测试连接',
|
test_connection: '测试连接',
|
||||||
@ -1903,7 +1905,7 @@ export default {
|
|||||||
},
|
},
|
||||||
panel: {
|
panel: {
|
||||||
position_adjust_component: '位置调整',
|
position_adjust_component: '位置调整',
|
||||||
active_font_size: '激活字体大小',
|
active_font_size: '选中字体大小',
|
||||||
carousel: '轮播',
|
carousel: '轮播',
|
||||||
switch_time: '切换时间',
|
switch_time: '切换时间',
|
||||||
position_adjust: '位置',
|
position_adjust: '位置',
|
||||||
@ -2555,6 +2557,14 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
emailtask: {
|
emailtask: {
|
||||||
|
week_mon: '周一',
|
||||||
|
week_tue: '周二',
|
||||||
|
week_wed: '周三',
|
||||||
|
week_thu: '周四',
|
||||||
|
week_fri: '周五',
|
||||||
|
week_sat: '周六',
|
||||||
|
week_sun: '周日',
|
||||||
|
send_config: '发送设置',
|
||||||
title: '报告主题',
|
title: '报告主题',
|
||||||
panel: '仪表板',
|
panel: '仪表板',
|
||||||
content: '报告正文',
|
content: '报告正文',
|
||||||
@ -2579,9 +2589,9 @@ export default {
|
|||||||
emial_preview: '报告预览',
|
emial_preview: '报告预览',
|
||||||
chart_data_range: '视图数据范围',
|
chart_data_range: '视图数据范围',
|
||||||
simple_repeat: '简单重复',
|
simple_repeat: '简单重复',
|
||||||
once_a_day: '每天一次',
|
once_a_day: '每天',
|
||||||
once_a_week: '每周一次',
|
once_a_week: '每周',
|
||||||
once_a_month: '每月一次',
|
once_a_month: '每月',
|
||||||
complex_repeat: '复杂重复',
|
complex_repeat: '复杂重复',
|
||||||
pixel_tip: '可直接输入自定义分辨率(例如:2560 * 1600)或选择',
|
pixel_tip: '可直接输入自定义分辨率(例如:2560 * 1600)或选择',
|
||||||
task_type: '任务类型',
|
task_type: '任务类型',
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
:style="{ transform: isCollapse ? 'rotate(90deg)' : 'rotate(-90deg)' }"
|
:style="{ transform: isCollapse ? 'rotate(90deg)' : 'rotate(-90deg)' }"
|
||||||
class="el-icon-upload2"
|
class="el-icon-upload2"
|
||||||
/>
|
/>
|
||||||
{{ isCollapse ? "" : "收起导航" }}
|
{{ isCollapse ? "" : $t('commons.collapse_navigation') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -108,13 +108,16 @@ service.interceptors.response.use(response => {
|
|||||||
const headers = error.response && error.response.headers || error.response || config.headers
|
const headers = error.response && error.response.headers || error.response || config.headers
|
||||||
config.loading && tryHideLoading(store.getters.currentPath)
|
config.loading && tryHideLoading(store.getters.currentPath)
|
||||||
|
|
||||||
let msg
|
let msg = ''
|
||||||
if (error.response) {
|
if (error.response) {
|
||||||
checkAuth(error.response)
|
checkAuth(error.response)
|
||||||
msg = error.response.data.message || error.response.data
|
msg = error.response.data.message || error.response.data
|
||||||
} else {
|
} else {
|
||||||
msg = error.message
|
msg = error.message
|
||||||
}
|
}
|
||||||
|
if (msg.length > 600) {
|
||||||
|
msg = msg.slice(0, 600)
|
||||||
|
}
|
||||||
!config.hideMsg && (!headers['authentication-status']) && $error(msg)
|
!config.hideMsg && (!headers['authentication-status']) && $error(msg)
|
||||||
return Promise.reject(config.url === '/dataset/table/sqlPreview' ? msg : error)
|
return Promise.reject(config.url === '/dataset/table/sqlPreview' ? msg : error)
|
||||||
})
|
})
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
:style="title_class"
|
:style="title_class"
|
||||||
style="cursor: default;display: block;"
|
style="cursor: default;display: block;"
|
||||||
>
|
>
|
||||||
<div style="padding:6px 4px 0;margin: 0;">
|
<div style="padding:4px 4px 0;margin: 0;">
|
||||||
<chart-title-update
|
<chart-title-update
|
||||||
:title-class="title_class"
|
:title-class="title_class"
|
||||||
:chart-info="chartInfo"
|
:chart-info="chartInfo"
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
:style="title_class"
|
:style="title_class"
|
||||||
style="cursor: default;display: block;"
|
style="cursor: default;display: block;"
|
||||||
>
|
>
|
||||||
<div style="padding:6px 4px 0;margin: 0;">
|
<div style="padding:4px 4px 0;margin: 0;">
|
||||||
<chart-title-update
|
<chart-title-update
|
||||||
:title-class="title_class"
|
:title-class="title_class"
|
||||||
:chart-info="chartInfo"
|
:chart-info="chartInfo"
|
||||||
|
@ -380,8 +380,8 @@ export default {
|
|||||||
if (!viewSave) return
|
if (!viewSave) return
|
||||||
viewEditSave(this.panelInfo.id, viewSave).then(() => {
|
viewEditSave(this.panelInfo.id, viewSave).then(() => {
|
||||||
this.chart.title = this.chartTitleUpdate
|
this.chart.title = this.chartTitleUpdate
|
||||||
bus.$emit('aside-set-title', this.chart.title)
|
|
||||||
})
|
})
|
||||||
|
bus.$emit('title-name', this.chart.title, chartView.id)
|
||||||
bus.$emit('view-in-cache', {
|
bus.$emit('view-in-cache', {
|
||||||
type: 'styleChange',
|
type: 'styleChange',
|
||||||
viewId: chartView.id,
|
viewId: chartView.id,
|
||||||
|
@ -67,7 +67,8 @@ export default {
|
|||||||
min_height: 200,
|
min_height: 200,
|
||||||
max_height: 500,
|
max_height: 500,
|
||||||
elementpath: false,
|
elementpath: false,
|
||||||
statusbar: false
|
statusbar: false,
|
||||||
|
convert_urls: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<div
|
<div
|
||||||
ref="tableContainer"
|
ref="tableContainer"
|
||||||
:style="bg_class"
|
:style="bg_class"
|
||||||
style="padding: 8px;width: 100%;height: 100%;overflow: hidden;"
|
style="padding: 4px;width: 100%;height: 100%;overflow: hidden;"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
v-show="title_show"
|
v-show="title_show"
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<div
|
<div
|
||||||
ref="tableContainer"
|
ref="tableContainer"
|
||||||
:style="bg_class"
|
:style="bg_class"
|
||||||
style="width: 100%;height: 100%;overflow: hidden;"
|
style="padding: 4px;width: 100%;height: 100%;overflow: hidden;"
|
||||||
>
|
>
|
||||||
<view-track-bar
|
<view-track-bar
|
||||||
ref="viewTrack"
|
ref="viewTrack"
|
||||||
|
@ -369,7 +369,7 @@ export default {
|
|||||||
const arr = this.thresholdForm.gaugeThreshold.split(',')
|
const arr = this.thresholdForm.gaugeThreshold.split(',')
|
||||||
for (let i = 0; i < arr.length; i++) {
|
for (let i = 0; i < arr.length; i++) {
|
||||||
const ele = arr[i]
|
const ele = arr[i]
|
||||||
if (parseFloat(ele).toString() === 'NaN' || parseFloat(ele) < 1 || parseFloat(ele) > 99) {
|
if (parseFloat(ele).toString() === 'NaN' || parseFloat(ele) <= 0 || parseFloat(ele) >= 100) {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: this.$t('chart.gauge_threshold_format_error'),
|
message: this.$t('chart.gauge_threshold_format_error'),
|
||||||
type: 'error',
|
type: 'error',
|
||||||
|
@ -1934,7 +1934,8 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
setTitle(title) {
|
setTitle(title, id) {
|
||||||
|
if (this.view.id !== id) return
|
||||||
this.view.customStyle.text = { ...this.view.customStyle.text, title }
|
this.view.customStyle.text = { ...this.view.customStyle.text, title }
|
||||||
this.view.title = title
|
this.view.title = title
|
||||||
this.view.name = title
|
this.view.name = title
|
||||||
|
@ -14,7 +14,9 @@
|
|||||||
v-model="styleInfo.top"
|
v-model="styleInfo.top"
|
||||||
type="number"
|
type="number"
|
||||||
:min="0"
|
:min="0"
|
||||||
|
:max="maxTop"
|
||||||
class="hide-icon-number"
|
class="hide-icon-number"
|
||||||
|
@change="topOnChange"
|
||||||
>
|
>
|
||||||
<template slot="append">px</template>
|
<template slot="append">px</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
@ -44,8 +46,11 @@
|
|||||||
>
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="styleInfo.width"
|
v-model="styleInfo.width"
|
||||||
|
:min="0"
|
||||||
|
:max="maxWidth"
|
||||||
type="number"
|
type="number"
|
||||||
class="hide-icon-number"
|
class="hide-icon-number"
|
||||||
|
@change="widthOnChange"
|
||||||
>
|
>
|
||||||
<template slot="append">px</template>
|
<template slot="append">px</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
@ -59,7 +64,10 @@
|
|||||||
<el-input
|
<el-input
|
||||||
v-model="styleInfo.height"
|
v-model="styleInfo.height"
|
||||||
type="number"
|
type="number"
|
||||||
|
:min="0"
|
||||||
|
:max="maxHeight"
|
||||||
class="hide-icon-number"
|
class="hide-icon-number"
|
||||||
|
@change="heightOnChange"
|
||||||
>
|
>
|
||||||
<template slot="append">px</template>
|
<template slot="append">px</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
@ -77,12 +85,18 @@ export default {
|
|||||||
name: 'PositionAdjust',
|
name: 'PositionAdjust',
|
||||||
props: {},
|
props: {},
|
||||||
data() {
|
data() {
|
||||||
return {}
|
return {
|
||||||
|
maxHeight: 2000,
|
||||||
|
maxTop: 40000
|
||||||
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
maxLeft() {
|
maxLeft() {
|
||||||
return 1600 - this.styleInfo.width - this.componentGap
|
return 1600 - this.styleInfo.width - this.componentGap
|
||||||
},
|
},
|
||||||
|
maxWidth() {
|
||||||
|
return 1600 - this.styleInfo.left - this.componentGap
|
||||||
|
},
|
||||||
styleInfo() {
|
styleInfo() {
|
||||||
return this.$store.state.curComponent.style
|
return this.$store.state.curComponent.style
|
||||||
},
|
},
|
||||||
@ -97,7 +111,34 @@ export default {
|
|||||||
leftOnChange() {
|
leftOnChange() {
|
||||||
if (this.styleInfo.left > this.maxLeft) {
|
if (this.styleInfo.left > this.maxLeft) {
|
||||||
this.styleInfo.left = this.maxLeft
|
this.styleInfo.left = this.maxLeft
|
||||||
|
} else if (this.styleInfo.left < 0) {
|
||||||
|
this.styleInfo.left = 0
|
||||||
}
|
}
|
||||||
|
this.$store.commit('canvasChange')
|
||||||
|
},
|
||||||
|
widthOnChange() {
|
||||||
|
if (this.styleInfo.width > this.maxWidth) {
|
||||||
|
this.styleInfo.width = this.maxWidth
|
||||||
|
} else if (this.styleInfo.width < 0) {
|
||||||
|
this.styleInfo.left = 0
|
||||||
|
}
|
||||||
|
this.$store.commit('canvasChange')
|
||||||
|
},
|
||||||
|
heightOnChange() {
|
||||||
|
if (this.styleInfo.height > this.maxHeight) {
|
||||||
|
this.styleInfo.height = this.maxHeight
|
||||||
|
} else if (this.styleInfo.height < 0) {
|
||||||
|
this.styleInfo.height = 0
|
||||||
|
}
|
||||||
|
this.$store.commit('canvasChange')
|
||||||
|
},
|
||||||
|
topOnChange() {
|
||||||
|
if (this.styleInfo.top > this.maxTop) {
|
||||||
|
this.styleInfo.top = this.maxTop
|
||||||
|
} else if (this.styleInfo.top < 0) {
|
||||||
|
this.styleInfo.top = 0
|
||||||
|
}
|
||||||
|
this.$store.commit('canvasChange')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -859,9 +859,12 @@ export default {
|
|||||||
if (item.dateFormatType !== 'custom') {
|
if (item.dateFormatType !== 'custom') {
|
||||||
item.dateFormat = item.dateFormatType
|
item.dateFormat = item.dateFormatType
|
||||||
}
|
}
|
||||||
|
}else {
|
||||||
|
item.dateFormatType = ''
|
||||||
|
item.dateFormat = ''
|
||||||
}
|
}
|
||||||
if(item.dateFormatType === 'custom' && !item.dateFormat){
|
if (item.dateFormatType === 'custom' && !item.dateFormat) {
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
post('/dataset/field/save', item)
|
post('/dataset/field/save', item)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
|
@ -861,7 +861,7 @@ export default {
|
|||||||
},
|
},
|
||||||
disableExec(task) {
|
disableExec(task) {
|
||||||
return (
|
return (
|
||||||
(task.status === 'Stopped' && task.rate !== 'SIMPLE') || task.status === 'Pending' || task.status ==='Exec' || !hasDataPermission('manage', task.privileges)
|
(task.status === 'Stopped' && task.rate !== 'SIMPLE') || task.status === 'Pending' || task.status === 'Exec' || !hasDataPermission('manage', task.privileges)
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
disableDelete(task) {
|
disableDelete(task) {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-row
|
<el-row
|
||||||
|
v-loading="$store.getters.loadingMap[$store.getters.currentPath]"
|
||||||
style="text-align: left"
|
style="text-align: left"
|
||||||
class="de-search-table"
|
class="de-search-table"
|
||||||
v-loading="$store.getters.loadingMap[$store.getters.currentPath]"
|
|
||||||
>
|
>
|
||||||
<el-row class="top-operate">
|
<el-row class="top-operate">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@ -36,8 +36,8 @@
|
|||||||
icon="iconfont icon-icon-filter"
|
icon="iconfont icon-icon-filter"
|
||||||
@click="filterShow"
|
@click="filterShow"
|
||||||
>{{
|
>{{
|
||||||
$t('user.filter')
|
$t('user.filter')
|
||||||
}}
|
}}
|
||||||
<template v-if="filterTexts.length">
|
<template v-if="filterTexts.length">
|
||||||
({{ cacheCondition.length }})
|
({{ cacheCondition.length }})
|
||||||
</template>
|
</template>
|
||||||
@ -50,7 +50,7 @@
|
|||||||
>
|
>
|
||||||
<span class="sum">{{ paginationConfig.total }}</span>
|
<span class="sum">{{ paginationConfig.total }}</span>
|
||||||
<span class="title">{{ $t('user.result_one') }}</span>
|
<span class="title">{{ $t('user.result_one') }}</span>
|
||||||
<el-divider direction="vertical"/>
|
<el-divider direction="vertical" />
|
||||||
<i
|
<i
|
||||||
v-if="showScroll"
|
v-if="showScroll"
|
||||||
class="el-icon-arrow-left arrow-filter"
|
class="el-icon-arrow-left arrow-filter"
|
||||||
@ -63,9 +63,9 @@
|
|||||||
class="text"
|
class="text"
|
||||||
>
|
>
|
||||||
{{ ele }} <i
|
{{ ele }} <i
|
||||||
class="el-icon-close"
|
class="el-icon-close"
|
||||||
@click="clearOneFilter(index)"
|
@click="clearOneFilter(index)"
|
||||||
/>
|
/>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<i
|
<i
|
||||||
@ -180,11 +180,11 @@
|
|||||||
|
|
||||||
<!--导入templatedialog-->
|
<!--导入templatedialog-->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
|
v-loading="$store.getters.loadingMap[$store.getters.currentPath]"
|
||||||
:title="$t('app_template.log_delete_tips')"
|
:title="$t('app_template.log_delete_tips')"
|
||||||
:visible.sync="deleteConfirmDialog"
|
:visible.sync="deleteConfirmDialog"
|
||||||
:show-close="true"
|
:show-close="true"
|
||||||
width="420px"
|
width="420px"
|
||||||
v-loading="$store.getters.loadingMap[$store.getters.currentPath]"
|
|
||||||
>
|
>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-checkbox
|
<el-checkbox
|
||||||
|
@ -820,7 +820,7 @@ export default {
|
|||||||
bus.$off('change_panel_right_draw', this.changeRightDrawOpen)
|
bus.$off('change_panel_right_draw', this.changeRightDrawOpen)
|
||||||
bus.$off('delete-condition', this.deleteCustomComponent)
|
bus.$off('delete-condition', this.deleteCustomComponent)
|
||||||
bus.$off('current-component-change', this.asideRefresh)
|
bus.$off('current-component-change', this.asideRefresh)
|
||||||
bus.$off('aside-set-title', this.asideSetTitle)
|
bus.$off('title-name', this.asideSetTitle)
|
||||||
const elx = this.$refs.rightPanel
|
const elx = this.$refs.rightPanel
|
||||||
elx && elx.remove()
|
elx && elx.remove()
|
||||||
},
|
},
|
||||||
@ -851,16 +851,16 @@ export default {
|
|||||||
bus.$on('change_panel_right_draw', this.changeRightDrawOpen)
|
bus.$on('change_panel_right_draw', this.changeRightDrawOpen)
|
||||||
bus.$on('delete-condition', this.deleteCustomComponent)
|
bus.$on('delete-condition', this.deleteCustomComponent)
|
||||||
bus.$on('current-component-change', this.asideRefresh)
|
bus.$on('current-component-change', this.asideRefresh)
|
||||||
bus.$on('aside-set-title', this.asideSetTitle)
|
bus.$on('title-name', this.asideSetTitle)
|
||||||
},
|
},
|
||||||
asideRefresh() {
|
asideRefresh() {
|
||||||
if (this.$refs['chartEditRef']) {
|
if (this.$refs['chartEditRef']) {
|
||||||
this.$refs['chartEditRef'].resetChartData()
|
this.$refs['chartEditRef'].resetChartData()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
asideSetTitle(val) {
|
asideSetTitle(val, id) {
|
||||||
if (this.$refs['chartEditRef']) {
|
if (this.$refs['chartEditRef']) {
|
||||||
this.$refs['chartEditRef'].setTitle(val)
|
this.$refs['chartEditRef'].setTitle(val, id)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
deleteCustomComponent(param) {
|
deleteCustomComponent(param) {
|
||||||
|
@ -23,12 +23,14 @@
|
|||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="cancel()"
|
@click="cancel()"
|
||||||
>{{ $t('commons.cancel') }}</el-button>
|
>{{ $t('commons.cancel') }}
|
||||||
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="save()"
|
@click="save()"
|
||||||
>{{ $t('panel.export_pdf') }}</el-button>
|
>{{ $t('panel.export_pdf') }}
|
||||||
|
</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
@ -41,7 +43,7 @@ import { pdfTemplateReplaceAll } from '@/utils/StringUtils.js'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PDFPreExport',
|
name: 'PDFPreExport',
|
||||||
components: { },
|
components: {},
|
||||||
props: {
|
props: {
|
||||||
// eslint-disable-next-line vue/require-default-prop
|
// eslint-disable-next-line vue/require-default-prop
|
||||||
panelName: {
|
panelName: {
|
||||||
@ -131,16 +133,16 @@ export default {
|
|||||||
_this.toExport = true
|
_this.toExport = true
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
html2canvas(document.getElementById('exportPdf')).then(function(canvas) {
|
html2canvas(document.getElementById('exportPdf')).then(function(canvas) {
|
||||||
_this.exportLoading = false
|
_this.exportLoading = false
|
||||||
const contentWidth = canvas.width
|
const contentWidth = canvas.width / 4
|
||||||
const contentHeight = canvas.height
|
const contentHeight = canvas.height / 4
|
||||||
const pageData = canvas.toDataURL('image/jpeg', 1.0)
|
const pageData = canvas.toDataURL('image/jpeg', 1.0)
|
||||||
const lp = contentWidth > contentHeight ? 'l' : 'p'
|
const lp = contentWidth > contentHeight ? 'l' : 'p'
|
||||||
const PDF = new JsPDF(lp, 'pt', [contentWidth, contentHeight])
|
const PDF = new JsPDF(lp, 'pt', [contentWidth, contentHeight])
|
||||||
PDF.addImage(pageData, 'JPEG', 0, 0, contentWidth, contentHeight)
|
PDF.addImage(pageData, 'JPEG', 0, 0, contentWidth, contentHeight)
|
||||||
PDF.save(_this.panelName + '.pdf')
|
PDF.save(_this.panelName + '.pdf')
|
||||||
_this.$emit('closePreExport')
|
_this.$emit('closePreExport')
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}, 1500)
|
}, 1500)
|
||||||
}, 500)
|
}, 500)
|
||||||
@ -151,17 +153,18 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.root_class {
|
.root_class {
|
||||||
margin: 15px 0px 5px;
|
margin: 15px 0px 5px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
.export_body_class{
|
|
||||||
border: 1px solid #dcdfe6 ;
|
|
||||||
height: 65vh;
|
|
||||||
overflow-y: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.export_body_inner_class{
|
.export_body_class {
|
||||||
margin: 10px;
|
border: 1px solid #dcdfe6;
|
||||||
}
|
height: 65vh;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.export_body_inner_class {
|
||||||
|
margin: 10px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -182,6 +182,7 @@
|
|||||||
>
|
>
|
||||||
<deTextarea
|
<deTextarea
|
||||||
v-model="form.desc"
|
v-model="form.desc"
|
||||||
|
:maxlength="50"
|
||||||
class="w100-textarea"
|
class="w100-textarea"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -255,15 +255,15 @@
|
|||||||
v-dialogDrag
|
v-dialogDrag
|
||||||
:title="$t('datasource.create')"
|
:title="$t('datasource.create')"
|
||||||
:visible.sync="dsTypeRelate"
|
:visible.sync="dsTypeRelate"
|
||||||
width="1200px"
|
width="1005px"
|
||||||
class="de-dialog-form none-scroll-bar"
|
class="de-dialog-form none-scroll-bar"
|
||||||
append-to-body
|
append-to-body
|
||||||
>
|
>
|
||||||
<el-tabs v-model="tabActive">
|
<el-tabs
|
||||||
<el-tab-pane
|
v-model="tabActive"
|
||||||
:label="$t('datasource.all')"
|
class="de-tabs"
|
||||||
name="all"
|
@tab-click="handleClick"
|
||||||
/>
|
>
|
||||||
<el-tab-pane
|
<el-tab-pane
|
||||||
:label="$t('datasource.relational_database')"
|
:label="$t('datasource.relational_database')"
|
||||||
name="RDBMS"
|
name="RDBMS"
|
||||||
@ -278,24 +278,36 @@
|
|||||||
/>
|
/>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
<div class="db-container">
|
<div class="db-container">
|
||||||
<div
|
<template v-for="(list, idx) in databaseList">
|
||||||
v-for="(db, index) in databaseList"
|
<div
|
||||||
:key="db.type"
|
:key="nameMap[idx]"
|
||||||
class="db-card"
|
:class="typeList[idx]"
|
||||||
:class="[{ marLeft: index % 4 === 0 }]"
|
class="name"
|
||||||
@click="addDb(db)"
|
>{{ $t(`datasource.${nameMap[idx]}`) }}</div>
|
||||||
>
|
<div
|
||||||
<img
|
:key="nameMap[idx] + 'cont'"
|
||||||
v-if="!db.isPlugin"
|
class="item-container"
|
||||||
:src="require('../../../assets/datasource/' + db.type + '.jpg')"
|
|
||||||
alt=""
|
|
||||||
>
|
>
|
||||||
<img
|
<div
|
||||||
v-if="db.isPlugin"
|
v-for="(db, index) in list"
|
||||||
:src="`/api/pluginCommon/staticInfo/${db.type}/jpg`"
|
:key="db.type"
|
||||||
>
|
class="db-card"
|
||||||
<p class="db-name">{{ db.name }}</p>
|
:class="[{ marLeft: index % 5 === 0 }]"
|
||||||
</div>
|
@click="addDb(db)"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
v-if="!db.isPlugin"
|
||||||
|
:src="require('../../../assets/datasource/' + db.type + '.jpg')"
|
||||||
|
alt=""
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
v-if="db.isPlugin"
|
||||||
|
:src="`/api/pluginCommon/staticInfo/${db.type}/jpg`"
|
||||||
|
>
|
||||||
|
<p class="db-name">{{ db.name }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -329,11 +341,14 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tabActive: 'all',
|
tabActive: 'RDBMS',
|
||||||
|
databaseList: [],
|
||||||
currentNodeId: '',
|
currentNodeId: '',
|
||||||
dsTypeRelate: false,
|
dsTypeRelate: false,
|
||||||
expandedArray: [],
|
expandedArray: [],
|
||||||
tData: [],
|
tData: [],
|
||||||
|
nameMap: ['relational_database', 'non_relational_database', 'other'],
|
||||||
|
typeList: ['RDBMS', 'NORDBMS', 'OTHER'],
|
||||||
treeLoading: false,
|
treeLoading: false,
|
||||||
dsTypes: [],
|
dsTypes: [],
|
||||||
dsTypesForDriver: [],
|
dsTypesForDriver: [],
|
||||||
@ -386,15 +401,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(['user']),
|
...mapGetters(['user'])
|
||||||
databaseList() {
|
|
||||||
if (this.tabActive === 'all') {
|
|
||||||
return this.dsTypes
|
|
||||||
}
|
|
||||||
return this.dsTypes.filter(
|
|
||||||
(ele) => ele.databaseClassification === this.tabActive
|
|
||||||
)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
key(val) {
|
key(val) {
|
||||||
@ -406,6 +413,9 @@ export default {
|
|||||||
this.datasourceTypes()
|
this.datasourceTypes()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleClick() {
|
||||||
|
document.querySelector(`.${this.tabActive}`).scrollIntoView()
|
||||||
|
},
|
||||||
createDriveOrDs() {
|
createDriveOrDs() {
|
||||||
if (this.showView === 'Driver') {
|
if (this.showView === 'Driver') {
|
||||||
this.addDriver()
|
this.addDriver()
|
||||||
@ -478,11 +488,17 @@ export default {
|
|||||||
datasourceTypes() {
|
datasourceTypes() {
|
||||||
listDatasourceType().then((res) => {
|
listDatasourceType().then((res) => {
|
||||||
this.dsTypes = res.data
|
this.dsTypes = res.data
|
||||||
|
const databaseList = [[], [], []]
|
||||||
this.dsTypes.forEach((item) => {
|
this.dsTypes.forEach((item) => {
|
||||||
|
const index = this.typeList.findIndex(ele => ele === item.databaseClassification)
|
||||||
|
if (index !== -1) {
|
||||||
|
databaseList[index].push(item)
|
||||||
|
}
|
||||||
if (item.isJdbc) {
|
if (item.isJdbc) {
|
||||||
this.dsTypesForDriver.push(item)
|
this.dsTypesForDriver.push(item)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
this.databaseList = databaseList
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
refreshType(datasource) {
|
refreshType(datasource) {
|
||||||
@ -802,24 +818,38 @@ export default {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
max-height: 65vh;
|
max-height: 65vh;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
display: flex;
|
margin-top: 3px;
|
||||||
flex-wrap: wrap;
|
|
||||||
margin-top: -3px;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
|
|
||||||
|
.name {
|
||||||
|
margin: 16px 0;
|
||||||
|
font-family: PingFang SC;
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 500;
|
||||||
|
line-height: 24px;
|
||||||
|
color: var(--deTextPrimary, #1F2329);
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-container {
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
.db-card {
|
.db-card {
|
||||||
height: 193px;
|
height: 141px;
|
||||||
width: 270px;
|
width: 177.6px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
border: 1px solid #dee0e3;
|
border: 1px solid #dee0e3;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
margin-bottom: 24px;
|
margin-bottom: 16px;
|
||||||
margin-left: 22px;
|
margin-left: 16px;
|
||||||
img {
|
img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 154.58px;
|
height: 102px;
|
||||||
border-top-left-radius: 4px;
|
border-top-left-radius: 4px;
|
||||||
border-top-right-radius: 4px;
|
border-top-right-radius: 4px;
|
||||||
}
|
}
|
||||||
|
@ -81,7 +81,7 @@
|
|||||||
:placeholder="$t('system_parameter_setting.SMTP_password')"
|
:placeholder="$t('system_parameter_setting.SMTP_password')"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('system_parameter_setting.test_recipients')">
|
<el-form-item :label="$t('ç.test_recipients')">
|
||||||
<template slot="label">
|
<template slot="label">
|
||||||
{{ $t("system_parameter_setting.test_recipients") }}
|
{{ $t("system_parameter_setting.test_recipients") }}
|
||||||
<el-tooltip
|
<el-tooltip
|
||||||
@ -98,7 +98,7 @@
|
|||||||
:placeholder="$t('system_parameter_setting.test_recipients')"
|
:placeholder="$t('system_parameter_setting.test_recipients')"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="邮箱服务器配置">
|
<el-form-item :label="$t('system_parameter_setting.email_server_config')">
|
||||||
<el-checkbox v-model="formInline.ssl">{{ $t('chart.open') }}SSL
|
<el-checkbox v-model="formInline.ssl">{{ $t('chart.open') }}SSL
|
||||||
<el-tooltip
|
<el-tooltip
|
||||||
class="item"
|
class="item"
|
||||||
|
@ -36,8 +36,8 @@
|
|||||||
icon="iconfont icon-icon-filter"
|
icon="iconfont icon-icon-filter"
|
||||||
@click="filterShow"
|
@click="filterShow"
|
||||||
>{{
|
>{{
|
||||||
$t("user.filter")
|
$t("user.filter")
|
||||||
}}
|
}}
|
||||||
<template v-if="filterTexts.length">
|
<template v-if="filterTexts.length">
|
||||||
({{ filterTexts.length }})
|
({{ filterTexts.length }})
|
||||||
</template>
|
</template>
|
||||||
@ -83,7 +83,7 @@
|
|||||||
>
|
>
|
||||||
<span class="sum">{{ paginationConfig.total }}</span>
|
<span class="sum">{{ paginationConfig.total }}</span>
|
||||||
<span class="title">{{ $t("user.result_one") }}</span>
|
<span class="title">{{ $t("user.result_one") }}</span>
|
||||||
<el-divider direction="vertical"/>
|
<el-divider direction="vertical" />
|
||||||
<i
|
<i
|
||||||
v-if="showScroll"
|
v-if="showScroll"
|
||||||
class="el-icon-arrow-left arrow-filter"
|
class="el-icon-arrow-left arrow-filter"
|
||||||
@ -96,9 +96,9 @@
|
|||||||
class="text"
|
class="text"
|
||||||
>
|
>
|
||||||
{{ ele }} <i
|
{{ ele }} <i
|
||||||
class="el-icon-close"
|
class="el-icon-close"
|
||||||
@click="clearOneFilter(index)"
|
@click="clearOneFilter(index)"
|
||||||
/>
|
/>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<i
|
<i
|
||||||
@ -162,14 +162,14 @@
|
|||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="scope.row.rate === 'SIMPLE'">{{
|
<span v-if="scope.row.rate === 'SIMPLE'">{{
|
||||||
$t("dataset.execute_once")
|
$t("dataset.execute_once")
|
||||||
}}</span>
|
}}</span>
|
||||||
<span v-if="scope.row.rate === 'CRON'">{{
|
<span v-if="scope.row.rate === 'CRON'">{{
|
||||||
$t("dataset.cron_config")
|
$t("dataset.cron_config")
|
||||||
}}</span>
|
}}</span>
|
||||||
<span v-if="scope.row.rate === 'SIMPLE_CRON'">{{
|
<span v-if="scope.row.rate === 'SIMPLE_CRON'">{{
|
||||||
$t("dataset.simple_cron")
|
$t("dataset.simple_cron")
|
||||||
}}</span>
|
}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
@ -197,8 +197,8 @@
|
|||||||
v-if="scope.row.lastExecStatus"
|
v-if="scope.row.lastExecStatus"
|
||||||
:class="[`de-${scope.row.lastExecStatus}-pre`, 'de-status']"
|
:class="[`de-${scope.row.lastExecStatus}-pre`, 'de-status']"
|
||||||
>{{
|
>{{
|
||||||
$t(`dataset.${scope.row.lastExecStatus.toLocaleLowerCase()}`)
|
$t(`dataset.${scope.row.lastExecStatus.toLocaleLowerCase()}`)
|
||||||
}}
|
}}
|
||||||
<svg-icon
|
<svg-icon
|
||||||
v-if="scope.row.lastExecStatus === 'Error'"
|
v-if="scope.row.lastExecStatus === 'Error'"
|
||||||
style="cursor: pointer;"
|
style="cursor: pointer;"
|
||||||
@ -333,18 +333,18 @@
|
|||||||
secondary
|
secondary
|
||||||
@click="show_error_massage = false"
|
@click="show_error_massage = false"
|
||||||
>{{
|
>{{
|
||||||
$t("dataset.close")
|
$t("dataset.close")
|
||||||
}}</deBtn>
|
}}</deBtn>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {columnOptions} from './options'
|
import { columnOptions } from './options'
|
||||||
import {formatOrders} from '@/utils/index'
|
import { formatOrders } from '@/utils/index'
|
||||||
import {datasetTaskList, post} from '@/api/dataset/dataset'
|
import { datasetTaskList, post } from '@/api/dataset/dataset'
|
||||||
import {hasDataPermission} from '@/utils/permission'
|
import { hasDataPermission } from '@/utils/permission'
|
||||||
import GridTable from '@/components/gridTable/index.vue'
|
import GridTable from '@/components/gridTable/index.vue'
|
||||||
import filterUser from './FilterUser.vue'
|
import filterUser from './FilterUser.vue'
|
||||||
import msgCfm from '@/components/msgCfm/index'
|
import msgCfm from '@/components/msgCfm/index'
|
||||||
@ -353,7 +353,7 @@ import keyEnter from '@/components/msgCfm/keyEnter.js'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'DatasetTaskList',
|
name: 'DatasetTaskList',
|
||||||
components: {GridTable, filterUser},
|
components: { GridTable, filterUser },
|
||||||
mixins: [msgCfm, keyEnter],
|
mixins: [msgCfm, keyEnter],
|
||||||
props: {
|
props: {
|
||||||
transCondition: {
|
transCondition: {
|
||||||
@ -396,7 +396,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
const {taskId, name} = this.transCondition
|
const { taskId, name } = this.transCondition
|
||||||
if (taskId) {
|
if (taskId) {
|
||||||
this.nickName = name
|
this.nickName = name
|
||||||
}
|
}
|
||||||
@ -427,7 +427,7 @@ export default {
|
|||||||
document.querySelector('#resize-for-filter')
|
document.querySelector('#resize-for-filter')
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
layoutResize: _.debounce(function () {
|
layoutResize: _.debounce(function() {
|
||||||
this.getScrollStatus()
|
this.getScrollStatus()
|
||||||
}, 200),
|
}, 200),
|
||||||
scrollPre() {
|
scrollPre() {
|
||||||
@ -501,7 +501,7 @@ export default {
|
|||||||
this.handleCurrentChange(1)
|
this.handleCurrentChange(1)
|
||||||
},
|
},
|
||||||
search(showLoading = true) {
|
search(showLoading = true) {
|
||||||
const {taskId, name} = this.transCondition
|
const { taskId, name } = this.transCondition
|
||||||
const param = {
|
const param = {
|
||||||
orders: formatOrders(this.orderConditions),
|
orders: formatOrders(this.orderConditions),
|
||||||
conditions: [...this.cacheCondition]
|
conditions: [...this.cacheCondition]
|
||||||
@ -520,7 +520,7 @@ export default {
|
|||||||
field: 'dataset_table_task.id'
|
field: 'dataset_table_task.id'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const {currentPage, pageSize} = this.paginationConfig
|
const { currentPage, pageSize } = this.paginationConfig
|
||||||
datasetTaskList(currentPage, pageSize, param, showLoading).then(
|
datasetTaskList(currentPage, pageSize, param, showLoading).then(
|
||||||
(response) => {
|
(response) => {
|
||||||
const multipleSelection = this.multipleSelection.map(ele => ele.id)
|
const multipleSelection = this.multipleSelection.map(ele => ele.id)
|
||||||
@ -568,7 +568,7 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
changeTaskStatus(task) {
|
changeTaskStatus(task) {
|
||||||
const {status} = task
|
const { status } = task
|
||||||
if (!['Pending', 'Underway'].includes(status)) {
|
if (!['Pending', 'Underway'].includes(status)) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -613,7 +613,7 @@ export default {
|
|||||||
},
|
},
|
||||||
selectDataset(row) {
|
selectDataset(row) {
|
||||||
if (row) {
|
if (row) {
|
||||||
const {datasetName, id, tableId} = row
|
const { datasetName, id, tableId } = row
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: '/task-ds-form',
|
path: '/task-ds-form',
|
||||||
query: {
|
query: {
|
||||||
@ -634,7 +634,7 @@ export default {
|
|||||||
)
|
)
|
||||||
},
|
},
|
||||||
disableExec(task) {
|
disableExec(task) {
|
||||||
return ((task.status === 'Stopped' && task.rate !== 'SIMPLE') || task.status === 'Pending' || task.status ==='Exec' || !hasDataPermission('manage', task.privileges))
|
return ((task.status === 'Stopped' && task.rate !== 'SIMPLE') || task.status === 'Pending' || task.status === 'Exec' || !hasDataPermission('manage', task.privileges))
|
||||||
},
|
},
|
||||||
disableDelete(task) {
|
disableDelete(task) {
|
||||||
return false
|
return false
|
||||||
|
Loading…
Reference in New Issue
Block a user