mirror of https://gitee.com/y_project/RuoYi.git
新增菜单导航显示风格(default为左侧导航菜单,topnav为顶部导航菜单)
parent
947120d136
commit
bf1e52fd9d
|
@ -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)
|
||||
|
|
|
@ -12,6 +12,8 @@ ruoyi:
|
|||
profile: D:/ruoyi/uploadPath
|
||||
# 获取ip地址开关
|
||||
addressEnabled: false
|
||||
# 菜单导航显示风格(default为左侧导航菜单,topnav为顶部导航菜单)
|
||||
menuStyle: default
|
||||
|
||||
# 开发环境配置
|
||||
server:
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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('<li class="dropdown" role="presentation">'+'<a class="dropdown-toggle" data-toggle="dropdown" href="#" aria-expanded="false">'+'<i class="glyphicon glyphicon-align-justify"></i> <b class="caret"></b></a><ul class="dropdown-menu" role="menu"></ul></li>');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;g<j+1;g++){var k=this.$items.eq(g).width(),l=0;switch(g){case 0:l=k+h;break;case j-1:l=this.breakpoints[g-1]+k-h;break;case j:l=this.breakpoints[g-1]+h;break;default:l=this.breakpoints[g-1]+k}this.breakpoints.push(l)}if(typeof this.options.fnCallback==="function"){this.options.fnCallback(this.$tabs)}this.bind();this.layout()},layout:function(){if(this.breakpoints.length<=0){return}var l=this.$tabs.width()-500,j=0,h=this,g=this.options.activeClassName,m=this.$tabPanel.filter("."+g).index(),k=function(p){var o=p;if(p===h.itemsLenth){o=p-1}for(;o<h.itemsLenth;o++){if(h.flag){h.$dropdown.find("ul").append(h.$items.eq(o).prop("outerHTML"))}else{h.$dropdown.find("ul>li"+h.options.noNavClassName+":first").before(h.$items.eq(o).prop("outerHTML"))}h.$items.eq(o).hide()}},n=function(p){for(var o=0;o<h.itemsLenth+1;o++){if(o<p){h.$items.eq(o).show()}else{k(p);h.$dropdown.find("ul>li").show();break}}h.$dropdownItems=h.$dropdown.find(h.options.dropdownItemSelector)};for(;j<this.breakpoints.length;j++){if(this.breakpoints[j]>l){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<j){this.$items.eq(m-1).addClass(g)}else{this.$dropdown.addClass(g);this.$dropdownItems.eq(m-j).addClass(g)}}},throttle:function(h,g){var k=h,j,i=true;return function(){var m=arguments,l=this;if(i){k.apply(l,m);i=false}if(j){return false}j=setInterval(function(){clearInterval(j);j=null;k.apply(l,m)},g||500)}},bind:function(){var g=this;e(c).resize(function(){g.throttle(function(){g.layout()},1000)()})}};e.fn[d]=function(g){if(typeof g==="string"){var i=g,h=Array.prototype.slice.call(arguments,1);if(/^_/.test(i)){console.error("No such method : "+g)}else{return this.each(function(){var j=e.data(this,d);if(j&&typeof j[i]==="function"){j[i].apply(j,h)}})}}else{return this.each(function(){if(!e.data(this,d)){e.data(this,d,new b(this,g))}else{e.data(this,d).init()}})}}})(window,document,jQuery);$("#navMenu").resizeTabs({tabParentSelector:"#side-menu"});
|
|
@ -1056,6 +1056,23 @@ label {
|
|||
visibility: visible;
|
||||
}
|
||||
|
||||
/* 设置菜单样式 */
|
||||
.menu-content {
|
||||
padding: 10px 10px 10px 25px !important;
|
||||
}
|
||||
|
||||
.tab-content > .tab-pane {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.tab-content > .active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.height-full {
|
||||
height: 100% !important;
|
||||
}
|
||||
|
||||
/* 设置滚动条样式 */
|
||||
::-webkit-scrollbar {
|
||||
width:10px!important;
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<!-- bootstrap-table 表格插件样式 -->
|
||||
<link th:href="@{/ajax/libs/bootstrap-table/bootstrap-table.min.css?v=20200727}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/animate.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/style.css?v=20200727}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/style.css?v=20200903}" rel="stylesheet"/>
|
||||
<link th:href="@{/ruoyi/css/ry-ui.css?v=4.4.0}" rel="stylesheet"/>
|
||||
</head>
|
||||
|
||||
|
|
|
@ -0,0 +1,380 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="renderer" content="webkit">
|
||||
<title>若依系统首页</title>
|
||||
<!-- 避免IE使用兼容模式 -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<link th:href="@{favicon.ico}" rel="shortcut icon"/>
|
||||
<link th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/jquery.contextMenu.min.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/animate.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/style.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/skins.css?v=20200902}" rel="stylesheet"/>
|
||||
<link th:href="@{/ruoyi/css/ry-ui.css?v=4.4.0}" rel="stylesheet"/>
|
||||
</head>
|
||||
<body class="fixed-sidebar full-height-layout gray-bg" style="overflow: hidden">
|
||||
<div id="wrapper">
|
||||
|
||||
<!--左侧导航开始-->
|
||||
<nav class="navbar-default navbar-static-side" role="navigation">
|
||||
<div class="nav-close">
|
||||
<i class="fa fa-times-circle"></i>
|
||||
</div>
|
||||
<a th:href="@{/index}">
|
||||
<li class="logo hidden-xs">
|
||||
<span class="logo-lg">RuoYi</span>
|
||||
</li>
|
||||
</a>
|
||||
<div class="sidebar-collapse tab-content" id="side-menu">
|
||||
<div class="user-panel">
|
||||
<a class="menuItem noactive" title="个人中心" th:href="@{/system/user/profile}">
|
||||
<div class="hide" th:text="个人中心"></div>
|
||||
<div class="pull-left image">
|
||||
<img th:src="(${#strings.isEmpty(user.avatar)}) ? @{/img/profile.jpg} : @{${user.avatar}}" th:onerror="this.src='img/profile.jpg'" class="img-circle" alt="User Image">
|
||||
</div>
|
||||
</a>
|
||||
<div class="pull-left info">
|
||||
<p>[[${user.loginName}]]</p>
|
||||
<a href="#"><i class="fa fa-circle text-success"></i> 在线</a>
|
||||
<a th:href="@{logout}" style="padding-left:5px;"><i class="fa fa-sign-out text-danger"></i> 注销</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 左侧菜单 -->
|
||||
<th:block th:each="menu : ${menus}">
|
||||
<div class="tab-pane fade height-full" th:id="|menu_${menu.menuId}|" th:classappend="${menu.menuId == 1} ? |active in|">
|
||||
<ul class="nav">
|
||||
<li th:each="cmenu : ${menu.children}">
|
||||
<a class="menu-content" th:if="${#lists.isEmpty(cmenu.children)}" th:href="@{${cmenu.url}}" th:classappend="${#strings.isEmpty(cmenu.target)} ? |menuItem| : ${cmenu.target}">
|
||||
<i th:class="${cmenu.icon}"></i> <span class="nav-label">[[${cmenu.menuName}]]</span>
|
||||
</a>
|
||||
<a class="menu-content" th:if="${not #lists.isEmpty(cmenu.children)}" href="#">
|
||||
<i th:class="${cmenu.icon}"></i>
|
||||
<span class="nav-label">[[${cmenu.menuName}]]</span>
|
||||
<span class="fa arrow"></span>
|
||||
</a>
|
||||
<ul th:if="${not #lists.isEmpty(cmenu.children)}" class="nav nav-second-level collapse">
|
||||
<li th:each="emenu : ${cmenu.children}">
|
||||
<a th:if="${#lists.isEmpty(emenu.children)}" th:href="@{${emenu.url}}" th:class="${#strings.isEmpty(emenu.target)} ? |menuItem| : ${emenu.target}">
|
||||
<i th:class="${emenu.icon}"></i>
|
||||
<span class="nav-label">[[${emenu.menuName}]]</span>
|
||||
</a>
|
||||
<a th:if="${not #lists.isEmpty(emenu.children)}" href="#">
|
||||
<i th:class="${emenu.icon}"></i>
|
||||
<span class="nav-label">[[${emenu.menuName}]]</span>
|
||||
<span class="fa arrow"></span>
|
||||
</a>
|
||||
<ul th:if="${not #lists.isEmpty(emenu.children)}" class="nav nav-third-level collapse">
|
||||
<li th:each="fmenu : ${emenu.children}"><a th:if="${#lists.isEmpty(fmenu.children)}" th:class="${#strings.isEmpty(fmenu.target)} ? |menuItem| : ${fmenu.target}" th:href="@{${fmenu.url}}">[[${fmenu.menuName}]]</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</th:block>
|
||||
|
||||
<!-- 首页菜单 -->
|
||||
<div class="tab-pane fade height-full" id="index">
|
||||
<ul class="nav">
|
||||
<li>
|
||||
<a class="menuItem" th:href="@{/system/main}">
|
||||
<i class="fa fa-home"></i> <span class="nav-label">首页</span></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- 实例演示菜单 -->
|
||||
<div class="tab-pane fade height-full" id="demo" th:if="${demoEnabled}">
|
||||
<ul class="nav">
|
||||
<li>
|
||||
<a href="#"><i class="fa fa-edit"></i> <span class="nav-label">表单</span><span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-second-level collapse">
|
||||
<li><a class="menuItem" th:href="@{/demo/form/button}">按钮</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/grid}">栅格</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/select}">下拉框</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/timeline}">时间轴</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/basic}">基本表单</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/cards}">卡片列表</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/jasny}">功能扩展</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/sortable}">拖动排序</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/tabs_panels}">选项卡 & 面板</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/validate}">表单校验</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/wizard}">表单向导</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/upload}">文件上传</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/datetime}">日期和时间</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/summernote}">富文本编辑器</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/duallistbox}">左右互选组件</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/autocomplete}">搜索自动补全</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/cxselect}">多级联动下拉</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/localrefresh}">Ajax局部刷新</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#"><i class="fa fa-table"></i> <span class="nav-label">表格</span><span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-second-level collapse">
|
||||
<li><a class="menuItem" th:href="@{/demo/table/search}">查询条件</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/footer}">数据汇总</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/groupHeader}">组合表头</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/export}">表格导出</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/remember}">翻页记住选择</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/pageGo}">跳转至指定页</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/params}">自定义查询参数</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/multi}">初始多表格</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/button}">点击按钮加载表格</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/data}">直接加载表格数据</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/fixedColumns}">表格冻结列</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/event}">自定义触发事件</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/detail}">表格细节视图</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/child}">表格父子视图</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/image}">表格图片预览</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/curd}">动态增删改查</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/reorder}">表格拖拽操作</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/editable}">表格行内编辑</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/subdata}">主子表提交</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/refresh}">表格自动刷新</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/print}">表格打印配置</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/other}">表格其他操作</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#"><i class="fa fa-flask"></i> <span class="nav-label">弹框</span><span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-second-level collapse">
|
||||
<li><a class="menuItem" th:href="@{/demo/modal/dialog}">模态窗口</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/modal/layer}">弹层组件</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/modal/table}">弹层表格</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#"><i class="fa fa-wpforms"></i> <span class="nav-label">操作</span><span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-second-level collapse">
|
||||
<li><a class="menuItem" th:href="@{/demo/operate/table}">表格</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/operate/other}">其他</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#"><i class="fa fa-bar-chart-o"></i> <span class="nav-label">报表</span><span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-second-level collapse">
|
||||
<li><a class="menuItem" th:href="@{/demo/report/echarts}">百度ECharts</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/report/peity}">peity</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/report/sparkline}">sparkline</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/report/metrics}">图表组合</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#"><i class="fa fa-book"></i> <span class="nav-label">图标</span><span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-second-level collapse">
|
||||
<li><a class="menuItem" th:href="@{/demo/icon/fontawesome}">Font Awesome</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/icon/glyphicons}">Glyphicons</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#"><i class="fa fa-navicon"></i> <span class="nav-label">四层菜单</span><span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-second-level collapse">
|
||||
<li>
|
||||
<a href="#" id="damian">三级菜单1<span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-third-level collapse">
|
||||
<li>
|
||||
<a href="#">四级菜单1</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">四级菜单2</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#">三级菜单2</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<!--左侧导航结束-->
|
||||
|
||||
<!--右侧部分开始-->
|
||||
<div id="page-wrapper" class="gray-bg dashbard-1">
|
||||
<div class="row border-bottom">
|
||||
<nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
|
||||
<div class="navbar-header">
|
||||
<a class="navbar-minimalize minimalize-styl-2" style="color:#FFF;" href="#" title="收起菜单">
|
||||
<i class="fa fa-bars"></i>
|
||||
</a>
|
||||
</div>
|
||||
<!-- 顶部栏 -->
|
||||
<div id="navMenu">
|
||||
<ul class="nav navbar-toolbar nav-tabs navbar-left hidden-xs">
|
||||
|
||||
<!-- 顶部菜单列表 -->
|
||||
<th:block th:each="menu : ${menus}">
|
||||
<li role="presentation" th:id="|tab_${menu.menuId}|">
|
||||
<a data-toggle="tab" th:class="@{${!#strings.isEmpty(menu.target) && menu.target == 'menuBlank'} ? 'menuBlank'}" th:href="@{${!#strings.isEmpty(menu.target) && target != 'menuBlank'} ? ${menu.url} : |#menu_${menu.menuId}|}">
|
||||
<i th:class="${menu.icon}"></i> <span>[[${menu.menuName}]]</span>
|
||||
</a>
|
||||
</li>
|
||||
</th:block>
|
||||
|
||||
<li role="presentation" id="tab_index">
|
||||
<a data-toggle="tab" href="#index">
|
||||
<i class="fa fa-area-chart"></i> <span>统计报表</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li role="presentation" id="tab_demo">
|
||||
<a data-toggle="tab" href="#demo">
|
||||
<i class="fa fa-desktop"></i> <span>实例演示</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 右侧栏 -->
|
||||
<ul class="nav navbar-top-links navbar-right welcome-message">
|
||||
<li><a title="视频教程" href="http://doc.ruoyi.vip/ruoyi/document/spjc.html" target="_blank"><i class="fa fa-video-camera"></i> 视频教程</a></li>
|
||||
<li><a title="开发文档" href="http://doc.ruoyi.vip" target="_blank"><i class="fa fa-question-circle"></i> 开发文档</a></li>
|
||||
<li><a title="全屏显示" href="javascript:void(0)" id="fullScreen"><i class="fa fa-arrows-alt"></i> 全屏显示</a></li>
|
||||
<li class="dropdown user-menu">
|
||||
<a href="javascript:void(0)" class="dropdown-toggle" data-hover="dropdown">
|
||||
<img th:src="(${#strings.isEmpty(user.avatar)}) ? @{/img/profile.jpg} : @{${user.avatar}}" th:onerror="this.src='img/profile.jpg'" class="user-image">
|
||||
<span class="hidden-xs">[[${#strings.defaultString(user.userName, '-')}]]</span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li class="mt5">
|
||||
<a th:href="@{/system/user/profile}" class="menuItem">
|
||||
<i class="fa fa-user"></i> 个人中心</a>
|
||||
</li>
|
||||
<li>
|
||||
<a onclick="resetPwd()">
|
||||
<i class="fa fa-key"></i> 修改密码</a>
|
||||
</li>
|
||||
<li>
|
||||
<a onclick="switchSkin()">
|
||||
<i class="fa fa-dashboard"></i> 切换主题</a>
|
||||
</li>
|
||||
<li>
|
||||
<a onclick="toggleMenu()">
|
||||
<i class="fa fa-toggle-off"></i> 左侧菜单</a>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
<li>
|
||||
<a th:href="@{logout}">
|
||||
<i class="fa fa-sign-out"></i> 退出登录</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="row content-tabs">
|
||||
<button class="roll-nav roll-left tabLeft">
|
||||
<i class="fa fa-backward"></i>
|
||||
</button>
|
||||
<nav class="page-tabs menuTabs">
|
||||
<div class="page-tabs-content">
|
||||
<a href="javascript:;" class="active menuTab" th:data-id="@{/system/main}">首页</a>
|
||||
</div>
|
||||
</nav>
|
||||
<button class="roll-nav roll-right tabRight">
|
||||
<i class="fa fa-forward"></i>
|
||||
</button>
|
||||
<a href="javascript:void(0);" class="roll-nav roll-right tabReload"><i class="fa fa-refresh"></i> 刷新</a>
|
||||
</div>
|
||||
|
||||
<a id="ax_close_max" class="ax_close_max" href="#" title="关闭全屏"> <i class="fa fa-times-circle-o"></i> </a>
|
||||
|
||||
<div class="row mainContent" id="content-main">
|
||||
<iframe class="RuoYi_iframe" name="iframe0" width="100%" height="100%" th:data-id="@{/system/main}"
|
||||
th:src="@{/system/main}" frameborder="0" seamless></iframe>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<div class="pull-right">© [[${copyrightYear}]] RuoYi Copyright </div>
|
||||
</div>
|
||||
</div>
|
||||
<!--右侧部分结束-->
|
||||
</div>
|
||||
<!-- 全局js -->
|
||||
<script th:src="@{/js/jquery.min.js}"></script>
|
||||
<script th:src="@{/js/bootstrap.min.js}"></script>
|
||||
<script th:src="@{/js/plugins/metisMenu/jquery.metisMenu.js}"></script>
|
||||
<script th:src="@{/js/plugins/slimscroll/jquery.slimscroll.min.js}"></script>
|
||||
<script th:src="@{/js/jquery.contextMenu.min.js}"></script>
|
||||
<script th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script>
|
||||
<script th:src="@{/ajax/libs/layer/layer.min.js}"></script>
|
||||
<script th:src="@{/ruoyi/js/ry-ui.js?v=4.4.0}"></script>
|
||||
<script th:src="@{/ruoyi/js/common.js?v=4.4.0}"></script>
|
||||
<script th:src="@{/ruoyi/index.js?v=20200902}"></script>
|
||||
<script th:src="@{/ajax/libs/fullscreen/jquery.fullscreen.js}"></script>
|
||||
<script th:src="@{/ajax/libs/fullscreen/jquery.fullscreen.js}"></script>
|
||||
<script th:src="@{/js/resize-tabs.js}"></script>
|
||||
<script th:inline="javascript">
|
||||
var ctx = [[@{/}]];
|
||||
// 皮肤缓存
|
||||
var skin = storage.get("skin");
|
||||
// history(表示去掉地址的#)否则地址以"#"形式展示
|
||||
var mode = "history";
|
||||
// 历史访问路径缓存
|
||||
var historyPath = storage.get("historyPath");
|
||||
// 是否页签与菜单联动
|
||||
var isLinkage = true;
|
||||
|
||||
// 本地主题优先,未设置取系统配置
|
||||
if($.common.isNotEmpty(skin)){
|
||||
$("body").addClass(skin.split('|')[0]);
|
||||
$("body").addClass(skin.split('|')[1]);
|
||||
} else {
|
||||
$("body").addClass([[${sideTheme}]]);
|
||||
$("body").addClass([[${skinName}]]);
|
||||
}
|
||||
|
||||
/* 用户管理-重置密码 */
|
||||
function resetPwd() {
|
||||
var url = ctx + 'system/user/profile/resetPwd';
|
||||
$.modal.open("重置密码", url, '770', '380');
|
||||
}
|
||||
/* 切换主题 */
|
||||
function switchSkin() {
|
||||
layer.open({
|
||||
type : 2,
|
||||
shadeClose : true,
|
||||
title : "切换主题",
|
||||
area : ["530px", "386px"],
|
||||
content : [ctx + "system/switchSkin", 'no']
|
||||
})
|
||||
}
|
||||
|
||||
/* 切换菜单 */
|
||||
function toggleMenu() {
|
||||
$.modal.confirm("确认要切换成左侧菜单吗?", function() {
|
||||
$.get(ctx + 'system/menuStyle/left',function(result){
|
||||
window.location.reload();
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
/** 刷新时访问路径页签 */
|
||||
function applyPath(url) {
|
||||
$('a[href$="' + decodeURI(url) + '"]').click();
|
||||
if (!$('a[href$="' + url + '"]').hasClass("noactive")) {
|
||||
$('a[href$="' + url + '"]').parent("li").addClass("selected").parents("li").addClass("active").end().parents("ul").addClass("in");
|
||||
}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
if($.common.equals("history", mode) && window.performance.navigation.type == 1) {
|
||||
var url = storage.get('publicPath');
|
||||
if ($.common.isNotEmpty(url)) {
|
||||
applyPath(url);
|
||||
}
|
||||
} else {
|
||||
var hash = location.hash;
|
||||
if ($.common.isNotEmpty(hash)) {
|
||||
var url = hash.substring(1, hash.length);
|
||||
applyPath(url);
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -204,6 +204,10 @@
|
|||
<a onclick="switchSkin()">
|
||||
<i class="fa fa-dashboard"></i> 切换主题</a>
|
||||
</li>
|
||||
<li>
|
||||
<a onclick="toggleMenu()">
|
||||
<i class="fa fa-toggle-off"></i> 横向菜单</a>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
<li>
|
||||
<a th:href="@{logout}">
|
||||
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取头像上传路径
|
||||
*/
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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', '');
|
Loading…
Reference in New Issue