From c39d3f6de156117d541a05d0c9cf72f0460126f3 Mon Sep 17 00:00:00 2001 From: konbai <1527468660@qq.com> Date: Thu, 1 Sep 2022 00:16:40 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=81=E7=A8=8B=E5=AE=A1=E6=89=B9):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AE=A1=E6=89=B9=E4=BB=BB=E5=8A=A1=E6=9C=89?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E8=A1=A8=E5=8D=95=E6=97=B6=EF=BC=8C=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E6=95=B0=E6=8D=AE=E5=8F=AF=E8=83=BD=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E4=B8=BA=E7=A9=BA=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/views/workflow/work/detail.vue | 23 ++++++++++++--------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/ruoyi-ui/src/views/workflow/work/detail.vue b/ruoyi-ui/src/views/workflow/work/detail.vue index 4f53f472..dff85684 100644 --- a/ruoyi-ui/src/views/workflow/work/detail.vue +++ b/ruoyi-ui/src/views/workflow/work/detail.vue @@ -3,14 +3,14 @@ - -
- 填写表单 -
- - - -
+ + + + + + + +
审批流程 @@ -447,8 +447,9 @@ export default { handleComplete() { // 校验表单 const taskFormRef = this.$refs.taskFormParser; + const isExistTaskForm = taskFormRef !== undefined; // 若无任务表单,则 taskFormPromise 为 true,即不需要校验 - const taskFormPromise = taskFormRef === undefined ? true : new Promise((resolve, reject) => { + const taskFormPromise = !isExistTaskForm ? true : new Promise((resolve, reject) => { taskFormRef.$refs[taskFormRef.formConfCopy.formRef].validate(valid => { valid ? resolve() : reject() }) @@ -459,7 +460,9 @@ export default { }) }); Promise.all([taskFormPromise, approvalPromise]).then(() => { - this.taskForm.variables = taskFormRef?.formData; + if (isExistTaskForm) { + this.taskForm.variables = taskFormRef[taskFormRef.formConfCopy.formModel] + } complete(this.taskForm).then(response => { this.$modal.msgSuccess(response.msg); this.goBack();