diff --git a/src/views/plugin/workflow/design/form.vue b/src/views/plugin/workflow/design/form.vue index b70d693..2c1613f 100644 --- a/src/views/plugin/workflow/design/form.vue +++ b/src/views/plugin/workflow/design/form.vue @@ -330,6 +330,7 @@ export default { }, rowDel(row) { this.$confirm("删除全部版本或者回退到最后版本?", { + distinguishCancelAndClose: true, confirmButtonText: "回退", cancelButtonText: "全部删除", type: "warning" @@ -342,15 +343,17 @@ export default { this.onLoad(this.page); this.$message.success("操作成功") }) - }).catch(() => { - const param = { - id: row.id, - rollback: false + }).catch(action => { + if (action == 'cancel') { + const param = { + id: row.id, + rollback: false + } + remove(param).then(() => { + this.onLoad(this.page); + this.$message.success("操作成功") + }) } - remove(param).then(() => { - this.onLoad(this.page); - this.$message.success("操作成功") - }) }) }, handleDelete() { diff --git a/src/views/plugin/workflow/design/model.vue b/src/views/plugin/workflow/design/model.vue index a0586ed..2459eee 100644 --- a/src/views/plugin/workflow/design/model.vue +++ b/src/views/plugin/workflow/design/model.vue @@ -151,6 +151,7 @@ export default { }, rowDel(row) { this.$confirm("删除全部版本或者回退到最后版本?", { + distinguishCancelAndClose: true, confirmButtonText: "回退", cancelButtonText: "全部删除", type: "warning" @@ -163,15 +164,17 @@ export default { this.onLoad(this.page); this.$message.success("操作成功") }) - }).catch(() => { - const param = { - id: row.id, - rollback: false + }).catch(action => { + if (action == 'cancel') { + const param = { + id: row.id, + rollback: false + } + remove(param).then(() => { + this.onLoad(this.page); + this.$message.success("操作成功") + }) } - remove(param).then(() => { - this.onLoad(this.page); - this.$message.success("操作成功") - }) }) }, handleDelete() {