Date: Mon, 28 Feb 2022 13:01:45 +0800
Subject: [PATCH 19/61] =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=B8=8D=E9=9C=80?=
=?UTF-8?q?=E8=A6=81=E7=9A=84=E5=B7=A5=E5=85=B7=E5=8C=85?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../common/util/jsonschema/BaseColumn.java | 28 ---
.../util/jsonschema/CommonProperty.java | 195 ------------------
.../util/jsonschema/JsonSchemaDescrip.java | 87 --------
.../util/jsonschema/JsonschemaUtil.java | 70 -------
.../jsonschema/validate/DictProperty.java | 82 --------
.../jsonschema/validate/HiddenProperty.java | 38 ----
.../jsonschema/validate/LinkDownProperty.java | 66 ------
.../jsonschema/validate/NumberProperty.java | 153 --------------
.../jsonschema/validate/PopupProperty.java | 76 -------
.../jsonschema/validate/StringProperty.java | 119 -----------
.../jsonschema/validate/SwitchProperty.java | 46 -----
.../validate/TreeSelectProperty.java | 146 -------------
12 files changed, 1106 deletions(-)
delete mode 100644 jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/BaseColumn.java
delete mode 100644 jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/CommonProperty.java
delete mode 100644 jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/JsonSchemaDescrip.java
delete mode 100644 jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/JsonschemaUtil.java
delete mode 100644 jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/validate/DictProperty.java
delete mode 100644 jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/validate/HiddenProperty.java
delete mode 100644 jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/validate/LinkDownProperty.java
delete mode 100644 jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/validate/NumberProperty.java
delete mode 100644 jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/validate/PopupProperty.java
delete mode 100644 jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/validate/StringProperty.java
delete mode 100644 jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/validate/SwitchProperty.java
delete mode 100644 jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/validate/TreeSelectProperty.java
diff --git a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/BaseColumn.java b/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/BaseColumn.java
deleted file mode 100644
index 5a77ac23..00000000
--- a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/BaseColumn.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package com.jero.common.util.jsonschema;
-
-import lombok.Data;
-
-/**
- * 列 配置基本信息
- */
-@Data
-public class BaseColumn {
-
- /**
- * 列配置 描述 -对应数据库字段描述
- */
- private String title;
-
- /**
- * 列配置 名称 -对应数据库字段名
- */
- private String field;
-
- public BaseColumn(){}
-
- public BaseColumn(String title,String field){
- this.title = title;
- this.field = field;
- }
-
-}
diff --git a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/CommonProperty.java b/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/CommonProperty.java
deleted file mode 100644
index 891575df..00000000
--- a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/CommonProperty.java
+++ /dev/null
@@ -1,195 +0,0 @@
-package com.jero.common.util.jsonschema;
-
-import com.alibaba.fastjson.JSONObject;
-import com.jero.common.system.vo.DictModel;
-
-import java.io.Serializable;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 验证通用属性
- */
-public abstract class CommonProperty implements Serializable{
-
- private static final long serialVersionUID = -426159949502493187L;
-
-
- protected String key;
-
-
- /**
- * 此关键字的值必须是字符串或数组。如果它是一个数组,那么数组的元素必须是字符串,并且必须是唯一的。
- *
字符串值必须是六种基本类型之一(“null”,“boolean”,“object”,“array”,“number”或“string”),或“integer”,它匹配任何数字,零分数部分。
- *
当且仅当实例位于为此关键字列出的任何集合中时,实例才会验证。
- *
- */
- protected String type;
-
- /**
- * 对应JsonSchema的enum
- *
该关键字的值必须是一个数组。这个数组应该至少有一个元素。数组中的元素应该是唯一的。如果实例的值等于此关键字的数组值中的某个元素,则实例将对此关键字成功验证。
- * 数组中的元素可以是任何值,包括null
- *
- * {
- * "type": "string",
- * "enum": ["1", "2", "3"] 需要的话可以通过这个include转一下
- * }
- */
- protected List include;
-
- /**
- * 对应JsonSchema的const
- * 此关键字的值可以是任何类型,包括null。
- * 如果实例的值等于关键字的值,则实例将针对此关键字成功验证。
- */
- protected Object constant;
-
- //三个自定义 属性
- protected String view;// 展示类型
- protected String title;//数据库字段备注
- protected Integer order;//字段显示排序
-
- protected boolean disabled;//是否禁用
-
- protected String defVal; // 字段默认值
-
- protected String fieldExtendJson;//扩展参数
-
- protected Integer dbPointLength;//小数点
-
- public String getDefVal() {
- return defVal;
- }
-
- public void setDefVal(String defVal) {
- this.defVal = defVal;
- }
-
- public boolean isDisabled() {
- return disabled;
- }
-
- public void setDisabled(boolean disabled) {
- this.disabled = disabled;
- }
-
- public String getView() {
- return view;
- }
-
- public void setView(String view) {
- this.view = view;
- }
-
- public String getKey() {
- return key;
- }
-
- public void setKey(String key) {
- this.key = key;
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public List getInclude() {
- return include;
- }
-
- public void setInclude(List include) {
- this.include = include;
- }
-
- public Object getConstant() {
- return constant;
- }
-
- public void setConstant(Object constant) {
- this.constant = constant;
- }
-
- public String getTitle() {
- return title;
- }
-
- public void setTitle(String title) {
- this.title = title;
- }
-
- public Integer getOrder() {
- return order;
- }
-
- public void setOrder(Integer order) {
- this.order = order;
- }
-
- public String getFieldExtendJson() {
- return fieldExtendJson;
- }
-
- public void setFieldExtendJson(String fieldExtendJson) {
- this.fieldExtendJson = fieldExtendJson;
- }
-
- public Integer getDbPointLength() {
- return dbPointLength;
- }
-
- public void setDbPointLength(Integer dbPointLength) {
- this.dbPointLength = dbPointLength;
- }
-
- /**
- * 返回一个map有两个key
- * key ---> Property JSON的key
- *
prop --> JSON object
- * @return
- */
- public abstract Map getPropertyJson();
-
- public JSONObject getCommonJson() {
- JSONObject json = new JSONObject();
- json.put("type", type);
- if(include!=null && include.size()>0) {
- json.put("enum", include);
- }
- if(constant!=null) {
- json.put("const", constant);
- }
- if(title!=null) {
- json.put("title", title);
- }
- if(order!=null) {
- json.put("order", order);
- }
- if(view==null) {
- json.put("view", "input");
- }else {
- json.put("view", view);
- }
- if(disabled) {
- String str = "{\"widgetattrs\":{\"disabled\":true}}";
- JSONObject ui = JSONObject.parseObject(str);
- json.put("ui", ui);
- }
- if (defVal!=null && defVal.length()>0) {
- json.put("defVal", defVal);
- }
- if(fieldExtendJson != null){
- json.put("fieldExtendJson", fieldExtendJson);
- }
- if(dbPointLength !=null ) {
- json.put("dbPointLength", dbPointLength);
- }
- return json;
- }
-
-
-}
diff --git a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/JsonSchemaDescrip.java b/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/JsonSchemaDescrip.java
deleted file mode 100644
index e75797fb..00000000
--- a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/JsonSchemaDescrip.java
+++ /dev/null
@@ -1,87 +0,0 @@
-package com.jero.common.util.jsonschema;
-
-import java.io.Serializable;
-import java.util.List;
-
-/**
- * JsonSchema 模式类
- * < http://json-schema.org/draft-07/schema# >
- */
-public class JsonSchemaDescrip implements Serializable{
-
- /**
- *
- */
- private static final long serialVersionUID = 7682073117441544718L;
-
-
- private String $schema = "http://json-schema.org/draft-07/schema#";
-
- /**
- * 用它给我们的模式提供了标题。
- */
- private String title;
-
- /**
- * 关于模式的描述。
- */
- private String description;
-
- /**
- *type 关键字在我们的 JSON 数据上定义了第一个约束:必须是一个 JSON 对象。 可以直接设置成object
- */
- private String type;
-
- private List required;
-
-
- public List getRequired() {
- return required;
- }
-
- public void setRequired(List required) {
- this.required = required;
- }
-
- public String get$schema() {
- return $schema;
- }
-
- public void set$schema(String $schema) {
- this.$schema = $schema;
- }
-
- public String getTitle() {
- return title;
- }
-
- public void setTitle(String title) {
- this.title = title;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public JsonSchemaDescrip() {}
-
- public JsonSchemaDescrip(List required) {
- this.description="我是一个jsonschema description";
- this.title="我是一个jsonschema title";
- this.type="object";
- this.required = required;
- }
-
-}
diff --git a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/JsonschemaUtil.java b/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/JsonschemaUtil.java
deleted file mode 100644
index 91fab531..00000000
--- a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/JsonschemaUtil.java
+++ /dev/null
@@ -1,70 +0,0 @@
-package com.jero.common.util.jsonschema;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-
-import lombok.extern.slf4j.Slf4j;
-
-@Slf4j
-public class JsonschemaUtil {
-
- /**
- * 生成JsonSchema
- *
- * @param descrip
- * @param propertyList
- * @return
- */
- public static JSONObject getJsonSchema(JsonSchemaDescrip descrip, List propertyList) {
- JSONObject obj = new JSONObject();
- obj.put("$schema", descrip.get$schema());
- obj.put("type", descrip.getType());
- obj.put("title", descrip.getTitle());
-
- List requiredArr = descrip.getRequired();
- obj.put("required", requiredArr);
-
- JSONObject properties = new JSONObject();
- for (CommonProperty commonProperty : propertyList) {
- Map map = commonProperty.getPropertyJson();
- properties.put(map.get("key").toString(), map.get("prop"));
- }
- obj.put("properties", properties);
- //鬼知道这里为什么报错 com.jero.modules.system.model.DictModel cannot be cast to com.jero.modules.system.model.DictModel
- //log.info("---JSONSchema--->"+obj.toJSONString());
- return obj;
- }
-
- /**
- * 生成JsonSchema 用于子对象
- * @param title 子对象描述
- * @param requiredArr 子对象必填属性名集合
- * @param propertyList 子对象属性集合
- * @return
- */
- public static JSONObject getSubJsonSchema(String title,List requiredArr,List propertyList) {
- JSONObject obj = new JSONObject();
- obj.put("type", "object");
- obj.put("view", "tab");
- obj.put("title", title);
-
- if(requiredArr==null) {
- requiredArr = new ArrayList();
- }
- obj.put("required", requiredArr);
-
- JSONObject properties = new JSONObject();
- for (CommonProperty commonProperty : propertyList) {
- Map map = commonProperty.getPropertyJson();
- properties.put(map.get("key").toString(), map.get("prop"));
- }
- obj.put("properties", properties);
- //log.info("---JSONSchema--->"+obj.toString());
- return obj;
- }
-
-}
diff --git a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/validate/DictProperty.java b/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/validate/DictProperty.java
deleted file mode 100644
index 7a235d9a..00000000
--- a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/validate/DictProperty.java
+++ /dev/null
@@ -1,82 +0,0 @@
-package com.jero.common.util.jsonschema.validate;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import com.jero.common.util.jsonschema.CommonProperty;
-
-import com.alibaba.fastjson.JSONObject;
-
-/**
- * 字典属性
- * @author 86729
- *
- */
-public class DictProperty extends CommonProperty {
-
- private static final long serialVersionUID = 3786503639885610767L;
-
- //字典三属性
- private String dictCode;
- private String dictTable;
- private String dictText;
-
- public String getDictCode() {
- return dictCode;
- }
-
- public void setDictCode(String dictCode) {
- this.dictCode = dictCode;
- }
-
- public String getDictTable() {
- return dictTable;
- }
-
- public void setDictTable(String dictTable) {
- this.dictTable = dictTable;
- }
-
- public String getDictText() {
- return dictText;
- }
-
- public void setDictText(String dictText) {
- this.dictText = dictText;
- }
-
- public DictProperty() {}
-
- /**
- * 构造器
- */
- public DictProperty(String key,String title,String dictTable,String dictCode,String dictText) {
- this.type = "string";
- this.view = "sel_search";
- this.key = key;
- this.title = title;
- this.dictCode = dictCode;
- this.dictTable= dictTable;
- this.dictText= dictText;
- }
-
- @Override
- public Map getPropertyJson() {
- Map map = new HashMap<>();
- map.put("key",getKey());
- JSONObject prop = getCommonJson();
- if(dictCode!=null) {
- prop.put("dictCode",dictCode);
- }
- if(dictTable!=null) {
- prop.put("dictTable",dictTable);
- }
- if(dictText!=null) {
- prop.put("dictText",dictText);
- }
- map.put("prop",prop);
- return map;
- }
-
- //TODO 重构问题:数据字典 只是字符串类的还是有存储的数值类型?只有字符串请跳过这个 只改前端
-}
diff --git a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/validate/HiddenProperty.java b/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/validate/HiddenProperty.java
deleted file mode 100644
index 2cb95058..00000000
--- a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/validate/HiddenProperty.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.jero.common.util.jsonschema.validate;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import com.jero.common.util.jsonschema.CommonProperty;
-
-import com.alibaba.fastjson.JSONObject;
-
-/**
- * 字典属性
- * @author 86729
- *
- */
-public class HiddenProperty extends CommonProperty {
-
- private static final long serialVersionUID = -8939298551502162479L;
-
- public HiddenProperty() {}
-
- public HiddenProperty(String key,String title) {
- this.type = "string";
- this.view = "hidden";
- this.key = key;
- this.title = title;
- }
-
- @Override
- public Map getPropertyJson() {
- Map map = new HashMap<>();
- map.put("key",getKey());
- JSONObject prop = getCommonJson();
- prop.put("hidden",true);
- map.put("prop",prop);
- return map;
- }
-
-}
diff --git a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/validate/LinkDownProperty.java b/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/validate/LinkDownProperty.java
deleted file mode 100644
index 3815d477..00000000
--- a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/validate/LinkDownProperty.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package com.jero.common.util.jsonschema.validate;
-
-import com.alibaba.fastjson.JSONObject;
-import com.jero.common.util.jsonschema.BaseColumn;
-import com.jero.common.util.jsonschema.CommonProperty;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 级联下拉
- */
-public class LinkDownProperty extends CommonProperty {
-
- /**
- * 配置信息
- */
- String dictTable;
-
- /**
- * 级联下拉组件 的其他级联列
- */
- List otherColumns;
-
- public String getDictTable(){
- return this.dictTable;
- }
-
- public void setDictTable(String dictTable){
- this.dictTable = dictTable;
- }
-
- public List getOtherColumns(){
- return this.otherColumns;
- }
-
- public void setOtherColumns(List otherColumns){
- this.otherColumns = otherColumns;
- }
-
- public LinkDownProperty() {}
-
- /**
- * 构造器
- */
- public LinkDownProperty(String key,String title,String dictTable) {
- this.type = "string";
- this.view = "link_down";
- this.key = key;
- this.title = title;
- this.dictTable= dictTable;
- }
-
- @Override
- public Map getPropertyJson() {
- Map map = new HashMap<>();
- map.put("key", getKey());
- JSONObject prop = getCommonJson();
- JSONObject temp = JSONObject.parseObject(this.dictTable);
- prop.put("config", temp);
- prop.put("others", otherColumns);
- map.put("prop", prop);
- return map;
- }
-}
diff --git a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/validate/NumberProperty.java b/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/validate/NumberProperty.java
deleted file mode 100644
index 174f595d..00000000
--- a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/validate/NumberProperty.java
+++ /dev/null
@@ -1,153 +0,0 @@
-package com.jero.common.util.jsonschema.validate;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import com.jero.common.system.vo.DictModel;
-import com.jero.common.util.jsonschema.CommonProperty;
-
-import com.alibaba.fastjson.JSONObject;
-
-public class NumberProperty extends CommonProperty {
-
- private static final long serialVersionUID = -558615331436437200L;
-
- /**
- * 倍数
- * 验证实例是否为此数值的倍数
- * “multipleOf”的值必须是一个数字,严格大于0。
- */
- private Integer multipleOf;
-
- /**
- * 小于等于
- * “maximum”的值必须是一个数字,表示数字实例的包含上限。
- * 如果实例是数字,则仅当实例小于或等于“最大”时,此关键字才会生效。
- */
- private Integer maxinum;
-
- /**
- * 小于
- * “exclusiveMaximum”的值必须是数字,表示数字实例的独占上限。
- * 如果实例是数字,则实例仅在其值严格小于(不等于)“exclusiveMaximum”时才有效。
- */
- private Integer exclusiveMaximum;
-
- /**
- * 大于等于
- */
- private Integer minimum;
-
- /**
- * 大于等于
- */
- private Integer exclusiveMinimum;
-
- private String pattern;
-
- public Integer getMultipleOf() {
- return multipleOf;
- }
-
- public void setMultipleOf(Integer multipleOf) {
- this.multipleOf = multipleOf;
- }
-
- public Integer getMaxinum() {
- return maxinum;
- }
-
- public void setMaxinum(Integer maxinum) {
- this.maxinum = maxinum;
- }
-
- public Integer getExclusiveMaximum() {
- return exclusiveMaximum;
- }
-
- public void setExclusiveMaximum(Integer exclusiveMaximum) {
- this.exclusiveMaximum = exclusiveMaximum;
- }
-
- public Integer getMinimum() {
- return minimum;
- }
-
- public void setMinimum(Integer minimum) {
- this.minimum = minimum;
- }
-
- public Integer getExclusiveMinimum() {
- return exclusiveMinimum;
- }
-
- public void setExclusiveMinimum(Integer exclusiveMinimum) {
- this.exclusiveMinimum = exclusiveMinimum;
- }
-
- public String getPattern() {
- return pattern;
- }
-
- public void setPattern(String pattern) {
- this.pattern = pattern;
- }
-
- public NumberProperty() {}
-
- /**
- * 构造器
- * @param key 字段名
- * @param title 字段备注
- * @param type number和integer
- */
- public NumberProperty(String key,String title,String type) {
- this.key = key;
- this.type = type;
- this.title = title;
- this.view = "number";
- }
-
- /**
- * 列表类型的走这个构造器 字典里存储的都是字符串 没法走这个构造器
- * @param key
- * @param type
- * @param view list-checkbox-radio
- * @param include
- */
- public NumberProperty(String key,String title,String view,List include) {
- this.type = "integer";
- this.key = key;
- this.view = view;
- this.title = title;
- this.include = include;
- }
-
- @Override
- public Map getPropertyJson() {
- Map map = new HashMap<>();
- map.put("key",getKey());
- JSONObject prop = getCommonJson();
- if(multipleOf!=null) {
- prop.put("multipleOf",multipleOf);
- }
- if(maxinum!=null) {
- prop.put("maxinum",maxinum);
- }
- if(exclusiveMaximum!=null) {
- prop.put("exclusiveMaximum",exclusiveMaximum);
- }
- if(minimum!=null) {
- prop.put("minimum",minimum);
- }
- if(exclusiveMinimum!=null) {
- prop.put("exclusiveMinimum",exclusiveMinimum);
- }
- if(pattern!=null) {
- prop.put("pattern",pattern);
- }
- map.put("prop",prop);
- return map;
- }
-}
diff --git a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/validate/PopupProperty.java b/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/validate/PopupProperty.java
deleted file mode 100644
index b025d49b..00000000
--- a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/validate/PopupProperty.java
+++ /dev/null
@@ -1,76 +0,0 @@
-package com.jero.common.util.jsonschema.validate;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import com.jero.common.util.jsonschema.CommonProperty;
-
-import com.alibaba.fastjson.JSONObject;
-
-public class PopupProperty extends CommonProperty {
-
- private static final long serialVersionUID = -3200493311633999539L;
-
- private String code;
-
- private String destFields;
-
- private String orgFields;
-
- public String getCode() {
- return code;
- }
-
- public void setCode(String code) {
- this.code = code;
- }
-
- public String getDestFields() {
- return destFields;
- }
-
- public void setDestFields(String destFields) {
- this.destFields = destFields;
- }
-
- public String getOrgFields() {
- return orgFields;
- }
-
- public void setOrgFields(String orgFields) {
- this.orgFields = orgFields;
- }
-
- public PopupProperty() {}
-
- public PopupProperty(String key,String title,String code,String destFields,String orgFields) {
- this.view = "popup";
- this.type = "string";
- this.key = key;
- this.title = title;
- this.code = code;
- this.destFields=destFields;
- this.orgFields=orgFields;
- }
-
-
- @Override
- public Map getPropertyJson() {
- Map map = new HashMap<>();
- map.put("key",getKey());
- JSONObject prop = getCommonJson();
- if(code!=null) {
- prop.put("code",code);
- }
- if(destFields!=null) {
- prop.put("destFields",destFields);
- }
- if(orgFields!=null) {
- prop.put("orgFields",orgFields);
- }
- map.put("prop",prop);
- return map;
- }
-
-}
diff --git a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/validate/StringProperty.java b/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/validate/StringProperty.java
deleted file mode 100644
index 124740f7..00000000
--- a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/validate/StringProperty.java
+++ /dev/null
@@ -1,119 +0,0 @@
-package com.jero.common.util.jsonschema.validate;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import com.jero.common.system.vo.DictModel;
-import com.jero.common.util.jsonschema.CommonProperty;
-
-import com.alibaba.fastjson.JSONObject;
-
-public class StringProperty extends CommonProperty {
-
- private static final long serialVersionUID = -3200493311633999539L;
-
- private Integer maxLength;
-
- private Integer minLength;
-
- /**
- * 根据ECMA 262正则表达式方言,该字符串应该是有效的正则表达式。
- */
- private String pattern;
-
- /**
- * 错误提示信息
- */
- private String errorInfo;
-
- public Integer getMaxLength() {
- return maxLength;
- }
-
-
- public void setMaxLength(Integer maxLength) {
- this.maxLength = maxLength;
- }
-
- public Integer getMinLength() {
- return minLength;
- }
-
- public void setMinLength(Integer minLength) {
- this.minLength = minLength;
- }
-
- public String getPattern() {
- return pattern;
- }
-
- public void setPattern(String pattern) {
- this.pattern = pattern;
- }
-
- public String getErrorInfo() {
- return errorInfo;
- }
-
-
- public void setErrorInfo(String errorInfo) {
- this.errorInfo = errorInfo;
- }
-
-
- public StringProperty() {}
-
- /**
- * 一般字符串类型走这个构造器
- * @param key 字段名
- * @param title 字段备注
- * @param view 展示控件
- * @param maxLength 数据库字段最大长度
- */
- public StringProperty(String key,String title,String view,Integer maxLength) {
- this.maxLength = maxLength;
- this.key = key;
- this.view = view;
- this.title = title;
- this.type = "string";
- }
-
- /**
- * 列表类型的走这个构造器
- * @param key 字段名
- * @param title 字段备注
- * @param view 展示控件 list-checkbox-radio
- * @param maxLength 数据库字段最大长度
- * @param include 数据字典
- */
- public StringProperty(String key,String title,String view,Integer maxLength,List include) {
- this.maxLength = maxLength;
- this.key = key;
- this.view = view;
- this.title = title;
- this.type = "string";
- this.include = include;
- }
- @Override
- public Map getPropertyJson() {
- Map map = new HashMap<>();
- map.put("key",getKey());
- JSONObject prop = getCommonJson();
- if(maxLength!=null) {
- prop.put("maxLength",maxLength);
- }
- if(minLength!=null) {
- prop.put("minLength",minLength);
- }
- if(pattern!=null) {
- prop.put("pattern",pattern);
- }
- if(errorInfo!=null) {
- prop.put("errorInfo",errorInfo);
- }
- map.put("prop",prop);
- return map;
- }
-
-}
diff --git a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/validate/SwitchProperty.java b/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/validate/SwitchProperty.java
deleted file mode 100644
index 46ff15b2..00000000
--- a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/validate/SwitchProperty.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package com.jero.common.util.jsonschema.validate;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.jero.common.util.jsonschema.CommonProperty;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * 开关 属性
- */
-public class SwitchProperty extends CommonProperty {
-
- //扩展参数配置信息
- private String extendStr;
-
- public SwitchProperty() {}
-
- /**
- * 构造器
- */
- public SwitchProperty(String key, String title, String extendStr) {
- this.type = "string";
- this.view = "switch";
- this.key = key;
- this.title = title;
- this.extendStr = extendStr;
- }
-
- @Override
- public Map getPropertyJson() {
- Map map = new HashMap<>();
- map.put("key",getKey());
- JSONObject prop = getCommonJson();
- JSONArray array = new JSONArray();
- if(extendStr!=null) {
- array = JSONArray.parseArray(extendStr);
- prop.put("extendOption",array);
- }
- map.put("prop",prop);
- return map;
- }
-
- //TODO 重构问题:数据字典 只是字符串类的还是有存储的数值类型?只有字符串请跳过这个 只改前端
-}
diff --git a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/validate/TreeSelectProperty.java b/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/validate/TreeSelectProperty.java
deleted file mode 100644
index 96160879..00000000
--- a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/jsonschema/validate/TreeSelectProperty.java
+++ /dev/null
@@ -1,146 +0,0 @@
-package com.jero.common.util.jsonschema.validate;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import com.jero.common.util.jsonschema.CommonProperty;
-
-import com.alibaba.fastjson.JSONObject;
-
-/**
- * 字典属性
- * @author 86729
- *
- */
-public class TreeSelectProperty extends CommonProperty {
-
- private static final long serialVersionUID = 3786503639885610767L;
-
- private String dict;//表名,文本,id
- private String pidField;//父级字段 默认pid
- private String pidValue;//父级节点的值 暂时没用到 默认为0
- private String hasChildField;
- private String textField;//树形下拉保存text值的字段名
-
- /**
- * 是不是pid 组件 1是 0否
- */
- private Integer pidComponent = 0;
-
- public String getDict() {
- return dict;
- }
-
- public void setDict(String dict) {
- this.dict = dict;
- }
-
- public String getPidField() {
- return pidField;
- }
-
- public void setPidField(String pidField) {
- this.pidField = pidField;
- }
-
- public String getPidValue() {
- return pidValue;
- }
-
- public void setPidValue(String pidValue) {
- this.pidValue = pidValue;
- }
-
- public String getHasChildField() {
- return hasChildField;
- }
-
- public void setHasChildField(String hasChildField) {
- this.hasChildField = hasChildField;
- }
-
- public TreeSelectProperty() {}
-
- public String getTextField() {
- return textField;
- }
-
- public void setTextField(String textField) {
- this.textField = textField;
- }
-
- public Integer getPidComponent() {
- return pidComponent;
- }
-
- public void setPidComponent(Integer pidComponent) {
- this.pidComponent = pidComponent;
- }
-
- /**
- * 构造器 构造普通树形下拉
- */
- public TreeSelectProperty(String key,String title,String dict,String pidField,String pidValue) {
- this.type = "string";
- this.view = "sel_tree";
- this.key = key;
- this.title = title;
- this.dict = dict;
- this.pidField= pidField;
- this.pidValue= pidValue;
- }
-
- /**
- * 分类字典下拉专用
- * @param key
- * @param title
- * @param pidValue
- */
- public TreeSelectProperty(String key,String title,String pidValue) {
- this.type = "string";
- this.view = "cat_tree";
- this.key = key;
- this.title = title;
- this.pidValue = pidValue;
- }
-
- /**
- * 分类字典 支持存储text 下拉专用
- * @param key
- * @param title
- * @param pidValue
- * @param textField
- */
- public TreeSelectProperty(String key,String title,String pidValue,String textField) {
- this(key,title,pidValue);
- this.textField = textField;
- }
-
- @Override
- public Map getPropertyJson() {
- Map map = new HashMap<>();
- map.put("key",getKey());
- JSONObject prop = getCommonJson();
- if(dict!=null) {
- prop.put("dict",dict);
- }
- if(pidField!=null) {
- prop.put("pidField",pidField);
- }
- if(pidValue!=null) {
- prop.put("pidValue",pidValue);
- }
- if(textField!=null) {
- prop.put("textField",textField);
- }
- if(hasChildField!=null) {
- prop.put("hasChildField",hasChildField);
- }
- if(pidComponent!=null) {
- prop.put("pidComponent",pidComponent);
- }
- map.put("prop",prop);
- return map;
- }
-
-}
From bfea29550dcdd7965c2b08f02b27d5cc939b35d6 Mon Sep 17 00:00:00 2001
From: zer0Black
Date: Mon, 28 Feb 2022 13:08:23 +0800
Subject: [PATCH 20/61] =?UTF-8?q?JEditableTable=E7=BB=84=E4=BB=B6popup?=
=?UTF-8?q?=E5=AD=97=E6=AE=B5=E8=AE=BE=E7=BD=AE=E5=BF=85=E5=A1=AB=E6=A0=A1?=
=?UTF-8?q?=E9=AA=8C=E6=9C=89=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
jero-web/src/components/jero/JEditableTable.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/jero-web/src/components/jero/JEditableTable.vue b/jero-web/src/components/jero/JEditableTable.vue
index 4e0550b1..09efcb30 100644
--- a/jero-web/src/components/jero/JEditableTable.vue
+++ b/jero-web/src/components/jero/JEditableTable.vue
@@ -2704,7 +2704,7 @@
}
this.setOneValue(this.popupValues, id, popupValue)
// 做单个表单验证
- this.validateOneInput(value, row, column, this.notPassedIds, true, 'change')
+ this.validateOneInput(popupValue, row, column, this.notPassedIds, true, 'change')
// 触发valueChange 事件
this.elemValueChange('input', row, column, value)
},
From 5916a76898b732a32f288a71f237cb863e37f5cc Mon Sep 17 00:00:00 2001
From: zer0Black
Date: Mon, 28 Feb 2022 13:11:34 +0800
Subject: [PATCH 21/61] =?UTF-8?q?JImageUpload=E7=BB=84=E4=BB=B6=E5=8D=95?=
=?UTF-8?q?=E5=BC=A0=E6=97=A0=E6=B3=95=E9=A2=84=E8=A7=88=E5=92=8C=E5=88=A0?=
=?UTF-8?q?=E9=99=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
jero-web/src/components/jero/JImageUpload.vue | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/jero-web/src/components/jero/JImageUpload.vue b/jero-web/src/components/jero/JImageUpload.vue
index e6e66a56..6eb18b5d 100644
--- a/jero-web/src/components/jero/JImageUpload.vue
+++ b/jero-web/src/components/jero/JImageUpload.vue
@@ -11,16 +11,14 @@
:beforeUpload="beforeUpload"
:disabled="disabled"
:isMultiple="isMultiple"
- :showUploadList="isMultiple"
v-bind="$attrs"
v-on="childListeners"
@change="handleChange"
@preview="handlePreview"
- :class="!isMultiple?'imgupload':''">
-
-
![]()
-
-
+ :class="[!isMultiple?'imgupload':'', (!isMultiple && picUrl)?'image-upload-single-over':'' ]">
+
+
+
From 4dd5b749ded58f05c92ea52c1044c328a1e34ceb Mon Sep 17 00:00:00 2001
From: zer0Black
Date: Mon, 28 Feb 2022 13:12:49 +0800
Subject: [PATCH 22/61] =?UTF-8?q?=E5=A4=96=E9=83=A8url=E8=8F=9C=E5=8D=95?=
=?UTF-8?q?=EF=BC=8C=E5=86=85=E9=83=A8=E6=89=93=E5=BC=80=E6=97=B6=EF=BC=8C?=
=?UTF-8?q?=E4=B9=9F=E6=94=AF=E6=8C=81=E9=80=9A=E8=BF=87=20${token}?=
=?UTF-8?q?=E6=96=B9=E5=BC=8F=E4=BC=A0=E9=80=92=E5=BD=93=E5=89=8D=E7=99=BB?=
=?UTF-8?q?=E5=BD=95TOKEN?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/components/layouts/IframePageView.vue | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/jero-web/src/components/layouts/IframePageView.vue b/jero-web/src/components/layouts/IframePageView.vue
index 50434423..dee1ddd9 100644
--- a/jero-web/src/components/layouts/IframePageView.vue
+++ b/jero-web/src/components/layouts/IframePageView.vue
@@ -38,16 +38,18 @@
//url = "http://www.baidu.com"
console.log("------url------"+url)
if (url !== null && url !== undefined) {
- this.url = url;
+ //-----------------------------------------------------------------------------------------
+ //url支持通过 ${token}方式传递当前登录TOKEN
+ let tokenStr = "${token}";
+ if(url.indexOf(tokenStr)!=-1) {
+ let token = Vue.ls.get(ACCESS_TOKEN);
+ this.url = url.replace(tokenStr, token);
+ }
+ //-----------------------------------------------------------------------------------------
+
/*update_begin author:wuxianquan date:20190908 for:判断打开方式,新窗口打开时this.$route.meta.internalOrExternal==true */
if(this.$route.meta.internalOrExternal != undefined && this.$route.meta.internalOrExternal==true){
this.closeCurrent();
- //外部url加入token
- let tokenStr = "${token}";
- if(url.indexOf(tokenStr)!=-1){
- let token = Vue.ls.get(ACCESS_TOKEN);
- this.url = url.replace(tokenStr,token);
- }
window.open(this.url);
}
/*update_end author:wuxianquan date:20190908 for:判断打开方式,新窗口打开时this.$route.meta.internalOrExternal==true */
From aafbcd24043979c54dbf461247cd56b1613c7bec Mon Sep 17 00:00:00 2001
From: zer0Black
Date: Mon, 28 Feb 2022 13:13:21 +0800
Subject: [PATCH 23/61] =?UTF-8?q?=E5=A4=96=E9=83=A8URL=E8=8F=9C=E5=8D=95?=
=?UTF-8?q?=E5=8A=A0=E8=BD=BD=E4=B8=BA=E7=A9=BA=E4=B8=BA=E7=A9=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
jero-web/src/components/layouts/IframePageView.vue | 2 ++
1 file changed, 2 insertions(+)
diff --git a/jero-web/src/components/layouts/IframePageView.vue b/jero-web/src/components/layouts/IframePageView.vue
index dee1ddd9..1770b07b 100644
--- a/jero-web/src/components/layouts/IframePageView.vue
+++ b/jero-web/src/components/layouts/IframePageView.vue
@@ -44,6 +44,8 @@
if(url.indexOf(tokenStr)!=-1) {
let token = Vue.ls.get(ACCESS_TOKEN);
this.url = url.replace(tokenStr, token);
+ } else {
+ this.url = url
}
//-----------------------------------------------------------------------------------------
From 193d92f968ddbe61b1a0512ff1b20a376d249eaf Mon Sep 17 00:00:00 2001
From: zer0Black
Date: Mon, 28 Feb 2022 13:16:08 +0800
Subject: [PATCH 24/61] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=B8=80=E7=A7=8D=20Cr?=
=?UTF-8?q?on=E8=A1=A8=E8=BE=BE=E5=BC=8F=20=E9=80=89=E6=8B=A9=E7=BB=84?=
=?UTF-8?q?=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/jero/JEasyCron/EasyCron.vue | 281 ++++++++++++++++++
.../components/jero/JEasyCron/InputCron.vue | 99 ++++++
.../components/jero/JEasyCron/format-date.js | 37 +++
.../src/components/jero/JEasyCron/index.js | 6 +
.../components/jero/JEasyCron/tabs/const.js | 21 ++
.../components/jero/JEasyCron/tabs/day.vue | 101 +++++++
.../components/jero/JEasyCron/tabs/hour.vue | 67 +++++
.../components/jero/JEasyCron/tabs/minute.vue | 67 +++++
.../components/jero/JEasyCron/tabs/mixin.js | 162 ++++++++++
.../components/jero/JEasyCron/tabs/mixin.less | 35 +++
.../components/jero/JEasyCron/tabs/month.vue | 67 +++++
.../components/jero/JEasyCron/tabs/second.vue | 68 +++++
.../components/jero/JEasyCron/tabs/week.vue | 118 ++++++++
.../components/jero/JEasyCron/tabs/year.vue | 60 ++++
.../components/jero/JEasyCron/validator.js | 51 ++++
jero-web/src/views/demo/ImgTurnPage.vue | 2 +-
jero-web/src/views/demo/SelectDemo.vue | 2 +-
.../JeroOrderModalForJVexTable.vue | 12 +-
.../views/demo/modules/JeroOrderMainModal.vue | 10 +-
.../demo/tablist/form/JeroOrderDMainModal.vue | 4 +-
20 files changed, 1255 insertions(+), 15 deletions(-)
create mode 100644 jero-web/src/components/jero/JEasyCron/EasyCron.vue
create mode 100644 jero-web/src/components/jero/JEasyCron/InputCron.vue
create mode 100644 jero-web/src/components/jero/JEasyCron/format-date.js
create mode 100644 jero-web/src/components/jero/JEasyCron/index.js
create mode 100644 jero-web/src/components/jero/JEasyCron/tabs/const.js
create mode 100644 jero-web/src/components/jero/JEasyCron/tabs/day.vue
create mode 100644 jero-web/src/components/jero/JEasyCron/tabs/hour.vue
create mode 100644 jero-web/src/components/jero/JEasyCron/tabs/minute.vue
create mode 100644 jero-web/src/components/jero/JEasyCron/tabs/mixin.js
create mode 100644 jero-web/src/components/jero/JEasyCron/tabs/mixin.less
create mode 100644 jero-web/src/components/jero/JEasyCron/tabs/month.vue
create mode 100644 jero-web/src/components/jero/JEasyCron/tabs/second.vue
create mode 100644 jero-web/src/components/jero/JEasyCron/tabs/week.vue
create mode 100644 jero-web/src/components/jero/JEasyCron/tabs/year.vue
create mode 100644 jero-web/src/components/jero/JEasyCron/validator.js
diff --git a/jero-web/src/components/jero/JEasyCron/EasyCron.vue b/jero-web/src/components/jero/JEasyCron/EasyCron.vue
new file mode 100644
index 00000000..73ef4872
--- /dev/null
+++ b/jero-web/src/components/jero/JEasyCron/EasyCron.vue
@@ -0,0 +1,281 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 近十次执行时间(不含年)
+
+
+
+
+
+
+
+
+
+
diff --git a/jero-web/src/components/jero/JEasyCron/InputCron.vue b/jero-web/src/components/jero/JEasyCron/InputCron.vue
new file mode 100644
index 00000000..868d4b35
--- /dev/null
+++ b/jero-web/src/components/jero/JEasyCron/InputCron.vue
@@ -0,0 +1,99 @@
+
+
+
+
+
+
+
diff --git a/jero-web/src/components/jero/JEasyCron/format-date.js b/jero-web/src/components/jero/JEasyCron/format-date.js
new file mode 100644
index 00000000..8a55974f
--- /dev/null
+++ b/jero-web/src/components/jero/JEasyCron/format-date.js
@@ -0,0 +1,37 @@
+const dateFormat = (date, block) => {
+ if (!date) {
+ return ''
+ }
+
+ let format = block || 'yyyy-MM-dd'
+
+ date = new Date(date)
+
+ const map = {
+ M: date.getMonth() + 1, // 月份
+ d: date.getDate(), // 日
+ h: date.getHours(), // 小时
+ m: date.getMinutes(), // 分
+ s: date.getSeconds(), // 秒
+ q: Math.floor((date.getMonth() + 3) / 3), // 季度
+ S: date.getMilliseconds() // 毫秒
+ }
+
+ format = format.replace(/([yMdhmsqS])+/g, (all, t) => {
+ let v = map[t]
+ if (v !== undefined) {
+ if (all.length > 1) {
+ v = `0${v}`
+ v = v.substr(v.length - 2)
+ }
+ return v
+ } else if (t === 'y') {
+ return (date.getFullYear().toString()).substr(4 - all.length)
+ }
+ return all
+ })
+
+ return format
+}
+
+export default dateFormat
diff --git a/jero-web/src/components/jero/JEasyCron/index.js b/jero-web/src/components/jero/JEasyCron/index.js
new file mode 100644
index 00000000..f7f46244
--- /dev/null
+++ b/jero-web/src/components/jero/JEasyCron/index.js
@@ -0,0 +1,6 @@
+// 原开源项目地址:https://gitee.com/toktok/easy-cron
+
+import InputCron from './InputCron.vue'
+
+InputCron.name = 'JEasyCron'
+export default InputCron
\ No newline at end of file
diff --git a/jero-web/src/components/jero/JEasyCron/tabs/const.js b/jero-web/src/components/jero/JEasyCron/tabs/const.js
new file mode 100644
index 00000000..e076ee18
--- /dev/null
+++ b/jero-web/src/components/jero/JEasyCron/tabs/const.js
@@ -0,0 +1,21 @@
+export const WEEK_MAP_EN = {
+ 'SUN': '0',
+ 'MON': '1',
+ 'TUE': '2',
+ 'WED': '3',
+ 'THU': '4',
+ 'FRI': '5',
+ 'SAT': '6'
+}
+
+export const replaceWeekName = (c) => {
+ // console.info('after: ' + c)
+ if (c) {
+ Object.keys(WEEK_MAP_EN).forEach(k => {
+ c = c.replace(new RegExp(k, 'g'), WEEK_MAP_EN[k])
+ })
+ c = c.replace(new RegExp('7', 'g'), '0')
+ }
+ // console.info('after: ' + c)
+ return c
+}
diff --git a/jero-web/src/components/jero/JEasyCron/tabs/day.vue b/jero-web/src/components/jero/JEasyCron/tabs/day.vue
new file mode 100644
index 00000000..4d46ff26
--- /dev/null
+++ b/jero-web/src/components/jero/JEasyCron/tabs/day.vue
@@ -0,0 +1,101 @@
+
+
+
+
+
+
+
区间
+ 从
+
+ 日
+ 至
+
+ 日
+
+
+
循环
+ 从
+
+ 日开始,间隔
+
+ 日
+
+
+
工作日
+ 本月
+
+ 日,最近的工作日
+
+
+
+
+
+
+
+
+
+
diff --git a/jero-web/src/components/jero/JEasyCron/tabs/hour.vue b/jero-web/src/components/jero/JEasyCron/tabs/hour.vue
new file mode 100644
index 00000000..f869b31d
--- /dev/null
+++ b/jero-web/src/components/jero/JEasyCron/tabs/hour.vue
@@ -0,0 +1,67 @@
+
+
+
+
+
+
区间
+ 从
+
+ 时
+ 至
+
+ 时
+
+
+
循环
+ 从
+
+ 时开始,间隔
+
+ 时
+
+
+
+
+
+
+
+
+
diff --git a/jero-web/src/components/jero/JEasyCron/tabs/minute.vue b/jero-web/src/components/jero/JEasyCron/tabs/minute.vue
new file mode 100644
index 00000000..0dc58b7a
--- /dev/null
+++ b/jero-web/src/components/jero/JEasyCron/tabs/minute.vue
@@ -0,0 +1,67 @@
+
+
+
+
+
+
区间
+ 从
+
+ 分
+ 至
+
+ 分
+
+
+
循环
+ 从
+
+ 分开始,间隔
+
+ 分
+
+
+
+
+
+
+
+
+
diff --git a/jero-web/src/components/jero/JEasyCron/tabs/mixin.js b/jero-web/src/components/jero/JEasyCron/tabs/mixin.js
new file mode 100644
index 00000000..add41b69
--- /dev/null
+++ b/jero-web/src/components/jero/JEasyCron/tabs/mixin.js
@@ -0,0 +1,162 @@
+// 主要用于日和星期的互斥使用
+const TYPE_NOT_SET = 'TYPE_NOT_SET'
+const TYPE_EVERY = 'TYPE_EVERY'
+const TYPE_RANGE = 'TYPE_RANGE'
+const TYPE_LOOP = 'TYPE_LOOP'
+const TYPE_WORK = 'TYPE_WORK'
+const TYPE_LAST = 'TYPE_LAST'
+const TYPE_SPECIFY = 'TYPE_SPECIFY'
+
+const DEFAULT_VALUE = '?'
+
+export default {
+ model: {
+ prop: 'prop',
+ event: 'change'
+ },
+ props: {
+ prop: {
+ type: String,
+ default: DEFAULT_VALUE
+ },
+ disabled: {
+ type: Boolean,
+ default: false
+ }
+ },
+ data () {
+ const type = TYPE_EVERY
+ return {
+ DEFAULT_VALUE,
+ // 类型
+ type,
+ // 启用日或者星期互斥用
+ TYPE_NOT_SET,
+ TYPE_EVERY,
+ TYPE_RANGE,
+ TYPE_LOOP,
+ TYPE_WORK,
+ TYPE_LAST,
+ TYPE_SPECIFY,
+ // 对于不同的类型,所定义的值也有所不同
+ valueRange: {
+ start: 0,
+ end: 0
+ },
+ valueLoop: {
+ start: 0,
+ interval: 1
+ },
+ valueWeek: {
+ start: 0,
+ end: 0
+ },
+ valueList: [],
+ valueWork: 1,
+ maxValue: 0,
+ minValue: 0
+ }
+ },
+ watch: {
+ prop (newVal, oldVal) {
+ if (newVal === this.value_c) {
+ // console.info('skip ' + newVal)
+ return
+ }
+ this.parseProp(newVal)
+ }
+ },
+ computed: {
+ value_c () {
+ let result = []
+ switch (this.type) {
+ case TYPE_NOT_SET:
+ result.push('?')
+ break
+ case TYPE_EVERY:
+ result.push('*')
+ break
+ case TYPE_RANGE:
+ result.push(`${this.valueRange.start}-${this.valueRange.end}`)
+ break
+ case TYPE_LOOP:
+ result.push(`${this.valueLoop.start}/${this.valueLoop.interval}`)
+ break
+ case TYPE_WORK:
+ result.push(`${this.valueWork}W`)
+ break
+ case TYPE_LAST:
+ result.push('L')
+ break
+ case TYPE_SPECIFY:
+ if (this.valueList.length === 0) {
+ this.valueList.push(this.minValue)
+ }
+ result.push(this.valueList.join(','))
+ break
+ default:
+ result.push(this.DEFAULT_VALUE)
+ break
+ }
+ return result.length > 0 ? result.join('') : this.DEFAULT_VALUE
+ },
+ // 指定值范围区间,介于最小值和最大值之间
+ specifyRange() {
+ let range = []
+ for (let i = this.minValue; i <= this.maxValue; i++) {
+ range.push(i)
+ }
+ return range
+ },
+ },
+ methods: {
+ parseProp (value) {
+ if (value === this.value_c) {
+ // console.info('same ' + value)
+ return
+ }
+ if (typeof (this.preProcessProp) === 'function') {
+ value = this.preProcessProp(value)
+ }
+ try {
+ if (!value || value === this.DEFAULT_VALUE) {
+ this.type = TYPE_EVERY
+ } else if (value.indexOf('?') >= 0) {
+ this.type = TYPE_NOT_SET
+ } else if (value.indexOf('-') >= 0) {
+ this.type = TYPE_RANGE
+ const values = value.split('-')
+ if (values.length >= 2) {
+ this.valueRange.start = parseInt(values[0])
+ this.valueRange.end = parseInt(values[1])
+ }
+ } else if (value.indexOf('/') >= 0) {
+ this.type = TYPE_LOOP
+ const values = value.split('/')
+ if (values.length >= 2) {
+ this.valueLoop.start = value[0] === '*' ? 0 : parseInt(values[0])
+ this.valueLoop.interval = parseInt(values[1])
+ }
+ } else if (value.indexOf('W') >= 0) {
+ this.type = TYPE_WORK
+ const values = value.split('W')
+ if (!values[0] && !isNaN(values[0])) {
+ this.valueWork = parseInt(values[0])
+ }
+ } else if (value.indexOf('L') >= 0) {
+ this.type = TYPE_LAST
+ const values = value.split('L')
+ this.valueLast = parseInt(values[0])
+ } else if (value.indexOf(',') >= 0 || !isNaN(value)) {
+ this.type = TYPE_SPECIFY
+ this.valueList = value.split(',').map(item => parseInt(item))
+ } else {
+ this.type = TYPE_EVERY
+ }
+ } catch (e) {
+ // console.info(e)
+ this.type = TYPE_EVERY
+ }
+ }
+ }
+}
diff --git a/jero-web/src/components/jero/JEasyCron/tabs/mixin.less b/jero-web/src/components/jero/JEasyCron/tabs/mixin.less
new file mode 100644
index 00000000..7278ab43
--- /dev/null
+++ b/jero-web/src/components/jero/JEasyCron/tabs/mixin.less
@@ -0,0 +1,35 @@
+
+.config-list {
+ text-align: left;
+ margin: 0 10px 10px 10px;
+}
+
+.item {
+ margin-top: 5px;
+}
+
+.choice {
+ padding: 5px 8px;
+}
+
+
+.w60 {
+ width: 60px;
+}
+.w80 {
+ width: 80px;
+}
+
+.list {
+ margin: 0 20px;
+}
+
+.list-check-item {
+ padding: 1px 3px;
+ width: 4em;
+}
+
+.tip-info {
+ color: #999
+}
+
diff --git a/jero-web/src/components/jero/JEasyCron/tabs/month.vue b/jero-web/src/components/jero/JEasyCron/tabs/month.vue
new file mode 100644
index 00000000..99a9a62e
--- /dev/null
+++ b/jero-web/src/components/jero/JEasyCron/tabs/month.vue
@@ -0,0 +1,67 @@
+
+
+
+
+
+
区间
+ 从
+
+ 月
+ 至
+
+ 月
+
+
+
循环
+ 从
+
+ 月开始,间隔
+
+ 月
+
+
+
+
+
+
+
+
+
diff --git a/jero-web/src/components/jero/JEasyCron/tabs/second.vue b/jero-web/src/components/jero/JEasyCron/tabs/second.vue
new file mode 100644
index 00000000..c3fb4d63
--- /dev/null
+++ b/jero-web/src/components/jero/JEasyCron/tabs/second.vue
@@ -0,0 +1,68 @@
+
+
+
+
+
+
区间
+ 从
+
+ 秒
+ 至
+
+ 秒
+
+
+
循环
+ 从
+
+ 秒开始,间隔
+
+ 秒
+
+
+
+
+
+
+
+
+
diff --git a/jero-web/src/components/jero/JEasyCron/tabs/week.vue b/jero-web/src/components/jero/JEasyCron/tabs/week.vue
new file mode 100644
index 00000000..1b8b2b2a
--- /dev/null
+++ b/jero-web/src/components/jero/JEasyCron/tabs/week.vue
@@ -0,0 +1,118 @@
+
+
+
+
+
+
区间
+ 从
+
+
+ {{k}}
+
+
+ 至
+
+
+ {{k}}
+
+
+
+
+
循环
+ 从
+
+
+ {{k}}
+
+
+ 开始,间隔
+
+ 天
+
+
+
+
+
+
+
+
+
diff --git a/jero-web/src/components/jero/JEasyCron/tabs/year.vue b/jero-web/src/components/jero/JEasyCron/tabs/year.vue
new file mode 100644
index 00000000..7d4bbdb4
--- /dev/null
+++ b/jero-web/src/components/jero/JEasyCron/tabs/year.vue
@@ -0,0 +1,60 @@
+
+
+
+
+
+
区间
+ 从
+
+ 年
+ 至
+
+ 年
+
+
+
循环
+ 从
+
+ 年开始,间隔
+
+ 年
+
+
+
+
+
+
+
+
diff --git a/jero-web/src/components/jero/JEasyCron/validator.js b/jero-web/src/components/jero/JEasyCron/validator.js
new file mode 100644
index 00000000..f38daca7
--- /dev/null
+++ b/jero-web/src/components/jero/JEasyCron/validator.js
@@ -0,0 +1,51 @@
+import CronParser from 'cron-parser'
+import { replaceWeekName } from './tabs/const'
+
+export default (rule, value, callback) => {
+ // 没填写就不校验
+ if (!value) {
+ callback()
+ return true
+ }
+ const values = value.split(' ').filter(item => !!item)
+ if (values.length > 7) {
+ callback(new Error('Cron表达式最多7项!'))
+ return false
+ }
+ // 检查第7项
+ let e = value
+ if (values.length === 7) {
+ const year = replaceWeekName(values[6])
+ if (year !== '*' && year !== '?') {
+ let yearValues = []
+ if (year.indexOf('-') >= 0) {
+ yearValues = year.split('-')
+ } else if (year.indexOf('/')) {
+ yearValues = year.split('/')
+ } else {
+ yearValues = [year]
+ }
+ // console.info(yearValues)
+ // 判断是否都是数字
+ const checkYear = yearValues.some(item => isNaN(item))
+ if (checkYear) {
+ callback(new Error('Cron表达式参数[年]错误:' + year))
+ return false
+ }
+ }
+ // 取其中的前六项
+ e = values.slice(0, 6).join(' ')
+ }
+ // 6位 没有年
+ // 5位没有秒、年
+ let result = true
+ try {
+ const iter = CronParser.parseExpression(e)
+ iter.next()
+ callback()
+ } catch (e) {
+ callback(new Error('Cron表达式错误:' + e))
+ result = false
+ }
+ return result
+}
diff --git a/jero-web/src/views/demo/ImgTurnPage.vue b/jero-web/src/views/demo/ImgTurnPage.vue
index 3e692bc7..02e2955d 100644
--- a/jero-web/src/views/demo/ImgTurnPage.vue
+++ b/jero-web/src/views/demo/ImgTurnPage.vue
@@ -74,7 +74,7 @@
children: [{
title: '1页',
key: '0-2-0',
- imgUrl:'https://static.jeecg.com/upload/test/1374962_1587621329085.jpg'
+ imgUrl:'https://static.jero.com/upload/test/1374962_1587621329085.jpg'
}]
}],
selectedKeys:[],
diff --git a/jero-web/src/views/demo/SelectDemo.vue b/jero-web/src/views/demo/SelectDemo.vue
index 5eda1e75..c8694033 100644
--- a/jero-web/src/views/demo/SelectDemo.vue
+++ b/jero-web/src/views/demo/SelectDemo.vue
@@ -510,7 +510,7 @@
userIds: 'admin',
multiUser: 'admin,jero',
jcheckbox: {
- values: 'spring,jeecgboot',
+ values: 'spring,jeroboot',
options: [
{ label: 'Jero', value: 'jero' },
{ label: 'Jero-Boot', value: 'jeroboot' },
diff --git a/jero-web/src/views/demo/modules/JEditableTable/JeroOrderModalForJVexTable.vue b/jero-web/src/views/demo/modules/JEditableTable/JeroOrderModalForJVexTable.vue
index 7dd01039..8bf4aa37 100644
--- a/jero-web/src/views/demo/modules/JEditableTable/JeroOrderModalForJVexTable.vue
+++ b/jero-web/src/views/demo/modules/JEditableTable/JeroOrderModalForJVexTable.vue
@@ -187,10 +187,10 @@
]
},
url: {
- add: '/test/jeecgOrderMain/add',
- edit: '/test/jeecgOrderMain/edit',
- orderCustomerList: '/test/jeecgOrderMain/queryOrderCustomerListByMainId',
- orderTicketList: '/test/jeecgOrderMain/queryOrderTicketListByMainId'
+ add: '/test/jeroOrderMain/add',
+ edit: '/test/jeroOrderMain/edit',
+ orderCustomerList: '/test/jeroOrderMain/queryOrderCustomerListByMainId',
+ orderTicketList: '/test/jeroOrderMain/queryOrderTicketListByMainId'
}
}
},
@@ -279,8 +279,8 @@
let orderMain = Object.assign(this.model, allValues.formValue)
return {
...orderMain, // 展开
- jeecgOrderCustomerList: allValues.tablesValue[0].tableData,
- jeecgOrderTicketList: allValues.tablesValue[1].tableData
+ jeroOrderCustomerList: allValues.tablesValue[0].tableData,
+ jeroOrderTicketList: allValues.tablesValue[1].tableData
}
},
/** 发起新增或修改的请求 */
diff --git a/jero-web/src/views/demo/modules/JeroOrderMainModal.vue b/jero-web/src/views/demo/modules/JeroOrderMainModal.vue
index 150d5ca4..36689198 100644
--- a/jero-web/src/views/demo/modules/JeroOrderMainModal.vue
+++ b/jero-web/src/views/demo/modules/JeroOrderMainModal.vue
@@ -55,7 +55,7 @@
操作
-
+
@@ -75,12 +75,12 @@
-
+
-
+
@@ -103,14 +103,14 @@
航班时间
操作
-
+
-
+
diff --git a/jero-web/src/views/demo/tablist/form/JeroOrderDMainModal.vue b/jero-web/src/views/demo/tablist/form/JeroOrderDMainModal.vue
index ccdd8daa..66125035 100644
--- a/jero-web/src/views/demo/tablist/form/JeroOrderDMainModal.vue
+++ b/jero-web/src/views/demo/tablist/form/JeroOrderDMainModal.vue
@@ -67,8 +67,8 @@
title: "操作",
visible: false,
orderMainModel: {
- jeecgOrderCustomerList: [{}],
- jeecgOrderTicketList: [{}]
+ jeroOrderCustomerList: [{}],
+ jeroOrderTicketList: [{}]
},
labelCol: {
xs: {span: 24},
From c2cc0e47db3a3fdaf6dfa81e8ec3c5f84f90764e Mon Sep 17 00:00:00 2001
From: zer0Black
Date: Mon, 28 Feb 2022 13:21:27 +0800
Subject: [PATCH 25/61] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=9B=BE=E8=A1=A8API?=
=?UTF-8?q?=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../com/jero/modules/demo/mock/MockController.java | 6 +++++-
.../com/jero/modules/demo/mock/json/getTubiao.json | 10 ++++++++++
2 files changed, 15 insertions(+), 1 deletion(-)
create mode 100644 jero-boot/jero-boot-module-demo/src/main/java/com/jero/modules/demo/mock/json/getTubiao.json
diff --git a/jero-boot/jero-boot-module-demo/src/main/java/com/jero/modules/demo/mock/MockController.java b/jero-boot/jero-boot-module-demo/src/main/java/com/jero/modules/demo/mock/MockController.java
index 58aadce8..794eda9b 100644
--- a/jero-boot/jero-boot-module-demo/src/main/java/com/jero/modules/demo/mock/MockController.java
+++ b/jero-boot/jero-boot-module-demo/src/main/java/com/jero/modules/demo/mock/MockController.java
@@ -107,7 +107,11 @@ public class MockController {
public String getCabinetCountInfo() {
return readJson("classpath:com/jero/modules/demo/mock/json/getCntrNoCountInfo.json");
}
-
+ @GetMapping(value = "/report/getTubiao")
+ public String getTubiao() {
+ return readJson("classpath:org/jero/modules/demo/mock/json/getTubiao.json");
+ }
+
/**
* 实时磁盘监控
* @param request
diff --git a/jero-boot/jero-boot-module-demo/src/main/java/com/jero/modules/demo/mock/json/getTubiao.json b/jero-boot/jero-boot-module-demo/src/main/java/com/jero/modules/demo/mock/json/getTubiao.json
new file mode 100644
index 00000000..0037bcd8
--- /dev/null
+++ b/jero-boot/jero-boot-module-demo/src/main/java/com/jero/modules/demo/mock/json/getTubiao.json
@@ -0,0 +1,10 @@
+{"data":
+ [
+ {"day": "星期一", "step": 1234, "assess": "良"},
+ {"day": "星期二", "step": 1884, "assess": "优"},
+ {"day": "星期三", "step": 1671, "assess": "良+"},
+ {"day": "星期四", "step": 2197, "assess": "优+"},
+ {"day": "星期五", "step": 1342, "assess": "中"},
+ {"day": "星期六", "step": 545, "assess": "差"},
+ {"day": "星期日", "step": 244, "assess": "极差"}
+ ]}
\ No newline at end of file
From 3c74d8bb87b73a8b00b0de2d110e56dbfc6b74fd Mon Sep 17 00:00:00 2001
From: zer0Black
Date: Mon, 28 Feb 2022 13:22:05 +0800
Subject: [PATCH 26/61] =?UTF-8?q?=E7=86=94=E6=96=AD=E9=BB=98=E8=AE=A4?=
=?UTF-8?q?=E6=97=B6=E9=97=B4=E6=94=B9=E6=88=903=E7=A7=92?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../jero-cloud-gateway/src/main/resources/application.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/jero-boot/jero-cloud-module/jero-cloud-gateway/src/main/resources/application.yml b/jero-boot/jero-cloud-module/jero-cloud-gateway/src/main/resources/application.yml
index 40639f26..d698bacd 100644
--- a/jero-boot/jero-cloud-module/jero-cloud-gateway/src/main/resources/application.yml
+++ b/jero-boot/jero-cloud-module/jero-cloud-gateway/src/main/resources/application.yml
@@ -58,4 +58,4 @@ hystrix:
isolation:
strategy: SEMAPHORE
thread:
- timeoutInMilliseconds: 60000
\ No newline at end of file
+ timeoutInMilliseconds: 3000
\ No newline at end of file
From 28428f90eee52d939f4ab1367c3c8636fc65e791 Mon Sep 17 00:00:00 2001
From: zer0Black <694429613@qq.com>
Date: Sat, 19 Mar 2022 15:00:07 +0800
Subject: [PATCH 27/61] =?UTF-8?q?redis=E9=85=8D=E7=BD=AE=E6=8C=AA=E7=A7=BB?=
=?UTF-8?q?=E4=BD=8D=E7=BD=AE=EF=BC=8C=E4=BF=AE=E5=A4=8D=E6=96=87=E4=BB=B6?=
=?UTF-8?q?=E4=B8=8A=E4=BC=A0=E7=AD=89bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../java/com/jero/common/api/vo/Result.java | 11 ++-
.../com/jero/common/aspect/DictAspect.java | 36 +++++--
.../common/system/query/QueryGenerator.java | 17 +++-
.../com/jero/common/util/CommonUtils.java | 7 +-
.../java/com/jero/common/util/MinioUtil.java | 7 +-
.../com/jero/common/util/oss/OssBootUtil.java | 4 +-
.../com/jero/config/shiro/ShiroConfig.java | 17 +++-
.../modules/redis/client/JeroRedisClient.java | 14 +--
.../modules/redis/config}/RedisConfig.java | 89 ++++++++++++++----
.../redis/config/RedisConfiguration.java | 93 -------------------
.../redis/prop/JeroRedisProperties.java | 24 -----
.../{service => receiver}/RedisReceiver.java | 5 +-
.../JeroRedisCacheWriter.java | 20 ++--
13 files changed, 163 insertions(+), 181 deletions(-)
rename jero-boot/jero-boot-base/{jero-boot-base-core/src/main/java/com/jero/config/redis => jero-boot-base-tools/src/main/java/com/jero/common/modules/redis/config}/RedisConfig.java (51%)
delete mode 100644 jero-boot/jero-boot-base/jero-boot-base-tools/src/main/java/com/jero/common/modules/redis/config/RedisConfiguration.java
delete mode 100644 jero-boot/jero-boot-base/jero-boot-base-tools/src/main/java/com/jero/common/modules/redis/prop/JeroRedisProperties.java
rename jero-boot/jero-boot-base/jero-boot-base-tools/src/main/java/com/jero/common/modules/redis/{service => receiver}/RedisReceiver.java (91%)
rename jero-boot/jero-boot-base/jero-boot-base-tools/src/main/java/com/jero/common/modules/redis/{write => writer}/JeroRedisCacheWriter.java (99%)
diff --git a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/api/vo/Result.java b/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/api/vo/Result.java
index 2bb004d0..9355f227 100644
--- a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/api/vo/Result.java
+++ b/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/api/vo/Result.java
@@ -111,7 +111,16 @@ public class Result implements Serializable {
r.setResult(data);
return r;
}
-
+
+ public static Result error(String msg, T data) {
+ Result r = new Result();
+ r.setSuccess(false);
+ r.setCode(CommonConstant.SC_INTERNAL_SERVER_ERROR_500);
+ r.setMessage(msg);
+ r.setResult(data);
+ return r;
+ }
+
public static Result