Merge branch 'dev' into v1.17

This commit is contained in:
taojinlong 2022-11-30 18:22:41 +08:00
commit 5373651856
27 changed files with 303 additions and 120 deletions

View File

@ -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=")">

View File

@ -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());
}

View File

@ -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 {

View File

@ -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) {

View File

@ -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);

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -708,21 +708,27 @@ export default {
}
::v-deep .el-tabs__nav {
width: 100%;
display: flex;
}
::v-deep .el-tabs__nav-prev {
line-height: 25px;
}
::v-deep .el-tabs__nav-next {
line-height: 25px;
}
.tab-head-left ::v-deep .el-tabs__nav {
width: 100%;
display: flex;
text-align: left;
}
.tab-head-right ::v-deep .el-tabs__nav {
width: 100%;
display: flex;
text-align: right;
}
.tab-head-center ::v-deep .el-tabs__nav {
width: 100%;
display: flex;
text-align: center;
}

View File

@ -135,6 +135,7 @@ export default {
default_login: 'Normal'
},
commons: {
collapse_navigation: 'Collapse navigation',
operate_cancelled: 'Operation cancelled',
bind: 'Bind',
unbind: 'Unbind',
@ -531,7 +532,10 @@ export default {
set_saved_successfully: 'Data set saved successfully',
to_start_using: 'Browse the contents of your database, tables and columns. Choose a database to get started.',
to_run_query: 'Click to run query',
the_running_results: 'You can view the running results'
the_running_results: 'You can view the running results',
item: 'item',
logic_filter: 'Condition Filter',
enum_filter: 'Enum Filter'
},
detabs: {
custom_sort: 'Custom Sort',
@ -655,6 +659,7 @@ export default {
input_password: 'Please input a password',
input_phone: 'Please enter the phone number',
input_roles: 'Please select role',
select_users: 'Please select user',
user_name_pattern_error: 'IDs can only contain alphanumeric and ._- and start with a letter!',
special_characters_are_not_supported: 'Special characters are not supported',
mobile_number_format_is_incorrect: 'Incorrect format of mobile phone number',
@ -811,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',
@ -1722,7 +1728,17 @@ export default {
export_dataset: 'Export',
filename: 'Filename',
export_filter: 'Filter',
pls_input_filename: 'Please input filename'
pls_input_filename: 'Please input filename',
calc_tips: {
tip1: 'The expression syntax should follow the database syntax corresponding to the data source.',
tip2: 'Aggregation operation is not supported in the dataset.',
tip3: 'The reference field starts with "[" and ends with "]"',
tip4: 'Do not modify the reference content, otherwise the reference will fail',
tip5: 'If you enter content in the same format as the reference field, it will be treated as a reference field',
tip6: 'Use the functions supported by the database type corresponding to the dataset. The syntax is the same as that of the corresponding database',
tip7: 'For example, date format: MySQL uses DATE_ FORMAT(date,format) Oracle uses TO_ DATE(X,[,fmt])',
tip8: 'Non direct connection mode data set, use Doris database functions, refer to Doris official website'
}
},
driver: {
driver: 'Driver',
@ -1890,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',
@ -2541,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',

View File

@ -135,6 +135,7 @@ export default {
default_login: '普通登錄'
},
commons: {
collapse_navigation: '收起導航',
operate_cancelled: '已取消操作',
bind: '綁定',
unbind: '解綁',
@ -531,7 +532,10 @@ export default {
set_saved_successfully: '數據集保存成功',
to_start_using: '瀏覽您的數據庫,表和列的內容。 選擇一個數據庫即可開始使用。',
to_run_query: '點擊運行査詢',
the_running_results: '即可查看運行結果'
the_running_results: '即可查看運行結果',
item: '項',
logic_filter: '條件篩選',
enum_filter: '枚舉篩選'
},
detabs: {
custom_sort: '自定義排序',
@ -811,6 +815,7 @@ export default {
edite_organization: '編輯組織'
},
system_parameter_setting: {
email_server_config: '郵箱服務器配置',
edit_success: '編輯成功',
mailbox_service_settings: '郵件設置',
test_connection: '測試連接',
@ -1722,7 +1727,17 @@ export default {
export_dataset: '數據集導出',
filename: '文件名稱',
export_filter: '篩選條件',
pls_input_filename: '請輸入文件名稱'
pls_input_filename: '請輸入文件名稱',
calc_tips: {
tip1: '表達式語法請遵循該數據源對應的數據庫語法。',
tip2: '數據集中不支持聚合運算。',
tip3: '引用字段以 "[" 開始, "]" 結束',
tip4: '請勿修改引用內容,否則將引用失敗',
tip5: '若輸入與引用字段相同格式的內容,將被當作引用字段處理',
tip6: '使用數據集對應數據庫類型所支持的函數,語法同對應數據庫',
tip7: '如日期格式化MySQL使用DATE_FORMAT(date,format)Oracle使用TO_DATE(X,[,fmt])',
tip8: '非直連模式數據集使用Doris數據庫函數可參考Doris官網'
}
},
driver: {
driver: '驅動',
@ -1890,7 +1905,7 @@ export default {
},
panel: {
position_adjust_component: '位置調整',
active_font_size: '激活字體大小',
active_font_size: '选中字體大小',
carousel: '輪播',
switch_time: '切換時間',
position_adjust: '位置',
@ -2542,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: '報告正文',
@ -2566,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: '任務類型',

View File

@ -135,6 +135,7 @@ export default {
default_login: '普通登录'
},
commons: {
collapse_navigation: '收起导航',
operate_cancelled: '已取消操作',
bind: '绑定',
unbind: '解绑',
@ -530,7 +531,10 @@ export default {
set_saved_successfully: '数据集保存成功',
to_start_using: '浏览您的数据库,表和列的内容。 选择一个数据库即可开始使用。',
to_run_query: '点击运行查询',
the_running_results: '即可查看运行结果'
the_running_results: '即可查看运行结果',
item: '项',
logic_filter: '条件筛选',
enum_filter: '枚举筛选'
},
detabs: {
custom_sort: '自定义排序',
@ -810,6 +814,7 @@ export default {
edite_organization: '编辑组织'
},
system_parameter_setting: {
email_server_config: '邮箱服务器配置',
edit_success: '编辑成功',
mailbox_service_settings: '邮件设置',
test_connection: '测试连接',
@ -1721,7 +1726,17 @@ export default {
export_dataset: '数据集导出',
filename: '文件名称',
export_filter: '筛选条件',
pls_input_filename: '请输入文件名称'
pls_input_filename: '请输入文件名称',
calc_tips: {
tip1: '表达式语法请遵循该数据源对应的数据库语法。',
tip2: '数据集中不支持聚合运算。',
tip3: '引用字段以 "[" 开始, "]" 结束',
tip4: '请勿修改引用内容,否则将引用失败',
tip5: '若输入与引用字段相同格式的内容,将被当作引用字段处理',
tip6: '使用数据集对应数据库类型所支持的函数,语法同对应数据库',
tip7: '如日期格式化MySQL使用DATE_FORMAT(date,format)Oracle使用TO_DATE(X,[,fmt])',
tip8: '非直连模式数据集使用Doris数据库函数可参考Doris官网'
}
},
driver: {
driver: '驱动',
@ -1890,7 +1905,7 @@ export default {
},
panel: {
position_adjust_component: '位置调整',
active_font_size: '激活字体大小',
active_font_size: '选中字体大小',
carousel: '轮播',
switch_time: '切换时间',
position_adjust: '位置',
@ -2542,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: '报告正文',
@ -2566,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: '任务类型',

View File

@ -33,7 +33,7 @@
:style="{ transform: isCollapse ? 'rotate(90deg)' : 'rotate(-90deg)' }"
class="el-icon-upload2"
/>
{{ isCollapse ? "" : "收起导航" }}
{{ isCollapse ? "" : $t('commons.collapse_navigation') }}
</div>
</div>
</template>

View File

@ -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"

View File

@ -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"

View File

@ -67,7 +67,8 @@ export default {
min_height: 200,
max_height: 500,
elementpath: false,
statusbar: false
statusbar: false,
convert_urls: false
}
}
},

View File

@ -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"

View File

@ -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"

View File

@ -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',

View File

@ -32,9 +32,9 @@
placement="bottom"
>
<div slot="content">
表达式语法请遵循该数据源对应的数据库语法
{{ $t('dataset.calc_tips.tip1') }}
<br>
字段类型将使用原始类型如有需要请在表达式中自行转换
{{ $t('dataset.calc_tips.tip2') }}
</div>
<i
class="el-icon-info"
@ -112,11 +112,11 @@
placement="bottom"
>
<div slot="content">
引用字段以 "[" 开始 "]" 结束
{{ $t('dataset.calc_tips.tip3') }}
<br>
请勿修改引用内容否则将引用失败
{{ $t('dataset.calc_tips.tip4') }}
<br>
若输入与引用字段相同格式的内容将被当作引用字段处理
{{ $t('dataset.calc_tips.tip5') }}
</div>
<i
class="el-icon-info"
@ -239,11 +239,11 @@
placement="bottom"
>
<div slot="content">
使用数据集对应数据库类型所支持的函数语法同对应数据库
{{ $t('dataset.calc_tips.tip6') }}
<br>
如日期格式化MySQL使用DATE_FORMAT(date,format)Oracle使用TO_DATE(X,[,fmt])
{{ $t('dataset.calc_tips.tip7') }}
<br>
非直连模式数据集使用Doris数据库函数可参考Doris官网 https://doris.apache.org/zh-CN/
{{ $t('dataset.calc_tips.tip8') }} https://doris.apache.org/zh-CN/
</div>
<i
class="el-icon-info"

View File

@ -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')
}
}
}

View File

@ -39,7 +39,7 @@
v-if="['db', 'excel', 'api'].includes(datasetType)"
class="table-num"
>{{ $t('deDataset.selected') }} {{ tableNum }}
{{ ['excel'].includes(datasetType) ? $t('deDataset.table') : '项' }}</span>
{{ ['excel'].includes(datasetType) ? $t('deDataset.table') : $t('deDataset.item') }}</span>
<deBtn
:disabled="['db', 'excel', 'api'].includes(datasetType) && !tableNum"
type="primary"

View File

@ -29,9 +29,9 @@
placement="bottom"
>
<div slot="content">
表达式语法请遵循该数据源对应的数据库语法
{{ $t('dataset.calc_tips.tip1') }}
<br>
数据集中不支持聚合运算
{{ $t('dataset.calc_tips.tip2') }}
</div>
<i
class="el-icon-info"
@ -90,11 +90,11 @@
placement="bottom"
>
<div slot="content">
引用字段以 "[" 开始 "]" 结束
{{ $t('dataset.calc_tips.tip3') }}
<br>
请勿修改引用内容否则将引用失败
{{ $t('dataset.calc_tips.tip4') }}
<br>
若输入与引用字段相同格式的内容将被当作引用字段处理
{{ $t('dataset.calc_tips.tip5') }}
</div>
<i
class="el-icon-info"
@ -214,11 +214,11 @@
placement="bottom"
>
<div slot="content">
使用数据集对应数据库类型所支持的函数语法同对应数据库
{{ $t('dataset.calc_tips.tip6') }}
<br>
如日期格式化MySQL使用DATE_FORMAT(date,format)Oracle使用TO_DATE(X,[,fmt])
{{ $t('dataset.calc_tips.tip7') }}
<br>
非直连模式数据集使用Doris数据库函数可参考Doris官网
{{ $t('dataset.calc_tips.tip8') }}
https://doris.apache.org/zh-CN/
</div>
<i

View File

@ -398,11 +398,11 @@ export default {
this.filterList = [
{
value: 'logic',
label: '条件筛选'
label: this.$t('deDataset.logic_filter')
},
{
value: 'enum',
label: '枚举筛选'
label: this.$t('deDataset.enum_filter')
}
]
if ([1, 2, 3].includes(deType)) {

View File

@ -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>

View File

@ -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"