From d10ba055cbac7b6f0e7b3cacfcc036cf1f82eb51 Mon Sep 17 00:00:00 2001 From: konbai <1527468660@qq.com> Date: Fri, 19 Aug 2022 00:34:35 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=89=8D=E7=AB=AF=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E5=AE=A1=E6=89=B9):=20=E4=BF=AE=E5=A4=8D=E6=97=A0=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E4=BB=BB=E5=8A=A1=E8=A1=A8=E5=8D=95=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E5=AE=A1=E6=89=B9=E9=80=9A=E8=BF=87=E5=89=8D=E7=AB=AF=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E5=AF=BC=E8=87=B4=E6=97=A0=E6=B3=95=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/views/workflow/work/detail.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ruoyi-ui/src/views/workflow/work/detail.vue b/ruoyi-ui/src/views/workflow/work/detail.vue index 0f197ae9..4f53f472 100644 --- a/ruoyi-ui/src/views/workflow/work/detail.vue +++ b/ruoyi-ui/src/views/workflow/work/detail.vue @@ -447,7 +447,8 @@ export default { handleComplete() { // 校验表单 const taskFormRef = this.$refs.taskFormParser; - const taskFormPromise = new Promise((resolve, reject) => { + // 若无任务表单,则 taskFormPromise 为 true,即不需要校验 + const taskFormPromise = taskFormRef === undefined ? true : new Promise((resolve, reject) => { taskFormRef.$refs[taskFormRef.formConfCopy.formRef].validate(valid => { valid ? resolve() : reject() }) @@ -458,7 +459,7 @@ export default { }) }); Promise.all([taskFormPromise, approvalPromise]).then(() => { - this.taskForm.variables = this.$refs.taskFormParser.formData; + this.taskForm.variables = taskFormRef?.formData; complete(this.taskForm).then(response => { this.$modal.msgSuccess(response.msg); this.goBack();