Merge branch 'master' of https://gitee.com/racsu/RuoYi
This commit is contained in:
commit
427156012c
40
README.md
40
README.md
|
|
@ -6,11 +6,11 @@
|
|||
|
||||
若依参考后台模板。有需要可自行到群内下载。
|
||||
|
||||
> 如需单应用,请移步 [RuoYi-fast](https://gitee.com/y_project/RuoYi-fast) `(保持同步更新)`,如需Oracle版本,请移步 [RuoYi-oracle](http://doc.ruoyi.vip/#/standard/xmkz) `(不定时更新)`
|
||||
> 如需单应用,请移步 [RuoYi-fast](https://gitee.com/y_project/RuoYi-fast) `(保持同步更新)`,如需其他版本,请移步 [项目扩展](http://doc.ruoyi.vip/#/standard/xmkz) `(不定时更新)`
|
||||
|
||||
> 阿里云通用云产品1888优惠券 :[点我领取](https://promotion.aliyun.com/ntms/yunparter/invite.html?userCode=brki8iof) 腾讯云通用云产品2860优惠券 :[点我领取](https://cloud.tencent.com/redirect.php?redirect=1025&cps_key=198c8df2ed259157187173bc7f4f32fd&from=console) `(仅限新用户)`
|
||||
|
||||
> 阿里云Hi拼购 限量爆款 低至199元/年 [https://www.aliyun.com/acts/hi-group-buying?userCode=brki8iof](https://www.aliyun.com/acts/hi-group-buying?userCode=brki8iof) `(仅限新用户)`
|
||||
> 阿里云Hi拼购 限量爆款 低至199元/年 [点我进入](https://www.aliyun.com/acts/hi-group-buying?userCode=brki8iof) `(仅限新用户)`
|
||||
|
||||
## 内置功能
|
||||
|
||||
|
|
@ -44,34 +44,42 @@
|
|||
<table>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/25b5e333768d013d45a990c152dbe4d9d6e.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/5ac52ccc07a59f12205948c9408791f5c5b.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/e29fd81b2d43b517f99535564af41f9d1d5.jpg"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/66f8b5b24720dabe0e11ae84bd1ad4b038e.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/a46f34786bc9fc400697b6f3677be5bb3f0.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/629f1510fb6205f773c8c284863406b694f.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/9124eda87df0e72427cd63f458b813e3363.jpg"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/6010201b078dbc9e1d8c09c6a3e53f4344c.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/058928ad3a6e6de67b43d62d42dbf071355.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/438c59467afd0097cfbe9c89db932661687.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/72a015041db6843aca7f7b273688cb346f8.jpg"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/21acdcade5e306f2c5d7ae26993b4e6bd06.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/ad5ea3c4c2ea2e91d1f05f6cc384cbad2a1.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/ecb5f1c9929f1933f733f796749b2df73d9.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/e4283d500eb10e8dd8701e7742f7facb065.jpg"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/6ca845cca1701fbf71881efe4f341c82f99.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/e3aeb8fff585594f6e947218e14f2806ea1.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/2531dbf419a1b114e1177f8d2a120b8a9c3.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/8b740a42dddc1e5a8a150d97c5060df258b.jpg"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/197ddc2fdffc27020f8624bd7ca1a971f61.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/a2dabea752d7d70aede20908dee0b419829.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/00e642dc3515919b3760968cc496a12a849.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/f72d28a3e60413a4e1b5c7c2f45f962fd65.jpg"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/c5699c5726b5aebde71a37bb5163d840bc2.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/24740d59377e826d0d8664ebad66dc84abd.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/19222e495869a2a99fc31c5d2bd4539e1e7.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/264d25176f4e22b4b38e95fe6ce73775299.jpg"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/bbe7fe1048d29217ba73bd3ed88d6743b55.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/d85fbb59be27fb33f68bdbb6e8bc967c97b.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/bb902d2c54bad02a052e9a05e5f22a93df1.jpg"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/30cda883bb9a7f74f1454314e64f949942d.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/deebaaa8d6b14a419ed5911f49e3f222a6f.jpg"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/bed2b98a44e7ae820c2885329e711965c28.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/5f3d39a141f21f81b90536f391b8408f1fa.jpg"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -145,6 +145,15 @@ public class DemoFormController
|
|||
return prefix + "/cards";
|
||||
}
|
||||
|
||||
/**
|
||||
* summernote 富文本编辑器
|
||||
*/
|
||||
@GetMapping("/summernote")
|
||||
public String summernote()
|
||||
{
|
||||
return prefix + "/summernote";
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索自动补全
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -434,7 +434,7 @@
|
|||
}
|
||||
|
||||
.file-uploading {
|
||||
background: url(../img/loading-sm.gif) no-repeat center bottom 10px;
|
||||
background: url(loading-sm.gif) no-repeat center bottom 10px;
|
||||
opacity: 0.65;
|
||||
}
|
||||
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -94,7 +94,8 @@
|
|||
this.$selectAll = $ltr.find('[name="btSelectAll"]');
|
||||
this.$selectAll.on('click', function () {
|
||||
var checked = $(this).prop('checked');
|
||||
$(".left-fixed-table-columns input[name=btSelectItem]").filter(':enabled').prop('checked', checked);
|
||||
$(".left-fixed-body-columns input[name=btSelectItem]").filter(':enabled').prop('checked', checked);
|
||||
$('.fixed-table-body input[name=btSelectItem]').closest('tr').removeClass('selected');
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
@ -235,11 +236,12 @@
|
|||
$.btTable.on("check.bs.table uncheck.bs.table", function (e, rows, $element) {
|
||||
var index= $element.data('index');
|
||||
$(this).find('.bs-checkbox').find('input[data-index="' + index + '"]').prop("checked", true);
|
||||
var selectFixedItem = $('.left-fixed-table-columns input[name=btSelectItem]');
|
||||
var selectFixedItem = $('.left-fixed-body-columns input[name=btSelectItem]');
|
||||
var checkAll = selectFixedItem.filter(':enabled').length &&
|
||||
selectFixedItem.filter(':enabled').length ===
|
||||
selectFixedItem.filter(':enabled').filter(':checked').length;
|
||||
$(".left-fixed-table-columns input[name=btSelectAll]").prop('checked', checkAll);
|
||||
$('.fixed-table-body input[name=btSelectItem]').closest('tr').removeClass('selected');
|
||||
});
|
||||
|
||||
//// events
|
||||
|
|
|
|||
|
|
@ -165,6 +165,7 @@
|
|||
data: parms ? parms : options.ajaxParams,
|
||||
dataType: "JSON",
|
||||
success: function(data, textStatus, jqXHR) {
|
||||
data = calculateObjectValue(options, options.responseHandler, [data], data);
|
||||
renderTable(data);
|
||||
},
|
||||
error: function(xhr, textStatus) {
|
||||
|
|
@ -608,6 +609,33 @@
|
|||
}
|
||||
return value;
|
||||
};
|
||||
// ruoyi 发起对目标(target)函数的调用
|
||||
var calculateObjectValue = function (self, name, args, defaultValue) {
|
||||
var func = name;
|
||||
|
||||
if (typeof name === 'string') {
|
||||
var names = name.split('.');
|
||||
|
||||
if (names.length > 1) {
|
||||
func = window;
|
||||
$.each(names, function (i, f) {
|
||||
func = func[f];
|
||||
});
|
||||
} else {
|
||||
func = window[name];
|
||||
}
|
||||
}
|
||||
if (typeof func === 'object') {
|
||||
return func;
|
||||
}
|
||||
if (typeof func === 'function') {
|
||||
return func.apply(self, args);
|
||||
}
|
||||
if (!func && typeof name === 'string' && sprintf.apply(this, [name].concat(args))) {
|
||||
return sprintf.apply(this, [name].concat(args));
|
||||
}
|
||||
return defaultValue;
|
||||
};
|
||||
// 初始化
|
||||
init();
|
||||
return target;
|
||||
|
|
@ -700,7 +728,9 @@
|
|||
showColumns: true, // 是否显示内容列下拉框
|
||||
showRefresh: true, // 是否显示刷新按钮
|
||||
expanderExpandedClass: 'glyphicon glyphicon-chevron-down', // 展开的按钮的图标
|
||||
expanderCollapsedClass: 'glyphicon glyphicon-chevron-right' // 缩起的按钮的图标
|
||||
|
||||
expanderCollapsedClass: 'glyphicon glyphicon-chevron-right', // 缩起的按钮的图标
|
||||
responseHandler: function(res) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
})(jQuery);
|
||||
|
|
@ -848,3 +848,117 @@
|
|||
border-bottom-right-radius: 2px;
|
||||
border-bottom-left-radius: 0
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
* 侧边栏主题 若依管理系统
|
||||
* NAME - .theme-dark/theme-light
|
||||
*
|
||||
*/
|
||||
/** 深色主题 .theme-dark **/
|
||||
.theme-dark .user-panel>.info>p, .theme-dark .user-panel>.info, .theme-dark .user-panel>.info>a{
|
||||
color: #fff
|
||||
}
|
||||
|
||||
.theme-dark .nav>li.active {
|
||||
background: #293846;
|
||||
}
|
||||
|
||||
.theme-dark .navbar-static-side {
|
||||
background-color: #2f4050;
|
||||
}
|
||||
|
||||
.theme-dark .user-panel {
|
||||
background-color: #2f4050;
|
||||
}
|
||||
|
||||
.theme-dark .navbar-default .nav>li>a:hover,
|
||||
.theme-dark .navbar-default .nav>li>a:focus {
|
||||
background: #293846;
|
||||
}
|
||||
|
||||
/** 浅色主题 theme-light **/
|
||||
.theme-light .user-panel>.info>p, .theme-light .user-panel>.info, .theme-light .user-panel>.info>a{
|
||||
color: #555
|
||||
}
|
||||
|
||||
.theme-light .nav>li.active{
|
||||
background: #f9fafc;
|
||||
}
|
||||
|
||||
.theme-light .navbar-static-side {
|
||||
background-color: #f9fafc;
|
||||
box-shadow: 2px 0 2px 0 rgba(29,35,41,.05);
|
||||
}
|
||||
|
||||
.theme-light .user-panel {
|
||||
background-color: #f9fafc;
|
||||
}
|
||||
|
||||
.theme-light .navbar-default .nav>li>a {
|
||||
color: #777;
|
||||
}
|
||||
|
||||
.theme-light.skin-blue .navbar-default .nav>li.active>a {
|
||||
color: #1890ff;
|
||||
}
|
||||
|
||||
.theme-light.skin-blue .navbar-default .nav>li.selected>a,
|
||||
.theme-light.skin-blue .navbar-default .nav>li.selected>a:focus {
|
||||
background-color: rgb(240, 245, 255);
|
||||
color: rgb(47, 84, 235);
|
||||
}
|
||||
|
||||
.theme-light.skin-green .navbar-default .nav>li.active>a {
|
||||
color: #52c41a;
|
||||
}
|
||||
|
||||
.theme-light.skin-green .navbar-default .nav>li.selected>a,
|
||||
.theme-light.skin-green .navbar-default .nav>li.selected>a:focus {
|
||||
background-color: rgb(246, 255, 237);
|
||||
color: rgb(82, 196, 26);
|
||||
}
|
||||
|
||||
.theme-light.skin-purple .navbar-default .nav>li.active>a {
|
||||
color: rgb(114, 46, 209);
|
||||
}
|
||||
|
||||
.theme-light.skin-purple .navbar-default .nav>li.selected>a,
|
||||
.theme-light.skin-purple .navbar-default .nav>li.selected>a:focus {
|
||||
background-color: #f9f0ff;
|
||||
color: #722ed1;
|
||||
}
|
||||
|
||||
.theme-light.skin-red .navbar-default .nav>li.active>a {
|
||||
color: rgb(245, 34, 45);
|
||||
}
|
||||
|
||||
.theme-light.skin-red .navbar-default .nav>li.selected>a,
|
||||
.theme-light.skin-red .navbar-default .nav>li.selected>a:focus {
|
||||
background-color: rgb(255, 241, 240);
|
||||
color: rgb(245, 34, 45);
|
||||
}
|
||||
|
||||
.theme-light.skin-yellow .navbar-default .nav>li.active>a {
|
||||
color: rgb(250, 173, 20);
|
||||
}
|
||||
|
||||
.theme-light.skin-yellow .navbar-default .nav>li.selected>a,
|
||||
.theme-light.skin-yellow .navbar-default .nav>li.selected>a:focus {
|
||||
background-color: #fffbe6;
|
||||
color: #faad14;
|
||||
}
|
||||
|
||||
.theme-light .navbar-default .nav>li>a:hover,
|
||||
.theme-light .navbar-default .nav>li>a:focus {
|
||||
background-color: rgb(240, 245, 255);
|
||||
}
|
||||
|
||||
.fixed-sidebar.theme-light.mini-navbar .nav li:hover>a> span.nav-label {
|
||||
background-color: #f9fafc;
|
||||
}
|
||||
|
||||
.fixed-sidebar.theme-light.mini-navbar .nav li:hover>.nav-second-level {
|
||||
background-color: #f9fafc;
|
||||
}
|
||||
|
||||
|
|
@ -7065,9 +7065,4 @@ body.rtls .top-navigation .footer.fixed, body.rtls.top-navigation .footer.fixed
|
|||
top: 0px;
|
||||
z-index: 9998;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.selected{
|
||||
background-color: #E8F7FD;
|
||||
color: #1890ff;
|
||||
}
|
||||
|
|
@ -956,4 +956,10 @@ label {
|
|||
background-color:#999!important;
|
||||
text-shadow:0 0 10px black,0 0 10px black,0 0 8px black,0 0 6px black,0 0 6px black;
|
||||
box-shadow:0 12px 14px -12px #111 inset,0 -2px 2px -1px #333 inset
|
||||
}
|
||||
|
||||
/** 表格选中样式 **/
|
||||
.fixed-table-container .selected {
|
||||
background-color: #E8F7FD;
|
||||
color: #1890ff;
|
||||
}
|
||||
|
|
@ -217,7 +217,7 @@ $(function() {
|
|||
dataIndex = $(this).data('index'),
|
||||
menuName = $.trim($(this).text()),
|
||||
flag = true;
|
||||
$(".nav ul li").removeClass("selected");
|
||||
$(".nav ul li, .nav li").removeClass("selected");
|
||||
$(this).parent("li").addClass("selected");
|
||||
if (dataUrl == undefined || $.trim(dataUrl).length == 0) return false;
|
||||
|
||||
|
|
|
|||
|
|
@ -443,7 +443,8 @@
|
|||
showColumns: options.showColumns, // 是否显示隐藏某列下拉框
|
||||
expandAll: options.expandAll, // 是否全部展开
|
||||
expandFirst: options.expandFirst, // 是否默认第一级展开--expandAll为false时生效
|
||||
columns: options.columns
|
||||
columns: options.columns, // 显示列信息(*)
|
||||
responseHandler: $.treeTable.responseHandler // 当所有数据被加载时触发处理函数
|
||||
});
|
||||
},
|
||||
// 条件查询
|
||||
|
|
@ -463,6 +464,15 @@
|
|||
});
|
||||
return $.common.uniqueFn(rows);
|
||||
},
|
||||
// 请求获取数据后处理回调函数,校验异常状态提醒
|
||||
responseHandler: function(data) {
|
||||
if (data.code != undefined && data.code != 0) {
|
||||
$.modal.alertWarning(data.msg);
|
||||
return [];
|
||||
} else {
|
||||
return data;
|
||||
}
|
||||
},
|
||||
},
|
||||
// 表单封装处理
|
||||
form: {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,93 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<th:block th:include="include :: header('Summernote富文本编辑器')" />
|
||||
<th:block th:include="include :: summernote-css" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="wrapper wrapper-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>Summernote 富文本编辑器</h5>
|
||||
</div>
|
||||
<div class="ibox-content no-padding">
|
||||
<div class="summernote">
|
||||
<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.0.0
|
||||
</p>
|
||||
<p>
|
||||
<span class="label label-warning">免费开源</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-content">
|
||||
<h2>Summernote</h2>
|
||||
<p>
|
||||
Summernote是一个简单的基于Bootstrap的WYSIWYG富文本编辑器
|
||||
</p>
|
||||
<div class="alert alert-warning"> 官方文档请参考:
|
||||
<a href="https://github.com/summernote/summernote">https://github.com/summernote/summernote</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>编辑/保存为html代码示例</h5>
|
||||
<button id="edit" class="btn btn-primary btn-xs m-l-sm" onclick="edit()" type="button">编辑</button>
|
||||
<button id="save" class="btn btn-primary btn-xs" onclick="save()" type="button">保存</button>
|
||||
</div>
|
||||
<div class="ibox-content" id="eg">
|
||||
|
||||
<div class="click2edit wrapper">
|
||||
<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.0.0
|
||||
</p>
|
||||
<p>
|
||||
<span class="label label-warning">开源免费</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: summernote-js" />
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$('.summernote').summernote({
|
||||
lang: 'zh-CN'
|
||||
});
|
||||
});
|
||||
var edit = function () {
|
||||
$("#eg").addClass("no-padding");
|
||||
$('.click2edit').summernote({
|
||||
lang: 'zh-CN',
|
||||
focus: true
|
||||
});
|
||||
};
|
||||
var save = function () {
|
||||
$("#eg").removeClass("no-padding");
|
||||
var aHTML = $('.click2edit').summernote('code');
|
||||
$('.click2edit').summernote('destroy');
|
||||
};
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
<link th:href="@{/css/skins.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/ruoyi/css/ry-ui.css?v=3.4.0}" rel="stylesheet"/>
|
||||
</head>
|
||||
<body class="fixed-sidebar full-height-layout gray-bg" style="overflow: hidden" th:classappend="${@config.getKey('sys.index.skinName')}">
|
||||
<body class="fixed-sidebar full-height-layout gray-bg" style="overflow: hidden" th:classappend="|${@config.getKey('sys.index.sideTheme')} ${@config.getKey('sys.index.skinName')}|">
|
||||
<div id="wrapper">
|
||||
|
||||
<!--左侧导航开始-->
|
||||
|
|
@ -52,12 +52,12 @@
|
|||
</ul>
|
||||
</li>
|
||||
<li th:each="menu : ${menus}">
|
||||
<a href="#">
|
||||
<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="fa arrow"></span>
|
||||
<span th:class="${menu.url == '' || menu.url == '#'} ? |fa arrow|"></span>
|
||||
</a>
|
||||
<ul class="nav nav-second-level collapse">
|
||||
<ul class="nav nav-second-level collapse">
|
||||
<li th:each="cmenu : ${menu.children}">
|
||||
<a th:if="${#lists.isEmpty(cmenu.children)}" th:class="${cmenu.target == ''} ? |menuItem| : ${cmenu.target}" th:utext="${cmenu.menuName}" th:href="@{${cmenu.url}}">二级菜单</a>
|
||||
<a th:if="${not #lists.isEmpty(cmenu.children)}" href="#">[[${cmenu.menuName}]]<span class="fa arrow"></span></a>
|
||||
|
|
@ -84,6 +84,7 @@
|
|||
<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>
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -146,16 +146,19 @@
|
|||
$("#perms").parents(".form-group").hide();
|
||||
$("#icon").parents(".form-group").show();
|
||||
$("#target").parents(".form-group").hide();
|
||||
$("input[name='visible']").parents(".form-group").show();
|
||||
} else if (menuType == "C") {
|
||||
$("#url").parents(".form-group").show();
|
||||
$("#perms").parents(".form-group").show();
|
||||
$("#icon").parents(".form-group").hide();
|
||||
$("#icon").parents(".form-group").show();
|
||||
$("#target").parents(".form-group").show();
|
||||
$("input[name='visible']").parents(".form-group").show();
|
||||
} else if (menuType == "F") {
|
||||
$("#url").parents(".form-group").hide();
|
||||
$("#perms").parents(".form-group").show();
|
||||
$("#icon").parents(".form-group").hide();
|
||||
$("#target").parents(".form-group").hide();
|
||||
$("input[name='visible']").parents(".form-group").hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -162,16 +162,19 @@
|
|||
$("#perms").parents(".form-group").hide();
|
||||
$("#icon").parents(".form-group").show();
|
||||
$("#target").parents(".form-group").hide();
|
||||
$("input[name='visible']").parents(".form-group").show();
|
||||
} else if (menuType == "C") {
|
||||
$("#url").parents(".form-group").show();
|
||||
$("#perms").parents(".form-group").show();
|
||||
$("#icon").parents(".form-group").hide();
|
||||
$("#icon").parents(".form-group").show();
|
||||
$("#target").parents(".form-group").show();
|
||||
$("input[name='visible']").parents(".form-group").show();
|
||||
} else if (menuType == "F") {
|
||||
$("#url").parents(".form-group").hide();
|
||||
$("#perms").parents(".form-group").show();
|
||||
$("#icon").parents(".form-group").hide();
|
||||
$("#target").parents(".form-group").hide();
|
||||
$("input[name='visible']").parents(".form-group").hide();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
package com.ruoyi.common.annotation;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Inherited;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
|
@ -11,8 +13,10 @@ import com.ruoyi.common.enums.DataSourceType;
|
|||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Target(ElementType.METHOD)
|
||||
@Target({ ElementType.METHOD, ElementType.TYPE })
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
@Inherited
|
||||
public @interface DataSource
|
||||
{
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
package com.ruoyi.framework.interceptor.annotation;
|
||||
package com.ruoyi.common.annotation;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
|
|
@ -782,7 +782,7 @@ public class ExcelUtil<T>
|
|||
Cell cell = row.getCell(column);
|
||||
if (cell != null)
|
||||
{
|
||||
if (cell.getCellTypeEnum() == CellType.NUMERIC)
|
||||
if (cell.getCellTypeEnum() == CellType.NUMERIC || cell.getCellTypeEnum() == CellType.FORMULA)
|
||||
{
|
||||
val = cell.getNumericCellValue();
|
||||
if (HSSFDateUtil.isCellDateFormatted(cell))
|
||||
|
|
|
|||
|
|
@ -26,7 +26,8 @@ public class DataSourceAspect
|
|||
{
|
||||
protected Logger logger = LoggerFactory.getLogger(getClass());
|
||||
|
||||
@Pointcut("@annotation(com.ruoyi.common.annotation.DataSource)")
|
||||
@Pointcut("@annotation(com.ruoyi.common.annotation.DataSource)"
|
||||
+ "|| @within(com.ruoyi.common.annotation.DataSource)")
|
||||
public void dsPointCut()
|
||||
{
|
||||
|
||||
|
|
@ -35,11 +36,7 @@ public class DataSourceAspect
|
|||
@Around("dsPointCut()")
|
||||
public Object around(ProceedingJoinPoint point) throws Throwable
|
||||
{
|
||||
MethodSignature signature = (MethodSignature) point.getSignature();
|
||||
|
||||
Method method = signature.getMethod();
|
||||
|
||||
DataSource dataSource = method.getAnnotation(DataSource.class);
|
||||
DataSource dataSource = getDataSource(point);
|
||||
|
||||
if (StringUtils.isNotNull(dataSource))
|
||||
{
|
||||
|
|
@ -56,4 +53,24 @@ public class DataSourceAspect
|
|||
DynamicDataSourceContextHolder.clearDataSourceType();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取需要切换的数据源
|
||||
*/
|
||||
public DataSource getDataSource(ProceedingJoinPoint point)
|
||||
{
|
||||
MethodSignature signature = (MethodSignature) point.getSignature();
|
||||
Class<? extends Object> targetClass = point.getTarget().getClass();
|
||||
DataSource targetDataSource = targetClass.getAnnotation(DataSource.class);
|
||||
if (StringUtils.isNotNull(targetDataSource))
|
||||
{
|
||||
return targetDataSource;
|
||||
}
|
||||
else
|
||||
{
|
||||
Method method = signature.getMethod();
|
||||
DataSource dataSource = method.getAnnotation(DataSource.class);
|
||||
return dataSource;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@ import javax.servlet.http.HttpServletResponse;
|
|||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.method.HandlerMethod;
|
||||
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
|
||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.json.JSON;
|
||||
import com.ruoyi.common.utils.ServletUtils;
|
||||
import com.ruoyi.framework.interceptor.annotation.RepeatSubmit;
|
||||
|
||||
/**
|
||||
* 防止重复提交拦截器
|
||||
|
|
|
|||
|
|
@ -247,7 +247,8 @@ insert into sys_menu values('1055', '任务导出', '110', '7', '#', '', 'F', '
|
|||
insert into sys_menu values('1056', '生成查询', '114', '1', '#', '', 'F', '0', 'tool:gen:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||
insert into sys_menu values('1057', '生成修改', '114', '2', '#', '', 'F', '0', 'tool:gen:edit', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||
insert into sys_menu values('1058', '生成删除', '114', '3', '#', '', 'F', '0', 'tool:gen:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||
insert into sys_menu values('1059', '生成代码', '114', '4', '#', '', 'F', '0', 'tool:gen:code', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||
insert into sys_menu values('1059', '预览代码', '114', '4', '#', '', 'F', '0', 'tool:gen:preview', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||
insert into sys_menu values('1060', '生成代码', '114', '5', '#', '', 'F', '0', 'tool:gen:code', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
|
|
@ -361,6 +362,7 @@ insert into sys_role_menu values ('2', '1056');
|
|||
insert into sys_role_menu values ('2', '1057');
|
||||
insert into sys_role_menu values ('2', '1058');
|
||||
insert into sys_role_menu values ('2', '1059');
|
||||
insert into sys_role_menu values ('2', '1060');
|
||||
|
||||
-- ----------------------------
|
||||
-- 8、角色和部门关联表 角色1-N部门
|
||||
|
|
@ -524,6 +526,7 @@ create table sys_config (
|
|||
|
||||
insert into sys_config values(1, '主框架页-默认皮肤样式名称', 'sys.index.skinName', 'skin-blue', 'Y', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '蓝色 skin-blue、绿色 skin-green、紫色 skin-purple、红色 skin-red、黄色 skin-yellow' );
|
||||
insert into sys_config values(2, '用户管理-账号初始密码', 'sys.user.initPassword', '123456', 'Y', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '初始化密码 123456' );
|
||||
insert into sys_config values(3, '主框架页-侧边栏主题', 'sys.index.sideTheme', 'theme-dark', 'Y', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '深色主题theme-dark,浅色主题theme-light' );
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
|
|
|
|||
Loading…
Reference in New Issue