diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/role/impl/SysRoleServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/role/impl/SysRoleServiceImpl.java index a750adb..7dbc683 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/role/impl/SysRoleServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/role/impl/SysRoleServiceImpl.java @@ -130,8 +130,8 @@ public class SysRoleServiceImpl extends ServiceImpl impl public List getPermissionList(JSONObject userDto) { List permission = new LinkedList<>(); // 查看是否为管理员 - String username = userDto.getString("username"); - if("admin".equals(username)){ + Boolean is_admin = userDto.getBoolean("is_admin"); + if(is_admin){ permission.add("admin"); } permission.addAll(sysMenuMapper.getPermissionByUserId(userDto.getString("user_id"))); diff --git a/lms/nladmin-ui/src/views/system/user/dialog/relevanceDeptDialog.vue b/lms/nladmin-ui/src/views/system/user/dialog/relevanceDeptDialog.vue index 8ece6df..64aea5a 100644 --- a/lms/nladmin-ui/src/views/system/user/dialog/relevanceDeptDialog.vue +++ b/lms/nladmin-ui/src/views/system/user/dialog/relevanceDeptDialog.vue @@ -119,7 +119,7 @@ export default { this.$nextTick(function() { for (var k = 0; k < this.depts.length; k++) { for (var i = 0; i < this.crud.data.length; i++) { - if (this.crud.data[i].deptId == this.depts[k].deptId) { + if (this.crud.data[i].dept_id == this.depts[k]) { this.$refs.table.toggleRowSelection(this.crud.data[i], true) break } @@ -157,7 +157,6 @@ export default { this.crud.resetQuery(false) this.$emit('update:dialogShow', false) this.$emit('selectDepts', this.rows) - // console.log(this.rows) }, getDeptDatas(tree, treeNode, resolve) { const params = { pid: tree.deptId } diff --git a/lms/nladmin-ui/src/views/system/user/dialog/relevanceUserDialog.vue b/lms/nladmin-ui/src/views/system/user/dialog/relevanceUserDialog.vue index e5e1df6..5a2a9d9 100644 --- a/lms/nladmin-ui/src/views/system/user/dialog/relevanceUserDialog.vue +++ b/lms/nladmin-ui/src/views/system/user/dialog/relevanceUserDialog.vue @@ -118,10 +118,9 @@ export default { }, open() { this.$nextTick(function() { - console.log(this.crud.data) for (var k = 0; k < this.users.length; k++) { for (var i = 0; i < this.crud.data.length; i++) { - if (this.crud.data[i].userId == this.users[k].userId) { + if (this.crud.data[i].user_id == this.users[k].user_id) { this.$refs.table.toggleRowSelection(this.crud.data[i], true) break } diff --git a/lms/nladmin-ui/src/views/system/user/index.vue b/lms/nladmin-ui/src/views/system/user/index.vue index 647b879..11a08f1 100644 --- a/lms/nladmin-ui/src/views/system/user/index.vue +++ b/lms/nladmin-ui/src/views/system/user/index.vue @@ -174,7 +174,7 @@