From b368ad764f123ced6b48052c490decafe93e5402 Mon Sep 17 00:00:00 2001 From: RuoYi <yzz_ivy@163.com> Date: 星期四, 10 十二月 2020 12:08:18 +0800 Subject: [PATCH] 升级core-js到最新版本3.8.1 --- ruoyi-ui/src/views/system/role/index.vue | 37 ++++++++++++++++--------------------- 1 files changed, 16 insertions(+), 21 deletions(-) diff --git a/ruoyi-ui/src/views/system/role/index.vue b/ruoyi-ui/src/views/system/role/index.vue index 9c760f6..279c466 100644 --- a/ruoyi-ui/src/views/system/role/index.vue +++ b/ruoyi-ui/src/views/system/role/index.vue @@ -368,18 +368,18 @@ // 所有菜单节点数据 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; }, @@ -440,6 +440,7 @@ menuIds: [], deptIds: [], menuCheckStrictly: true, + deptCheckStrictly: true, remark: undefined }; this.resetForm("form"); @@ -536,20 +537,16 @@ 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(); }); } } @@ -560,11 +557,9 @@ 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(); }); } }, @@ -580,7 +575,7 @@ }).then(() => { this.getList(); this.msgSuccess("删除成功"); - }).catch(function() {}); + }) }, /** 导出按钮操作 */ handleExport() { @@ -593,7 +588,7 @@ return exportRole(queryParams); }).then(response => { this.download(response.msg); - }).catch(function() {}); + }) } } }; -- Gitblit v1.9.2