diff --git a/backend/src/main/java/io/dataease/commons/utils/ExcelXlsReader.java b/backend/src/main/java/io/dataease/commons/utils/ExcelXlsReader.java index f998cfa398..59744d8384 100644 --- a/backend/src/main/java/io/dataease/commons/utils/ExcelXlsReader.java +++ b/backend/src/main/java/io/dataease/commons/utils/ExcelXlsReader.java @@ -125,12 +125,11 @@ public class ExcelXlsReader implements HSSFListener { return data; } - public void setData(List> data) { + public void setData(List> data) { this.data = data; } - /** * 遍历excel下所有的sheet * @@ -212,8 +211,8 @@ public class ExcelXlsReader implements HSSFListener { thisColumn = frec.getColumn(); thisStr = String.valueOf(frec.getValue()); String fieldType = checkType(thisStr, thisColumn); - if(fieldType.equalsIgnoreCase("LONG") && thisStr.endsWith(".0")){ - thisStr = thisStr.substring(0, thisStr.length() -2); + if (fieldType != null && fieldType.equalsIgnoreCase("LONG") && thisStr.endsWith(".0")) { + thisStr = thisStr.substring(0, thisStr.length() - 2); } cellList.add(thisColumn, thisStr); checkRowIsNull(thisStr); //如果里面某个单元格含有值,则标识该行不为空行 @@ -268,9 +267,9 @@ public class ExcelXlsReader implements HSSFListener { value = value.equals("") ? "" : value; //向容器加入列值 cellList.add(thisColumn, value); - if(formatIndex == 59 || formatIndex== 14){ - totalSheets.get(totalSheets.size() -1).getFields().get(thisColumn).setFieldType("DATETIME"); - }else { + if (formatIndex == 59 || formatIndex == 14) { + totalSheets.get(totalSheets.size() - 1).getFields().get(thisColumn).setFieldType("DATETIME"); + } else { checkType(value, thisColumn); } checkRowIsNull(value); //如果里面某个单元格含有值,则标识该行不为空行 @@ -308,7 +307,7 @@ public class ExcelXlsReader implements HSSFListener { } lastColumnNumber = -1; - if(!totalSheets.stream().map(ExcelSheetData::getExcelLabel).collect(Collectors.toList()).contains(sheetName)){ + if (!totalSheets.stream().map(ExcelSheetData::getExcelLabel).collect(Collectors.toList()).contains(sheetName)) { ExcelSheetData excelSheetData = new ExcelSheetData(); excelSheetData.setExcelLabel(sheetName); excelSheetData.setData(new ArrayList<>()); @@ -316,7 +315,7 @@ public class ExcelXlsReader implements HSSFListener { totalSheets.add(excelSheetData); } - if(curRow == 0){ + if (curRow == 0) { for (String s : cellList) { TableField tableField = new TableField(); tableField.setFieldType("TEXT"); @@ -324,13 +323,13 @@ public class ExcelXlsReader implements HSSFListener { tableField.setFieldName(s); tableField.setRemarks(s); this.fields.add(tableField); - totalSheets.get(totalSheets.size() -1).getFields().add(tableField); + totalSheets.get(totalSheets.size() - 1).getFields().add(tableField); } } if (flag && curRow != 0) { //该行不为空行且该行不是第一行,发送(第一行为列名,不需要) - if(!totalSheets.stream().map(ExcelSheetData::getExcelLabel).collect(Collectors.toList()).contains(sheetName)){ + if (!totalSheets.stream().map(ExcelSheetData::getExcelLabel).collect(Collectors.toList()).contains(sheetName)) { ExcelSheetData excelSheetData = new ExcelSheetData(); excelSheetData.setData(new ArrayList<>(data)); excelSheetData.setExcelLabel(sheetName); @@ -339,13 +338,13 @@ public class ExcelXlsReader implements HSSFListener { excelSheetData.getData().add(tmp); totalRows++; totalSheets.add(excelSheetData); - }else { + } else { List tmp = new ArrayList<>(cellList); - if(obtainedNum != null && totalSheets.stream().filter(s->s.getExcelLabel().equalsIgnoreCase(sheetName)).collect(Collectors.toList()).get(0).getData().size() < obtainedNum){ - totalSheets.stream().filter(s->s.getExcelLabel().equalsIgnoreCase(sheetName)).collect(Collectors.toList()).get(0).getData().add(tmp); + if (obtainedNum != null && totalSheets.stream().filter(s -> s.getExcelLabel().equalsIgnoreCase(sheetName)).collect(Collectors.toList()).get(0).getData().size() < obtainedNum) { + totalSheets.stream().filter(s -> s.getExcelLabel().equalsIgnoreCase(sheetName)).collect(Collectors.toList()).get(0).getData().add(tmp); } - if(obtainedNum == null){ - totalSheets.stream().filter(s->s.getExcelLabel().equalsIgnoreCase(sheetName)).collect(Collectors.toList()).get(0).getData().add(tmp); + if (obtainedNum == null) { + totalSheets.stream().filter(s -> s.getExcelLabel().equalsIgnoreCase(sheetName)).collect(Collectors.toList()).get(0).getData().add(tmp); } totalRows++; } @@ -369,7 +368,7 @@ public class ExcelXlsReader implements HSSFListener { } - private String checkType(String str, int thisColumn){ + private String checkType(String str, int thisColumn) { String type = null; try { double d = Double.valueOf(str); @@ -382,22 +381,20 @@ public class ExcelXlsReader implements HSSFListener { type = "DOUBLE"; } } catch (Exception e) { - type = "TEXT"; } - }catch (Exception e){ - type = "TEXT"; + } catch (Exception e) { } - if(curRow==1){ - totalSheets.get(totalSheets.size() -1).getFields().get(thisColumn).setFieldType(type); + if (curRow == 1) { + totalSheets.get(totalSheets.size() - 1).getFields().get(thisColumn).setFieldType(type == null ? "TEXT" : type); } - if(curRow > 1) { - String oldType = totalSheets.get(totalSheets.size() -1).getFields().get(thisColumn).getFieldType(); - if(type.equalsIgnoreCase("TEXT")){ - totalSheets.get(totalSheets.size() -1).getFields().get(thisColumn).setFieldType(type); + if (curRow > 1 && type != null) { + String oldType = totalSheets.get(totalSheets.size() - 1).getFields().get(thisColumn).getFieldType(); + if (type.equalsIgnoreCase("TEXT")) { + totalSheets.get(totalSheets.size() - 1).getFields().get(thisColumn).setFieldType(type); } - if(type.equalsIgnoreCase("DOUBLE") && oldType.equalsIgnoreCase("LONG")){ - totalSheets.get(totalSheets.size() -1).getFields().get(thisColumn).setFieldType(type); + if (type.equalsIgnoreCase("DOUBLE") && oldType.equalsIgnoreCase("LONG")) { + totalSheets.get(totalSheets.size() - 1).getFields().get(thisColumn).setFieldType(type); } } return type; diff --git a/backend/src/main/java/io/dataease/commons/utils/ExcelXlsxReader.java b/backend/src/main/java/io/dataease/commons/utils/ExcelXlsxReader.java index 1d7be1dc7d..d144b05d7d 100644 --- a/backend/src/main/java/io/dataease/commons/utils/ExcelXlsxReader.java +++ b/backend/src/main/java/io/dataease/commons/utils/ExcelXlsxReader.java @@ -1,4 +1,5 @@ package io.dataease.commons.utils; + import io.dataease.dto.dataset.ExcelSheetData; import io.dataease.i18n.Translator; import io.dataease.plugins.common.dto.datasource.TableField; @@ -35,7 +36,8 @@ public class ExcelXlsxReader extends DefaultHandler { /** * 自定义获取表格某些信 */ - public Map map = new TreeMap(); + public Map map = new TreeMap(); + /** * 单元格中的数据可能的数据类型 */ @@ -56,7 +58,7 @@ public class ExcelXlsxReader extends DefaultHandler { /** * 总行数 */ - private int totalRows=0; + private int totalRows = 0; /** * 一行内cell集合 @@ -101,7 +103,6 @@ public class ExcelXlsxReader extends DefaultHandler { private String formatString; - //定义前一个元素和当前元素的位置,用来计算其中空的单元格数量,如A6和A8等 private String preRef = null, ref = null; @@ -143,7 +144,7 @@ public class ExcelXlsxReader extends DefaultHandler { return data; } - public void setData(List> data) { + public void setData(List> data) { this.data = data; } @@ -190,11 +191,11 @@ public class ExcelXlsxReader extends DefaultHandler { */ @Override public void startElement(String uri, String localName, String name, Attributes attributes) throws SAXException { - if(this.obtainedNum !=null && curRow>this.obtainedNum){ + if (this.obtainedNum != null && curRow > this.obtainedNum) { return; } - if(name.equalsIgnoreCase("mergeCell")){ + if (name.equalsIgnoreCase("mergeCell")) { throw new RuntimeException(Translator.get("i18n_excel_have_merge_region")); } //c => 单元格 @@ -221,6 +222,7 @@ public class ExcelXlsxReader extends DefaultHandler { * 得到单元格对应的索引值或是内容值 * 如果单元格类型是字符串、INLINESTR、数字、日期,lastIndex则是索引值 * 如果单元格类型是布尔值、错误、公式,lastIndex则是内容值 + * * @param ch * @param start * @param length @@ -228,7 +230,7 @@ public class ExcelXlsxReader extends DefaultHandler { */ @Override public void characters(char[] ch, int start, int length) throws SAXException { - if(this.obtainedNum !=null && curRow>this.obtainedNum){ + if (this.obtainedNum != null && curRow > this.obtainedNum) { return; } lastIndex += new String(ch, start, length); @@ -244,14 +246,14 @@ public class ExcelXlsxReader extends DefaultHandler { */ @Override public void endElement(String uri, String localName, String name) throws SAXException { - if(this.obtainedNum !=null && curRow>this.obtainedNum){ + if (this.obtainedNum != null && curRow > this.obtainedNum) { return; } //t元素也包含字符串 if (isTElement) { //这个程序没经过 //将单元格内容加入rowlist中,在这之前先去掉字符串前后的空白符 String value = lastIndex.trim(); - if(curRow==1){ + if (curRow == 1) { TableField tableField = new TableField(); tableField.setFieldType("TEXT"); tableField.setFieldSize(65533); @@ -271,21 +273,21 @@ public class ExcelXlsxReader extends DefaultHandler { String value = this.getDataValue(lastIndex.trim(), "");//根据索引值获取对应的单元格值 if (preRef == null) { preRef = "A" + curRow; - if(!preRef.equalsIgnoreCase(ref)){ + if (!preRef.equalsIgnoreCase(ref)) { cellList.add(curCol, ""); curCol++; } } //补全单元格之间的空单元格 - if (!"A".equals(preRef.substring(0, 1)) && curRow==1 && preRef.equalsIgnoreCase(ref)) { + if (!"A".equals(preRef.substring(0, 1)) && curRow == 1 && preRef.equalsIgnoreCase(ref)) { throw new RuntimeException(Translator.get("i18n_excel_empty_column")); - }else if (!ref.equals(preRef)) { + } else if (!ref.equals(preRef)) { int len = countNullCell(ref, preRef); for (int i = 0; i < len; i++) { - if(curCol < this.fields.size()){ + if (curCol < this.fields.size()) { cellList.add(curCol, ""); - if(curRow==1){ + if (curRow == 1) { addField("", curCol); } curCol++; @@ -293,7 +295,7 @@ public class ExcelXlsxReader extends DefaultHandler { } } - if(curCol < this.fields.size()){ + if (curCol < this.fields.size()) { cellList.add(curCol, value); } curCol++; @@ -309,8 +311,8 @@ public class ExcelXlsxReader extends DefaultHandler { if (curRow == 1) { maxRef = ref; } - if(curRow>1){ - for (int i=cellList.size();i 1) { + for (int i = cellList.size(); i < this.fields.size(); i++) { cellList.add(""); } List tmp = new ArrayList<>(cellList); @@ -322,7 +324,7 @@ public class ExcelXlsxReader extends DefaultHandler { curCol = 0; preRef = null; ref = null; - flag=false; + flag = false; } } } @@ -357,9 +359,8 @@ public class ExcelXlsxReader extends DefaultHandler { formatIndex = style.getDataFormat(); formatString = style.getDataFormatString(); short format = this.formatIndex; - if ( (14 <= format && format <= 17) || format == 20 || format == 22 || format == 31 || format == 35 || format == 45 || format == 46 || format == 47 || (57 <= format && format <= 59) - || (175 < format && format < 178) || (182 <= format && format <= 196) || (210 <= format && format <= 213) || (208 == format)) - { // 日期 + if ((14 <= format && format <= 17) || format == 20 || format == 22 || format == 31 || format == 35 || format == 45 || format == 46 || format == 47 || (57 <= format && format <= 59) + || (175 < format && format < 178) || (182 <= format && format <= 196) || (210 <= format && format <= 213) || (208 == format)) { // 日期 isDateFormat = true; } @@ -369,6 +370,7 @@ public class ExcelXlsxReader extends DefaultHandler { /** * 对解析出来的数据进行类型处理 + * * @param value 单元格的值, * value代表解析:BOOL的为0或1, ERROR的为内容值,FORMULA的为内容值,INLINESTR的为索引值需转换为内容值, * SSTINDEX的为索引值需转换为内容值, NUMBER为内容值,DATE为内容值 @@ -377,7 +379,7 @@ public class ExcelXlsxReader extends DefaultHandler { */ @SuppressWarnings("deprecation") public String getDataValue(String value, String thisStr) { - String type = "TEXT"; + String type = null; switch (nextDataType) { // 这几个的顺序不能随便交换,交换了很可能会导致数据错误 case BOOL: //布尔值 @@ -401,11 +403,11 @@ public class ExcelXlsxReader extends DefaultHandler { String sstIndex = value.toString(); try { int idx = Integer.parseInt(sstIndex); - if(sst != null){ + if (sst != null) { XSSFRichTextString rtss = new XSSFRichTextString(sst.getEntryAt(idx));//根据idx索引值获取内容值 thisStr = rtss.toString(); rtss = null; - }else { + } else { thisStr = value.toString(); } @@ -422,12 +424,13 @@ public class ExcelXlsxReader extends DefaultHandler { } thisStr = thisStr.replace("_", "").trim(); - if(isDateFormat ){ - type = "DATETIME";isDateFormat = false; - if(formatString != null && formatString.contains("%")){ + if (isDateFormat) { + type = "DATETIME"; + isDateFormat = false; + if (formatString != null && formatString.contains("%")) { type = getType(thisStr); } - }else { + } else { type = getType(thisStr); } break; @@ -441,60 +444,67 @@ public class ExcelXlsxReader extends DefaultHandler { thisStr = " "; break; } - if(curRow==1){ + if (curRow == 1) { addField(thisStr, null); - }else { - if(CollectionUtils.isEmpty(this.getFields())){ + } else { + if (CollectionUtils.isEmpty(this.getFields())) { throw new RuntimeException(Translator.get("i18n_excel_header_empty")); } - if(curCol >= this.fields.size()){ + if (curCol >= this.fields.size()) { return thisStr; } - if(curRow==2){ - this.getFields().get(curCol).setFieldType(type); - }else { - if(type.equalsIgnoreCase("TEXT")){ + if (curRow == 2) { + if (type != null) { this.getFields().get(curCol).setFieldType(type); } - if(type.equalsIgnoreCase("DOUBLE") && this.getFields().get(curCol).getFieldType().equalsIgnoreCase("LONG")){ - this.getFields().get(curCol).setFieldType(type); - } - if(type.equalsIgnoreCase("DATETIME")){ - this.getFields().get(curCol).setFieldType(type); + } else { + if (type != null) { + if (type.equalsIgnoreCase("TEXT")) { + this.getFields().get(curCol).setFieldType(type); + } + if (type.equalsIgnoreCase("DOUBLE") && this.getFields().get(curCol).getFieldType().equalsIgnoreCase("LONG")) { + this.getFields().get(curCol).setFieldType(type); + } + if (type.equalsIgnoreCase("DATETIME")) { + this.getFields().get(curCol).setFieldType(type); + } } } } return thisStr; } - private void addField(String columeName, Integer index){ + private void addField(String columeName, Integer index) { TableField tableField = new TableField(); tableField.setFieldType("TEXT"); tableField.setFieldSize(65533); tableField.setFieldName(columeName); tableField.setRemarks(columeName); - if(index != null){ + if (index != null) { this.fields.add(index, tableField); - }else { + } else { this.fields.add(tableField); } } - private String getType(String thisStr){ - if(totalRows==0){ + + private String getType(String thisStr) { + if (totalRows == 0) { return "TEXT"; } - try{ - if(thisStr.endsWith("%")){ - thisStr = thisStr.substring(0, thisStr.length()-1); - thisStr = String.valueOf(Double.valueOf(thisStr)/100); + + try { + if (thisStr.endsWith("%")) { + thisStr = thisStr.substring(0, thisStr.length() - 1); + thisStr = String.valueOf(Double.valueOf(thisStr) / 100); } Long.valueOf(thisStr); return "LONG"; - }catch (Exception e){ + } catch (Exception e) { try { Double.valueOf(thisStr); return "DOUBLE"; - }catch (Exception ignore){ } + } catch (Exception ignore) { + } } return "TEXT"; } diff --git a/backend/src/main/java/io/dataease/controller/dataset/DataSetTableFieldController.java b/backend/src/main/java/io/dataease/controller/dataset/DataSetTableFieldController.java index 8b3f97c1e2..e7b0514e1b 100644 --- a/backend/src/main/java/io/dataease/controller/dataset/DataSetTableFieldController.java +++ b/backend/src/main/java/io/dataease/controller/dataset/DataSetTableFieldController.java @@ -13,6 +13,7 @@ import io.dataease.commons.exception.DEException; import io.dataease.controller.request.dataset.DataSetTableRequest; import io.dataease.controller.request.dataset.MultFieldValuesRequest; import io.dataease.controller.response.DatasetTableField4Type; +import io.dataease.dto.dataset.DatasetTableFieldDTO; import io.dataease.i18n.Translator; import io.dataease.plugins.common.base.domain.DatasetTable; import io.dataease.plugins.common.base.domain.DatasetTableField; @@ -106,9 +107,33 @@ public class DataSetTableFieldController { DatasetTableField datasetTableField = DatasetTableField.builder().build(); datasetTableField.setTableId(tableId); datasetTableField.setGroupType("d"); - List dimensionList = dataSetTableFieldsService.list(datasetTableField); + List dimensionList = new ArrayList<>(); + dataSetTableFieldsService.list(datasetTableField).forEach(o -> { + DatasetTableFieldDTO datasetTableFieldDTO = new DatasetTableFieldDTO(); + BeanUtils.copyProperties(o, datasetTableFieldDTO); + List deTypeCascader = new ArrayList<>(); + deTypeCascader.add(datasetTableFieldDTO.getDeType()); + if (datasetTableFieldDTO.getDeExtractType() == 0 && datasetTableFieldDTO.getDeType() == 1) { + deTypeCascader.add(datasetTableFieldDTO.getDateFormatType()); + } + datasetTableFieldDTO.setDeTypeCascader(deTypeCascader); + dimensionList.add(datasetTableFieldDTO); + }); + + datasetTableField.setGroupType("q"); - List quotaList = dataSetTableFieldsService.list(datasetTableField); + List quotaList = new ArrayList<>(); + dataSetTableFieldsService.list(datasetTableField).forEach(o -> { + DatasetTableFieldDTO datasetTableFieldDTO = new DatasetTableFieldDTO(); + BeanUtils.copyProperties(o, datasetTableFieldDTO); + List deTypeCascader = new ArrayList<>(); + deTypeCascader.add(datasetTableFieldDTO.getDeType()); + if (datasetTableFieldDTO.getDeExtractType() == 0 && datasetTableFieldDTO.getDeType() == 1) { + deTypeCascader.add(datasetTableFieldDTO.getDateFormatType()); + } + datasetTableFieldDTO.setDeTypeCascader(deTypeCascader); + quotaList.add(datasetTableFieldDTO); + }); DatasetTableField4Type datasetTableField4Type = new DatasetTableField4Type(); datasetTableField4Type.setDimensionList(dimensionList); diff --git a/backend/src/main/java/io/dataease/controller/response/DatasetTableField4Type.java b/backend/src/main/java/io/dataease/controller/response/DatasetTableField4Type.java index 5f1081716a..8dbc9421cf 100644 --- a/backend/src/main/java/io/dataease/controller/response/DatasetTableField4Type.java +++ b/backend/src/main/java/io/dataease/controller/response/DatasetTableField4Type.java @@ -1,6 +1,6 @@ package io.dataease.controller.response; -import io.dataease.plugins.common.base.domain.DatasetTableField; +import io.dataease.dto.dataset.DatasetTableFieldDTO; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -9,7 +9,7 @@ import java.util.List; @Data public class DatasetTableField4Type { @ApiModelProperty("维度") - List dimensionList; + List dimensionList; @ApiModelProperty("指标") - List quotaList; + List quotaList; } diff --git a/backend/src/main/java/io/dataease/dto/dataset/DatasetTableFieldDTO.java b/backend/src/main/java/io/dataease/dto/dataset/DatasetTableFieldDTO.java index 83a65cb94d..f1455ae21d 100644 --- a/backend/src/main/java/io/dataease/dto/dataset/DatasetTableFieldDTO.java +++ b/backend/src/main/java/io/dataease/dto/dataset/DatasetTableFieldDTO.java @@ -3,7 +3,10 @@ package io.dataease.dto.dataset; import io.dataease.plugins.common.base.domain.DatasetTableField; import lombok.Data; +import java.util.List; + @Data public class DatasetTableFieldDTO extends DatasetTableField { private String jsonPath; + private List deTypeCascader; } diff --git a/backend/src/main/java/io/dataease/job/sechedule/strategy/impl/EmailTaskHandler.java b/backend/src/main/java/io/dataease/job/sechedule/strategy/impl/EmailTaskHandler.java index e0ce934228..da97c6c019 100644 --- a/backend/src/main/java/io/dataease/job/sechedule/strategy/impl/EmailTaskHandler.java +++ b/backend/src/main/java/io/dataease/job/sechedule/strategy/impl/EmailTaskHandler.java @@ -41,6 +41,7 @@ import org.apache.commons.lang3.StringUtils; import org.quartz.*; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; +import org.springframework.web.util.HtmlUtils; import javax.annotation.Resource; import java.io.File; @@ -67,9 +68,7 @@ public class EmailTaskHandler extends TaskHandler implements Job { protected JobDataMap jobDataMap(GlobalTaskEntity taskEntity) { JobDataMap jobDataMap = new JobDataMap(); jobDataMap.put("taskEntity", taskEntity); - EmailXpackService emailXpackService = SpringContextUtil.getBean(EmailXpackService.class); - XpackEmailTemplateDTO emailTemplateDTO = emailXpackService.emailTemplate(taskEntity.getTaskId()); - jobDataMap.put("emailTemplate", emailTemplateDTO); + SysUserEntity creator = authUserServiceImpl.getUserByIdNoCache(taskEntity.getCreator()); jobDataMap.put("creator", creator); return jobDataMap; @@ -109,10 +108,9 @@ public class EmailTaskHandler extends TaskHandler implements Job { Long instanceId = saveInstance(taskInstance); taskInstance.setInstanceId(instanceId); - XpackEmailTemplateDTO emailTemplate = (XpackEmailTemplateDTO) jobDataMap.get("emailTemplate"); SysUserEntity creator = (SysUserEntity) jobDataMap.get("creator"); LogUtil.info("start execute send panel report task..."); - proxy(taskEntity.getTaskType()).sendReport(taskInstance, emailTemplate, creator, isTempTask); + proxy(taskEntity.getTaskType()).sendReport(taskInstance, creator, isTempTask); if (isTempTask) { removeTask(scheduleManager, taskEntity); } @@ -160,13 +158,14 @@ public class EmailTaskHandler extends TaskHandler implements Job { } @Async("priorityExecutor") - public void sendReport(GlobalTaskInstance taskInstance, XpackEmailTemplateDTO emailTemplateDTO, SysUserEntity user, Boolean isTempTask) { + public void sendReport(GlobalTaskInstance taskInstance, SysUserEntity user, Boolean isTempTask) { EmailXpackService emailXpackService = SpringContextUtil.getBean(EmailXpackService.class); AuthUserServiceImpl userService = SpringContextUtil.getBean(AuthUserServiceImpl.class); SysUserService sysUserService = SpringContextUtil.getBean(SysUserService.class); List files = null; try { + XpackEmailTemplateDTO emailTemplateDTO = emailXpackService.emailTemplate(taskInstance.getTaskId()); XpackEmailTaskRequest taskForm = emailXpackService.taskForm(taskInstance.getTaskId()); if (ObjectUtils.isEmpty(taskForm) || (!isTempTask && CronUtils.taskExpire(taskForm.getEndTime()))) { removeInstance(taskInstance); @@ -202,7 +201,7 @@ public class EmailTaskHandler extends TaskHandler implements Job { String contentStr = ""; if (ObjectUtils.isNotEmpty(content)) { - contentStr = new String(content, "UTF-8"); + contentStr = HtmlUtils.htmlUnescape(new String(content, "UTF-8")); } diff --git a/backend/src/main/java/io/dataease/job/sechedule/strategy/impl/EmailTaskViewHandler.java b/backend/src/main/java/io/dataease/job/sechedule/strategy/impl/EmailTaskViewHandler.java index 5eff2cb4eb..79a53d3120 100644 --- a/backend/src/main/java/io/dataease/job/sechedule/strategy/impl/EmailTaskViewHandler.java +++ b/backend/src/main/java/io/dataease/job/sechedule/strategy/impl/EmailTaskViewHandler.java @@ -4,20 +4,17 @@ import io.dataease.auth.entity.SysUserEntity; import io.dataease.plugins.common.entity.GlobalTaskInstance; -import io.dataease.plugins.xpack.email.dto.response.XpackEmailTemplateDTO; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; -import javax.annotation.Resource; - @Service("emailTaskViewHandler") public class EmailTaskViewHandler extends EmailTaskHandler { @Async("priorityExecutor") - public void sendReport(GlobalTaskInstance taskInstance, XpackEmailTemplateDTO emailTemplateDTO, SysUserEntity user, Boolean isTempTask) { - super.sendReport(taskInstance, emailTemplateDTO, user, isTempTask); + public void sendReport(GlobalTaskInstance taskInstance, SysUserEntity user, Boolean isTempTask) { + super.sendReport(taskInstance, user, isTempTask); } } diff --git a/backend/src/main/java/io/dataease/plugins/server/XEmailTaskServer.java b/backend/src/main/java/io/dataease/plugins/server/XEmailTaskServer.java index 1609e13d27..ecd35e8214 100644 --- a/backend/src/main/java/io/dataease/plugins/server/XEmailTaskServer.java +++ b/backend/src/main/java/io/dataease/plugins/server/XEmailTaskServer.java @@ -28,6 +28,7 @@ import org.apache.commons.lang3.StringUtils; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; +import org.springframework.web.util.HtmlUtils; import springfox.documentation.annotations.ApiIgnore; import java.io.*; @@ -136,6 +137,9 @@ public class XEmailTaskServer { String emailContent; try { emailContent = new String(bytes, "UTF-8"); + if (StringUtils.isNotBlank(emailContent)) { + emailContent = HtmlUtils.htmlUnescape(emailContent); + } } catch (Exception e) { throw new RuntimeException(e); } @@ -176,7 +180,7 @@ public class XEmailTaskServer { } String imageUrl = "/system/ui/image/" + fileId; String html = "
" + - "

" + content + "

" + + content + "" + "
"; diff --git a/backend/src/main/java/io/dataease/provider/query/ck/CKQueryProvider.java b/backend/src/main/java/io/dataease/provider/query/ck/CKQueryProvider.java index 8f2c593918..2b8e0b1008 100644 --- a/backend/src/main/java/io/dataease/provider/query/ck/CKQueryProvider.java +++ b/backend/src/main/java/io/dataease/provider/query/ck/CKQueryProvider.java @@ -1,5 +1,6 @@ package io.dataease.provider.query.ck; +import com.alibaba.fastjson.JSONArray; import io.dataease.commons.utils.BeanUtils; import io.dataease.plugins.common.base.domain.ChartViewWithBLOBs; import io.dataease.plugins.common.base.domain.DatasetTableField; @@ -17,6 +18,7 @@ import io.dataease.plugins.common.dto.sqlObj.SQLObj; import io.dataease.plugins.common.request.chart.ChartExtFilterRequest; import io.dataease.plugins.common.request.permission.DataSetRowPermissionsTreeDTO; import io.dataease.plugins.common.request.permission.DatasetRowPermissionsTreeItem; +import io.dataease.plugins.datasource.entity.Dateformat; import io.dataease.plugins.datasource.entity.PageInfo; import io.dataease.plugins.datasource.query.QueryProvider; import io.dataease.plugins.datasource.query.Utils; @@ -1400,4 +1402,15 @@ public class CKQueryProvider extends QueryProvider { return sql; } } + + public List dateformat() { + return JSONArray.parseArray("[\n" + + "{\"dateformat\": \"%Y%m%d\"},\n" + + "{\"dateformat\": \"%Y/%m/%d\"},\n" + + "{\"dateformat\": \"%Y-%m-%d\"},\n" + + "{\"dateformat\": \"%Y%m%d %H:%M:%S\"},\n" + + "{\"dateformat\": \"%Y/%m/%d %H:%M:%S\"},\n" + + "{\"dateformat\": \"%Y-%m-%d %H:%M:%S\"}\n" + + "]", Dateformat.class); + } } diff --git a/backend/src/main/java/io/dataease/provider/query/db2/Db2QueryProvider.java b/backend/src/main/java/io/dataease/provider/query/db2/Db2QueryProvider.java index 7fad9ee875..e1cdf780f5 100644 --- a/backend/src/main/java/io/dataease/provider/query/db2/Db2QueryProvider.java +++ b/backend/src/main/java/io/dataease/provider/query/db2/Db2QueryProvider.java @@ -1,5 +1,6 @@ package io.dataease.provider.query.db2; +import com.alibaba.fastjson.JSONArray; import com.google.gson.Gson; import io.dataease.dto.datasource.Db2Configuration; import io.dataease.plugins.common.base.domain.ChartViewWithBLOBs; @@ -18,6 +19,7 @@ import io.dataease.plugins.common.dto.sqlObj.SQLObj; import io.dataease.plugins.common.request.chart.ChartExtFilterRequest; import io.dataease.plugins.common.request.permission.DataSetRowPermissionsTreeDTO; import io.dataease.plugins.common.request.permission.DatasetRowPermissionsTreeItem; +import io.dataease.plugins.datasource.entity.Dateformat; import io.dataease.plugins.datasource.entity.JdbcConfiguration; import io.dataease.plugins.datasource.entity.PageInfo; import io.dataease.plugins.datasource.query.QueryProvider; @@ -1378,4 +1380,15 @@ public class Db2QueryProvider extends QueryProvider { schema = String.format(Db2Constants.KEYWORD_TABLE, schema); return "SELECT * FROM " + schema + "." + String.format(Db2Constants.KEYWORD_TABLE, table); } + + public List dateformat() { + return JSONArray.parseArray("[\n" + + "{\"dateformat\": \"YYYYMMDD\"},\n" + + "{\"dateformat\": \"YYYY/MM/DD\"},\n" + + "{\"dateformat\": \"YYYY-MM-DD\"},\n" + + "{\"dateformat\": \"YYYYMMDD HH24:MI:SS\"},\n" + + "{\"dateformat\": \"YYYY/MM/DD HH24:MI:SS\"},\n" + + "{\"dateformat\": \"YYYY-MM-DD HH24:MI:SS\"}\n" + + "]", Dateformat.class); + } } diff --git a/backend/src/main/java/io/dataease/provider/query/es/EsQueryProvider.java b/backend/src/main/java/io/dataease/provider/query/es/EsQueryProvider.java index 673392fabc..2a7c7134fe 100644 --- a/backend/src/main/java/io/dataease/provider/query/es/EsQueryProvider.java +++ b/backend/src/main/java/io/dataease/provider/query/es/EsQueryProvider.java @@ -1,5 +1,6 @@ package io.dataease.provider.query.es; +import com.alibaba.fastjson.JSONArray; import io.dataease.plugins.common.base.domain.ChartViewWithBLOBs; import io.dataease.plugins.common.base.domain.DatasetTableField; import io.dataease.plugins.common.base.domain.DatasetTableFieldExample; @@ -16,6 +17,7 @@ import io.dataease.plugins.common.dto.sqlObj.SQLObj; import io.dataease.plugins.common.request.chart.ChartExtFilterRequest; import io.dataease.plugins.common.request.permission.DataSetRowPermissionsTreeDTO; import io.dataease.plugins.common.request.permission.DatasetRowPermissionsTreeItem; +import io.dataease.plugins.datasource.entity.Dateformat; import io.dataease.plugins.datasource.query.QueryProvider; import io.dataease.plugins.datasource.query.Utils; import org.apache.commons.collections4.CollectionUtils; @@ -1311,4 +1313,15 @@ public class EsQueryProvider extends QueryProvider { return sql; } } + + public List dateformat() { + return JSONArray.parseArray("[\n" + + "{\"dateformat\": \"yyyy/MM/dd\"},\n" + + "{\"dateformat\": \"yyyy/MMdd\"},\n" + + "{\"dateformat\": \"yyyy-MM-dd\"},\n" + + "{\"dateformat\": \"yyyyMMdd HH:mm:ss\"},\n" + + "{\"dateformat\": \"yyyy/MMdd HH:mm:ss\"},\n" + + "{\"dateformat\": \"yyyy-MM-dd HH:mm:ss\"}\n" + + "]", Dateformat.class); + } } diff --git a/backend/src/main/java/io/dataease/provider/query/hive/HiveQueryProvider.java b/backend/src/main/java/io/dataease/provider/query/hive/HiveQueryProvider.java index ce089d53c9..14fa0d1b06 100644 --- a/backend/src/main/java/io/dataease/provider/query/hive/HiveQueryProvider.java +++ b/backend/src/main/java/io/dataease/provider/query/hive/HiveQueryProvider.java @@ -1,5 +1,6 @@ package io.dataease.provider.query.hive; +import com.alibaba.fastjson.JSONArray; import io.dataease.plugins.common.base.domain.ChartViewWithBLOBs; import io.dataease.plugins.common.base.domain.DatasetTableField; import io.dataease.plugins.common.base.domain.DatasetTableFieldExample; @@ -16,6 +17,7 @@ import io.dataease.plugins.common.dto.sqlObj.SQLObj; import io.dataease.plugins.common.request.chart.ChartExtFilterRequest; import io.dataease.plugins.common.request.permission.DataSetRowPermissionsTreeDTO; import io.dataease.plugins.common.request.permission.DatasetRowPermissionsTreeItem; +import io.dataease.plugins.datasource.entity.Dateformat; import io.dataease.plugins.datasource.entity.PageInfo; import io.dataease.plugins.datasource.query.QueryProvider; import io.dataease.plugins.datasource.query.Utils; @@ -1299,4 +1301,15 @@ public class HiveQueryProvider extends QueryProvider { return sql; } } + + public List dateformat() { + return JSONArray.parseArray("[\n" + + "{\"dateformat\": \"yyyyMMdd\"},\n" + + "{\"dateformat\": \"yyyy/MM/dd\"},\n" + + "{\"dateformat\": \"yyyy-MM-dd\"},\n" + + "{\"dateformat\": \"yyyy/MM/dd HH:mm:ss\"},\n" + + "{\"dateformat\": \"yyyyMMdd HH:mm:ss\"},\n" + + "{\"dateformat\": \"yyyy-MM-dd HH:mm:ss\"}\n" + + "]", Dateformat.class); + } } diff --git a/backend/src/main/java/io/dataease/provider/query/impala/ImpalaQueryProvider.java b/backend/src/main/java/io/dataease/provider/query/impala/ImpalaQueryProvider.java index edfd4a8810..2e33fc8d93 100644 --- a/backend/src/main/java/io/dataease/provider/query/impala/ImpalaQueryProvider.java +++ b/backend/src/main/java/io/dataease/provider/query/impala/ImpalaQueryProvider.java @@ -1,5 +1,6 @@ package io.dataease.provider.query.impala; +import com.alibaba.fastjson.JSONArray; import io.dataease.plugins.common.base.domain.ChartViewWithBLOBs; import io.dataease.plugins.common.base.domain.DatasetTableField; import io.dataease.plugins.common.base.domain.DatasetTableFieldExample; @@ -16,6 +17,7 @@ import io.dataease.plugins.common.dto.sqlObj.SQLObj; import io.dataease.plugins.common.request.chart.ChartExtFilterRequest; import io.dataease.plugins.common.request.permission.DataSetRowPermissionsTreeDTO; import io.dataease.plugins.common.request.permission.DatasetRowPermissionsTreeItem; +import io.dataease.plugins.datasource.entity.Dateformat; import io.dataease.plugins.datasource.entity.PageInfo; import io.dataease.plugins.datasource.query.QueryProvider; import io.dataease.plugins.datasource.query.Utils; @@ -1276,4 +1278,15 @@ public class ImpalaQueryProvider extends QueryProvider { return sql; } } + + public List dateformat() { + return JSONArray.parseArray("[\n" + + "{\"dateformat\": \"yyyy-MM-dd\"},\n" + + "{\"dateformat\": \"yyyy/MM/dd\"},\n" + + "{\"dateformat\": \"yyyyMMdd\"},\n" + + "{\"dateformat\": \"yyyy-MM-dd HH:mm:ss\"},\n" + + "{\"dateformat\": \"yyyy/MMdd HH:mm:ss\"},\n" + + "{\"dateformat\": \"yyyyMMdd HH:mm:ss\"}\n" + + "]", Dateformat.class); + } } diff --git a/backend/src/main/java/io/dataease/provider/query/mongodb/MongoQueryProvider.java b/backend/src/main/java/io/dataease/provider/query/mongodb/MongoQueryProvider.java index 1a11a1d232..34730987a4 100644 --- a/backend/src/main/java/io/dataease/provider/query/mongodb/MongoQueryProvider.java +++ b/backend/src/main/java/io/dataease/provider/query/mongodb/MongoQueryProvider.java @@ -1,5 +1,6 @@ package io.dataease.provider.query.mongodb; +import com.alibaba.fastjson.JSONArray; import io.dataease.plugins.common.base.domain.ChartViewWithBLOBs; import io.dataease.plugins.common.base.domain.DatasetTableField; import io.dataease.plugins.common.base.domain.DatasetTableFieldExample; @@ -16,6 +17,7 @@ import io.dataease.plugins.common.dto.sqlObj.SQLObj; import io.dataease.plugins.common.request.chart.ChartExtFilterRequest; import io.dataease.plugins.common.request.permission.DataSetRowPermissionsTreeDTO; import io.dataease.plugins.common.request.permission.DatasetRowPermissionsTreeItem; +import io.dataease.plugins.datasource.entity.Dateformat; import io.dataease.plugins.datasource.entity.PageInfo; import io.dataease.plugins.datasource.query.QueryProvider; import io.dataease.plugins.datasource.query.Utils; @@ -1150,4 +1152,15 @@ public class MongoQueryProvider extends QueryProvider { return sql; } } + + public List dateformat() { + return JSONArray.parseArray("[\n" + + "{\"dateformat\": \"%Y-%m-%d\"},\n" + + "{\"dateformat\": \"%Y/%m/%d\"},\n" + + "{\"dateformat\": \"%Y%m%d\"},\n" + + "{\"dateformat\": \"%Y-%m-%d %H:%i:%S\"},\n" + + "{\"dateformat\": \"%Y/%m/%d %H:%i:%S\"},\n" + + "{\"dateformat\": \"%Y%m%d %H:%i:%S\"}\n" + + "]", Dateformat.class); + } } diff --git a/backend/src/main/java/io/dataease/provider/query/oracle/OracleQueryProvider.java b/backend/src/main/java/io/dataease/provider/query/oracle/OracleQueryProvider.java index 8d1c685527..c3ce406b2d 100644 --- a/backend/src/main/java/io/dataease/provider/query/oracle/OracleQueryProvider.java +++ b/backend/src/main/java/io/dataease/provider/query/oracle/OracleQueryProvider.java @@ -1,5 +1,6 @@ package io.dataease.provider.query.oracle; +import com.alibaba.fastjson.JSONArray; import com.google.gson.Gson; import io.dataease.dto.datasource.OracleConfiguration; import io.dataease.plugins.common.base.domain.ChartViewWithBLOBs; @@ -18,6 +19,7 @@ import io.dataease.plugins.common.dto.sqlObj.SQLObj; import io.dataease.plugins.common.request.chart.ChartExtFilterRequest; import io.dataease.plugins.common.request.permission.DataSetRowPermissionsTreeDTO; import io.dataease.plugins.common.request.permission.DatasetRowPermissionsTreeItem; +import io.dataease.plugins.datasource.entity.Dateformat; import io.dataease.plugins.datasource.entity.JdbcConfiguration; import io.dataease.plugins.datasource.entity.PageInfo; import io.dataease.plugins.datasource.query.QueryProvider; @@ -1427,4 +1429,15 @@ public class OracleQueryProvider extends QueryProvider { schema = String.format(OracleConstants.KEYWORD_TABLE, schema); return "SELECT * FROM " + schema + "." + String.format(OracleConstants.KEYWORD_TABLE, table); } + + public List dateformat() { + return JSONArray.parseArray("[\n" + + "{\"dateformat\": \"YYYY-MM-DD\"},\n" + + "{\"dateformat\": \"YYYY/MM/DD\"},\n" + + "{\"dateformat\": \"YYYYMMDD\"},\n" + + "{\"dateformat\": \"YYYY-MM-DD HH24:MI:SS\"},\n" + + "{\"dateformat\": \"YYYY/MM/DD HH24:MI:SS\"},\n" + + "{\"dateformat\": \"YYYYMMDD HH24:MI:SS\"}\n" + + "]", Dateformat.class); + } } diff --git a/backend/src/main/java/io/dataease/provider/query/pg/PgQueryProvider.java b/backend/src/main/java/io/dataease/provider/query/pg/PgQueryProvider.java index ead69fa59f..227fb75f1d 100644 --- a/backend/src/main/java/io/dataease/provider/query/pg/PgQueryProvider.java +++ b/backend/src/main/java/io/dataease/provider/query/pg/PgQueryProvider.java @@ -1,5 +1,6 @@ package io.dataease.provider.query.pg; +import com.alibaba.fastjson.JSONArray; import com.google.gson.Gson; import io.dataease.plugins.common.base.domain.ChartViewWithBLOBs; import io.dataease.plugins.common.base.domain.DatasetTableField; @@ -18,6 +19,7 @@ import io.dataease.plugins.common.dto.sqlObj.SQLObj; import io.dataease.plugins.common.request.chart.ChartExtFilterRequest; import io.dataease.plugins.common.request.permission.DataSetRowPermissionsTreeDTO; import io.dataease.plugins.common.request.permission.DatasetRowPermissionsTreeItem; +import io.dataease.plugins.datasource.entity.Dateformat; import io.dataease.plugins.datasource.entity.JdbcConfiguration; import io.dataease.plugins.datasource.entity.PageInfo; import io.dataease.plugins.datasource.query.QueryProvider; @@ -1301,4 +1303,15 @@ public class PgQueryProvider extends QueryProvider { schema = String.format(PgConstants.KEYWORD_TABLE, schema); return "SELECT * FROM " + schema + "." + String.format(PgConstants.KEYWORD_TABLE, table); } + + public List dateformat() { + return JSONArray.parseArray("[\n" + + "{\"dateformat\": \"YYYY-MM-DD\"},\n" + + "{\"dateformat\": \"YYYY/MM/DD\"},\n" + + "{\"dateformat\": \"YYYYMMDD\"},\n" + + "{\"dateformat\": \"YYYY-MM-DD HH24:MI:SS\"},\n" + + "{\"dateformat\": \"YYYY/MM/DD HH24:MI:SS\"},\n" + + "{\"dateformat\": \"YYYYMMDD HH24:MI:SS\"}\n" + + "]", Dateformat.class); + } } diff --git a/backend/src/main/java/io/dataease/provider/query/redshift/RedshiftQueryProvider.java b/backend/src/main/java/io/dataease/provider/query/redshift/RedshiftQueryProvider.java index 2ba6bc0e15..4a8fa038aa 100644 --- a/backend/src/main/java/io/dataease/provider/query/redshift/RedshiftQueryProvider.java +++ b/backend/src/main/java/io/dataease/provider/query/redshift/RedshiftQueryProvider.java @@ -1,5 +1,6 @@ package io.dataease.provider.query.redshift; +import com.alibaba.fastjson.JSONArray; import com.google.gson.Gson; import io.dataease.plugins.common.base.domain.ChartViewWithBLOBs; import io.dataease.plugins.common.base.domain.DatasetTableField; @@ -16,6 +17,7 @@ import io.dataease.plugins.common.dto.sqlObj.SQLObj; import io.dataease.plugins.common.request.chart.ChartExtFilterRequest; import io.dataease.plugins.common.request.permission.DataSetRowPermissionsTreeDTO; import io.dataease.plugins.common.request.permission.DatasetRowPermissionsTreeItem; +import io.dataease.plugins.datasource.entity.Dateformat; import io.dataease.plugins.datasource.entity.JdbcConfiguration; import io.dataease.plugins.datasource.entity.PageInfo; import io.dataease.plugins.datasource.query.QueryProvider; @@ -1286,4 +1288,15 @@ public class RedshiftQueryProvider extends QueryProvider { schema = String.format(PgConstants.KEYWORD_TABLE, schema); return "SELECT * FROM " + schema + "." + String.format(PgConstants.KEYWORD_TABLE, table); } + + public List dateformat() { + return JSONArray.parseArray("[\n" + + "{\"dateformat\": \"YYYY-MM-DD\"},\n" + + "{\"dateformat\": \"YYYY/MM/DD\"},\n" + + "{\"dateformat\": \"YYYYMMDD\"},\n" + + "{\"dateformat\": \"YYYY-MM-DD HH24:MI:SS\"},\n" + + "{\"dateformat\": \"YYYY/MM/DD HH24:MI:SS\"},\n" + + "{\"dateformat\": \"YYYYMMDD HH24:MI:SS\"}\n" + + "]", Dateformat.class); + } } diff --git a/backend/src/main/java/io/dataease/service/dataset/DataSetTableTaskService.java b/backend/src/main/java/io/dataease/service/dataset/DataSetTableTaskService.java index a0b34fe714..9ea3d35167 100644 --- a/backend/src/main/java/io/dataease/service/dataset/DataSetTableTaskService.java +++ b/backend/src/main/java/io/dataease/service/dataset/DataSetTableTaskService.java @@ -335,6 +335,9 @@ public class DataSetTableTaskService { public void execTask(DatasetTableTask datasetTableTask) throws Exception { execNow(datasetTableTask); + if(datasetTableTask.getRate().equalsIgnoreCase(ScheduleType.SIMPLE.toString())){ + scheduleService.addSchedule(datasetTableTask); + } if (!datasetTableTask.getRate().equalsIgnoreCase(ScheduleType.SIMPLE.toString())) { scheduleService.fireNow(datasetTableTask); } diff --git a/backend/src/main/resources/application.properties b/backend/src/main/resources/application.properties index 85a8ccf334..81d1e820a9 100644 --- a/backend/src/main/resources/application.properties +++ b/backend/src/main/resources/application.properties @@ -65,49 +65,49 @@ management.health.redis.enabled=false #management.server.port=8083 #management.endpoints.web.exposure.include=* #spring.freemarker.checkTemplateLocation=false -#RSA非对称加密参数:私钥 +#RSA\u975E\u5BF9\u79F0\u52A0\u5BC6\u53C2\u6570\uFF1A\u79C1\u94A5 rsa.private_key=MIIBUwIBADANBgkqhkiG9w0BAQEFAASCAT0wggE5AgEAAkEA0vfvyTdGJkdbHkB8mp0f3FE0GYP3AYPaJF7jUd1M0XxFSE2ceK3k2kw20YvQ09NJKk+OMjWQl9WitG9pB6tSCQIDAQABAkA2SimBrWC2/wvauBuYqjCFwLvYiRYqZKThUS3MZlebXJiLB+Ue/gUifAAKIg1avttUZsHBHrop4qfJCwAI0+YRAiEA+W3NK/RaXtnRqmoUUkb59zsZUBLpvZgQPfj1MhyHDz0CIQDYhsAhPJ3mgS64NbUZmGWuuNKp5coY2GIj/zYDMJp6vQIgUueLFXv/eZ1ekgz2Oi67MNCk5jeTF2BurZqNLR3MSmUCIFT3Q6uHMtsB9Eha4u7hS31tj1UWE+D+ADzp59MGnoftAiBeHT7gDMuqeJHPL4b+kC+gzV4FGTfhR9q3tTbklZkD2A== rsa.public_key=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBANL378k3RiZHWx5AfJqdH9xRNBmD9wGD2iRe41HdTNF8RUhNnHit5NpMNtGL0NPTSSpPjjI1kJfVorRvaQerUgkCAwEAAQ== #spring.cache.type=ehcache spring.cache.ehcache.config=classpath:/ehcache/ehcache.xml -#打印URL路径 +#\u6253\u5370URL\u8DEF\u5F84 #logging.level.org.springframework.web=trace #logging.level.org.springframework.boot.web=trace #spring.mvc.log-request-details=true pagehelper.PageRowBounds=true -#excel等用户上传文件路径 +#excel\u7B49\u7528\u6237\u4E0A\u4F20\u6587\u4EF6\u8DEF\u5F84 upload.file.path=/opt/dataease/data/kettle/ -dataease.sqlinjection.whitelists=/dataset/table/sqlPreview,/dataset/table/update +dataease.sqlinjection.whitelists=/dataset/table/sqlPreview,/dataset/table/update,/dataset/field/multFieldValues,/dataset/field/linkMultFieldValues -#开启压缩 提高响应速度 减少带宽压力 +#\u5F00\u542F\u538B\u7F29 \u63D0\u9AD8\u54CD\u5E94\u901F\u5EA6 \u51CF\u5C11\u5E26\u5BBD\u538B\u529B server.compression.enabled=true server.compression.mime-types=application/javascript,text/css,application/json,application/xml,text/html,text/xml,text/plain server.compression.min-response-size=1024 -#下面的配置新增到/opt/dataease/conf/dataease/properties -#缓存类型 +#\u4E0B\u9762\u7684\u914D\u7F6E\u65B0\u589E\u5230/opt/dataease/conf/dataease/properties +#\u7F13\u5B58\u7C7B\u578B ##spring.cache.type=redis #spring.cache.type=ehcache -#redis公共配置 +#redis\u516C\u5171\u914D\u7F6E #spring.redis.timeout=10000 #spring.redis.lettuce.pool.max-active=8 #spring.redis.lettuce.pool.max-wait=-1 #spring.redis.lettuce.pool.max-idle=8 -#单机模式redis配置 +#\u5355\u673A\u6A21\u5F0Fredis\u914D\u7F6E #spring.redis.database=0 #spring.redis.host=192.168.0.110 #spring.redis.port=6379 #spring.redis.password=DataEase_ZNB@REDIS -#哨兵模式redis配置 +#\u54E8\u5175\u6A21\u5F0Fredis\u914D\u7F6E #spring.redis.sentinel.master=mymaster #spring.redis.sentinel.nodes=192.168.0.110:26379,192.168.0.110:26380,192.168.0.110:26381 #spring.redis.sentinel.password= -#cluster模式redis配置 +#cluster\u6A21\u5F0Fredis\u914D\u7F6E #spring.redis.cluster.nodes=192.168.0.110:7001,192.168.0.110:7002,192.168.0.110:7003,192.168.0.110:7004,192.168.0.110:7005,192.168.0.110:7006 #spring.redis.cluster.max-redirects=3 #spring.redis.password=DataEase_ZNB@REDIS diff --git a/backend/src/main/resources/db/migration/V44__1.17.sql b/backend/src/main/resources/db/migration/V44__1.17.sql index 30b3206948..0de7b7ddc4 100644 --- a/backend/src/main/resources/db/migration/V44__1.17.sql +++ b/backend/src/main/resources/db/migration/V44__1.17.sql @@ -39,3 +39,9 @@ WHERE (`component` = 'msg/setting'); ALTER TABLE `panel_group` ADD COLUMN `panel_sort` bigint(13) NULL COMMENT '排序' AFTER `watermark_open`; + +ALTER TABLE `sys_task_email` + CHANGE COLUMN `content` `content` MEDIUMBLOB NULL DEFAULT NULL COMMENT '内容' ; + +ALTER TABLE `dataset_table_field` + ADD COLUMN `date_format_type` VARCHAR(255) NULL COMMENT '时间格式类型' AFTER `date_format`; diff --git a/frontend/package.json b/frontend/package.json index 15c23737b0..2c535eb052 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -35,7 +35,7 @@ "@antv/l7-scene": "2.8.31", "@antv/l7-source": "2.8.31", "@antv/l7-utils": "2.8.31", - "@antv/s2": "^1.11.0", + "@antv/s2": "1.35.0", "@antv/util": "^2.0.17", "@riophae/vue-treeselect": "0.4.0", "@tinymce/tinymce-vue": "^3.2.8", diff --git a/frontend/src/api/panel/share.js b/frontend/src/api/panel/share.js index e711dc0a44..16bef88d09 100644 --- a/frontend/src/api/panel/share.js +++ b/frontend/src/api/panel/share.js @@ -38,7 +38,7 @@ export function loadShares(data) { return request({ url: '/api/share/queryWithResourceId', method: 'post', - loading: true, + loading: false, data }) } diff --git a/frontend/src/api/system/dept.js b/frontend/src/api/system/dept.js index 1937d17234..9ab0075afb 100644 --- a/frontend/src/api/system/dept.js +++ b/frontend/src/api/system/dept.js @@ -13,7 +13,7 @@ export function loadTable(data) { url: 'api/dept/search', method: 'post', data, - loading: true + loading: false }) } diff --git a/frontend/src/components/canvas/components/TextAttr.vue b/frontend/src/components/canvas/components/TextAttr.vue index b478bc30d6..bc8c430ee5 100644 --- a/frontend/src/components/canvas/components/TextAttr.vue +++ b/frontend/src/components/canvas/components/TextAttr.vue @@ -99,6 +99,30 @@ /> + + + + +
+ +
+ this.maxFontSize) { + this.styleInfo.activeFontSize = this.maxFontSize + } else { + this.styleInfo.activeFontSize = newVal + } + } + }, initFontSize: { handler(newVal) { if (newVal < this.miniFontSize) { @@ -656,6 +694,9 @@ export default { if (this.attrShow('fontSize')) { this.initFontSize = this.styleInfo.fontSize } + if (this.attrShow('activeFontSize')) { + this.initActiveFontSize = this.styleInfo.activeFontSize + } }, methods: { diff --git a/frontend/src/components/canvas/components/editor/CanvasOptBar.vue b/frontend/src/components/canvas/components/editor/CanvasOptBar.vue index 0f174096c0..4aae7a12ad 100644 --- a/frontend/src/components/canvas/components/editor/CanvasOptBar.vue +++ b/frontend/src/components/canvas/components/editor/CanvasOptBar.vue @@ -8,6 +8,7 @@ v-if="isPublicLink" ref="widget-div" class="function-div" + :class="functionClass" > {{ $t('panel.remove_all_linkage') }} + >{{ $t('panel.remove_all_linkage') }} { @@ -142,13 +164,43 @@ export default { width: max-content; text-align: end; z-index: 999; - ::v-deep button:hover { - background-color: rgba(31, 35, 41, 0.1); - color: #1F2329; - font-weight: bold; - border-color: rgba(31, 35, 41, 0.1) + border-radius: 4px; + ::v-deep button { + border-radius: 0px; + } + } + .function-light { + background: #FFFFFF; + border: 1px solid #DEE0E3; + box-shadow: 0px 4px 8px rgb(31 35 41 / 10%); + ::v-deep button { + background-color: #FFFFFF; + box-shadow: 0px 4px 8px rgba(31, 35, 41, 0.1); + border: 1px solid #DEE0E3; + &:hover { + background-color: rgba(31, 35, 41, 0.1); + color: #1F2329; + font-weight: bold; + border-color: rgba(31, 35, 41, 0.1) + } + } + } + .function-dark { + background: #1A1A1A; + border: 1px solid #434343; + box-shadow: 0px 4px 8px rgba(26, 26, 26, 0.1); + ::v-deep button { + background-color: #1A1A1A; + border: 1px solid #434343; + box-shadow: 0px 4px 8px rgba(26, 26, 26, 0.1); + color: #FFFFFF; + &:hover { + background-color: rgba(235, 235, 235, 0.1); + color: #EBEBEB; + font-weight: bold; + border-color: rgba(235, 235, 235, 0.1); + } } - } &:hover { border-top: 60px solid rgba(245, 74, 69, 0);; diff --git a/frontend/src/components/canvas/components/editor/ComponentWrapper.vue b/frontend/src/components/canvas/components/editor/ComponentWrapper.vue index 45a0b017b1..4a757dd5fc 100644 --- a/frontend/src/components/canvas/components/editor/ComponentWrapper.vue +++ b/frontend/src/components/canvas/components/editor/ComponentWrapper.vue @@ -201,12 +201,16 @@ export default { componentActiveFlag() { return !this.mobileLayoutStatus && ((this.curComponent && this.config === this.curComponent && !this.previewVisible && !this.showPosition.includes('email-task')) || this.showPosition.includes('multiplexing')) }, + scale() { + return Math.min(this.previewCanvasScale.scalePointWidth, this.previewCanvasScale.scalePointHeight) + }, curGap() { - return (this.canvasStyleData.panel.gap === 'yes' && this.config.auxiliaryMatrix) ? this.componentGap : 0 + return ((this.canvasStyleData.panel.gap === 'yes' && this.config.auxiliaryMatrix) ? this.componentGap : 0) * this.scale }, ...mapState([ 'mobileLayoutStatus', 'curComponent', + 'previewCanvasScale', 'componentGap' ]) }, diff --git a/frontend/src/components/canvas/components/editor/Preview.vue b/frontend/src/components/canvas/components/editor/Preview.vue index 15a5186b6e..7c523fe88c 100644 --- a/frontend/src/components/canvas/components/editor/Preview.vue +++ b/frontend/src/components/canvas/components/editor/Preview.vue @@ -11,6 +11,7 @@ >
{ this.exporting = true + this.backScreenShot = true + const scrollHeight = document.getElementById('preview-temp-canvas-main').scrollHeight + + document.getElementById('preview-canvas-main').style.height = (scrollHeight + 'px') setTimeout(() => { html2canvas(document.getElementById(domId)).then(canvas => { const snapshot = canvas.toDataURL('image/jpeg', 1) // 是图片质量 this.dataLoading = false this.exporting = false + this.backScreenShot = false if (snapshot !== '') { this.snapshotInfo = snapshot this.pdfExportShow = true diff --git a/frontend/src/components/canvas/customComponent/UserView.vue b/frontend/src/components/canvas/customComponent/UserView.vue index cfedd58b54..2c5988c915 100644 --- a/frontend/src/components/canvas/customComponent/UserView.vue +++ b/frontend/src/components/canvas/customComponent/UserView.vue @@ -585,6 +585,9 @@ export default { updateParams['customAttr'] = this.sourceCustomAttrStr } else if (param.custom === 'customStyle') { const sourceCustomStyle = JSON.parse(this.sourceCustomStyleStr) + if (param.property === 'margin') { + sourceCustomStyle[param.property] = param.value + } sourceCustomStyle[param.property][param.value.modifyName] = param.value[param.value.modifyName] this.sourceCustomStyleStr = JSON.stringify(sourceCustomStyle) this.chart.customStyle = this.sourceCustomStyleStr diff --git a/frontend/src/components/canvas/customComponent/component-list.js b/frontend/src/components/canvas/customComponent/component-list.js index 0c79e78f02..08146c3716 100644 --- a/frontend/src/components/canvas/customComponent/component-list.js +++ b/frontend/src/components/canvas/customComponent/component-list.js @@ -94,8 +94,7 @@ export const VIDEOLINKS = { fullscreenToggle: false, pause: false }, - sources: [{ - }] + sources: [{}] }, rtmp: { sources: [{ @@ -389,7 +388,10 @@ const list = [ borderStyle: 'solid', borderWidth: 0, borderColor: '#000000', - fontSize: 16 + fontSize: 16, + activeFontSize: 18, + carouselEnable: false, + switchTime: 5 }, options: { tabList: [{ diff --git a/frontend/src/components/canvas/utils/utils.js b/frontend/src/components/canvas/utils/utils.js index c81866fc7b..bb8e851623 100644 --- a/frontend/src/components/canvas/utils/utils.js +++ b/frontend/src/components/canvas/utils/utils.js @@ -103,6 +103,9 @@ export function panelDataPrepare(componentData, componentStyle, callback) { } if (item.type === 'de-tabs') { item.style.fontSize = item.style.fontSize || 16 + item.style.activeFontSize = item.style.activeFontSize || 18 + item.style.carouselEnable = item.style.carouselEnable || false + item.style.switchTime = item.style.switchTime || 5 } if (item.type === 'custom') { item.options.manualModify = false diff --git a/frontend/src/components/dataease/DeOutWidget.vue b/frontend/src/components/dataease/DeOutWidget.vue index 31025ae3f4..f12aae39d9 100644 --- a/frontend/src/components/dataease/DeOutWidget.vue +++ b/frontend/src/components/dataease/DeOutWidget.vue @@ -2,6 +2,7 @@
import inputStyleMixin from '@/components/widget/deWidget/inputStyleMixin' +import { mapState } from 'vuex' + export default { name: 'DeOutWidget', mixins: [inputStyleMixin], @@ -112,6 +115,18 @@ export default { } }, computed: { + scale() { + return this.previewCanvasScale.scalePointHeight + }, + autoStyle() { + return { + height: (100 / this.scale) + '%!important', + width: (100 / this.scale) + '%!important', + left: 50 * (1 - 1 / this.scale) + '%', // 放大余量 除以 2 + top: 50 * (1 - 1 / this.scale) + '%', // 放大余量 除以 2 + transform: 'scale(' + this.scale + ')' + } + }, sizeInfo() { let size if (this.duHeight > this.inputLargeSize) { @@ -133,7 +148,10 @@ export default { }, isFilterComponent() { return ['de-select', 'de-select-grid', 'de-date', 'de-input-search', 'de-number-range', 'de-select-tree'].includes(this.element.component) - } + }, + ...mapState([ + 'previewCanvasScale' + ]) }, watch: { 'element.style': { diff --git a/frontend/src/components/widget/deWidget/DeSelectGrid.vue b/frontend/src/components/widget/deWidget/DeSelectGrid.vue index 7faf24fba5..5fa5cd6bc8 100644 --- a/frontend/src/components/widget/deWidget/DeSelectGrid.vue +++ b/frontend/src/components/widget/deWidget/DeSelectGrid.vue @@ -71,7 +71,7 @@ import { linkMultFieldValues, multFieldValues } from '@/api/dataset/dataset' import { getLinkToken, getToken } from '@/utils/auth' import bus from '@/utils/bus' -import { isSameVueObj } from '@/utils' +import { isSameVueObj, mergeCustomSortOption } from '@/utils' import { attrsMap, styleAttrs, textSelectGridWidget } from '@/components/widget/deWidget/serviceNameFn.js' export default { @@ -142,6 +142,9 @@ export default { cssArr() { const { brColor, wordColor, innerBgColor } = this.element.style return { brColor, wordColor, innerBgColor } + }, + isCustomSortWidget() { + return this.element.serviceName === 'textSelectGridWidget' } }, watch: { @@ -354,7 +357,11 @@ export default { }, optionData(data) { if (!data) return null - return data.filter(item => !!item).map(item => { + let tempData = data.filter(item => !!item) + if (this.isCustomSortWidget && this.element.options.attrs?.sort?.sort === 'custom') { + tempData = mergeCustomSortOption(this.element.options.attrs.sort.list, tempData) + } + return tempData.map(item => { return { id: item, text: item diff --git a/frontend/src/components/widget/deWidget/DeTabs.vue b/frontend/src/components/widget/deWidget/DeTabs.vue index 99d655a4a2..6e401c8166 100644 --- a/frontend/src/components/widget/deWidget/DeTabs.vue +++ b/frontend/src/components/widget/deWidget/DeTabs.vue @@ -29,7 +29,7 @@ :name="item.name" > - {{ item.title }} + {{ item.title }} { + switchCount++ + const nowIndex = switchCount % this.element.options.tabList.length + this.activeTabName = this.element.options.tabList[nowIndex].name + }, switchTime) + } + }, initScroll() { this.scrollLeft = 50 this.scrollTop = 10 diff --git a/frontend/src/components/widget/deWidget/TabStyle.vue b/frontend/src/components/widget/deWidget/TabStyle.vue index a95cdae96b..c73831ad80 100644 --- a/frontend/src/components/widget/deWidget/TabStyle.vue +++ b/frontend/src/components/widget/deWidget/TabStyle.vue @@ -112,6 +112,38 @@ {{ $t('chart.text_pos_right') }} + + + + {{ $t('commons.enable') }} + + + + {{ $t('panel.switch_time') }} + + + + + + + + + - - - \ No newline at end of file + \ No newline at end of file diff --git a/frontend/src/icons/svg/link-down.svg b/frontend/src/icons/svg/link-down.svg index 90a6a5bda1..f0aaca266a 100644 --- a/frontend/src/icons/svg/link-down.svg +++ b/frontend/src/icons/svg/link-down.svg @@ -1,4 +1 @@ - - - - \ No newline at end of file + \ No newline at end of file diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js index 739856bb18..68c9336d48 100644 --- a/frontend/src/lang/en.js +++ b/frontend/src/lang/en.js @@ -915,9 +915,11 @@ export default { password_input_error: 'Original password input error' }, chart: { + gradient: 'Gradient', layer_controller: 'Quota switch', suspension: 'Suspension', chart_background: 'Component background', + date_format: 'Select date resolution format', solid_color: 'Solid color', split_gradient: 'Split gradient', continuous_gradient: 'Continuous gradient', @@ -1876,10 +1878,13 @@ export default { back_parent: 'Back to previous' }, panel: { + active_font_size: 'Active font size', + carousel: 'Carousel', + switch_time: 'Switch time', position_adjust: 'Position', space_top: 'Top', space_left: 'Left', - space_width: 'Widht', + space_width: 'Width', space_height: 'Height', to_top: 'To Top', down: 'Down', @@ -2543,9 +2548,9 @@ export default { start_time: 'Start time', end_time: 'End time', chart_data: 'View data', - panel_preview: 'Preview panel', + panel_preview: 'Preview report', preview: 'Preview', - emial_preview: 'Emial preview', + emial_preview: 'Report preview', chart_data_range: 'View data range', simple_repeat: 'Simple repeat', once_a_day: 'Once a day', diff --git a/frontend/src/lang/tw.js b/frontend/src/lang/tw.js index c5d48bf4f0..bb327cf02d 100644 --- a/frontend/src/lang/tw.js +++ b/frontend/src/lang/tw.js @@ -915,9 +915,11 @@ export default { password_input_error: '原始密碼輸入錯誤' }, chart: { + gradient: '漸變', layer_controller: '指標切換', suspension: '懸浮', chart_background: '組件背景', + date_format: '選擇日期解析格式', solid_color: '純色', split_gradient: '分離漸變', continuous_gradient: '連續漸變', @@ -1876,6 +1878,9 @@ export default { back_parent: '返回上一級' }, panel: { + active_font_size: '激活字體大小', + carousel: '輪播', + switch_time: '切換時間', position_adjust: '位置', space_top: '上', space_left: '左', @@ -2544,9 +2549,9 @@ export default { start_time: '開始時間', end_time: '結束時間', chart_data: '視圖數據', - panel_preview: '預覽儀表板', + panel_preview: '預覽報告', preview: '預覽', - emial_preview: '郵件預覽', + emial_preview: '報告預覽', chart_data_range: '視圖數據範圍', simple_repeat: '簡單重複', once_a_day: '每天一次', diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js index fcad801da6..c408133eff 100644 --- a/frontend/src/lang/zh.js +++ b/frontend/src/lang/zh.js @@ -914,9 +914,11 @@ export default { password_input_error: '原始密码输入错误' }, chart: { + gradient: '渐变', layer_controller: '指标切换', suspension: '悬浮', chart_background: '组件背景', + date_format: '请选择日期解析格式', solid_color: '纯色', split_gradient: '分离渐变', continuous_gradient: '连续渐变', @@ -1876,6 +1878,9 @@ export default { back_parent: '返回上一级' }, panel: { + active_font_size: '激活字体大小', + carousel: '轮播', + switch_time: '切换时间', position_adjust: '位置', space_top: '上', space_left: '左', @@ -2544,9 +2549,9 @@ export default { start_time: '开始时间', end_time: '结束时间', chart_data: '视图数据', - panel_preview: '预览仪表板', + panel_preview: '预览报告', preview: '预览', - emial_preview: '邮件预览', + emial_preview: '报告预览', chart_data_range: '视图数据范围', simple_repeat: '简单重复', once_a_day: '每天一次', diff --git a/frontend/src/styles/deicon/demo_index.html b/frontend/src/styles/deicon/demo_index.html index 1d6af76fd2..54ed133a17 100644 --- a/frontend/src/styles/deicon/demo_index.html +++ b/frontend/src/styles/deicon/demo_index.html @@ -38,7 +38,7 @@

- +

    - + +
  • + +
    font
    +
    &#xe63d;
    +
  • +
  • WATERMARK
    &#xea16;
  • - +
  • 图层
    &#xe63b;
  • - +
  • application
    &#xe89e;
  • - +
  • data-source-24
    &#xe6ef;
  • - +
  • 重置
    &#xe63c;
  • - +
  • None_Select
    &#xe638;
  • - +
  • button_right
    &#xe635;
  • - +
  • icon-maybe
    &#xe631;
  • - +
  • icon_up-left_outlined
    &#xe632;
  • - +
  • close
    &#xe633;
  • - +
  • Frame 3425
    &#xe634;
  • - +
  • icon-filter
    &#xe636;
  • - +
  • icon_Batch_outlined
    &#xe630;
  • - +
  • icon_clear_outlined
    &#xe61d;
  • - +
  • icon_dialpad_outlined
    &#xe61e;
  • - +
  • icon_effects_outlined
    &#xe620;
  • - +
  • icon_magnify_outlined
    &#xe621;
  • - +
  • icon_moments-categories_outlined
    &#xe623;
  • - +
  • icon_pc_outlined
    &#xe626;
  • - +
  • icon_phone_outlined
    &#xe627;
  • - +
  • icon_redo_outlined
    &#xe629;
  • - +
  • icon_undo_outlined
    &#xe62b;
  • - +
  • icon-more
    &#xe62e;
  • - +
  • icon-quicksetting
    &#xe62f;
  • - +
  • square-selected
    &#xe73e;
  • - +
  • italic
    &#xe777;
  • - +
  • 箭头
    &#xe622;
  • - +
  • magic-line
    &#xe63a;
  • - +
  • 更多
    &#xe60c;
  • - +
  • 清空
    &#xe61c;
  • - +
  • 查看
    &#xe610;
  • - +
  • outline-redo
    &#xe68c;
  • - +
  • outline-undo
    &#xe68d;
  • - +
  • 定位
    &#xe60a;
  • - +
  • 富文本框
    &#xe670;
  • - +
  • 下架
    &#xe6e5;
  • - +
  • 上架
    &#xe6e6;
  • - +
  • 发布
    &#xe71f;
  • - +
  • 批量操作
    &#xe61b;
  • - +
  • 图片
    &#xe666;
  • - +
  • 超链接
    &#xe6e4;
  • - +
  • 跳转
    &#xe618;
  • - +
  • 跳转
    &#xe616;
  • - +
  • 网格\表格
    &#xe60b;
  • - +
  • 关闭网格
    &#xe609;
  • - +
  • 流媒体,媒体列表
    &#xe607;
  • - +
  • iframe
    &#xe6de;
  • - +
  • 参数
    &#xe6d7;
  • - +
  • 更换
    &#xe606;
  • - +
  • 发送邮件
    &#xe605;
  • - +
  • github
    &#xe6f8;
  • - +
  • 电话
    &#xe681;
  • - +
  • 关闭
    &#xe60d;
  • - +
  • 矩形
    &#xe67e;
  • - +
  • 移动端
    &#xe653;
  • - +
  • video
    &#xe625;
  • - +
  • 悬浮按钮发动态
    &#xe6e8;
  • - +
  • 吸附选择
    &#xe697;
  • - +
  • margin
    &#xe902;
  • - +
  • padding
    &#xe91b;
  • - +
  • 时间
    &#xe665;
  • - +
  • 时间格式转换
    &#xe6fb;
  • - +
  • 超链接
    &#xe9b2;
  • - +
  • 科学技术
    &#xe60f;
  • - +
  • 符号-数据矩阵
    &#xe69c;
  • - +
  • 视图矩阵_o
    &#xeb85;
  • - +
  • 悬浮
    &#xe62c;
  • - +
  • 右悬浮-选中
    &#xe6db;
  • - +
  • 悬浮
    &#xe6f6;
  • - +
  • 悬浮按钮
    &#xe8e6;
  • - +
  • 右悬浮-选中
    &#xeb86;
  • - +
  • 44.tabs
    &#xe62a;
  • - +
  • 洗浴
    &#xe619;
  • - +
  • 线性图标-取消下钻
    &#xe973;
  • - +
  • 线性图标-取消下钻
    &#xe6ed;
  • - +
  • 联动
    &#xe6f7;
  • - +
  • 下钻
    &#xe613;
  • - +
  • 上钻
    &#xe61f;
  • - +
  • 取消联动
    &#xe637;
  • - +
  • edit-2
    &#xe604;
  • - +
  • edit-2
    &#xe612;
  • - +
  • 详情
    &#xe706;
  • - +
  • 弧形框
    &#xe603;
  • - +
  • 弧形框
    &#xe602;
  • - +
  • 透明
    &#xe642;
  • - +
  • 弧度
    &#xe61a;
  • - +
  • 放大
    &#xe62d;
  • - +
  • 设 置
    &#xe696;
  • - +
  • 屏幕_全屏
    &#xe655;
  • - +
  • font-weight-bold
    &#xe659;
  • - +
  • letter_spacing
    &#xe601;
  • - +
  • letter-spacing
    &#xe679;
  • - +
  • 字体颜色
    &#xe60e;
  • - +
  • format_letter_spacing_2
    &#xe6c3;
  • - +
  • font_size
    &#xe710;
  • - +
  • 居中
    &#xe972;
  • - +
  • 居右
    &#xe608;
  • - +
  • 居左
    &#xe688;
  • - +
  • 实线
    &#xe64a;
  • - +
  • 画笔
    &#xe640;
  • - +
  • 点线
    &#xe614;
  • - +
  • 虚线
    &#xe617;
  • - +
  • 背景色‘
    &#xe600;
  • - +
  • 矩形
    &#xe648;
  • - +
  • text
    &#xe959;
  • - +
  • picture
    &#xe643;
  • - +
  • 输入
    &#xe6ab;
  • - +
  • &#xe628;
  • - +
  • 查询搜索
    &#xe615;
  • - +
  • 季度
    &#xe624;
  • - +
  • 数字顺序
    &#xe7de;
  • - +
  • 树列表
    &#xe6a6;
  • - +
  • 日期
    &#xe639;
  • - +
  • 左侧-区间
    &#xe6dd;
  • - +
  • 列表
    &#xe66f;
  • - +
  • 下拉框
    &#xe8ca;
  • - +
  • 下拉树
    &#xe8d0;
  • - +
  • 重置
    &#xe611;
  • - +
  • &#xe691;
  • - +
  • &#xe692;
  • - +
  • &#xe695;
  • - +

Unicode 引用

@@ -798,9 +804,9 @@
@font-face {
   font-family: 'iconfont';
-  src: url('iconfont.woff2?t=1668397590143') format('woff2'),
-       url('iconfont.woff?t=1668397590143') format('woff'),
-       url('iconfont.ttf?t=1668397590143') format('truetype');
+  src: url('iconfont.woff2?t=1669087400468') format('woff2'),
+       url('iconfont.woff?t=1669087400468') format('woff'),
+       url('iconfont.ttf?t=1669087400468') format('truetype');
 }
 

第二步:定义使用 iconfont 的样式

@@ -825,7 +831,16 @@
    - + +
  • + +
    + font +
    +
    .icon-font +
    +
  • +
  • @@ -834,7 +849,7 @@
    .icon-WATERMARK
  • - +
  • @@ -843,7 +858,7 @@
    .icon-layer
  • - +
  • @@ -852,7 +867,7 @@
    .icon-application
  • - +
  • @@ -861,7 +876,7 @@
    .icon-datasource-select
  • - +
  • @@ -870,7 +885,7 @@
    .icon-zhongzhi2
  • - +
  • @@ -879,7 +894,7 @@
    .icon-None_Select
  • - +
  • @@ -888,7 +903,7 @@
    .icon-button_right
  • - +
  • @@ -897,7 +912,7 @@
    .icon-icon-maybe
  • - +
  • @@ -906,7 +921,7 @@
    .icon-icon_up-left_outlined
  • - +
  • @@ -915,7 +930,7 @@
    .icon-close
  • - +
  • @@ -924,7 +939,7 @@
    .icon-a-Frame3425
  • - +
  • @@ -933,7 +948,7 @@
    .icon-icon-filter
  • - +
  • @@ -942,7 +957,7 @@
    .icon-icon_Batch_outlined
  • - +
  • @@ -951,7 +966,7 @@
    .icon-icon_clear_outlined
  • - +
  • @@ -960,7 +975,7 @@
    .icon-icon_dialpad_outlined
  • - +
  • @@ -969,7 +984,7 @@
    .icon-icon_effects_outlined
  • - +
  • @@ -978,7 +993,7 @@
    .icon-icon_magnify_outlined
  • - +
  • @@ -987,7 +1002,7 @@
    .icon-icon_moments-categories_outlined
  • - +
  • @@ -996,7 +1011,7 @@
    .icon-icon_pc_outlined
  • - +
  • @@ -1005,7 +1020,7 @@
    .icon-icon_phone_outlined
  • - +
  • @@ -1014,7 +1029,7 @@
    .icon-icon_redo_outlined
  • - +
  • @@ -1023,7 +1038,7 @@
    .icon-icon_undo_outlined
  • - +
  • @@ -1032,7 +1047,7 @@
    .icon-icon-more
  • - +
  • @@ -1041,7 +1056,7 @@
    .icon-icon-quicksetting
  • - +
  • @@ -1050,7 +1065,7 @@
    .icon-square-selected
  • - +
  • @@ -1059,7 +1074,7 @@
    .icon-italic
  • - +
  • @@ -1068,7 +1083,7 @@
    .icon-jiantou
  • - +
  • @@ -1077,7 +1092,7 @@
    .icon-magic-line
  • - +
  • @@ -1086,7 +1101,7 @@
    .icon-gengduo
  • - +
  • @@ -1095,7 +1110,7 @@
    .icon-qingkong
  • - +
  • @@ -1104,7 +1119,7 @@
    .icon-chakan
  • - +
  • @@ -1113,7 +1128,7 @@
    .icon-outline-redo
  • - +
  • @@ -1122,7 +1137,7 @@
    .icon-outline-undo
  • - +
  • @@ -1131,7 +1146,7 @@
    .icon-dingwei
  • - +
  • @@ -1140,7 +1155,7 @@
    .icon-fuwenbenkuang
  • - +
  • @@ -1149,7 +1164,7 @@
    .icon-unpublish
  • - +
  • @@ -1158,7 +1173,7 @@
    .icon-publish
  • - +
  • @@ -1167,7 +1182,7 @@
    .icon-fabu
  • - +
  • @@ -1176,7 +1191,7 @@
    .icon-piliang-copy
  • - +
  • @@ -1185,7 +1200,7 @@
    .icon-tupian
  • - +
  • @@ -1194,7 +1209,7 @@
    .icon-chaolianjie1
  • - +
  • @@ -1203,7 +1218,7 @@
    .icon-com-jump
  • - +
  • @@ -1212,7 +1227,7 @@
    .icon-component-tiaozhuan
  • - +
  • @@ -1221,7 +1236,7 @@
    .icon-wangge-open
  • - +
  • @@ -1230,7 +1245,7 @@
    .icon-wangge-close
  • - +
  • @@ -1239,7 +1254,7 @@
    .icon-a-liumeitimeitiliebiao
  • - +
  • @@ -1248,7 +1263,7 @@
    .icon-iframe
  • - +
  • @@ -1257,7 +1272,7 @@
    .icon-canshu
  • - +
  • @@ -1266,7 +1281,7 @@
    .icon-genghuan
  • - +
  • @@ -1275,7 +1290,7 @@
    .icon-fasongyoujian
  • - +
  • @@ -1284,7 +1299,7 @@
    .icon-github
  • - +
  • @@ -1293,7 +1308,7 @@
    .icon-dianhua
  • - +
  • @@ -1302,7 +1317,7 @@
    .icon-guanbi
  • - +
  • @@ -1311,7 +1326,7 @@
    .icon-juxing1
  • - +
  • @@ -1320,7 +1335,7 @@
    .icon-yidongduan
  • - +
  • @@ -1329,7 +1344,7 @@
    .icon-video
  • - +
  • @@ -1338,7 +1353,7 @@
    .icon-xuanfuanniufadongtai
  • - +
  • @@ -1347,7 +1362,7 @@
    .icon-xifuxuanze
  • - +
  • @@ -1356,7 +1371,7 @@
    .icon-margin
  • - +
  • @@ -1365,7 +1380,7 @@
    .icon-padding
  • - +
  • @@ -1374,7 +1389,7 @@
    .icon-shijian
  • - +
  • @@ -1383,7 +1398,7 @@
    .icon-shijiangeshizhuanhuan
  • - +
  • @@ -1392,7 +1407,7 @@
    .icon-chaolianjie
  • - +
  • @@ -1401,7 +1416,7 @@
    .icon-kexuejishu
  • - +
  • @@ -1410,7 +1425,7 @@
    .icon-shujujuzhen
  • - +
  • @@ -1419,7 +1434,7 @@
    .icon-shitujuzhen_o
  • - +
  • @@ -1428,7 +1443,7 @@
    .icon-xuanfu1
  • - +
  • @@ -1437,7 +1452,7 @@
    .icon-youxuanfu-copy
  • - +
  • @@ -1446,7 +1461,7 @@
    .icon-xuanfu
  • - +
  • @@ -1455,7 +1470,7 @@
    .icon-xuanfuanniu
  • - +
  • @@ -1464,7 +1479,7 @@
    .icon-youxuanfu-copy-copy
  • - +
  • @@ -1473,7 +1488,7 @@
    .icon-tabs
  • - +
  • @@ -1482,7 +1497,7 @@
    .icon-xiyu
  • - +
  • @@ -1491,7 +1506,7 @@
    .icon-quxiaoshangzuan
  • - +
  • @@ -1500,7 +1515,7 @@
    .icon-quxiaoxiazuan
  • - +
  • @@ -1509,7 +1524,7 @@
    .icon-linkage
  • - +
  • @@ -1518,7 +1533,7 @@
    .icon-xiazuan
  • - +
  • @@ -1527,7 +1542,7 @@
    .icon-shangzuan
  • - +
  • @@ -1536,7 +1551,7 @@
    .icon-quxiaoliandong
  • - +
  • @@ -1545,7 +1560,7 @@
    .icon-edit-outline
  • - +
  • @@ -1554,7 +1569,7 @@
    .icon-edit
  • - +
  • @@ -1563,7 +1578,7 @@
    .icon-xiangqing1
  • - +
  • @@ -1572,7 +1587,7 @@
    .icon-weibiaoti-1
  • - +
  • @@ -1581,7 +1596,7 @@
    .icon-weibiaoti-
  • - +
  • @@ -1590,7 +1605,7 @@
    .icon-touming
  • - +
  • @@ -1599,7 +1614,7 @@
    .icon-fangxing-
  • - +
  • @@ -1608,7 +1623,7 @@
    .icon-fangda
  • - +
  • @@ -1617,7 +1632,7 @@
    .icon-shezhi
  • - +
  • @@ -1626,7 +1641,7 @@
    .icon-quanping1
  • - +
  • @@ -1635,7 +1650,7 @@
    .icon-font-weight-bold
  • - +
  • @@ -1644,7 +1659,7 @@
    .icon-letter_spacing
  • - +
  • @@ -1653,7 +1668,7 @@
    .icon-letter-spacing
  • - +
  • @@ -1662,7 +1677,7 @@
    .icon-zimua
  • - +
  • @@ -1671,7 +1686,7 @@
    .icon-format_letter_spacing_
  • - +
  • @@ -1680,7 +1695,7 @@
    .icon-font_size
  • - +
  • @@ -1689,7 +1704,7 @@
    .icon-align-center
  • - +
  • @@ -1698,7 +1713,7 @@
    .icon-juyou
  • - +
  • @@ -1707,7 +1722,7 @@
    .icon-juzuo
  • - +
  • @@ -1716,7 +1731,7 @@
    .icon-solid_line
  • - +
  • @@ -1725,7 +1740,7 @@
    .icon-huabi
  • - +
  • @@ -1734,7 +1749,7 @@
    .icon-dianxian
  • - +
  • @@ -1743,7 +1758,7 @@
    .icon-xuxian
  • - +
  • @@ -1752,7 +1767,7 @@
    .icon-beijingse1
  • - +
  • @@ -1761,7 +1776,7 @@
    .icon-juxing
  • - +
  • @@ -1770,7 +1785,7 @@
    .icon-text
  • - +
  • @@ -1779,7 +1794,7 @@
    .icon-picture
  • - +
  • @@ -1788,7 +1803,7 @@
    .icon-shuru
  • - +
  • @@ -1797,7 +1812,7 @@
    .icon-tree
  • - +
  • @@ -1806,7 +1821,7 @@
    .icon-chaxunsousuo
  • - +
  • @@ -1815,7 +1830,7 @@
    .icon-jidu
  • - +
  • @@ -1824,7 +1839,7 @@
    .icon-shuzishunxu
  • - +
  • @@ -1833,7 +1848,7 @@
    .icon-Group-
  • - +
  • @@ -1842,7 +1857,7 @@
    .icon-riqi
  • - +
  • @@ -1851,7 +1866,7 @@
    .icon-zuoce-qujian
  • - +
  • @@ -1860,7 +1875,7 @@
    .icon-liebiao
  • - +
  • @@ -1869,7 +1884,7 @@
    .icon-xialakuang
  • - +
  • @@ -1878,7 +1893,7 @@
    .icon-xialashu
  • - +
  • @@ -1887,7 +1902,7 @@
    .icon-zhongzhi
  • - +
  • @@ -1896,7 +1911,7 @@
    .icon-ri
  • - +
  • @@ -1905,7 +1920,7 @@
    .icon-nian
  • - +
  • @@ -1914,7 +1929,7 @@
    .icon-yue
  • - +

font-class 引用

@@ -1941,7 +1956,15 @@
    - + +
  • + +
    font
    +
    #icon-font
    +
  • +
  • WATERMARK
    #icon-WATERMARK
  • - +
  • 图层
    #icon-layer
  • - +
  • application
    #icon-application
  • - +
  • data-source-24
    #icon-datasource-select
  • - +
  • 重置
    #icon-zhongzhi2
  • - +
  • None_Select
    #icon-None_Select
  • - +
  • button_right
    #icon-button_right
  • - +
  • icon-maybe
    #icon-icon-maybe
  • - +
  • icon_up-left_outlined
    #icon-icon_up-left_outlined
  • - +
  • close
    #icon-close
  • - +
  • Frame 3425
    #icon-a-Frame3425
  • - +
  • icon-filter
    #icon-icon-filter
  • - +
  • icon_Batch_outlined
    #icon-icon_Batch_outlined
  • - +
  • icon_clear_outlined
    #icon-icon_clear_outlined
  • - +
  • icon_dialpad_outlined
    #icon-icon_dialpad_outlined
  • - +
  • icon_effects_outlined
    #icon-icon_effects_outlined
  • - +
  • icon_magnify_outlined
    #icon-icon_magnify_outlined
  • - +
  • icon_moments-categories_outlined
    #icon-icon_moments-categories_outlined
  • - +
  • icon_pc_outlined
    #icon-icon_pc_outlined
  • - +
  • icon_phone_outlined
    #icon-icon_phone_outlined
  • - +
  • icon_redo_outlined
    #icon-icon_redo_outlined
  • - +
  • icon_undo_outlined
    #icon-icon_undo_outlined
  • - +
  • icon-more
    #icon-icon-more
  • - +
  • icon-quicksetting
    #icon-icon-quicksetting
  • - +
  • square-selected
    #icon-square-selected
  • - +
  • italic
    #icon-italic
  • - +
  • 箭头
    #icon-jiantou
  • - +
  • magic-line
    #icon-magic-line
  • - +
  • 更多
    #icon-gengduo
  • - +
  • 清空
    #icon-qingkong
  • - +
  • 查看
    #icon-chakan
  • - +
  • outline-redo
    #icon-outline-redo
  • - +
  • outline-undo
    #icon-outline-undo
  • - +
  • 定位
    #icon-dingwei
  • - +
  • 富文本框
    #icon-fuwenbenkuang
  • - +
  • 下架
    #icon-unpublish
  • - +
  • 上架
    #icon-publish
  • - +
  • 发布
    #icon-fabu
  • - +
  • 批量操作
    #icon-piliang-copy
  • - +
  • 图片
    #icon-tupian
  • - +
  • 超链接
    #icon-chaolianjie1
  • - +
  • 跳转
    #icon-com-jump
  • - +
  • 跳转
    #icon-component-tiaozhuan
  • - +
  • 网格\表格
    #icon-wangge-open
  • - +
  • 关闭网格
    #icon-wangge-close
  • - +
  • 流媒体,媒体列表
    #icon-a-liumeitimeitiliebiao
  • - +
  • iframe
    #icon-iframe
  • - +
  • 参数
    #icon-canshu
  • - +
  • 更换
    #icon-genghuan
  • - +
  • 发送邮件
    #icon-fasongyoujian
  • - +
  • github
    #icon-github
  • - +
  • 电话
    #icon-dianhua
  • - +
  • 关闭
    #icon-guanbi
  • - +
  • 矩形
    #icon-juxing1
  • - +
  • 移动端
    #icon-yidongduan
  • - +
  • video
    #icon-video
  • - +
  • 悬浮按钮发动态
    #icon-xuanfuanniufadongtai
  • - +
  • 吸附选择
    #icon-xifuxuanze
  • - +
  • margin
    #icon-margin
  • - +
  • padding
    #icon-padding
  • - +
  • 时间
    #icon-shijian
  • - +
  • 时间格式转换
    #icon-shijiangeshizhuanhuan
  • - +
  • 超链接
    #icon-chaolianjie
  • - +
  • 科学技术
    #icon-kexuejishu
  • - +
  • 符号-数据矩阵
    #icon-shujujuzhen
  • - +
  • 视图矩阵_o
    #icon-shitujuzhen_o
  • - +
  • 悬浮
    #icon-xuanfu1
  • - +
  • 右悬浮-选中
    #icon-youxuanfu-copy
  • - +
  • 悬浮
    #icon-xuanfu
  • - +
  • 悬浮按钮
    #icon-xuanfuanniu
  • - +
  • 右悬浮-选中
    #icon-youxuanfu-copy-copy
  • - +
  • 44.tabs
    #icon-tabs
  • - +
  • 洗浴
    #icon-xiyu
  • - +
  • 线性图标-取消下钻
    #icon-quxiaoshangzuan
  • - +
  • 线性图标-取消下钻
    #icon-quxiaoxiazuan
  • - +
  • 联动
    #icon-linkage
  • - +
  • 下钻
    #icon-xiazuan
  • - +
  • 上钻
    #icon-shangzuan
  • - +
  • 取消联动
    #icon-quxiaoliandong
  • - +
  • edit-2
    #icon-edit-outline
  • - +
  • edit-2
    #icon-edit
  • - +
  • 详情
    #icon-xiangqing1
  • - +
  • 弧形框
    #icon-weibiaoti-1
  • - +
  • 弧形框
    #icon-weibiaoti-
  • - +
  • 透明
    #icon-touming
  • - +
  • 弧度
    #icon-fangxing-
  • - +
  • 放大
    #icon-fangda
  • - +
  • 设 置
    #icon-shezhi
  • - +
  • 屏幕_全屏
    #icon-quanping1
  • - +
  • font-weight-bold
    #icon-font-weight-bold
  • - +
  • letter_spacing
    #icon-letter_spacing
  • - +
  • letter-spacing
    #icon-letter-spacing
  • - +
  • 字体颜色
    #icon-zimua
  • - +
  • format_letter_spacing_2
    #icon-format_letter_spacing_
  • - +
  • font_size
    #icon-font_size
  • - +
  • 居中
    #icon-align-center
  • - +
  • 居右
    #icon-juyou
  • - +
  • 居左
    #icon-juzuo
  • - +
  • 实线
    #icon-solid_line
  • - +
  • 画笔
    #icon-huabi
  • - +
  • 点线
    #icon-dianxian
  • - +
  • 虚线
    #icon-xuxian
  • - +
  • 背景色‘
    #icon-beijingse1
  • - +
  • 矩形
    #icon-juxing
  • - +
  • text
    #icon-text
  • - +
  • picture
    #icon-picture
  • - +
  • 输入
    #icon-shuru
  • - +
  • #icon-tree
  • - +
  • 查询搜索
    #icon-chaxunsousuo
  • - +
  • 季度
    #icon-jidu
  • - +
  • 数字顺序
    #icon-shuzishunxu
  • - +
  • 树列表
    #icon-Group-
  • - +
  • 日期
    #icon-riqi
  • - +
  • 左侧-区间
    #icon-zuoce-qujian
  • - +
  • 列表
    #icon-liebiao
  • - +
  • 下拉框
    #icon-xialakuang
  • - +
  • 下拉树
    #icon-xialashu
  • - +
  • 重置
    #icon-zhongzhi
  • - +
  • #icon-ri
  • - +
  • #icon-nian
  • - +
  • #icon-yue
  • - +

Symbol 引用

diff --git a/frontend/src/styles/deicon/iconfont.css b/frontend/src/styles/deicon/iconfont.css index 4602023a5f..417e999b4a 100644 --- a/frontend/src/styles/deicon/iconfont.css +++ b/frontend/src/styles/deicon/iconfont.css @@ -1,8 +1,8 @@ @font-face { font-family: "iconfont"; /* Project id 2459092 */ - src: url('iconfont.woff2?t=1668397590143') format('woff2'), - url('iconfont.woff?t=1668397590143') format('woff'), - url('iconfont.ttf?t=1668397590143') format('truetype'); + src: url('iconfont.woff2?t=1669087400468') format('woff2'), + url('iconfont.woff?t=1669087400468') format('woff'), + url('iconfont.ttf?t=1669087400468') format('truetype'); } .iconfont { @@ -13,6 +13,10 @@ -moz-osx-font-smoothing: grayscale; } +.icon-font:before { + content: "\e63d"; +} + .icon-WATERMARK:before { content: "\ea16"; } diff --git a/frontend/src/styles/deicon/iconfont.js b/frontend/src/styles/deicon/iconfont.js index 3e8e62d958..6af6d673df 100644 --- a/frontend/src/styles/deicon/iconfont.js +++ b/frontend/src/styles/deicon/iconfont.js @@ -1 +1 @@ -window._iconfont_svg_string_2459092='',function(a){var l=(l=document.getElementsByTagName("script"))[l.length-1],c=l.getAttribute("data-injectcss"),l=l.getAttribute("data-disable-injectsvg");if(!l){var h,i,t,v,o,z=function(l,c){c.parentNode.insertBefore(l,c)};if(c&&!a.__iconfont__svg__cssinject__){a.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(l){console&&console.log(l)}}h=function(){var l,c=document.createElement("div");c.innerHTML=a._iconfont_svg_string_2459092,(c=c.getElementsByTagName("svg")[0])&&(c.setAttribute("aria-hidden","true"),c.style.position="absolute",c.style.width=0,c.style.height=0,c.style.overflow="hidden",c=c,(l=document.body).firstChild?z(c,l.firstChild):l.appendChild(c))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(h,0):(i=function(){document.removeEventListener("DOMContentLoaded",i,!1),h()},document.addEventListener("DOMContentLoaded",i,!1)):document.attachEvent&&(t=h,v=a.document,o=!1,p(),v.onreadystatechange=function(){"complete"==v.readyState&&(v.onreadystatechange=null,m())})}function m(){o||(o=!0,t())}function p(){try{v.documentElement.doScroll("left")}catch(l){return void setTimeout(p,50)}m()}}(window); +window._iconfont_svg_string_2459092='',function(a){var l=(l=document.getElementsByTagName("script"))[l.length-1],c=l.getAttribute("data-injectcss"),l=l.getAttribute("data-disable-injectsvg");if(!l){var h,i,t,v,o,z=function(l,c){c.parentNode.insertBefore(l,c)};if(c&&!a.__iconfont__svg__cssinject__){a.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(l){console&&console.log(l)}}h=function(){var l,c=document.createElement("div");c.innerHTML=a._iconfont_svg_string_2459092,(c=c.getElementsByTagName("svg")[0])&&(c.setAttribute("aria-hidden","true"),c.style.position="absolute",c.style.width=0,c.style.height=0,c.style.overflow="hidden",c=c,(l=document.body).firstChild?z(c,l.firstChild):l.appendChild(c))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(h,0):(i=function(){document.removeEventListener("DOMContentLoaded",i,!1),h()},document.addEventListener("DOMContentLoaded",i,!1)):document.attachEvent&&(t=h,v=a.document,o=!1,p(),v.onreadystatechange=function(){"complete"==v.readyState&&(v.onreadystatechange=null,m())})}function m(){o||(o=!0,t())}function p(){try{v.documentElement.doScroll("left")}catch(l){return void setTimeout(p,50)}m()}}(window); \ No newline at end of file diff --git a/frontend/src/styles/deicon/iconfont.json b/frontend/src/styles/deicon/iconfont.json index b3a60559df..c192e40599 100644 --- a/frontend/src/styles/deicon/iconfont.json +++ b/frontend/src/styles/deicon/iconfont.json @@ -5,6 +5,13 @@ "css_prefix_text": "icon-", "description": "", "glyphs": [ + { + "icon_id": "109745", + "name": "font", + "font_class": "font", + "unicode": "e63d", + "unicode_decimal": 58941 + }, { "icon_id": "23072499", "name": "WATERMARK", diff --git a/frontend/src/styles/deicon/iconfont.ttf b/frontend/src/styles/deicon/iconfont.ttf index 250300b27e..9cbbe7f95b 100644 Binary files a/frontend/src/styles/deicon/iconfont.ttf and b/frontend/src/styles/deicon/iconfont.ttf differ diff --git a/frontend/src/styles/deicon/iconfont.woff b/frontend/src/styles/deicon/iconfont.woff index 6dfe2b312d..47cb972f4b 100644 Binary files a/frontend/src/styles/deicon/iconfont.woff and b/frontend/src/styles/deicon/iconfont.woff differ diff --git a/frontend/src/styles/deicon/iconfont.woff2 b/frontend/src/styles/deicon/iconfont.woff2 index 2952bdbe04..d660c1dd62 100644 Binary files a/frontend/src/styles/deicon/iconfont.woff2 and b/frontend/src/styles/deicon/iconfont.woff2 differ diff --git a/frontend/src/views/chart/chart/bar/bar_antv.js b/frontend/src/views/chart/chart/bar/bar_antv.js index 8a95f15dd8..b799ec2517 100644 --- a/frontend/src/views/chart/chart/bar/bar_antv.js +++ b/frontend/src/views/chart/chart/bar/bar_antv.js @@ -103,6 +103,11 @@ export function baseBarOptionAntV(plot, container, chart, action, isGroup, isSta options.isPercent = chart.type === 'percentage-bar-stack' // custom color options.color = antVCustomColor(chart) + if (customAttr.color.gradient) { + options.color = options.color.map((ele) => { + return `l(270) 0:#ffffff00 1:${ele}` + }) + } // 开始渲染 if (plot) { @@ -199,6 +204,11 @@ export function hBaseBarOptionAntV(plot, container, chart, action, isGroup, isSt } // custom color options.color = antVCustomColor(chart) + if (customAttr.color.gradient) { + options.color = options.color.map((ele) => { + return `l(0) 0:#ffffff00 1:${ele}` + }) + } // 开始渲染 if (plot) { diff --git a/frontend/src/views/chart/chart/chart.js b/frontend/src/views/chart/chart/chart.js index cd0cfa5b05..1ec2129aa4 100644 --- a/frontend/src/views/chart/chart/chart.js +++ b/frontend/src/views/chart/chart/chart.js @@ -28,6 +28,7 @@ export const DEFAULT_COLOR_CASE = { tableBorderColor: '#E6E7E4', seriesColors: [], // 格式:{"name":"s1","color":"","isCustom":false} areaBorderColor: '#303133', + gradient: false, areaBaseColor: '#FFFFFF', tableScrollBarColor: 'rgba(0, 0, 0, 0.15)', tableScrollBarHoverColor: 'rgba(0, 0, 0, 0.4)' diff --git a/frontend/src/views/chart/chart/gauge/gauge_antv.js b/frontend/src/views/chart/chart/gauge/gauge_antv.js index 86473dab33..b4b3844d6e 100644 --- a/frontend/src/views/chart/chart/gauge/gauge_antv.js +++ b/frontend/src/views/chart/chart/gauge/gauge_antv.js @@ -124,6 +124,7 @@ export function baseGaugeOptionAntV(plot, container, chart, action, scale = 1) { } } } + if (hasThreshold) { options.range = { color: theme.styleSheet.paletteQualitative10, @@ -152,6 +153,17 @@ export function baseGaugeOptionAntV(plot, container, chart, action, scale = 1) { } } + if (customAttr.color.gradient) { + const colorList = (theme.styleSheet?.paletteQualitative10 || []).map((ele) => `l(0) 0:#ffffff00 1:${ele}`) + if (!options.range) { + options.range = { + color: colorList + } + } else { + options.range.color = colorList + } + } + // 开始渲染 if (plot) { plot.destroy() diff --git a/frontend/src/views/chart/chart/line/line_antv.js b/frontend/src/views/chart/chart/line/line_antv.js index 4616c7e695..d1a9c93948 100644 --- a/frontend/src/views/chart/chart/line/line_antv.js +++ b/frontend/src/views/chart/chart/line/line_antv.js @@ -180,6 +180,17 @@ export function baseAreaOptionAntV(plot, container, chart, action, isStack) { } // custom color options.color = antVCustomColor(chart) + const areaColors = [...options.color, ...options.color] + if (customAttr.color.gradient) { + options.areaStyle = () => { + const cr = areaColors.shift() + if (cr) { + return { + fill: `l(270) 0:#ffffff00 1:${cr}` + } + } + } + } // 开始渲染 if (plot) { diff --git a/frontend/src/views/chart/chart/pie/pie_antv.js b/frontend/src/views/chart/chart/pie/pie_antv.js index 00fbb8ba81..b3ad13f44a 100644 --- a/frontend/src/views/chart/chart/pie/pie_antv.js +++ b/frontend/src/views/chart/chart/pie/pie_antv.js @@ -82,6 +82,12 @@ export function basePieOptionAntV(plot, container, chart, action) { // custom color options.color = antVCustomColor(chart) + if (customAttr.color.gradient) { + options.color = options.color.map((ele) => { + return `l(270) 0:#ffffff00 1:${ele}` + }) + } + // 开始渲染 if (plot) { plot.destroy() @@ -159,6 +165,12 @@ export function basePieRoseOptionAntV(plot, container, chart, action) { // custom color options.color = antVCustomColor(chart) + if (customAttr.color.gradient) { + options.color = options.color.map((ele) => { + return `l(270) 0:#ffffff00 1:${ele}` + }) + } + // 开始渲染 if (plot) { plot.destroy() diff --git a/frontend/src/views/chart/chart/table/table-info.js b/frontend/src/views/chart/chart/table/table-info.js index 976215d370..63f044588f 100644 --- a/frontend/src/views/chart/chart/table/table-info.js +++ b/frontend/src/views/chart/chart/table/table-info.js @@ -424,7 +424,7 @@ export function baseTablePivot(s2, container, chart, action, tableData) { // 解析合计、小计排序 const sortParams = [] - if (totalCfg.row.totalSort && totalCfg.row.totalSort !== 'none' && c.length > 0) { + if (totalCfg.row.totalSort && totalCfg.row.totalSort !== 'none' && c.length > 0 && totalCfg.row.showGrandTotals && v.indexOf(totalCfg.row.totalSortField) > -1) { const sort = { sortFieldId: c[0], sortMethod: totalCfg.row.totalSort.toUpperCase(), @@ -435,7 +435,8 @@ export function baseTablePivot(s2, container, chart, action, tableData) { } sortParams.push(sort) } - if (totalCfg.col.totalSort && totalCfg.col.totalSort !== 'none' && r.length > 0) { + totalCfg.col.totalSort = false + if (totalCfg.col.totalSort && totalCfg.col.totalSort !== 'none' && r.length > 0 && totalCfg.col.showGrandTotals && v.indexOf(totalCfg.col.totalSortField) > -1) { const sort = { sortFieldId: r[0], sortMethod: totalCfg.col.totalSort.toUpperCase(), diff --git a/frontend/src/views/chart/chart/util.js b/frontend/src/views/chart/chart/util.js index 20889f0c7b..5e04f41dc9 100644 --- a/frontend/src/views/chart/chart/util.js +++ b/frontend/src/views/chart/chart/util.js @@ -284,6 +284,7 @@ export const TYPE_CONFIGS = [ 'color-selector': [ 'value', 'custom', + 'gradient', 'alpha' ], 'size-selector-ant-v': [ @@ -468,7 +469,8 @@ export const TYPE_CONFIGS = [ 'value', 'colorPanel', 'customColor', - 'alpha' + 'alpha', + 'gradient' ], 'size-selector-ant-v': [ 'lineWidth', @@ -628,6 +630,7 @@ export const TYPE_CONFIGS = [ 'value', 'colorPanel', 'customColor', + 'gradient', 'alpha' ], 'size-selector-ant-v': [ @@ -707,6 +710,7 @@ export const TYPE_CONFIGS = [ 'value', 'colorPanel', 'customColor', + 'gradient', 'alpha' ], 'size-selector-ant-v': [ @@ -786,6 +790,7 @@ export const TYPE_CONFIGS = [ 'value', 'colorPanel', 'customColor', + 'gradient', 'alpha' ], 'size-selector-ant-v': [ @@ -865,6 +870,7 @@ export const TYPE_CONFIGS = [ 'value', 'colorPanel', 'customColor', + 'gradient', 'alpha' ], 'size-selector-ant-v': [ @@ -1008,6 +1014,7 @@ export const TYPE_CONFIGS = [ 'value', 'colorPanel', 'customColor', + 'gradient', 'alpha' ], 'size-selector-ant-v': [ @@ -1087,6 +1094,7 @@ export const TYPE_CONFIGS = [ 'value', 'colorPanel', 'customColor', + 'gradient', 'alpha' ], 'size-selector-ant-v': [ @@ -1164,6 +1172,7 @@ export const TYPE_CONFIGS = [ 'value', 'colorPanel', 'customColor', + 'gradient', 'alpha' ], 'size-selector-ant-v': [ @@ -1223,6 +1232,7 @@ export const TYPE_CONFIGS = [ 'value', 'colorPanel', 'customColor', + 'gradient', 'alpha' ], 'size-selector-ant-v': [ @@ -1283,6 +1293,7 @@ export const TYPE_CONFIGS = [ 'value', 'colorPanel', 'customColor', + 'gradient', 'alpha' ], 'size-selector-ant-v': [ @@ -1340,6 +1351,7 @@ export const TYPE_CONFIGS = [ 'value', 'colorPanel', 'customColor', + 'gradient', 'alpha' ], 'size-selector-ant-v': [ @@ -1400,6 +1412,7 @@ export const TYPE_CONFIGS = [ 'value', 'colorPanel', 'customColor', + 'gradient', 'alpha' ], 'size-selector-ant-v': [ diff --git a/frontend/src/views/chart/components/ChartComponentS2.vue b/frontend/src/views/chart/components/ChartComponentS2.vue index 45a26c20f4..d8e0a556c2 100644 --- a/frontend/src/views/chart/components/ChartComponentS2.vue +++ b/frontend/src/views/chart/components/ChartComponentS2.vue @@ -55,25 +55,32 @@ /> - - {{ $t('chart.total') }} - {{ chart.datasetMode === 0 ? chart.totalItems : ((chart.data && chart.data.tableRow) ? chart.data.tableRow.length : 0) }} - {{ $t('chart.items') }} - - + + + {{ $t('chart.total') }} + {{ + chart.datasetMode === 0 ? chart.totalItems : ((chart.data && chart.data.tableRow) ? chart.data.tableRow.length : 0) + }} + {{ $t('chart.items') }} + + +
@@ -87,6 +94,7 @@ import { baseTableInfo, baseTableNormal, baseTablePivot } from '@/views/chart/ch import TitleRemark from '@/views/chart/view/TitleRemark' import { DEFAULT_TITLE_STYLE } from '@/views/chart/chart/chart' import ChartTitleUpdate from './ChartTitleUpdate.vue' +import { mapState } from 'vuex' export default { name: 'ChartComponentS2', @@ -162,6 +170,18 @@ export default { }, computed: { + scale() { + return this.previewCanvasScale.scalePointWidth + }, + autoStyle() { + return { + height: (100 / this.scale) + '%!important', + width: (100 / this.scale) + '%!important', + left: 50 * (1 - 1 / this.scale) + '%', // 放大余量 除以 2 + top: 50 * (1 - 1 / this.scale) + '%', // 放大余量 除以 2 + transform: 'scale(' + this.scale + ')' + } + }, trackBarStyleTime() { return this.trackBarStyle }, @@ -173,7 +193,10 @@ export default { chartInfo() { const { id, title } = this.chart return { id, title } - } + }, + ...mapState([ + 'previewCanvasScale' + ]) }, watch: { chart: { diff --git a/frontend/src/views/chart/components/shapeAttr/ColorSelector.vue b/frontend/src/views/chart/components/shapeAttr/ColorSelector.vue index 4dbebc5b80..3390f8b5ef 100644 --- a/frontend/src/views/chart/components/shapeAttr/ColorSelector.vue +++ b/frontend/src/views/chart/components/shapeAttr/ColorSelector.vue @@ -151,6 +151,17 @@ + + + + @@ -239,7 +239,7 @@ @@ -422,12 +422,15 @@ export default { this.totalSortFields = JSON.parse(chart.yaxis) } if (this.totalSortFields.length > 0) { - if (this.totalForm.row.totalSortField === '') { + if (this.resetTotalSort(this.totalForm.row.totalSortField)) { this.totalForm.row.totalSortField = this.totalSortFields[0].dataeaseName } - if (this.totalForm.col.totalSortField === '') { + if (this.resetTotalSort(this.totalForm.col.totalSortField)) { this.totalForm.col.totalSortField = this.totalSortFields[0].dataeaseName } + } else { + this.totalForm.row.totalSortField = '' + this.totalForm.col.totalSortField = '' } } }, @@ -437,6 +440,16 @@ export default { }, showProperty(property) { return this.propertyInner.includes(property) + }, + resetTotalSort(field) { + if (field === '') { + return true + } + const sortFieldList = [] + this.totalSortFields.forEach(ele => { + sortFieldList.push(ele.dataeaseName) + }) + return sortFieldList.indexOf(field) === -1 } } } diff --git a/frontend/src/views/chart/components/table/TableNormal.vue b/frontend/src/views/chart/components/table/TableNormal.vue index 4bdabdf37b..c67a5b74ac 100644 --- a/frontend/src/views/chart/components/table/TableNormal.vue +++ b/frontend/src/views/chart/components/table/TableNormal.vue @@ -44,23 +44,33 @@ v-show="showPage" class="table-page" > - - {{ $t('chart.total') }} - {{ chart.datasetMode === 0 ? chart.totalItems : ((chart.data && chart.data.tableRow) ? chart.data.tableRow.length : 0) }} - {{ $t('chart.items') }} - - + + + + {{ $t('chart.total') }} + {{ + chart.datasetMode === 0 ? chart.totalItems : ((chart.data && chart.data.tableRow) ? chart.data.tableRow.length : 0) + }} + {{ $t('chart.items') }} + + + + +
@@ -70,6 +80,7 @@ import { hexColorToRGBA } from '../../chart/util' import eventBus from '@/components/canvas/utils/eventBus' import { DEFAULT_COLOR_CASE, DEFAULT_SIZE } from '@/views/chart/chart/chart' +import { mapState } from 'vuex' export default { name: 'TableNormal', @@ -149,6 +160,18 @@ export default { } }, computed: { + scale() { + return this.previewCanvasScale.scalePointWidth + }, + autoStyle() { + return { + height: (100 / this.scale) + '%!important', + width: (100 / this.scale) + '%!important', + left: 50 * (1 - 1 / this.scale) + '%', // 放大余量 除以 2 + top: 50 * (1 - 1 / this.scale) + '%', // 放大余量 除以 2 + transform: 'scale(' + this.scale + ')' + } + }, bg_class() { return { background: hexColorToRGBA('#ffffff', 0), @@ -160,7 +183,10 @@ export default { width: '100%', '--scroll-bar-color': this.scrollBarColor } - } + }, + ...mapState([ + 'previewCanvasScale' + ]) }, watch: { chart: function() { @@ -482,46 +508,61 @@ export default { diff --git a/frontend/src/views/chart/view/ChartEdit.vue b/frontend/src/views/chart/view/ChartEdit.vue index 30ac660e0c..9b0b7ff39e 100644 --- a/frontend/src/views/chart/view/ChartEdit.vue +++ b/frontend/src/views/chart/view/ChartEdit.vue @@ -1655,14 +1655,12 @@ import ScrollCfg from '@/views/chart/components/senior/ScrollCfg' import ChartFieldEdit from '@/views/chart/view/ChartFieldEdit' import CalcChartFieldEdit from '@/views/chart/view/CalcChartFieldEdit' import { equalsAny } from '@/utils/StringUtils' -import MarginSelector from '@/views/chart/components/componentStyle/MarginSelector' import PositionAdjust from '@/views/chart/view/PositionAdjust' export default { name: 'ChartEdit', components: { PositionAdjust, - MarginSelector, ScrollCfg, CalcChartFieldEdit, ChartFieldEdit, diff --git a/frontend/src/views/chart/view/ChartStyleBatchSet.vue b/frontend/src/views/chart/view/ChartStyleBatchSet.vue index 3be0d4f6a2..b4209f3be6 100644 --- a/frontend/src/views/chart/view/ChartStyleBatchSet.vue +++ b/frontend/src/views/chart/view/ChartStyleBatchSet.vue @@ -27,6 +27,7 @@ @onTextChange="onTextChange" @onLegendChange="onLegendChange" @onMarginChange="onMarginChange" + @onSuspensionChange="onSuspensionChange" />
@@ -103,6 +104,9 @@ export default { onMarginChange(val) { this.batchOptChange('customStyle', 'margin', val) }, + onSuspensionChange(val) { + this.batchOptChange('customAttr', 'suspension', val) + }, batchOptChange(custom, property, value) { this.$store.commit('setChangeProperties', { 'custom': custom, diff --git a/frontend/src/views/dataset/data/FieldEdit.vue b/frontend/src/views/dataset/data/FieldEdit.vue index 6e879d8947..90591d6124 100644 --- a/frontend/src/views/dataset/data/FieldEdit.vue +++ b/frontend/src/views/dataset/data/FieldEdit.vue @@ -136,51 +136,54 @@ { + + // }, 50) + this.$nextTick(() => { + const list = document.querySelectorAll('body > .select-date-resolution-format') + const ele = list[list.length - 1] + const { top, left } = ele?.style + this.popPosition = { top: parseInt(top) - 18 + 'px', left: parseInt(left) + 181 + 'px', position: 'fixed' } + }) + }, initField() { fieldListDQ(this.param.id).then((response) => { this.tableFields = response.data @@ -825,14 +833,47 @@ export default { this.quotaChange() }) dateformats(this.param.id).then((response) => { - this.dateFormats = response.data + const children = (response?.data || []).map(ele => ({ label: ele.dateformat, value: ele.dateformat })) + children.push({ label: '自定义', value: 'custom' }) + this.dateformats = children }) }, + getFields(item) { + if(item.deExtractType == 0){ + const children = this.dateformats + return [ + { label: this.$t('dataset.text'), value: 0 }, + { label: this.$t('dataset.time'), value: 1, children }, + { label: this.$t('dataset.value'), value: 2 }, + { + label: + this.$t('dataset.value') + '(' + this.$t('dataset.float') + ')', + value: 3 + }, + { label: this.$t('dataset.location'), value: 5 } + ] + }else { + return [ + { label: this.$t('dataset.text'), value: 0 }, + { label: this.$t('dataset.time'), value: 1 }, + { label: this.$t('dataset.value'), value: 2 }, + { label: this.$t('dataset.value') + '(' + this.$t('dataset.float') + ')', value: 3 }, + { label: this.$t('dataset.location'), value: 5 } + ] + } + }, saveEdit(item) { if (item.name && item.name.length > 50) { this.$message.error(this.$t('dataset.field_name_less_50')) return } + item.deType = item.deTypeCascader[0] + if (item.deTypeCascader.length === 2) { // 时间 + item.dateFormatType = item.deTypeCascader[1] + if(item.dateFormatType !== 'custom'){ + item.dateFormat = item.dateFormatType + } + } post('/dataset/field/save', item) .then((response) => { @@ -1153,3 +1194,16 @@ span { border-bottom: 0 solid #e6ebf5 !important; } + + diff --git a/frontend/src/views/dataset/data/UpdateInfo.vue b/frontend/src/views/dataset/data/UpdateInfo.vue index 981051a2e1..a44ebedf1f 100644 --- a/frontend/src/views/dataset/data/UpdateInfo.vue +++ b/frontend/src/views/dataset/data/UpdateInfo.vue @@ -162,7 +162,7 @@ class="de-card-dropdown" >