diff --git a/backend/src/main/java/io/dataease/service/sys/SysUserService.java b/backend/src/main/java/io/dataease/service/sys/SysUserService.java index d5a067fbb1..740e20946e 100644 --- a/backend/src/main/java/io/dataease/service/sys/SysUserService.java +++ b/backend/src/main/java/io/dataease/service/sys/SysUserService.java @@ -30,6 +30,7 @@ import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.util.List; +import java.util.Optional; import java.util.stream.Collectors; @Service @@ -117,6 +118,7 @@ public class SysUserService { user.setUpdateTime(now); deleteUserRoles(user.getUserId());//先删除用户角色关联 saveUserRoles(user.getUserId(), request.getRoleIds());//再插入角色关联 + if (ObjectUtils.isEmpty(user.getDeptId())) user.setDeptId(0L); return sysUserMapper.updateByPrimaryKeySelective(user); } diff --git a/frontend/src/layout/components/Topbar.vue b/frontend/src/layout/components/Topbar.vue index 59a09def0b..c7ef78be59 100644 --- a/frontend/src/layout/components/Topbar.vue +++ b/frontend/src/layout/components/Topbar.vue @@ -106,7 +106,7 @@ export default { const { meta, path } = route // if set path, the sidebar will highlight the path you set if (meta.activeMenu) { - return meta.activeMenu + // return meta.activeMenu } // 如果是首页,首页高亮 if (path === '/panel') { diff --git a/frontend/src/views/link/pwd/index.vue b/frontend/src/views/link/pwd/index.vue index 9ce3dc973e..50fdbbe94e 100644 --- a/frontend/src/views/link/pwd/index.vue +++ b/frontend/src/views/link/pwd/index.vue @@ -5,7 +5,8 @@