Parcourir la source

页面定义

master
郑根木 il y a 2 ans
Parent
révision
e118ae62dc
1 fichiers modifiés avec 7 ajouts et 1 suppressions
  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 Voir le fichier

@@ -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());


Chargement…
Annuler
Enregistrer