|
@@ -368,18 +368,18 @@ export default {
|
|
|
// 所有菜单节点数据
|
|
|
getMenuAllCheckedKeys() {
|
|
|
// 目前被选中的菜单节点
|
|
|
- let checkedKeys = this.$refs.menu.getHalfCheckedKeys();
|
|
|
+ let checkedKeys = this.$refs.menu.getCheckedKeys();
|
|
|
// 半选中的菜单节点
|
|
|
- let halfCheckedKeys = this.$refs.menu.getCheckedKeys();
|
|
|
+ let halfCheckedKeys = this.$refs.menu.getHalfCheckedKeys();
|
|
|
checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);
|
|
|
return checkedKeys;
|
|
|
},
|
|
|
// 所有部门节点数据
|
|
|
getDeptAllCheckedKeys() {
|
|
|
// 目前被选中的部门节点
|
|
|
- let checkedKeys = this.$refs.dept.getHalfCheckedKeys();
|
|
|
+ let checkedKeys = this.$refs.dept.getCheckedKeys();
|
|
|
// 半选中的部门节点
|
|
|
- let halfCheckedKeys = this.$refs.dept.getCheckedKeys();
|
|
|
+ let halfCheckedKeys = this.$refs.dept.getHalfCheckedKeys();
|
|
|
checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);
|
|
|
return checkedKeys;
|
|
|
},
|
|
@@ -537,20 +537,16 @@ export default {
|
|
|
if (this.form.roleId != undefined) {
|
|
|
this.form.menuIds = this.getMenuAllCheckedKeys();
|
|
|
updateRole(this.form).then(response => {
|
|
|
- if (response.code === 200) {
|
|
|
- this.msgSuccess("修改成功");
|
|
|
- this.open = false;
|
|
|
- this.getList();
|
|
|
- }
|
|
|
+ this.msgSuccess("修改成功");
|
|
|
+ this.open = false;
|
|
|
+ this.getList();
|
|
|
});
|
|
|
} else {
|
|
|
this.form.menuIds = this.getMenuAllCheckedKeys();
|
|
|
addRole(this.form).then(response => {
|
|
|
- if (response.code === 200) {
|
|
|
- this.msgSuccess("新增成功");
|
|
|
- this.open = false;
|
|
|
- this.getList();
|
|
|
- }
|
|
|
+ this.msgSuccess("新增成功");
|
|
|
+ this.open = false;
|
|
|
+ this.getList();
|
|
|
});
|
|
|
}
|
|
|
}
|
|
@@ -561,11 +557,9 @@ export default {
|
|
|
if (this.form.roleId != undefined) {
|
|
|
this.form.deptIds = this.getDeptAllCheckedKeys();
|
|
|
dataScope(this.form).then(response => {
|
|
|
- if (response.code === 200) {
|
|
|
- this.msgSuccess("修改成功");
|
|
|
- this.openDataScope = false;
|
|
|
- this.getList();
|
|
|
- }
|
|
|
+ this.msgSuccess("修改成功");
|
|
|
+ this.openDataScope = false;
|
|
|
+ this.getList();
|
|
|
});
|
|
|
}
|
|
|
},
|
|
@@ -581,7 +575,7 @@ export default {
|
|
|
}).then(() => {
|
|
|
this.getList();
|
|
|
this.msgSuccess("删除成功");
|
|
|
- }).catch(function() {});
|
|
|
+ })
|
|
|
},
|
|
|
/** 导出按钮操作 */
|
|
|
handleExport() {
|