Переглянути джерело

调整工作流模型的模板

4.0
FLYPHT 2 роки тому
джерело
коміт
3632d8876a
9 змінених файлів з 50 додано та 34 видалено
  1. +1
    -1
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormHelper.java
  2. +2
    -2
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/model/ModelFactory.java
  3. +1
    -3
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/model/flow/FlowSingleWorker.java
  4. +2
    -0
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/flow/listcard/single/FlowSingleService.java
  5. +13
    -4
      smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_list_query.ftl
  6. +2
    -4
      smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_list_table.ftl
  7. +26
    -11
      smtweb-framework/bpm/src/main/resources/static/template/default/model_card_flow.ftl
  8. +2
    -8
      smtweb-framework/bpm/src/main/resources/static/template/default/model_list_flow.ftl
  9. +1
    -1
      smtweb-framework/core/src/main/java/cc/smtweb/framework/core/common/SwEnum.java

+ 1
- 1
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/ModelFormHelper.java Переглянути файл

@@ -491,7 +491,7 @@ public class ModelFormHelper {
field.put("id", pdf.id);
field.put("field", pdf.field);
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("required", pdf.isFieldNotNull());
final SwEnum.DataTypeBean dtb = SwEnum.DataType.instance.getByValue(pdf.dataType);


+ 2
- 2
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/model/ModelFactory.java Переглянути файл

@@ -5,7 +5,7 @@ import cc.smtweb.framework.core.common.SwEnum;
import cc.smtweb.framework.core.exception.SwException;
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.model.flow.LcFlowWorker;
import cc.smtweb.system.bpm.web.design.form.model.flow.FlowSingleWorker;
import org.apache.commons.lang3.StringUtils;

import java.util.*;
@@ -26,7 +26,7 @@ public class ModelFactory {
mapWorker.put(SwEnum.ModelType.LC_LT.value, new LcLtWorker());
mapWorker.put(SwEnum.ModelType.LC_MS.value, new LcMsWorker());
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() {


smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/model/flow/LcFlowWorker.java → smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/model/flow/FlowSingleWorker.java Переглянути файл

@@ -4,14 +4,12 @@ import cc.smtweb.framework.core.common.SwEnum;
import cc.smtweb.framework.core.common.SwMap;
import cc.smtweb.framework.core.db.DbEngine;
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.StringUtil;
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.ModelFormHelper;
import cc.smtweb.system.bpm.web.design.form.model.BaseModelWorker;
import org.apache.commons.lang3.StringUtils;

import java.util.ArrayList;
import java.util.List;
@@ -21,7 +19,7 @@ import java.util.List;
* @Date: 2022-08-26 9:48
* @Desc: 列表卡片(含工作流)
*/
public class LcFlowWorker extends BaseModelWorker {
public class FlowSingleWorker extends BaseModelWorker {
private final static String listTmpl = "model_list_flow";
private final static String cardTmpl = "model_card_flow";
@Override

+ 2
- 0
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/flow/listcard/single/FlowSingleService.java Переглянути файл

@@ -1,5 +1,6 @@
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.LCSingleLoadHandler;
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
* 带工作流的简单列表+卡片
*/
@SwService
public class FlowSingleService extends LCSingleService {
@Override
protected LCSingleSaveHandler getSaveHandler() {


+ 13
- 4
smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_list_query.ftl Переглянути файл

@@ -6,7 +6,7 @@
"colNum": 3,
"name": "query",
"label": "按钮区",
"size": "50",
"size": "56",
"shadow": "",
"alignY": "center",
"paddingRight": 20,
@@ -99,8 +99,17 @@
"type": "fx-form-panel",
"shape": "panel",
"props": {
"size": "15",
"backgroundColor": "transparent"
"size": "0"
},
"children": []
"children": [
{
"id": "id182e7b9a7fa",
"type": "fx-divider",
"props": {
"label": "",
"contentPosition": "center",
"direction": "horizontal"
}
}
]
},

+ 2
- 4
smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_list_table.ftl Переглянути файл

@@ -83,13 +83,11 @@
"label": "编辑",
"type": "primary",
"leftIcon": "edit",
"action": "button:edit",
"action": "button:editCard",
"dataset": "${group.dataset}",
"text": true,
"link": false,
"linkType": "curr",
"nextAction": "",
"fxLink": ""
"linkType": "curr"
}
},
</#if>


+ 26
- 11
smtweb-framework/bpm/src/main/resources/static/template/default/model_card_flow.ftl Переглянути файл

@@ -28,7 +28,7 @@
"type": "fx-split-panel",
"shape": "panel",
"props": {
"size": "50",
"size": "56",
"horizontal": true,
"scroll": false,
"name": "s11"
@@ -77,8 +77,7 @@
"props": {
"label": "删除",
"leftIcon": "delete",
"type": "",
"action": "button:remove"
"action": "button:delCard"
},
"id": "${newId()}"
},
@@ -88,8 +87,8 @@
"props": {
"label": "新增",
"type": "primary",
"linkType": "curr",
"leftIcon": "plus"
"leftIcon": "plus",
"action": "button:addCard"
}
},
{
@@ -99,8 +98,7 @@
"label": "返回",
"type": "success",
"size": "default",
"preAction": "",
"action": "button:return",
"action": "button:backList",
"leftIcon": "list-top"
},
"events": {}
@@ -175,6 +173,13 @@
<#if field.maxlength gt 0>
"maxlength": ${field.maxlength},
</#if>
<#if field.lookup??>
"lookup": {
<#list field.lookup as k, v>
"${k}": "${v}" <#if k_has_next>,</#if>
</#list>
},
</#if>
"placeholder": "请输入内容",
<#if (param.col = 2)>
"tips": "${field.desc}",
@@ -259,7 +264,7 @@
"type": "fx-form-panel",
"shape": "panel",
"props": {
"size": "50",
"size": "56",
"alignY": "center",
"alignX": "center"
},
@@ -277,7 +282,7 @@
"props": {
"label": "保存并新增",
"type": "primary",
"action": "button:saveAndAdd",
"action": "button:saveAddCard",
"linkType": "curr"
},
"id": "${newId()}"
@@ -288,7 +293,7 @@
"label": "保存",
"leftIcon": "save",
"type": "success",
"action": "button:save"
"action": "button:saveCard"
},
"id": "${newId()}"
},{
@@ -341,7 +346,17 @@
}
}
]
}
},
{
"id": "${newId()}",
"type": "fx-form-panel",
"shape": "panel",
"props": {
"size": "16",
"backgroundColor": "--color-transparent"
},
"children": []
}
]
}
}


+ 2
- 8
smtweb-framework/bpm/src/main/resources/static/template/default/model_list_flow.ftl Переглянути файл

@@ -28,7 +28,7 @@
"type": "fx-form-panel",
"shape": "panel",
"props": {
"size": "50",
"size": "56",
"label": "查询条件",
"colNum": 2,
"alignY": "center",
@@ -42,13 +42,7 @@
"type": "fx-title",
"props": {
"label": "${title}",
"fontSize": 15,
"color": "#313131",
"fontWeight": "bold",
"showPrefix": true,
"prefixWidth": 5,
"prefixHeight": 15,
"prefixColor": "#1E90FF"
"showPrefix": true
}
},
{


+ 1
- 1
smtweb-framework/core/src/main/java/cc/smtweb/framework/core/common/SwEnum.java Переглянути файл

@@ -343,7 +343,7 @@ public interface SwEnum {
public static StrEnumBean LC_LT = instance.addEnum("LC_LT", "列表卡片(左树+列表)");
public static StrEnumBean LC_MS = instance.addEnum("LC_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", "列表卡片(含工作流)");
}

// 权限类型


Завантаження…
Відмінити
Зберегти