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

Merge remote-tracking branch 'origin/4.0' into 4.0

4.0
lip 2 роки тому
джерело
коміт
502d3a7f97
34 змінених файлів з 467 додано та 816 видалено
  1. +2
    -2
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/design/form/define/PageDataset.java
  2. +18
    -0
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageProvider.java
  3. +48
    -22
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/FlowInstance.java
  4. +9
    -0
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/entity/ProcInst.java
  5. +19
    -14
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/entity/TaskRel.java
  6. +1
    -1
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/flow/listcard/single/FlowListHandler.java
  7. +10
    -13
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/flow/listcard/single/FlowSingleLoadHandler.java
  8. +11
    -5
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/flow/listcard/single/FlowSingleSaveHandler.java
  9. +27
    -9
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/flow/listcard/single/FlowTransHandler.java
  10. +20
    -10
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/listcard/single/LCSingleLoadHandler.java
  11. +1
    -1
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/menu/MenuHandler.java
  12. +2
    -2
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/user/UserHandler.java
  13. +0
    -3
      smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_card_group.ftl
  14. +0
    -1
      smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_filter.ftl
  15. +0
    -1
      smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_form.ftl
  16. +1
    -2
      smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_grid_opt.ftl
  17. +2
    -2
      smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_list_query.ftl
  18. +2
    -2
      smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_list_table.ftl
  19. +1
    -1
      smtweb-framework/bpm/src/main/resources/static/template/default/model_card.ftl
  20. +7
    -3
      smtweb-framework/bpm/src/main/resources/static/template/default/model_card_flow.ftl
  21. +0
    -1
      smtweb-framework/bpm/src/main/resources/static/template/default/model_card_ms.ftl
  22. +1
    -1
      smtweb-framework/bpm/src/main/resources/static/template/default/model_card_normal.ftl
  23. +2
    -2
      smtweb-framework/bpm/src/main/resources/static/template/default/model_list_card.ftl
  24. +2
    -2
      smtweb-framework/bpm/src/main/resources/static/template/default/model_list_flow.ftl
  25. +0
    -1
      smtweb-framework/bpm/src/main/resources/static/template/default/model_list_list.ftl
  26. +6
    -8
      smtweb-framework/bpm/src/main/resources/static/template/default/model_list_list_1.ftl
  27. +6
    -8
      smtweb-framework/bpm/src/main/resources/static/template/default/model_list_list_2.ftl
  28. +4
    -3
      smtweb-framework/bpm/src/main/resources/static/template/default/model_list_normal.ftl
  29. +0
    -1
      smtweb-framework/bpm/src/main/resources/static/template/default/model_step_card.ftl
  30. +6
    -5
      smtweb-framework/bpm/src/main/resources/static/template/default/model_tree_list.ftl
  31. +0
    -1
      smtweb-framework/bpm/src/main/resources/static/template/default/model_tree_list_bak.ftl
  32. +15
    -0
      smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/EntityHelper.java
  33. +0
    -1
      smtweb-framework/core/src/main/java/cc/smtweb/framework/core/util/CommUtil.java
  34. +244
    -688
      smtweb-framework/core/src/main/resources/demo.json

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

@@ -77,11 +77,11 @@ public class PageDataset {
}


public ModelTable getModelTable() {
public ModelTable _getModelTable() {
return ModelTableCache.getInstance().get(masterTable);
}

public boolean isCurDataSet(String dataset) {
public boolean _isCurDataSet(String dataset) {
return this.name.equals(dataset);
}



+ 18
- 0
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageProvider.java Переглянути файл

@@ -1,11 +1,14 @@
package cc.smtweb.system.bpm.web.engine.dynPage;

import cc.smtweb.framework.core.db.EntityDao;
import cc.smtweb.framework.core.db.impl.DefaultEntity;
import cc.smtweb.framework.core.exception.BizException;
import cc.smtweb.framework.core.common.SwMap;
import cc.smtweb.framework.core.db.DbEngine;
import cc.smtweb.framework.core.db.EntityHelper;
import cc.smtweb.framework.core.db.cache.ModelTableCache;
import cc.smtweb.framework.core.db.vo.ModelTable;
import cc.smtweb.framework.core.exception.SwException;
import cc.smtweb.framework.core.mvc.service.AbstractCompProvider;
import cc.smtweb.framework.core.mvc.service.SqlNamedPara;
import cc.smtweb.system.bpm.web.design.form.define.PageDataset;
@@ -34,5 +37,20 @@ public class DynPageProvider extends AbstractCompProvider {
});
}

public <T extends DefaultEntity> T loadBean(String tableName, long id) {
return doGetData(tableName + "." + id, () -> {
EntityDao<T> bdao = (EntityDao<T>) DbEngine.getInstance().findDao(tableName);
T bean = bdao.queryEntity(id);
if (bean == null) throw new BizException("没有找到指定数据(" + tableName + ".id=" + id + ")");
EntityHelper.loadBeanText(bean.getTableName(), bean.getData(), null);
return bean;
});
}

public <T extends DefaultEntity> T loadBean(PageDataset dataset, long id) {
ModelTable table = dataset._getModelTable();
if (table == null) throw new SwException("数据集主表未找到(" + dataset.name + ")!");
return loadBean(table.getName(), id);
}

}

+ 48
- 22
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/FlowInstance.java Переглянути файл

