From 6d6271d6c97a9077626e50f09c1b860c41a44d60 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Thu, 14 Oct 2021 16:19:46 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=94=E7=BA=A7?= =?UTF-8?q?=E4=BB=A5=E4=B8=8A=E8=8F=9C=E5=8D=95404=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/store/modules/permission.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruoyi-ui/src/store/modules/permission.js b/ruoyi-ui/src/store/modules/permission.js index 340524abc..6143038ab 100644 --- a/ruoyi-ui/src/store/modules/permission.js +++ b/ruoyi-ui/src/store/modules/permission.js @@ -86,7 +86,7 @@ function filterChildren(childrenMap, lastRouter = false) { var children = [] childrenMap.forEach((el, index) => { if (el.children && el.children.length) { - if (el.component === 'ParentView') { + if (el.component === 'ParentView' && !lastRouter) { el.children.forEach(c => { c.path = el.path + '/' + c.path if (c.children && c.children.length) { From e7afea4cb744c4789babd71af2dc03fd0d459ad7 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Thu, 14 Oct 2021 16:20:18 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=8D=87=E7=BA=A7oshi=E5=88=B0=E6=9C=80?= =?UTF-8?q?=E6=96=B0=E7=89=88=E6=9C=ACv5.8.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 91ac13cee..6feb0ee79 100644 --- a/pom.xml +++ b/pom.xml @@ -25,8 +25,8 @@ 2.2.0 1.4.0 1.2.78 - 5.8.0 - 5.8.0 + 5.8.2 + 5.9.0 2.11.0 1.4 3.2.2 @@ -242,7 +242,7 @@ public aliyun nexus - http://maven.aliyun.com/nexus/content/groups/public/ + https://maven.aliyun.com/repository/public true @@ -253,7 +253,7 @@ public aliyun nexus - http://maven.aliyun.com/nexus/content/groups/public/ + https://maven.aliyun.com/repository/public true From e66d0e4f7465e840cc73e3b2d7dc4eeb2dc804b8 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Fri, 15 Oct 2021 17:56:57 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E8=A7=92=E8=89=B2=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E7=B1=BB=E5=9E=8B=E4=BF=9D=E6=8C=81=E4=B8=80?= =?UTF-8?q?=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/ruoyi/system/mapper/SysRoleMapper.java | 2 +- .../src/main/java/com/ruoyi/system/service/ISysRoleService.java | 2 +- .../java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java | 2 +- ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMapper.java index e4379c97b..58ede18e0 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMapper.java @@ -39,7 +39,7 @@ public interface SysRoleMapper * @param userId 用户ID * @return 选中角色ID列表 */ - public List selectRoleListByUserId(Long userId); + public List selectRoleListByUserId(Long userId); /** * 通过角色ID查询角色 diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysRoleService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysRoleService.java index 1690ed53a..bf1f7b3d9 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysRoleService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysRoleService.java @@ -49,7 +49,7 @@ public interface ISysRoleService * @param userId 用户ID * @return 选中角色ID列表 */ - public List selectRoleListByUserId(Long userId); + public List selectRoleListByUserId(Long userId); /** * 通过角色ID查询角色 diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java index cde75c873..f53f975fe 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java @@ -122,7 +122,7 @@ public class SysRoleServiceImpl implements ISysRoleService * @return 选中角色ID列表 */ @Override - public List selectRoleListByUserId(Long userId) + public List selectRoleListByUserId(Long userId) { return roleMapper.selectRoleListByUserId(userId); } diff --git a/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml index c26cfe5a0..a8d3ede58 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml @@ -65,7 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select r.role_id from sys_role r left join sys_user_role ur on ur.role_id = r.role_id From 519ea854d57f83feb6d6e992ce85eaad0a9acaaa Mon Sep 17 00:00:00 2001 From: RuoYi Date: Fri, 15 Oct 2021 17:57:46 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E7=94=9F=E4=BA=A7=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E8=B7=AF=E7=94=B1=E6=87=92=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E6=8F=90=E5=8D=87=E9=A1=B5=E9=9D=A2=E5=93=8D=E5=BA=94=E9=80=9F?= =?UTF-8?q?=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/store/modules/permission.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ruoyi-ui/src/store/modules/permission.js b/ruoyi-ui/src/store/modules/permission.js index 6143038ab..4c8ed023b 100644 --- a/ruoyi-ui/src/store/modules/permission.js +++ b/ruoyi-ui/src/store/modules/permission.js @@ -106,8 +106,13 @@ function filterChildren(childrenMap, lastRouter = false) { return children } -export const loadView = (view) => { // 路由懒加载 - return (resolve) => require([`@/views/${view}`], resolve) +export const loadView = (view) => { + if (process.env.NODE_ENV === 'development') { + return (resolve) => require([`@/views/${view}`], resolve) + } else { + // 使用 import 实现生产环境的路由懒加载 + return () => import(`@/views/${view}`) + } } export default permission