Browse Source

调整:数据集字段 支持取值类型等配置

master
FLYPHT 2 years ago
parent
commit
ecd57e5aa3
4 changed files with 18 additions and 12 deletions
  1. +6
    -4
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormHelper.java
  2. +11
    -1
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/define/BaseDatasetField.java
  3. +0
    -7
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/define/PageDatasetFilter.java
  4. +1
    -0
      smtweb-framework/core/src/main/java/cc/smtweb/framework/core/common/SwEnum.java

+ 6
- 4
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormHelper.java View File

@@ -226,12 +226,14 @@ public class ModelFormHelper {
field.put("maxlength", dtb.dataLength); field.put("maxlength", dtb.dataLength);
} }
} }
field.put("type", pdf.type);
field.put("linkDb", pdf.linkDb);
field.put("linkField", pdf.linkField);
field.put("value", pdf.value);
field.put("expr", pdf.expr);
field.put("defValue", pdf.defValue);
if (!isField) { if (!isField) {
PageDatasetFilter filter = (PageDatasetFilter) pdf; PageDatasetFilter filter = (PageDatasetFilter) pdf;
field.put("type", filter.type);
field.put("linkDb", filter.linkDb);
field.put("linkField", filter.linkField);
field.put("value", filter.value);
field.put("trigger", filter.trigger); field.put("trigger", filter.trigger);
} }
} }


+ 11
- 1
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/define/BaseDatasetField.java View File

@@ -31,7 +31,17 @@ public class BaseDatasetField {
public long link; public long link;
//控件类型:TEXT/TextArea/NUMBER/COMBO //控件类型:TEXT/TextArea/NUMBER/COMBO
public String editor; public String editor;

//param-参数/link/const/depend
public String type;
//type为link时,关联的数据集及字段
public String linkDb;
public String linkField;
//type为const时,常量值
public String value;
// 默认值
public String defValue;
// type为depend时, 表达式
public String expr;
@JsonIgnore @JsonIgnore
public boolean isFieldNotNull() { public boolean isFieldNotNull() {
return notNull == 1; return notNull == 1;


+ 0
- 7
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/define/PageDatasetFilter.java View File

@@ -4,16 +4,9 @@ package cc.smtweb.system.bpm.web.design.form.define;
* Created by Akmm at 2022/4/20 18:15 * Created by Akmm at 2022/4/20 18:15
*/ //过滤条件信息 */ //过滤条件信息
public class PageDatasetFilter extends BaseDatasetField { public class PageDatasetFilter extends BaseDatasetField {
//param-参数/link/const
public String type;
public String title; public String title;
//sql中的查询字段名,可能带前缀 //sql中的查询字段名,可能带前缀
public String sqlName; public String sqlName;
//type为link时,关联的数据集及字段
public String linkDb;
public String linkField;
//type为const时,常量值
public String value;
// 触发类型 click按钮触发;change监听触发 // 触发类型 click按钮触发;change监听触发
public String trigger; public String trigger;
public boolean required = false; public boolean required = false;


+ 1
- 0
smtweb-framework/core/src/main/java/cc/smtweb/framework/core/common/SwEnum.java View File

@@ -262,6 +262,7 @@ public interface SwEnum {
public static StrEnumBean PARAM = instance.addEnum("param", "参数"); public static StrEnumBean PARAM = instance.addEnum("param", "参数");
public static StrEnumBean LINK = instance.addEnum("link", "关联"); public static StrEnumBean LINK = instance.addEnum("link", "关联");
public static StrEnumBean CONST = instance.addEnum("const", "常量"); public static StrEnumBean CONST = instance.addEnum("const", "常量");
public static StrEnumBean DEPEND = instance.addEnum("depend", "依赖");
} }


/** /**


Loading…
Cancel
Save