@@ -46,8 +46,6 @@ public class FlowInstance {
//流程执行变量
// public Map<String, String> variables = new HashMap<>();

//当前任务
private List<Map<String, String>> tasks = new ArrayList<>();
//数据提供者
private FlowProvider provider = new FlowProvider();

@@ -151,6 +149,7 @@ public class FlowInstance {
actInst.setRetake(false);

procInst.setTaskId(actInst.getEntityId());
procInst.setActName(actInst.getActName());
}

/**
@@ -171,6 +170,7 @@ public class FlowInstance {
actInst.setStatu(FlowConst.ActivityStatu.HANDLE.value);

procInst.setTaskId(actInst.getEntityId());
procInst.setActName(actInst.getActName());
procInst.setStatu(FlowConst.InstanceStatu.RUNING.value);

getTaskDao().updateEntity(actInst);
@@ -197,8 +197,9 @@ public class FlowInstance {
public void load(long bill_id, long task_id) {
procInst = provider.findProcInst(bill_id);
procDef = ModelProcHelper.getFromCache(procInst.getPrcId());
actInst = null;
task_id = getTaskId(task_id);
if (task_id > 0L) {
if (task_id > 0L && actInst == null) {
actInst = provider.findTask(task_id);
}
}
@@ -217,12 +218,22 @@ public class FlowInstance {
*/
private long getTaskId(long task_id) {
if (task_id > 0L) return task_id;
task_id = procInst.getTaskId();
Task curTask = provider.findTask(task_id);
if (EntityHelper.isEmpty(curTask) || curTask.getStatu() != FlowConst.ActivityStatu.WAIT.value) return task_id;
if (EntityHelper.isEmpty(curTask)) throw new SwException("单据任务缺失(" + procInst.getId() + ":::" + task_id + ")!");
actInst = curTask;
if (curTask.getStatu() != FlowConst.ActivityStatu.WAIT.value) return task_id;
//是自己的待办任务
if (curTask.getStatu() == FlowConst.ActivityStatu.WAIT.value && FlowHelper.isMyWaitedTask(curTask.getId(), us.getUserId())) {
return task_id;
}

//待办任务不是自己的,则去找前一个自己提交的任务
List<Task> preActs = provider.findBeforeTasks(task_id);
if (CommUtil.isEmpty(preActs)) return task_id;
for (Task act : preActs) {
if (act.getHandler() == us.getUserId()) {
actInst = act;
return act.getId();
}
}
@@ -293,18 +304,6 @@ public class FlowInstance {
return listTask;
}

/**
* 设置单据描述及链接地址,待办中展示
*
* @param bill_info
* @param bill_url
*/
public void setBillInfo(String bill_code, String bill_info, String bill_url) {
procInst.setBillInfo(bill_info);
procInst.setBillCode(bill_code);
procInst.setUrl(bill_url);
}

//启动流程
public void save() {
if (procInst.isNew()) {
@@ -326,6 +325,9 @@ public class FlowInstance {
* @throws Exception
*/
public void delete() {
if (actInst != null && !actInst.isMake()) {
throw new BizException("当前单据非制单状态,不允许删除!");
}
getProcInstDao().deleteEntity(procInst);
getTaskDao().deleteEntity("where tsk_pri_id=?", procInst.getId());
getCandidateDao().deleteEntity("where cnd_pri_id=?", procInst.getId());
@@ -338,24 +340,27 @@ public class FlowInstance {
/**
* 返回页面前的设置
*/
public void resetPage() {
public void setPageRetExtra(SwMap ret) {
SwMap extra = ret.computeMapIfAbsent("extra", k->new SwMap());

List<Task> listTask = adjustTasks();
//可选步骤
tasks.clear();
List<SwMap> tasks = new ArrayList<>();
String next_text = procDef.getProcInfo().getActNameById(actInst.getActId());
int index = 0;
for (Task act : listTask) {
Map<String, String> row = new HashMap<>();
SwMap row = new SwMap();
tasks.add(row);
row.put("id", String.valueOf(act.getId()));
row.put("id", act.getId());
if (act.getId() == actInst.getId() && listTask.size() > 1 && index != 0) {
next_text = "待" + next_text;
} else {
next_text = procDef.getProcInfo().getActNameById(act.getActId());
}
row.put("text", next_text);
row.put("label", next_text);
index++;
}
extra.put("tasks", tasks);
resetButtons();
}

@@ -567,8 +572,10 @@ public class FlowInstance {

if (listInsertTask.size() > 0) {
procInst.setTaskId(listInsertTask.get(0).getEntityId());
procInst.setActName(listInsertTask.get(0).getActName());
} else {
procInst.setTaskId(actInst.getEntityId());
procInst.setActName(actInst.getActName());
}

if (new_acts.size() == 1 && new_acts.get(0).getType() == FlowConst.ActivityType.END.value) {
@@ -641,7 +648,7 @@ public class FlowInstance {
task.init();
task.setEntityId(DbEngine.getInstance().nextId());
task.setPriId(procInst.getId());
task.setPriId(procDef.getId());
task.setPrcId(procDef.getId());
task.setActId(act.getId());
task.setActName(act.getLabel());
task.setStartTime(DateUtil.nowDateTimeLong());
@@ -723,12 +730,14 @@ public class FlowInstance {
}

procInst.setTaskId(actInst.getEntityId());
procInst.setActName(actInst.getActName());
procInst.setStatu(actInst.isMake() ? FlowConst.InstanceStatu.BEGIN.value: FlowConst.InstanceStatu.RUNING.value);

taskDao.updateEntity(actInst);
taskDao.deleteEntity(old_act);
getTaskRelDao().deleteEntity("where trl_src_task_id=?", old_act.getId());
getProcInstDao().updateEntity(procInst);
getCommentDao().deleteEntity("where cmt_tsk_id=?", old_act.getId());
new_acts.clear();
new_acts.add(old_act);
buildBillLog(FlowConst.Button.RETAKE.value, "TODO", actInst, new_acts);
@@ -748,15 +757,18 @@ public class FlowInstance {
actInst.setStatu(FlowConst.ActivityStatu.HANDLE.value);

procInst.setTaskId(actInst.getEntityId());
procInst.setActName(actInst.getActName());

procInst.setStatu(FlowConst.InstanceStatu.RUNING.value);
if (actInst.isMake()) procInst.setStatu(FlowConst.InstanceStatu.BEGIN.value);

taskDao.updateEntity(actInst);
taskDao.batchDelete(new_acts);
getCommentDao().deleteEntity("where cmt_tsk_id in ("+ EntityHelper.getSqlInIds(new_acts) + ")");
getTaskRelDao().deleteEntity("where trl_src_task_id=?", actInst.getEntityId());
getProcInstDao().updateEntity(procInst);

updateComment(null, FlowConst.Button.RETAKE.value);
buildBillLog(FlowConst.Button.RETAKE.value, "TODO", actInst, new_acts);
listener.afterRetake(actInst, new_acts);
}
@@ -793,6 +805,7 @@ public class FlowInstance {
actInst.setStatu(FlowConst.ActivityStatu.REJECT.value);

procInst.setTaskId(new_acts.get(0).getEntityId());
procInst.setActName(new_acts.get(0).getActName());
if (new_acts.size() == 1 && new_acts.get(0).isMake()) {
procInst.setStatu(FlowConst.InstanceStatu.BEGIN.value);
} else {
@@ -836,6 +849,7 @@ public class FlowInstance {
actInst.setStatu(FlowConst.ActivityStatu.REJECT.value);

procInst.setTaskId(make_act.getEntityId());
procInst.setActName(make_act.getActName());
procInst.setStatu(FlowConst.InstanceStatu.BEGIN.value);

EntityDao<Task> taskDao = getTaskDao();
@@ -923,9 +937,21 @@ public class FlowInstance {
bean.setHandler(us.getUserId());
bean.setHandlerTime(DateUtil.nowDateTimeLong());
} else if (FlowConst.Button.SUBMIT.value.equals(optType)) {
if (bean.getHandlerTime() <= 0L) {
bean.setHandler(us.getUserId());
bean.setHandlerTime(DateUtil.nowDateTimeLong());
}
bean.setStatu(FlowConst.ActivityStatu.SUBMIT.value);
bean.setEndTime(DateUtil.nowDateTimeLong());
bean.setComment(comment);
} else if (FlowConst.Button.RETAKE.value.equals(optType)) {
if (bean.getHandlerTime() <= 0L) {
bean.setHandler(us.getUserId());
bean.setHandlerTime(DateUtil.nowDateTimeLong());
}
bean.setStatu(FlowConst.ActivityStatu.HANDLE.value);
bean.setHandlerTime(DateUtil.nowDateTimeLong());
bean.setEndTime(0L);
}
getCommentDao().updateEntity(bean);
}


+ 9
- 0
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/entity/ProcInst.java Переглянути файл

@@ -123,6 +123,15 @@ public class ProcInst extends DefaultEntity {
public void setTaskId(long pri_task_id) {
put("pri_task_id", pri_task_id);
}

public String getActName() {
return getStr("pri_act_name");
}

public void setActName(String priActName) {
put("pri_act_name", priActName);
}

/** 单据状态 */
public int getStatu() {
return getInt("pri_statu");


+ 19
- 14
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/flow/entity/TaskRel.java Переглянути файл

@@ -7,43 +7,48 @@ import cc.smtweb.framework.core.db.impl.DefaultEntity;
* Created by Akmm at 2022/5/23 14:25
* 活动之间的关系
*/
@SwTable("WF_CARE")
@SwTable("WF_TASK_REL")
public class TaskRel extends DefaultEntity {
public static final String ENTITY_NAME = "WF_CARE";
public static final String ENTITY_NAME = "WF_TASK_REL";

public TaskRel() {
super(ENTITY_NAME);
}

/** 主键 */
public long getId() {
return getLong("trl_id");
}

public void setId(long trlId) {
put("trl_id", trlId);
/** 主键 */
public void setId(long trl_id) {
put("trl_id", trl_id);
}
/** 流程实例id */
public long getPriId() {
return getLong("trl_pri_id");
}

public void setPriId(long trlPriId) {
put("trl_pri_id", trlPriId);
/** 流程实例id */
public void setPriId(long trl_pri_id) {
put("trl_pri_id", trl_pri_id);
}
/** 前任务id */
public long getSrcTaskId() {
return getLong("trl_src_task_id");
}

public void setSrcTaskId(long trlSrcTaskId) {
put("trl_src_task_id", trlSrcTaskId);
/** 前任务id */
public void setSrcTaskId(long trl_src_task_id) {
put("trl_src_task_id", trl_src_task_id);
}
/** 目标任务id */
public long getDstTaskId() {
return getLong("trl_dst_task_id");
}

public void setDstTaskId(long trlDstTaskId) {
put("trl_dst_task_id", trlDstTaskId);
/** 目标任务id */
public void setDstTaskId(long trl_dst_task_id) {
put("trl_dst_task_id", trl_dst_task_id);
}
}
}

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

@@ -17,7 +17,7 @@ public class FlowListHandler extends DynPageListHandler {
static IBuildSqlListener sqlListener = new IBuildSqlListener(){
@Override
public void buildSelect(PageDataset dataSet, StringBuilder sql) {
sql.append("\ninner join " + EntityHelper.getSchemaTableName(ProcInst.ENTITY_NAME) + " on pri_id=" + dataSet.getModelTable().getIdField());
sql.append("\ninner join " + EntityHelper.getSchemaTableName(ProcInst.ENTITY_NAME) + " on pri_id=" + dataSet._getModelTable().getIdField());
}
};



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

@@ -24,21 +24,22 @@ import java.util.ArrayList;

/**
* Created by Akmm at 2022-08-26 17:15
* 流程加载
*/
public class FlowSingleLoadHandler extends LCSingleLoadHandler implements FlowListener {
public class FlowSingleLoadHandler<T extends DefaultEntity> extends LCSingleLoadHandler<T> implements FlowListener {
protected FlowInstance flowInstance;

@Override
protected void afterAdd(SwMap ret, SwMap bean) {
protected void afterAdd(SwMap ret, T bean) {
flowInstance = FlowInstance.createByBillType(us, this, form.getBillType());
PageDataset cardDataset = LCSingleHelper.findCardDataset(datasets);
ModelTable table = cardDataset.getModelTable();
bean.put(table.getIdField(), flowInstance.getProcInst().getId());
bean.setEntityId(flowInstance.getProcInst().getId());

ret.put(cardDataset.name, DynRetBean.createBean(bean));
ret.put(FlowHelper.DATASET_NAME_FLOW, DynRetBean.createBean(flowInstance.getProcInst()));
ret.put(FlowHelper.DATASET_NAME_COMMENT, DynRetBean.createList(SwListData.EMPTY));
flowInstance.setPageRetExtra(ret);
}

@Override
@@ -47,22 +48,18 @@ public class FlowSingleLoadHandler extends LCSingleLoadHandler implements FlowLi
//过滤条件
long id = params.readLong("id");
long taskId = params.readLong("taskId");
// SwMap filter = params.readMap("filter");
SwMap filter = new SwMap();
filter.put(SwConsts.NAME_ID, id);
//对应的数据集定义
PageDataset cardDataset = LCSingleHelper.findCardDataset(datasets);

SwMap data = provider.loadData(filter, cardDataset);
ret.put(cardDataset.name, DynRetBean.createBean(data));
PageDataset cardDataset = LCSingleHelper.findCardDataset(datasets);
T bean = provider.loadBean(cardDataset, id);
ret.put(cardDataset.name, DynRetBean.createBean(bean));

//加载流程信息
flowInstance = FlowInstance.createById(us,this, id, taskId);

ret.put(FlowHelper.DATASET_NAME_FLOW, DynRetBean.createBean(flowInstance.getProcInst()));
ret.put(FlowHelper.DATASET_NAME_COMMENT, DynRetBean.createList(SwListData.create(flowInstance.loadComment(), 0)));
afterLoad(ret, data);
flowInstance.setPageRetExtra(ret);
afterLoad(ret, bean);
return R.success(ret);
}



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

@@ -5,6 +5,7 @@ import cc.smtweb.framework.core.common.SwMap;
import cc.smtweb.framework.core.db.impl.DefaultEntity;
import cc.smtweb.framework.core.exception.BizException;
import cc.smtweb.framework.core.mvc.service.SwListData;
import cc.smtweb.framework.core.util.DateUtil;
import cc.smtweb.system.bpm.web.design.form.define.PageDataset;
import cc.smtweb.system.bpm.web.engine.dynPage.DynRetBean;
import cc.smtweb.system.bpm.web.engine.flow.FlowHelper;
@@ -38,7 +39,11 @@ public class FlowSingleSaveHandler<T extends DefaultEntity> extends LCSingleSave
}
flowInstance.readFromPage(data);
flowInstance.getProcInst().setIsNew(bean.isNew());
flowInstance.setBillInfo(getBillCode(), getBillInfo(), getBillUrl());
if (bean.isNew()) {
flowInstance.getProcInst().setBillCode(getBillCode());
flowInstance.getProcInst().setUrl(getBillUrl());
}
flowInstance.getProcInst().setBillInfo(getBillInfo());
return bean;
}

@@ -53,16 +58,17 @@ public class FlowSingleSaveHandler<T extends DefaultEntity> extends LCSingleSave
super.afterSave(ret, bean);
ret.put(FlowHelper.DATASET_NAME_FLOW, DynRetBean.createBean(flowInstance.getProcInst()));
ret.put(FlowHelper.DATASET_NAME_COMMENT, DynRetBean.createList(SwListData.EMPTY));
flowInstance.setPageRetExtra(ret);
}

//单据编号
//单据编号,新增保存时调用
protected String getBillCode() {
return "";
return flowInstance.getProcInst().getBillCode();
}

//单据信息,在待办中显示
//单据信息,在待办中显示,每次保存均计算
protected String getBillInfo() {
return "";
return flowInstance.getProcInst().getBillCode() + "-" + DateUtil.nowDate();
}

//单据url,待办中跳链


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

@@ -2,13 +2,16 @@ package cc.smtweb.system.bpm.web.engine.model.flow.listcard.single;

import cc.smtweb.framework.core.common.R;
import cc.smtweb.framework.core.common.SwMap;
import cc.smtweb.framework.core.db.impl.DefaultEntity;
import cc.smtweb.framework.core.mvc.service.SwListData;
import cc.smtweb.system.bpm.web.design.form.define.PageDataset;
import cc.smtweb.system.bpm.web.engine.dynPage.AbstractDynPageHandler;
import cc.smtweb.system.bpm.web.engine.dynPage.DynRetBean;
import cc.smtweb.system.bpm.web.engine.flow.FlowHelper;
import cc.smtweb.system.bpm.web.engine.flow.FlowInstance;
import cc.smtweb.system.bpm.web.engine.flow.FlowListener;
import cc.smtweb.system.bpm.web.engine.flow.entity.Task;
import cc.smtweb.system.bpm.web.engine.model.listcard.single.LCSingleHelper;

import java.util.List;

@@ -16,33 +19,48 @@ import java.util.List;
* Created by Akmm at 2022-09-01 15:03
* 流程流转
*/
public class FlowTransHandler extends AbstractDynPageHandler implements FlowListener{
public class FlowTransHandler<T extends DefaultEntity> extends AbstractDynPageHandler implements FlowListener{
//流程id
protected long billId;
//任务id
protected long taskId;
protected FlowInstance flowInstance;

private void loadFlowInstance() {
protected T bean;

private SwMap buildRetData() {
SwMap ret = new SwMap();
ret.put(LCSingleHelper.DATASET_NAME_CARD, DynRetBean.createBean(bean));
ret.put(FlowHelper.DATASET_NAME_FLOW, DynRetBean.createBean(flowInstance.getProcInst()));
ret.put(FlowHelper.DATASET_NAME_COMMENT, DynRetBean.createList(SwListData.EMPTY));
flowInstance.setPageRetExtra(ret);
return ret;
}

protected void load() {
if (flowInstance == null) {
billId = params.readLong("id");
taskId = params.readLong("taskId");
flowInstance = FlowInstance.createById(us, this, billId, taskId);

loadBean();
}
}

private SwMap buildRetData() {
SwMap ret = new SwMap();
ret.put(FlowHelper.DATASET_NAME_FLOW, DynRetBean.createBean(flowInstance.getProcInst()));
ret.put(FlowHelper.DATASET_NAME_COMMENT, DynRetBean.createList(SwListData.EMPTY));
return ret;
protected void loadBean() {
PageDataset cardDataset = LCSingleHelper.findCardDataset(datasets);
bean = provider.loadBean(cardDataset, billId);
}

public R submit() {
loadFlowInstance();
load();
flowInstance.submit(params.readString("comment"));
return R.success(buildRetData());
}

public R retake() {
load();
flowInstance.retake();
return R.success(buildRetData());
}
}

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

@@ -1,38 +1,48 @@
package cc.smtweb.system.bpm.web.engine.model.listcard.single;

import cc.smtweb.framework.core.common.R;
import cc.smtweb.framework.core.common.SwConsts;
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.db.impl.DefaultEntity;
import cc.smtweb.framework.core.db.vo.ModelTable;
import cc.smtweb.framework.core.exception.SwException;
import cc.smtweb.system.bpm.web.design.form.define.PageDataset;
import cc.smtweb.system.bpm.web.engine.dynPage.AbstractDynPageHandler;
import cc.smtweb.system.bpm.web.engine.dynPage.DynPageHelper;
import cc.smtweb.system.bpm.web.engine.dynPage.DynPageListHandler;
import cc.smtweb.system.bpm.web.engine.dynPage.DynRetBean;

/**
* Created by Akmm at 2022-08-16 15:43
*/
public class LCSingleLoadHandler extends AbstractDynPageHandler {
public class LCSingleLoadHandler<T extends DefaultEntity> extends AbstractDynPageHandler {

//新增卡片操作,初始化定义的数据集
public R add() {
SwMap ret = new SwMap();
//返回的数据,以dataset.name为key,查出的结果(bean或list)为value
PageDataset cardDataset = LCSingleHelper.findCardDataset(datasets);
SwMap data = DynPageHelper.createBean(cardDataset);
ModelTable table = cardDataset._getModelTable();
if (table == null) throw new SwException("卡片主表未找到!");
final EntityDao<T> dao = DbEngine.getInstance().findDao(table.getName());

ret.put(cardDataset.name, DynRetBean.createBean(data));
T bean = dao.createBean(us.getUserId());
bean.setEntityId(DbEngine.getInstance().nextId());

afterAdd(ret, data);
ret.put(cardDataset.name, DynRetBean.createBean(bean));

afterAdd(ret, bean);
return R.success(ret);
}


//新增初始化 - bean
protected void afterAdd(SwMap ret, SwMap bean) {
protected void afterAdd(SwMap ret, T bean) {
}

//加载之后
protected void afterLoad(SwMap ret, SwMap bean) {
protected void afterLoad(SwMap ret, T bean) {
}

public R load() {
@@ -42,10 +52,10 @@ public class LCSingleLoadHandler extends AbstractDynPageHandler {
//对应的数据集定义
PageDataset cardDataset = LCSingleHelper.findCardDataset(datasets);

SwMap data = provider.loadData(filter, cardDataset);
ret.put(cardDataset.name, DynRetBean.createBean(data));
T bean = provider.loadBean(cardDataset, filter.readLong(SwConsts.NAME_ID));
ret.put(cardDataset.name, DynRetBean.createBean(bean));

afterLoad(ret, data);
afterLoad(ret, bean);
return R.success(ret);
}



+ 1
- 1
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/menu/MenuHandler.java Переглянути файл

@@ -67,7 +67,7 @@ public class MenuHandler {

@Override
protected DefaultEntity readBeanFromPage(PageDataset pageDataSet, SwMap data) {
if (pageDataSet.isCurDataSet(Ds_menuCard)) {
if (pageDataSet._isCurDataSet(Ds_menuCard)) {
//处理请求内容
SwMap sm_content = new SwMap();
sm_content.put("pageId", data.readString("sm_page_id"));


+ 2
- 2
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/user/UserHandler.java Переглянути файл

@@ -55,7 +55,7 @@ public class UserHandler {

@Override
protected DefaultEntity readBeanFromPage(PageDataset pageDataSet, SwMap data) {
if (pageDataSet.isCurDataSet(DS_UserCard)) {
if (pageDataSet._isCurDataSet(DS_UserCard)) {
DefaultEntity bean = super.readBeanFromPage(pageDataSet, data);
roleList = new ArrayList<>();
partyList = new ArrayList<>();
@@ -152,7 +152,7 @@ public class UserHandler {

@Override
protected void afterQuery(List<SwMap> listData) {
if (pageDataSet.isCurDataSet(DS_UserParty)) {
if (pageDataSet._isCurDataSet(DS_UserParty)) {
listData.forEach(sw -> {
sw.put("sup_roles", UserRoleCache.getInstance().getRoleByParty(sw.readLong("sup_id")));
sw.put("sup_roles_text", RoleCache.getInstance().getNamesByIds(UserRoleCache.getInstance().getRoleByParty(sw.readLong("sup_id"))));


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

@@ -15,7 +15,6 @@
"type": "fx-${field.editor}",
"props": {
"label": "${field.label}",
"type": "text",
"dataset": "${field.dataset}",
"required": "${field.required}",
"field": "${field.id}",
@@ -75,7 +74,6 @@
"type": "fx-button",
"props": {
"label": "编辑",
"type": "text",
"leftIcon": "edit",
"action": "button:edit",
"dataset": "${group.dataset}",
@@ -90,7 +88,6 @@
"type": "fx-button",
"props": {
"label": "删除",
"type": "text",
"leftIcon": "delete-themes",
"action": "button:remove",
"preAction": "",


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

@@ -16,7 +16,6 @@
"type": "fx-${filter.editor}",
"props": {
"label": "${filter.label}",
"type": "text",
<#if filter.maxlength gt 0>
"maxlength": ${filter.maxlength},
</#if>


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

@@ -16,7 +16,6 @@
"type": "fx-${field.editor}",
"props": {
"label": "${field.label}",
"type": "text",
<#if field.maxlength gt 0>
"maxlength": ${field.maxlength},
</#if>


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

@@ -40,7 +40,6 @@
"type": "fx-button",
"props": {
"label": "编",
"type": "text",
"leftIcon": "edit",
"action": "button:edit",
"linkType": "dialog",
@@ -52,7 +51,7 @@
"type": "fx-button",
"props": {
"label": "删",
"type": "text",
"leftIcon": "delete",
"action": "button:del",
"dataset": "${group.dataset}"


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

@@ -9,9 +9,9 @@
"size": "56",
"shadow": "",
"alignY": "center",
"paddingRight": 20,
"paddingRight": 16,
"gridTemplateColumns": "400px 400px 1fr",
"paddingLeft": 20
"paddingLeft": 16
},
"children": [
<#assign fields = group.cfilters>


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

@@ -7,8 +7,8 @@
"size": "",
"label": "列表",
"colNum": 0,
"paddingLeft": 20,
"paddingRight": 20,
"paddingLeft": 16,
"paddingRight": 16,
"shadow": ""
},
"children": [{


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

@@ -193,7 +193,7 @@
</#if>
"props": {
"label": "${field.label}",
"type": "text",
"dataset": "${field.dataset}",
"required": "${field.required}",
"field": "${field.id}",


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

@@ -172,7 +172,6 @@
</#if>
"props": {
"label": "${fields.label}",
"type": "text",
"dataset": "${fields.dataset}",
"required": "${fields.required}",
"field": "${fields.id}",
@@ -287,7 +286,6 @@
</#if>
"props": {
"label": "${fields.label}",
"type": "text",
"dataset": "${fields.dataset}",
"required": "${fields.required}",
"field": "${fields.id}",
@@ -364,6 +362,13 @@
<#-- </#if>-->
<#-- </#list>-->
</#list>
,{
"id": "182fcdafb28",
"type": "fx-form-panel",
"shape": "panel",
"props": {},
"children": []
}
]
},
{
@@ -439,7 +444,6 @@
"props": {
"name": "button:retake",
"label": "取回",
"type": "info",
"action": "button:retake"
},
"id": "${newId()}",


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

@@ -164,7 +164,6 @@
"type": "${field.editor}",
"props": {
"label": "${field.label}",
"type": "text",
"dataset": "${field.dataset}",
"required": "${field.required}",
"field": "${field.field}",


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

@@ -65,7 +65,7 @@
"shape": "panel",
"props": {
"alignY": "center",
"size": "200",
"size": "400",
"backgroundImage":"bgImg-region-title",
"paddingLeft": 10
},


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

@@ -32,8 +32,8 @@
"label": "查询条件",
"colNum": 2,
"alignY": "center",
"paddingLeft": 20,
"paddingRight": 20,
"paddingLeft": 16,
"paddingRight": 16,
"shadow": ""
},
"children": [


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

@@ -32,8 +32,8 @@
"label": "查询条件",
"colNum": 2,
"alignY": "center",
"paddingLeft": 20,
"paddingRight": 20,
"paddingLeft": 16,
"paddingRight": 16,
"shadow": ""
},
"children": [


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

@@ -124,7 +124,6 @@
"type": "fx-${cfilters.editor}",
"props": {
"label": "${cfilters.label}",
"type": "text",
"maxlength": 50,
"placeholder": "请输入${cfilters.label}",
"labelWidth": 150,


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

@@ -45,10 +45,10 @@
"size": "50",
"alignY": "center",
"backgroundImage": "bgImg-region-title",
"paddingLeft": 32,
"paddingLeft": 16,
"colNum": 2,
"gridTemplateColumns": "",
"paddingRight": 32
"paddingRight": 16
},
"children": [
{
@@ -115,8 +115,8 @@
"alignY": "center",
"size": "50",
"gridTemplateColumns": "1fr 50px",
"paddingLeft": 32,
"paddingRight": 32
"paddingLeft": 16,
"paddingRight": 16
},
"children": [
<#list assist.cfilters as cfilters>
@@ -125,7 +125,6 @@
"type": "${cfilters.editor}",
"props": {
"label": "${cfilters.label}",
"type": "text",
"maxlength": 50,
"placeholder": "请输入${cfilters.label}",
"labelWidth": 150,
@@ -281,7 +280,6 @@
"type": "${cfilters.editor}",
"props": {
"label": "${cfilters.label}",
"type": "text",
"maxlength": 50,
"placeholder": "请输入${cfilters.label}",
"labelWidth": 100,
@@ -360,8 +358,8 @@
"backgroundImage": "bgImg-region-title",
"colNum": 2,
"alignY": "center",
"paddingLeft": 32,
"paddingRight": 32
"paddingLeft": 16,
"paddingRight": 16
},
"children": [
{


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

@@ -45,10 +45,10 @@
"size": "50",
"alignY": "center",
"backgroundImage": "bgImg-region-title",
"paddingLeft": 32,
"paddingLeft": 16,
"colNum": 2,
"gridTemplateColumns": "",
"paddingRight": 32
"paddingRight": 16
},
"children": [
{
@@ -88,8 +88,8 @@
"alignY": "center",
"size": "50",
"gridTemplateColumns": "1fr 50px",
"paddingLeft": 32,
"paddingRight": 32
"paddingLeft": 16,
"paddingRight": 16
},
"children": [
<#list assist.cfilters as cfilters>
@@ -98,7 +98,6 @@
"type": "${cfilters.editor}",
"props": {
"label": "${cfilters.label}",
"type": "text",
"maxlength": 50,
"placeholder": "请输入${cfilters.label}",
"labelWidth": 150,
@@ -224,7 +223,6 @@
"type": "${cfilters.editor}",
"props": {
"label": "${cfilters.label}",
"type": "text",
"maxlength": 50,
"placeholder": "请输入${cfilters.label}",
"labelWidth": 100,
@@ -303,8 +301,8 @@
"backgroundImage": "bgImg-region-title",
"colNum": 2,
"alignY": "center",
"paddingLeft": 32,
"paddingRight": 32
"paddingLeft": 16,
"paddingRight": 16
},
"children": [
{


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

@@ -31,8 +31,8 @@
"label": "按钮区域",
"colNum": 2,
"alignY": "center",
"paddingLeft": 20,
"paddingRight": 20,
"paddingLeft": 16,
"paddingRight": 16,
"shadow": ""
},
"children": [
@@ -55,7 +55,8 @@
"type": "fx-button-group",
"props": {
"showDropdown": false,
"dataset": "${group.dataset}"
"dataset": "${group.dataset}",
"textAlign": "right"
},
"slots": {
"default": [


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

@@ -278,7 +278,6 @@
</#if>
"props": {
"label": "${field.label}",
"type": "text",
"dataset": "${field.dataset}",
"required": "${field.required}",
"field": "${field.id}",


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

@@ -87,7 +87,7 @@
"type": "fx-form-panel",
"shape": "panel",
"props": {
"size": "15",
"size": "16",
"backgroundColor": "--color-transparent"
},
"children": []
@@ -113,8 +113,8 @@
"label": "按钮区域",
"colNum": 2,
"alignY": "center",
"paddingLeft": 20,
"paddingRight": 20,
"paddingLeft": 16,
"paddingRight": 16,
"shadow": ""
},
"children": [
@@ -137,7 +137,8 @@
"type": "fx-button-group",
"props": {
"showDropdown": false,
"dataset": "${group.dataset}"
"dataset": "${group.dataset}",
"textAlign": "right"
},
"slots": {
"default": [
@@ -172,7 +173,7 @@
"type": "fx-form-panel",
"shape": "panel",
"props": {
"size": "15",
"size": "16",
"backgroundColor": "transparent"
},
"children": []


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

@@ -108,7 +108,6 @@
"type": "fx-${cfilters.editor}",
"props": {
"label": "${cfilters.label}",
"type": "text",
"maxlength": 50,
"hideLabel": true,
"placeholder": "请输入${cfilters.label}",


+ 15
- 0
smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/EntityHelper.java Переглянути файл

@@ -324,4 +324,19 @@ public class EntityHelper {
public static boolean isEmpty(DefaultEntity bean) {
return bean == null || bean.isEmpty() || bean.getEntityId() <= 0L;
}

public static String getSqlInIds(Collection<? extends DefaultEntity> listBean) {
if (null == listBean || listBean.isEmpty()) return "";
StringBuilder s = new StringBuilder(128);
Set<Long> set = new HashSet<>();
for (DefaultEntity bean : listBean) {
if (bean.getEntityId() <= 0L) continue;
if (set.contains(bean.getEntityId())) continue;
set.add(bean.getEntityId());

s.append(bean.getEntityId()).append(",");
}
if (s.length() == 0) return "";
return s.substring(0, s.length() - 1);
}
}

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

@@ -112,5 +112,4 @@ public class CommUtil {
if (s.length() == 0) return "";
return s.substring(0, s.length() - 1);
}

}

+ 244
- 688
smtweb-framework/core/src/main/resources/demo.json Переглянути файл

@@ -1,711 +1,267 @@
{
"form":
[
{
"page": {
"id": "p744256811959324672",
"type": "fx-page",
"props": {
"title": "模型测试列表",
"key": "744256811959324673"
}
},
"graph": {
"shape": "panel",
"id": "root_panel",
"type": "fx-split-panel",
"props": {
"horizontal": false,
"shadow": ""
},
"children": [
{
"id": "744256811959324674",
"type": "fx-form-panel",
"shape": "panel",
"props": {
"size": "50",
"label": "查询条件",
"colNum": 2,
"alignY": "center",
"paddingLeft": 20,
"paddingRight": 20,
"shadow": ""
},
"children": [
{
"id": "id744256811959324675",
"type": "fx-title",
"props": {
"label": "模型测试列表",
"fontSize": 15,
"color": "#313131",
"fontWeight": "bold",
"showPrefix": true,
"prefixWidth": 5,
"prefixHeight": 15,
"prefixColor": "#1E90FF"
}
},
{
"id": "id744256811959324676",
"type": "fx-button-group",
"props": {
"menus": [],
"textAlign": "right"
},
"slots": {
"default": [
{
"type": "fx-button",
"props": {
"label": "新增",
"leftIcon": "plus",
"type": "primary",
"action": "button:add",
"link": false,

"linkType": "dialog",
"fxLink": "dialog:editDialog",
"fxLink_text": "ttttt",
},
"id": "id744256811959324677"
}
]
}
}
]
"type": "workflow",
"version": 3,
"flow": {
"widget": {
"type": "flow-chart"
},
"graph": {
"cells": [
{
"position": {
"x": 100,
"y": 40
},
{
"id": "744256811959324678",
"type": "fx-form-panel",
"shape": "panel",
"props": {
"size": "",
"label": "列表",
"colNum": 0,
"paddingLeft": 20,
"paddingRight": 20,
"shadow": ""
},
"children": [{
"id": "id744256811959324679",
"type": "fx-table",
"props": {
"label": "表格",

"border": true,
"stripe": true,
"showHeader": true,
"fit": true,
"dataset": "ds_182a5ea30e6",
"actionWidth": 120
},
"slots": {
"default": [
{
"id": "id744256811959324680",
"type": "fx-table-column",
"props": {
"field": "id_182a5ea30fe",
"label": "ID"
}
},
{
"id": "id744256811959324681",
"type": "fx-table-column",
"props": {
"field": "id_182a5ea30ff",
"label": "父ID"
}
},
{
"id": "id744256811959324682",
"type": "fx-table-column",
"props": {
"field": "id_182a5ea3100",
"label": "级次码"
}
},
{
"id": "id744256811959324683",
"type": "fx-table-column",
"props": {
"field": "id_182a5ea3101",
"label": "所属项目"
}
},
{
"id": "id744256811959324684",
"type": "fx-table-column",
"props": {
"field": "id_182a5ea3102",
"label": "编码"
}
},
{
"id": "id744256811959324685",
"type": "fx-table-column",
"props": {
"field": "id_182a5ea3103",
"label": "编码"
}
},
{
"id": "id744256811959324686",
"type": "fx-table-column",
"props": {
"field": "id_182a5ea3104",
"label": "创建人"
}
},
{
"id": "id744256811959324687",
"type": "fx-table-column",
"props": {
"field": "id_182a5ea3105",
"label": "最后更新人"
}
},
{
"id": "id744256811959324688",
"type": "fx-table-column",
"props": {
"field": "id_182a5ea3106",
"label": "创建时间"
}
},
{
"id": "id744256811959324689",
"type": "fx-table-column",
"props": {
"field": "id_182a5ea3107",
"label": "最后更新时间"
}
}
],
"button": [
{
"id": "id744256811959324690",
"type": "fx-button",
"props": {
"label": "编辑",
"type": "primary",
"leftIcon": "edit",
"action": "button:edit",
"link": false,
"text": true,
"linkType": "dialog",
"fxLink": "dialog:editDialog",
"fxLink_text": "ttttt",
"dataset": ""
}
},
{
"id": "id744256811959324691",
"type": "fx-button",
"props": {
"label": "删除",
"type": "danger",
"leftIcon": "delete-themes",
"action": "button:remove",
"preAction": "",
"link": false,
"text": true,
"confirm": "",
"nextAction": "button:search",
"dataset": ""
}
}
]
},
"events": {}
"size": {
"width": 50,
"height": 50
},
"attrs": {
"icon": {
"xlink:href": "/src/assets/images/svg/play.svg"
}
]
},
{
"id": "744256811959324692",
"type": "fx-form-panel",
"shape": "panel",
"props": {
"size": "15",
"backgroundColor": "transparent"
},
"children": []
}
]
}
}
,{
"page": {
"id": "id744256811959324693",
"type": "fx-dialog",
"props": {
"title": "ttttt",
"key": "editDialog",
"fontSize": 16,
"color": "#313131",
"fontWeight": "bold",
"showPrefix": true,
"prefixWidth": 5,
"prefixHeight": 16,
"prefixColor": "#1E90FF"
},
"events": {}
},
"graph": {
"shape": "panel",
"id": "root_panel",
"type": "fx-split-panel",
"props": {
"horizontal": false,
"shadow": "never"
},
"children": [
"visible": true,
"shape": "flow-end",
"id": "d88319d5-66a6-4f37-90a6-1186ddb7b337",
"data": {},
"zIndex": 1
},
{
"id": "744256811959324694",
"type": "fx-split-panel",
"shape": "panel",
"props": {
"horizontal": false,
"scroll": true
"position": {
"x": 100,
"y": 456
},
"size": {
"width": 50,
"height": 50
},
"children": [
{
"id": "744256811959324695",
"type": "fx-form-panel",
"shape": "panel",
"props": {
"size": "0",
"paddingTop": 15,
"colNum": 2
},
"children": [
{
"id": "id744256811959324696",
"type": "fx-text",
"props": {
"label": "ID",
"type": "text",
"dataset": "ds_182a5ea30e9",
"field": "id_182a5ea30f1",
"required": "",
"placeholder": "请输入ID",
"labelWidth": 100,
"readonly": false,
"affixError": true
},
"events": {}
}
,{
"id": "id744256811959324697",
"type": "fx-placeholder",
"props": {
"label": "占位"
},
"layout": {
"row": 1
}
}
,
{
"id": "id744256811959324698",
"type": "fx-text",
"props": {
"label": "父ID",
"type": "text",
"dataset": "ds_182a5ea30e9",
"field": "id_182a5ea30f3",
"required": "",
"placeholder": "请输入父ID",
"labelWidth": 100,
"readonly": false,
"affixError": true
},
"events": {}
}
,{
"id": "id744256811959324699",
"type": "fx-placeholder",
"props": {
"label": "占位"
},
"layout": {
"row": 1
}
}
,
{
"id": "id744256811959324700",
"type": "fx-text",
"props": {
"label": "级次码",
"type": "text",
"dataset": "ds_182a5ea30e9",
"field": "id_182a5ea30f4",
"required": "",
"maxlength": 100,
"placeholder": "请输入级次码",
"labelWidth": 100,
"readonly": false,
"affixError": true
},
"events": {}
}
,{
"id": "id744256811959324701",
"type": "fx-placeholder",
"props": {
"label": "占位"
},
"layout": {
"row": 1
}
}
,
{
"id": "id744256811959324702",
"type": "fx-text",
"props": {
"label": "所属项目",
"type": "text",
"dataset": "ds_182a5ea30e9",
"field": "id_182a5ea30f5",
"required": "",
"placeholder": "请输入所属项目",
"labelWidth": 100,
"readonly": false,
"affixError": true
},
"events": {}
}
,{
"id": "id744256811959324703",
"type": "fx-placeholder",
"props": {
"label": "占位"
},
"layout": {
"row": 1
}
}
,
{
"id": "id744256811959324704",
"type": "fx-text",
"props": {
"label": "编码",
"type": "text",
"dataset": "ds_182a5ea30e9",
"field": "id_182a5ea30f6",
"required": "",
"maxlength": 32,
"placeholder": "请输入编码",
"labelWidth": 100,
"readonly": false,
"affixError": true
},
"events": {}
}
,{
"id": "id744256811959324705",
"type": "fx-placeholder",
"props": {
"label": "占位"
},
"layout": {
"row": 1
}
}
,
{
"id": "id744256811959324706",
"type": "fx-text",
"props": {
"label": "编码",
"type": "text",
"dataset": "ds_182a5ea30e9",
"field": "id_182a5ea30f7",
"required": "",
"maxlength": 100,
"placeholder": "请输入编码",
"labelWidth": 100,
"readonly": false,
"affixError": true
},
"events": {}
}
,{
"id": "id744256811959324707",
"type": "fx-placeholder",
"props": {
"label": "占位"
},
"layout": {
"row": 1
}
}
,
{
"id": "id744256811959324708",
"type": "fx-text",
"props": {
"label": "创建人",
"type": "text",
"dataset": "ds_182a5ea30e9",
"field": "id_182a5ea30f8",
"required": "",
"placeholder": "请输入创建人",
"labelWidth": 100,
"readonly": false,
"affixError": true
},
"events": {}
}
,{
"id": "id744256811959324709",
"type": "fx-placeholder",
"props": {
"label": "占位"
},
"layout": {
"row": 1
}
}
,
{
"id": "id744256811959324710",
"type": "fx-text",
"props": {
"label": "最后更新人",
"type": "text",
"dataset": "ds_182a5ea30e9",
"field": "id_182a5ea30f9",
"required": "",
"placeholder": "请输入最后更新人",
"labelWidth": 100,
"readonly": false,
"affixError": true
},
"events": {}
}
,{
"id": "id744256811959324711",
"type": "fx-placeholder",
"props": {
"label": "占位"
},
"layout": {
"row": 1
}
}
,
{
"id": "id744256811959324712",
"type": "fx-datetime",
"props": {
"label": "创建时间",
"type": "text",
"dataset": "ds_182a5ea30e9",
"field": "id_182a5ea30fa",
"required": "",
"placeholder": "请输入创建时间",
"labelWidth": 100,
"readonly": false,
"affixError": true
},
"events": {}
}
,{
"id": "id744256811959324713",
"type": "fx-placeholder",
"props": {
"label": "占位"
},
"layout": {
"row": 1
}
}
,
{
"id": "id744256811959324714",
"type": "fx-datetime",
"props": {
"label": "最后更新时间",
"type": "text",
"dataset": "ds_182a5ea30e9",
"field": "id_182a5ea30fb",
"required": "",
"placeholder": "请输入最后更新时间",
"labelWidth": 100,
"readonly": false,
"affixError": true
},
"events": {}
}
]
"attrs": {
"body": {
"stroke": "#303133"
},
{
"id": "744256811959324715",
"type": "fx-form-panel",
"shape": "panel",
"props": {},
"children": []
"icon": {
"xlink:href": "/src/assets/images/svg/stop.svg"
}
]
},
"visible": true,
"shape": "flow-end",
"id": "08c500dd-28e7-488a-bf79-56d6fc783194",
"data": {},
"zIndex": 7
},
{
"id": "744256811959324716",
"type": "fx-form-panel",
"shape": "panel",
"props": {
"size": "0"
"position": {
"x": 65,
"y": 179
},
"size": {
"width": 120,
"height": 50
},
"children": [
{
"id": "id744256811959324717",
"type": "fx-divider",
"props": {
"label": "",
"contentPosition": "center",
"direction": "horizontal"
}
"attrs": {
"text": {
"text": "任务"
},
"label": {
"text": "制单"
},
"icon": {
"xlink:href": "/src/assets/images/svg/people.svg"
}
]
},
"visible": true,
"shape": "flow-action",
"id": "a06b3e2f-588e-4b77-aa83-c3949399213d",
"data": {},
"zIndex": 12
},
{
"id": "744256811959324718",
"type": "fx-form-panel",
"shape": "panel",
"props": {
"size": "50",
"alignY": "center",
"paddingRight": 20
"position": {
"x": 65,
"y": 314
},
"size": {
"width": 120,
"height": 50
},
"children": [
{
"id": "id744256811959324719",
"type": "fx-button-group",
"props": {
"menus": [],
"textAlign": "right"
},
"slots": {
"default": [
{
"type": "fx-button",
"props": {
"label": "保存",
"leftIcon": "save",
"type": "success",
"action": "button:save",
},
"id": "id744256811959324720"
},
{
"type": "fx-button",
"props": {
"label": "关闭",
"leftIcon": "close",
"action": "button:closeDialog",
},
"id": "id744256811959324721"
}
]
}
"attrs": {
"text": {
"text": "任务"
},
"label": {
"text": "审批"
},
"icon": {
"xlink:href": "/src/assets/images/svg/people.svg"
}
]
}
]
}
}
],
"model": [
{
"dataset": "ds_182a5ea30e6",
"label": "主数据集",
"fields": [
{
"id": "id_182a5ea30fe",
"field": "mc_id" },
{
"id": "id_182a5ea30ff",
"field": "mc_parent_id" },
{
"id": "id_182a5ea3100",
"field": "mc_level_code" },
{
"id": "id_182a5ea3101",
"field": "mc_prj_id" },
{
"id": "id_182a5ea3102",
"field": "mc_code" },
{
"id": "id_182a5ea3103",
"field": "mc_name" },
{
"id": "id_182a5ea3104",
"field": "mc_create_uid" },
{
"id": "id_182a5ea3105",
"field": "mc_update_uid" },
{
"id": "id_182a5ea3106",
"field": "mc_create_at" },
{
"id": "id_182a5ea3107",
"field": "mc_update_at" }
],
"filters": [
]
},
{
"dataset": "ds_182a5ea30e9",
"label": "卡片数据集",
"fields": [
{
"id": "id_182a5ea30f1",
"field": "mc_id" },
{
"id": "id_182a5ea30f3",
"field": "mc_parent_id" },
{
"id": "id_182a5ea30f4",
"field": "mc_level_code" },
{
"id": "id_182a5ea30f5",
"field": "mc_prj_id" },
{
"id": "id_182a5ea30f6",
"field": "mc_code" },
{
"id": "id_182a5ea30f7",
"field": "mc_name" },
{
"id": "id_182a5ea30f8",
"field": "mc_create_uid" },
{
"id": "id_182a5ea30f9",
"field": "mc_update_uid" },
},
"visible": true,
"shape": "flow-action",
"id": "c0cf8077-a879-4299-be0b-4dd041e8dac9",
"data": {},
"zIndex": 13
},
{
"id": "id_182a5ea30fa",
"field": "mc_create_at" },
"shape": "edge",
"attrs": {
"line": {
"stroke": "#4D5B62",
"strokeWidth": 1
}
},
"id": "03c8e73d-e009-49b5-ad4c-c9f060b8c24a",
"zIndex": 27,
"data": {},
"source": {
"cell": "d88319d5-66a6-4f37-90a6-1186ddb7b337"
},
"target": {
"cell": "a06b3e2f-588e-4b77-aa83-c3949399213d"
}
},
{
"id": "id_182a5ea30fb",
"field": "mc_update_at" }
],
"filters": [
"shape": "edge",
"attrs": {
"line": {
"stroke": "#4D5B62",
"strokeWidth": 1
}
},
"id": "9be76069-399c-4782-a141-5550d8d635e3",
"zIndex": 37,
"data": {},
"source": {
"cell": "a06b3e2f-588e-4b77-aa83-c3949399213d"
},
"target": {
"cell": "c0cf8077-a879-4299-be0b-4dd041e8dac9"
}
},
{
"id": "fid_182a5ea30f2",
"field": "id",
"required": false,
"type": "input"
"shape": "edge",
"attrs": {
"line": {
"stroke": "#4D5B62",
"strokeWidth": 1
}
},
"id": "b7b53812-8392-448a-8158-f3f9242fab50",
"zIndex": 43,
"data": {},
"source": {
"cell": "c0cf8077-a879-4299-be0b-4dd041e8dac9"
},
"target": {
"cell": "08c500dd-28e7-488a-bf79-56d6fc783194"
}
}
]
}
],
"option": {
"widgetRef": ["737684234579218432","736544100974596096"],
"vars": []
},
"model": {
"activities": [
{
"label": "开始",
"id": "d88319d5-66a6-4f37-90a6-1186ddb7b337",
"type": 1
},
{
"label": "接受",
"id": "08c500dd-28e7-488a-bf79-56d6fc783194",
"type": 9
},
{
"label": "制单",
"buttons": [
{
"type": "submit",
"label": "提交",
"valid": true
},
{
"type": "reject",
"label": "驳回",
"valid": true
},
{
"type": "retake",
"label": "取回",
"valid": true
},
{
"type": "cancel",
"label": "作废",
"valid": true
},
{
"type": "delete",
"label": "删除",
"valid": true
}
],
"code": "make",
"page": "749216083826708481",
"canEdit": true,
"needSign": false,
"id": "a06b3e2f-588e-4b77-aa83-c3949399213d",
"type": 2
},
{
"label": "审批",
"buttons": [
{
"type": "submit",
"label": "提交",
"valid": true
},
{
"type": "reject",
"label": "驳回",
"valid": true
},
{
"type": "retake",
"label": "取回",
"valid": true
},
{
"type": "cancel",
"label": "作废",
"valid": true
},
{
"type": "delete",
"label": "删除",
"valid": true
}
],
"code": "approve",
"page": "749216083826708481",
"id": "c0cf8077-a879-4299-be0b-4dd041e8dac9",
"type": 2
}
],
"trans": [
{
"label": "连接线",
"id": "03c8e73d-e009-49b5-ad4c-c9f060b8c24a",
"src": "d88319d5-66a6-4f37-90a6-1186ddb7b337",
"dst": "a06b3e2f-588e-4b77-aa83-c3949399213d"
},
{
"label": "连接线",
"id": "9be76069-399c-4782-a141-5550d8d635e3",
"src": "a06b3e2f-588e-4b77-aa83-c3949399213d",
"dst": "c0cf8077-a879-4299-be0b-4dd041e8dac9"
},
{
"label": "连接线",
"id": "b7b53812-8392-448a-8158-f3f9242fab50",
"src": "c0cf8077-a879-4299-be0b-4dd041e8dac9",
"dst": "08c500dd-28e7-488a-bf79-56d6fc783194"
}
],
"page": "749216083826708481"
}
}
}

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