diff --git a/jero-web/src/views/projectManagement/components/listOfRegulations.vue b/jero-web/src/views/projectManagement/components/listOfRegulations.vue index 78c310e50..e551f0dce 100644 --- a/jero-web/src/views/projectManagement/components/listOfRegulations.vue +++ b/jero-web/src/views/projectManagement/components/listOfRegulations.vue @@ -1077,9 +1077,11 @@ } }) } else { + let index = 0 for (let i = 0; i < this.dataSource.length; i++) { for (let j = 0; j < selectedRowKeys.length; j++) { if (this.dataSource[i].id == selectedRowKeys[j]) { + index++ this.dataSource[i].taskAffirmDueDate = this.formInline.taskAffirmDueDate Object.keys(this.dataSource[i]).forEach(res => { if (this.dataSource[i][res] && this.dataSource[i][res] instanceof String) { @@ -1089,7 +1091,7 @@ }) setTimeout(() => { this.confirmLoading = true - this.startProcess(this.dataSource[i]) + this.startProcess(this.dataSource[i],index) }, 500) } } @@ -1099,7 +1101,7 @@ }) }, - startProcess(value) { + startProcess(value,index) { let query = { type: 1, msg: JSON.stringify(value).replace(/\"/g, '\''), @@ -1110,12 +1112,12 @@ } postAction('/workFlow/startProcess', query).then((res) => { if (res.success) { - this.completeTask(value, res.result) + this.completeTask(value, res.result,index) } }) }, - completeTask(value, taskId) { + completeTask(value, taskId,index) { let handlingTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss') value.handlingTime = handlingTime let query = { @@ -1125,11 +1127,13 @@ } postAction('/workFlow/completeTask', query).then((res) => { if (res.success) { - this.visible = false - this.selectedRowKeys = [] - this.$message.success(this.$t('OperationSuccessful')) - this.confirmLoading = false - this.getList() + if (index == this.selectedRowKeys.length){ + this.visible = false + this.selectedRowKeys = [] + this.$message.success(this.$t('OperationSuccessful')) + this.confirmLoading = false + this.getList() + } } else { this.$message.warning(this.$t('operationFailed')) }