diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRole.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRole.java index 662989efe..3c2ff4f29 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRole.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRole.java @@ -77,13 +77,13 @@ public class SysRole extends BaseEntity { * 菜单树选择项是否关联显示( 0:父子不互相关联显示 1:父子互相关联显示) */ @ApiModelProperty(value = "菜单树选择项是否关联显示( 0:父子不互相关联显示 1:父子互相关联显示)") - private boolean menuCheckStrictly; + private Integer menuCheckStrictly; /** * 部门树选择项是否关联显示(0:父子不互相关联显示 1:父子互相关联显示 ) */ @ApiModelProperty(value = "部门树选择项是否关联显示(0:父子不互相关联显示 1:父子互相关联显示 )") - private boolean deptCheckStrictly; + private Integer deptCheckStrictly; /** * 角色状态(0正常 1停用) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java index 6b6fddd35..0b6fc7064 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java @@ -85,7 +85,7 @@ public class SysDeptServiceImpl implements ISysDeptService { @Override public List selectDeptListByRoleId(Long roleId) { SysRole role = roleMapper.selectById(roleId); - return baseMapper.selectDeptListByRoleId(roleId, role.isDeptCheckStrictly()); + return baseMapper.selectDeptListByRoleId(roleId, role.getDeptCheckStrictly() == 1); } /** diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java index 5b6213ebb..87723134c 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java @@ -123,7 +123,7 @@ public class SysMenuServiceImpl implements ISysMenuService { @Override public List selectMenuListByRoleId(Long roleId) { SysRole role = roleMapper.selectById(roleId); - return baseMapper.selectMenuListByRoleId(roleId, role.isMenuCheckStrictly()); + return baseMapper.selectMenuListByRoleId(roleId, role.getMenuCheckStrictly() == 1); } /** diff --git a/ruoyi-ui/src/views/system/role/index.vue b/ruoyi-ui/src/views/system/role/index.vue index b08cf3474..a1202451f 100644 --- a/ruoyi-ui/src/views/system/role/index.vue +++ b/ruoyi-ui/src/views/system/role/index.vue @@ -187,14 +187,14 @@ 展开/折叠 全选/全不选 - 父子联动 + 父子联动 @@ -231,7 +231,7 @@ 展开/折叠 全选/全不选 - 父子联动 + 父子联动 @@ -440,8 +440,8 @@ export default { status: "0", menuIds: [], deptIds: [], - menuCheckStrictly: true, - deptCheckStrictly: true, + menuCheckStrictly: 1, + deptCheckStrictly: 1, remark: undefined }; this.resetForm("form"); @@ -501,9 +501,9 @@ export default { // 树权限(父子联动) handleCheckedTreeConnect(value, type) { if (type == 'menu') { - this.form.menuCheckStrictly = value ? true: false; + this.form.menuCheckStrictly = value ? 1: 0; } else if (type == 'dept') { - this.form.deptCheckStrictly = value ? true: false; + this.form.deptCheckStrictly = value ? 1: 0; } }, /** 新增按钮操作 */ diff --git a/script/sql/postgres/postgres_ry_vue_4.X.sql b/script/sql/postgres/postgres_ry_vue_4.X.sql index 2a1132c3b..7a1a60deb 100644 --- a/script/sql/postgres/postgres_ry_vue_4.X.sql +++ b/script/sql/postgres/postgres_ry_vue_4.X.sql @@ -157,8 +157,8 @@ create table if not exists sys_role role_key varchar(100) not null, role_sort int4 not null, data_scope char default '1'::bpchar, - menu_check_strictly smallint default 1, - dept_check_strictly smallint default 1, + menu_check_strictly int2 default 1, + dept_check_strictly int2 default 1, status char not null, del_flag char default '0'::bpchar, create_by varchar(64) default ''::varchar,