修复部分操作返回异常时无法查看异常消息

This commit is contained in:
wulin 2021-01-13 14:40:46 +08:00
parent 68016ab764
commit fb474da49d
2 changed files with 28 additions and 23 deletions

View File

@ -620,29 +620,34 @@ export default {
if (v) {
const params = Object.assign({}, this.form, { resultRecordId: this.resultRecordId || '' }, obj)
let res = await apiSaveapproval(params)
console.log('res===', res)
if (res.code !== 200) {
this.$message.error(res.msg)
history.go(0)
resolve(1)
}
this.form = {}
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
if (obj.status !== 2) {
this.nextProcess(res)
} else {
location.reload(false)
}
}
})
if (res.resultRecordId) {
resolve(0)
//
setTimeout(() => {
history.go(0)
resolve(1)
}, 1500)
} else {
history.go(0)
resolve(0)
this.form = {}
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
if (obj.status !== 2) {
this.nextProcess(res)
} else {
location.reload(false)
}
}
})
if (res.resultRecordId) {
resolve(0)
} else {
history.go(0)
resolve(0)
}
}
}
})

View File

@ -322,9 +322,9 @@ export default {
this.isNoList = res.code !== 200
if (res.code !== 200) {
this.resultRecordId = ''
if (!this.isNoRouter) {
this.$message.error(res.msg)
}
// if (!this.isNoRouter) {
this.$message.error(res.msg)
// }
return
}
this.startIds = res.data.startId