修改已知问题

This commit is contained in:
qq787203167
2022-05-26 14:18:49 +08:00
parent f85c9656ac
commit 35dc8ae4c1
@@ -1077,9 +1077,11 @@
} }
}) })
} else { } else {
let index = 0
for (let i = 0; i < this.dataSource.length; i++) { for (let i = 0; i < this.dataSource.length; i++) {
for (let j = 0; j < selectedRowKeys.length; j++) { for (let j = 0; j < selectedRowKeys.length; j++) {
if (this.dataSource[i].id == selectedRowKeys[j]) { if (this.dataSource[i].id == selectedRowKeys[j]) {
index++
this.dataSource[i].taskAffirmDueDate = this.formInline.taskAffirmDueDate this.dataSource[i].taskAffirmDueDate = this.formInline.taskAffirmDueDate
Object.keys(this.dataSource[i]).forEach(res => { Object.keys(this.dataSource[i]).forEach(res => {
if (this.dataSource[i][res] && this.dataSource[i][res] instanceof String) { if (this.dataSource[i][res] && this.dataSource[i][res] instanceof String) {
@@ -1089,7 +1091,7 @@
}) })
setTimeout(() => { setTimeout(() => {
this.confirmLoading = true this.confirmLoading = true
this.startProcess(this.dataSource[i]) this.startProcess(this.dataSource[i],index)
}, 500) }, 500)
} }
} }
@@ -1099,7 +1101,7 @@
}) })
}, },
startProcess(value) { startProcess(value,index) {
let query = { let query = {
type: 1, type: 1,
msg: JSON.stringify(value).replace(/\"/g, '\''), msg: JSON.stringify(value).replace(/\"/g, '\''),
@@ -1110,12 +1112,12 @@
} }
postAction('/workFlow/startProcess', query).then((res) => { postAction('/workFlow/startProcess', query).then((res) => {
if (res.success) { 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') let handlingTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
value.handlingTime = handlingTime value.handlingTime = handlingTime
let query = { let query = {
@@ -1125,11 +1127,13 @@
} }
postAction('/workFlow/completeTask', query).then((res) => { postAction('/workFlow/completeTask', query).then((res) => {
if (res.success) { if (res.success) {
this.visible = false if (index == this.selectedRowKeys.length){
this.selectedRowKeys = [] this.visible = false
this.$message.success(this.$t('OperationSuccessful')) this.selectedRowKeys = []
this.confirmLoading = false this.$message.success(this.$t('OperationSuccessful'))
this.getList() this.confirmLoading = false
this.getList()
}
} else { } else {
this.$message.warning(this.$t('operationFailed')) this.$message.warning(this.$t('operationFailed'))
} }