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