From bf1e52fd9d9b0380b538b510d2800c2a02d465ce Mon Sep 17 00:00:00 2001 From: RuoYi Date: Thu, 3 Sep 2020 10:03:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=8F=9C=E5=8D=95=E5=AF=BC?= =?UTF-8?q?=E8=88=AA=E6=98=BE=E7=A4=BA=E9=A3=8E=E6=A0=BC=EF=BC=88default?= =?UTF-8?q?=E4=B8=BA=E5=B7=A6=E4=BE=A7=E5=AF=BC=E8=88=AA=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=EF=BC=8Ctopnav=E4=B8=BA=E9=A1=B6=E9=83=A8=E5=AF=BC=E8=88=AA?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/system/SysIndexController.java | 33 +- .../src/main/resources/application.yml | 2 + .../src/main/resources/static/css/skins.css | 59 ++- .../src/main/resources/static/css/style.css | 8 +- .../main/resources/static/js/resize-tabs.js | 1 + .../main/resources/static/ruoyi/css/ry-ui.css | 17 + .../src/main/resources/static/ruoyi/index.js | 8 + .../src/main/resources/templates/include.html | 2 +- .../resources/templates/index-topnav.html | 380 ++++++++++++++++++ .../src/main/resources/templates/index.html | 14 + .../java/com/ruoyi/common/config/Global.java | 13 + .../com/ruoyi/common/utils/CookieUtils.java | 138 +++++++ .../com/ruoyi/common/utils/ServletUtils.java | 29 ++ sql/{ry_20200803.sql => ry_20200903.sql} | 36 +- 14 files changed, 707 insertions(+), 33 deletions(-) create mode 100644 ruoyi-admin/src/main/resources/static/js/resize-tabs.js create mode 100644 ruoyi-admin/src/main/resources/templates/index-topnav.html create mode 100644 ruoyi-common/src/main/java/com/ruoyi/common/utils/CookieUtils.java rename sql/{ry_20200803.sql => ry_20200903.sql} (96%) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysIndexController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysIndexController.java index 28d4bf06..16d29054 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysIndexController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysIndexController.java @@ -1,12 +1,19 @@ package com.ruoyi.web.controller.system; import java.util.List; + +import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; import com.ruoyi.common.config.Global; import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.utils.CookieUtils; +import com.ruoyi.common.utils.ServletUtils; +import com.ruoyi.common.utils.StringUtils; import com.ruoyi.framework.util.ShiroUtils; import com.ruoyi.system.domain.SysMenu; import com.ruoyi.system.domain.SysUser; @@ -41,16 +48,38 @@ public class SysIndexController extends BaseController mmap.put("skinName", configService.selectConfigByKey("sys.index.skinName")); mmap.put("copyrightYear", Global.getCopyrightYear()); mmap.put("demoEnabled", Global.isDemoEnabled()); - return "index"; + + // 移动端,默认使左侧导航菜单,否则取默认配置 + String indexStyle = ServletUtils.checkAgentIsMobile(ServletUtils.getRequest().getHeader("User-Agent")) ? "index" : Global.getMenuStyle(); + + // 优先Cookie配置导航菜单 + Cookie[] cookies = ServletUtils.getRequest().getCookies(); + for (Cookie cookie : cookies) + { + if (StringUtils.isNotEmpty(cookie.getName()) && "nav-style".equalsIgnoreCase(cookie.getName())) + { + indexStyle = cookie.getValue(); + break; + } + } + String webIndex = "topnav".equalsIgnoreCase(indexStyle) ? "index-topnav" : "index"; + return webIndex; } // 切换主题 @GetMapping("/system/switchSkin") - public String switchSkin(ModelMap mmap) + public String switchSkin() { return "skin"; } + // 切换菜单 + @GetMapping("/system/menuStyle/{style}") + public void menuStyle(@PathVariable String style, HttpServletResponse response) + { + CookieUtils.setCookie(response, "nav-style", style); + } + // 系统介绍 @GetMapping("/system/main") public String main(ModelMap mmap) diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index e46f8be0..99304518 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -12,6 +12,8 @@ ruoyi: profile: D:/ruoyi/uploadPath # 获取ip地址开关 addressEnabled: false + # 菜单导航显示风格(default为左侧导航菜单,topnav为顶部导航菜单) + menuStyle: default # 开发环境配置 server: diff --git a/ruoyi-admin/src/main/resources/static/css/skins.css b/ruoyi-admin/src/main/resources/static/css/skins.css index 5dc35616..e55a3edd 100644 --- a/ruoyi-admin/src/main/resources/static/css/skins.css +++ b/ruoyi-admin/src/main/resources/static/css/skins.css @@ -4,6 +4,14 @@ * NAME - blue/green/purple/red/yellow * */ +.nav-tabs { + border-bottom: 0px; +} + +.navbar .navbar-toolbar>li>a { + border: none !important; +} + /** 蓝色主题 skin-blue **/ .navbar, .skin-blue .navbar { background-color: #3c8dbc @@ -93,7 +101,7 @@ background: #1a2226 } -.skin-blue .nav>li.active { +.skin-blue .nav:not(.navbar-toolbar)>li.active { color: #fff; background: #293846; border-left: 3px solid #3c8dbc; @@ -103,6 +111,13 @@ border-left: none; } +.skin-blue .dropdown-menu > .active > a, .skin-blue .dropdown-menu > .active > a:hover, .skin-blue .dropdown-menu > .active > a:focus { + color: #fff !important; + text-decoration: none; + outline: 0; + background-color: #3c8dbc; +} + .skin-blue .sidebar a { color: #b8c7ce } @@ -268,7 +283,7 @@ background: #1a2226; } -.skin-green .nav>li.active { +.skin-green .nav:not(.navbar-toolbar)>li.active { color: #fff; background: #293846; border-left: 3px solid #00a65a; @@ -278,6 +293,13 @@ border-left: none; } +.skin-green .dropdown-menu > .active > a, .skin-green .dropdown-menu > .active > a:hover, .skin-green .dropdown-menu > .active > a:focus { + color: #fff !important; + text-decoration: none; + outline: 0; + background-color: #00a65a; +} + .skin-green .sidebar a { color: #b8c7ce } @@ -415,7 +437,7 @@ background: #1a2226 } -.skin-red .nav>li.active { +.skin-red .nav:not(.navbar-toolbar)>li.active { color: #fff; border-left: 3px solid #dd4b39; background: #293846; @@ -425,6 +447,13 @@ border-left: none; } +.skin-red .dropdown-menu > .active > a, .skin-red .dropdown-menu > .active > a:hover, .skin-red .dropdown-menu > .active > a:focus { + color: #fff !important; + text-decoration: none; + outline: 0; + background-color: #dd4b39; +} + .skin-red .content-tabs { border-bottom: 1px solid #e5e5e5; } @@ -566,7 +595,7 @@ background: #1a2226 } -.skin-yellow .nav>li.active { +.skin-yellow .nav:not(.navbar-toolbar)>li.active { color: #fff; background: #293846; border-left: 3px solid #f39c12; @@ -576,6 +605,13 @@ border-left: none; } +.skin-yellow .dropdown-menu > .active > a, .skin-yellow .dropdown-menu > .active > a:hover, .skin-yellow .dropdown-menu > .active > a:focus { + color: #fff !important; + text-decoration: none; + outline: 0; + background-color: #f39c12; +} + .skin-yellow .content-tabs { border-bottom: 1px solid #e5e5e5; } @@ -717,7 +753,7 @@ background: #1a2226 } -.skin-purple .nav>li.active { +.skin-purple .nav:not(.navbar-toolbar)>li.active { color: #fff; background: #293846; border-left: 3px solid #605ca8; @@ -727,6 +763,13 @@ border-left: none; } +.skin-purple .dropdown-menu > .active > a, .skin-purple .dropdown-menu > .active > a:hover, .skin-purple .dropdown-menu > .active > a:focus { + color: #fff !important; + text-decoration: none; + outline: 0; + background-color: #605ca8; +} + .skin-purple .content-tabs { border-bottom: 1px solid #e5e5e5; } @@ -790,7 +833,7 @@ color: #fff } -.theme-dark .nav>li.active { +.theme-dark .nav:not(.navbar-toolbar)>li.active { background: #293846; } @@ -812,7 +855,7 @@ color: #555 } -.theme-light .nav>li.active{ +.theme-light .nav:not(.navbar-toolbar)>li.active{ background: #f9fafc; } @@ -903,7 +946,7 @@ color: #a3b1cc } -.theme-blue .nav>li.active{ +.theme-blue .nav:not(.navbar-toolbar)>li.active{ background-color: rgba(15,41,80,1); } diff --git a/ruoyi-admin/src/main/resources/static/css/style.css b/ruoyi-admin/src/main/resources/static/css/style.css index c9a889a8..03e114ac 100644 --- a/ruoyi-admin/src/main/resources/static/css/style.css +++ b/ruoyi-admin/src/main/resources/static/css/style.css @@ -46,7 +46,7 @@ a:focus { /*white-space: nowrap;*/ } -.nav.navbar-right>li>a { +.nav.navbar-right>li>a, .nav.navbar-left>li>a { color: #fff; font-size: 14px; height: 50px; @@ -57,7 +57,7 @@ a:focus { color: #ffffff; } -.nav.navbar-right>li>a>.label { +.nav.navbar-right>li>a>.label, .nav.navbar-left>li>a>.label { position: absolute; top: 9px; right: 5px; @@ -66,7 +66,7 @@ a:focus { padding: 2px 4px; line-height: .9; } -.nav.navbar-right>li>a:hover { +.nav.navbar-right>li>a:hover, .nav.navbar-left>li>a:hover { background-color: #367fa9; color: #fff; } @@ -6873,7 +6873,7 @@ body.rtls .top-navigation .footer.fixed, body.rtls.top-navigation .footer.fixed } .navbar-header { - width: 10%; + /* width: 10%; */ height: 50px; } diff --git a/ruoyi-admin/src/main/resources/static/js/resize-tabs.js b/ruoyi-admin/src/main/resources/static/js/resize-tabs.js new file mode 100644 index 00000000..07fb404c --- /dev/null +++ b/ruoyi-admin/src/main/resources/static/js/resize-tabs.js @@ -0,0 +1 @@ +(function(c,a,e){var b,d="resizeTabs",f={navSelector:".nav-tabs",itemSelector:">li",dropdownSelector:">.dropdown",dropdownItemSelector:"li",tabParentSelector:"",tabSelector:".tab-pane",activeClassName:"active",noNavClassName:".no-menu",fnCallback:""};b=function(j,i){var h=this.$tabs=e(j),k=this.options=e.extend(true,{},f,i),g=this.$nav=h.find(k.navSelector),l=this.$dropdown=g.find(k.dropdownSelector);this.$items=g.find(k.itemSelector).filter(function(){return !e(this).is(l)});this.$dropdownItems=l.find(k.dropdownItemSelector);if(k.tabParentSelector!==""){this.$tabPanel=e(k.tabParentSelector).find(k.tabSelector)}else{this.$tabPanel=h.find(k.tabSelector)}this.init()};b.prototype={init:function(){var j=this.itemsLenth=this.$items.length,h;if(j===0){throw"There should be some tags here "}if(this.$dropdown.length===0){this.flag=true;this.$nav.append('');this.$dropdown=this.$nav.find(this.options.dropdownSelector);this.$dropdown.css("opacity",0);h=this.$dropdown.width();h=h===0?90:h;this.$dropdown.addClass("hidden").css("opacity",1)}else{h=this.$dropdown.width()}this.breakpoints=[];for(var g=0;gli"+h.options.noNavClassName+":first").before(h.$items.eq(o).prop("outerHTML"))}h.$items.eq(o).hide()}},n=function(p){for(var o=0;oli").show();break}}h.$dropdownItems=h.$dropdown.find(h.options.dropdownItemSelector)};for(;jl){break}}this.$items.removeClass(g);this.$dropdownItems.removeClass(g);this.$dropdown.removeClass(g);if(j===this.breakpoints.length){if(this.flag){this.$dropdown.addClass("hidden")}else{this.$dropdown.find("ul>li:not(li"+this.options.noNavClassName+")").remove()}this.$items.show();this.$items.eq(m).addClass(g)}else{this.$dropdown.removeClass("hidden");if(this.flag){this.$dropdown.find("ul>li").remove()}else{this.$dropdown.find("ul>li:not(li"+this.options.noNavClassName+")").remove()}n(j);if(m .tab-pane { + display: none; +} + +.tab-content > .active { + display: block; +} + +.height-full { + height: 100% !important; +} + /* 设置滚动条样式 */ ::-webkit-scrollbar { width:10px!important; diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/index.js b/ruoyi-admin/src/main/resources/static/ruoyi/index.js index 705e82e4..a4ff28f1 100644 --- a/ruoyi-admin/src/main/resources/static/ruoyi/index.js +++ b/ruoyi-admin/src/main/resources/static/ruoyi/index.js @@ -81,6 +81,13 @@ function syncMenuTab(dataId) { $dataObj.parents("li").addClass("active").siblings().removeClass("active").find('li').removeClass("active"); $dataObj.parents("ul").css('height', 'auto').height(); $dataObj.click(); + // 顶部菜单同步处理 + var tabStr = $dataObj.parents(".tab-pane").attr("id"); + if ($.common.isNotEmpty(tabStr)) { + var sepIndex = tabStr.lastIndexOf('_'); + var menuId = tabStr.substring(sepIndex + 1, tabStr.length); + $("#tab_" + menuId + " a").click(); + } } } } @@ -256,6 +263,7 @@ $(function() { var $dataObj = $('a[href$="' + decodeURI(dataUrl) + '"]'); if (!$dataObj.hasClass("noactive")) { + $('.tab-pane li').removeClass("active"); $('.nav ul').removeClass("in"); $dataObj.parents("ul").addClass("in") $dataObj.parents("li").addClass("active").siblings().removeClass("active").find('li').removeClass("active"); diff --git a/ruoyi-admin/src/main/resources/templates/include.html b/ruoyi-admin/src/main/resources/templates/include.html index d4573379..f1a30568 100644 --- a/ruoyi-admin/src/main/resources/templates/include.html +++ b/ruoyi-admin/src/main/resources/templates/include.html @@ -12,7 +12,7 @@ - + diff --git a/ruoyi-admin/src/main/resources/templates/index-topnav.html b/ruoyi-admin/src/main/resources/templates/index-topnav.html new file mode 100644 index 00000000..daced74e --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/index-topnav.html @@ -0,0 +1,380 @@ + + + + + + + 若依系统首页 + + + + + + + + + + + + +
+ + + + + + +
+ +
+ + + + 刷新 +
+ + + +
+ +
+ +
+ +
+ + + + + + + + + + + + + + + + + diff --git a/ruoyi-admin/src/main/resources/templates/index.html b/ruoyi-admin/src/main/resources/templates/index.html index 7e868c85..1ae40053 100644 --- a/ruoyi-admin/src/main/resources/templates/index.html +++ b/ruoyi-admin/src/main/resources/templates/index.html @@ -204,6 +204,10 @@ 切换主题 +
  • + + 横向菜单 +
  • @@ -278,6 +282,7 @@ function resetPwd() { var url = ctx + 'system/user/profile/resetPwd'; $.modal.open("重置密码", url, '770', '380'); } + /* 切换主题 */ function switchSkin() { layer.open({ @@ -289,6 +294,15 @@ function switchSkin() { }) } +/* 切换菜单 */ +function toggleMenu() { + $.modal.confirm("确认要切换成横向菜单吗?", function() { + $.get(ctx + 'system/menuStyle/topnav',function(result){ + window.location.reload(); + }); + }) +} + /** 刷新时访问路径页签 */ function applyPath(url) { $('a[href$="' + decodeURI(url) + '"]').click(); diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/config/Global.java b/ruoyi-common/src/main/java/com/ruoyi/common/config/Global.java index 34a47fa0..f1726d69 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/config/Global.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/config/Global.java @@ -30,6 +30,9 @@ public class Global /** 获取地址开关 */ private static boolean addressEnabled; + /** 菜单导航显示风格 */ + private static String menuStyle; + public static String getName() { return name; @@ -90,6 +93,16 @@ public class Global Global.addressEnabled = addressEnabled; } + public static String getMenuStyle() + { + return menuStyle; + } + + public void setMenuStyle(String menuStyle) + { + Global.menuStyle = menuStyle; + } + /** * 获取头像上传路径 */ diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/CookieUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/CookieUtils.java new file mode 100644 index 00000000..13c1d5ed --- /dev/null +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/CookieUtils.java @@ -0,0 +1,138 @@ +package com.ruoyi.common.utils; + +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import java.net.URLEncoder; +import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * Cookie工具类 + * + * @author ruoyi + */ +public class CookieUtils +{ + /** + * 设置 Cookie(生成时间为1天) + * + * @param name 名称 + * @param value 值 + */ + public static void setCookie(HttpServletResponse response, String name, String value) + { + setCookie(response, name, value, 60 * 60 * 24); + } + + /** + * 设置 Cookie + * + * @param name 名称 + * @param value 值 + * @param maxAge 生存时间(单位秒) + * @param uri 路径 + */ + public static void setCookie(HttpServletResponse response, String name, String value, String path) + { + setCookie(response, name, value, path, 60 * 60 * 24); + } + + /** + * 设置 Cookie + * + * @param name 名称 + * @param value 值 + * @param maxAge 生存时间(单位秒) + * @param uri 路径 + */ + public static void setCookie(HttpServletResponse response, String name, String value, int maxAge) + { + setCookie(response, name, value, "/", maxAge); + } + + /** + * 设置 Cookie + * + * @param name 名称 + * @param value 值 + * @param maxAge 生存时间(单位秒) + * @param uri 路径 + */ + public static void setCookie(HttpServletResponse response, String name, String value, String path, int maxAge) + { + Cookie cookie = new Cookie(name, null); + cookie.setPath(path); + cookie.setMaxAge(maxAge); + try + { + cookie.setValue(URLEncoder.encode(value, "utf-8")); + } + catch (UnsupportedEncodingException e) + { + e.printStackTrace(); + } + response.addCookie(cookie); + } + + /** + * 获得指定Cookie的值 + * + * @param name 名称 + * @return 值 + */ + public static String getCookie(HttpServletRequest request, String name) + { + return getCookie(request, null, name, false); + } + + /** + * 获得指定Cookie的值,并删除。 + * + * @param name 名称 + * @return 值 + */ + public static String getCookie(HttpServletRequest request, HttpServletResponse response, String name) + { + return getCookie(request, response, name, true); + } + + /** + * 获得指定Cookie的值 + * + * @param request 请求对象 + * @param response 响应对象 + * @param name 名字 + * @param isRemove 是否移除 + * @return 值 + */ + public static String getCookie(HttpServletRequest request, HttpServletResponse response, String name, + boolean isRemove) + { + String value = null; + Cookie[] cookies = request.getCookies(); + if (cookies != null) + { + for (Cookie cookie : cookies) + { + if (cookie.getName().equals(name)) + { + try + { + value = URLDecoder.decode(cookie.getValue(), "utf-8"); + } + catch (UnsupportedEncodingException e) + { + e.printStackTrace(); + } + if (isRemove) + { + cookie.setMaxAge(0); + response.addCookie(cookie); + } + } + } + } + return value; + } +} diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/ServletUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/ServletUtils.java index 451b180f..a5a190cd 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/ServletUtils.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/ServletUtils.java @@ -16,6 +16,11 @@ import com.ruoyi.common.core.text.Convert; */ public class ServletUtils { + /** + * 定义移动端请求的所有可能类型 + */ + private final static String[] agent = { "Android", "iPhone", "iPod", "iPad", "Windows Phone", "MQQBrowser" }; + /** * 获取String参数 */ @@ -132,4 +137,28 @@ public class ServletUtils } return false; } + + /** + * 判断User-Agent 是不是来自于手机 + */ + public static boolean checkAgentIsMobile(String ua) + { + boolean flag = false; + if (!ua.contains("Windows NT") || (ua.contains("Windows NT") && ua.contains("compatible; MSIE 9.0;"))) + { + // 排除 苹果桌面系统 + if (!ua.contains("Windows NT") && !ua.contains("Macintosh")) + { + for (String item : agent) + { + if (ua.contains(item)) + { + flag = true; + break; + } + } + } + } + return flag; + } } diff --git a/sql/ry_20200803.sql b/sql/ry_20200903.sql similarity index 96% rename from sql/ry_20200803.sql rename to sql/ry_20200903.sql index d2df7472..7425f969 100644 --- a/sql/ry_20200803.sql +++ b/sql/ry_20200903.sql @@ -157,25 +157,25 @@ insert into sys_menu values('2', '系统监控', '0', '2', '#', ' insert into sys_menu values('3', '系统工具', '0', '3', '#', '', 'M', '0', '', 'fa fa-bars', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '系统工具目录'); insert into sys_menu values('4', '若依官网', '0', '4', 'http://ruoyi.vip', 'menuBlank', 'C', '0', '', 'fa fa-location-arrow', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '若依官网地址'); -- 二级菜单 -insert into sys_menu values('100', '用户管理', '1', '1', '/system/user', '', 'C', '0', 'system:user:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '用户管理菜单'); -insert into sys_menu values('101', '角色管理', '1', '2', '/system/role', '', 'C', '0', 'system:role:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '角色管理菜单'); -insert into sys_menu values('102', '菜单管理', '1', '3', '/system/menu', '', 'C', '0', 'system:menu:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '菜单管理菜单'); -insert into sys_menu values('103', '部门管理', '1', '4', '/system/dept', '', 'C', '0', 'system:dept:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '部门管理菜单'); -insert into sys_menu values('104', '岗位管理', '1', '5', '/system/post', '', 'C', '0', 'system:post:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '岗位管理菜单'); -insert into sys_menu values('105', '字典管理', '1', '6', '/system/dict', '', 'C', '0', 'system:dict:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '字典管理菜单'); -insert into sys_menu values('106', '参数设置', '1', '7', '/system/config', '', 'C', '0', 'system:config:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '参数设置菜单'); -insert into sys_menu values('107', '通知公告', '1', '8', '/system/notice', '', 'C', '0', 'system:notice:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '通知公告菜单'); -insert into sys_menu values('108', '日志管理', '1', '9', '#', '', 'M', '0', '', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '日志管理菜单'); -insert into sys_menu values('109', '在线用户', '2', '1', '/monitor/online', '', 'C', '0', 'monitor:online:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '在线用户菜单'); -insert into sys_menu values('110', '定时任务', '2', '2', '/monitor/job', '', 'C', '0', 'monitor:job:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '定时任务菜单'); -insert into sys_menu values('111', '数据监控', '2', '3', '/monitor/data', '', 'C', '0', 'monitor:data:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '数据监控菜单'); -insert into sys_menu values('112', '服务监控', '2', '3', '/monitor/server', '', 'C', '0', 'monitor:server:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '服务监控菜单'); -insert into sys_menu values('113', '表单构建', '3', '1', '/tool/build', '', 'C', '0', 'tool:build:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '表单构建菜单'); -insert into sys_menu values('114', '代码生成', '3', '2', '/tool/gen', '', 'C', '0', 'tool:gen:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '代码生成菜单'); -insert into sys_menu values('115', '系统接口', '3', '3', '/tool/swagger', '', 'C', '0', 'tool:swagger:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '系统接口菜单'); +insert into sys_menu values('100', '用户管理', '1', '1', '/system/user', '', 'C', '0', 'system:user:view', 'fa fa-user-o', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '用户管理菜单'); +insert into sys_menu values('101', '角色管理', '1', '2', '/system/role', '', 'C', '0', 'system:role:view', 'fa fa-user-secret', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '角色管理菜单'); +insert into sys_menu values('102', '菜单管理', '1', '3', '/system/menu', '', 'C', '0', 'system:menu:view', 'fa fa-th-list', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '菜单管理菜单'); +insert into sys_menu values('103', '部门管理', '1', '4', '/system/dept', '', 'C', '0', 'system:dept:view', 'fa fa-outdent', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '部门管理菜单'); +insert into sys_menu values('104', '岗位管理', '1', '5', '/system/post', '', 'C', '0', 'system:post:view', 'fa fa-address-card-o', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '岗位管理菜单'); +insert into sys_menu values('105', '字典管理', '1', '6', '/system/dict', '', 'C', '0', 'system:dict:view', 'fa fa-bookmark-o', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '字典管理菜单'); +insert into sys_menu values('106', '参数设置', '1', '7', '/system/config', '', 'C', '0', 'system:config:view', 'fa fa-sun-o', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '参数设置菜单'); +insert into sys_menu values('107', '通知公告', '1', '8', '/system/notice', '', 'C', '0', 'system:notice:view', 'fa fa-bullhorn', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '通知公告菜单'); +insert into sys_menu values('108', '日志管理', '1', '9', '#', '', 'M', '0', '', 'fa fa-pencil-square-o', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '日志管理菜单'); +insert into sys_menu values('109', '在线用户', '2', '1', '/monitor/online', '', 'C', '0', 'monitor:online:view', 'fa fa-user-circle', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '在线用户菜单'); +insert into sys_menu values('110', '定时任务', '2', '2', '/monitor/job', '', 'C', '0', 'monitor:job:view', 'fa fa-tasks', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '定时任务菜单'); +insert into sys_menu values('111', '数据监控', '2', '3', '/monitor/data', '', 'C', '0', 'monitor:data:view', 'fa fa-bug', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '数据监控菜单'); +insert into sys_menu values('112', '服务监控', '2', '3', '/monitor/server', '', 'C', '0', 'monitor:server:view', 'fa fa-server', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '服务监控菜单'); +insert into sys_menu values('113', '表单构建', '3', '1', '/tool/build', '', 'C', '0', 'tool:build:view', 'fa fa-wpforms', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '表单构建菜单'); +insert into sys_menu values('114', '代码生成', '3', '2', '/tool/gen', '', 'C', '0', 'tool:gen:view', 'fa fa-code', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '代码生成菜单'); +insert into sys_menu values('115', '系统接口', '3', '3', '/tool/swagger', '', 'C', '0', 'tool:swagger:view', 'fa fa-gg', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '系统接口菜单'); -- 三级菜单 -insert into sys_menu values('500', '操作日志', '108', '1', '/monitor/operlog', '', 'C', '0', 'monitor:operlog:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '操作日志菜单'); -insert into sys_menu values('501', '登录日志', '108', '2', '/monitor/logininfor', '', 'C', '0', 'monitor:logininfor:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '登录日志菜单'); +insert into sys_menu values('500', '操作日志', '108', '1', '/monitor/operlog', '', 'C', '0', 'monitor:operlog:view', 'fa fa-address-book', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '操作日志菜单'); +insert into sys_menu values('501', '登录日志', '108', '2', '/monitor/logininfor', '', 'C', '0', 'monitor:logininfor:view', 'fa fa-file-image-o', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '登录日志菜单'); -- 用户管理按钮 insert into sys_menu values('1000', '用户查询', '100', '1', '#', '', 'F', '0', 'system:user:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); insert into sys_menu values('1001', '用户新增', '100', '2', '#', '', 'F', '0', 'system:user:add', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');