feat(流程独立节点表单): 新增流程独立节点表单,可在用户任务节点配置表单(不兼容旧版本)

This commit is contained in:
konbai
2022-08-07 17:56:35 +08:00
parent 1ff440c235
commit b6c6813498
12 changed files with 443 additions and 86 deletions

View File

@@ -0,0 +1,33 @@
package com.ruoyi.flowable.utils;
import cn.hutool.core.convert.Convert;
import com.ruoyi.flowable.core.FormConf;
import java.util.Map;
/**
* 流程表单工具类
*
* @author KonBAI
* @createTime 2022/8/7 17:09
*/
public class ProcessFormUtils {
/**
* 填充表单项内容
*
* @param formConf 表单配置信息
* @param data 表单内容
*/
public static void fillFormData(FormConf formConf, Map<String, Object> data) {
for (Map<String, Object> field : formConf.getFields()) {
String modelKey = Convert.toStr(field.get("__vModel__"));
Object value = data.get(modelKey);
if (value != null) {
@SuppressWarnings("unchecked")
Map<String, Object> configMap = (Map<String, Object>) field.get("__config__");
configMap.put("defaultValue", value);
}
}
}
}