diff --git a/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/baseoutsourcingapplication/BaseOutsourcingApplicationFeign.java b/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/baseoutsourcingapplication/BaseOutsourcingApplicationFeign.java index 9dbafec185..64708e552d 100644 --- a/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/baseoutsourcingapplication/BaseOutsourcingApplicationFeign.java +++ b/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/baseoutsourcingapplication/BaseOutsourcingApplicationFeign.java @@ -95,10 +95,30 @@ public interface BaseOutsourcingApplicationFeign { @ApiParam(value = "业务sid") @PathVariable(value = "sid")String sid, @ApiParam(value = "用户sid") @PathVariable(value = "userSid")String userSid); + @ApiOperation(value = "读取xml文件") + @GetMapping("/readXml/{deployId}") + public ResultBean readXml(@ApiParam(value = "流程定义id") @PathVariable(value = "deployId") String deployId); + + @ApiOperation(value = "获取当前环节的下一分支节点") + @PostMapping(value = "/getNextTasks/{taskId}") + public ResultBean getNextTasks(@PathVariable(value = "taskId")String taskId); + /** + * 生成流程图 + * + * @param procInsId 任务ID + */ + @ApiOperation(value = "生成流程图") + @RequestMapping("/flowViewer/{procInsId}") + public ResultBean getFlowViewer(@PathVariable("procInsId") String procInsId) ; + @ApiOperation(value = "办理(同意)") @PostMapping("/complete") public ResultBean complete(@ApiParam(value = "变量集合,json对象") @RequestBody Map variables); + @ApiOperation(value = "根据流程实例的id获取最新待办环节") + @PostMapping(value = "/getProcessCirculationNodesByMap") + ResultBean getProcessCirculationNodesByMap(@ApiParam(value = "变量集合,json对象") @RequestBody Map variables); + @ApiOperation(value = "撤回流程") @PostMapping(value = "/revokeProcess/{userSid}/{businessSid}") public ResultBean revokeProcess( @@ -121,4 +141,9 @@ public interface BaseOutsourcingApplicationFeign { public ResultBean flowRecord( @ApiParam(value = "流程实例id")@PathVariable(value = "procInsId")String procInsId, @ApiParam(value = "目前没用")@PathVariable(value = "deployId")String deployId); + @ApiOperation(value = "根据角色获取用户列表" ) + @GetMapping(value = "/getUsers/{roleSid}") + public ResultBean getUsersByRoleSid( @ApiParam(value = "角色sid")@PathVariable(value = "roleSid")String roleSid); + + } \ No newline at end of file diff --git a/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/baseoutsourcingapplication/BaseOutsourcingApplicationFeignFallback.java b/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/baseoutsourcingapplication/BaseOutsourcingApplicationFeignFallback.java index 5209e5f423..d9d92a6d64 100644 --- a/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/baseoutsourcingapplication/BaseOutsourcingApplicationFeignFallback.java +++ b/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/baseoutsourcingapplication/BaseOutsourcingApplicationFeignFallback.java @@ -87,6 +87,21 @@ public class BaseOutsourcingApplicationFeignFallback implements BaseOutsourcingA return null; } + @Override + public ResultBean readXml(String deployId) { + return null; + } + + @Override + public ResultBean getNextTasks(String taskId) { + return null; + } + + @Override + public ResultBean getFlowViewer(String procInsId) { + return null; + } + @Override public ResultBean complete(Map variables) { return null; @@ -112,4 +127,14 @@ public class BaseOutsourcingApplicationFeignFallback implements BaseOutsourcingA return null; } + @Override + public ResultBean getUsersByRoleSid(String roleSid) { + return null; + } + + @Override + public ResultBean getProcessCirculationNodesByMap(Map variables) { + return null; + } + } \ No newline at end of file diff --git a/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleactualsales/BaseVehicleActualSalesFeign.java b/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleactualsales/BaseVehicleActualSalesFeign.java index 1e15240e40..4c09801487 100644 --- a/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleactualsales/BaseVehicleActualSalesFeign.java +++ b/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleactualsales/BaseVehicleActualSalesFeign.java @@ -1,12 +1,17 @@ package com.yxt.anrui.base.api.basevehicleactualsales; +import com.yxt.anrui.base.api.flow.FlowTaskVo; import com.yxt.common.core.query.PagerQuery; import com.yxt.common.core.result.ResultBean; import com.yxt.common.core.vo.PagerVo; import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.*; +import javax.validation.Valid; +import java.util.Map; + /** * @Author dimengzhe * @Date 2022/4/8 11:57 @@ -58,4 +63,6 @@ public interface BaseVehicleActualSalesFeign { @PostMapping("/revokeProcess") @ResponseBody ResultBean revokeProcess(@RequestBody BaseVehicleActualSalesFlowDto dto); + + } diff --git a/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleactualsales/BaseVehicleActualSalesFeignFallback.java b/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleactualsales/BaseVehicleActualSalesFeignFallback.java index 9019cfe70a..50f879252f 100644 --- a/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleactualsales/BaseVehicleActualSalesFeignFallback.java +++ b/anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleactualsales/BaseVehicleActualSalesFeignFallback.java @@ -1,10 +1,14 @@ package com.yxt.anrui.base.api.basevehicleactualsales; +import com.yxt.anrui.base.api.flow.FlowTaskVo; import com.yxt.common.core.query.PagerQuery; import com.yxt.common.core.result.ResultBean; import com.yxt.common.core.vo.PagerVo; import org.springframework.stereotype.Component; +import javax.validation.Valid; +import java.util.Map; + /** * @Author dimengzhe * @Date 2022/4/8 11:59 diff --git a/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/baseoutsourcingapplication/BaseOutsourcingApplicationRest.java b/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/baseoutsourcingapplication/BaseOutsourcingApplicationRest.java index d7788e944c..b0936b3d7b 100644 --- a/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/baseoutsourcingapplication/BaseOutsourcingApplicationRest.java +++ b/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/baseoutsourcingapplication/BaseOutsourcingApplicationRest.java @@ -34,6 +34,7 @@ import com.yxt.common.core.result.ResultBean; import com.yxt.common.core.vo.PagerVo; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import org.flowable.bpmn.model.FlowElement; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -108,6 +109,22 @@ public class BaseOutsourcingApplicationRest implements BaseOutsourcingApplicatio return baseOutsourcingApplicationService.submitBaseOutSourcingApplication(sid,userSid); } + @Override + public ResultBean readXml(String deployId) { + return baseOutsourcingApplicationService.readXml(deployId); + } + + @Override + public ResultBean getNextTasks(String taskId) { + return baseOutsourcingApplicationService.getNextTasks(taskId); + } + + @Override + public ResultBean getFlowViewer(String procInsId) { + + return baseOutsourcingApplicationService.getFlowViewer(procInsId); + } + @Override public ResultBean complete(Map variables) { return baseOutsourcingApplicationService.complete(variables); @@ -132,4 +149,14 @@ public class BaseOutsourcingApplicationRest implements BaseOutsourcingApplicatio public ResultBean flowRecord(String procInsId, String deployId) { return baseOutsourcingApplicationService.flowRecord(procInsId, deployId); } + + @Override + public ResultBean getUsersByRoleSid(String roleSid) { + return baseOutsourcingApplicationService.getUsersByRoleSid(roleSid); + } + + @Override + public ResultBean getProcessCirculationNodesByMap(Map variables) { + return baseOutsourcingApplicationService.getProcessCirculationNodesByMap(variables); + } } diff --git a/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/baseoutsourcingapplication/BaseOutsourcingApplicationService.java b/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/baseoutsourcingapplication/BaseOutsourcingApplicationService.java index 5c46998db6..2c86b5ad55 100644 --- a/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/baseoutsourcingapplication/BaseOutsourcingApplicationService.java +++ b/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/baseoutsourcingapplication/BaseOutsourcingApplicationService.java @@ -54,6 +54,8 @@ import com.yxt.anrui.portal.api.sysuser.SysUserFeign; import com.yxt.anrui.portal.api.sysuser.SysUserVo; import com.yxt.anrui.portal.config.DictCommonType; import com.yxt.common.base.utils.DateUtils; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; import org.apache.commons.lang3.StringUtils; import com.yxt.common.base.service.MybatisBaseService; import com.yxt.common.base.utils.PagerUtil; @@ -61,8 +63,11 @@ import com.yxt.common.core.query.PagerQuery; import com.yxt.common.core.result.ResultBean; import com.yxt.common.core.vo.PagerVo; +import org.flowable.bpmn.model.FlowElement; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; import java.text.SimpleDateFormat; import java.util.Date; @@ -285,7 +290,8 @@ public class BaseOutsourcingApplicationService extends MybatisBaseService variables = new HashMap<>(); + Map variables = BeanUtil.beanToMap(dto); + //Map variables = new HashMap<>(); variables.put("businessSid", businessSid); variables.put("orgSid", orgSid); //部门sid if (StringUtils.isBlank(dto.getTaskId())) { // 新提交 @@ -519,4 +525,26 @@ public class BaseOutsourcingApplicationService extends MybatisBaseService variables) { + ResultBean processCirculationNodesByMap =flowTaskFeign.getProcessCirculationNodesByMap(variables); + processCirculationNodesByMap.setCode("200"); + processCirculationNodesByMap.setSuccess(true); + return processCirculationNodesByMap; + } } \ No newline at end of file diff --git a/anrui-flowable/anrui-flowable-api/src/main/java/com/yxt/anrui/flowable/api/flowtask/FlowTaskFeign.java b/anrui-flowable/anrui-flowable-api/src/main/java/com/yxt/anrui/flowable/api/flowtask/FlowTaskFeign.java index 4c242b3e4e..2908589b97 100644 --- a/anrui-flowable/anrui-flowable-api/src/main/java/com/yxt/anrui/flowable/api/flowtask/FlowTaskFeign.java +++ b/anrui-flowable/anrui-flowable-api/src/main/java/com/yxt/anrui/flowable/api/flowtask/FlowTaskFeign.java @@ -15,6 +15,7 @@ import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.*; import java.util.List; +import java.util.Map; /** * @author dimengzhe @@ -96,10 +97,6 @@ public interface FlowTaskFeign { @ResponseBody ResultBean processVariables(@ApiParam(value = "流程任务Id") @PathVariable(value = "taskId") String taskId); - @ApiOperation(value = "获取下一节点") - @PostMapping(value = "/nextFlowNode") - @ResponseBody - ResultBean getNextFlowNode(@RequestBody FlowTaskQueryOne flowTaskQueryOne); /** * 生成流程图 * @@ -161,4 +158,11 @@ public interface FlowTaskFeign { @RequestParam(value = "v")String v, @RequestParam(value = "outcome")String outcome); + @ApiOperation(value = "根据流程实例的id获取最新待办环节") + @PostMapping(value = "/getProcessCirculationNodesByMap") + ResultBean getProcessCirculationNodesByMap(@RequestBody Map variables); + + @ApiOperation("获取流程图") + @GetMapping("/readXml/{sid}") + ResultBean readXml(@PathVariable(value ="sid") String sid); } diff --git a/anrui-flowable/anrui-flowable-api/src/main/java/com/yxt/anrui/flowable/api/flowtask/FlowTaskFeignFallBack.java b/anrui-flowable/anrui-flowable-api/src/main/java/com/yxt/anrui/flowable/api/flowtask/FlowTaskFeignFallBack.java index 6a71684ca0..bbc4eeed40 100644 --- a/anrui-flowable/anrui-flowable-api/src/main/java/com/yxt/anrui/flowable/api/flowtask/FlowTaskFeignFallBack.java +++ b/anrui-flowable/anrui-flowable-api/src/main/java/com/yxt/anrui/flowable/api/flowtask/FlowTaskFeignFallBack.java @@ -12,6 +12,7 @@ import org.flowable.bpmn.model.FlowElement; import org.springframework.stereotype.Component; import java.util.List; +import java.util.Map; /** * @author dimengzhe @@ -86,11 +87,6 @@ public class FlowTaskFeignFallBack implements FlowTaskFeign { return null; } - @Override - public ResultBean getNextFlowNode(FlowTaskQueryOne flowTaskQueryOne) { - return null; - } - @Override public ResultBean getFlowViewer(String procInsId) { return null; @@ -150,5 +146,14 @@ public class FlowTaskFeignFallBack implements FlowTaskFeign { String k, String v, String outcome) { return null; } + @Override + public ResultBean getProcessCirculationNodesByMap(Map variables) { + return null; + } + + @Override + public ResultBean readXml(String deployId) { + return null; + } } diff --git a/anrui-flowable/anrui-flowable-api/src/main/java/com/yxt/anrui/flowable/api/utils/ProcDefEnum.java b/anrui-flowable/anrui-flowable-api/src/main/java/com/yxt/anrui/flowable/api/utils/ProcDefEnum.java index 69e8c2bb97..40a793d0a5 100644 --- a/anrui-flowable/anrui-flowable-api/src/main/java/com/yxt/anrui/flowable/api/utils/ProcDefEnum.java +++ b/anrui-flowable/anrui-flowable-api/src/main/java/com/yxt/anrui/flowable/api/utils/ProcDefEnum.java @@ -17,9 +17,9 @@ public enum ProcDefEnum { RECORDAPPLICATION("入账申请", "record_application_7y80d4r8:1:265008"), SCMVEHICLERETURN("采购退库", "process_md8aeoap:4:245028"), SEALAPPLY("盖章申请", "process_7h0z66tp:1:240064" ), - BASEVEHICLEACTUALSALES("未售买断", ""),//ToDo + BASEVEHICLEACTUALSALES("未售买断", "process_2l9i88sk:3:272604"),//ToDo SALESORDER("销售订单审批流程", "process_p5ils2rn:2:245112"), - BASEOUTSOURCINGAPPLICATION("外采申请", "process_5tqysnjc:1:232504"), + BASEOUTSOURCINGAPPLICATION("外采申请", "process_5tqysnjc:2:325008"), ; ProcDefEnum(String proDefName, String proDefId) { diff --git a/anrui-flowable/anrui-flowable-biz/src/main/java/com/yxt/anrui/flowable/biz/flowdefinition/FlowDefinitionService.java b/anrui-flowable/anrui-flowable-biz/src/main/java/com/yxt/anrui/flowable/biz/flowdefinition/FlowDefinitionService.java index 32067a430c..1ba782c3ec 100644 --- a/anrui-flowable/anrui-flowable-biz/src/main/java/com/yxt/anrui/flowable/biz/flowdefinition/FlowDefinitionService.java +++ b/anrui-flowable/anrui-flowable-biz/src/main/java/com/yxt/anrui/flowable/biz/flowdefinition/FlowDefinitionService.java @@ -9,7 +9,9 @@ package com.yxt.anrui.flowable.biz.flowdefinition; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.yxt.anrui.flowable.api.flowdefinition.FlowDefinitionVo; import com.yxt.anrui.flowable.api.flowtask.FlowTask; +import com.yxt.anrui.flowable.api.flowtask.LatestTaskVo; import com.yxt.anrui.flowable.api.sysform.SysForm; +import com.yxt.anrui.flowable.biz.flow.FlowableService; import com.yxt.anrui.flowable.biz.flowtask.FlowTaskService; import com.yxt.anrui.flowable.biz.sysdeployform.SysDeployFormService; import com.yxt.anrui.flowable.common.FlowComment; @@ -45,7 +47,8 @@ public class FlowDefinitionService extends FlowServiceFactory { private SysDeployFormService sysDeployFormService; @Autowired private SysUserFeign sysUserFeign; - + @Autowired + private FlowableService flowableService; /** * 导入流程文件 * @@ -191,7 +194,11 @@ public class FlowDefinitionService extends FlowServiceFactory { taskService.setAssignee(task.getId(), userSid); taskService.complete(task.getId(), variables); } - + ResultBean> latestTasksNew = flowTaskService.getLatestTasksNew(processInstance.getId()); + List data = latestTasksNew.getData(); + LatestTaskVo latestTaskVo = data.get(0); + String id_ = latestTaskVo.getId_(); + taskService.setAssignee(id_, userSid); ResultBean rb = new ResultBean<>(); FlowTask flowTask = new FlowTask(); flowTask.setTaskId(task.getId()); diff --git a/anrui-flowable/anrui-flowable-biz/src/main/java/com/yxt/anrui/flowable/biz/flowtask/FlowTaskController.java b/anrui-flowable/anrui-flowable-biz/src/main/java/com/yxt/anrui/flowable/biz/flowtask/FlowTaskController.java index 7fa850e71e..c5101196e0 100644 --- a/anrui-flowable/anrui-flowable-biz/src/main/java/com/yxt/anrui/flowable/biz/flowtask/FlowTaskController.java +++ b/anrui-flowable/anrui-flowable-biz/src/main/java/com/yxt/anrui/flowable/biz/flowtask/FlowTaskController.java @@ -18,6 +18,7 @@ import io.swagger.annotations.Api; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; +import org.flowable.bpmn.model.ExtensionAttribute; import org.flowable.bpmn.model.FlowElement; import org.flowable.engine.HistoryService; import org.flowable.engine.RepositoryService; @@ -185,11 +186,6 @@ public class FlowTaskController implements FlowTaskFeign { return flowTaskService.processVariables(taskId); } - @Override - public ResultBean getNextFlowNode(FlowTaskQueryOne flowTaskQueryOne) { - return null; - } - @Override public ResultBean getFlowViewer(String procInsId) { return flowTaskService.getFlowViewer(procInsId); @@ -255,9 +251,43 @@ public class FlowTaskController implements FlowTaskFeign { map.put(k, v); map.put("outcome", outcome); List flowElements = processService.calApprovePath(procId, modelId, map); - List> list = new ArrayList<>(); List collect = flowElements.stream().filter(item -> item.getId().length() > 0).collect(Collectors.toList()); + for (int i = 0; i < collect.size(); i++) { + if (collect.get(i).getId().equals(modelId)) { + FlowElement item = collect.get(i + 1); + log.info("flowElement:{}", item); + log.info("nodeName:{}", item.getName()); + log.info("nodeId:{}", item.getId()); + String s = JSON.toJSONString(item); + JSONObject jsonObject = JSONObject.parseObject(s); + log.info("item:{}", jsonObject); + Object candidateGroups = jsonObject.get("candidateGroups"); + JSONArray candidateGroups_arr = new JSONArray(); + if (candidateGroups != null) { + candidateGroups_arr = JSONArray.parseArray(candidateGroups.toString()); + } + if (candidateGroups_arr.size() > 0) { + log.info("candidateGroups_sid:{}", candidateGroups_arr.get(0)); + } + log.info("candidateGroups:{}", candidateGroups_arr); + } + } + ResultBean> rb = new ResultBean>(); + return rb.setData(flowElements); + } + @Override + public ResultBean getProcessCirculationNodesByMap(Map variables) { + String modelId =null; + if(variables.get("modelId")!=null){ + modelId= variables.get("modelId").toString(); + } + String procId =null; + if(variables.get("procId")!=null){ + procId= variables.get("procId").toString(); + } + List flowElements = processService.calApprovePath(procId, modelId, variables); + List collect = flowElements.stream().filter(item -> item.getId().length() > 0).collect(Collectors.toList()); for (int i = 0; i < collect.size(); i++) { if (collect.get(i).getId().equals(modelId)) { FlowElement item = collect.get(i + 1); @@ -279,6 +309,23 @@ public class FlowTaskController implements FlowTaskFeign { } } ResultBean> rb = new ResultBean>(); + List> list=new ArrayList<>(); + for(FlowElement f:flowElements){ + Map map=new HashMap<>(); + map.put("name",f.getName()); + map.put("id",f.getId()); + String s = JSON.toJSONString(f); + JSONObject jsonObject = JSONObject.parseObject(s); + log.info("item:{}", jsonObject); + Object candidateGroups = jsonObject.get("candidateGroups"); + map.put("candidateGroups",candidateGroups); + list.add(map); + } return rb.setData(flowElements); } + + @Override + public ResultBean readXml(String deployId) { + return flowTaskService.readXml(deployId); + } } diff --git a/anrui-flowable/anrui-flowable-biz/src/main/java/com/yxt/anrui/flowable/biz/flowtask/FlowTaskMapper.java b/anrui-flowable/anrui-flowable-biz/src/main/java/com/yxt/anrui/flowable/biz/flowtask/FlowTaskMapper.java index eae3a617de..915f1a345a 100644 --- a/anrui-flowable/anrui-flowable-biz/src/main/java/com/yxt/anrui/flowable/biz/flowtask/FlowTaskMapper.java +++ b/anrui-flowable/anrui-flowable-biz/src/main/java/com/yxt/anrui/flowable/biz/flowtask/FlowTaskMapper.java @@ -1,6 +1,5 @@ package com.yxt.anrui.flowable.biz.flowtask; - import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.yxt.anrui.flowable.api.flowtask.FlowTask; @@ -9,6 +8,7 @@ import com.yxt.anrui.flowable.api.flowtask.TaskQueryParamsVo; import com.yxt.anrui.flowable.api.flowtask.TaskVo; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import org.flowable.task.api.history.HistoricTaskInstance; import java.util.List; import java.util.Map; @@ -38,4 +38,8 @@ public interface FlowTaskMapper extends BaseMapper { * @return */ List getLatestTasks(@Param("procId")String procId); + + Map getHistTaskByID(@Param("procId")String procId,@Param("taskId")String id); + + Map getTaskByDefKey(@Param("procId")String processInstanceId, @Param("taskId")String id); } diff --git a/anrui-flowable/anrui-flowable-biz/src/main/java/com/yxt/anrui/flowable/biz/flowtask/FlowTaskMapper.xml b/anrui-flowable/anrui-flowable-biz/src/main/java/com/yxt/anrui/flowable/biz/flowtask/FlowTaskMapper.xml index 2be929bd6a..8cc70c2513 100644 --- a/anrui-flowable/anrui-flowable-biz/src/main/java/com/yxt/anrui/flowable/biz/flowtask/FlowTaskMapper.xml +++ b/anrui-flowable/anrui-flowable-biz/src/main/java/com/yxt/anrui/flowable/biz/flowtask/FlowTaskMapper.xml @@ -196,4 +196,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" WHERE task.proc_inst_id_= #{procId} + + + + \ No newline at end of file diff --git a/anrui-flowable/anrui-flowable-biz/src/main/java/com/yxt/anrui/flowable/biz/flowtask/FlowTaskService.java b/anrui-flowable/anrui-flowable-biz/src/main/java/com/yxt/anrui/flowable/biz/flowtask/FlowTaskService.java index 21c0869127..91de4fec38 100644 --- a/anrui-flowable/anrui-flowable-biz/src/main/java/com/yxt/anrui/flowable/biz/flowtask/FlowTaskService.java +++ b/anrui-flowable/anrui-flowable-biz/src/main/java/com/yxt/anrui/flowable/biz/flowtask/FlowTaskService.java @@ -1,5 +1,6 @@ package com.yxt.anrui.flowable.biz.flowtask; +import org.apache.commons.io.IOUtils; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; @@ -32,6 +33,7 @@ import com.yxt.common.core.query.PagerQuery; import com.yxt.common.core.result.ResultBean; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.io.IOUtils; import org.flowable.bpmn.model.Process; import org.flowable.bpmn.model.*; import org.flowable.common.engine.api.FlowableException; @@ -57,10 +59,14 @@ import org.flowable.task.api.TaskQuery; import org.flowable.task.api.history.HistoricTaskInstance; import org.flowable.task.api.history.HistoricTaskInstanceQuery; import org.flowable.ui.modeler.service.FlowableFormService; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; +import java.io.IOException; +import java.io.InputStream; +import java.nio.charset.StandardCharsets; import java.sql.Timestamp; import java.util.*; import java.util.stream.Collectors; @@ -72,6 +78,8 @@ import java.util.stream.Collectors; @Service @Slf4j public class FlowTaskService extends MybatisBaseService { + @Autowired + FlowTaskMapper flowTaskMapper; @Resource protected HistoryService historyService; @Resource @@ -357,14 +365,14 @@ public class FlowTaskService extends MybatisBaseService roleSidList = sysUserRoleFeign.getUserRoleSidByUserSid(userSid).getData(); - if (CollectionUtils.isEmpty(roleSidList)) { + // List roleSidList = sysUserRoleFeign.getUserRoleSidByUserSid(userSid).getData(); + /* if (CollectionUtils.isEmpty(roleSidList)) { return new ResultBean().fail().setMsg("请先设置用户角色"); - } + }*/ taskQuery.active() .includeProcessVariables() .or() - .taskCandidateGroupIn(roleSidList) + //.taskCandidateGroupIn(roleSidList) .taskAssignee(userSid) .endOr() .orderByTaskCreateTime().desc(); @@ -738,11 +746,14 @@ public class FlowTaskService extends MybatisBaseService businessComplete(BusinessVariables dto) { + ResultBean rb = new ResultBean<>(); Map formVariables = dto.getFormVariables(); // formVariables.put("handleUrl", dto.getHandleUrl()); // formVariables.put("detailUrl", dto.getDetailUrl()); Object taskId_obj = formVariables.get("taskId"); + String procInsId= formVariables.get("instanceId").toString(); + String nextUserSid= formVariables.get("nextUserSid").toString(); String taskId = null; if (taskId_obj == null) { return rb.fail().setMsg("taskId 不能为空!").setData(new FlowTask()); @@ -806,6 +817,12 @@ public class FlowTaskService extends MybatisBaseService> l= getLatestTasksNew(procInsId); + if(l.getData().size()>0){ + LatestTaskVo latestTaskVo = l.getData().get(0); + String id_ = latestTaskVo.getId_(); + taskService.setAssignee(id_, nextUserSid); + } } FlowTask flowTask = new FlowTask(); flowTask.setTaskId(task.getId()); @@ -1016,7 +1033,6 @@ public class FlowTaskService extends MybatisBaseService currentUserTaskList = FlowableUtils.iteratorFindChildUserTasks(oneUserTask, runTaskKeyList, null, null); currentUserTaskList.forEach(item -> currentIds.add(item.getId())); - // 规定:并行网关之前节点必须需存在唯一用户任务节点,如果出现多个任务节点,则并行网关节点默认为结束节点,原因为不考虑多对多情况 if (targetIds.size() > 1 && currentIds.size() > 1) { return new ResultBean>().fail().setMsg("任务出现多对多情况,无法撤回").setData(new ArrayList<>()); @@ -1057,6 +1073,11 @@ public class FlowTaskService extends MybatisBaseService map= flowTaskMapper.getHistTaskByID(task.getProcessInstanceId(),targetIds.get(0)); + Map map2= flowTaskMapper.getTaskByDefKey(task.getProcessInstanceId(),item.getId()); + String id_ = map2.get("id_").toString(); + String assignee_ = map.get("ASSIGNEE_").toString(); + taskService.setAssignee(id_,assignee_); latestTaskVo.setName_(item.getName()); latestTaskVo.setTask_def_key_(item.getId()); latestTaskVo.setIncomingSourceRef(item.getIncomingFlows().get(0).getSourceRef()); @@ -1404,8 +1425,7 @@ public class FlowTaskService extends MybatisBaseService outFlows = flowNode.getOutgoingFlows(); - Map nodeMap = new HashMap<>(); - List> lists = new ArrayList<>(); + List> lists = new ArrayList<>(); getNodes(outFlows, node, lists); System.out.println(JSON.toJSONString(lists)); return ResultBean.fireSuccess().setData(lists); @@ -1421,7 +1441,7 @@ public class FlowTaskService extends MybatisBaseService outFlows, String node, List> lists) { + public void getNodes(List outFlows, String node, List> lists) { for (SequenceFlow sequenceFlow : outFlows) { //当前审批节点 if ("now".equals(node)) { @@ -1432,18 +1452,19 @@ public class FlowTaskService extends MybatisBaseService calApprovePath(String processInstanceId, String modelId, Map variableMap){ - // BpmnModel bpmnModel=repositoryService.getBpmnModel(modelId); - BpmnModel bpmnModel =repositoryService.getBpmnModel(processInstanceId); + BpmnModel bpmnModel=repositoryService.getBpmnModel(modelId); + // BpmnModel bpmnModel2 =repositoryService.getBpmnModel(processInstanceId); /*if(StringUtils.isNotBlank(processInstanceId)){ ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult(); bpmnModel = repositoryService.getBpmnModel(processInstance.getProcessDefinitionId()); diff --git a/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysuser/SysUserFeign.java b/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysuser/SysUserFeign.java index 71c0dfb61c..bd292838e1 100644 --- a/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysuser/SysUserFeign.java +++ b/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysuser/SysUserFeign.java @@ -178,4 +178,7 @@ public interface SysUserFeign { @ApiOperation(value = "设置是否可用:isEnable:1可用,0不可用") public ResultBean setIsEnable(@ApiParam(value = "sid", required = true) @PathVariable("sid") String sid, @ApiParam(value = "isEnable", required = true) @PathVariable("isEnable") String isEnable); + @ApiOperation("根据角色sid查询用户") + @GetMapping("/getUsersByRoleSid/{roleSid}") + ResultBean getUsersByRoleSid(@PathVariable("roleSid") String roleSid); } \ No newline at end of file diff --git a/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysuser/SysUserFeignFallback.java b/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysuser/SysUserFeignFallback.java index 46e817aa30..1a2475d477 100644 --- a/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysuser/SysUserFeignFallback.java +++ b/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysuser/SysUserFeignFallback.java @@ -163,4 +163,9 @@ public class SysUserFeignFallback implements SysUserFeign { public ResultBean setIsEnable(String sid, String isEnable) { return null; } + + @Override + public ResultBean getUsersByRoleSid(String roleSid) { + return null; + } } \ No newline at end of file diff --git a/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysuser/SysUserMapper.java b/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysuser/SysUserMapper.java index 28d0fe8106..685132e96a 100644 --- a/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysuser/SysUserMapper.java +++ b/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysuser/SysUserMapper.java @@ -12,6 +12,7 @@ import com.yxt.anrui.portal.api.sysuser.app.AppUserOrgInfoVo; import com.yxt.anrui.portal.api.sysuser.wx.WxHomePageVo; import com.yxt.anrui.portal.api.sysuser.wx.WxMySysUserInfoVo; import com.yxt.anrui.portal.api.sysuser.wx.WxSysUserVo; +import com.yxt.common.core.result.ResultBean; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; @@ -155,4 +156,6 @@ public interface SysUserMapper extends BaseMapper { SysUser selectByMobile(String mobile); int updateIsEnable(@Param("sid") String sid, @Param("isEnable") String isEnable); + + List getUsersByRoleSid(@Param("roleSid")String roleSid); } \ No newline at end of file diff --git a/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysuser/SysUserMapper.xml b/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysuser/SysUserMapper.xml index 626c55bb78..09f8468bd9 100644 --- a/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysuser/SysUserMapper.xml +++ b/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysuser/SysUserMapper.xml @@ -194,4 +194,14 @@ SET isEnable = #{isEnable} WHERE sid = #{sid} + + \ No newline at end of file diff --git a/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysuser/SysUserRest.java b/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysuser/SysUserRest.java index accd26b7ab..1ebac83ef0 100644 --- a/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysuser/SysUserRest.java +++ b/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysuser/SysUserRest.java @@ -570,4 +570,9 @@ public class SysUserRest implements SysUserFeign { } return ResultBean.fireSuccess().setMsg("设置成功"); } + + @Override + public ResultBean getUsersByRoleSid(String roleSid) { + return sysUserService.getUsersByRoleSid(roleSid); + } } diff --git a/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysuser/SysUserService.java b/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysuser/SysUserService.java index a48b0056d7..1ce4b6e9a5 100644 --- a/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysuser/SysUserService.java +++ b/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysuser/SysUserService.java @@ -853,4 +853,10 @@ public class SysUserService extends MybatisBaseService { public int updateIsEnable(String sid, String isEnable) { return baseMapper.updateIsEnable(sid, isEnable); } + + public ResultBean getUsersByRoleSid(String roleSid) { + List users = baseMapper.getUsersByRoleSid(roleSid); + ResultBean objectResultBean = ResultBean.fireSuccess().setData(users); + return objectResultBean; + } } \ No newline at end of file diff --git a/anrui-scm/anrui-scm-ui/package.json b/anrui-scm/anrui-scm-ui/package.json index 311307df76..8ec1fff313 100644 --- a/anrui-scm/anrui-scm-ui/package.json +++ b/anrui-scm/anrui-scm-ui/package.json @@ -15,6 +15,7 @@ }, "dependencies": { "axios": "^0.24.0", + "bpmn-js": "^9.2.2", "core-js": "^2.6.12", "ejs": "^2.7.4", "element-ui": "2.13.2", @@ -31,7 +32,8 @@ "vue-amap": "^0.5.10", "vue-router": "3.0.6", "vuex": "3.1.0", - "vuex-persistedstate": "^4.0.0" + "vuex-persistedstate": "^4.0.0", + "xcrud": "^0.4.19" }, "devDependencies": { "@vue/cli-plugin-babel": "4.4.4", diff --git a/anrui-scm/anrui-scm-ui/src/api/baseoutsourcingapplication/baseoutsourcingapplication.js b/anrui-scm/anrui-scm-ui/src/api/baseoutsourcingapplication/baseoutsourcingapplication.js index 82d51499ff..3cdf1de4e4 100644 --- a/anrui-scm/anrui-scm-ui/src/api/baseoutsourcingapplication/baseoutsourcingapplication.js +++ b/anrui-scm/anrui-scm-ui/src/api/baseoutsourcingapplication/baseoutsourcingapplication.js @@ -63,6 +63,21 @@ export default { data: params }) }, + +// 读取xml文件 + readXml: function (deployId) { + return request({ + url: '/base/baseoutsourcingapplication/readXml/' + deployId, + method: 'get' + }) + }, + // 读取image文件 + getFlowViewer: function (procInsId) { + return request({ + url: '/base/baseoutsourcingapplication/flowViewer/' + procInsId, + method: 'get' + }) + }, // 同意任务 agreeTask: function(params) { return request({ @@ -77,7 +92,7 @@ export default { // 驳回任务 rejectTask: function(params) { return request({ - url: '/base/baseoutsourcingapplication/' + params.businessSid, + url: '/base/baseoutsourcingapplication/reject/' + params.businessSid, method: 'post', data: params, headers: { @@ -97,7 +112,7 @@ export default { }) }, // 撤回任务 - revokeTask: function(params) { + revokeTask: function (params) { return request({ url: '/base/baseoutsourcingapplication/' + params.userSid + '/' + params.businessSid, method: 'post', @@ -106,5 +121,33 @@ export default { 'Content-Type': 'application/json' } }) + }, + getNextNodes: function(taskid) { + return request({ + url: '/base/baseoutsourcingapplication/getNextTasks/' + taskid, + method: 'post', + headers: { + 'Content-Type': 'application/json' + } + }) + }, + getNextNodesForSubmit: function(data) { + return request({ + url: '/base/baseoutsourcingapplication/getProcessCirculationNodesByMap', + method: 'post', + data: data, + headers: { + 'Content-Type': 'application/json' + } + }) + }, + getUsers: function(roleSId) { + return request({ + url: '/base/baseoutsourcingapplication/getUsers/' + roleSId, + method: 'get', + headers: { + 'Content-Type': 'application/json' + } + }) } } diff --git a/anrui-scm/anrui-scm-ui/src/views/Process/BpmData.js b/anrui-scm/anrui-scm-ui/src/views/Process/BpmData.js new file mode 100644 index 0000000000..672ca44907 --- /dev/null +++ b/anrui-scm/anrui-scm-ui/src/views/Process/BpmData.js @@ -0,0 +1,68 @@ +/** + * 存储流程设计相关参数 + */ +export default class BpmData { + constructor() { + this.controls = [] // 设计器控件 + this.init() + } + + init() { + this.controls = [ + { + action: 'create.start-event', + title: '开始' + }, + { + action: 'create.intermediate-event', + title: '中间' + }, + { + action: 'create.end-event', + title: '结束' + }, + { + action: 'create.exclusive-gateway', + title: '网关' + }, + { + action: 'create.task', + title: '任务' + }, + { + action: 'create.user-task', + title: '用户任务' + }, + { + action: 'create.user-sign-task', + title: '会签任务' + }, + { + action: 'create.subprocess-expanded', + title: '子流程' + }, + { + action: 'create.data-object', + title: '数据对象' + }, + { + action: 'create.data-store', + title: '数据存储' + }, + { + action: 'create.participant-expanded', + title: '扩展流程' + }, + { + action: 'create.group', + title: '分组' + } + ] + } + + // 获取控件配置信息 + getControl(action) { + const result = this.controls.filter(item => item.action === action) + return result[0] || {} + } +} diff --git a/anrui-scm/anrui-scm-ui/src/views/Process/PropertyPanel.vue b/anrui-scm/anrui-scm-ui/src/views/Process/PropertyPanel.vue new file mode 100644 index 0000000000..970bd0f865 --- /dev/null +++ b/anrui-scm/anrui-scm-ui/src/views/Process/PropertyPanel.vue @@ -0,0 +1,169 @@ + + + + + diff --git a/anrui-scm/anrui-scm-ui/src/views/Process/common/customTranslate.js b/anrui-scm/anrui-scm-ui/src/views/Process/common/customTranslate.js new file mode 100644 index 0000000000..fa05f9d67f --- /dev/null +++ b/anrui-scm/anrui-scm-ui/src/views/Process/common/customTranslate.js @@ -0,0 +1,20 @@ +import translations from '../lang/zh' + +export default function customTranslate(template, replacements) { + replacements = replacements || {} + + // Translate + template = translations[template] || template + + // Replace + return template.replace(/{([^}]+)}/g, function(_, key) { + var str = replacements[key] + if ( + translations[replacements[key]] !== null && + translations[replacements[key]] !== 'undefined' + ) { + str = translations[replacements[key]] + } + return str || '{' + key + '}' + }) +} diff --git a/anrui-scm/anrui-scm-ui/src/views/Process/common/mixinExecutionListener.js b/anrui-scm/anrui-scm-ui/src/views/Process/common/mixinExecutionListener.js new file mode 100644 index 0000000000..23295b004e --- /dev/null +++ b/anrui-scm/anrui-scm-ui/src/views/Process/common/mixinExecutionListener.js @@ -0,0 +1,24 @@ + +import executionListenerDialog from '../components/nodePanel/property/executionListener' +export default { + components: { + executionListenerDialog + }, + data() { + return { + executionListenerLength: 0, + dialogName: null + } + }, + methods: { + computedExecutionListenerLength() { + this.executionListenerLength = this.element.businessObject.extensionElements?.values?.length ?? 0 + }, + finishExecutionListener() { + if (this.dialogName === 'executionListenerDialog') { + this.computedExecutionListenerLength() + } + this.dialogName = '' + } + } +} diff --git a/anrui-scm/anrui-scm-ui/src/views/Process/common/mixinPanel.js b/anrui-scm/anrui-scm-ui/src/views/Process/common/mixinPanel.js new file mode 100644 index 0000000000..8686b98372 --- /dev/null +++ b/anrui-scm/anrui-scm-ui/src/views/Process/common/mixinPanel.js @@ -0,0 +1,70 @@ +import xcrud from 'xcrud' +import golbalConfig from 'xcrud/package/common/config' +import showConfig from '../flowable/showConfig' +golbalConfig.set({ + input: { + // size: 'mini' + }, + select: { + // size: 'mini' + }, + colorPicker: { + showAlpha: true + }, + xform: { + form: { + labelWidth: 'auto' + // size: 'mini' + } + } +}) +export default { + components: { xForm: xcrud.xForm }, + props: { + modeler: { + type: Object, + required: true + }, + element: { + type: Object, + required: true + }, + categorys: { + type: Array, + default: () => [] + } + }, + watch: { + 'formData.id': function(val) { + this.updateProperties({ id: val }) + }, + 'formData.name': function(val) { + this.updateProperties({ name: val }) + }, + 'formData.documentation': function(val) { + if (!val) { + this.updateProperties({ documentation: [] }) + return + } + const documentationElement = this.modeler.get('moddle').create('bpmn:Documentation', { text: val }) + this.updateProperties({ documentation: [documentationElement] }) + } + }, + methods: { + updateProperties(properties) { + const modeling = this.modeler.get('modeling') + modeling.updateProperties(this.element, properties) + } + }, + computed: { + elementType() { + const bizObj = this.element.businessObject + return bizObj.eventDefinitions + ? bizObj.eventDefinitions[0].$type + : bizObj.$type + }, + showConfig() { + return showConfig[this.elementType] || {} + } + } +} diff --git a/anrui-scm/anrui-scm-ui/src/views/Process/common/mixinXcrud.js b/anrui-scm/anrui-scm-ui/src/views/Process/common/mixinXcrud.js new file mode 100644 index 0000000000..1f7ee5b5b5 --- /dev/null +++ b/anrui-scm/anrui-scm-ui/src/views/Process/common/mixinXcrud.js @@ -0,0 +1,22 @@ +import xcrud from 'xcrud' +import golbalConfig from 'xcrud/package/common/config' +golbalConfig.set({ + input: { + // size: 'mini' + }, + select: { + // size: 'mini' + }, + colorPicker: { + showAlpha: true + }, + xform: { + form: { + labelWidth: 'auto' + // size: 'mini' + } + } +}) +export default { + components: { xForm: xcrud.xForm } +} diff --git a/anrui-scm/anrui-scm-ui/src/views/Process/common/parseElement.js b/anrui-scm/anrui-scm-ui/src/views/Process/common/parseElement.js new file mode 100644 index 0000000000..63cf336ead --- /dev/null +++ b/anrui-scm/anrui-scm-ui/src/views/Process/common/parseElement.js @@ -0,0 +1,53 @@ +export function commonParse(element) { + const result = { + ...element.businessObject, + ...element.businessObject.$attrs + } + return formatJsonKeyValue(result) +} + +export function formatJsonKeyValue(result) { + // 移除flowable前缀,格式化数组 + for (const key in result) { + if (key.indexOf('flowable:') === 0) { + const newKey = key.replace('flowable:', '') + result[newKey] = result[key] + delete result[key] + } + } + result = documentationParse(result) + return result +} + +export function documentationParse(obj) { + if ('documentation' in obj) { + let str = '' + obj.documentation.forEach(item => { + str += item.text + }) + obj.documentation = str + } + return obj +} + +export function conditionExpressionParse(obj) { + if ('conditionExpression' in obj) { + obj.conditionExpression = obj.conditionExpression.body + } + return obj +} + +export function userTaskParse(obj) { + for (const key in obj) { + if (key === 'candidateUsers') { + obj.userType = 'candidateUsers' + obj[key] = obj[key]?.split(',') || [] + } else if (key === 'candidateGroups') { + obj.userType = 'candidateGroups' + obj[key] = obj[key]?.split(',') || [] + } else if (key === 'assignee') { + obj.userType = 'assignee' + } + } + return obj +} diff --git a/anrui-scm/anrui-scm-ui/src/views/Process/components/custom/customContextPad.vue b/anrui-scm/anrui-scm-ui/src/views/Process/components/custom/customContextPad.vue new file mode 100644 index 0000000000..89c2f68427 --- /dev/null +++ b/anrui-scm/anrui-scm-ui/src/views/Process/components/custom/customContextPad.vue @@ -0,0 +1,24 @@ +export default class CustomContextPad { + constructor(config, contextPad, create, elementFactory, injector, translate) { + this.create = create; + this.elementFactory = elementFactory; + this.translate = translate; + + if (config.autoPlace !== false) { + this.autoPlace = injector.get('autoPlace', false); + } + + contextPad.registerProvider(this); // 定义这是一个contextPad + } + + getContextPadEntries(element) {} +} + +CustomContextPad.$inject = [ + 'config', + 'contextPad', + 'create', + 'elementFactory', + 'injector', + 'translate' +]; diff --git a/anrui-scm/anrui-scm-ui/src/views/Process/components/nodePanel/gateway.vue b/anrui-scm/anrui-scm-ui/src/views/Process/components/nodePanel/gateway.vue new file mode 100644 index 0000000000..db18153142 --- /dev/null +++ b/anrui-scm/anrui-scm-ui/src/views/Process/components/nodePanel/gateway.vue @@ -0,0 +1,81 @@ + + + + + diff --git a/anrui-scm/anrui-scm-ui/src/views/Process/components/nodePanel/process.vue b/anrui-scm/anrui-scm-ui/src/views/Process/components/nodePanel/process.vue new file mode 100644 index 0000000000..6946f1e3e0 --- /dev/null +++ b/anrui-scm/anrui-scm-ui/src/views/Process/components/nodePanel/process.vue @@ -0,0 +1,113 @@ + + + + + diff --git a/anrui-scm/anrui-scm-ui/src/views/Process/components/nodePanel/property/executionListener.vue b/anrui-scm/anrui-scm-ui/src/views/Process/components/nodePanel/property/executionListener.vue new file mode 100644 index 0000000000..1a15b8a11e --- /dev/null +++ b/anrui-scm/anrui-scm-ui/src/views/Process/components/nodePanel/property/executionListener.vue @@ -0,0 +1,194 @@ + + + + + diff --git a/anrui-scm/anrui-scm-ui/src/views/Process/components/nodePanel/property/listenerParam.vue b/anrui-scm/anrui-scm-ui/src/views/Process/components/nodePanel/property/listenerParam.vue new file mode 100644 index 0000000000..dd8ace1841 --- /dev/null +++ b/anrui-scm/anrui-scm-ui/src/views/Process/components/nodePanel/property/listenerParam.vue @@ -0,0 +1,96 @@ + + + + + diff --git a/anrui-scm/anrui-scm-ui/src/views/Process/components/nodePanel/property/multiInstance.vue b/anrui-scm/anrui-scm-ui/src/views/Process/components/nodePanel/property/multiInstance.vue new file mode 100644 index 0000000000..357b7167e6 --- /dev/null +++ b/anrui-scm/anrui-scm-ui/src/views/Process/components/nodePanel/property/multiInstance.vue @@ -0,0 +1,117 @@ + + + + + diff --git a/anrui-scm/anrui-scm-ui/src/views/Process/components/nodePanel/property/signal.vue b/anrui-scm/anrui-scm-ui/src/views/Process/components/nodePanel/property/signal.vue new file mode 100644 index 0000000000..2c29d734b1 --- /dev/null +++ b/anrui-scm/anrui-scm-ui/src/views/Process/components/nodePanel/property/signal.vue @@ -0,0 +1,124 @@ + + + + + diff --git a/anrui-scm/anrui-scm-ui/src/views/Process/components/nodePanel/property/taskListener.vue b/anrui-scm/anrui-scm-ui/src/views/Process/components/nodePanel/property/taskListener.vue new file mode 100644 index 0000000000..0f72a89af9 --- /dev/null +++ b/anrui-scm/anrui-scm-ui/src/views/Process/components/nodePanel/property/taskListener.vue @@ -0,0 +1,196 @@ + + + + + diff --git a/anrui-scm/anrui-scm-ui/src/views/Process/components/nodePanel/sequenceFlow.vue b/anrui-scm/anrui-scm-ui/src/views/Process/components/nodePanel/sequenceFlow.vue new file mode 100644 index 0000000000..178cd7d467 --- /dev/null +++ b/anrui-scm/anrui-scm-ui/src/views/Process/components/nodePanel/sequenceFlow.vue @@ -0,0 +1,92 @@ + + + + + diff --git a/anrui-scm/anrui-scm-ui/src/views/Process/components/nodePanel/startEnd.vue b/anrui-scm/anrui-scm-ui/src/views/Process/components/nodePanel/startEnd.vue new file mode 100644 index 0000000000..2740bf6a47 --- /dev/null +++ b/anrui-scm/anrui-scm-ui/src/views/Process/components/nodePanel/startEnd.vue @@ -0,0 +1,94 @@ + + + + + diff --git a/anrui-scm/anrui-scm-ui/src/views/Process/components/nodePanel/task.vue b/anrui-scm/anrui-scm-ui/src/views/Process/components/nodePanel/task.vue new file mode 100644 index 0000000000..61a00d10c7 --- /dev/null +++ b/anrui-scm/anrui-scm-ui/src/views/Process/components/nodePanel/task.vue @@ -0,0 +1,426 @@ + + + + + diff --git a/anrui-scm/anrui-scm-ui/src/views/Process/flowable/flowable.json b/anrui-scm/anrui-scm-ui/src/views/Process/flowable/flowable.json new file mode 100644 index 0000000000..73ac308898 --- /dev/null +++ b/anrui-scm/anrui-scm-ui/src/views/Process/flowable/flowable.json @@ -0,0 +1,1194 @@ +{ + "name": "Flowable", + "uri": "http://flowable.org/bpmn", + "prefix": "flowable", + "xml": { + "tagAlias": "lowerCase" + }, + "associations": [], + "types": [ + { + "name": "InOutBinding", + "superClass": ["Element"], + "isAbstract": true, + "properties": [ + { + "name": "source", + "isAttr": true, + "type": "String" + }, + { + "name": "sourceExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "target", + "isAttr": true, + "type": "String" + }, + { + "name": "businessKey", + "isAttr": true, + "type": "String" + }, + { + "name": "local", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "variables", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "In", + "superClass": ["InOutBinding"], + "meta": { + "allowedIn": ["bpmn:CallActivity"] + } + }, + { + "name": "Out", + "superClass": ["InOutBinding"], + "meta": { + "allowedIn": ["bpmn:CallActivity"] + } + }, + { + "name": "AsyncCapable", + "isAbstract": true, + "extends": ["bpmn:Activity", "bpmn:Gateway", "bpmn:Event"], + "properties": [ + { + "name": "async", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "asyncBefore", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "asyncAfter", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "exclusive", + "isAttr": true, + "type": "Boolean", + "default": true + } + ] + }, + { + "name": "flowable:in", + "superClass": ["Element"], + "properties": [ + { + "name": "source", + "type": "string", + "isAttr": true + }, + { + "name": "target", + "type": "string", + "isAttr": true + } + ] + }, + { + "name": "flowable:out", + "superClass": ["Element"], + "properties": [ + { + "name": "source", + "type": "string", + "isAttr": true + }, + { + "name": "target", + "type": "string", + "isAttr": true + } + ] + }, + { + "name": "BoundaryEvent", + "superClass": ["CatchEvent"], + "properties": [ + { + "name": "cancelActivity", + "default": true, + "isAttr": true, + "type": "Boolean" + }, + { + "name": "attachedToRef", + "type": "Activity", + "isAttr": true, + "isReference": true + } + ] + }, + { + "name": "JobPriorized", + "isAbstract": true, + "extends": ["bpmn:Process", "flowable:AsyncCapable"], + "properties": [ + { + "name": "jobPriority", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "SignalEventDefinition", + "isAbstract": true, + "extends": ["bpmn:SignalEventDefinition"], + "properties": [ + { + "name": "async", + "isAttr": true, + "type": "Boolean", + "default": false + } + ] + }, + { + "name": "ErrorEventDefinition", + "isAbstract": true, + "extends": ["bpmn:ErrorEventDefinition"], + "properties": [ + { + "name": "errorCodeVariable", + "isAttr": true, + "type": "String" + }, + { + "name": "errorMessageVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Error", + "isAbstract": true, + "extends": ["bpmn:Error"], + "properties": [ + { + "name": "flowable:errorMessage", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "PotentialStarter", + "superClass": ["Element"], + "properties": [ + { + "name": "resourceAssignmentExpression", + "type": "bpmn:ResourceAssignmentExpression" + } + ] + }, + { + "name": "UserTask", + "isAbstract": true, + "extends": ["bpmn:UserTask"], + "properties": [ + { + "name": "timerEventDefinition", + "type": "Expression" + }, + { + "name": "multiInstanceLoopCharacteristics", + "type": "MultiInstanceLoopCharacteristics" + } + ] + }, + { + "name": "StartEvent", + "isAbstract": true, + "extends": ["bpmn:StartEvent"], + "properties": [ + { + "name": "timerEventDefinition", + "type": "Expression" + } + ] + }, + { + "name": "FormSupported", + "isAbstract": true, + "extends": ["bpmn:StartEvent", "bpmn:UserTask"], + "properties": [ + { + "name": "formHandlerClass", + "isAttr": true, + "type": "String" + }, + { + "name": "formKey", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "TemplateSupported", + "isAbstract": true, + "extends": ["bpmn:Process", "bpmn:FlowElement"], + "properties": [ + { + "name": "modelerTemplate", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Initiator", + "isAbstract": true, + "extends": ["bpmn:StartEvent"], + "properties": [ + { + "name": "initiator", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "ScriptTask", + "isAbstract": true, + "extends": ["bpmn:ScriptTask"], + "properties": [ + { + "name": "resultVariable", + "isAttr": true, + "type": "String" + }, + { + "name": "resource", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Process", + "isAbstract": true, + "extends": ["bpmn:Process"], + "properties": [ + { + "name": "candidateStarterGroups", + "isAttr": true, + "type": "String" + }, + { + "name": "candidateStarterUsers", + "isAttr": true, + "type": "String" + }, + { + "name": "versionTag", + "isAttr": true, + "type": "String" + }, + { + "name": "historyTimeToLive", + "isAttr": true, + "type": "String" + }, + { + "name": "isStartableInTasklist", + "isAttr": true, + "type": "Boolean", + "default": true + } + ] + }, + { + "name": "EscalationEventDefinition", + "isAbstract": true, + "extends": ["bpmn:EscalationEventDefinition"], + "properties": [ + { + "name": "escalationCodeVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "FormalExpression", + "isAbstract": true, + "extends": ["bpmn:FormalExpression"], + "properties": [ + { + "name": "resource", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Assignable", + "extends": ["bpmn:UserTask"], + "properties": [ + { + "name": "candidateGroups", + "isAttr": true, + "type": "String" + }, + { + "name": "dueDate", + "isAttr": true, + "type": "String" + }, + { + "name": "followUpDate", + "isAttr": true, + "type": "String" + }, + { + "name": "priority", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "CallActivity", + "extends": ["bpmn:CallActivity"], + "properties": [ + { + "name": "calledElementBinding", + "isAttr": true, + "type": "String", + "default": "latest" + }, + { + "name": "calledElementVersion", + "isAttr": true, + "type": "String" + }, + { + "name": "calledElementVersionTag", + "isAttr": true, + "type": "String" + }, + { + "name": "calledElementTenantId", + "isAttr": true, + "type": "String" + }, + { + "name": "caseRef", + "isAttr": true, + "type": "String" + }, + { + "name": "caseBinding", + "isAttr": true, + "type": "String", + "default": "latest" + }, + { + "name": "caseVersion", + "isAttr": true, + "type": "String" + }, + { + "name": "caseTenantId", + "isAttr": true, + "type": "String" + }, + { + "name": "variableMappingClass", + "isAttr": true, + "type": "String" + }, + { + "name": "variableMappingDelegateExpression", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "ServiceTaskLike", + "extends": [ + "bpmn:ServiceTask", + "bpmn:BusinessRuleTask", + "bpmn:SendTask", + "bpmn:MessageEventDefinition" + ], + "properties": [ + { + "name": "expression", + "isAttr": true, + "type": "String" + }, + { + "name": "class", + "isAttr": true, + "type": "String" + }, + { + "name": "delegateExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "resultVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "ExclusiveGateway", + "isAbstract": true, + "extends": ["bpmn:ExclusiveGateway"], + "properties": [ + { + "name": "serviceClass", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "DmnCapable", + "extends": ["bpmn:BusinessRuleTask"], + "properties": [ + { + "name": "decisionRef", + "isAttr": true, + "type": "String" + }, + { + "name": "decisionRefBinding", + "isAttr": true, + "type": "String", + "default": "latest" + }, + { + "name": "decisionRefVersion", + "isAttr": true, + "type": "String" + }, + { + "name": "mapDecisionResult", + "isAttr": true, + "type": "String", + "default": "resultList" + }, + { + "name": "decisionRefTenantId", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "ExternalCapable", + "extends": ["flowable:ServiceTaskLike"], + "properties": [ + { + "name": "type", + "isAttr": true, + "type": "String" + }, + { + "name": "topic", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "TaskPriorized", + "extends": ["bpmn:Process", "flowable:ExternalCapable"], + "properties": [ + { + "name": "taskPriority", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Properties", + "superClass": ["Element"], + "meta": { + "allowedIn": ["*"] + }, + "properties": [ + { + "name": "values", + "type": "Property", + "isMany": true + } + ] + }, + { + "name": "Property", + "superClass": ["Element"], + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "name", + "type": "String", + "isAttr": true + }, + { + "name": "value", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "Connector", + "superClass": ["Element"], + "meta": { + "allowedIn": ["flowable:ServiceTaskLike"] + }, + "properties": [ + { + "name": "inputOutput", + "type": "InputOutput" + }, + { + "name": "connectorId", + "type": "String" + } + ] + }, + { + "name": "InputOutput", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:FlowNode", "flowable:Connector"] + }, + "properties": [ + { + "name": "inputOutput", + "type": "InputOutput" + }, + { + "name": "connectorId", + "type": "String" + }, + { + "name": "inputParameters", + "isMany": true, + "type": "InputParameter" + }, + { + "name": "outputParameters", + "isMany": true, + "type": "OutputParameter" + } + ] + }, + { + "name": "InputOutputParameter", + "properties": [ + { + "name": "name", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + }, + { + "name": "definition", + "type": "InputOutputParameterDefinition" + } + ] + }, + { + "name": "InputOutputParameterDefinition", + "isAbstract": true + }, + { + "name": "List", + "superClass": ["InputOutputParameterDefinition"], + "properties": [ + { + "name": "items", + "isMany": true, + "type": "InputOutputParameterDefinition" + } + ] + }, + { + "name": "Map", + "superClass": ["InputOutputParameterDefinition"], + "properties": [ + { + "name": "entries", + "isMany": true, + "type": "Entry" + } + ] + }, + { + "name": "Entry", + "properties": [ + { + "name": "key", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + }, + { + "name": "definition", + "type": "InputOutputParameterDefinition" + } + ] + }, + { + "name": "Value", + "superClass": ["InputOutputParameterDefinition"], + "properties": [ + { + "name": "id", + "isAttr": true, + "type": "String" + }, + { + "name": "name", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + } + ] + }, + { + "name": "Script", + "superClass": ["InputOutputParameterDefinition"], + "properties": [ + { + "name": "scriptFormat", + "isAttr": true, + "type": "String" + }, + { + "name": "resource", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + } + ] + }, + { + "name": "Field", + "superClass": ["Element"], + "meta": { + "allowedIn": [ + "flowable:ServiceTaskLike", + "flowable:ExecutionListener", + "flowable:TaskListener" + ] + }, + "properties": [ + { + "name": "name", + "isAttr": true, + "type": "String" + }, + { + "name": "expression", + "isAttr": true, + "type": "expression" + }, + { + "name": "string", + "type": "string" + }, + { + "name": "stringValue", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "string", + "superClass": ["Element"], + "meta": { + "allowedIn": [ + "flowable:Field" + ] + }, + "properties": [ + { + "name": "body", + "isBody": true, + "type": "String" + } + ] + }, + { + "name": "expression", + "superClass": ["Element"], + "meta": { + "allowedIn": [ + "flowable:Field" + ] + }, + "properties": [ + { + "name": "body", + "isBody": true, + "type": "String" + } + ] + }, + { + "name": "InputParameter", + "superClass": ["InputOutputParameter"] + }, + { + "name": "OutputParameter", + "superClass": ["InputOutputParameter"] + }, + { + "name": "Collectable", + "isAbstract": true, + "extends": ["bpmn:MultiInstanceLoopCharacteristics"], + "superClass": ["flowable:AsyncCapable"], + "properties": [ + { + "name": "collection", + "isAttr": true, + "type": "String" + }, + { + "name": "elementVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "SequenceFlow", + "superClass": ["FlowElement"], + "properties": [ + { + "name": "isImmediate", + "isAttr": true, + "type": "Boolean" + }, + { + "name": "conditionExpression", + "type": "Expression" + }, + { + "name": "sourceRef", + "type": "FlowNode", + "isAttr": true, + "isReference": true + }, + { + "name": "targetRef", + "type": "FlowNode", + "isAttr": true, + "isReference": true + } + ] + }, + { + "name": "MultiInstanceLoopCharacteristics", + "superClass": ["LoopCharacteristics"], + "properties": [ + { + "name": "isSequential", + "default": false, + "isAttr": true, + "type": "Boolean" + }, + { + "name": "behavior", + "type": "MultiInstanceBehavior", + "default": "All", + "isAttr": true + }, + { + "name": "loopCardinality", + "type": "Expression", + "xml": { + "serialize": "xsi:type" + } + }, + { + "name": "loopDataInputRef", + "type": "ItemAwareElement", + "isReference": true + }, + { + "name": "loopDataOutputRef", + "type": "ItemAwareElement", + "isReference": true + }, + { + "name": "inputDataItem", + "type": "DataInput", + "xml": { + "serialize": "property" + } + }, + { + "name": "outputDataItem", + "type": "DataOutput", + "xml": { + "serialize": "property" + } + }, + { + "name": "complexBehaviorDefinition", + "type": "ComplexBehaviorDefinition", + "isMany": true + }, + { + "name": "completionCondition", + "type": "Expression", + "xml": { + "serialize": "xsi:type" + } + }, + { + "name": "oneBehaviorEventRef", + "type": "EventDefinition", + "isAttr": true, + "isReference": true + }, + { + "name": "noneBehaviorEventRef", + "type": "EventDefinition", + "isAttr": true, + "isReference": true + } + ] + }, + { + "name": "FailedJobRetryTimeCycle", + "superClass": ["Element"], + "meta": { + "allowedIn": ["flowable:AsyncCapable", "bpmn:MultiInstanceLoopCharacteristics"] + }, + "properties": [ + { + "name": "body", + "isBody": true, + "type": "String" + } + ] + }, + { + "name": "ExecutionListener", + "superClass": ["Element"], + "meta": { + "allowedIn": [ + "bpmn:Task", + "bpmn:ServiceTask", + "bpmn:UserTask", + "bpmn:BusinessRuleTask", + "bpmn:ScriptTask", + "bpmn:ReceiveTask", + "bpmn:ManualTask", + "bpmn:ExclusiveGateway", + "bpmn:SequenceFlow", + "bpmn:ParallelGateway", + "bpmn:InclusiveGateway", + "bpmn:EventBasedGateway", + "bpmn:StartEvent", + "bpmn:IntermediateCatchEvent", + "bpmn:IntermediateThrowEvent", + "bpmn:EndEvent", + "bpmn:BoundaryEvent", + "bpmn:CallActivity", + "bpmn:SubProcess", + "bpmn:Process" + ] + }, + "properties": [ + { + "name": "expression", + "isAttr": true, + "type": "String" + }, + { + "name": "class", + "isAttr": true, + "type": "String" + }, + { + "name": "delegateExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "event", + "isAttr": true, + "type": "String" + }, + { + "name": "script", + "type": "Script" + }, + { + "name": "fields", + "type": "Field", + "isMany": true + } + ] + }, + { + "name": "TaskListener", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:UserTask"] + }, + "properties": [ + { + "name": "expression", + "isAttr": true, + "type": "String" + }, + { + "name": "class", + "isAttr": true, + "type": "String" + }, + { + "name": "delegateExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "event", + "isAttr": true, + "type": "String" + }, + { + "name": "script", + "type": "Script" + }, + { + "name": "fields", + "type": "Field", + "isMany": true + } + ] + }, + { + "name": "FormProperty", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:StartEvent", "bpmn:UserTask"] + }, + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "name", + "type": "String", + "isAttr": true + }, + { + "name": "type", + "type": "String", + "isAttr": true + }, + { + "name": "required", + "type": "String", + "isAttr": true + }, + { + "name": "readable", + "type": "String", + "isAttr": true + }, + { + "name": "writable", + "type": "String", + "isAttr": true + }, + { + "name": "variable", + "type": "String", + "isAttr": true + }, + { + "name": "expression", + "type": "String", + "isAttr": true + }, + { + "name": "datePattern", + "type": "String", + "isAttr": true + }, + { + "name": "default", + "type": "String", + "isAttr": true + }, + { + "name": "values", + "type": "Value", + "isMany": true + } + ] + }, + { + "name": "FormData", + "superClass": ["Element"], + "meta": { + "allowedIn": ["bpmn:StartEvent", "bpmn:UserTask"] + }, + "properties": [ + { + "name": "fields", + "type": "FormField", + "isMany": true + }, + { + "name": "businessKey", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "FormField", + "superClass": ["Element"], + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "label", + "type": "String", + "isAttr": true + }, + { + "name": "type", + "type": "String", + "isAttr": true + }, + { + "name": "datePattern", + "type": "String", + "isAttr": true + }, + { + "name": "defaultValue", + "type": "String", + "isAttr": true + }, + { + "name": "properties", + "type": "Properties" + }, + { + "name": "validation", + "type": "Validation" + }, + { + "name": "values", + "type": "Value", + "isMany": true + } + ] + }, + { + "name": "Validation", + "superClass": ["Element"], + "properties": [ + { + "name": "constraints", + "type": "Constraint", + "isMany": true + } + ] + }, + { + "name": "Constraint", + "superClass": ["Element"], + "properties": [ + { + "name": "name", + "type": "String", + "isAttr": true + }, + { + "name": "config", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "ConditionalEventDefinition", + "isAbstract": true, + "extends": ["bpmn:ConditionalEventDefinition"], + "properties": [ + { + "name": "variableName", + "isAttr": true, + "type": "String" + }, + { + "name": "variableEvent", + "isAttr": true, + "type": "String" + } + ] + } + ], + "emumerations": [] + } diff --git a/anrui-scm/anrui-scm-ui/src/views/Process/flowable/init.js b/anrui-scm/anrui-scm-ui/src/views/Process/flowable/init.js new file mode 100644 index 0000000000..ec9e282d8c --- /dev/null +++ b/anrui-scm/anrui-scm-ui/src/views/Process/flowable/init.js @@ -0,0 +1,24 @@ + +function randomStr() { + return Math.random().toString(36).slice(-8) +} + +export default function() { + return ` + + + + + + + + + + + + + + + + ` +} diff --git a/anrui-scm/anrui-scm-ui/src/views/Process/flowable/showConfig.js b/anrui-scm/anrui-scm-ui/src/views/Process/flowable/showConfig.js new file mode 100644 index 0000000000..69ba83e516 --- /dev/null +++ b/anrui-scm/anrui-scm-ui/src/views/Process/flowable/showConfig.js @@ -0,0 +1,55 @@ +export default { + 'bpmn:EndEvent': {}, + 'bpmn:StartEvent': { + initiator: true, + formKey: true + }, + 'bpmn:UserTask': { + userType: true, + dataType: true, + assignee: true, + candidateUsers: true, + candidateGroups: true, + // assigneeFixed: true, + // candidateUsersFixed: true, + // candidateGroupsFixed: true, + async: true, + priority: true, + formKey: true, + skipExpression: true, + dueDate: true, + taskListener: true + }, + 'bpmn:ServiceTask': { + async: true, + skipExpression: true, + isForCompensation: true, + triggerable: true, + class: true + }, + 'bpmn:ScriptTask': { + async: true, + isForCompensation: true, + autoStoreVariables: true + }, + 'bpmn:ManualTask': { + async: true, + isForCompensation: true + }, + 'bpmn:ReceiveTask': { + async: true, + isForCompensation: true + }, + 'bpmn:SendTask': { + async: true, + isForCompensation: true + }, + 'bpmn:BusinessRuleTask': { + async: true, + isForCompensation: true, + ruleVariablesInput: true, + rules: true, + resultVariable: true, + exclude: true + } +} diff --git a/anrui-scm/anrui-scm-ui/src/views/Process/index.js b/anrui-scm/anrui-scm-ui/src/views/Process/index.js new file mode 100644 index 0000000000..f78489d22c --- /dev/null +++ b/anrui-scm/anrui-scm-ui/src/views/Process/index.js @@ -0,0 +1,5 @@ +import workflowBpmnModeler from './index.vue' + +workflowBpmnModeler.install = Vue => Vue.component(workflowBpmnModeler.name, workflowBpmnModeler) // 给组件配置install方法 + +export default workflowBpmnModeler diff --git a/anrui-scm/anrui-scm-ui/src/views/Process/index.vue b/anrui-scm/anrui-scm-ui/src/views/Process/index.vue new file mode 100644 index 0000000000..fd40e3658c --- /dev/null +++ b/anrui-scm/anrui-scm-ui/src/views/Process/index.vue @@ -0,0 +1,467 @@ + + + + + diff --git a/anrui-scm/anrui-scm-ui/src/views/Process/lang/zh.js b/anrui-scm/anrui-scm-ui/src/views/Process/lang/zh.js new file mode 100644 index 0000000000..003c0cc522 --- /dev/null +++ b/anrui-scm/anrui-scm-ui/src/views/Process/lang/zh.js @@ -0,0 +1,227 @@ +export default { + // Labels + 'Activate the global connect tool': '激活全局连接工具', + 'Append {type}': '添加 {type}', + 'Add Lane above': '在上面添加道', + 'Divide into two Lanes': '分割成两个道', + 'Divide into three Lanes': '分割成三个道', + 'Add Lane below': '在下面添加道', + 'Append compensation activity': '追加补偿活动', + 'Change type': '修改类型', + 'Connect using Association': '使用关联连接', + 'Connect using Sequence/MessageFlow or Association': '使用顺序/消息流或者关联连接', + 'Connect using DataInputAssociation': '使用数据输入关联连接', + 'Remove': '移除', + 'Activate the hand tool': '激活抓手工具', + 'Activate the lasso tool': '激活套索工具', + 'Activate the create/remove space tool': '激活创建/删除空间工具', + 'Create expanded SubProcess': '创建扩展子过程', + 'Create IntermediateThrowEvent/BoundaryEvent': '创建中间抛出事件/边界事件', + 'Create Pool/Participant': '创建池/参与者', + 'Parallel Multi Instance': '并行多重事件', + 'Sequential Multi Instance': '时序多重事件', + 'DataObjectReference': '数据对象参考', + 'DataStoreReference': '数据存储参考', + 'Loop': '循环', + 'Ad-hoc': '即席', + 'Create {type}': '创建 {type}', + 'Task': '任务', + 'Send Task': '发送任务', + 'Receive Task': '接收任务', + 'User Task': '用户任务', + 'Manual Task': '手工任务', + 'Business Rule Task': '业务规则任务', + 'Service Task': '服务任务', + 'Script Task': '脚本任务', + 'Call Activity': '调用活动', + 'Sub Process (collapsed)': '子流程(折叠的)', + 'Sub Process (expanded)': '子流程(展开的)', + 'Start Event': '开始事件', + 'StartEvent': '开始事件', + 'Intermediate Throw Event': '中间事件', + 'End Event': '结束事件', + 'EndEvent': '结束事件', + 'Create Gateway': '创建网关', + 'Create Intermediate/Boundary Event': '创建中间/边界事件', + 'Message Start Event': '消息开始事件', + 'Timer Start Event': '定时开始事件', + 'Conditional Start Event': '条件开始事件', + 'Signal Start Event': '信号开始事件', + 'Error Start Event': '错误开始事件', + 'Escalation Start Event': '升级开始事件', + 'Compensation Start Event': '补偿开始事件', + 'Message Start Event (non-interrupting)': '消息开始事件(非中断)', + 'Timer Start Event (non-interrupting)': '定时开始事件(非中断)', + 'Conditional Start Event (non-interrupting)': '条件开始事件(非中断)', + 'Signal Start Event (non-interrupting)': '信号开始事件(非中断)', + 'Escalation Start Event (non-interrupting)': '升级开始事件(非中断)', + 'Message Intermediate Catch Event': '消息中间捕获事件', + 'Message Intermediate Throw Event': '消息中间抛出事件', + 'Timer Intermediate Catch Event': '定时中间捕获事件', + 'Escalation Intermediate Throw Event': '升级中间抛出事件', + 'Conditional Intermediate Catch Event': '条件中间捕获事件', + 'Link Intermediate Catch Event': '链接中间捕获事件', + 'Link Intermediate Throw Event': '链接中间抛出事件', + 'Compensation Intermediate Throw Event': '补偿中间抛出事件', + 'Signal Intermediate Catch Event': '信号中间捕获事件', + 'Signal Intermediate Throw Event': '信号中间抛出事件', + 'Message End Event': '消息结束事件', + 'Escalation End Event': '定时结束事件', + 'Error End Event': '错误结束事件', + 'Cancel End Event': '取消结束事件', + 'Compensation End Event': '补偿结束事件', + 'Signal End Event': '信号结束事件', + 'Terminate End Event': '终止结束事件', + 'Message Boundary Event': '消息边界事件', + 'Message Boundary Event (non-interrupting)': '消息边界事件(非中断)', + 'Timer Boundary Event': '定时边界事件', + 'Timer Boundary Event (non-interrupting)': '定时边界事件(非中断)', + 'Escalation Boundary Event': '升级边界事件', + 'Escalation Boundary Event (non-interrupting)': '升级边界事件(非中断)', + 'Conditional Boundary Event': '条件边界事件', + 'Conditional Boundary Event (non-interrupting)': '条件边界事件(非中断)', + 'Error Boundary Event': '错误边界事件', + 'Cancel Boundary Event': '取消边界事件', + 'Signal Boundary Event': '信号边界事件', + 'Signal Boundary Event (non-interrupting)': '信号边界事件(非中断)', + 'Compensation Boundary Event': '补偿边界事件', + 'Exclusive Gateway': '互斥网关', + 'Parallel Gateway': '并行网关', + 'Inclusive Gateway': '相容网关', + 'Complex Gateway': '复杂网关', + 'Event based Gateway': '事件网关', + 'Transaction': '转运', + 'Sub Process': '子流程', + 'Event Sub Process': '事件子流程', + 'Collapsed Pool': '折叠池', + 'Expanded Pool': '展开池', + // Errors + 'no parent for {element} in {parent}': '在{parent}里,{element}没有父类', + 'no shape type specified': '没有指定的形状类型', + 'flow elements must be children of pools/participants': '流元素必须是池/参与者的子类', + 'out of bounds release': 'out of bounds release', + 'more than {count} child lanes': '子道大于{count} ', + 'element required': '元素不能为空', + 'diagram not part of bpmn:Definitions': '流程图不符合bpmn规范', + 'no diagram to display': '没有可展示的流程图', + 'no process or collaboration to display': '没有可展示的流程/协作', + 'element {element} referenced by {referenced}#{property} not yet drawn': '由{referenced}#{property}引用的{element}元素仍未绘制', + 'already rendered {element}': '{element} 已被渲染', + 'failed to import {element}': '导入{element}失败', + // 属性面板的参数 + 'Id': '标识', + 'Name': '名称', + 'General': '常规', + 'Details': '详情', + 'Message Name': '消息名称', + 'Message': '消息', + 'Initiator': '创建者', + 'Asynchronous Continuations': '持续异步', + 'Asynchronous Before': '异步前', + 'Asynchronous After': '异步后', + 'Job Configuration': '工作配置', + 'Exclusive': '排除', + 'Job Priority': '工作优先级', + 'Retry Time Cycle': '重试时间周期', + 'Documentation': '文档', + 'Element Documentation': '元素文档', + 'History Configuration': '历史配置', + 'History Time To Live': '历史的生存时间', + 'Forms': '表单', + 'Form Key': '表单key', + 'Form Fields': '表单字段', + 'Business Key': '业务key', + 'Form Field': '表单字段', + 'ID': '编号', + 'Type': '类型', + 'Label': '名称', + 'Default Value': '默认值', + 'Validation': '校验', + 'Add Constraint': '添加约束', + 'Config': '配置', + 'Properties': '属性', + 'Add Property': '添加属性', + 'Value': '值', + 'Listeners': '监听器', + 'Execution Listener': '执行监听', + 'Event Type': '事件类型', + 'Listener Type': '监听器类型', + 'Java Class': 'Java类', + 'Expression': '表达式', + 'Must provide a value': '必须提供一个值', + 'Delegate Expression': '代理表达式', + 'Script': '脚本', + 'Script Format': '脚本格式', + 'Script Type': '脚本类型', + 'Inline Script': '内联脚本', + 'External Script': '外部脚本', + 'Resource': '资源', + 'Field Injection': '字段注入', + 'Extensions': '扩展', + 'Input/Output': '输入/输出', + 'Input Parameters': '输入参数', + 'Output Parameters': '输出参数', + 'Parameters': '参数', + 'Output Parameter': '输出参数', + 'Timer Definition Type': '定时器定义类型', + 'Timer Definition': '定时器定义', + 'Date': '日期', + 'Duration': '持续', + 'Cycle': '循环', + 'Signal': '信号', + 'Signal Name': '信号名称', + 'Escalation': '升级', + 'Error': '错误', + 'Link Name': '链接名称', + 'Condition': '条件名称', + 'Variable Name': '变量名称', + 'Variable Event': '变量事件', + 'Specify more than one variable change event as a comma separated list.': '多个变量事件以逗号隔开', + 'Wait for Completion': '等待完成', + 'Activity Ref': '活动参考', + 'Version Tag': '版本标签', + 'Executable': '可执行文件', + 'External Task Configuration': '扩展任务配置', + 'Task Priority': '任务优先级', + 'External': '外部', + 'Connector': '连接器', + 'Must configure Connector': '必须配置连接器', + 'Connector Id': '连接器编号', + 'Implementation': '实现方式', + 'Field Injections': '字段注入', + 'Fields': '字段', + 'Result Variable': '结果变量', + 'Topic': '主题', + 'Configure Connector': '配置连接器', + 'Input Parameter': '输入参数', + 'Assignee': '代理人', + 'Candidate Users': '候选用户', + 'Candidate Groups': '候选组', + 'Due Date': '到期时间', + 'Follow Up Date': '跟踪日期', + 'Priority': '优先级', + 'The follow up date as an EL expression (e.g. ${someDate} or an ISO date (e.g. 2015-06-26T09:54:00)': '跟踪日期必须符合EL表达式,如: ${someDate} ,或者一个ISO标准日期,如:2015-06-26T09:54:00', + 'The due date as an EL expression (e.g. ${someDate} or an ISO date (e.g. 2015-06-26T09:54:00)': '跟踪日期必须符合EL表达式,如: ${someDate} ,或者一个ISO标准日期,如:2015-06-26T09:54:00', + 'Variables': '变量' +} + +export const NodeName = { + 'bpmn:Process': '流程', + 'bpmn:StartEvent': '开始事件', + 'bpmn:IntermediateThrowEvent': '中间事件', + 'bpmn:Task': '任务', + 'bpmn:SendTask': '发送任务', + 'bpmn:ReceiveTask': '接收任务', + 'bpmn:UserTask': '用户任务', + 'bpmn:ManualTask': '手工任务', + 'bpmn:BusinessRuleTask': '业务规则任务', + 'bpmn:ServiceTask': '服务任务', + 'bpmn:ScriptTask': '脚本任务', + 'bpmn:EndEvent': '结束事件', + 'bpmn:SequenceFlow': '流程线', + 'bpmn:ExclusiveGateway': '互斥网关', + 'bpmn:ParallelGateway': '并行网关', + 'bpmn:InclusiveGateway': '相容网关', + 'bpmn:ComplexGateway': '复杂网关', + 'bpmn:EventBasedGateway': '事件网关' +} diff --git a/anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/baseoutsourcingapplicationAdd.vue b/anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/baseoutsourcingapplicationAdd.vue index e2d351fd8a..3e5dee2048 100644 --- a/anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/baseoutsourcingapplicationAdd.vue +++ b/anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/baseoutsourcingapplicationAdd.vue @@ -165,6 +165,45 @@ + + + + 当前环节 + + {{firstNode.name}}->{{ nextNode.name }} + + + + + 下一步处理人 + + {{this.userName}} 选择 + + +
+ 确 定 + 取 消 +
+
+
+ + + + 选择动作 + + + {{ item.name }} + + + + + diff --git a/anrui-system-ui/src/views/flow/todoList.vue b/anrui-system-ui/src/views/flow/todoList.vue index 98f1ce724b..a7b987d289 100644 --- a/anrui-system-ui/src/views/flow/todoList.vue +++ b/anrui-system-ui/src/views/flow/todoList.vue @@ -34,10 +34,10 @@ - + @@ -50,12 +50,12 @@ {{scope.row.procDefName}} - + - + @@ -65,7 +65,7 @@ {{scope.row.startDeptName}} - + @@ -94,14 +94,13 @@ title="" :visible.sync="centerDialogVisible" width="78%" - height="80%" + height="1%" :before-close="closeIt" center> - - + @@ -209,7 +208,6 @@ import {getStorage} from "@/utils/auth"; import {flowRecord} from "@/api/workflow/finished"; import {loginDetails} from "@/api/user" - export default { name: "", components: { @@ -217,6 +215,7 @@ }, data() { return { + dialogHeight:'80%', centerDialogVisible: false, // 弹框 editDialog: false, flowRecordList: [], @@ -238,6 +237,7 @@ instanceId: '', taskId: '', userSid: '', + taskDefKey: '' }, regectList: { // 驳回列表 businessSid: '', @@ -270,6 +270,11 @@ } } }, + mounted() { + // 在外部vue的window上添加postMessage的监听,而且绑定处理函数handleMessage + window.addEventListener('message', this.handleMessage) + }, + created() { // 加载列表 // this.getList() @@ -293,6 +298,19 @@ } }, methods: { + setIframeHeight(iframe) { + iframe.height = this.dialogHeight;//iframeWin.document.documentElement.scrollHeight || iframeWin.document.body.scrollHeight; + }, + async handleMessage (event) { + var code= event.data.params.code; + if(code==1){ + this.init() + this.centerDialogVisible=false + }else if(code==2){ + this.dialogHeight = event.data.params.data + this.setIframeHeight(document.getElementById('iframe')); + } + }, init() { var token = getStorage(); loginDetails(token).then((response) => { @@ -302,7 +320,6 @@ this.regectList.userSid = this.loginInfo.sid this.stopList.userSid = this.loginInfo.sid this.listQuery.params.userSid = this.loginInfo.sid - console.log('8888', this.loginInfo) this.getList() } }); @@ -315,6 +332,7 @@ this.agreeList.businessSid = row.processVariables.businessSid this.agreeList.instanceId = row.procInsId this.agreeList.taskId = row.taskId + this.agreeList.taskDefKey = row.taskDefKey // 驳回 this.regectList.businessSid = row.processVariables.businessSid this.regectList.instanceId = row.procInsId @@ -331,6 +349,8 @@ instanceId: row.procInsId, taskId: row.taskId, taskName: row.taskName, + deployId: row.deployId, + taskDefKey: row.taskDefKey, transactState: '00' // 待办任务状态 } selectUrl(this.selectUrl_list).then((response) => {