forked from github/dataease
Merge branch 'dev' into pr@dev@feat_table_scroll_bar_color
# Conflicts: # frontend/src/views/chart/chart/chart.js # frontend/src/views/chart/components/table/TableNormal.vue
This commit is contained in:
commit
2f50d4120f
@ -125,12 +125,11 @@ public class ExcelXlsReader implements HSSFListener {
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setData(List<List<String>> data) {
|
public void setData(List<List<String>> data) {
|
||||||
this.data = data;
|
this.data = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 遍历excel下所有的sheet
|
* 遍历excel下所有的sheet
|
||||||
*
|
*
|
||||||
@ -212,8 +211,8 @@ public class ExcelXlsReader implements HSSFListener {
|
|||||||
thisColumn = frec.getColumn();
|
thisColumn = frec.getColumn();
|
||||||
thisStr = String.valueOf(frec.getValue());
|
thisStr = String.valueOf(frec.getValue());
|
||||||
String fieldType = checkType(thisStr, thisColumn);
|
String fieldType = checkType(thisStr, thisColumn);
|
||||||
if(fieldType.equalsIgnoreCase("LONG") && thisStr.endsWith(".0")){
|
if (fieldType != null && fieldType.equalsIgnoreCase("LONG") && thisStr.endsWith(".0")) {
|
||||||
thisStr = thisStr.substring(0, thisStr.length() -2);
|
thisStr = thisStr.substring(0, thisStr.length() - 2);
|
||||||
}
|
}
|
||||||
cellList.add(thisColumn, thisStr);
|
cellList.add(thisColumn, thisStr);
|
||||||
checkRowIsNull(thisStr); //如果里面某个单元格含有值,则标识该行不为空行
|
checkRowIsNull(thisStr); //如果里面某个单元格含有值,则标识该行不为空行
|
||||||
@ -268,9 +267,9 @@ public class ExcelXlsReader implements HSSFListener {
|
|||||||
value = value.equals("") ? "" : value;
|
value = value.equals("") ? "" : value;
|
||||||
//向容器加入列值
|
//向容器加入列值
|
||||||
cellList.add(thisColumn, value);
|
cellList.add(thisColumn, value);
|
||||||
if(formatIndex == 59 || formatIndex== 14){
|
if (formatIndex == 59 || formatIndex == 14) {
|
||||||
totalSheets.get(totalSheets.size() -1).getFields().get(thisColumn).setFieldType("DATETIME");
|
totalSheets.get(totalSheets.size() - 1).getFields().get(thisColumn).setFieldType("DATETIME");
|
||||||
}else {
|
} else {
|
||||||
checkType(value, thisColumn);
|
checkType(value, thisColumn);
|
||||||
}
|
}
|
||||||
checkRowIsNull(value); //如果里面某个单元格含有值,则标识该行不为空行
|
checkRowIsNull(value); //如果里面某个单元格含有值,则标识该行不为空行
|
||||||
@ -308,7 +307,7 @@ public class ExcelXlsReader implements HSSFListener {
|
|||||||
}
|
}
|
||||||
lastColumnNumber = -1;
|
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 excelSheetData = new ExcelSheetData();
|
||||||
excelSheetData.setExcelLabel(sheetName);
|
excelSheetData.setExcelLabel(sheetName);
|
||||||
excelSheetData.setData(new ArrayList<>());
|
excelSheetData.setData(new ArrayList<>());
|
||||||
@ -316,7 +315,7 @@ public class ExcelXlsReader implements HSSFListener {
|
|||||||
totalSheets.add(excelSheetData);
|
totalSheets.add(excelSheetData);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(curRow == 0){
|
if (curRow == 0) {
|
||||||
for (String s : cellList) {
|
for (String s : cellList) {
|
||||||
TableField tableField = new TableField();
|
TableField tableField = new TableField();
|
||||||
tableField.setFieldType("TEXT");
|
tableField.setFieldType("TEXT");
|
||||||
@ -324,13 +323,13 @@ public class ExcelXlsReader implements HSSFListener {
|
|||||||
tableField.setFieldName(s);
|
tableField.setFieldName(s);
|
||||||
tableField.setRemarks(s);
|
tableField.setRemarks(s);
|
||||||
this.fields.add(tableField);
|
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 (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 excelSheetData = new ExcelSheetData();
|
||||||
excelSheetData.setData(new ArrayList<>(data));
|
excelSheetData.setData(new ArrayList<>(data));
|
||||||
excelSheetData.setExcelLabel(sheetName);
|
excelSheetData.setExcelLabel(sheetName);
|
||||||
@ -339,13 +338,13 @@ public class ExcelXlsReader implements HSSFListener {
|
|||||||
excelSheetData.getData().add(tmp);
|
excelSheetData.getData().add(tmp);
|
||||||
totalRows++;
|
totalRows++;
|
||||||
totalSheets.add(excelSheetData);
|
totalSheets.add(excelSheetData);
|
||||||
}else {
|
} else {
|
||||||
List<String> tmp = new ArrayList<>(cellList);
|
List<String> tmp = new ArrayList<>(cellList);
|
||||||
if(obtainedNum != null && totalSheets.stream().filter(s->s.getExcelLabel().equalsIgnoreCase(sheetName)).collect(Collectors.toList()).get(0).getData().size() < obtainedNum){
|
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);
|
totalSheets.stream().filter(s -> s.getExcelLabel().equalsIgnoreCase(sheetName)).collect(Collectors.toList()).get(0).getData().add(tmp);
|
||||||
}
|
}
|
||||||
if(obtainedNum == null){
|
if (obtainedNum == null) {
|
||||||
totalSheets.stream().filter(s->s.getExcelLabel().equalsIgnoreCase(sheetName)).collect(Collectors.toList()).get(0).getData().add(tmp);
|
totalSheets.stream().filter(s -> s.getExcelLabel().equalsIgnoreCase(sheetName)).collect(Collectors.toList()).get(0).getData().add(tmp);
|
||||||
}
|
}
|
||||||
totalRows++;
|
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;
|
String type = null;
|
||||||
try {
|
try {
|
||||||
double d = Double.valueOf(str);
|
double d = Double.valueOf(str);
|
||||||
@ -382,22 +381,20 @@ public class ExcelXlsReader implements HSSFListener {
|
|||||||
type = "DOUBLE";
|
type = "DOUBLE";
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
type = "TEXT";
|
|
||||||
}
|
}
|
||||||
}catch (Exception e){
|
} catch (Exception e) {
|
||||||
type = "TEXT";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(curRow==1){
|
if (curRow == 1) {
|
||||||
totalSheets.get(totalSheets.size() -1).getFields().get(thisColumn).setFieldType(type);
|
totalSheets.get(totalSheets.size() - 1).getFields().get(thisColumn).setFieldType(type == null ? "TEXT" : type);
|
||||||
}
|
}
|
||||||
if(curRow > 1) {
|
if (curRow > 1 && type != null) {
|
||||||
String oldType = totalSheets.get(totalSheets.size() -1).getFields().get(thisColumn).getFieldType();
|
String oldType = totalSheets.get(totalSheets.size() - 1).getFields().get(thisColumn).getFieldType();
|
||||||
if(type.equalsIgnoreCase("TEXT")){
|
if (type.equalsIgnoreCase("TEXT")) {
|
||||||
totalSheets.get(totalSheets.size() -1).getFields().get(thisColumn).setFieldType(type);
|
totalSheets.get(totalSheets.size() - 1).getFields().get(thisColumn).setFieldType(type);
|
||||||
}
|
}
|
||||||
if(type.equalsIgnoreCase("DOUBLE") && oldType.equalsIgnoreCase("LONG")){
|
if (type.equalsIgnoreCase("DOUBLE") && oldType.equalsIgnoreCase("LONG")) {
|
||||||
totalSheets.get(totalSheets.size() -1).getFields().get(thisColumn).setFieldType(type);
|
totalSheets.get(totalSheets.size() - 1).getFields().get(thisColumn).setFieldType(type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return type;
|
return type;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
package io.dataease.commons.utils;
|
package io.dataease.commons.utils;
|
||||||
|
|
||||||
import io.dataease.dto.dataset.ExcelSheetData;
|
import io.dataease.dto.dataset.ExcelSheetData;
|
||||||
import io.dataease.i18n.Translator;
|
import io.dataease.i18n.Translator;
|
||||||
import io.dataease.plugins.common.dto.datasource.TableField;
|
import io.dataease.plugins.common.dto.datasource.TableField;
|
||||||
@ -35,7 +36,8 @@ public class ExcelXlsxReader extends DefaultHandler {
|
|||||||
/**
|
/**
|
||||||
* 自定义获取表格某些信
|
* 自定义获取表格某些信
|
||||||
*/
|
*/
|
||||||
public Map map = new TreeMap<String,String>();
|
public Map map = new TreeMap<String, String>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 单元格中的数据可能的数据类型
|
* 单元格中的数据可能的数据类型
|
||||||
*/
|
*/
|
||||||
@ -56,7 +58,7 @@ public class ExcelXlsxReader extends DefaultHandler {
|
|||||||
/**
|
/**
|
||||||
* 总行数
|
* 总行数
|
||||||
*/
|
*/
|
||||||
private int totalRows=0;
|
private int totalRows = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 一行内cell集合
|
* 一行内cell集合
|
||||||
@ -101,7 +103,6 @@ public class ExcelXlsxReader extends DefaultHandler {
|
|||||||
private String formatString;
|
private String formatString;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//定义前一个元素和当前元素的位置,用来计算其中空的单元格数量,如A6和A8等
|
//定义前一个元素和当前元素的位置,用来计算其中空的单元格数量,如A6和A8等
|
||||||
private String preRef = null, ref = null;
|
private String preRef = null, ref = null;
|
||||||
|
|
||||||
@ -143,7 +144,7 @@ public class ExcelXlsxReader extends DefaultHandler {
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setData(List<List<String>> data) {
|
public void setData(List<List<String>> data) {
|
||||||
this.data = data;
|
this.data = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -190,11 +191,11 @@ public class ExcelXlsxReader extends DefaultHandler {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void startElement(String uri, String localName, String name, Attributes attributes) throws SAXException {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(name.equalsIgnoreCase("mergeCell")){
|
if (name.equalsIgnoreCase("mergeCell")) {
|
||||||
throw new RuntimeException(Translator.get("i18n_excel_have_merge_region"));
|
throw new RuntimeException(Translator.get("i18n_excel_have_merge_region"));
|
||||||
}
|
}
|
||||||
//c => 单元格
|
//c => 单元格
|
||||||
@ -221,6 +222,7 @@ public class ExcelXlsxReader extends DefaultHandler {
|
|||||||
* 得到单元格对应的索引值或是内容值
|
* 得到单元格对应的索引值或是内容值
|
||||||
* 如果单元格类型是字符串、INLINESTR、数字、日期,lastIndex则是索引值
|
* 如果单元格类型是字符串、INLINESTR、数字、日期,lastIndex则是索引值
|
||||||
* 如果单元格类型是布尔值、错误、公式,lastIndex则是内容值
|
* 如果单元格类型是布尔值、错误、公式,lastIndex则是内容值
|
||||||
|
*
|
||||||
* @param ch
|
* @param ch
|
||||||
* @param start
|
* @param start
|
||||||
* @param length
|
* @param length
|
||||||
@ -228,7 +230,7 @@ public class ExcelXlsxReader extends DefaultHandler {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void characters(char[] ch, int start, int length) throws SAXException {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
lastIndex += new String(ch, start, length);
|
lastIndex += new String(ch, start, length);
|
||||||
@ -244,14 +246,14 @@ public class ExcelXlsxReader extends DefaultHandler {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void endElement(String uri, String localName, String name) throws SAXException {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
//t元素也包含字符串
|
//t元素也包含字符串
|
||||||
if (isTElement) { //这个程序没经过
|
if (isTElement) { //这个程序没经过
|
||||||
//将单元格内容加入rowlist中,在这之前先去掉字符串前后的空白符
|
//将单元格内容加入rowlist中,在这之前先去掉字符串前后的空白符
|
||||||
String value = lastIndex.trim();
|
String value = lastIndex.trim();
|
||||||
if(curRow==1){
|
if (curRow == 1) {
|
||||||
TableField tableField = new TableField();
|
TableField tableField = new TableField();
|
||||||
tableField.setFieldType("TEXT");
|
tableField.setFieldType("TEXT");
|
||||||
tableField.setFieldSize(65533);
|
tableField.setFieldSize(65533);
|
||||||
@ -271,21 +273,21 @@ public class ExcelXlsxReader extends DefaultHandler {
|
|||||||
String value = this.getDataValue(lastIndex.trim(), "");//根据索引值获取对应的单元格值
|
String value = this.getDataValue(lastIndex.trim(), "");//根据索引值获取对应的单元格值
|
||||||
if (preRef == null) {
|
if (preRef == null) {
|
||||||
preRef = "A" + curRow;
|
preRef = "A" + curRow;
|
||||||
if(!preRef.equalsIgnoreCase(ref)){
|
if (!preRef.equalsIgnoreCase(ref)) {
|
||||||
cellList.add(curCol, "");
|
cellList.add(curCol, "");
|
||||||
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"));
|
throw new RuntimeException(Translator.get("i18n_excel_empty_column"));
|
||||||
}else if (!ref.equals(preRef)) {
|
} else if (!ref.equals(preRef)) {
|
||||||
int len = countNullCell(ref, preRef);
|
int len = countNullCell(ref, preRef);
|
||||||
for (int i = 0; i < len; i++) {
|
for (int i = 0; i < len; i++) {
|
||||||
if(curCol < this.fields.size()){
|
if (curCol < this.fields.size()) {
|
||||||
cellList.add(curCol, "");
|
cellList.add(curCol, "");
|
||||||
if(curRow==1){
|
if (curRow == 1) {
|
||||||
addField("", curCol);
|
addField("", curCol);
|
||||||
}
|
}
|
||||||
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);
|
cellList.add(curCol, value);
|
||||||
}
|
}
|
||||||
curCol++;
|
curCol++;
|
||||||
@ -309,8 +311,8 @@ public class ExcelXlsxReader extends DefaultHandler {
|
|||||||
if (curRow == 1) {
|
if (curRow == 1) {
|
||||||
maxRef = ref;
|
maxRef = ref;
|
||||||
}
|
}
|
||||||
if(curRow>1){
|
if (curRow > 1) {
|
||||||
for (int i=cellList.size();i<this.fields.size();i++){
|
for (int i = cellList.size(); i < this.fields.size(); i++) {
|
||||||
cellList.add("");
|
cellList.add("");
|
||||||
}
|
}
|
||||||
List<String> tmp = new ArrayList<>(cellList);
|
List<String> tmp = new ArrayList<>(cellList);
|
||||||
@ -322,7 +324,7 @@ public class ExcelXlsxReader extends DefaultHandler {
|
|||||||
curCol = 0;
|
curCol = 0;
|
||||||
preRef = null;
|
preRef = null;
|
||||||
ref = null;
|
ref = null;
|
||||||
flag=false;
|
flag = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -357,9 +359,8 @@ public class ExcelXlsxReader extends DefaultHandler {
|
|||||||
formatIndex = style.getDataFormat();
|
formatIndex = style.getDataFormat();
|
||||||
formatString = style.getDataFormatString();
|
formatString = style.getDataFormatString();
|
||||||
short format = this.formatIndex;
|
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)
|
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))
|
|| (175 < format && format < 178) || (182 <= format && format <= 196) || (210 <= format && format <= 213) || (208 == format)) { // 日期
|
||||||
{ // 日期
|
|
||||||
isDateFormat = true;
|
isDateFormat = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -369,6 +370,7 @@ public class ExcelXlsxReader extends DefaultHandler {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 对解析出来的数据进行类型处理
|
* 对解析出来的数据进行类型处理
|
||||||
|
*
|
||||||
* @param value 单元格的值,
|
* @param value 单元格的值,
|
||||||
* value代表解析:BOOL的为0或1, ERROR的为内容值,FORMULA的为内容值,INLINESTR的为索引值需转换为内容值,
|
* value代表解析:BOOL的为0或1, ERROR的为内容值,FORMULA的为内容值,INLINESTR的为索引值需转换为内容值,
|
||||||
* SSTINDEX的为索引值需转换为内容值, NUMBER为内容值,DATE为内容值
|
* SSTINDEX的为索引值需转换为内容值, NUMBER为内容值,DATE为内容值
|
||||||
@ -377,7 +379,7 @@ public class ExcelXlsxReader extends DefaultHandler {
|
|||||||
*/
|
*/
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
public String getDataValue(String value, String thisStr) {
|
public String getDataValue(String value, String thisStr) {
|
||||||
String type = "TEXT";
|
String type = null;
|
||||||
switch (nextDataType) {
|
switch (nextDataType) {
|
||||||
// 这几个的顺序不能随便交换,交换了很可能会导致数据错误
|
// 这几个的顺序不能随便交换,交换了很可能会导致数据错误
|
||||||
case BOOL: //布尔值
|
case BOOL: //布尔值
|
||||||
@ -401,11 +403,11 @@ public class ExcelXlsxReader extends DefaultHandler {
|
|||||||
String sstIndex = value.toString();
|
String sstIndex = value.toString();
|
||||||
try {
|
try {
|
||||||
int idx = Integer.parseInt(sstIndex);
|
int idx = Integer.parseInt(sstIndex);
|
||||||
if(sst != null){
|
if (sst != null) {
|
||||||
XSSFRichTextString rtss = new XSSFRichTextString(sst.getEntryAt(idx));//根据idx索引值获取内容值
|
XSSFRichTextString rtss = new XSSFRichTextString(sst.getEntryAt(idx));//根据idx索引值获取内容值
|
||||||
thisStr = rtss.toString();
|
thisStr = rtss.toString();
|
||||||
rtss = null;
|
rtss = null;
|
||||||
}else {
|
} else {
|
||||||
thisStr = value.toString();
|
thisStr = value.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -422,12 +424,13 @@ public class ExcelXlsxReader extends DefaultHandler {
|
|||||||
}
|
}
|
||||||
thisStr = thisStr.replace("_", "").trim();
|
thisStr = thisStr.replace("_", "").trim();
|
||||||
|
|
||||||
if(isDateFormat ){
|
if (isDateFormat) {
|
||||||
type = "DATETIME";isDateFormat = false;
|
type = "DATETIME";
|
||||||
if(formatString != null && formatString.contains("%")){
|
isDateFormat = false;
|
||||||
|
if (formatString != null && formatString.contains("%")) {
|
||||||
type = getType(thisStr);
|
type = getType(thisStr);
|
||||||
}
|
}
|
||||||
}else {
|
} else {
|
||||||
type = getType(thisStr);
|
type = getType(thisStr);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -441,60 +444,67 @@ public class ExcelXlsxReader extends DefaultHandler {
|
|||||||
thisStr = " ";
|
thisStr = " ";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(curRow==1){
|
if (curRow == 1) {
|
||||||
addField(thisStr, null);
|
addField(thisStr, null);
|
||||||
}else {
|
} else {
|
||||||
if(CollectionUtils.isEmpty(this.getFields())){
|
if (CollectionUtils.isEmpty(this.getFields())) {
|
||||||
throw new RuntimeException(Translator.get("i18n_excel_header_empty"));
|
throw new RuntimeException(Translator.get("i18n_excel_header_empty"));
|
||||||
}
|
}
|
||||||
if(curCol >= this.fields.size()){
|
if (curCol >= this.fields.size()) {
|
||||||
return thisStr;
|
return thisStr;
|
||||||
}
|
}
|
||||||
if(curRow==2){
|
if (curRow == 2) {
|
||||||
this.getFields().get(curCol).setFieldType(type);
|
if (type != null) {
|
||||||
}else {
|
|
||||||
if(type.equalsIgnoreCase("TEXT")){
|
|
||||||
this.getFields().get(curCol).setFieldType(type);
|
this.getFields().get(curCol).setFieldType(type);
|
||||||
}
|
}
|
||||||
if(type.equalsIgnoreCase("DOUBLE") && this.getFields().get(curCol).getFieldType().equalsIgnoreCase("LONG")){
|
} else {
|
||||||
this.getFields().get(curCol).setFieldType(type);
|
if (type != null) {
|
||||||
}
|
if (type.equalsIgnoreCase("TEXT")) {
|
||||||
if(type.equalsIgnoreCase("DATETIME")){
|
this.getFields().get(curCol).setFieldType(type);
|
||||||
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;
|
return thisStr;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addField(String columeName, Integer index){
|
private void addField(String columeName, Integer index) {
|
||||||
TableField tableField = new TableField();
|
TableField tableField = new TableField();
|
||||||
tableField.setFieldType("TEXT");
|
tableField.setFieldType("TEXT");
|
||||||
tableField.setFieldSize(65533);
|
tableField.setFieldSize(65533);
|
||||||
tableField.setFieldName(columeName);
|
tableField.setFieldName(columeName);
|
||||||
tableField.setRemarks(columeName);
|
tableField.setRemarks(columeName);
|
||||||
if(index != null){
|
if (index != null) {
|
||||||
this.fields.add(index, tableField);
|
this.fields.add(index, tableField);
|
||||||
}else {
|
} else {
|
||||||
this.fields.add(tableField);
|
this.fields.add(tableField);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private String getType(String thisStr){
|
|
||||||
if(totalRows==0){
|
private String getType(String thisStr) {
|
||||||
|
if (totalRows == 0) {
|
||||||
return "TEXT";
|
return "TEXT";
|
||||||
}
|
}
|
||||||
try{
|
|
||||||
if(thisStr.endsWith("%")){
|
try {
|
||||||
thisStr = thisStr.substring(0, thisStr.length()-1);
|
if (thisStr.endsWith("%")) {
|
||||||
thisStr = String.valueOf(Double.valueOf(thisStr)/100);
|
thisStr = thisStr.substring(0, thisStr.length() - 1);
|
||||||
|
thisStr = String.valueOf(Double.valueOf(thisStr) / 100);
|
||||||
}
|
}
|
||||||
Long.valueOf(thisStr);
|
Long.valueOf(thisStr);
|
||||||
return "LONG";
|
return "LONG";
|
||||||
}catch (Exception e){
|
} catch (Exception e) {
|
||||||
try {
|
try {
|
||||||
Double.valueOf(thisStr);
|
Double.valueOf(thisStr);
|
||||||
return "DOUBLE";
|
return "DOUBLE";
|
||||||
}catch (Exception ignore){ }
|
} catch (Exception ignore) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return "TEXT";
|
return "TEXT";
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@ import io.dataease.commons.exception.DEException;
|
|||||||
import io.dataease.controller.request.dataset.DataSetTableRequest;
|
import io.dataease.controller.request.dataset.DataSetTableRequest;
|
||||||
import io.dataease.controller.request.dataset.MultFieldValuesRequest;
|
import io.dataease.controller.request.dataset.MultFieldValuesRequest;
|
||||||
import io.dataease.controller.response.DatasetTableField4Type;
|
import io.dataease.controller.response.DatasetTableField4Type;
|
||||||
|
import io.dataease.dto.dataset.DatasetTableFieldDTO;
|
||||||
import io.dataease.i18n.Translator;
|
import io.dataease.i18n.Translator;
|
||||||
import io.dataease.plugins.common.base.domain.DatasetTable;
|
import io.dataease.plugins.common.base.domain.DatasetTable;
|
||||||
import io.dataease.plugins.common.base.domain.DatasetTableField;
|
import io.dataease.plugins.common.base.domain.DatasetTableField;
|
||||||
@ -106,9 +107,33 @@ public class DataSetTableFieldController {
|
|||||||
DatasetTableField datasetTableField = DatasetTableField.builder().build();
|
DatasetTableField datasetTableField = DatasetTableField.builder().build();
|
||||||
datasetTableField.setTableId(tableId);
|
datasetTableField.setTableId(tableId);
|
||||||
datasetTableField.setGroupType("d");
|
datasetTableField.setGroupType("d");
|
||||||
List<DatasetTableField> dimensionList = dataSetTableFieldsService.list(datasetTableField);
|
List<DatasetTableFieldDTO> dimensionList = new ArrayList<>();
|
||||||
|
dataSetTableFieldsService.list(datasetTableField).forEach(o -> {
|
||||||
|
DatasetTableFieldDTO datasetTableFieldDTO = new DatasetTableFieldDTO();
|
||||||
|
BeanUtils.copyProperties(o, datasetTableFieldDTO);
|
||||||
|
List<Object> 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");
|
datasetTableField.setGroupType("q");
|
||||||
List<DatasetTableField> quotaList = dataSetTableFieldsService.list(datasetTableField);
|
List<DatasetTableFieldDTO> quotaList = new ArrayList<>();
|
||||||
|
dataSetTableFieldsService.list(datasetTableField).forEach(o -> {
|
||||||
|
DatasetTableFieldDTO datasetTableFieldDTO = new DatasetTableFieldDTO();
|
||||||
|
BeanUtils.copyProperties(o, datasetTableFieldDTO);
|
||||||
|
List<Object> 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 datasetTableField4Type = new DatasetTableField4Type();
|
||||||
datasetTableField4Type.setDimensionList(dimensionList);
|
datasetTableField4Type.setDimensionList(dimensionList);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package io.dataease.controller.response;
|
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 io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@ -9,7 +9,7 @@ import java.util.List;
|
|||||||
@Data
|
@Data
|
||||||
public class DatasetTableField4Type {
|
public class DatasetTableField4Type {
|
||||||
@ApiModelProperty("维度")
|
@ApiModelProperty("维度")
|
||||||
List<DatasetTableField> dimensionList;
|
List<DatasetTableFieldDTO> dimensionList;
|
||||||
@ApiModelProperty("指标")
|
@ApiModelProperty("指标")
|
||||||
List<DatasetTableField> quotaList;
|
List<DatasetTableFieldDTO> quotaList;
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,10 @@ package io.dataease.dto.dataset;
|
|||||||
import io.dataease.plugins.common.base.domain.DatasetTableField;
|
import io.dataease.plugins.common.base.domain.DatasetTableField;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class DatasetTableFieldDTO extends DatasetTableField {
|
public class DatasetTableFieldDTO extends DatasetTableField {
|
||||||
private String jsonPath;
|
private String jsonPath;
|
||||||
|
private List<Object> deTypeCascader;
|
||||||
}
|
}
|
||||||
|
@ -41,6 +41,7 @@ import org.apache.commons.lang3.StringUtils;
|
|||||||
import org.quartz.*;
|
import org.quartz.*;
|
||||||
import org.springframework.scheduling.annotation.Async;
|
import org.springframework.scheduling.annotation.Async;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.web.util.HtmlUtils;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@ -67,9 +68,7 @@ public class EmailTaskHandler extends TaskHandler implements Job {
|
|||||||
protected JobDataMap jobDataMap(GlobalTaskEntity taskEntity) {
|
protected JobDataMap jobDataMap(GlobalTaskEntity taskEntity) {
|
||||||
JobDataMap jobDataMap = new JobDataMap();
|
JobDataMap jobDataMap = new JobDataMap();
|
||||||
jobDataMap.put("taskEntity", taskEntity);
|
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());
|
SysUserEntity creator = authUserServiceImpl.getUserByIdNoCache(taskEntity.getCreator());
|
||||||
jobDataMap.put("creator", creator);
|
jobDataMap.put("creator", creator);
|
||||||
return jobDataMap;
|
return jobDataMap;
|
||||||
@ -109,10 +108,9 @@ public class EmailTaskHandler extends TaskHandler implements Job {
|
|||||||
Long instanceId = saveInstance(taskInstance);
|
Long instanceId = saveInstance(taskInstance);
|
||||||
taskInstance.setInstanceId(instanceId);
|
taskInstance.setInstanceId(instanceId);
|
||||||
|
|
||||||
XpackEmailTemplateDTO emailTemplate = (XpackEmailTemplateDTO) jobDataMap.get("emailTemplate");
|
|
||||||
SysUserEntity creator = (SysUserEntity) jobDataMap.get("creator");
|
SysUserEntity creator = (SysUserEntity) jobDataMap.get("creator");
|
||||||
LogUtil.info("start execute send panel report task...");
|
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) {
|
if (isTempTask) {
|
||||||
removeTask(scheduleManager, taskEntity);
|
removeTask(scheduleManager, taskEntity);
|
||||||
}
|
}
|
||||||
@ -160,13 +158,14 @@ public class EmailTaskHandler extends TaskHandler implements Job {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Async("priorityExecutor")
|
@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);
|
EmailXpackService emailXpackService = SpringContextUtil.getBean(EmailXpackService.class);
|
||||||
AuthUserServiceImpl userService = SpringContextUtil.getBean(AuthUserServiceImpl.class);
|
AuthUserServiceImpl userService = SpringContextUtil.getBean(AuthUserServiceImpl.class);
|
||||||
SysUserService sysUserService = SpringContextUtil.getBean(SysUserService.class);
|
SysUserService sysUserService = SpringContextUtil.getBean(SysUserService.class);
|
||||||
List<File> files = null;
|
List<File> files = null;
|
||||||
try {
|
try {
|
||||||
|
XpackEmailTemplateDTO emailTemplateDTO = emailXpackService.emailTemplate(taskInstance.getTaskId());
|
||||||
XpackEmailTaskRequest taskForm = emailXpackService.taskForm(taskInstance.getTaskId());
|
XpackEmailTaskRequest taskForm = emailXpackService.taskForm(taskInstance.getTaskId());
|
||||||
if (ObjectUtils.isEmpty(taskForm) || (!isTempTask && CronUtils.taskExpire(taskForm.getEndTime()))) {
|
if (ObjectUtils.isEmpty(taskForm) || (!isTempTask && CronUtils.taskExpire(taskForm.getEndTime()))) {
|
||||||
removeInstance(taskInstance);
|
removeInstance(taskInstance);
|
||||||
@ -202,7 +201,7 @@ public class EmailTaskHandler extends TaskHandler implements Job {
|
|||||||
|
|
||||||
String contentStr = "";
|
String contentStr = "";
|
||||||
if (ObjectUtils.isNotEmpty(content)) {
|
if (ObjectUtils.isNotEmpty(content)) {
|
||||||
contentStr = new String(content, "UTF-8");
|
contentStr = HtmlUtils.htmlUnescape(new String(content, "UTF-8"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,20 +4,17 @@ import io.dataease.auth.entity.SysUserEntity;
|
|||||||
|
|
||||||
import io.dataease.plugins.common.entity.GlobalTaskInstance;
|
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.scheduling.annotation.Async;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
|
|
||||||
@Service("emailTaskViewHandler")
|
@Service("emailTaskViewHandler")
|
||||||
public class EmailTaskViewHandler extends EmailTaskHandler {
|
public class EmailTaskViewHandler extends EmailTaskHandler {
|
||||||
|
|
||||||
|
|
||||||
@Async("priorityExecutor")
|
@Async("priorityExecutor")
|
||||||
public void sendReport(GlobalTaskInstance taskInstance, XpackEmailTemplateDTO emailTemplateDTO, SysUserEntity user, Boolean isTempTask) {
|
public void sendReport(GlobalTaskInstance taskInstance, SysUserEntity user, Boolean isTempTask) {
|
||||||
super.sendReport(taskInstance, emailTemplateDTO, user, isTempTask);
|
super.sendReport(taskInstance, user, isTempTask);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,6 +28,7 @@ import org.apache.commons.lang3.StringUtils;
|
|||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.util.HtmlUtils;
|
||||||
import springfox.documentation.annotations.ApiIgnore;
|
import springfox.documentation.annotations.ApiIgnore;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
@ -136,6 +137,9 @@ public class XEmailTaskServer {
|
|||||||
String emailContent;
|
String emailContent;
|
||||||
try {
|
try {
|
||||||
emailContent = new String(bytes, "UTF-8");
|
emailContent = new String(bytes, "UTF-8");
|
||||||
|
if (StringUtils.isNotBlank(emailContent)) {
|
||||||
|
emailContent = HtmlUtils.htmlUnescape(emailContent);
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
@ -176,7 +180,7 @@ public class XEmailTaskServer {
|
|||||||
}
|
}
|
||||||
String imageUrl = "/system/ui/image/" + fileId;
|
String imageUrl = "/system/ui/image/" + fileId;
|
||||||
String html = "<div>" +
|
String html = "<div>" +
|
||||||
"<h2>" + content + "</h2>" +
|
content +
|
||||||
"<img style='width: 100%;' id='" + panelId + "' src='" + imageUrl + "' />" +
|
"<img style='width: 100%;' id='" + panelId + "' src='" + imageUrl + "' />" +
|
||||||
"</div>";
|
"</div>";
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package io.dataease.provider.query.ck;
|
package io.dataease.provider.query.ck;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import io.dataease.commons.utils.BeanUtils;
|
import io.dataease.commons.utils.BeanUtils;
|
||||||
import io.dataease.plugins.common.base.domain.ChartViewWithBLOBs;
|
import io.dataease.plugins.common.base.domain.ChartViewWithBLOBs;
|
||||||
import io.dataease.plugins.common.base.domain.DatasetTableField;
|
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.chart.ChartExtFilterRequest;
|
||||||
import io.dataease.plugins.common.request.permission.DataSetRowPermissionsTreeDTO;
|
import io.dataease.plugins.common.request.permission.DataSetRowPermissionsTreeDTO;
|
||||||
import io.dataease.plugins.common.request.permission.DatasetRowPermissionsTreeItem;
|
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.entity.PageInfo;
|
||||||
import io.dataease.plugins.datasource.query.QueryProvider;
|
import io.dataease.plugins.datasource.query.QueryProvider;
|
||||||
import io.dataease.plugins.datasource.query.Utils;
|
import io.dataease.plugins.datasource.query.Utils;
|
||||||
@ -1400,4 +1402,15 @@ public class CKQueryProvider extends QueryProvider {
|
|||||||
return sql;
|
return sql;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<Dateformat> 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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package io.dataease.provider.query.db2;
|
package io.dataease.provider.query.db2;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import io.dataease.dto.datasource.Db2Configuration;
|
import io.dataease.dto.datasource.Db2Configuration;
|
||||||
import io.dataease.plugins.common.base.domain.ChartViewWithBLOBs;
|
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.chart.ChartExtFilterRequest;
|
||||||
import io.dataease.plugins.common.request.permission.DataSetRowPermissionsTreeDTO;
|
import io.dataease.plugins.common.request.permission.DataSetRowPermissionsTreeDTO;
|
||||||
import io.dataease.plugins.common.request.permission.DatasetRowPermissionsTreeItem;
|
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.JdbcConfiguration;
|
||||||
import io.dataease.plugins.datasource.entity.PageInfo;
|
import io.dataease.plugins.datasource.entity.PageInfo;
|
||||||
import io.dataease.plugins.datasource.query.QueryProvider;
|
import io.dataease.plugins.datasource.query.QueryProvider;
|
||||||
@ -1378,4 +1380,15 @@ public class Db2QueryProvider extends QueryProvider {
|
|||||||
schema = String.format(Db2Constants.KEYWORD_TABLE, schema);
|
schema = String.format(Db2Constants.KEYWORD_TABLE, schema);
|
||||||
return "SELECT * FROM " + schema + "." + String.format(Db2Constants.KEYWORD_TABLE, table);
|
return "SELECT * FROM " + schema + "." + String.format(Db2Constants.KEYWORD_TABLE, table);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<Dateformat> 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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package io.dataease.provider.query.es;
|
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.ChartViewWithBLOBs;
|
||||||
import io.dataease.plugins.common.base.domain.DatasetTableField;
|
import io.dataease.plugins.common.base.domain.DatasetTableField;
|
||||||
import io.dataease.plugins.common.base.domain.DatasetTableFieldExample;
|
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.chart.ChartExtFilterRequest;
|
||||||
import io.dataease.plugins.common.request.permission.DataSetRowPermissionsTreeDTO;
|
import io.dataease.plugins.common.request.permission.DataSetRowPermissionsTreeDTO;
|
||||||
import io.dataease.plugins.common.request.permission.DatasetRowPermissionsTreeItem;
|
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.QueryProvider;
|
||||||
import io.dataease.plugins.datasource.query.Utils;
|
import io.dataease.plugins.datasource.query.Utils;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
@ -1311,4 +1313,15 @@ public class EsQueryProvider extends QueryProvider {
|
|||||||
return sql;
|
return sql;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<Dateformat> 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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package io.dataease.provider.query.hive;
|
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.ChartViewWithBLOBs;
|
||||||
import io.dataease.plugins.common.base.domain.DatasetTableField;
|
import io.dataease.plugins.common.base.domain.DatasetTableField;
|
||||||
import io.dataease.plugins.common.base.domain.DatasetTableFieldExample;
|
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.chart.ChartExtFilterRequest;
|
||||||
import io.dataease.plugins.common.request.permission.DataSetRowPermissionsTreeDTO;
|
import io.dataease.plugins.common.request.permission.DataSetRowPermissionsTreeDTO;
|
||||||
import io.dataease.plugins.common.request.permission.DatasetRowPermissionsTreeItem;
|
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.entity.PageInfo;
|
||||||
import io.dataease.plugins.datasource.query.QueryProvider;
|
import io.dataease.plugins.datasource.query.QueryProvider;
|
||||||
import io.dataease.plugins.datasource.query.Utils;
|
import io.dataease.plugins.datasource.query.Utils;
|
||||||
@ -1299,4 +1301,15 @@ public class HiveQueryProvider extends QueryProvider {
|
|||||||
return sql;
|
return sql;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<Dateformat> 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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package io.dataease.provider.query.impala;
|
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.ChartViewWithBLOBs;
|
||||||
import io.dataease.plugins.common.base.domain.DatasetTableField;
|
import io.dataease.plugins.common.base.domain.DatasetTableField;
|
||||||
import io.dataease.plugins.common.base.domain.DatasetTableFieldExample;
|
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.chart.ChartExtFilterRequest;
|
||||||
import io.dataease.plugins.common.request.permission.DataSetRowPermissionsTreeDTO;
|
import io.dataease.plugins.common.request.permission.DataSetRowPermissionsTreeDTO;
|
||||||
import io.dataease.plugins.common.request.permission.DatasetRowPermissionsTreeItem;
|
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.entity.PageInfo;
|
||||||
import io.dataease.plugins.datasource.query.QueryProvider;
|
import io.dataease.plugins.datasource.query.QueryProvider;
|
||||||
import io.dataease.plugins.datasource.query.Utils;
|
import io.dataease.plugins.datasource.query.Utils;
|
||||||
@ -1276,4 +1278,15 @@ public class ImpalaQueryProvider extends QueryProvider {
|
|||||||
return sql;
|
return sql;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<Dateformat> 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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package io.dataease.provider.query.mongodb;
|
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.ChartViewWithBLOBs;
|
||||||
import io.dataease.plugins.common.base.domain.DatasetTableField;
|
import io.dataease.plugins.common.base.domain.DatasetTableField;
|
||||||
import io.dataease.plugins.common.base.domain.DatasetTableFieldExample;
|
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.chart.ChartExtFilterRequest;
|
||||||
import io.dataease.plugins.common.request.permission.DataSetRowPermissionsTreeDTO;
|
import io.dataease.plugins.common.request.permission.DataSetRowPermissionsTreeDTO;
|
||||||
import io.dataease.plugins.common.request.permission.DatasetRowPermissionsTreeItem;
|
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.entity.PageInfo;
|
||||||
import io.dataease.plugins.datasource.query.QueryProvider;
|
import io.dataease.plugins.datasource.query.QueryProvider;
|
||||||
import io.dataease.plugins.datasource.query.Utils;
|
import io.dataease.plugins.datasource.query.Utils;
|
||||||
@ -1150,4 +1152,15 @@ public class MongoQueryProvider extends QueryProvider {
|
|||||||
return sql;
|
return sql;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<Dateformat> 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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package io.dataease.provider.query.oracle;
|
package io.dataease.provider.query.oracle;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import io.dataease.dto.datasource.OracleConfiguration;
|
import io.dataease.dto.datasource.OracleConfiguration;
|
||||||
import io.dataease.plugins.common.base.domain.ChartViewWithBLOBs;
|
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.chart.ChartExtFilterRequest;
|
||||||
import io.dataease.plugins.common.request.permission.DataSetRowPermissionsTreeDTO;
|
import io.dataease.plugins.common.request.permission.DataSetRowPermissionsTreeDTO;
|
||||||
import io.dataease.plugins.common.request.permission.DatasetRowPermissionsTreeItem;
|
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.JdbcConfiguration;
|
||||||
import io.dataease.plugins.datasource.entity.PageInfo;
|
import io.dataease.plugins.datasource.entity.PageInfo;
|
||||||
import io.dataease.plugins.datasource.query.QueryProvider;
|
import io.dataease.plugins.datasource.query.QueryProvider;
|
||||||
@ -1427,4 +1429,15 @@ public class OracleQueryProvider extends QueryProvider {
|
|||||||
schema = String.format(OracleConstants.KEYWORD_TABLE, schema);
|
schema = String.format(OracleConstants.KEYWORD_TABLE, schema);
|
||||||
return "SELECT * FROM " + schema + "." + String.format(OracleConstants.KEYWORD_TABLE, table);
|
return "SELECT * FROM " + schema + "." + String.format(OracleConstants.KEYWORD_TABLE, table);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<Dateformat> 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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package io.dataease.provider.query.pg;
|
package io.dataease.provider.query.pg;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import io.dataease.plugins.common.base.domain.ChartViewWithBLOBs;
|
import io.dataease.plugins.common.base.domain.ChartViewWithBLOBs;
|
||||||
import io.dataease.plugins.common.base.domain.DatasetTableField;
|
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.chart.ChartExtFilterRequest;
|
||||||
import io.dataease.plugins.common.request.permission.DataSetRowPermissionsTreeDTO;
|
import io.dataease.plugins.common.request.permission.DataSetRowPermissionsTreeDTO;
|
||||||
import io.dataease.plugins.common.request.permission.DatasetRowPermissionsTreeItem;
|
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.JdbcConfiguration;
|
||||||
import io.dataease.plugins.datasource.entity.PageInfo;
|
import io.dataease.plugins.datasource.entity.PageInfo;
|
||||||
import io.dataease.plugins.datasource.query.QueryProvider;
|
import io.dataease.plugins.datasource.query.QueryProvider;
|
||||||
@ -1301,4 +1303,15 @@ public class PgQueryProvider extends QueryProvider {
|
|||||||
schema = String.format(PgConstants.KEYWORD_TABLE, schema);
|
schema = String.format(PgConstants.KEYWORD_TABLE, schema);
|
||||||
return "SELECT * FROM " + schema + "." + String.format(PgConstants.KEYWORD_TABLE, table);
|
return "SELECT * FROM " + schema + "." + String.format(PgConstants.KEYWORD_TABLE, table);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<Dateformat> 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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package io.dataease.provider.query.redshift;
|
package io.dataease.provider.query.redshift;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import io.dataease.plugins.common.base.domain.ChartViewWithBLOBs;
|
import io.dataease.plugins.common.base.domain.ChartViewWithBLOBs;
|
||||||
import io.dataease.plugins.common.base.domain.DatasetTableField;
|
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.chart.ChartExtFilterRequest;
|
||||||
import io.dataease.plugins.common.request.permission.DataSetRowPermissionsTreeDTO;
|
import io.dataease.plugins.common.request.permission.DataSetRowPermissionsTreeDTO;
|
||||||
import io.dataease.plugins.common.request.permission.DatasetRowPermissionsTreeItem;
|
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.JdbcConfiguration;
|
||||||
import io.dataease.plugins.datasource.entity.PageInfo;
|
import io.dataease.plugins.datasource.entity.PageInfo;
|
||||||
import io.dataease.plugins.datasource.query.QueryProvider;
|
import io.dataease.plugins.datasource.query.QueryProvider;
|
||||||
@ -1286,4 +1288,15 @@ public class RedshiftQueryProvider extends QueryProvider {
|
|||||||
schema = String.format(PgConstants.KEYWORD_TABLE, schema);
|
schema = String.format(PgConstants.KEYWORD_TABLE, schema);
|
||||||
return "SELECT * FROM " + schema + "." + String.format(PgConstants.KEYWORD_TABLE, table);
|
return "SELECT * FROM " + schema + "." + String.format(PgConstants.KEYWORD_TABLE, table);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<Dateformat> 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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -335,6 +335,9 @@ public class DataSetTableTaskService {
|
|||||||
|
|
||||||
public void execTask(DatasetTableTask datasetTableTask) throws Exception {
|
public void execTask(DatasetTableTask datasetTableTask) throws Exception {
|
||||||
execNow(datasetTableTask);
|
execNow(datasetTableTask);
|
||||||
|
if(datasetTableTask.getRate().equalsIgnoreCase(ScheduleType.SIMPLE.toString())){
|
||||||
|
scheduleService.addSchedule(datasetTableTask);
|
||||||
|
}
|
||||||
if (!datasetTableTask.getRate().equalsIgnoreCase(ScheduleType.SIMPLE.toString())) {
|
if (!datasetTableTask.getRate().equalsIgnoreCase(ScheduleType.SIMPLE.toString())) {
|
||||||
scheduleService.fireNow(datasetTableTask);
|
scheduleService.fireNow(datasetTableTask);
|
||||||
}
|
}
|
||||||
|
@ -65,49 +65,49 @@ management.health.redis.enabled=false
|
|||||||
#management.server.port=8083
|
#management.server.port=8083
|
||||||
#management.endpoints.web.exposure.include=*
|
#management.endpoints.web.exposure.include=*
|
||||||
#spring.freemarker.checkTemplateLocation=false
|
#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.private_key=MIIBUwIBADANBgkqhkiG9w0BAQEFAASCAT0wggE5AgEAAkEA0vfvyTdGJkdbHkB8mp0f3FE0GYP3AYPaJF7jUd1M0XxFSE2ceK3k2kw20YvQ09NJKk+OMjWQl9WitG9pB6tSCQIDAQABAkA2SimBrWC2/wvauBuYqjCFwLvYiRYqZKThUS3MZlebXJiLB+Ue/gUifAAKIg1avttUZsHBHrop4qfJCwAI0+YRAiEA+W3NK/RaXtnRqmoUUkb59zsZUBLpvZgQPfj1MhyHDz0CIQDYhsAhPJ3mgS64NbUZmGWuuNKp5coY2GIj/zYDMJp6vQIgUueLFXv/eZ1ekgz2Oi67MNCk5jeTF2BurZqNLR3MSmUCIFT3Q6uHMtsB9Eha4u7hS31tj1UWE+D+ADzp59MGnoftAiBeHT7gDMuqeJHPL4b+kC+gzV4FGTfhR9q3tTbklZkD2A==
|
||||||
rsa.public_key=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBANL378k3RiZHWx5AfJqdH9xRNBmD9wGD2iRe41HdTNF8RUhNnHit5NpMNtGL0NPTSSpPjjI1kJfVorRvaQerUgkCAwEAAQ==
|
rsa.public_key=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBANL378k3RiZHWx5AfJqdH9xRNBmD9wGD2iRe41HdTNF8RUhNnHit5NpMNtGL0NPTSSpPjjI1kJfVorRvaQerUgkCAwEAAQ==
|
||||||
#spring.cache.type=ehcache
|
#spring.cache.type=ehcache
|
||||||
spring.cache.ehcache.config=classpath:/ehcache/ehcache.xml
|
spring.cache.ehcache.config=classpath:/ehcache/ehcache.xml
|
||||||
#打印URL路径
|
#\u6253\u5370URL\u8DEF\u5F84
|
||||||
#logging.level.org.springframework.web=trace
|
#logging.level.org.springframework.web=trace
|
||||||
#logging.level.org.springframework.boot.web=trace
|
#logging.level.org.springframework.boot.web=trace
|
||||||
#spring.mvc.log-request-details=true
|
#spring.mvc.log-request-details=true
|
||||||
pagehelper.PageRowBounds=true
|
pagehelper.PageRowBounds=true
|
||||||
#excel等用户上传文件路径
|
#excel\u7B49\u7528\u6237\u4E0A\u4F20\u6587\u4EF6\u8DEF\u5F84
|
||||||
upload.file.path=/opt/dataease/data/kettle/
|
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.enabled=true
|
||||||
server.compression.mime-types=application/javascript,text/css,application/json,application/xml,text/html,text/xml,text/plain
|
server.compression.mime-types=application/javascript,text/css,application/json,application/xml,text/html,text/xml,text/plain
|
||||||
server.compression.min-response-size=1024
|
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=redis
|
||||||
#spring.cache.type=ehcache
|
#spring.cache.type=ehcache
|
||||||
#redis公共配置
|
#redis\u516C\u5171\u914D\u7F6E
|
||||||
#spring.redis.timeout=10000
|
#spring.redis.timeout=10000
|
||||||
#spring.redis.lettuce.pool.max-active=8
|
#spring.redis.lettuce.pool.max-active=8
|
||||||
#spring.redis.lettuce.pool.max-wait=-1
|
#spring.redis.lettuce.pool.max-wait=-1
|
||||||
#spring.redis.lettuce.pool.max-idle=8
|
#spring.redis.lettuce.pool.max-idle=8
|
||||||
|
|
||||||
#单机模式redis配置
|
#\u5355\u673A\u6A21\u5F0Fredis\u914D\u7F6E
|
||||||
#spring.redis.database=0
|
#spring.redis.database=0
|
||||||
#spring.redis.host=192.168.0.110
|
#spring.redis.host=192.168.0.110
|
||||||
#spring.redis.port=6379
|
#spring.redis.port=6379
|
||||||
#spring.redis.password=DataEase_ZNB@REDIS
|
#spring.redis.password=DataEase_ZNB@REDIS
|
||||||
|
|
||||||
#哨兵模式redis配置
|
#\u54E8\u5175\u6A21\u5F0Fredis\u914D\u7F6E
|
||||||
#spring.redis.sentinel.master=mymaster
|
#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.nodes=192.168.0.110:26379,192.168.0.110:26380,192.168.0.110:26381
|
||||||
#spring.redis.sentinel.password=
|
#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.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.cluster.max-redirects=3
|
||||||
#spring.redis.password=DataEase_ZNB@REDIS
|
#spring.redis.password=DataEase_ZNB@REDIS
|
||||||
|
@ -39,3 +39,9 @@ WHERE (`component` = 'msg/setting');
|
|||||||
|
|
||||||
ALTER TABLE `panel_group`
|
ALTER TABLE `panel_group`
|
||||||
ADD COLUMN `panel_sort` bigint(13) NULL COMMENT '排序' AFTER `watermark_open`;
|
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`;
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
"@antv/l7-scene": "2.8.31",
|
"@antv/l7-scene": "2.8.31",
|
||||||
"@antv/l7-source": "2.8.31",
|
"@antv/l7-source": "2.8.31",
|
||||||
"@antv/l7-utils": "2.8.31",
|
"@antv/l7-utils": "2.8.31",
|
||||||
"@antv/s2": "^1.11.0",
|
"@antv/s2": "1.35.0",
|
||||||
"@antv/util": "^2.0.17",
|
"@antv/util": "^2.0.17",
|
||||||
"@riophae/vue-treeselect": "0.4.0",
|
"@riophae/vue-treeselect": "0.4.0",
|
||||||
"@tinymce/tinymce-vue": "^3.2.8",
|
"@tinymce/tinymce-vue": "^3.2.8",
|
||||||
|
@ -38,7 +38,7 @@ export function loadShares(data) {
|
|||||||
return request({
|
return request({
|
||||||
url: '/api/share/queryWithResourceId',
|
url: '/api/share/queryWithResourceId',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
loading: true,
|
loading: false,
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ export function loadTable(data) {
|
|||||||
url: 'api/dept/search',
|
url: 'api/dept/search',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data,
|
data,
|
||||||
loading: true
|
loading: false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,6 +99,30 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<el-tooltip
|
||||||
|
v-if="attrShow('fontSize')"
|
||||||
|
:content="$t('panel.active_font_size')"
|
||||||
|
>
|
||||||
|
<i
|
||||||
|
style="float: left;margin-top: 3px;margin-left: 2px;"
|
||||||
|
class="iconfont icon-font"
|
||||||
|
/>
|
||||||
|
</el-tooltip>
|
||||||
|
|
||||||
|
<div
|
||||||
|
v-if="attrShow('activeFontSize')"
|
||||||
|
style="width: 70px;float: left;margin-top: 2px;margin-left: 2px;"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="initActiveFontSize"
|
||||||
|
type="number"
|
||||||
|
size="mini"
|
||||||
|
:min="miniFontSize"
|
||||||
|
:max="maxFontSize"
|
||||||
|
@change="styleChange"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<el-tooltip
|
<el-tooltip
|
||||||
v-if="attrShow('fontWeight')"
|
v-if="attrShow('fontWeight')"
|
||||||
:content="$t('panel.fontWeight')"
|
:content="$t('panel.fontWeight')"
|
||||||
@ -440,6 +464,7 @@ export default {
|
|||||||
innerOpacity: 0,
|
innerOpacity: 0,
|
||||||
mainWidthOffset: 600,
|
mainWidthOffset: 600,
|
||||||
initFontSize: 12,
|
initFontSize: 12,
|
||||||
|
initActiveFontSize: 18,
|
||||||
miniFontSize: 0,
|
miniFontSize: 0,
|
||||||
maxFontSize: 128,
|
maxFontSize: 128,
|
||||||
textAlignOptions: [
|
textAlignOptions: [
|
||||||
@ -520,6 +545,7 @@ export default {
|
|||||||
// tab组件显示的属性
|
// tab组件显示的属性
|
||||||
'de-tabs': [
|
'de-tabs': [
|
||||||
'fontSize',
|
'fontSize',
|
||||||
|
'activeFontSize',
|
||||||
'borderStyle',
|
'borderStyle',
|
||||||
'borderWidth',
|
'borderWidth',
|
||||||
'borderColor',
|
'borderColor',
|
||||||
@ -623,6 +649,7 @@ export default {
|
|||||||
handler(newVal, oldVla) {
|
handler(newVal, oldVla) {
|
||||||
if (newVal.fontSize) {
|
if (newVal.fontSize) {
|
||||||
this.initFontSize = newVal.fontSize
|
this.initFontSize = newVal.fontSize
|
||||||
|
this.initActiveFontSize = newVal.activeFontSize
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
deep: true
|
deep: true
|
||||||
@ -632,6 +659,17 @@ export default {
|
|||||||
this.styleInfo['opacity'] = this.innerOpacity / 100
|
this.styleInfo['opacity'] = this.innerOpacity / 100
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
initActiveFontSize: {
|
||||||
|
handler(newVal) {
|
||||||
|
if (newVal < this.miniFontSize) {
|
||||||
|
this.styleInfo.activeFontSize = this.miniFontSize
|
||||||
|
} else if (newVal > this.maxFontSize) {
|
||||||
|
this.styleInfo.activeFontSize = this.maxFontSize
|
||||||
|
} else {
|
||||||
|
this.styleInfo.activeFontSize = newVal
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
initFontSize: {
|
initFontSize: {
|
||||||
handler(newVal) {
|
handler(newVal) {
|
||||||
if (newVal < this.miniFontSize) {
|
if (newVal < this.miniFontSize) {
|
||||||
@ -656,6 +694,9 @@ export default {
|
|||||||
if (this.attrShow('fontSize')) {
|
if (this.attrShow('fontSize')) {
|
||||||
this.initFontSize = this.styleInfo.fontSize
|
this.initFontSize = this.styleInfo.fontSize
|
||||||
}
|
}
|
||||||
|
if (this.attrShow('activeFontSize')) {
|
||||||
|
this.initActiveFontSize = this.styleInfo.activeFontSize
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
v-if="isPublicLink"
|
v-if="isPublicLink"
|
||||||
ref="widget-div"
|
ref="widget-div"
|
||||||
class="function-div"
|
class="function-div"
|
||||||
|
:class="functionClass"
|
||||||
>
|
>
|
||||||
<el-button-group size="mini">
|
<el-button-group size="mini">
|
||||||
<el-button
|
<el-button
|
||||||
@ -22,7 +23,10 @@
|
|||||||
v-if="existLinkage"
|
v-if="existLinkage"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="clearAllLinkage"
|
@click="clearAllLinkage"
|
||||||
><i class="icon iconfont icon-quxiaoliandong" />{{ $t('panel.remove_all_linkage') }}</el-button>
|
><i
|
||||||
|
style="width: 12px;height: 12px"
|
||||||
|
class="icon iconfont icon-quxiaoliandong"
|
||||||
|
/>{{ $t('panel.remove_all_linkage') }}</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="exportPDF"
|
@click="exportPDF"
|
||||||
@ -52,7 +56,25 @@ import { mapState } from 'vuex'
|
|||||||
import bus from '@/utils/bus'
|
import bus from '@/utils/bus'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
props: {
|
||||||
|
canvasStyleData: {
|
||||||
|
type: Object,
|
||||||
|
default: null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
functionClass() {
|
||||||
|
let result = 'function-light'
|
||||||
|
if (this.canvasStyleData?.panel?.themeColor === 'dark') {
|
||||||
|
result = 'function-dark'
|
||||||
|
}
|
||||||
|
return result
|
||||||
|
},
|
||||||
existLinkage() {
|
existLinkage() {
|
||||||
let linkageFiltersCount = 0
|
let linkageFiltersCount = 0
|
||||||
this.componentData.forEach(item => {
|
this.componentData.forEach(item => {
|
||||||
@ -142,13 +164,43 @@ export default {
|
|||||||
width: max-content;
|
width: max-content;
|
||||||
text-align: end;
|
text-align: end;
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
::v-deep button:hover {
|
border-radius: 4px;
|
||||||
background-color: rgba(31, 35, 41, 0.1);
|
::v-deep button {
|
||||||
color: #1F2329;
|
border-radius: 0px;
|
||||||
font-weight: bold;
|
}
|
||||||
border-color: rgba(31, 35, 41, 0.1)
|
}
|
||||||
|
.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 {
|
&:hover {
|
||||||
border-top: 60px solid rgba(245, 74, 69, 0);;
|
border-top: 60px solid rgba(245, 74, 69, 0);;
|
||||||
|
@ -201,12 +201,16 @@ export default {
|
|||||||
componentActiveFlag() {
|
componentActiveFlag() {
|
||||||
return !this.mobileLayoutStatus && ((this.curComponent && this.config === this.curComponent && !this.previewVisible && !this.showPosition.includes('email-task')) || this.showPosition.includes('multiplexing'))
|
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() {
|
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([
|
...mapState([
|
||||||
'mobileLayoutStatus',
|
'mobileLayoutStatus',
|
||||||
'curComponent',
|
'curComponent',
|
||||||
|
'previewCanvasScale',
|
||||||
'componentGap'
|
'componentGap'
|
||||||
])
|
])
|
||||||
},
|
},
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
>
|
>
|
||||||
<canvas-opt-bar
|
<canvas-opt-bar
|
||||||
ref="canvas-opt-bar"
|
ref="canvas-opt-bar"
|
||||||
|
:canvas-style-data="canvasStyleData"
|
||||||
@link-export-pdf="downloadAsPDF"
|
@link-export-pdf="downloadAsPDF"
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
@ -207,6 +208,7 @@ export default {
|
|||||||
'left',
|
'left',
|
||||||
'width',
|
'width',
|
||||||
'fontSize',
|
'fontSize',
|
||||||
|
'activeFontSize',
|
||||||
'borderWidth',
|
'borderWidth',
|
||||||
'letterSpacing'
|
'letterSpacing'
|
||||||
],
|
],
|
||||||
@ -550,7 +552,7 @@ export default {
|
|||||||
component.style[key] = this.format(component.style[key], this.scaleHeight)
|
component.style[key] = this.format(component.style[key], this.scaleHeight)
|
||||||
}
|
}
|
||||||
if (this.needToChangeWidth.includes(key)) {
|
if (this.needToChangeWidth.includes(key)) {
|
||||||
if (key === 'fontSize' && this.terminal === 'mobile') {
|
if (key === 'fontSize' && (this.terminal === 'mobile' || component.type === 'custom')) {
|
||||||
// do nothing 移动端字符大小无需按照比例缩放,当前保持不变(包括 v-text 和 过滤组件)
|
// do nothing 移动端字符大小无需按照比例缩放,当前保持不变(包括 v-text 和 过滤组件)
|
||||||
} else {
|
} else {
|
||||||
component.style[key] = this.format(component.style[key], this.scaleWidth)
|
component.style[key] = this.format(component.style[key], this.scaleWidth)
|
||||||
@ -615,11 +617,16 @@ export default {
|
|||||||
const domId = this.canvasInfoTemp
|
const domId = this.canvasInfoTemp
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.exporting = true
|
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(() => {
|
setTimeout(() => {
|
||||||
html2canvas(document.getElementById(domId)).then(canvas => {
|
html2canvas(document.getElementById(domId)).then(canvas => {
|
||||||
const snapshot = canvas.toDataURL('image/jpeg', 1) // 是图片质量
|
const snapshot = canvas.toDataURL('image/jpeg', 1) // 是图片质量
|
||||||
this.dataLoading = false
|
this.dataLoading = false
|
||||||
this.exporting = false
|
this.exporting = false
|
||||||
|
this.backScreenShot = false
|
||||||
if (snapshot !== '') {
|
if (snapshot !== '') {
|
||||||
this.snapshotInfo = snapshot
|
this.snapshotInfo = snapshot
|
||||||
this.pdfExportShow = true
|
this.pdfExportShow = true
|
||||||
|
@ -585,6 +585,9 @@ export default {
|
|||||||
updateParams['customAttr'] = this.sourceCustomAttrStr
|
updateParams['customAttr'] = this.sourceCustomAttrStr
|
||||||
} else if (param.custom === 'customStyle') {
|
} else if (param.custom === 'customStyle') {
|
||||||
const sourceCustomStyle = JSON.parse(this.sourceCustomStyleStr)
|
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]
|
sourceCustomStyle[param.property][param.value.modifyName] = param.value[param.value.modifyName]
|
||||||
this.sourceCustomStyleStr = JSON.stringify(sourceCustomStyle)
|
this.sourceCustomStyleStr = JSON.stringify(sourceCustomStyle)
|
||||||
this.chart.customStyle = this.sourceCustomStyleStr
|
this.chart.customStyle = this.sourceCustomStyleStr
|
||||||
|
@ -94,8 +94,7 @@ export const VIDEOLINKS = {
|
|||||||
fullscreenToggle: false,
|
fullscreenToggle: false,
|
||||||
pause: false
|
pause: false
|
||||||
},
|
},
|
||||||
sources: [{
|
sources: [{}]
|
||||||
}]
|
|
||||||
},
|
},
|
||||||
rtmp: {
|
rtmp: {
|
||||||
sources: [{
|
sources: [{
|
||||||
@ -389,7 +388,10 @@ const list = [
|
|||||||
borderStyle: 'solid',
|
borderStyle: 'solid',
|
||||||
borderWidth: 0,
|
borderWidth: 0,
|
||||||
borderColor: '#000000',
|
borderColor: '#000000',
|
||||||
fontSize: 16
|
fontSize: 16,
|
||||||
|
activeFontSize: 18,
|
||||||
|
carouselEnable: false,
|
||||||
|
switchTime: 5
|
||||||
},
|
},
|
||||||
options: {
|
options: {
|
||||||
tabList: [{
|
tabList: [{
|
||||||
|
@ -103,6 +103,9 @@ export function panelDataPrepare(componentData, componentStyle, callback) {
|
|||||||
}
|
}
|
||||||
if (item.type === 'de-tabs') {
|
if (item.type === 'de-tabs') {
|
||||||
item.style.fontSize = item.style.fontSize || 16
|
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') {
|
if (item.type === 'custom') {
|
||||||
item.options.manualModify = false
|
item.options.manualModify = false
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
<div
|
<div
|
||||||
ref="myContainer"
|
ref="myContainer"
|
||||||
class="my-container"
|
class="my-container"
|
||||||
|
:style="autoStyle"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
ref="conditionMain"
|
ref="conditionMain"
|
||||||
@ -60,6 +61,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import inputStyleMixin from '@/components/widget/deWidget/inputStyleMixin'
|
import inputStyleMixin from '@/components/widget/deWidget/inputStyleMixin'
|
||||||
|
import { mapState } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'DeOutWidget',
|
name: 'DeOutWidget',
|
||||||
mixins: [inputStyleMixin],
|
mixins: [inputStyleMixin],
|
||||||
@ -112,6 +115,18 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
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() {
|
sizeInfo() {
|
||||||
let size
|
let size
|
||||||
if (this.duHeight > this.inputLargeSize) {
|
if (this.duHeight > this.inputLargeSize) {
|
||||||
@ -133,7 +148,10 @@ export default {
|
|||||||
},
|
},
|
||||||
isFilterComponent() {
|
isFilterComponent() {
|
||||||
return ['de-select', 'de-select-grid', 'de-date', 'de-input-search', 'de-number-range', 'de-select-tree'].includes(this.element.component)
|
return ['de-select', 'de-select-grid', 'de-date', 'de-input-search', 'de-number-range', 'de-select-tree'].includes(this.element.component)
|
||||||
}
|
},
|
||||||
|
...mapState([
|
||||||
|
'previewCanvasScale'
|
||||||
|
])
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'element.style': {
|
'element.style': {
|
||||||
|
@ -71,7 +71,7 @@
|
|||||||
import { linkMultFieldValues, multFieldValues } from '@/api/dataset/dataset'
|
import { linkMultFieldValues, multFieldValues } from '@/api/dataset/dataset'
|
||||||
import { getLinkToken, getToken } from '@/utils/auth'
|
import { getLinkToken, getToken } from '@/utils/auth'
|
||||||
import bus from '@/utils/bus'
|
import bus from '@/utils/bus'
|
||||||
import { isSameVueObj } from '@/utils'
|
import { isSameVueObj, mergeCustomSortOption } from '@/utils'
|
||||||
import { attrsMap, styleAttrs, textSelectGridWidget } from '@/components/widget/deWidget/serviceNameFn.js'
|
import { attrsMap, styleAttrs, textSelectGridWidget } from '@/components/widget/deWidget/serviceNameFn.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -142,6 +142,9 @@ export default {
|
|||||||
cssArr() {
|
cssArr() {
|
||||||
const { brColor, wordColor, innerBgColor } = this.element.style
|
const { brColor, wordColor, innerBgColor } = this.element.style
|
||||||
return { brColor, wordColor, innerBgColor }
|
return { brColor, wordColor, innerBgColor }
|
||||||
|
},
|
||||||
|
isCustomSortWidget() {
|
||||||
|
return this.element.serviceName === 'textSelectGridWidget'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -354,7 +357,11 @@ export default {
|
|||||||
},
|
},
|
||||||
optionData(data) {
|
optionData(data) {
|
||||||
if (!data) return null
|
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 {
|
return {
|
||||||
id: item,
|
id: item,
|
||||||
text: item
|
text: item
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
:name="item.name"
|
:name="item.name"
|
||||||
>
|
>
|
||||||
<span slot="label">
|
<span slot="label">
|
||||||
<span :style="titleStyle">{{ item.title }}</span>
|
<span :style="titleStyle(item.name)">{{ item.title }}</span>
|
||||||
<el-dropdown
|
<el-dropdown
|
||||||
v-if="dropdownShow"
|
v-if="dropdownShow"
|
||||||
slot="label"
|
slot="label"
|
||||||
@ -272,6 +272,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
timer: null,
|
||||||
scrollLeft: 50,
|
scrollLeft: 50,
|
||||||
scrollTop: 10,
|
scrollTop: 10,
|
||||||
// 需要展示属性设置的组件类型
|
// 需要展示属性设置的组件类型
|
||||||
@ -304,11 +305,6 @@ export default {
|
|||||||
maskShow() {
|
maskShow() {
|
||||||
return Boolean(this.$store.state.dragComponentInfo)
|
return Boolean(this.$store.state.dragComponentInfo)
|
||||||
},
|
},
|
||||||
titleStyle() {
|
|
||||||
return {
|
|
||||||
fontSize: (this.element.style.fontSize || 16) + 'px'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headClass() {
|
headClass() {
|
||||||
return 'tab-head-' + this.element.style.headPosition
|
return 'tab-head-' + this.element.style.headPosition
|
||||||
},
|
},
|
||||||
@ -393,6 +389,16 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
'element.style.carouselEnable': {
|
||||||
|
handler(newVal, oldVla) {
|
||||||
|
this.initCarousel()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'element.style.switchTime': {
|
||||||
|
handler(newVal, oldVla) {
|
||||||
|
this.initCarousel()
|
||||||
|
}
|
||||||
|
},
|
||||||
activeTabName: {
|
activeTabName: {
|
||||||
handler(newVal, oldVla) {
|
handler(newVal, oldVla) {
|
||||||
this.$store.commit('setTabActiveTabNameMap', { tabId: this.element.id, activeTabName: this.activeTabName })
|
this.$store.commit('setTabActiveTabNameMap', { tabId: this.element.id, activeTabName: this.activeTabName })
|
||||||
@ -439,10 +445,37 @@ export default {
|
|||||||
this.$store.commit('setTabActiveTabNameMap', { tabId: this.element.id, activeTabName: this.activeTabName })
|
this.$store.commit('setTabActiveTabNameMap', { tabId: this.element.id, activeTabName: this.activeTabName })
|
||||||
this.setContentThemeStyle()
|
this.setContentThemeStyle()
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
this.initCarousel()
|
||||||
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
bus.$off('add-new-tab', this.addNewTab)
|
bus.$off('add-new-tab', this.addNewTab)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
titleStyle(itemName) {
|
||||||
|
if (this.activeTabName === itemName) {
|
||||||
|
return {
|
||||||
|
fontSize: (this.element.style.activeFontSize || 18) + 'px'
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return {
|
||||||
|
fontSize: (this.element.style.fontSize || 16) + 'px'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
initCarousel() {
|
||||||
|
this.timer && clearInterval(this.timer)
|
||||||
|
if (this.element.style.carouselEnable) {
|
||||||
|
const switchTime = (this.element.style.switchTime || 5) * 1000
|
||||||
|
let switchCount = 1
|
||||||
|
// 轮播定时器
|
||||||
|
this.timer = setInterval(() => {
|
||||||
|
switchCount++
|
||||||
|
const nowIndex = switchCount % this.element.options.tabList.length
|
||||||
|
this.activeTabName = this.element.options.tabList[nowIndex].name
|
||||||
|
}, switchTime)
|
||||||
|
}
|
||||||
|
},
|
||||||
initScroll() {
|
initScroll() {
|
||||||
this.scrollLeft = 50
|
this.scrollLeft = 50
|
||||||
this.scrollTop = 10
|
this.scrollTop = 10
|
||||||
|
@ -112,6 +112,38 @@
|
|||||||
<el-radio-button label="right">{{ $t('chart.text_pos_right') }}</el-radio-button>
|
<el-radio-button label="right">{{ $t('chart.text_pos_right') }}</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item :label="$t('panel.carousel')">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-checkbox
|
||||||
|
v-model="styleInfo.carouselEnable"
|
||||||
|
size="mini"
|
||||||
|
@change="styleChange"
|
||||||
|
>{{ $t('commons.enable') }}
|
||||||
|
</el-checkbox>
|
||||||
|
</el-col>
|
||||||
|
<el-col
|
||||||
|
:span="8"
|
||||||
|
style="text-align: right;padding-right: 10px"
|
||||||
|
>
|
||||||
|
{{ $t('panel.switch_time') }}
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="10">
|
||||||
|
<el-input
|
||||||
|
v-model="styleInfo.switchTime"
|
||||||
|
:disabled="!styleInfo.carouselEnable"
|
||||||
|
type="number"
|
||||||
|
size="mini"
|
||||||
|
:min="2"
|
||||||
|
class="hide-icon-number"
|
||||||
|
@change="styleChange"
|
||||||
|
>
|
||||||
|
<template slot="append">S</template>
|
||||||
|
</el-input>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
</el-row>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<i
|
<i
|
||||||
slot="reference"
|
slot="reference"
|
||||||
|
@ -96,6 +96,9 @@ class TextSelectGridServiceImpl extends WidgetService {
|
|||||||
isSortWidget() {
|
isSortWidget() {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
isCustomSortWidget() {
|
||||||
|
return true
|
||||||
|
}
|
||||||
fillValueDerfault(element) {
|
fillValueDerfault(element) {
|
||||||
const defaultV = element.options.value === null ? '' : element.options.value.toString()
|
const defaultV = element.options.value === null ? '' : element.options.value.toString()
|
||||||
if (element.options.attrs.multiple) {
|
if (element.options.attrs.multiple) {
|
||||||
|
@ -1,4 +1 @@
|
|||||||
<svg width="8" height="14" viewBox="0 0 8 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="16px" height="16.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M393.390114 512.023536l347.948667-336.348468c20.50808-19.85828 20.50808-51.997258 0-71.792093-20.507056-19.826558-53.778834-19.826558-74.28589 0L281.990954 476.135164c-20.476357 19.826558-20.476357 51.981908 0 71.746044l385.061936 372.236839c10.285251 9.91379 23.728424 14.869662 37.173644 14.869662 13.446243 0 26.889417-4.956895 37.112246-14.901385 20.50808-19.826558 20.50808-51.919487 0-71.746044L393.390114 512.023536" /></svg>
|
||||||
<path d="M2.09092 7.00066L7.51207 12.4218C7.64225 12.552 7.64225 12.763 7.51207 12.8932L7.04067 13.3646C6.91049 13.4948 6.69944 13.4948 6.56926 13.3646L0.676707 7.47206C0.416358 7.21171 0.416358 6.7896 0.676707 6.52925L6.56926 0.636694C6.69944 0.506519 6.91049 0.506519 7.04067 0.636694L7.51207 1.1081C7.64225 1.23827 7.64225 1.44933 7.51207 1.5795L2.09092 7.00066Z" fill="#1F2329" />
|
|
||||||
</svg>
|
|
||||||
|
|
Before Width: | Height: | Size: 490 B After Width: | Height: | Size: 697 B |
@ -1,4 +1 @@
|
|||||||
<svg width="12" height="14" viewBox="0 0 12 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="16px" height="16.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M828.975746 894.125047 190.189132 894.125047c-70.550823 0-127.753639-57.18542-127.753639-127.752616L62.435493 606.674243c0-17.634636 14.308891-31.933293 31.93227-31.933293l63.889099 0c17.634636 0 31.93227 14.298658 31.93227 31.933293l0 95.821369c0 35.282574 28.596292 63.877843 63.87682 63.877843L765.098927 766.373455c35.281551 0 63.87682-28.595268 63.87682-63.877843l0-95.821369c0-17.634636 14.298658-31.933293 31.943526-31.933293l63.877843 0c17.634636 0 31.933293 14.298658 31.933293 31.933293l0 159.699212C956.729385 836.939627 899.538849 894.125047 828.975746 894.125047L828.975746 894.125047zM249.938957 267.509636c12.921287-12.919241 33.884738-12.919241 46.807049 0l148.97087 148.971893L445.716876 94.89323c0-17.634636 14.300704-31.94762 31.933293-31.94762l63.875796 0c17.637706 0 31.945573 14.312984 31.945573 31.94762l0 321.588299 148.97087-148.971893c12.921287-12.919241 33.875528-12.919241 46.796816 0l46.814212 46.818305c12.921287 12.922311 12.921287 33.874505 0 46.807049L552.261471 624.930025c-1.140986 1.137916-21.664416 13.68365-42.315758 13.69286-20.87647 0.010233-41.878806-12.541641-43.020816-13.69286L203.121676 361.13499c-12.922311-12.933567-12.922311-33.884738 0-46.807049L249.938957 267.509636 249.938957 267.509636z" fill="" /></svg>
|
||||||
<path d="M12 11.3327V12.9994C12 13.3675 11.7015 13.666 11.3333 13.666H0.666667C0.298477 13.666 0 13.3675 0 12.9994V11.3327C0 11.1486 0.149238 10.9994 0.333333 10.9994H1C1.18409 10.9994 1.33333 11.1486 1.33333 11.3327V12.3327H10.6667V11.3327C10.6667 11.1486 10.8159 10.9994 11 10.9994H11.6667C11.8508 10.9994 12 11.1486 12 11.3327ZM6.66667 8.35649L8.67365 6.34952C8.80382 6.21934 9.01488 6.21934 9.14505 6.34952L9.61646 6.82092C9.74663 6.95109 9.74663 7.16215 9.61646 7.29232L6.31663 10.5922C6.25154 10.6572 6.16623 10.6898 6.08092 10.6898C5.99562 10.6898 5.91031 10.6572 5.84522 10.5922L2.54539 7.29232C2.41521 7.16215 2.41521 6.95109 2.54539 6.82092L3.01679 6.34952C3.14697 6.21934 3.35802 6.21934 3.4882 6.34952L5.33334 8.19465V0.999349C5.33334 0.815254 5.48257 0.666016 5.66667 0.666016H6.33334C6.51743 0.666016 6.66667 0.815254 6.66667 0.999349V8.35649Z" fill="#1F2329" />
|
|
||||||
</svg>
|
|
||||||
|
|
Before Width: | Height: | Size: 984 B After Width: | Height: | Size: 1.5 KiB |
@ -915,9 +915,11 @@ export default {
|
|||||||
password_input_error: 'Original password input error'
|
password_input_error: 'Original password input error'
|
||||||
},
|
},
|
||||||
chart: {
|
chart: {
|
||||||
|
gradient: 'Gradient',
|
||||||
layer_controller: 'Quota switch',
|
layer_controller: 'Quota switch',
|
||||||
suspension: 'Suspension',
|
suspension: 'Suspension',
|
||||||
chart_background: 'Component background',
|
chart_background: 'Component background',
|
||||||
|
date_format: 'Select date resolution format',
|
||||||
solid_color: 'Solid color',
|
solid_color: 'Solid color',
|
||||||
split_gradient: 'Split gradient',
|
split_gradient: 'Split gradient',
|
||||||
continuous_gradient: 'Continuous gradient',
|
continuous_gradient: 'Continuous gradient',
|
||||||
@ -1876,10 +1878,13 @@ export default {
|
|||||||
back_parent: 'Back to previous'
|
back_parent: 'Back to previous'
|
||||||
},
|
},
|
||||||
panel: {
|
panel: {
|
||||||
|
active_font_size: 'Active font size',
|
||||||
|
carousel: 'Carousel',
|
||||||
|
switch_time: 'Switch time',
|
||||||
position_adjust: 'Position',
|
position_adjust: 'Position',
|
||||||
space_top: 'Top',
|
space_top: 'Top',
|
||||||
space_left: 'Left',
|
space_left: 'Left',
|
||||||
space_width: 'Widht',
|
space_width: 'Width',
|
||||||
space_height: 'Height',
|
space_height: 'Height',
|
||||||
to_top: 'To Top',
|
to_top: 'To Top',
|
||||||
down: 'Down',
|
down: 'Down',
|
||||||
@ -2543,9 +2548,9 @@ export default {
|
|||||||
start_time: 'Start time',
|
start_time: 'Start time',
|
||||||
end_time: 'End time',
|
end_time: 'End time',
|
||||||
chart_data: 'View data',
|
chart_data: 'View data',
|
||||||
panel_preview: 'Preview panel',
|
panel_preview: 'Preview report',
|
||||||
preview: 'Preview',
|
preview: 'Preview',
|
||||||
emial_preview: 'Emial preview',
|
emial_preview: 'Report preview',
|
||||||
chart_data_range: 'View data range',
|
chart_data_range: 'View data range',
|
||||||
simple_repeat: 'Simple repeat',
|
simple_repeat: 'Simple repeat',
|
||||||
once_a_day: 'Once a day',
|
once_a_day: 'Once a day',
|
||||||
|
@ -915,9 +915,11 @@ export default {
|
|||||||
password_input_error: '原始密碼輸入錯誤'
|
password_input_error: '原始密碼輸入錯誤'
|
||||||
},
|
},
|
||||||
chart: {
|
chart: {
|
||||||
|
gradient: '漸變',
|
||||||
layer_controller: '指標切換',
|
layer_controller: '指標切換',
|
||||||
suspension: '懸浮',
|
suspension: '懸浮',
|
||||||
chart_background: '組件背景',
|
chart_background: '組件背景',
|
||||||
|
date_format: '選擇日期解析格式',
|
||||||
solid_color: '純色',
|
solid_color: '純色',
|
||||||
split_gradient: '分離漸變',
|
split_gradient: '分離漸變',
|
||||||
continuous_gradient: '連續漸變',
|
continuous_gradient: '連續漸變',
|
||||||
@ -1876,6 +1878,9 @@ export default {
|
|||||||
back_parent: '返回上一級'
|
back_parent: '返回上一級'
|
||||||
},
|
},
|
||||||
panel: {
|
panel: {
|
||||||
|
active_font_size: '激活字體大小',
|
||||||
|
carousel: '輪播',
|
||||||
|
switch_time: '切換時間',
|
||||||
position_adjust: '位置',
|
position_adjust: '位置',
|
||||||
space_top: '上',
|
space_top: '上',
|
||||||
space_left: '左',
|
space_left: '左',
|
||||||
@ -2544,9 +2549,9 @@ export default {
|
|||||||
start_time: '開始時間',
|
start_time: '開始時間',
|
||||||
end_time: '結束時間',
|
end_time: '結束時間',
|
||||||
chart_data: '視圖數據',
|
chart_data: '視圖數據',
|
||||||
panel_preview: '預覽儀表板',
|
panel_preview: '預覽報告',
|
||||||
preview: '預覽',
|
preview: '預覽',
|
||||||
emial_preview: '郵件預覽',
|
emial_preview: '報告預覽',
|
||||||
chart_data_range: '視圖數據範圍',
|
chart_data_range: '視圖數據範圍',
|
||||||
simple_repeat: '簡單重複',
|
simple_repeat: '簡單重複',
|
||||||
once_a_day: '每天一次',
|
once_a_day: '每天一次',
|
||||||
|
@ -914,9 +914,11 @@ export default {
|
|||||||
password_input_error: '原始密码输入错误'
|
password_input_error: '原始密码输入错误'
|
||||||
},
|
},
|
||||||
chart: {
|
chart: {
|
||||||
|
gradient: '渐变',
|
||||||
layer_controller: '指标切换',
|
layer_controller: '指标切换',
|
||||||
suspension: '悬浮',
|
suspension: '悬浮',
|
||||||
chart_background: '组件背景',
|
chart_background: '组件背景',
|
||||||
|
date_format: '请选择日期解析格式',
|
||||||
solid_color: '纯色',
|
solid_color: '纯色',
|
||||||
split_gradient: '分离渐变',
|
split_gradient: '分离渐变',
|
||||||
continuous_gradient: '连续渐变',
|
continuous_gradient: '连续渐变',
|
||||||
@ -1876,6 +1878,9 @@ export default {
|
|||||||
back_parent: '返回上一级'
|
back_parent: '返回上一级'
|
||||||
},
|
},
|
||||||
panel: {
|
panel: {
|
||||||
|
active_font_size: '激活字体大小',
|
||||||
|
carousel: '轮播',
|
||||||
|
switch_time: '切换时间',
|
||||||
position_adjust: '位置',
|
position_adjust: '位置',
|
||||||
space_top: '上',
|
space_top: '上',
|
||||||
space_left: '左',
|
space_left: '左',
|
||||||
@ -2544,9 +2549,9 @@ export default {
|
|||||||
start_time: '开始时间',
|
start_time: '开始时间',
|
||||||
end_time: '结束时间',
|
end_time: '结束时间',
|
||||||
chart_data: '视图数据',
|
chart_data: '视图数据',
|
||||||
panel_preview: '预览仪表板',
|
panel_preview: '预览报告',
|
||||||
preview: '预览',
|
preview: '预览',
|
||||||
emial_preview: '邮件预览',
|
emial_preview: '报告预览',
|
||||||
chart_data_range: '视图数据范围',
|
chart_data_range: '视图数据范围',
|
||||||
simple_repeat: '简单重复',
|
simple_repeat: '简单重复',
|
||||||
once_a_day: '每天一次',
|
once_a_day: '每天一次',
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,8 +1,8 @@
|
|||||||
@font-face {
|
@font-face {
|
||||||
font-family: "iconfont"; /* Project id 2459092 */
|
font-family: "iconfont"; /* Project id 2459092 */
|
||||||
src: url('iconfont.woff2?t=1668397590143') format('woff2'),
|
src: url('iconfont.woff2?t=1669087400468') format('woff2'),
|
||||||
url('iconfont.woff?t=1668397590143') format('woff'),
|
url('iconfont.woff?t=1669087400468') format('woff'),
|
||||||
url('iconfont.ttf?t=1668397590143') format('truetype');
|
url('iconfont.ttf?t=1669087400468') format('truetype');
|
||||||
}
|
}
|
||||||
|
|
||||||
.iconfont {
|
.iconfont {
|
||||||
@ -13,6 +13,10 @@
|
|||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.icon-font:before {
|
||||||
|
content: "\e63d";
|
||||||
|
}
|
||||||
|
|
||||||
.icon-WATERMARK:before {
|
.icon-WATERMARK:before {
|
||||||
content: "\ea16";
|
content: "\ea16";
|
||||||
}
|
}
|
||||||
|
File diff suppressed because one or more lines are too long
@ -5,6 +5,13 @@
|
|||||||
"css_prefix_text": "icon-",
|
"css_prefix_text": "icon-",
|
||||||
"description": "",
|
"description": "",
|
||||||
"glyphs": [
|
"glyphs": [
|
||||||
|
{
|
||||||
|
"icon_id": "109745",
|
||||||
|
"name": "font",
|
||||||
|
"font_class": "font",
|
||||||
|
"unicode": "e63d",
|
||||||
|
"unicode_decimal": 58941
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"icon_id": "23072499",
|
"icon_id": "23072499",
|
||||||
"name": "WATERMARK",
|
"name": "WATERMARK",
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -103,6 +103,11 @@ export function baseBarOptionAntV(plot, container, chart, action, isGroup, isSta
|
|||||||
options.isPercent = chart.type === 'percentage-bar-stack'
|
options.isPercent = chart.type === 'percentage-bar-stack'
|
||||||
// custom color
|
// custom color
|
||||||
options.color = antVCustomColor(chart)
|
options.color = antVCustomColor(chart)
|
||||||
|
if (customAttr.color.gradient) {
|
||||||
|
options.color = options.color.map((ele) => {
|
||||||
|
return `l(270) 0:#ffffff00 1:${ele}`
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 开始渲染
|
// 开始渲染
|
||||||
if (plot) {
|
if (plot) {
|
||||||
@ -199,6 +204,11 @@ export function hBaseBarOptionAntV(plot, container, chart, action, isGroup, isSt
|
|||||||
}
|
}
|
||||||
// custom color
|
// custom color
|
||||||
options.color = antVCustomColor(chart)
|
options.color = antVCustomColor(chart)
|
||||||
|
if (customAttr.color.gradient) {
|
||||||
|
options.color = options.color.map((ele) => {
|
||||||
|
return `l(0) 0:#ffffff00 1:${ele}`
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 开始渲染
|
// 开始渲染
|
||||||
if (plot) {
|
if (plot) {
|
||||||
|
@ -28,6 +28,7 @@ export const DEFAULT_COLOR_CASE = {
|
|||||||
tableBorderColor: '#E6E7E4',
|
tableBorderColor: '#E6E7E4',
|
||||||
seriesColors: [], // 格式:{"name":"s1","color":"","isCustom":false}
|
seriesColors: [], // 格式:{"name":"s1","color":"","isCustom":false}
|
||||||
areaBorderColor: '#303133',
|
areaBorderColor: '#303133',
|
||||||
|
gradient: false,
|
||||||
areaBaseColor: '#FFFFFF',
|
areaBaseColor: '#FFFFFF',
|
||||||
tableScrollBarColor: 'rgba(0, 0, 0, 0.15)',
|
tableScrollBarColor: 'rgba(0, 0, 0, 0.15)',
|
||||||
tableScrollBarHoverColor: 'rgba(0, 0, 0, 0.4)'
|
tableScrollBarHoverColor: 'rgba(0, 0, 0, 0.4)'
|
||||||
|
@ -124,6 +124,7 @@ export function baseGaugeOptionAntV(plot, container, chart, action, scale = 1) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasThreshold) {
|
if (hasThreshold) {
|
||||||
options.range = {
|
options.range = {
|
||||||
color: theme.styleSheet.paletteQualitative10,
|
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) {
|
if (plot) {
|
||||||
plot.destroy()
|
plot.destroy()
|
||||||
|
@ -180,6 +180,17 @@ export function baseAreaOptionAntV(plot, container, chart, action, isStack) {
|
|||||||
}
|
}
|
||||||
// custom color
|
// custom color
|
||||||
options.color = antVCustomColor(chart)
|
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) {
|
if (plot) {
|
||||||
|
@ -82,6 +82,12 @@ export function basePieOptionAntV(plot, container, chart, action) {
|
|||||||
// custom color
|
// custom color
|
||||||
options.color = antVCustomColor(chart)
|
options.color = antVCustomColor(chart)
|
||||||
|
|
||||||
|
if (customAttr.color.gradient) {
|
||||||
|
options.color = options.color.map((ele) => {
|
||||||
|
return `l(270) 0:#ffffff00 1:${ele}`
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 开始渲染
|
// 开始渲染
|
||||||
if (plot) {
|
if (plot) {
|
||||||
plot.destroy()
|
plot.destroy()
|
||||||
@ -159,6 +165,12 @@ export function basePieRoseOptionAntV(plot, container, chart, action) {
|
|||||||
// custom color
|
// custom color
|
||||||
options.color = antVCustomColor(chart)
|
options.color = antVCustomColor(chart)
|
||||||
|
|
||||||
|
if (customAttr.color.gradient) {
|
||||||
|
options.color = options.color.map((ele) => {
|
||||||
|
return `l(270) 0:#ffffff00 1:${ele}`
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 开始渲染
|
// 开始渲染
|
||||||
if (plot) {
|
if (plot) {
|
||||||
plot.destroy()
|
plot.destroy()
|
||||||
|
@ -424,7 +424,7 @@ export function baseTablePivot(s2, container, chart, action, tableData) {
|
|||||||
|
|
||||||
// 解析合计、小计排序
|
// 解析合计、小计排序
|
||||||
const sortParams = []
|
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 = {
|
const sort = {
|
||||||
sortFieldId: c[0],
|
sortFieldId: c[0],
|
||||||
sortMethod: totalCfg.row.totalSort.toUpperCase(),
|
sortMethod: totalCfg.row.totalSort.toUpperCase(),
|
||||||
@ -435,7 +435,8 @@ export function baseTablePivot(s2, container, chart, action, tableData) {
|
|||||||
}
|
}
|
||||||
sortParams.push(sort)
|
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 = {
|
const sort = {
|
||||||
sortFieldId: r[0],
|
sortFieldId: r[0],
|
||||||
sortMethod: totalCfg.col.totalSort.toUpperCase(),
|
sortMethod: totalCfg.col.totalSort.toUpperCase(),
|
||||||
|
@ -284,6 +284,7 @@ export const TYPE_CONFIGS = [
|
|||||||
'color-selector': [
|
'color-selector': [
|
||||||
'value',
|
'value',
|
||||||
'custom',
|
'custom',
|
||||||
|
'gradient',
|
||||||
'alpha'
|
'alpha'
|
||||||
],
|
],
|
||||||
'size-selector-ant-v': [
|
'size-selector-ant-v': [
|
||||||
@ -468,7 +469,8 @@ export const TYPE_CONFIGS = [
|
|||||||
'value',
|
'value',
|
||||||
'colorPanel',
|
'colorPanel',
|
||||||
'customColor',
|
'customColor',
|
||||||
'alpha'
|
'alpha',
|
||||||
|
'gradient'
|
||||||
],
|
],
|
||||||
'size-selector-ant-v': [
|
'size-selector-ant-v': [
|
||||||
'lineWidth',
|
'lineWidth',
|
||||||
@ -628,6 +630,7 @@ export const TYPE_CONFIGS = [
|
|||||||
'value',
|
'value',
|
||||||
'colorPanel',
|
'colorPanel',
|
||||||
'customColor',
|
'customColor',
|
||||||
|
'gradient',
|
||||||
'alpha'
|
'alpha'
|
||||||
],
|
],
|
||||||
'size-selector-ant-v': [
|
'size-selector-ant-v': [
|
||||||
@ -707,6 +710,7 @@ export const TYPE_CONFIGS = [
|
|||||||
'value',
|
'value',
|
||||||
'colorPanel',
|
'colorPanel',
|
||||||
'customColor',
|
'customColor',
|
||||||
|
'gradient',
|
||||||
'alpha'
|
'alpha'
|
||||||
],
|
],
|
||||||
'size-selector-ant-v': [
|
'size-selector-ant-v': [
|
||||||
@ -786,6 +790,7 @@ export const TYPE_CONFIGS = [
|
|||||||
'value',
|
'value',
|
||||||
'colorPanel',
|
'colorPanel',
|
||||||
'customColor',
|
'customColor',
|
||||||
|
'gradient',
|
||||||
'alpha'
|
'alpha'
|
||||||
],
|
],
|
||||||
'size-selector-ant-v': [
|
'size-selector-ant-v': [
|
||||||
@ -865,6 +870,7 @@ export const TYPE_CONFIGS = [
|
|||||||
'value',
|
'value',
|
||||||
'colorPanel',
|
'colorPanel',
|
||||||
'customColor',
|
'customColor',
|
||||||
|
'gradient',
|
||||||
'alpha'
|
'alpha'
|
||||||
],
|
],
|
||||||
'size-selector-ant-v': [
|
'size-selector-ant-v': [
|
||||||
@ -1008,6 +1014,7 @@ export const TYPE_CONFIGS = [
|
|||||||
'value',
|
'value',
|
||||||
'colorPanel',
|
'colorPanel',
|
||||||
'customColor',
|
'customColor',
|
||||||
|
'gradient',
|
||||||
'alpha'
|
'alpha'
|
||||||
],
|
],
|
||||||
'size-selector-ant-v': [
|
'size-selector-ant-v': [
|
||||||
@ -1087,6 +1094,7 @@ export const TYPE_CONFIGS = [
|
|||||||
'value',
|
'value',
|
||||||
'colorPanel',
|
'colorPanel',
|
||||||
'customColor',
|
'customColor',
|
||||||
|
'gradient',
|
||||||
'alpha'
|
'alpha'
|
||||||
],
|
],
|
||||||
'size-selector-ant-v': [
|
'size-selector-ant-v': [
|
||||||
@ -1164,6 +1172,7 @@ export const TYPE_CONFIGS = [
|
|||||||
'value',
|
'value',
|
||||||
'colorPanel',
|
'colorPanel',
|
||||||
'customColor',
|
'customColor',
|
||||||
|
'gradient',
|
||||||
'alpha'
|
'alpha'
|
||||||
],
|
],
|
||||||
'size-selector-ant-v': [
|
'size-selector-ant-v': [
|
||||||
@ -1223,6 +1232,7 @@ export const TYPE_CONFIGS = [
|
|||||||
'value',
|
'value',
|
||||||
'colorPanel',
|
'colorPanel',
|
||||||
'customColor',
|
'customColor',
|
||||||
|
'gradient',
|
||||||
'alpha'
|
'alpha'
|
||||||
],
|
],
|
||||||
'size-selector-ant-v': [
|
'size-selector-ant-v': [
|
||||||
@ -1283,6 +1293,7 @@ export const TYPE_CONFIGS = [
|
|||||||
'value',
|
'value',
|
||||||
'colorPanel',
|
'colorPanel',
|
||||||
'customColor',
|
'customColor',
|
||||||
|
'gradient',
|
||||||
'alpha'
|
'alpha'
|
||||||
],
|
],
|
||||||
'size-selector-ant-v': [
|
'size-selector-ant-v': [
|
||||||
@ -1340,6 +1351,7 @@ export const TYPE_CONFIGS = [
|
|||||||
'value',
|
'value',
|
||||||
'colorPanel',
|
'colorPanel',
|
||||||
'customColor',
|
'customColor',
|
||||||
|
'gradient',
|
||||||
'alpha'
|
'alpha'
|
||||||
],
|
],
|
||||||
'size-selector-ant-v': [
|
'size-selector-ant-v': [
|
||||||
@ -1400,6 +1412,7 @@ export const TYPE_CONFIGS = [
|
|||||||
'value',
|
'value',
|
||||||
'colorPanel',
|
'colorPanel',
|
||||||
'customColor',
|
'customColor',
|
||||||
|
'gradient',
|
||||||
'alpha'
|
'alpha'
|
||||||
],
|
],
|
||||||
'size-selector-ant-v': [
|
'size-selector-ant-v': [
|
||||||
|
@ -55,25 +55,32 @@
|
|||||||
/>
|
/>
|
||||||
<el-row
|
<el-row
|
||||||
v-show="showPage"
|
v-show="showPage"
|
||||||
class="table-page"
|
style="position: relative;"
|
||||||
>
|
>
|
||||||
<span class="total-style">
|
<el-row
|
||||||
{{ $t('chart.total') }}
|
class="table-page"
|
||||||
<span>{{ chart.datasetMode === 0 ? chart.totalItems : ((chart.data && chart.data.tableRow) ? chart.data.tableRow.length : 0) }}</span>
|
:style="autoStyle"
|
||||||
{{ $t('chart.items') }}
|
>
|
||||||
</span>
|
<span class="total-style">
|
||||||
<el-pagination
|
{{ $t('chart.total') }}
|
||||||
small
|
<span>{{
|
||||||
:current-page="currentPage.page"
|
chart.datasetMode === 0 ? chart.totalItems : ((chart.data && chart.data.tableRow) ? chart.data.tableRow.length : 0)
|
||||||
:page-sizes="[10,20,50,100]"
|
}}</span>
|
||||||
:page-size="currentPage.pageSize"
|
{{ $t('chart.items') }}
|
||||||
:pager-count="5"
|
</span>
|
||||||
layout="prev, pager, next"
|
<el-pagination
|
||||||
:total="currentPage.show"
|
small
|
||||||
class="page-style"
|
:current-page="currentPage.page"
|
||||||
@current-change="pageClick"
|
:page-sizes="[10,20,50,100]"
|
||||||
@size-change="pageChange"
|
:page-size="currentPage.pageSize"
|
||||||
/>
|
:pager-count="5"
|
||||||
|
layout="prev, pager, next"
|
||||||
|
:total="currentPage.show"
|
||||||
|
class="page-style"
|
||||||
|
@current-change="pageClick"
|
||||||
|
@size-change="pageChange"
|
||||||
|
/>
|
||||||
|
</el-row>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -87,6 +94,7 @@ import { baseTableInfo, baseTableNormal, baseTablePivot } from '@/views/chart/ch
|
|||||||
import TitleRemark from '@/views/chart/view/TitleRemark'
|
import TitleRemark from '@/views/chart/view/TitleRemark'
|
||||||
import { DEFAULT_TITLE_STYLE } from '@/views/chart/chart/chart'
|
import { DEFAULT_TITLE_STYLE } from '@/views/chart/chart/chart'
|
||||||
import ChartTitleUpdate from './ChartTitleUpdate.vue'
|
import ChartTitleUpdate from './ChartTitleUpdate.vue'
|
||||||
|
import { mapState } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ChartComponentS2',
|
name: 'ChartComponentS2',
|
||||||
@ -162,6 +170,18 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
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() {
|
trackBarStyleTime() {
|
||||||
return this.trackBarStyle
|
return this.trackBarStyle
|
||||||
},
|
},
|
||||||
@ -173,7 +193,10 @@ export default {
|
|||||||
chartInfo() {
|
chartInfo() {
|
||||||
const { id, title } = this.chart
|
const { id, title } = this.chart
|
||||||
return { id, title }
|
return { id, title }
|
||||||
}
|
},
|
||||||
|
...mapState([
|
||||||
|
'previewCanvasScale'
|
||||||
|
])
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
chart: {
|
chart: {
|
||||||
|
@ -151,6 +151,17 @@
|
|||||||
</el-popover>
|
</el-popover>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item
|
||||||
|
v-show="showProperty('gradient')"
|
||||||
|
:label="$t('chart.gradient')"
|
||||||
|
class="form-item"
|
||||||
|
>
|
||||||
|
<el-checkbox
|
||||||
|
v-model="colorForm.gradient"
|
||||||
|
@change="changeColorCase('gradient')"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-show="showProperty('quotaColor')"
|
v-show="showProperty('quotaColor')"
|
||||||
:label="$t('chart.quota_color')"
|
:label="$t('chart.quota_color')"
|
||||||
|
@ -225,7 +225,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-if="chart.type === 'table-pivot'"
|
v-if="false && chart.type === 'table-pivot'"
|
||||||
:label="$t('chart.total_sort')"
|
:label="$t('chart.total_sort')"
|
||||||
class="form-item"
|
class="form-item"
|
||||||
>
|
>
|
||||||
@ -239,7 +239,7 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-if="chart.type === 'table-pivot' && totalForm.col.totalSort !== 'none'"
|
v-if="false && chart.type === 'table-pivot' && totalForm.col.totalSort !== 'none'"
|
||||||
:label="$t('chart.total_sort_field')"
|
:label="$t('chart.total_sort_field')"
|
||||||
class="form-item"
|
class="form-item"
|
||||||
>
|
>
|
||||||
@ -422,12 +422,15 @@ export default {
|
|||||||
this.totalSortFields = JSON.parse(chart.yaxis)
|
this.totalSortFields = JSON.parse(chart.yaxis)
|
||||||
}
|
}
|
||||||
if (this.totalSortFields.length > 0) {
|
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
|
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
|
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) {
|
showProperty(property) {
|
||||||
return this.propertyInner.includes(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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -44,23 +44,33 @@
|
|||||||
v-show="showPage"
|
v-show="showPage"
|
||||||
class="table-page"
|
class="table-page"
|
||||||
>
|
>
|
||||||
<span class="total-style">
|
<el-row style="position: relative;width:100% ">
|
||||||
{{ $t('chart.total') }}
|
<el-row
|
||||||
<span>{{ chart.datasetMode === 0 ? chart.totalItems : ((chart.data && chart.data.tableRow) ? chart.data.tableRow.length : 0) }}</span>
|
class="table-page-inner"
|
||||||
{{ $t('chart.items') }}
|
:style="autoStyle"
|
||||||
</span>
|
>
|
||||||
<el-pagination
|
<span class="total-style">
|
||||||
small
|
{{ $t('chart.total') }}
|
||||||
:current-page="currentPage.page"
|
<span>{{
|
||||||
:page-sizes="[10,20,50,100]"
|
chart.datasetMode === 0 ? chart.totalItems : ((chart.data && chart.data.tableRow) ? chart.data.tableRow.length : 0)
|
||||||
:page-size="currentPage.pageSize"
|
}}</span>
|
||||||
:pager-count="5"
|
{{ $t('chart.items') }}
|
||||||
layout="prev, pager, next"
|
</span>
|
||||||
:total="currentPage.show"
|
<el-pagination
|
||||||
class="page-style"
|
small
|
||||||
@current-change="pageClick"
|
:current-page="currentPage.page"
|
||||||
@size-change="pageChange"
|
:page-sizes="[10,20,50,100]"
|
||||||
/>
|
:page-size="currentPage.pageSize"
|
||||||
|
:pager-count="5"
|
||||||
|
layout="prev, pager, next"
|
||||||
|
:total="currentPage.show"
|
||||||
|
class="page-style"
|
||||||
|
@current-change="pageClick"
|
||||||
|
@size-change="pageChange"
|
||||||
|
/>
|
||||||
|
</el-row>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
@ -70,6 +80,7 @@
|
|||||||
import { hexColorToRGBA } from '../../chart/util'
|
import { hexColorToRGBA } from '../../chart/util'
|
||||||
import eventBus from '@/components/canvas/utils/eventBus'
|
import eventBus from '@/components/canvas/utils/eventBus'
|
||||||
import { DEFAULT_COLOR_CASE, DEFAULT_SIZE } from '@/views/chart/chart/chart'
|
import { DEFAULT_COLOR_CASE, DEFAULT_SIZE } from '@/views/chart/chart/chart'
|
||||||
|
import { mapState } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TableNormal',
|
name: 'TableNormal',
|
||||||
@ -149,6 +160,18 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
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() {
|
bg_class() {
|
||||||
return {
|
return {
|
||||||
background: hexColorToRGBA('#ffffff', 0),
|
background: hexColorToRGBA('#ffffff', 0),
|
||||||
@ -160,7 +183,10 @@ export default {
|
|||||||
width: '100%',
|
width: '100%',
|
||||||
'--scroll-bar-color': this.scrollBarColor
|
'--scroll-bar-color': this.scrollBarColor
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
...mapState([
|
||||||
|
'previewCanvasScale'
|
||||||
|
])
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
chart: function() {
|
chart: function() {
|
||||||
@ -482,46 +508,61 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.table-class ::v-deep .body--wrapper{
|
.table-class ::v-deep .body--wrapper {
|
||||||
background: rgba(1,1,1,0);
|
background: rgba(1, 1, 1, 0);
|
||||||
}
|
}
|
||||||
.table-class ::v-deep .elx-cell{
|
|
||||||
max-height: none!important;
|
.table-class ::v-deep .elx-cell {
|
||||||
line-height: normal!important;
|
max-height: none !important;
|
||||||
}
|
line-height: normal !important;
|
||||||
.table-page{
|
}
|
||||||
position: absolute;
|
|
||||||
bottom: 0;
|
.table-page-inner {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
.page-style{
|
|
||||||
margin-right: auto;
|
.table-page {
|
||||||
}
|
position: absolute;
|
||||||
.total-style{
|
bottom: 0;
|
||||||
flex: 1;
|
display: flex;
|
||||||
font-size: 12px;
|
align-items: center;
|
||||||
color: #606266;
|
justify-content: flex-end;
|
||||||
white-space:nowrap;
|
width: 100%;
|
||||||
}
|
overflow: hidden;
|
||||||
.page-style ::v-deep .el-input__inner{
|
}
|
||||||
height: 24px;
|
|
||||||
}
|
.page-style {
|
||||||
.page-style ::v-deep button{
|
margin-right: auto;
|
||||||
background: transparent!important;
|
}
|
||||||
}
|
|
||||||
.page-style ::v-deep li{
|
.total-style {
|
||||||
background: transparent!important;
|
flex: 1;
|
||||||
}
|
font-size: 12px;
|
||||||
.table-class{
|
color: #606266;
|
||||||
::-webkit-scrollbar-thumb {
|
white-space: nowrap;
|
||||||
background: var(--scroll-bar-color);
|
}
|
||||||
}
|
|
||||||
}
|
.page-style ::v-deep .el-input__inner {
|
||||||
.table-class{
|
height: 24px;
|
||||||
scrollbar-color: var(--scroll-bar-color) transparent;
|
}
|
||||||
|
|
||||||
|
.page-style ::v-deep button {
|
||||||
|
background: transparent !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-style ::v-deep li {
|
||||||
|
background: transparent !important;
|
||||||
|
}
|
||||||
|
.table-class{
|
||||||
|
::-webkit-scrollbar-thumb {
|
||||||
|
background: var(--scroll-bar-color);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
.table-class{
|
||||||
|
scrollbar-color: var(--scroll-bar-color) transparent;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1655,14 +1655,12 @@ import ScrollCfg from '@/views/chart/components/senior/ScrollCfg'
|
|||||||
import ChartFieldEdit from '@/views/chart/view/ChartFieldEdit'
|
import ChartFieldEdit from '@/views/chart/view/ChartFieldEdit'
|
||||||
import CalcChartFieldEdit from '@/views/chart/view/CalcChartFieldEdit'
|
import CalcChartFieldEdit from '@/views/chart/view/CalcChartFieldEdit'
|
||||||
import { equalsAny } from '@/utils/StringUtils'
|
import { equalsAny } from '@/utils/StringUtils'
|
||||||
import MarginSelector from '@/views/chart/components/componentStyle/MarginSelector'
|
|
||||||
import PositionAdjust from '@/views/chart/view/PositionAdjust'
|
import PositionAdjust from '@/views/chart/view/PositionAdjust'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ChartEdit',
|
name: 'ChartEdit',
|
||||||
components: {
|
components: {
|
||||||
PositionAdjust,
|
PositionAdjust,
|
||||||
MarginSelector,
|
|
||||||
ScrollCfg,
|
ScrollCfg,
|
||||||
CalcChartFieldEdit,
|
CalcChartFieldEdit,
|
||||||
ChartFieldEdit,
|
ChartFieldEdit,
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
@onTextChange="onTextChange"
|
@onTextChange="onTextChange"
|
||||||
@onLegendChange="onLegendChange"
|
@onLegendChange="onLegendChange"
|
||||||
@onMarginChange="onMarginChange"
|
@onMarginChange="onMarginChange"
|
||||||
|
@onSuspensionChange="onSuspensionChange"
|
||||||
/>
|
/>
|
||||||
<el-row v-else>
|
<el-row v-else>
|
||||||
<div class="view-selected-message-class">
|
<div class="view-selected-message-class">
|
||||||
@ -103,6 +104,9 @@ export default {
|
|||||||
onMarginChange(val) {
|
onMarginChange(val) {
|
||||||
this.batchOptChange('customStyle', 'margin', val)
|
this.batchOptChange('customStyle', 'margin', val)
|
||||||
},
|
},
|
||||||
|
onSuspensionChange(val) {
|
||||||
|
this.batchOptChange('customAttr', 'suspension', val)
|
||||||
|
},
|
||||||
batchOptChange(custom, property, value) {
|
batchOptChange(custom, property, value) {
|
||||||
this.$store.commit('setChangeProperties', {
|
this.$store.commit('setChangeProperties', {
|
||||||
'custom': custom,
|
'custom': custom,
|
||||||
|
@ -136,51 +136,54 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
property="deType"
|
property="deTypeCascader"
|
||||||
:label="$t('dataset.field_type')"
|
:label="$t('dataset.field_type')"
|
||||||
min-width="200"
|
min-width="200"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-select
|
<el-cascader
|
||||||
v-model="scope.row.deType"
|
v-model="scope.row.deTypeCascader"
|
||||||
size="small"
|
size="small"
|
||||||
class="select-type"
|
popper-class="select-date-resolution-format"
|
||||||
:disabled="!hasDataPermission('manage', param.privileges)"
|
:disabled="!hasDataPermission('manage', param.privileges)"
|
||||||
|
class="select-type"
|
||||||
|
:options="getFields(scope.row)"
|
||||||
|
@visible-change="getPopPosition"
|
||||||
@change="saveEdit(scope.row)"
|
@change="saveEdit(scope.row)"
|
||||||
>
|
>
|
||||||
<el-option
|
<template slot-scope="{ node, data }">
|
||||||
v-for="item in fields"
|
<span
|
||||||
:key="item.value"
|
v-if="node.level === 2"
|
||||||
:label="item.label"
|
class="format-title"
|
||||||
:value="item.value"
|
:style="popPosition"
|
||||||
>
|
>{{ $t('chart.date_format') }}</span>
|
||||||
<span style="float: left">
|
<span>
|
||||||
<svg-icon
|
<svg-icon
|
||||||
v-if="item.value === 0"
|
v-if="data.value === 0"
|
||||||
icon-class="field_text"
|
icon-class="field_text"
|
||||||
class="field-icon-text field-icon-dimension"
|
class="field-icon-text field-icon-dimension"
|
||||||
/>
|
/>
|
||||||
<svg-icon
|
<svg-icon
|
||||||
v-if="item.value === 1"
|
v-if="data.value === 1"
|
||||||
icon-class="field_time"
|
icon-class="field_time"
|
||||||
class="field-icon-time field-icon-dimension"
|
class="field-icon-time field-icon-dimension"
|
||||||
/>
|
/>
|
||||||
<svg-icon
|
<svg-icon
|
||||||
v-if="item.value === 2 || item.value === 3"
|
v-if="data.value === 2 || data.value === 3"
|
||||||
icon-class="field_value"
|
icon-class="field_value"
|
||||||
class="field-icon-value field-icon-dimension"
|
class="field-icon-value field-icon-dimension"
|
||||||
/>
|
/>
|
||||||
<svg-icon
|
<svg-icon
|
||||||
v-if="item.value === 5"
|
v-if="data.value === 5"
|
||||||
icon-class="field_location"
|
icon-class="field_location"
|
||||||
class="field-icon-location field-icon-dimension"
|
class="field-icon-location field-icon-dimension"
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
<span style="float: left; color: #8492a6; font-size: 12px">{{
|
<span style="color: #8492a6; font-size: 12px">{{
|
||||||
item.label
|
data.label
|
||||||
}}</span>
|
}}</span>
|
||||||
</el-option>
|
</template>
|
||||||
</el-select>
|
</el-cascader>
|
||||||
<span class="select-svg-icon">
|
<span class="select-svg-icon">
|
||||||
<span v-if="scope.row.deType === 0 || scope.row.deType === 6">
|
<span v-if="scope.row.deType === 0 || scope.row.deType === 6">
|
||||||
<svg-icon
|
<svg-icon
|
||||||
@ -211,16 +214,16 @@
|
|||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
<!-- <el-input-->
|
<el-input
|
||||||
<!-- v-if="scope.row.deType === 1"-->
|
v-if="scope.row.deType === 1 && scope.row.deExtractType === 0"
|
||||||
<!-- v-model="scope.row.dateFormat"-->
|
v-model="scope.row.dateFormat"
|
||||||
<!-- :placeholder="$t('dataset.date_format')"-->
|
:placeholder="$t('dataset.date_format')"
|
||||||
<!-- size="small"-->
|
size="small"
|
||||||
<!-- class="input-type"-->
|
class="input-type"
|
||||||
<!-- :disabled="!hasDataPermission('manage', param.privileges)"-->
|
:disabled="!hasDataPermission('manage', param.privileges)"
|
||||||
<!-- @blur="saveEdit(scope.row)"-->
|
@blur="saveEdit(scope.row)"
|
||||||
<!-- @keyup.enter.native="saveEdit(scope.row)"-->
|
@keyup.enter.native="saveEdit(scope.row)"
|
||||||
<!-- />-->
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@ -473,51 +476,54 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
property="deType"
|
property="deTypeCascader"
|
||||||
:label="$t('dataset.field_type')"
|
:label="$t('dataset.field_type')"
|
||||||
min-width="200"
|
min-width="200"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-select
|
<el-cascader
|
||||||
v-model="scope.row.deType"
|
v-model="scope.row.deTypeCascader"
|
||||||
size="small"
|
size="small"
|
||||||
class="select-type"
|
popper-class="select-date-resolution-format"
|
||||||
:disabled="!hasDataPermission('manage', param.privileges)"
|
:disabled="!hasDataPermission('manage', param.privileges)"
|
||||||
|
class="select-type"
|
||||||
|
:options="getFields(scope.row)"
|
||||||
|
@visible-change="getPopPosition"
|
||||||
@change="saveEdit(scope.row)"
|
@change="saveEdit(scope.row)"
|
||||||
>
|
>
|
||||||
<el-option
|
<template slot-scope="{ node, data }">
|
||||||
v-for="item in fields"
|
<span
|
||||||
:key="item.value"
|
v-if="node.level === 2"
|
||||||
:label="item.label"
|
class="format-title"
|
||||||
:value="item.value"
|
:style="popPosition"
|
||||||
>
|
>{{ $t('chart.date_format') }}</span>
|
||||||
<span style="float: left">
|
<span>
|
||||||
<svg-icon
|
<svg-icon
|
||||||
v-if="item.value === 0"
|
v-if="data.value === 0"
|
||||||
icon-class="field_text"
|
icon-class="field_text"
|
||||||
class="field-icon-text field-icon-quota"
|
class="field-icon-text field-icon-dimension"
|
||||||
/>
|
/>
|
||||||
<svg-icon
|
<svg-icon
|
||||||
v-if="item.value === 1"
|
v-if="data.value === 1"
|
||||||
icon-class="field_time"
|
icon-class="field_time"
|
||||||
class="field-icon-time field-icon-quota"
|
class="field-icon-time field-icon-dimension"
|
||||||
/>
|
/>
|
||||||
<svg-icon
|
<svg-icon
|
||||||
v-if="item.value === 2 || item.value === 3"
|
v-if="data.value === 2 || data.value === 3"
|
||||||
icon-class="field_value"
|
icon-class="field_value"
|
||||||
class="field-icon-value field-icon-quota"
|
class="field-icon-value field-icon-dimension"
|
||||||
/>
|
/>
|
||||||
<svg-icon
|
<svg-icon
|
||||||
v-if="item.value === 5"
|
v-if="data.value === 5"
|
||||||
icon-class="field_location"
|
icon-class="field_location"
|
||||||
class="field-icon-location field-icon-quota"
|
class="field-icon-location field-icon-dimension"
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
<span style="float: left; color: #8492a6; font-size: 12px">{{
|
<span style="color: #8492a6; font-size: 12px">{{
|
||||||
item.label
|
data.label
|
||||||
}}</span>
|
}}</span>
|
||||||
</el-option>
|
</template>
|
||||||
</el-select>
|
</el-cascader>
|
||||||
<span class="select-svg-icon">
|
<span class="select-svg-icon">
|
||||||
<span v-if="scope.row.deType === 0">
|
<span v-if="scope.row.deType === 0">
|
||||||
<svg-icon
|
<svg-icon
|
||||||
@ -548,16 +554,16 @@
|
|||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
<!-- <el-input-->
|
<el-input
|
||||||
<!-- v-if="scope.row.deType === 1"-->
|
v-if="scope.row.deType === 1 && scope.row.deExtractType === 0"
|
||||||
<!-- v-model="scope.row.dateFormat"-->
|
v-model="scope.row.dateFormat"
|
||||||
<!-- :placeholder="$t('dataset.date_format')"-->
|
:placeholder="$t('dataset.date_format')"
|
||||||
<!-- size="small"-->
|
size="small"
|
||||||
<!-- class="input-type"-->
|
class="input-type"
|
||||||
<!-- :disabled="!hasDataPermission('manage', param.privileges)"-->
|
:disabled="!hasDataPermission('manage', param.privileges)"
|
||||||
<!-- @blur="saveEdit(scope.row)"-->
|
@blur="saveEdit(scope.row)"
|
||||||
<!-- @keyup.enter.native="saveEdit(scope.row)"-->
|
@keyup.enter.native="saveEdit(scope.row)"
|
||||||
<!-- />-->
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@ -757,7 +763,6 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dateFormats: [],
|
|
||||||
maxHeight: 'auto',
|
maxHeight: 'auto',
|
||||||
tableFields: {
|
tableFields: {
|
||||||
dimensionList: [],
|
dimensionList: [],
|
||||||
@ -765,17 +770,8 @@ export default {
|
|||||||
dimensionListData: [],
|
dimensionListData: [],
|
||||||
quotaListData: []
|
quotaListData: []
|
||||||
},
|
},
|
||||||
fields: [
|
popPosition: {},
|
||||||
{ label: this.$t('dataset.text'), value: 0 },
|
dateformats: [],
|
||||||
{ 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 }
|
|
||||||
],
|
|
||||||
fieldActiveNames: ['d', 'q'],
|
fieldActiveNames: ['d', 'q'],
|
||||||
searchField: '',
|
searchField: '',
|
||||||
editCalcField: false,
|
editCalcField: false,
|
||||||
@ -811,6 +807,18 @@ export default {
|
|||||||
that.maxHeight = currentHeight - 56 - 30 - 35 - 26 - 10 - 10 + 'px'
|
that.maxHeight = currentHeight - 56 - 30 - 35 - 26 - 10 - 10 + 'px'
|
||||||
}, 10)
|
}, 10)
|
||||||
},
|
},
|
||||||
|
getPopPosition(val) {
|
||||||
|
if (!val) return
|
||||||
|
// setTimeout(() => {
|
||||||
|
|
||||||
|
// }, 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() {
|
initField() {
|
||||||
fieldListDQ(this.param.id).then((response) => {
|
fieldListDQ(this.param.id).then((response) => {
|
||||||
this.tableFields = response.data
|
this.tableFields = response.data
|
||||||
@ -825,14 +833,47 @@ export default {
|
|||||||
this.quotaChange()
|
this.quotaChange()
|
||||||
})
|
})
|
||||||
dateformats(this.param.id).then((response) => {
|
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) {
|
saveEdit(item) {
|
||||||
if (item.name && item.name.length > 50) {
|
if (item.name && item.name.length > 50) {
|
||||||
this.$message.error(this.$t('dataset.field_name_less_50'))
|
this.$message.error(this.$t('dataset.field_name_less_50'))
|
||||||
return
|
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)
|
post('/dataset/field/save', item)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
@ -1153,3 +1194,16 @@ span {
|
|||||||
border-bottom: 0 solid #e6ebf5 !important;
|
border-bottom: 0 solid #e6ebf5 !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.select-date-resolution-format {
|
||||||
|
.format-title {
|
||||||
|
position: fixed;
|
||||||
|
display: inline-block;
|
||||||
|
height: 30px;
|
||||||
|
background: #dfe6ec;
|
||||||
|
width: 192px;
|
||||||
|
padding-left: 30px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@ -162,7 +162,7 @@
|
|||||||
class="de-card-dropdown"
|
class="de-card-dropdown"
|
||||||
>
|
>
|
||||||
<template
|
<template
|
||||||
v-if="!['Stopped', 'Exec'].includes(scope.row.status)"
|
v-if="!['Exec'].includes(scope.row.status)"
|
||||||
>
|
>
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
:disabled="disableExec(scope.row)"
|
:disabled="disableExec(scope.row)"
|
||||||
@ -858,9 +858,7 @@ export default {
|
|||||||
},
|
},
|
||||||
disableExec(task) {
|
disableExec(task) {
|
||||||
return (
|
return (
|
||||||
task.status === 'Stopped' ||
|
|
||||||
task.status === 'Pending' ||
|
task.status === 'Pending' ||
|
||||||
task.rate === 'SIMPLE' ||
|
|
||||||
!hasDataPermission('manage', task.privileges)
|
!hasDataPermission('manage', task.privileges)
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
@ -117,7 +117,7 @@ export default {
|
|||||||
initContent() {
|
initContent() {
|
||||||
this.templateContentChange = this.templateContent
|
this.templateContentChange = this.templateContent
|
||||||
for (const [key, value] of Object.entries(this.varsInfo)) {
|
for (const [key, value] of Object.entries(this.varsInfo)) {
|
||||||
this.templateContentChange = pdfTemplateReplaceAll(this.templateContentChange, key, value)
|
this.templateContentChange = pdfTemplateReplaceAll(this.templateContentChange, key, value || '')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -268,7 +268,7 @@
|
|||||||
class="de-card-dropdown"
|
class="de-card-dropdown"
|
||||||
>
|
>
|
||||||
<template
|
<template
|
||||||
v-if="!['Stopped', 'Exec'].includes(scope.row.status)"
|
v-if="!['Exec'].includes(scope.row.status)"
|
||||||
>
|
>
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
:disabled="disableExec(scope.row)"
|
:disabled="disableExec(scope.row)"
|
||||||
@ -624,10 +624,7 @@ export default {
|
|||||||
)
|
)
|
||||||
},
|
},
|
||||||
disableExec(task) {
|
disableExec(task) {
|
||||||
return (
|
return (task.status === 'Pending' ||
|
||||||
task.status === 'Stopped' ||
|
|
||||||
task.status === 'Pending' ||
|
|
||||||
task.rate === 'SIMPLE' ||
|
|
||||||
!hasDataPermission('manage', task.privileges)
|
!hasDataPermission('manage', task.privileges)
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user