From f0fb432504f2f875b5548c81b8f3c0f6de87c6eb Mon Sep 17 00:00:00 2001 From: hewenqiang <1527468660@qq.com> Date: Thu, 10 Feb 2022 11:10:49 +0800 Subject: [PATCH] =?UTF-8?q?fix=20--=20=E4=BF=AE=E5=A4=8D=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E5=9B=BE=E8=AE=BE=E8=AE=A1=E9=A1=B5=E9=9D=A2404=E4=BB=A5?= =?UTF-8?q?=E5=8F=8A=E6=98=BE=E7=A4=BA=E5=BC=82=E5=B8=B8bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../workflow/FlowDefinitionController.java | 2 +- .../service/impl/FlowTaskServiceImpl.java | 1 + ruoyi-ui/src/router/index.js | 39 +++++++++++++++++++ .../src/views/workflow/definition/index.vue | 2 +- .../src/views/workflow/task/process/index.vue | 1 + 5 files changed, 43 insertions(+), 2 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/workflow/FlowDefinitionController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/workflow/FlowDefinitionController.java index e95e26ef..822fc33e 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/workflow/FlowDefinitionController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/workflow/FlowDefinitionController.java @@ -93,7 +93,7 @@ public class FlowDefinitionController extends BaseController { @GetMapping("/readXml/{definitionId}") public R readXml(@ApiParam(value = "流程定义ID") @PathVariable(value = "definitionId") String definitionId) { try { - return R.ok(null, flowDefinitionService.readXml(definitionId)); + return R.ok(flowDefinitionService.readXml(definitionId), null); } catch (Exception e) { return R.fail("加载xml文件异常", null); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/workflow/service/impl/FlowTaskServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/workflow/service/impl/FlowTaskServiceImpl.java index f085ab9a..54084e1c 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/workflow/service/impl/FlowTaskServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/workflow/service/impl/FlowTaskServiceImpl.java @@ -445,6 +445,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask .processDefinitionId(hisIns.getProcessDefinitionId()) .singleResult(); flowTask.setDeployId(pd.getDeploymentId()); + flowTask.setProcDefId(hisIns.getProcessDefinitionId()); flowTask.setProcDefName(pd.getName()); flowTask.setProcDefVersion(pd.getVersion()); flowTask.setCategory(pd.getCategory()); diff --git a/ruoyi-ui/src/router/index.js b/ruoyi-ui/src/router/index.js index 3fb685d0..8382b7c7 100644 --- a/ruoyi-ui/src/router/index.js +++ b/ruoyi-ui/src/router/index.js @@ -74,6 +74,45 @@ export const constantRoutes = [ } ] }, + { + path: '/definition', + component: Layout, + hidden: true, + children: [ + { + path: 'designer', + component: () => import('@/views/workflow/definition/designer'), + name: 'WorkflowDesigner', + meta: { title: '流程设计', icon: '' } + } + ] + }, + { + path: '/task', + component: Layout, + hidden: true, + children: [ + { + path: 'record/index', + component: () => import('@/views/workflow/task/record/index'), + name: 'Record', + meta: { title: '流程处理', icon: '' } + } + ] + }, + { + path: '/tool', + component: Layout, + hidden: true, + children: [ + { + path: 'build/index', + component: () => import('@/views/tool/build/index'), + name: 'FormBuild', + meta: { title: '表单配置', icon: '' } + } + ] + }, { path: '/user', component: Layout, diff --git a/ruoyi-ui/src/views/workflow/definition/index.vue b/ruoyi-ui/src/views/workflow/definition/index.vue index dbb6b655..4bfadf8f 100644 --- a/ruoyi-ui/src/views/workflow/definition/index.vue +++ b/ruoyi-ui/src/views/workflow/definition/index.vue @@ -476,7 +476,7 @@ export default { handleLoadXml(row) { this.process.open = false; this.$router.push({ - path: '/definition/designer/index', + path: '/definition/designer', query: { definitionId: row.definitionId, processId: row.processKey, diff --git a/ruoyi-ui/src/views/workflow/task/process/index.vue b/ruoyi-ui/src/views/workflow/task/process/index.vue index 29e55f7b..684353ed 100644 --- a/ruoyi-ui/src/views/workflow/task/process/index.vue +++ b/ruoyi-ui/src/views/workflow/task/process/index.vue @@ -295,6 +295,7 @@ export default { handleFlowRecord(row){ this.$router.push({ path: '/task/record/index', query: { + definitionId: row.procDefId, procInsId: row.procInsId, deployId: row.deployId, taskId: row.taskId,