From 150b109af043258429f01cddb87bece42f3500a9 Mon Sep 17 00:00:00 2001 From: huangxing123 <568363508@qq.com> Date: Sat, 31 Aug 2024 14:57:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=B5=81=E7=A8=8B=E6=A0=87?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/WfProcessServiceImpl.java | 19 +++++++------------ ruoyi-ui/src/views/workflow/work/own.vue | 9 ++------- 2 files changed, 9 insertions(+), 19 deletions(-) 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 cdb0381..711f261 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 @@ -216,19 +216,14 @@ public class WfProcessServiceImpl extends FlowServiceFactory implements IWfProce // 查询任务节点参数,并转换成Map,目的是获取流程标题(新增于2024年2月29日) List collectors = historyService.createHistoricVariableInstanceQuery().processInstanceId(hisIns.getId()).list(); if(CollUtil.isNotEmpty(collectors)){ - taskVo.setProcVars(collectors.stream().collect(Collectors.toMap(HistoricVariableInstance::getVariableName, HistoricVariableInstance::getValue))); +// taskVo.setProcVars(collectors.stream().collect(Collectors.toMap(HistoricVariableInstance::getVariableName, HistoricVariableInstance::getValue))); + // 遍历表单属性并获取值 + collectors.stream().forEach(historicVariableInstance -> { + if (historicVariableInstance.getVariableName().equals("description")) { + taskVo.setProcVars(historicVariableInstance.getValue()); + } + }); } - /* Map collectors = historyService.createHistoricVariableInstanceQuery() - .processInstanceId(hisIns.getId()) - .list() - .stream() - .collect(Collectors.toMap(HistoricVariableInstance::getVariableName, HistoricVariableInstance::getValue)); - taskVo.setProcVars(collectors);*/ - /* List list = historyService.createHistoricVariableInstanceQuery() - .processInstanceId(hisIns.getId()) - .list(); - taskVo.setProcVars(list);*/ - taskVoList.add(taskVo); } page.setRecords(taskVoList); diff --git a/ruoyi-ui/src/views/workflow/work/own.vue b/ruoyi-ui/src/views/workflow/work/own.vue index 8bf4aff..0b42542 100644 --- a/ruoyi-ui/src/views/workflow/work/own.vue +++ b/ruoyi-ui/src/views/workflow/work/own.vue @@ -206,16 +206,11 @@ export default { this.loading = true; listOwnProcess(this.addDateRange(this.queryParams, this.dateRange)).then(response => { // console.log(5555,response.rows) - // this.ownProcessList = response.rows; - if(this.queryParams.description != null){ - this.ownProcessList = this.searchList(response.rows, this.queryParams.description); - }else { - this.ownProcessList =response.rows; - } + this.ownProcessList = response.rows; this.total = response.total; this.loading = false; }).catch((err) => { - console.log(4444,err) + // console.log(4444,err) }); },