From 4d3f6652b7fac464e23cbd405e7276673964afa2 Mon Sep 17 00:00:00 2001 From: konbai <1527468660@qq.com> Date: Fri, 6 May 2022 01:02:03 +0800 Subject: [PATCH] =?UTF-8?q?fix=20--=20=E4=BF=AE=E6=94=B9=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E9=A1=B5=E9=9D=A2=E4=B8=BA=E5=85=A8=E5=B1=8F?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=EF=BC=88=E4=BF=9D=E5=AD=98=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E5=90=8E=E5=88=B7=E6=96=B0=E6=B5=81=E7=A8=8B=E5=88=97=E8=A1=A8?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../package/designer/ProcessDesigner.vue | 15 +- .../package/theme/process-designer.scss | 1 + .../views/workflow/definition/designer.vue | 175 +++++++++++++++--- .../src/views/workflow/definition/index.vue | 77 +++----- 4 files changed, 182 insertions(+), 86 deletions(-) diff --git a/ruoyi-ui/src/plugins/package/designer/ProcessDesigner.vue b/ruoyi-ui/src/plugins/package/designer/ProcessDesigner.vue index 253e1598..e2143109 100644 --- a/ruoyi-ui/src/plugins/package/designer/ProcessDesigner.vue +++ b/ruoyi-ui/src/plugins/package/designer/ProcessDesigner.vue @@ -4,7 +4,7 @@ @@ -320,16 +302,19 @@ import { getForm, addDeployForm ,listForm } from "@/api/workflow/form"; import { listCategory } from '@/api/workflow/category' import Parser from '@/utils/generator/parser' import ProcessViewer from '@/components/ProcessViewer' +import Designer from './designer' import { getToken } from "@/utils/auth"; export default { name: "Definition", components: { Parser, - ProcessViewer + ProcessViewer, + Designer }, data() { return { + isDesignerShow: false, // 遮罩层 loading: true, // 选中数组 @@ -345,11 +330,7 @@ export default { // 流程定义表格数据 definitionList: [], categoryOptions: [], - process: { - title: '', - open: false, - form: {} - }, + processForm: {}, publish: { open: false, loading: false, @@ -478,19 +459,6 @@ export default { this.single = selection.length !== 1 this.multiple = !selection.length }, - /** 跳转到流程设计页面 */ - handleLoadXml(row) { - this.process.open = false; - this.$router.push({ - path: '/definition/designer', - query: { - definitionId: row.definitionId, - processId: row.processKey, - processName: row.processName, - category: row.category - } - }) - }, handlePublish(row) { this.publishQueryParams.processKey = row.processKey; this.publish.open = true; @@ -575,18 +543,16 @@ export default { }, handleAdd() { const dateTime = new Date().getTime(); - this.process.title = '新增流程'; - this.process.form = { + this.processForm = { processKey: `Process_${dateTime}`, processName: `业务流程_${dateTime}` - }; - this.process.open = true; + } + this.isDesignerShow = true; }, - /** 修改按钮操作 */ - handleUpdate(row) { - this.process.title = '编辑流程'; - this.process.form = JSON.parse(JSON.stringify(row)); - this.process.open = true; + /** 设计按钮操作 */ + handleDesigner(row) { + this.processForm = JSON.parse(JSON.stringify(row)); + this.isDesignerShow = true; }, /** 删除按钮操作 */ handleDelete(row) { @@ -641,6 +607,9 @@ export default { }, categoryFormat(row, column) { return this.categoryOptions.find(k => k.code === row.category)?.categoryName ?? ''; + }, + submitSave() { + this.getList(); } } };