浏览代码

修改: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>


正在加载...
取消
保存