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

View File

@ -378,35 +378,61 @@ 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) {
history.go(0) this.nextProcess(res)
} else {
history.go(0)
}
}, },
// //
nextProcess (res) { nextProcess (res) {
if (!res.resultRecordId) return if (!res.resultRecordId) return
this.$confirm('是否进去下一个待办?', '温馨提示', { if (res.sure) {
confirmButtonText: '确定', this.$confirm('是否进去下一个待办?', '温馨提示', {
cancelButtonText: '取消' confirmButtonText: '确定',
}).then(() => { cancelButtonText: '取消'
this.$router.replace({ }).then(() => {
name: 'assessment-performance', this.$router.replace({
query: {id: res.resultRecordId name: 'assessment-performance',
} query: {id: res.resultRecordId
}
})
history.go(0)
}).catch(() => {
history.go(0)
}) })
history.go(0) } else {
}).catch(() => { let time = res.waitTime
history.go(0) 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 () {