This commit is contained in:
xiongchengqiang 2020-12-21 20:44:11 +08:00
parent 590c9ce38d
commit 3e6a207f5f

View File

@ -378,22 +378,26 @@ export default {
this.$message.error(res.msg || '出错了 ') this.$message.error(res.msg || '出错了 ')
return return
} }
this.$message({ // this.$message({
message: res.msg, // message: res.msg,
type: 'success', // type: 'success',
duration: 1000, // duration: 1000,
onClose: () => { // onClose: () => {
this.nextProcess(res) // this.nextProcess(res)
} // }
}) // })
this.dialogFormVisible = false this.dialogFormVisible = false
if (res.resultRecordId) return if (res.resultRecordId) {
this.nextProcess(res)
} else {
history.go(0) history.go(0)
}
}, },
// //
nextProcess (res) { nextProcess (res) {
if (!res.resultRecordId) return if (!res.resultRecordId) return
if (res.sure) {
this.$confirm('是否进去下一个待办?', '温馨提示', { this.$confirm('是否进去下一个待办?', '温馨提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消' cancelButtonText: '取消'
@ -407,6 +411,28 @@ export default {
}).catch(() => { }).catch(() => {
history.go(0) history.go(0)
}) })
} else {
let time = res.waitTime
let a = this.$message({
message: `提交成功,${time}S 后将自动打开下一条待办`,
type: 'success',
duration: 5000
})
const timer = setInterval(() => {
if (time > 0) {
time--
a.message = `提交成功,${time}S 后将自动打开下一条待办`
} else {
clearInterval(timer)
this.$router.replace({
name: 'assessment-performance',
query: {id: res.resultRecordId
}
})
history.go(0)
}
}, 1000)
}
}, },
// //
handleBohui () { handleBohui () {