Compare commits
17 Commits
Author | SHA1 | Date | |
---|---|---|---|
7c48bc3184 | |||
91986f13f8 | |||
7728ad9eb4 | |||
868aed4079 | |||
9627ba9e1d | |||
e0e305c423 | |||
ed4280379d | |||
233089b3e6 | |||
bb0e7bd563 | |||
7bca4fcbc4 | |||
1b7a735f9c | |||
829dfafdaa | |||
5a59670124 | |||
2499685a31 | |||
a3bb603382 | |||
9ad3cc0b9a | |||
690a9a6281 |
6
pom.xml
6
pom.xml
@ -6,18 +6,18 @@
|
||||
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<version>4.3.0</version>
|
||||
<version>4.3.1</version>
|
||||
|
||||
<name>ruoyi</name>
|
||||
<url>http://www.ruoyi.vip</url>
|
||||
<description>若依管理系统</description>
|
||||
|
||||
<properties>
|
||||
<ruoyi.version>4.3.0</ruoyi.version>
|
||||
<ruoyi.version>4.3.1</ruoyi.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<shiro.version>1.4.2</shiro.version>
|
||||
<shiro.version>1.5.3</shiro.version>
|
||||
<thymeleaf.extras.shiro.version>2.0.0</thymeleaf.extras.shiro.version>
|
||||
<mybatis.boot.version>1.3.2</mybatis.boot.version>
|
||||
<druid.version>1.1.14</druid.version>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<version>4.3.0</version>
|
||||
<version>4.3.1</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<packaging>jar</packaging>
|
||||
|
@ -3,7 +3,7 @@ ruoyi:
|
||||
# 名称
|
||||
name: RuoYi
|
||||
# 版本
|
||||
version: 4.3.0
|
||||
version: 4.3.1
|
||||
# 版权年份
|
||||
copyrightYear: 2019
|
||||
# 实例演示开关
|
||||
@ -108,6 +108,8 @@ shiro:
|
||||
httpOnly: true
|
||||
# 设置Cookie的过期时间,天为单位
|
||||
maxAge: 30
|
||||
# 设置密钥,务必保持唯一性(生成方式,直接拷贝到main运行即可)KeyGenerator keygen = KeyGenerator.getInstance("AES"); SecretKey deskey = keygen.generateKey(); System.out.println(Base64.encodeToString(deskey.getEncoded()));
|
||||
cipherKey: zSyK5Kp6PZAAjlT+eeNMlg==
|
||||
session:
|
||||
# Session超时时间,-1代表永不过期(默认30分钟)
|
||||
expireTime: 30
|
||||
|
@ -30,12 +30,12 @@ $(function() {
|
||||
}
|
||||
SmoothlyMenu();
|
||||
});
|
||||
|
||||
|
||||
$('#side-menu>li').click(function() {
|
||||
if ($('body').hasClass('canvas-menu mini-navbar')) {
|
||||
NavToggle();
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
$('#side-menu>li li a:not(:has(span))').click(function() {
|
||||
if ($(window).width() < 769) {
|
||||
@ -72,6 +72,19 @@ $(window).bind("load resize", function() {
|
||||
}
|
||||
});
|
||||
|
||||
function syncMenuTab(dataId) {
|
||||
if(isLinkage) {
|
||||
var $dataObj = $('a[href$="' + decodeURI(dataId) + '"]');
|
||||
if (!$dataObj.hasClass("noactive")) {
|
||||
$('.nav ul').removeClass("in");
|
||||
$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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function NavToggle() {
|
||||
$('.navbar-minimalize').trigger('click');
|
||||
}
|
||||
@ -114,11 +127,12 @@ $(function() {
|
||||
});
|
||||
return width;
|
||||
}
|
||||
|
||||
|
||||
// 激活指定选项卡
|
||||
function setActiveTab(element) {
|
||||
if (!$(element).hasClass('active')) {
|
||||
var currentId = $(element).data('id');
|
||||
syncMenuTab(currentId);
|
||||
// 显示tab对应的内容区
|
||||
$('.RuoYi_iframe').each(function() {
|
||||
if ($(this).data('id') == currentId) {
|
||||
@ -239,9 +253,12 @@ $(function() {
|
||||
dataIndex = $(this).data('index'),
|
||||
menuName = $.trim($(this).text()),
|
||||
flag = true;
|
||||
$(".nav ul li, .nav li").removeClass("selected");
|
||||
$(this).parent("li").addClass("selected");
|
||||
setIframeUrl($(this).attr("href"));
|
||||
|
||||
if (!$('a[href$="' + dataUrl + '"]').hasClass("noactive")) {
|
||||
$(".nav ul li, .nav li").removeClass("selected");
|
||||
$(this).parent("li").addClass("selected");
|
||||
}
|
||||
setIframeUrl(dataUrl);
|
||||
if (dataUrl == undefined || $.trim(dataUrl).length == 0) return false;
|
||||
|
||||
// 选项卡菜单已存在
|
||||
@ -270,20 +287,20 @@ $(function() {
|
||||
// 添加选项卡对应的iframe
|
||||
var str1 = '<iframe class="RuoYi_iframe" name="iframe' + dataIndex + '" width="100%" height="100%" src="' + dataUrl + '" frameborder="0" data-id="' + dataUrl + '" seamless></iframe>';
|
||||
$('.mainContent').find('iframe.RuoYi_iframe').hide().parents('.mainContent').append(str1);
|
||||
|
||||
|
||||
$.modal.loading("数据加载中,请稍后...");
|
||||
|
||||
|
||||
$('.mainContent iframe:visible').load(function () {
|
||||
$.modal.closeLoading();
|
||||
});
|
||||
|
||||
|
||||
// 添加选项卡
|
||||
$('.menuTabs .page-tabs-content').append(str);
|
||||
scrollToTab($('.menuTab.active'));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
function menuBlank() {
|
||||
// 新窗口打开外网以http://开头,如http://ruoyi.vip
|
||||
var dataUrl = $(this).attr('href');
|
||||
@ -292,7 +309,7 @@ $(function() {
|
||||
}
|
||||
|
||||
$('.menuItem').on('click', menuItem);
|
||||
|
||||
|
||||
$('.menuBlank').on('click', menuBlank);
|
||||
|
||||
// 关闭选项卡菜单
|
||||
@ -357,7 +374,7 @@ $(function() {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
if($.common.isNotEmpty(panelUrl)){
|
||||
$('.menuTab[data-id="' + panelUrl + '"]').addClass('active').siblings('.menuTab').removeClass('active');
|
||||
$('.mainContent .RuoYi_iframe').each(function() {
|
||||
@ -383,10 +400,10 @@ $(function() {
|
||||
});
|
||||
}
|
||||
scrollToTab($('.menuTab.active'));
|
||||
setIframeUrl($('.page-tabs-content').find('.active').attr('data-id'));
|
||||
syncMenuTab($('.page-tabs-content').find('.active').attr('data-id'));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
$('.menuTabs').on('click', '.menuTab i', closeTab);
|
||||
|
||||
//滚动到已激活的选项卡
|
||||
@ -399,6 +416,7 @@ $(function() {
|
||||
function activeTab() {
|
||||
if (!$(this).hasClass('active')) {
|
||||
var currentId = $(this).data('id');
|
||||
syncMenuTab(currentId);
|
||||
// 显示tab对应的内容区
|
||||
$('.mainContent .RuoYi_iframe').each(function() {
|
||||
if ($(this).data('id') == currentId) {
|
||||
@ -421,19 +439,19 @@ $(function() {
|
||||
var url = target.attr('src');
|
||||
target.attr('src', url).ready();
|
||||
}
|
||||
|
||||
|
||||
// 页签全屏
|
||||
function fullScreenTab() {
|
||||
var currentId = $('.page-tabs-content').find('.active').attr('data-id');
|
||||
var target = $('.RuoYi_iframe[data-id="' + currentId + '"]');
|
||||
target.fullScreen(true);
|
||||
}
|
||||
|
||||
|
||||
// 关闭当前选项卡
|
||||
function tabCloseCurrent() {
|
||||
$('.page-tabs-content').find('.active i').trigger("click");
|
||||
}
|
||||
|
||||
|
||||
//关闭其他选项卡
|
||||
function tabCloseOther() {
|
||||
$('.page-tabs-content').children("[data-id]").not(":first").not(".active").each(function() {
|
||||
@ -441,9 +459,8 @@ $(function() {
|
||||
$(this).remove();
|
||||
});
|
||||
$('.page-tabs-content').css("margin-left", "0");
|
||||
setIframeUrl($('.page-tabs-content').find('.active').attr('data-id'));
|
||||
}
|
||||
|
||||
|
||||
// 关闭全部选项卡
|
||||
function tabCloseAll() {
|
||||
$('.page-tabs-content').children("[data-id]").not(":first").each(function() {
|
||||
@ -455,18 +472,18 @@ $(function() {
|
||||
$(this).addClass("active");
|
||||
});
|
||||
$('.page-tabs-content').css("margin-left", "0");
|
||||
setIframeUrl($('.page-tabs-content').find('.active').attr('data-id'));
|
||||
syncMenuTab($('.page-tabs-content').find('.active').attr('data-id'));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 全屏显示
|
||||
$('#fullScreen').on('click', function () {
|
||||
$(document).toggleFullScreen();
|
||||
});
|
||||
|
||||
|
||||
// 页签刷新按钮
|
||||
$('.tabReload').on('click', refreshTab);
|
||||
|
||||
|
||||
// 页签全屏按钮
|
||||
$('.tabFullScreen').on('click', fullScreenTab);
|
||||
|
||||
@ -478,33 +495,33 @@ $(function() {
|
||||
|
||||
// 右移按扭
|
||||
$('.tabRight').on('click', scrollTabRight);
|
||||
|
||||
|
||||
// 关闭当前
|
||||
$('.tabCloseCurrent').on('click', tabCloseCurrent);
|
||||
|
||||
|
||||
// 关闭其他
|
||||
$('.tabCloseOther').on('click', tabCloseOther);
|
||||
|
||||
// 关闭全部
|
||||
$('.tabCloseAll').on('click', tabCloseAll);
|
||||
|
||||
|
||||
// tab全屏显示
|
||||
$('.tabMaxCurrent').on('click', function () {
|
||||
$('.page-tabs-content').find('.active').trigger("dblclick");
|
||||
});
|
||||
|
||||
|
||||
// 关闭全屏
|
||||
$('#ax_close_max').click(function(){
|
||||
$('#content-main').toggleClass('max');
|
||||
$('#ax_close_max').hide();
|
||||
})
|
||||
|
||||
|
||||
// 双击选项卡全屏显示
|
||||
function activeTabMax() {
|
||||
$('#content-main').toggleClass('max');
|
||||
$('#ax_close_max').show();
|
||||
}
|
||||
|
||||
|
||||
// 设置锚点
|
||||
function setIframeUrl(href) {
|
||||
if($.common.equals("history", mode)) {
|
||||
@ -515,20 +532,20 @@ $(function() {
|
||||
window.location.href = newUrl + "#" + href;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$(window).keydown(function(event) {
|
||||
if (event.keyCode == 27) {
|
||||
$('#content-main').removeClass('max');
|
||||
$('#ax_close_max').hide();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
window.onhashchange = function() {
|
||||
var hash = location.hash;
|
||||
var url = hash.substring(1, hash.length);
|
||||
$('a[href$="' + url + '"]').click();
|
||||
};
|
||||
|
||||
|
||||
// 右键菜单实现
|
||||
$.contextMenu({
|
||||
selector: ".menuTab",
|
||||
|
@ -801,22 +801,34 @@ var table = {
|
||||
options.callBack(index, layero);
|
||||
}
|
||||
}
|
||||
layer.open({
|
||||
type: 2,
|
||||
maxmin: true,
|
||||
shade: 0.3,
|
||||
title: _title,
|
||||
fix: false,
|
||||
area: [_width + 'px', _height + 'px'],
|
||||
content: _url,
|
||||
shadeClose: $.common.isEmpty(options.shadeClose) ? true : options.shadeClose,
|
||||
skin: options.skin,
|
||||
btn: $.common.isEmpty(options.btn) ? _btn : options.btn,
|
||||
yes: options.yes,
|
||||
cancel: function () {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
var btnCallback = {};
|
||||
if(options.btn instanceof Array){
|
||||
for (var i = 1, len = options.btn.length; i < len; i++) {
|
||||
var btn = options["btn" + (i + 1)];
|
||||
if (btn) {
|
||||
btnCallback["btn" + (i + 1)] = btn;
|
||||
}
|
||||
}
|
||||
}
|
||||
var index = layer.open($.extend({
|
||||
type: 2,
|
||||
maxmin: $.common.isEmpty(options.maxmin) ? true : options.maxmin,
|
||||
shade: 0.3,
|
||||
title: _title,
|
||||
fix: false,
|
||||
area: [_width + 'px', _height + 'px'],
|
||||
content: _url,
|
||||
shadeClose: $.common.isEmpty(options.shadeClose) ? true : options.shadeClose,
|
||||
skin: options.skin,
|
||||
btn: $.common.isEmpty(options.btn) ? _btn : options.btn,
|
||||
yes: options.yes,
|
||||
cancel: function () {
|
||||
return true;
|
||||
}
|
||||
}, btnCallback));
|
||||
if ($.common.isNotEmpty(options.full) && options.full === true) {
|
||||
layer.full(index);
|
||||
}
|
||||
},
|
||||
// 弹出层全屏
|
||||
openFull: function (title, url, width, height) {
|
||||
|
@ -17,7 +17,7 @@
|
||||
<h2>若依后台管理系统</h2>
|
||||
<p>ruoyi是一个完全响应式,基于Bootstrap3.3.6最新版本开发的扁平化主题,她采用了主流的左右两栏式布局,使用了Html5+CSS3等现代技术,她提供了诸多的强大的可以重新组合的UI组件,并集成了最新的jQuery版本(v2.1.1),当然,也集成了很多功能强大,用途广泛的就jQuery插件,她可以用于所有的Web应用程序,如<b>网站管理后台</b>,<b>网站会员中心</b>,<b>CMS</b>,<b>CRM</b>,<b>OA</b>等等,当然,您也可以对她进行深度定制,以做出更强系统。</p>
|
||||
<p>
|
||||
<b>当前版本:</b>v4.3.0
|
||||
<b>当前版本:</b>v4.3.1
|
||||
</p>
|
||||
<p>
|
||||
<span class="label label-warning">免费开源</span>
|
||||
@ -56,7 +56,7 @@
|
||||
<h3>你好,若依 </h3>
|
||||
<p>H+是一个完全响应式,基于Bootstrap3.3.6最新版本开发的扁平化主题,她采用了主流的左右两栏式布局,使用了Html5+CSS3等现代技术,她提供了诸多的强大的可以重新组合的UI组件,并集成了最新的jQuery版本(v2.1.1),当然,也集成了很多功能强大,用途广泛的就jQuery插件,她可以用于所有的Web应用程序,如<b>网站管理后台</b>,<b>网站会员中心</b>,<b>CMS</b>,<b>CRM</b>,<b>OA</b>等等,当然,您也可以对她进行深度定制,以做出更强系统。</p>
|
||||
<p>
|
||||
<b>当前版本:</b>v4.3.0
|
||||
<b>当前版本:</b>v4.3.1
|
||||
</p>
|
||||
<p>
|
||||
<span class="label label-warning">开源免费</span>
|
||||
|
@ -41,8 +41,8 @@
|
||||
<script th:src="@{/ajax/libs/iCheck/icheck.min.js}"></script>
|
||||
<script th:src="@{/ajax/libs/layer/layer.min.js}"></script>
|
||||
<script th:src="@{/ajax/libs/layui/layui.js}"></script>
|
||||
<script th:src="@{/ruoyi/js/common.js?v=4.3.0}"></script>
|
||||
<script th:src="@{/ruoyi/js/ry-ui.js?v=4.3.0}"></script>
|
||||
<script th:src="@{/ruoyi/js/common.js?v=4.3.1}"></script>
|
||||
<script th:src="@{/ruoyi/js/ry-ui.js?v=4.3.1}"></script>
|
||||
<script th:inline="javascript"> var ctx = [[@{/}]]; </script>
|
||||
</div>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
<link th:href="@{/css/animate.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/style.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/skins.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/ruoyi/css/ry-ui.css?v=4.3.0}" rel="stylesheet"/>
|
||||
<link th:href="@{/ruoyi/css/ry-ui.css?v=4.3.1}" rel="stylesheet"/>
|
||||
</head>
|
||||
<body class="fixed-sidebar full-height-layout gray-bg" style="overflow: hidden">
|
||||
<div id="wrapper">
|
||||
@ -26,17 +26,17 @@
|
||||
</div>
|
||||
<a th:href="@{/index}">
|
||||
<li class="logo hidden-xs">
|
||||
<span class="logo-lg">RuoYi</span>
|
||||
<span class="logo-lg">RuoYi</span>
|
||||
</li>
|
||||
</a>
|
||||
<div class="sidebar-collapse">
|
||||
<ul class="nav" id="side-menu">
|
||||
<li>
|
||||
<div class="user-panel">
|
||||
<a class="menuItem noactive" title="个人中心" th:href="@{/system/user/profile}">
|
||||
<a class="menuItem noactive" title="个人中心" th:href="@{/system/user/profile}">
|
||||
<div class="hide" th:text="个人中心"></div>
|
||||
<div class="pull-left image">
|
||||
<img th:src="(${user.avatar} == '') ? @{/img/profile.jpg} : @{${user.avatar}}" class="img-circle" alt="User Image">
|
||||
<img th:src="(${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">
|
||||
@ -52,7 +52,7 @@
|
||||
<li th:each="menu : ${menus}">
|
||||
<a th:class="@{${menu.url != '' && menu.url != '#'} ? ${menu.target}}" th:href="@{${menu.url == ''} ? |#| : ${menu.url}}">
|
||||
<i class="fa fa-bar-chart-o" th:class="${menu.icon}"></i>
|
||||
<span class="nav-label" th:text="${menu.menuName}">一级菜单</span>
|
||||
<span class="nav-label" th:text="${menu.menuName}">一级菜单</span>
|
||||
<span th:class="${menu.url == '' || menu.url == '#'} ? |fa arrow|"></span>
|
||||
</a>
|
||||
<ul class="nav nav-second-level collapse">
|
||||
@ -169,7 +169,7 @@
|
||||
</div>
|
||||
</nav>
|
||||
<!--左侧导航结束-->
|
||||
|
||||
|
||||
<!--右侧部分开始-->
|
||||
<div id="page-wrapper" class="gray-bg dashbard-1">
|
||||
<div class="row border-bottom">
|
||||
@ -185,7 +185,7 @@
|
||||
<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="(${user.avatar} == '') ? @{/img/profile.jpg} : @{${user.avatar}}" class="user-image">
|
||||
<img th:src="(${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">
|
||||
@ -225,9 +225,9 @@
|
||||
</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%" data-id="/system/main"
|
||||
th:src="@{/system/main}" frameborder="0" seamless></iframe>
|
||||
@ -246,8 +246,8 @@
|
||||
<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.3.0}"></script>
|
||||
<script th:src="@{/ruoyi/js/common.js?v=4.3.0}"></script>
|
||||
<script th:src="@{/ruoyi/js/ry-ui.js?v=4.3.1}"></script>
|
||||
<script th:src="@{/ruoyi/js/common.js?v=4.3.1}"></script>
|
||||
<script th:src="@{/ruoyi/index.js}"></script>
|
||||
<script th:src="@{/ajax/libs/fullscreen/jquery.fullscreen.js}"></script>
|
||||
<script th:inline="javascript">
|
||||
@ -258,6 +258,8 @@ var skin = storage.get("skin");
|
||||
var mode = "history";
|
||||
// 历史访问路径缓存
|
||||
var historyPath = storage.get("historyPath");
|
||||
// 是否页签与菜单联动
|
||||
var isLinkage = true;
|
||||
|
||||
// 本地主题优先,未设置取系统配置
|
||||
if($.common.isNotEmpty(skin)){
|
||||
|
@ -9,7 +9,7 @@
|
||||
<link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
|
||||
<link href="../static/css/style.css" th:href="@{/css/style.css}" rel="stylesheet"/>
|
||||
<link href="../static/css/login.min.css" th:href="@{/css/login.min.css}" rel="stylesheet"/>
|
||||
<link href="../static/ruoyi/css/ry-ui.css" th:href="@{/ruoyi/css/ry-ui.css?v=4.3.0}" rel="stylesheet"/>
|
||||
<link href="../static/ruoyi/css/ry-ui.css" th:href="@{/ruoyi/css/ry-ui.css?v=4.3.1}" rel="stylesheet"/>
|
||||
<!-- 360浏览器急速模式 -->
|
||||
<meta name="renderer" content="webkit">
|
||||
<!-- 避免IE使用兼容模式 -->
|
||||
@ -78,7 +78,7 @@
|
||||
<script src="../static/ajax/libs/validate/messages_zh.min.js" th:src="@{/ajax/libs/validate/messages_zh.min.js}"></script>
|
||||
<script src="../static/ajax/libs/layer/layer.min.js" th:src="@{/ajax/libs/layer/layer.min.js}"></script>
|
||||
<script src="../static/ajax/libs/blockUI/jquery.blockUI.js" th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script>
|
||||
<script src="../static/ruoyi/js/ry-ui.js" th:src="@{/ruoyi/js/ry-ui.js?v=4.3.0}"></script>
|
||||
<script src="../static/ruoyi/js/ry-ui.js" th:src="@{/ruoyi/js/ry-ui.js?v=4.3.1}"></script>
|
||||
<script src="../static/ruoyi/login.js" th:src="@{/ruoyi/login.js}"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -96,13 +96,37 @@
|
||||
<div class="ibox-content no-padding">
|
||||
<div class="panel-body">
|
||||
<div class="panel-group" id="version">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v431">v4.3.1</a><code class="pull-right">2020.07.05</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v431" class="panel-collapse collapse in">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>国家信息安全漏洞(请务必保持cipherKey密钥唯一性)</li>
|
||||
<li>升级shiro到最新版1.5.3 阻止权限绕过漏洞</li>
|
||||
<li>修改验证码在使用后清除,防止多次使用</li>
|
||||
<li>检查字符支持小数点&降级改成异常提醒</li>
|
||||
<li>openOptions函数中加入自定义maxmin属性</li>
|
||||
<li>支持openOptions方法最大化</li>
|
||||
<li>支持openOptions方法多个按钮回调</li>
|
||||
<li>新增isLinkage支持页签与菜单联动</li>
|
||||
<li>修改代码生成导入表结构出现异常页面不提醒问题</li>
|
||||
<li>优化用户头像发生错误,则显示一个默认头像</li>
|
||||
<li>Excel导出支持字典类型</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v43">v4.3.0</a><code class="pull-right">2020.06.22</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v43" class="panel-collapse collapse in">
|
||||
<div id="v43" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>代码生成模板支持主子表</li>
|
||||
|
@ -9,7 +9,7 @@
|
||||
<link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
|
||||
<link href="../static/css/style.css" th:href="@{/css/style.css}" rel="stylesheet"/>
|
||||
<link href="../static/css/login.min.css" th:href="@{/css/login.min.css}" rel="stylesheet"/>
|
||||
<link href="../static/ruoyi/css/ry-ui.css" th:href="@{/ruoyi/css/ry-ui.css?v=4.3.0}" rel="stylesheet"/>
|
||||
<link href="../static/ruoyi/css/ry-ui.css" th:href="@{/ruoyi/css/ry-ui.css?v=4.3.1}" rel="stylesheet"/>
|
||||
<!-- 360浏览器急速模式 -->
|
||||
<meta name="renderer" content="webkit">
|
||||
<!-- 避免IE使用兼容模式 -->
|
||||
@ -77,7 +77,7 @@
|
||||
<script src="../static/ajax/libs/validate/messages_zh.min.js" th:src="@{/ajax/libs/validate/messages_zh.min.js}"></script>
|
||||
<script src="../static/ajax/libs/layer/layer.min.js" th:src="@{/ajax/libs/layer/layer.min.js}"></script>
|
||||
<script src="../static/ajax/libs/blockUI/jquery.blockUI.js" th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script>
|
||||
<script src="../static/ruoyi/js/ry-ui.js" th:src="@{/ruoyi/js/ry-ui.js?v=4.3.0}"></script>
|
||||
<script src="../static/ruoyi/js/ry-ui.js" th:src="@{/ruoyi/js/ry-ui.js?v=4.3.1}"></script>
|
||||
<script src="../static/ruoyi/register.js" th:src="@{/ruoyi/register.js}"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -140,7 +140,7 @@
|
||||
</ul>
|
||||
</body>
|
||||
<script th:src="@{/js/jquery.min.js}"></script>
|
||||
<script th:src="@{/ruoyi/js/common.js?v=4.3.0}"></script>
|
||||
<script th:src="@{/ruoyi/js/common.js?v=4.3.1}"></script>
|
||||
<script type="text/javascript">
|
||||
//皮肤样式列表
|
||||
var skins = ["skin-blue", "skin-green", "skin-purple", "skin-red", "skin-yellow"];
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<version>4.3.0</version>
|
||||
<version>4.3.1</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -24,6 +24,11 @@ public @interface Excel
|
||||
*/
|
||||
public String dateFormat() default "";
|
||||
|
||||
/**
|
||||
* 如果是字典类型,请设置字典的type值 (如: sys_user_sex)
|
||||
*/
|
||||
public String dictType() default "";
|
||||
|
||||
/**
|
||||
* 读取内容转表达式 (如: 0=男,1=女,2=未知)
|
||||
*/
|
||||
@ -33,7 +38,7 @@ public @interface Excel
|
||||
* 分隔符,读取字符串组内容
|
||||
*/
|
||||
public String separator() default ",";
|
||||
|
||||
|
||||
/**
|
||||
* 导出类型(0数字 1字符串)
|
||||
*/
|
||||
|
@ -11,10 +11,13 @@ public class PageDomain
|
||||
{
|
||||
/** 当前记录起始索引 */
|
||||
private Integer pageNum;
|
||||
|
||||
/** 每页显示记录数 */
|
||||
private Integer pageSize;
|
||||
|
||||
/** 排序列 */
|
||||
private String orderByColumn;
|
||||
|
||||
/** 排序的方向 "desc" 或者 "asc". */
|
||||
private String isAsc;
|
||||
|
||||
|
@ -50,6 +50,7 @@ import com.ruoyi.common.exception.BusinessException;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.reflect.ReflectUtils;
|
||||
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||
|
||||
/**
|
||||
* Excel相关处理
|
||||
@ -276,7 +277,11 @@ public class ExcelUtil<T>
|
||||
}
|
||||
else if (StringUtils.isNotEmpty(attr.readConverterExp()))
|
||||
{
|
||||
val = reverseByExp(String.valueOf(val), attr.readConverterExp(), attr.separator());
|
||||
val = reverseByExp(Convert.toStr(val), attr.readConverterExp(), attr.separator());
|
||||
}
|
||||
else if (StringUtils.isNotEmpty(attr.dictType()))
|
||||
{
|
||||
val = reverseDictByExp(Convert.toStr(val), attr.dictType(), attr.separator());
|
||||
}
|
||||
ReflectUtils.invokeSetter(entity, propertyName, val);
|
||||
}
|
||||
@ -536,13 +541,18 @@ public class ExcelUtil<T>
|
||||
String dateFormat = attr.dateFormat();
|
||||
String readConverterExp = attr.readConverterExp();
|
||||
String separator = attr.separator();
|
||||
String dictType = attr.dictType();
|
||||
if (StringUtils.isNotEmpty(dateFormat) && StringUtils.isNotNull(value))
|
||||
{
|
||||
cell.setCellValue(DateUtils.parseDateToStr(dateFormat, (Date) value));
|
||||
}
|
||||
else if (StringUtils.isNotEmpty(readConverterExp) && StringUtils.isNotNull(value))
|
||||
{
|
||||
cell.setCellValue(convertByExp(String.valueOf(value), readConverterExp, separator));
|
||||
cell.setCellValue(convertByExp(Convert.toStr(value), readConverterExp, separator));
|
||||
}
|
||||
else if (StringUtils.isNotEmpty(dictType))
|
||||
{
|
||||
cell.setCellValue(convertDictByExp(Convert.toStr(value), dictType, separator));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -672,39 +682,64 @@ public class ExcelUtil<T>
|
||||
public static String reverseByExp(String propertyValue, String converterExp, String separator) throws Exception
|
||||
{
|
||||
StringBuilder propertyString = new StringBuilder();
|
||||
try
|
||||
String[] convertSource = converterExp.split(",");
|
||||
for (String item : convertSource)
|
||||
{
|
||||
String[] convertSource = converterExp.split(",");
|
||||
for (String item : convertSource)
|
||||
String[] itemArray = item.split("=");
|
||||
if (StringUtils.containsAny(separator, propertyValue))
|
||||
{
|
||||
String[] itemArray = item.split("=");
|
||||
if (StringUtils.containsAny(separator, propertyValue))
|
||||
for (String value : propertyValue.split(separator))
|
||||
{
|
||||
for (String value : propertyValue.split(separator))
|
||||
if (itemArray[1].equals(value))
|
||||
{
|
||||
if (itemArray[1].equals(value))
|
||||
{
|
||||
propertyString.append(itemArray[0] + separator);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (itemArray[1].equals(propertyValue))
|
||||
{
|
||||
return itemArray[0];
|
||||
propertyString.append(itemArray[0] + separator);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw e;
|
||||
else
|
||||
{
|
||||
if (itemArray[1].equals(propertyValue))
|
||||
{
|
||||
return itemArray[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
return StringUtils.stripEnd(propertyString.toString(), separator);
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析字典值
|
||||
*
|
||||
* @param dictValue 字典值
|
||||
* @param dictType 字典类型
|
||||
* @param separator 分隔符
|
||||
* @return 字典标签
|
||||
*/
|
||||
public static String convertDictByExp(String dictValue, String dictType, String separator) throws Exception
|
||||
{
|
||||
Object bean = SpringUtils.getBean("dictUtils");
|
||||
String methodName = "getDictLabel";
|
||||
Method method = bean.getClass().getDeclaredMethod(methodName, String.class, String.class, String.class);
|
||||
return Convert.toStr(method.invoke(bean, dictType, dictValue, separator));
|
||||
}
|
||||
|
||||
/**
|
||||
* 反向解析值字典值
|
||||
*
|
||||
* @param dictLabel 字典标签
|
||||
* @param dictType 字典类型
|
||||
* @param separator 分隔符
|
||||
* @return 字典值
|
||||
*/
|
||||
public static String reverseDictByExp(String dictLabel, String dictType, String separator) throws Exception
|
||||
{
|
||||
Object bean = SpringUtils.getBean("dictUtils");
|
||||
String methodName = "getDictValue";
|
||||
Method method = bean.getClass().getDeclaredMethod(methodName, String.class, String.class, String.class);
|
||||
return Convert.toStr(method.invoke(bean, dictType, dictLabel, separator));
|
||||
}
|
||||
|
||||
/**
|
||||
* 编码文件名
|
||||
*/
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.ruoyi.common.utils.sql;
|
||||
|
||||
import com.ruoyi.common.exception.base.BaseException;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
|
||||
/**
|
||||
@ -10,9 +11,9 @@ import com.ruoyi.common.utils.StringUtils;
|
||||
public class SqlUtil
|
||||
{
|
||||
/**
|
||||
* 仅支持字母、数字、下划线、空格、逗号(支持多个字段排序)
|
||||
* 仅支持字母、数字、下划线、空格、逗号、小数点(支持多个字段排序)
|
||||
*/
|
||||
public static String SQL_PATTERN = "[a-zA-Z0-9_\\ \\,]+";
|
||||
public static String SQL_PATTERN = "[a-zA-Z0-9_\\ \\,\\.]+";
|
||||
|
||||
/**
|
||||
* 检查字符,防止注入绕过
|
||||
@ -21,7 +22,7 @@ public class SqlUtil
|
||||
{
|
||||
if (StringUtils.isNotEmpty(value) && !isValidOrderBySql(value))
|
||||
{
|
||||
return StringUtils.EMPTY;
|
||||
throw new BaseException("参数不符合规范,不能进行查询");
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<version>4.3.0</version>
|
||||
<version>4.3.1</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -85,6 +85,10 @@ public class ShiroConfig
|
||||
@Value("${shiro.cookie.maxAge}")
|
||||
private int maxAge;
|
||||
|
||||
// 设置cipherKey密钥
|
||||
@Value("${shiro.cookie.cipherKey}")
|
||||
private String cipherKey;
|
||||
|
||||
// 登录地址
|
||||
@Value("${shiro.user.loginUrl}")
|
||||
private String loginUrl;
|
||||
@ -328,7 +332,7 @@ public class ShiroConfig
|
||||
{
|
||||
CookieRememberMeManager cookieRememberMeManager = new CookieRememberMeManager();
|
||||
cookieRememberMeManager.setCookie(rememberMeCookie());
|
||||
cookieRememberMeManager.setCipherKey(Base64.decode("fCq+/xW488hMTCD+cmJ3aQ=="));
|
||||
cookieRememberMeManager.setCipherKey(Base64.decode(cipherKey));
|
||||
return cookieRememberMeManager;
|
||||
}
|
||||
|
||||
|
@ -83,8 +83,8 @@ public class SysPasswordService
|
||||
return new Md5Hash(username + password + salt).toHex();
|
||||
}
|
||||
|
||||
public void unlock(String loginName){
|
||||
public void unlock(String loginName)
|
||||
{
|
||||
loginRecordCache.remove(loginName);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -61,6 +61,8 @@ public class CaptchaValidateFilter extends AccessControlFilter
|
||||
{
|
||||
Object obj = ShiroUtils.getSession().getAttribute(Constants.KAPTCHA_SESSION_KEY);
|
||||
String code = String.valueOf(obj != null ? obj : "");
|
||||
// 验证码清除,防止多次使用。
|
||||
request.getSession().removeAttribute(Constants.KAPTCHA_SESSION_KEY);
|
||||
if (StringUtils.isEmpty(validateCode) || !validateCode.equalsIgnoreCase(code))
|
||||
{
|
||||
return false;
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<version>4.3.0</version>
|
||||
<version>4.3.1</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -156,9 +156,9 @@ public class GenTableServiceImpl implements IGenTableService
|
||||
@Transactional
|
||||
public void importGenTable(List<GenTable> tableList, String operName)
|
||||
{
|
||||
for (GenTable table : tableList)
|
||||
try
|
||||
{
|
||||
try
|
||||
for (GenTable table : tableList)
|
||||
{
|
||||
String tableName = table.getTableName();
|
||||
GenUtils.initTable(table, operName);
|
||||
@ -174,10 +174,10 @@ public class GenTableServiceImpl implements IGenTableService
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
log.error("表名 " + table.getTableName() + " 导入失败:", e);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new BusinessException("导入失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<version>4.3.0</version>
|
||||
<version>4.3.1</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<version>4.3.0</version>
|
||||
<version>4.3.1</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.ruoyi.system.utils;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.stereotype.Component;
|
||||
import com.ruoyi.common.constant.Constants;
|
||||
import com.ruoyi.common.utils.CacheUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
@ -11,8 +12,14 @@ import com.ruoyi.system.domain.SysDictData;
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Component
|
||||
public class DictUtils
|
||||
{
|
||||
/**
|
||||
* 分隔符
|
||||
*/
|
||||
public static final String SEPARATOR = ",";
|
||||
|
||||
/**
|
||||
* 设置字典缓存
|
||||
*
|
||||
@ -41,6 +48,110 @@ public class DictUtils
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据字典类型和字典值获取字典标签
|
||||
*
|
||||
* @param dictType 字典类型
|
||||
* @param dictValue 字典值
|
||||
* @return 字典标签
|
||||
*/
|
||||
public static String getDictLabel(String dictType, String dictValue)
|
||||
{
|
||||
return getDictLabel(dictType, dictValue, SEPARATOR);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据字典类型和字典标签获取字典值
|
||||
*
|
||||
* @param dictType 字典类型
|
||||
* @param dictLabel 字典标签
|
||||
* @return 字典值
|
||||
*/
|
||||
public static String getDictValue(String dictType, String dictLabel)
|
||||
{
|
||||
return getDictValue(dictType, dictLabel, SEPARATOR);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据字典类型和字典值获取字典标签
|
||||
*
|
||||
* @param dictType 字典类型
|
||||
* @param dictValue 字典值
|
||||
* @param separator 分隔符
|
||||
* @return 字典标签
|
||||
*/
|
||||
public static String getDictLabel(String dictType, String dictValue, String separator)
|
||||
{
|
||||
StringBuilder propertyString = new StringBuilder();
|
||||
List<SysDictData> datas = getDictCache(dictType);
|
||||
|
||||
if (StringUtils.containsAny(separator, dictValue) && StringUtils.isNotEmpty(datas))
|
||||
{
|
||||
for (SysDictData dict : datas)
|
||||
{
|
||||
for (String value : dictValue.split(separator))
|
||||
{
|
||||
if (value.equals(dict.getDictValue()))
|
||||
{
|
||||
propertyString.append(dict.getDictLabel() + separator);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (SysDictData dict : datas)
|
||||
{
|
||||
if (dictValue.equals(dict.getDictValue()))
|
||||
{
|
||||
return dict.getDictLabel();
|
||||
}
|
||||
}
|
||||
}
|
||||
return StringUtils.stripEnd(propertyString.toString(), separator);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据字典类型和字典标签获取字典值
|
||||
*
|
||||
* @param dictType 字典类型
|
||||
* @param dictLabel 字典标签
|
||||
* @param separator 分隔符
|
||||
* @return 字典值
|
||||
*/
|
||||
public static String getDictValue(String dictType, String dictLabel, String separator)
|
||||
{
|
||||
StringBuilder propertyString = new StringBuilder();
|
||||
List<SysDictData> datas = getDictCache(dictType);
|
||||
|
||||
if (StringUtils.containsAny(separator, dictLabel) && StringUtils.isNotEmpty(datas))
|
||||
{
|
||||
for (SysDictData dict : datas)
|
||||
{
|
||||
for (String label : dictLabel.split(separator))
|
||||
{
|
||||
if (label.equals(dict.getDictLabel()))
|
||||
{
|
||||
propertyString.append(dict.getDictValue() + separator);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (SysDictData dict : datas)
|
||||
{
|
||||
if (dictLabel.equals(dict.getDictLabel()))
|
||||
{
|
||||
return dict.getDictValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
return StringUtils.stripEnd(propertyString.toString(), separator);
|
||||
}
|
||||
|
||||
/**
|
||||
* 清空字典缓存
|
||||
*/
|
||||
|
Reference in New Issue
Block a user