From c928773ab35e9a4838d66d3b45e85707c23dfaa0 Mon Sep 17 00:00:00 2001 From: jzq <1391797124@qq.com> Date: Sat, 13 Jul 2024 18:09:38 +0800 Subject: [PATCH] update handbook --- .../workflow/WfProcessController.java | 15 + .../ruoyi/workflow/domain/vo/WfDetailVo.java | 5 + .../service/impl/WfProcessServiceImpl.java | 1 + ruoyi-ui/src/api/workflow/process.js | 8 + .../src/views/scientific/handbook_apply.vue | 2 +- .../src/views/scientific/handbook_query.vue | 260 +++++++++--------- 6 files changed, 157 insertions(+), 134 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/workflow/WfProcessController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/workflow/WfProcessController.java index bac2a84..996d00e 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/workflow/WfProcessController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/workflow/WfProcessController.java @@ -17,13 +17,17 @@ import com.ruoyi.workflow.service.IWfCopyService; import com.ruoyi.workflow.service.IWfProcessService; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.springframework.data.domain.Page; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; +import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; + /** * 工作流流程管理 * @@ -245,4 +249,15 @@ public class WfProcessController extends BaseController { public R detail(String procInsId, String taskId) { return R.ok(processService.queryProcessDetail(procInsId, taskId)); } + + @PostMapping("/details") + public TableDataInfo details(@RequestBody List procInsIds) { + List processDetails = new ArrayList<>(); + for (int i = 0; i < procInsIds.size(); i++) { + String procInsId = procInsIds.get(i); + WfDetailVo detailVo = processService.queryProcessDetail(procInsId, null); + processDetails.add(detailVo); + } + return TableDataInfo.build(processDetails); + } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/workflow/domain/vo/WfDetailVo.java b/ruoyi-system/src/main/java/com/ruoyi/workflow/domain/vo/WfDetailVo.java index aba1548..a1ebe00 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/workflow/domain/vo/WfDetailVo.java +++ b/ruoyi-system/src/main/java/com/ruoyi/workflow/domain/vo/WfDetailVo.java @@ -37,6 +37,11 @@ public class WfDetailVo { private WfViewerVo flowViewer; + /** + * zqjia: 新增字段,流程实例ID,和项目申报关联用 + */ + private String procInsId; + /** * 是否存在任务表单信息 * @return true:存在;false:不存在 diff --git a/ruoyi-system/src/main/java/com/ruoyi/workflow/service/impl/WfProcessServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/workflow/service/impl/WfProcessServiceImpl.java index 5c0d300..e965e94 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/workflow/service/impl/WfProcessServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/workflow/service/impl/WfProcessServiceImpl.java @@ -734,6 +734,7 @@ public class WfProcessServiceImpl extends FlowServiceFactory implements IWfProce detailVo.setHistoryProcNodeList(historyProcNodeList(historicProcIns)); detailVo.setProcessFormList(processFormList(bpmnModel, historicProcIns)); detailVo.setFlowViewer(getFlowViewer(bpmnModel, procInsId)); + detailVo.setProcInsId(procInsId); return detailVo; } diff --git a/ruoyi-ui/src/api/workflow/process.js b/ruoyi-ui/src/api/workflow/process.js index a1c2e19..de95716 100644 --- a/ruoyi-ui/src/api/workflow/process.js +++ b/ruoyi-ui/src/api/workflow/process.js @@ -51,6 +51,14 @@ export function detailProcess(query) { }) } +export function detailProcesses(arr) { + return request({ + url: '/workflow/process/details', + method: 'post', + data: arr + }) +} + // 我的发起的流程 export function listOwnProcess(query) { return request({ diff --git a/ruoyi-ui/src/views/scientific/handbook_apply.vue b/ruoyi-ui/src/views/scientific/handbook_apply.vue index 0a195ba..4c5fc43 100644 --- a/ruoyi-ui/src/views/scientific/handbook_apply.vue +++ b/ruoyi-ui/src/views/scientific/handbook_apply.vue @@ -21,7 +21,7 @@ import { getProcessForm, startProcess } from '@/api/workflow/process' import Parser from '@/utils/generator/parser' export default { - name: 'WorkStart', + name: 'handbookApply', components: { Parser }, diff --git a/ruoyi-ui/src/views/scientific/handbook_query.vue b/ruoyi-ui/src/views/scientific/handbook_query.vue index 6f62d57..1d69a30 100644 --- a/ruoyi-ui/src/views/scientific/handbook_query.vue +++ b/ruoyi-ui/src/views/scientific/handbook_query.vue @@ -68,87 +68,39 @@ @click="handleExport" >导出 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + @@ -165,14 +117,21 @@