Преглед на файлове

修改:model_list_card.ftl调整

4.0
FLYPHT преди 2 години
родител
ревизия
e82f445e4e
променени са 4 файла, в които са добавени 34 реда и са изтрити 8 реда
  1. +8
    -1
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormHelper.java
  2. +8
    -2
      smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_list_query.ftl
  3. +8
    -2
      smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_query_sfilters.ftl
  4. +10
    -3
      smtweb-framework/bpm/src/main/resources/static/template/default/model_list_card.ftl

+ 8
- 1
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormHelper.java Целия файл

@@ -497,6 +497,13 @@ public class ModelFormHelper {
} else {
field.put("maxlength", 0);
}
Map lookup = (Map)field.get("lookup");
if (lookup!=null){
long widgetId = MapUtil.readLong(lookup, "widgetId",-1L);
if(widgetId>0){
setWidget.add(widgetId);
}
}
}
}

@@ -520,7 +527,7 @@ public class ModelFormHelper {
col.put("editor", dtb != null ? dtb.editor: SwEnum.EditorType.INPUT.value);

if (field.getLink() == 0L) return;
Set<ModelForm> set = ModelFormCache.getInstance().getListByTable(field.getLink(), SwEnum.FormType.WIDGET.value);
if (set == null || set.isEmpty()) return;
ModelForm form = set.iterator().next();


+ 8
- 2
smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_list_query.ftl Целия файл

@@ -18,10 +18,9 @@
<#list fields as filter>
{
"id": "id${newId()}",
"type": "fx-${filter.editor}",
"type": "${filter.editor}",
"props": {
"label": "${filter.label}",
"type": "text",
<#if filter.maxlength gt 0>
"maxlength": ${filter.maxlength},
</#if>
@@ -31,6 +30,13 @@
"affixError": false,
"dataset": "${filter.dataset}",
"field": "${filter.id}",
<#if filter.lookup??>
"lookup": {
<#list filter.lookup as k, v>
"${k}": "${v}" <#if k_has_next>,</#if>
</#list>
},
</#if>
"name": "${filter.name}"
},
"events": {}


+ 8
- 2
smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_query_sfilters.ftl Целия файл

@@ -39,10 +39,9 @@
<#list fields as filter >
{
"id": "id${newId()}",
"type": "fx-${filter.editor}",
"type": "${filter.editor}",
"props": {
"label": "${filter.label}",
"type": "text",
<#if filter.maxlength gt 0 >
"maxlength": ${filter.maxlength},
</#if>
@@ -50,6 +49,13 @@
"labelWidth": 100,
"dataset": "${filter.dataset}",
"field": "${filter.id}",
<#if filter.lookup??>
"lookup": {
<#list filter.lookup as k, v>
"${k}": "${v}" <#if k_has_next>,</#if>
</#list>
},
</#if>
"name": "${filter.name}"
},
"events": {}


+ 10
- 3
smtweb-framework/bpm/src/main/resources/static/template/default/model_list_card.ftl Целия файл

@@ -156,15 +156,22 @@
"id": "id${newId()}",
<#if (dfield.readonly = true)>
"type": "fx-text",
"disabled": true,
<#else>
"type": "fx-${dfield.editor}",
"type": "${dfield.editor}",
</#if>
"props": {
"label": "${dfield.label}",
"type": "text",
"dataset": "${dfield.dataset}",
"field": "${dfield.id}",
"required": "${field.required}",
"required": "${dfield.required}",
<#if dfield.lookup??>
"lookup": {
<#list dfield.lookup as k, v>
"${k}": "${v}" <#if k_has_next>,</#if>
</#list>
},
</#if>
<#if dfield.maxlength gt 0>
"maxlength": ${dfield.maxlength},
</#if>


Зареждане…
Отказ
Запис