diff --git a/src/views/workCenter/noMatchTrackingProcess/NoMatchTrackingProcess.vue b/src/views/workCenter/noMatchTrackingProcess/NoMatchTrackingProcess.vue index 0a841a24..6d0832a0 100644 --- a/src/views/workCenter/noMatchTrackingProcess/NoMatchTrackingProcess.vue +++ b/src/views/workCenter/noMatchTrackingProcess/NoMatchTrackingProcess.vue @@ -531,25 +531,22 @@ export default { ) }, // 保存快照 - saveParamJsonStr () { + saveParamJsonStr (callback) { // 流程信息表单 const processInfoForm = Object.assign(this.processInfo, this.processInfoForm.getFieldsValue()) // 流程审批信息 const approvalInfoForm = Object.assign(this.approvalInfo, this.approvalInfoForm.getFieldsValue()) - // 人员信息的数据, 处理成对象 - const personnelObj = this.$refs.personnelInfo.getDataObj() const params = { ...processInfoForm, ...approvalInfoForm } - params.infoJsonStr = JSON.stringify({ - processInfo: processInfoForm, - approvalInfo: approvalInfoForm, - userInfoMap: personnelObj, - dataSource: this.dataSource - }) + params.infoJsonStr = JSON.stringify(this.dealSaveJsonData()) params.taskId = this.$route.query.taskId params.prcType = ProcessType.NO_MATCH_TRACKING.value - saveSnapShot(params).then(res => { - if (!res.success) { - console.log(res.message) + saveSnapShot(params).then(async res => { + if (res.success) { + callback && await callback() + } else { + this.$message.warning(res.message) + this.loading = false + this.disabledBtnClick = false } }) }, @@ -710,21 +707,34 @@ export default { } else { submitFunc = submitNoMatchTrackingProcess } - submitFunc(formData).then(async res => { - if (res.success) { - this.$message.success(res.message) - if (!(this.currentNode === NoMatchTrackingNodes.initial.value && (!this.$route.query.processInstanceId || this.$route.query.draftId))) { - // 保存快照 - await this.saveParamJsonStr() + if (this.currentNode === NoMatchTrackingNodes.initial.value && (!this.$route.query.processInstanceId || this.$route.query.draftId)) { + submitFunc(formData).then(res => { + if (res.success) { + this.$message.success(res.message) + this.goBack() + } else { + this.$message.warning(res.message) + this.disabledBtnClick = false } - this.goBack() - } else { - this.$message.warning(res.message) - this.disabledBtnClick = false - } - }).finally(() => { - this.loading = false - }) + }).finally(() => { + this.loading = false + }) + } else { + // 保存快照后提交 + this.saveParamJsonStr(() => { + submitFunc(formData).then(res => { + if (res.success) { + this.$message.success(res.message) + this.goBack() + } else { + this.$message.warning(res.message) + this.disabledBtnClick = false + } + }).finally(() => { + this.loading = false + }) + }) + } }, /** * 同意 @@ -744,18 +754,19 @@ export default { return } this.loading = true - agreeNoMatchTrackingProcess(formData).then(async res => { - if (res.success) { - this.$message.success(res.message) - // 保存快照 - await this.saveParamJsonStr() - this.goBack() - } else { - this.$message.warning(res.message) - this.disabledBtnClick = false - } - }).finally(() => { - this.loading = false + // 保存快照 + this.saveParamJsonStr(() => { + agreeNoMatchTrackingProcess(formData).then(res => { + if (res.success) { + this.$message.success(res.message) + this.goBack() + } else { + this.$message.warning(res.message) + this.disabledBtnClick = false + } + }).finally(() => { + this.loading = false + }) }) }, /** @@ -774,18 +785,19 @@ export default { return } this.loading = true - rejectNoMatchTrackingProcess(formData).then(async res => { - if (res.success) { - this.$message.success(res.message) - // 保存快照 - await this.saveParamJsonStr() - this.goBack() - } else { - this.$message.warning(res.message) - this.disabledBtnClick = false - } - }).finally(() => { - this.loading = false + // 保存快照 + this.saveParamJsonStr(() => { + rejectNoMatchTrackingProcess(formData).then(res => { + if (res.success) { + this.$message.success(res.message) + this.goBack() + } else { + this.$message.warning(res.message) + this.disabledBtnClick = false + } + }).finally(() => { + this.loading = false + }) }) }, handleDesignEngineerNameChange (name) { diff --git a/src/views/workCenter/projectComplianceEvaluationProcess/ProjectComplianceEvaluationProcess.vue b/src/views/workCenter/projectComplianceEvaluationProcess/ProjectComplianceEvaluationProcess.vue index f4c79749..650dfcb5 100644 --- a/src/views/workCenter/projectComplianceEvaluationProcess/ProjectComplianceEvaluationProcess.vue +++ b/src/views/workCenter/projectComplianceEvaluationProcess/ProjectComplianceEvaluationProcess.vue @@ -1,7 +1,7 @@ @@ -127,6 +129,11 @@ export default { default: () => { return [] } + }, + disabled: { + type: Boolean, + required: false, + default: false } }, data () { diff --git a/src/views/workCenter/standardConsultationProcess/StandardConsultationProcess.vue b/src/views/workCenter/standardConsultationProcess/StandardConsultationProcess.vue index e0e452e1..09b900ac 100644 --- a/src/views/workCenter/standardConsultationProcess/StandardConsultationProcess.vue +++ b/src/views/workCenter/standardConsultationProcess/StandardConsultationProcess.vue @@ -1,7 +1,7 @@