diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue index 8d24550..a174f3e 100644 --- a/src/views/system/dept/index.vue +++ b/src/views/system/dept/index.vue @@ -336,8 +336,10 @@ export default { this.$modal.confirm('是否确认删除名称为"' + row.deptName + '"的数据项?').then(function () { return delDept(row.deptId); }).then(() => { - this.getList(); - this.$modal.msgSuccess("删除成功"); + if (res.code === 20000) { + this.getList(); + this.$modal.msgSuccess("删除成功"); + } else this.$modal.msgError(res.message); }).catch(() => { }); } diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue index b986128..b3a544e 100644 --- a/src/views/system/role/index.vue +++ b/src/views/system/role/index.vue @@ -579,9 +579,12 @@ export default { const roleIds = row.roleId || this.ids; this.$modal.confirm('是否确认删除该角色?').then(function () { return delRole(roleIds); - }).then(() => { - this.getList(); - this.$modal.msgSuccess("删除成功"); + }).then(res => { + if (res.code === 20000) { + this.getList(); + this.$modal.msgSuccess("删除成功"); + } else this.$modal.msgError(res.message); + }).catch(() => { }); },