@@ -491,7 +491,7 @@ public class ModelFormHelper { | |||||
field.put("id", pdf.id); | field.put("id", pdf.id); | ||||
field.put("field", pdf.field); | field.put("field", pdf.field); | ||||
field.put("name", pdf.name); | field.put("name", pdf.name); | ||||
String label = (String) field.get("field_text"); | |||||
String label = (String) field.get("field_label"); | |||||
field.put("label", StringUtils.isEmpty(label)? pdf.label: label); | field.put("label", StringUtils.isEmpty(label)? pdf.label: label); | ||||
field.put("required", pdf.isFieldNotNull()); | field.put("required", pdf.isFieldNotNull()); | ||||
final SwEnum.DataTypeBean dtb = SwEnum.DataType.instance.getByValue(pdf.dataType); | final SwEnum.DataTypeBean dtb = SwEnum.DataType.instance.getByValue(pdf.dataType); | ||||
@@ -5,7 +5,7 @@ import cc.smtweb.framework.core.common.SwEnum; | |||||
import cc.smtweb.framework.core.exception.SwException; | import cc.smtweb.framework.core.exception.SwException; | ||||
import cc.smtweb.system.bpm.web.design.form.ModelForm; | import cc.smtweb.system.bpm.web.design.form.ModelForm; | ||||
import cc.smtweb.system.bpm.web.design.form.ModelFormHelper; | import cc.smtweb.system.bpm.web.design.form.ModelFormHelper; | ||||
import cc.smtweb.system.bpm.web.design.form.model.flow.LcFlowWorker; | |||||
import cc.smtweb.system.bpm.web.design.form.model.flow.FlowSingleWorker; | |||||
import org.apache.commons.lang3.StringUtils; | import org.apache.commons.lang3.StringUtils; | ||||
import java.util.*; | import java.util.*; | ||||
@@ -26,7 +26,7 @@ public class ModelFactory { | |||||
mapWorker.put(SwEnum.ModelType.LC_LT.value, new LcLtWorker()); | mapWorker.put(SwEnum.ModelType.LC_LT.value, new LcLtWorker()); | ||||
mapWorker.put(SwEnum.ModelType.LC_MS.value, new LcMsWorker()); | mapWorker.put(SwEnum.ModelType.LC_MS.value, new LcMsWorker()); | ||||
mapWorker.put(SwEnum.ModelType.LC_LT_MS.value, new LcLtMsWorker()); | mapWorker.put(SwEnum.ModelType.LC_LT_MS.value, new LcLtMsWorker()); | ||||
mapWorker.put(SwEnum.ModelType.LC_FLOW.value, new LcFlowWorker()); | |||||
mapWorker.put(SwEnum.ModelType.FLOW_SINGLE.value, new FlowSingleWorker()); | |||||
} | } | ||||
public static ModelFactory getInstance() { | public static ModelFactory getInstance() { | ||||
@@ -4,14 +4,12 @@ import cc.smtweb.framework.core.common.SwEnum; | |||||
import cc.smtweb.framework.core.common.SwMap; | import cc.smtweb.framework.core.common.SwMap; | ||||
import cc.smtweb.framework.core.db.DbEngine; | import cc.smtweb.framework.core.db.DbEngine; | ||||
import cc.smtweb.framework.core.db.EntityDao; | import cc.smtweb.framework.core.db.EntityDao; | ||||
import cc.smtweb.framework.core.exception.SwException; | |||||
import cc.smtweb.framework.core.util.JsonUtil; | import cc.smtweb.framework.core.util.JsonUtil; | ||||
import cc.smtweb.framework.core.util.StringUtil; | import cc.smtweb.framework.core.util.StringUtil; | ||||
import cc.smtweb.system.bpm.web.design.form.ModelForm; | import cc.smtweb.system.bpm.web.design.form.ModelForm; | ||||
import cc.smtweb.system.bpm.web.design.form.ModelFormCache; | import cc.smtweb.system.bpm.web.design.form.ModelFormCache; | ||||
import cc.smtweb.system.bpm.web.design.form.ModelFormHelper; | import cc.smtweb.system.bpm.web.design.form.ModelFormHelper; | ||||
import cc.smtweb.system.bpm.web.design.form.model.BaseModelWorker; | import cc.smtweb.system.bpm.web.design.form.model.BaseModelWorker; | ||||
import org.apache.commons.lang3.StringUtils; | |||||
import java.util.ArrayList; | import java.util.ArrayList; | ||||
import java.util.List; | import java.util.List; | ||||
@@ -21,7 +19,7 @@ import java.util.List; | |||||
* @Date: 2022-08-26 9:48 | * @Date: 2022-08-26 9:48 | ||||
* @Desc: 列表卡片(含工作流) | * @Desc: 列表卡片(含工作流) | ||||
*/ | */ | ||||
public class LcFlowWorker extends BaseModelWorker { | |||||
public class FlowSingleWorker extends BaseModelWorker { | |||||
private final static String listTmpl = "model_list_flow"; | private final static String listTmpl = "model_list_flow"; | ||||
private final static String cardTmpl = "model_card_flow"; | private final static String cardTmpl = "model_card_flow"; | ||||
@Override | @Override |
@@ -1,5 +1,6 @@ | |||||
package cc.smtweb.system.bpm.web.engine.model.flow.listcard.single; | package cc.smtweb.system.bpm.web.engine.model.flow.listcard.single; | ||||
import cc.smtweb.framework.core.annotation.SwService; | |||||
import cc.smtweb.system.bpm.web.engine.model.listcard.single.LCSingleDelHandler; | import cc.smtweb.system.bpm.web.engine.model.listcard.single.LCSingleDelHandler; | ||||
import cc.smtweb.system.bpm.web.engine.model.listcard.single.LCSingleLoadHandler; | import cc.smtweb.system.bpm.web.engine.model.listcard.single.LCSingleLoadHandler; | ||||
import cc.smtweb.system.bpm.web.engine.model.listcard.single.LCSingleSaveHandler; | import cc.smtweb.system.bpm.web.engine.model.listcard.single.LCSingleSaveHandler; | ||||
@@ -9,6 +10,7 @@ import cc.smtweb.system.bpm.web.engine.model.listcard.single.LCSingleService; | |||||
* Created by Akmm at 2022-08-26 16:35 | * Created by Akmm at 2022-08-26 16:35 | ||||
* 带工作流的简单列表+卡片 | * 带工作流的简单列表+卡片 | ||||
*/ | */ | ||||
@SwService | |||||
public class FlowSingleService extends LCSingleService { | public class FlowSingleService extends LCSingleService { | ||||
@Override | @Override | ||||
protected LCSingleSaveHandler getSaveHandler() { | protected LCSingleSaveHandler getSaveHandler() { | ||||
@@ -6,7 +6,7 @@ | |||||
"colNum": 3, | "colNum": 3, | ||||
"name": "query", | "name": "query", | ||||
"label": "按钮区", | "label": "按钮区", | ||||
"size": "50", | |||||
"size": "56", | |||||
"shadow": "", | "shadow": "", | ||||
"alignY": "center", | "alignY": "center", | ||||
"paddingRight": 20, | "paddingRight": 20, | ||||
@@ -99,8 +99,17 @@ | |||||
"type": "fx-form-panel", | "type": "fx-form-panel", | ||||
"shape": "panel", | "shape": "panel", | ||||
"props": { | "props": { | ||||
"size": "15", | |||||
"backgroundColor": "transparent" | |||||
"size": "0" | |||||
}, | }, | ||||
"children": [] | |||||
"children": [ | |||||
{ | |||||
"id": "id182e7b9a7fa", | |||||
"type": "fx-divider", | |||||
"props": { | |||||
"label": "", | |||||
"contentPosition": "center", | |||||
"direction": "horizontal" | |||||
} | |||||
} | |||||
] | |||||
}, | }, |
@@ -83,13 +83,11 @@ | |||||
"label": "编辑", | "label": "编辑", | ||||
"type": "primary", | "type": "primary", | ||||
"leftIcon": "edit", | "leftIcon": "edit", | ||||
"action": "button:edit", | |||||
"action": "button:editCard", | |||||
"dataset": "${group.dataset}", | "dataset": "${group.dataset}", | ||||
"text": true, | "text": true, | ||||
"link": false, | "link": false, | ||||
"linkType": "curr", | |||||
"nextAction": "", | |||||
"fxLink": "" | |||||
"linkType": "curr" | |||||
} | } | ||||
}, | }, | ||||
</#if> | </#if> | ||||
@@ -28,7 +28,7 @@ | |||||
"type": "fx-split-panel", | "type": "fx-split-panel", | ||||
"shape": "panel", | "shape": "panel", | ||||
"props": { | "props": { | ||||
"size": "50", | |||||
"size": "56", | |||||
"horizontal": true, | "horizontal": true, | ||||
"scroll": false, | "scroll": false, | ||||
"name": "s11" | "name": "s11" | ||||
@@ -77,8 +77,7 @@ | |||||
"props": { | "props": { | ||||
"label": "删除", | "label": "删除", | ||||
"leftIcon": "delete", | "leftIcon": "delete", | ||||
"type": "", | |||||
"action": "button:remove" | |||||
"action": "button:delCard" | |||||
}, | }, | ||||
"id": "${newId()}" | "id": "${newId()}" | ||||
}, | }, | ||||
@@ -88,8 +87,8 @@ | |||||
"props": { | "props": { | ||||
"label": "新增", | "label": "新增", | ||||
"type": "primary", | "type": "primary", | ||||
"linkType": "curr", | |||||
"leftIcon": "plus" | |||||
"leftIcon": "plus", | |||||
"action": "button:addCard" | |||||
} | } | ||||
}, | }, | ||||
{ | { | ||||
@@ -99,8 +98,7 @@ | |||||
"label": "返回", | "label": "返回", | ||||
"type": "success", | "type": "success", | ||||
"size": "default", | "size": "default", | ||||
"preAction": "", | |||||
"action": "button:return", | |||||
"action": "button:backList", | |||||
"leftIcon": "list-top" | "leftIcon": "list-top" | ||||
}, | }, | ||||
"events": {} | "events": {} | ||||
@@ -175,6 +173,13 @@ | |||||
<#if field.maxlength gt 0> | <#if field.maxlength gt 0> | ||||
"maxlength": ${field.maxlength}, | "maxlength": ${field.maxlength}, | ||||
</#if> | </#if> | ||||
<#if field.lookup??> | |||||
"lookup": { | |||||
<#list field.lookup as k, v> | |||||
"${k}": "${v}" <#if k_has_next>,</#if> | |||||
</#list> | |||||
}, | |||||
</#if> | |||||
"placeholder": "请输入内容", | "placeholder": "请输入内容", | ||||
<#if (param.col = 2)> | <#if (param.col = 2)> | ||||
"tips": "${field.desc}", | "tips": "${field.desc}", | ||||
@@ -259,7 +264,7 @@ | |||||
"type": "fx-form-panel", | "type": "fx-form-panel", | ||||
"shape": "panel", | "shape": "panel", | ||||
"props": { | "props": { | ||||
"size": "50", | |||||
"size": "56", | |||||
"alignY": "center", | "alignY": "center", | ||||
"alignX": "center" | "alignX": "center" | ||||
}, | }, | ||||
@@ -277,7 +282,7 @@ | |||||
"props": { | "props": { | ||||
"label": "保存并新增", | "label": "保存并新增", | ||||
"type": "primary", | "type": "primary", | ||||
"action": "button:saveAndAdd", | |||||
"action": "button:saveAddCard", | |||||
"linkType": "curr" | "linkType": "curr" | ||||
}, | }, | ||||
"id": "${newId()}" | "id": "${newId()}" | ||||
@@ -288,7 +293,7 @@ | |||||
"label": "保存", | "label": "保存", | ||||
"leftIcon": "save", | "leftIcon": "save", | ||||
"type": "success", | "type": "success", | ||||
"action": "button:save" | |||||
"action": "button:saveCard" | |||||
}, | }, | ||||
"id": "${newId()}" | "id": "${newId()}" | ||||
},{ | },{ | ||||
@@ -341,7 +346,17 @@ | |||||
} | } | ||||
} | } | ||||
] | ] | ||||
} | |||||
}, | |||||
{ | |||||
"id": "${newId()}", | |||||
"type": "fx-form-panel", | |||||
"shape": "panel", | |||||
"props": { | |||||
"size": "16", | |||||
"backgroundColor": "--color-transparent" | |||||
}, | |||||
"children": [] | |||||
} | |||||
] | ] | ||||
} | } | ||||
} | } | ||||
@@ -28,7 +28,7 @@ | |||||
"type": "fx-form-panel", | "type": "fx-form-panel", | ||||
"shape": "panel", | "shape": "panel", | ||||
"props": { | "props": { | ||||
"size": "50", | |||||
"size": "56", | |||||
"label": "查询条件", | "label": "查询条件", | ||||
"colNum": 2, | "colNum": 2, | ||||
"alignY": "center", | "alignY": "center", | ||||
@@ -42,13 +42,7 @@ | |||||
"type": "fx-title", | "type": "fx-title", | ||||
"props": { | "props": { | ||||
"label": "${title}", | "label": "${title}", | ||||
"fontSize": 15, | |||||
"color": "#313131", | |||||
"fontWeight": "bold", | |||||
"showPrefix": true, | |||||
"prefixWidth": 5, | |||||
"prefixHeight": 15, | |||||
"prefixColor": "#1E90FF" | |||||
"showPrefix": true | |||||
} | } | ||||
}, | }, | ||||
{ | { | ||||
@@ -343,7 +343,7 @@ public interface SwEnum { | |||||
public static StrEnumBean LC_LT = instance.addEnum("LC_LT", "列表卡片(左树+列表)"); | public static StrEnumBean LC_LT = instance.addEnum("LC_LT", "列表卡片(左树+列表)"); | ||||
public static StrEnumBean LC_MS = instance.addEnum("LC_MS", "列表卡片(主子表)"); | public static StrEnumBean LC_MS = instance.addEnum("LC_MS", "列表卡片(主子表)"); | ||||
public static StrEnumBean LC_LT_MS = instance.addEnum("LC_LT_MS", "列表卡片(左树+列表+主子表)"); | public static StrEnumBean LC_LT_MS = instance.addEnum("LC_LT_MS", "列表卡片(左树+列表+主子表)"); | ||||
public static StrEnumBean LC_FLOW = instance.addEnum("LC_FLOW", "列表卡片(含工作流)"); | |||||
public static StrEnumBean FLOW_SINGLE = instance.addEnum("FLOW_SINGLE", "列表卡片(含工作流)"); | |||||
} | } | ||||
// 权限类型 | // 权限类型 | ||||