Ver código fonte

页面定义

master
郑根木 2 anos atrás
pai
commit
e118ae62dc
1 arquivos alterados com 7 adições e 1 exclusões
  1. +7
    -1
      smtweb-system/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormHelper.java

+ 7
- 1
smtweb-system/sw-system-bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormHelper.java Ver arquivo

@@ -98,6 +98,10 @@ public class ModelFormHelper {
PageDatasetField pdf = isField ? pds.getField(fn) : pds.getFilter(fn);
if (pdf == null) throw new SwException("model[" + db + "]." + key + "未找到定义的数据集字段(" + fn + "),无法解析!");

if (CommUtil.isStrEquals(MapUtil.readString(field, "label"), pdf.label)) {
field.remove("label");
}

//必填字段
if (pdf.isNotNull() == MapUtil.readBool(field, "required")) {
field.remove("required");
@@ -193,7 +197,9 @@ public class ModelFormHelper {
if (StringUtils.isEmpty(fn)) continue;
PageDatasetField pdf = isField ? dataSet.getField(fn) : dataSet.getFilter(fn);
if (pdf == null) continue;

if (!field.containsKey("label")) {
field.put("label", pdf.label);
}
//必填字段
if (!field.containsKey("required")) {
field.put("required", pdf.isNotNull());


Carregando…
Cancelar
Salvar