xiangpei
2025-02-12 b779ec8cceabe8d4d0032a7839340f4f05965db0
任务提交表单校验失败转圈圈bug
1个文件已修改
56 ■■■■■ 已修改文件
src/views/flowable/task/myProcess/send/index.vue 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flowable/task/myProcess/send/index.vue
@@ -577,10 +577,10 @@
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.submitLoading = true
        let that = this
        if (eval("that.$refs.form" +0)) {
          eval("that.$refs.form" +0)[0].getFormData().then(formData => {
            this.submitLoading = true
            this.formData = formData
            const param = {
              formJson:  this.formJson,
@@ -592,64 +592,16 @@
              this.$modal.msgSuccess(res.msg);
              this.submitLoading = false
              this.goBack();
            }).catch((err) => {
              this.submitLoading = false;
            });
          }).catch((err) => {
            this.submitLoading = false;
          });
            })
          })
        } else {
          // 没关联表单直接传空
          completeSubmitFormTask(this.taskId, {}).then(res => {
            this.$modal.msgSuccess(res.msg);
            this.submitLoading = false
            this.goBack();
          }).catch((err) => {
            this.submitLoading = false;
          });
          })
        }
        // let that = this
        // eval("that.$refs.form" +0)[0].getFormData().then(formData => {
        //   // 根据当前任务或者流程设计配置的下一步节点 todo 暂时未涉及到考虑网关、表达式和多节点情况
        //   getNextFlowNodeByStart({deploymentId: this.deployId, variables: formData}).then(res => {
        //     const data = res.data;
        //     if (data) {
        //       this.formData = formData;
        //       if (data.dataType === 'dynamic') {
        //         if (data.type === 'assignee') { // 指定人员
        //           this.checkSendUser = true;
        //           this.checkType = "single";
        //         } else if (data.type === 'candidateUsers') {  // 候选人员(多个)
        //           this.checkSendUser = true;
        //           this.checkType = "multiple";
        //         } else if (data.type === 'candidateGroups') { // 指定组(所属角色接收任务)
        //           this.checkSendRole = true;
        //         } else { // 会签
        //           // 流程设计指定的 elementVariable 作为会签人员列表
        //           this.multiInstanceVars = data.vars;
        //           this.checkSendUser = true;
        //           this.checkType = "multiple";
        //         }
        //         this.taskOpen = true;
        //         this.taskTitle = "选择任务接收";
        //       } else {
        //         if (this.procDefId) {
        //           const param = {
        //             formJson:  this.formJson,
        //           }
        //           // 复制对象的属性值给新的对象
        //           Object.assign(param, formData);
        //           // 完成任务
        //           completeSubmitFormTask(this.taskId, param).then(res => {
        //             this.$modal.msgSuccess(res.msg);
        //             this.goBack();
        //           })
        //         }
        //       }
        //     }
        //   })
        // })
      }).catch((err) => {
        console.log(err)
        this.$message({