提交 ef424ece authored 作者: lihuihui's avatar lihuihui

优化撤销功能

上级 6529c7cb
...@@ -200,8 +200,7 @@ export default { ...@@ -200,8 +200,7 @@ export default {
Dialog.confirm({ Dialog.confirm({
message: '你确定要撤回申请吗?撤回后,需要重新填写资料提交申请。' message: '你确定要撤回申请吗?撤回后,需要重新填写资料提交申请。'
}).then(() => { }).then(() => {
const id = window.sessionStorage.dataId if (this.$route.query.id) {
if (id) {
api.revoke(this.$route.query.id, { status: -2 }).then(response => { api.revoke(this.$route.query.id, { status: -2 }).then(response => {
if (response.success) { if (response.success) {
Toast('撤销成功') Toast('撤销成功')
...@@ -211,12 +210,18 @@ export default { ...@@ -211,12 +210,18 @@ export default {
this.$router.replace({ this.$router.replace({
path: '/attestation' path: '/attestation'
}) })
// this.$router.go(-1)
}, 1000) }, 1000)
} else {
Toast('撤销失败')
} }
}) })
.catch(() => {
Toast('撤销失败')
})
} else { } else {
// this.$router.go(0) this.$router.replace({
path: '/attestation'
})
} }
}) })
}, },
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论