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

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) { if (v) {
const params = Object.assign({}, this.form, { resultRecordId: this.resultRecordId || '' }, obj) const params = Object.assign({}, this.form, { resultRecordId: this.resultRecordId || '' }, obj)
let res = await apiSaveapproval(params) let res = await apiSaveapproval(params)
console.log('res===', res)
if (res.code !== 200) { if (res.code !== 200) {
this.$message.error(res.msg) this.$message.error(res.msg)
history.go(0) //
resolve(1) setTimeout(() => {
} history.go(0)
this.form = {} resolve(1)
this.$message({ }, 1500)
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 { } else {
history.go(0) this.form = {}
resolve(0) 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 this.isNoList = res.code !== 200
if (res.code !== 200) { if (res.code !== 200) {
this.resultRecordId = '' this.resultRecordId = ''
if (!this.isNoRouter) { // if (!this.isNoRouter) {
this.$message.error(res.msg) this.$message.error(res.msg)
} // }
return return
} }
this.startIds = res.data.startId this.startIds = res.data.startId