diff --git a/ruoyi-flowable/src/main/java/com/ruoyi/flowable/service/impl/FlowDefinitionServiceImpl.java b/ruoyi-flowable/src/main/java/com/ruoyi/flowable/service/impl/FlowDefinitionServiceImpl.java index b90aaea..cc75cd9 100644 --- a/ruoyi-flowable/src/main/java/com/ruoyi/flowable/service/impl/FlowDefinitionServiceImpl.java +++ b/ruoyi-flowable/src/main/java/com/ruoyi/flowable/service/impl/FlowDefinitionServiceImpl.java @@ -161,7 +161,7 @@ public class FlowDefinitionServiceImpl extends FlowServiceFactory implements IFl variables.put("skip", true); variables.put("INITIATOR",userId.toString()); variables.put("_FLOWABLE_SKIP_EXPRESSION_ENABLED", true); - ProcessInstance processInstance = runtimeService.startProcessInstanceById(procDefId, variables); + runtimeService.startProcessInstanceById(procDefId, variables); return AjaxResult.success("流程启动成功"); } catch (Exception e) { e.printStackTrace(); diff --git a/ruoyi-ui/src/components/parser/Parser.vue b/ruoyi-ui/src/components/parser/Parser.vue index b2f6279..b6b9944 100644 --- a/ruoyi-ui/src/components/parser/Parser.vue +++ b/ruoyi-ui/src/components/parser/Parser.vue @@ -175,13 +175,19 @@ export default { if (!valid) return false // 触发sumit事件 // this.$emit('submit', this[this.formConf.formModel]) - this.$emit('submit', this.formConfCopy) + const params = { + formData: this.formConfCopy, + valData: this[this.formConf.formModel] + } + this.$emit('submit', params) return true }) }, // 传值给父组件 getData(){ - this.$emit('getData',this.formConfCopy) + debugger + this.$emit('getData', this[this.formConf.formModel]) + // this.$emit('getData',this.formConfCopy) } }, render(h) { diff --git a/ruoyi-ui/src/views/flowable/task/record/index.vue b/ruoyi-ui/src/views/flowable/task/record/index.vue index ec35a5b..4b7c0c0 100644 --- a/ruoyi-ui/src/views/flowable/task/record/index.vue +++ b/ruoyi-ui/src/views/flowable/task/record/index.vue @@ -231,7 +231,6 @@ export default { getFlowRecordList(procInsId, deployId) { const params = {procInsId: procInsId, deployId: deployId} flowRecord(params).then(res => { - debugger this.flowRecordList = res.data.flowList; // 流程过程中不存在初始化表单 直接读取的流程变量众存储的表单值 if (res.data.formData) { @@ -330,14 +329,13 @@ export default { /** 申请流程表单数据提交 */ submitForm(data) { if (data) { - const formData = data; + const variables = data.valData; + const formData = data.formData; formData.disabled = true; formData.formBtns = false; if (this.taskForm.procDefId) { - let variables = { - "variables": formData - } - // 启动流程并将表单数据加入流程变量 + variables.variables = formData; + // 启动流程并将表单数据加入流程变量 definitionStart(this.taskForm.procDefId, JSON.stringify(variables)).then(res => { this.msgSuccess(res.msg); this.goBack();