diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/index.js b/ruoyi-admin/src/main/resources/static/ruoyi/index.js
index c53b20a50..23326c474 100644
--- a/ruoyi-admin/src/main/resources/static/ruoyi/index.js
+++ b/ruoyi-admin/src/main/resources/static/ruoyi/index.js
@@ -80,7 +80,10 @@ function syncMenuTab(dataId) {
$dataObj.parents("ul").addClass("in")
$dataObj.parents("li").addClass("active").siblings().removeClass("active").find('li').removeClass("active");
$dataObj.parents("ul").css('height', 'auto').height();
- $dataObj.click();
+ $(".nav ul li, .nav li").removeClass("selected");
+ $dataObj.parent("li").addClass("selected");
+ setIframeUrl(dataId);
+
// 顶部菜单同步处理
var tabStr = $dataObj.parents(".tab-pane").attr("id");
if ($.common.isNotEmpty(tabStr)) {
@@ -104,6 +107,17 @@ function fixedSidebar() {
}, 100);
}
+// 设置锚点
+function setIframeUrl(href) {
+ if($.common.equals("history", mode)) {
+ storage.set('publicPath', href);
+ } else {
+ var nowUrl = window.location.href;
+ var newUrl = nowUrl.substring(0, nowUrl.indexOf("#"));
+ window.location.href = newUrl + "#" + href;
+ }
+}
+
function SmoothlyMenu() {
if (isMobile && !$('body').hasClass('canvas-menu')) {
$('.navbar-static-side').fadeIn();
@@ -531,17 +545,6 @@ $(function() {
$('#ax_close_max').show();
}
- // 设置锚点
- function setIframeUrl(href) {
- if($.common.equals("history", mode)) {
- storage.set('publicPath', href);
- } else {
- var nowUrl = window.location.href;
- var newUrl = nowUrl.substring(0, nowUrl.indexOf("#"));
- window.location.href = newUrl + "#" + href;
- }
- }
-
$(window).keydown(function(event) {
if (event.keyCode == 27) {
$('#content-main').removeClass('max');
diff --git a/ruoyi-admin/src/main/resources/templates/index-topnav.html b/ruoyi-admin/src/main/resources/templates/index-topnav.html
index ed9a4f3e0..f7fbe14f8 100644
--- a/ruoyi-admin/src/main/resources/templates/index-topnav.html
+++ b/ruoyi-admin/src/main/resources/templates/index-topnav.html
@@ -49,7 +49,7 @@
-
-
diff --git a/ruoyi-admin/src/main/resources/templates/index.html b/ruoyi-admin/src/main/resources/templates/index.html
index 40dd5c397..01f861231 100644
--- a/ruoyi-admin/src/main/resources/templates/index.html
+++ b/ruoyi-admin/src/main/resources/templates/index.html
@@ -50,21 +50,21 @@
-
-
+
一级菜单
-
- 二级菜单
+ 二级菜单
[[${cmenu.menuName}]]
diff --git a/ruoyi-admin/src/main/resources/templates/system/menu/add.html b/ruoyi-admin/src/main/resources/templates/system/menu/add.html
index 39ebb7357..151a844ae 100644
--- a/ruoyi-admin/src/main/resources/templates/system/menu/add.html
+++ b/ruoyi-admin/src/main/resources/templates/system/menu/add.html
@@ -71,12 +71,23 @@
@@ -147,18 +158,21 @@
$("#icon").parents(".form-group").show();
$("#target").parents(".form-group").hide();
$("input[name='visible']").parents(".form-group").show();
+ $(".is-refresh").hide();
} else if (menuType == "C") {
$("#url").parents(".form-group").show();
$("#perms").parents(".form-group").show();
$("#icon").parents(".form-group").show();
$("#target").parents(".form-group").show();
$("input[name='visible']").parents(".form-group").show();
+ $(".is-refresh").show();
} else if (menuType == "F") {
$("#url").parents(".form-group").hide();
$("#perms").parents(".form-group").show();
$("#icon").parents(".form-group").hide();
$("#target").parents(".form-group").hide();
$("input[name='visible']").parents(".form-group").hide();
+ $(".is-refresh").hide();
}
});
});
diff --git a/ruoyi-admin/src/main/resources/templates/system/menu/edit.html b/ruoyi-admin/src/main/resources/templates/system/menu/edit.html
index 66086cea7..fd1950cce 100644
--- a/ruoyi-admin/src/main/resources/templates/system/menu/edit.html
+++ b/ruoyi-admin/src/main/resources/templates/system/menu/edit.html
@@ -72,12 +72,23 @@
@@ -163,18 +174,21 @@
$("#icon").parents(".form-group").show();
$("#target").parents(".form-group").hide();
$("input[name='visible']").parents(".form-group").show();
+ $(".is-refresh").hide();
} else if (menuType == "C") {
$("#url").parents(".form-group").show();
$("#perms").parents(".form-group").show();
$("#icon").parents(".form-group").show();
$("#target").parents(".form-group").show();
$("input[name='visible']").parents(".form-group").show();
+ $(".is-refresh").show();
} else if (menuType == "F") {
$("#url").parents(".form-group").hide();
$("#perms").parents(".form-group").show();
$("#icon").parents(".form-group").hide();
$("#target").parents(".form-group").hide();
$("input[name='visible']").parents(".form-group").hide();
+ $(".is-refresh").hide();
}
}
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java
index a3177e6bc..da1869a5c 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java
@@ -34,15 +34,18 @@ public class SysMenu extends BaseEntity
/** 菜单URL */
private String url;
- /** 打开方式:menuItem页签 menuBlank新窗口 */
+ /** 打开方式(menuItem页签 menuBlank新窗口) */
private String target;
- /** 类型:0目录,1菜单,2按钮 */
+ /** 类型(M目录 C菜单 F按钮) */
private String menuType;
- /** 菜单状态:0显示,1隐藏 */
+ /** 菜单状态(0显示 1隐藏) */
private String visible;
+ /** 是否刷新(0刷新 1不刷新) */
+ private String isRefresh;
+
/** 权限字符串 */
private String perms;
@@ -147,6 +150,16 @@ public class SysMenu extends BaseEntity
this.visible = visible;
}
+ public String getIsRefresh()
+ {
+ return isRefresh;
+ }
+
+ public void setIsRefresh(String isRefresh)
+ {
+ this.isRefresh = isRefresh;
+ }
+
@Size(min = 0, max = 100, message = "权限标识长度不能超过100个字符")
public String getPerms()
{
diff --git a/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml
index e7228e89a..fd58edb32 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml
@@ -14,6 +14,7 @@
+
@@ -24,12 +25,12 @@