From 35dc8ae4c18654d2348feec62e86e9ee3ec74923 Mon Sep 17 00:00:00 2001 From: qq787203167 <787203167@qq.com> Date: Thu, 26 May 2022 14:18:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B7=B2=E7=9F=A5=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/listOfRegulations.vue | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) 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')) }