diff --git a/src/views/workCenter/enterpriseStandardChange/EnterpriseStandardChangeFlow.vue b/src/views/workCenter/enterpriseStandardChange/EnterpriseStandardChangeFlow.vue index ac6d3fe8..ee365778 100644 --- a/src/views/workCenter/enterpriseStandardChange/EnterpriseStandardChangeFlow.vue +++ b/src/views/workCenter/enterpriseStandardChange/EnterpriseStandardChangeFlow.vue @@ -247,7 +247,8 @@ export default { personnelInfoData: [], url: { list: '' // 人员信息的右侧表格获取接口 - } + }, + tempDraftId: '' // 临时草稿id,解决发起的时候点在线编辑会生成多条草稿的问题 } }, methods: { @@ -333,6 +334,9 @@ export default { paramObj.basicTaskInfoDTO.handleFile = paramObj.basicTaskInfoDTO.commitFile paramObj.basicTaskInfoDTO.taskId = this.$route.query.taskId // 草稿id + if (this.tempDraftId) { + paramObj.draftId = this.tempDraftId + } if (this.model.infoJsonStr) { paramObj.draftId = this.model.id } @@ -382,7 +386,7 @@ export default { this.loading = false } } else if (!this.model.id) { - this.model.id = res.result + this.tempDraftId = res.result } }) }, @@ -405,6 +409,9 @@ export default { const param = {} // 需要传给后端的数据 param.common = { ...values, ...approvalValues } // 草稿id + if (this.tempDraftId) { + param.common.draftId = this.tempDraftId + } if (this.model.infoJsonStr) { param.common.draftId = this.model.id } diff --git a/src/views/workCenter/enterpriseStandardRevision/EnterpriseStandardRevisionFlow.vue b/src/views/workCenter/enterpriseStandardRevision/EnterpriseStandardRevisionFlow.vue index 64893b02..4d331473 100644 --- a/src/views/workCenter/enterpriseStandardRevision/EnterpriseStandardRevisionFlow.vue +++ b/src/views/workCenter/enterpriseStandardRevision/EnterpriseStandardRevisionFlow.vue @@ -370,7 +370,8 @@ export default { flowInitType: 'newProcess', // 流程发起类型,是自动发起(auto)的还是从新建流程发起的(newProcess) rejectBtnDisabled: false, // 驳回按钮是否置灰 agreeBtnDisabled: false, // 同意按钮是否置灰 - documentUrl: window._CONFIG.documentUrl + documentUrl: window._CONFIG.documentUrl, + tempDraftId: '' // 临时草稿id,解决发起的时候点在线编辑会生成多条草稿的问题 } }, methods: { @@ -483,6 +484,9 @@ export default { paramObj.basicTaskInfoDTO.handleFile = paramObj.basicTaskInfoDTO.commitFile paramObj.basicTaskInfoDTO.taskId = this.$route.query.taskId // 草稿id + if (this.tempDraftId) { + paramObj.draftId = this.tempDraftId + } if (this.model.infoJsonStr) { paramObj.draftId = this.model.id } @@ -529,7 +533,7 @@ export default { this.loading = false } } else if (!this.model.id) { - this.model.id = res.result + this.tempDraftId = res.result } }) }, @@ -550,6 +554,9 @@ export default { const param = {} // 需要传给后端的数据 param.common = { ...values, ...approvalValues } // 草稿id + if (this.tempDraftId) { + param.common.draftId = this.tempDraftId + } if (this.model.infoJsonStr) { param.common.draftId = this.model.id }