fix: 模型/表单弹窗删除区分关闭和取消

saber
ssc 5 years ago
parent 2cac23e637
commit 03caa78fce
  1. 19
      src/views/plugin/workflow/design/form.vue
  2. 19
      src/views/plugin/workflow/design/model.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() {

@ -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() {

Loading…
Cancel
Save