瀏覽代碼

页面

master
郑根木 2 年之前
父節點
當前提交
941d8a3dea
共有 5 個檔案被更改,包括 11 行新增10 行删除
  1. +5
    -6
      smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/common/SwEnum.java
  2. +3
    -2
      smtweb-system/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormHelper.java
  3. +1
    -0
      smtweb-system/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/define/PageDatasetField.java
  4. +1
    -1
      smtweb-system/sw-system-bpm/src/main/resources/static/template/incModel/inc_form.ftl
  5. +1
    -1
      smtweb-system/sw-system-bpm/src/main/resources/static/template/index.yaml

+ 5
- 6
smtweb-framework/sw-framework-core/src/main/java/cc/smtweb/framework/core/common/SwEnum.java 查看文件

@@ -68,15 +68,14 @@ public interface SwEnum {
class EditorType extends StrEnum {
public static EditorType instance = new EditorType();

public static StrEnumBean INPUT = instance.addEnum("input", "文本");
public static StrEnumBean TEXT = instance.addEnum("text", "长文本");
public static StrEnumBean NUMBER = instance.addEnum("num", "数字");
public static StrEnumBean INPUT = instance.addEnum("text", "文本");
public static StrEnumBean TEXT = instance.addEnum("textarea", "长文本");
public static StrEnumBean NUMBER = instance.addEnum("number", "数字");
public static StrEnumBean DATE = instance.addEnum("date", "日期");
public static StrEnumBean TIME = instance.addEnum("time", "时间");
public static StrEnumBean DATETIME = instance.addEnum("datetime", "日期时间");
public static StrEnumBean COMBO = instance.addEnum("combo", "下拉");
public static StrEnumBean TREE = instance.addEnum("tree", "树型");

public static StrEnumBean COMBO = instance.addEnum("select", "下拉列表");
public static StrEnumBean TREE = instance.addEnum("select-tree", "下拉树");
}

/**


+ 3
- 2
smtweb-system/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormHelper.java 查看文件

@@ -428,8 +428,9 @@ public class ModelFormHelper {
field.put("label", pdf.label);
field.put("required", pdf.isFieldNotNull());
final SwEnum.DataTypeBean dtb = SwEnum.DataType.instance.getByValue(pdf.dataType);
if (dtb != null && dtb.dataLength > 0) {
field.put("maxlength", dtb.dataLength);
if (dtb != null) {
if (dtb.dataLength > 0) field.put("maxlength", dtb.dataLength);
field.put("editor", dtb.editor);
}
}
}


+ 1
- 0
smtweb-system/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/define/PageDatasetField.java 查看文件

@@ -33,6 +33,7 @@ public class PageDatasetField {
public long link;
//控件类型:TEXT/TextArea/NUMBER/COMBO
public String editor;
public String editModel;

@JsonIgnore
public boolean isFieldNotNull() {


+ 1
- 1
smtweb-system/sw-system-bpm/src/main/resources/static/template/incModel/inc_form.ftl 查看文件

@@ -13,7 +13,7 @@
<#list fields as field>
{
"id": "id${newId()}",
"type": "${ctrl}",
"type": "${field.editor}",
"props": {
"label": "${field.label}",
"type": "text",


+ 1
- 1
smtweb-system/sw-system-bpm/src/main/resources/static/template/index.yaml 查看文件

@@ -13,4 +13,4 @@ model:
param:
-
name: 'p1'
type: 'ds/...'
type: 'ds'

Loading…
取消
儲存