From 45ff381b7b08c3baa1f25190252137398fc61823 Mon Sep 17 00:00:00 2001 From: tony <846249920@qq.com> Date: Sun, 18 Apr 2021 00:29:20 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=B5=81=E7=A8=8B=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E6=8F=90=E4=BA=A4=E8=A1=A8=E5=8D=95=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E8=A7=A3=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/flowable/task/record/index.vue | 40 ++++++------------- 1 file changed, 12 insertions(+), 28 deletions(-) diff --git a/ruoyi-ui/src/views/flowable/task/record/index.vue b/ruoyi-ui/src/views/flowable/task/record/index.vue index 597d33c..c8b8db2 100644 --- a/ruoyi-ui/src/views/flowable/task/record/index.vue +++ b/ruoyi-ui/src/views/flowable/task/record/index.vue @@ -8,17 +8,12 @@ - -
- - - - -
-
+
+ +
-
+
@@ -39,7 +34,7 @@ - +
@@ -147,6 +142,7 @@ export default { formConf: {}, // 默认表单数据 formConfOpen: false, // 是否加载默认表单数据 variables: [], // 流程变量数据 + variablesData: {}, // 流程变量数据 variableOpen: false, // 是否加载流程变量数据 returnTaskList: [], // 回退列表数据 finished: false, @@ -228,7 +224,8 @@ export default { processVariables(taskId) { if (taskId) { getProcessVariables(taskId).then(res => { - this.variables = res.data.variables; + // this.variables = res.data.variables; + this.variablesData = res.data.variables; this.variableOpen = true }); const params = { @@ -288,25 +285,12 @@ export default { /** 申请流程表单数据提交 */ submitForm(data) { if (data) { - const variableList = []; - data.fields.forEach(item => { - let variableData = {}; - variableData.label = item.__config__.label - // 表单值为多个选项时 - if (item.__config__.defaultValue instanceof Array) { - const array = []; - item.__config__.defaultValue.forEach(val => { - array.push(val) - }) - variableData.val = array; - } else { - variableData.val = item.__config__.defaultValue - } - variableList.push(variableData) - }) + const formData = data; + formData.disabled = true; + formData.formBtns = false; if (this.taskForm.procDefId) { let variables = { - "variables": variableList + "variables": formData } // 启动流程并将表单数据加入流程变量 definitionStart(this.taskForm.procDefId, JSON.stringify(variables)).then(res => {