mirror of https://gitee.com/y_project/RuoYi.git
Pre Merge pull request !324 from xian62/master
commit
44fe6a4ab5
|
@ -294,8 +294,11 @@ $(function() {
|
|||
}
|
||||
});
|
||||
}
|
||||
if (isRefresh) {
|
||||
if ($.common.equals(isRefresh, "0")) {
|
||||
}else if($.common.equals(isRefresh, "1")){
|
||||
refreshTab();
|
||||
}else{
|
||||
refreshTable();
|
||||
}
|
||||
flag = false;
|
||||
return false;
|
||||
|
@ -465,6 +468,22 @@ $(function() {
|
|||
target.attr('src', url).ready();
|
||||
}
|
||||
|
||||
// 只刷新当前iframe下面的table和treetable,避免刷新整个tab页签造成检索条件或表单输入丢失
|
||||
function refreshTable() {
|
||||
var currentId = $('.page-tabs-content').find('.active').attr('data-id');
|
||||
var topWindow = $(window.document);
|
||||
//var currentId = $('.page-tabs-content', topWindow).find('.active').attr('data-panel');
|
||||
var $contentWindow = $('.RuoYi_iframe[data-id="' + currentId + '"]', topWindow)[0].contentWindow;
|
||||
if($contentWindow.table == undefined){
|
||||
}else{
|
||||
if ($contentWindow.table.options.type == table_type.bootstrapTable) {
|
||||
$contentWindow.$.table.refresh();
|
||||
} else if ($contentWindow.table.options.type == table_type.bootstrapTreeTable) {
|
||||
$contentWindow.$.treeTable.refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 页签全屏
|
||||
function fullScreenTab() {
|
||||
var currentId = $('.page-tabs-content').find('.active').attr('data-id');
|
||||
|
|
|
@ -274,8 +274,12 @@ function createMenuItem(dataUrl, menuName, isRefresh) {
|
|||
}
|
||||
});
|
||||
}
|
||||
if (isRefresh) {
|
||||
refreshTab();
|
||||
|
||||
if ($.common.equals(isRefresh, "0")) {
|
||||
}else if($.common.equals(isRefresh, "1")){
|
||||
refreshTab();
|
||||
}else{
|
||||
refreshTable();
|
||||
}
|
||||
flag = false;
|
||||
return false;
|
||||
|
@ -311,6 +315,21 @@ function refreshTab() {
|
|||
target.attr('src', url).ready();
|
||||
}
|
||||
|
||||
// 只刷新当前iframe下面的table和treetable,避免刷新整个tab页签造成检索条件或表单输入丢失
|
||||
function refreshTable() {
|
||||
var topWindow = $(window.parent.document);
|
||||
var currentId = $('.page-tabs-content', topWindow).find('.active').attr('data-panel');
|
||||
var $contentWindow = $('.RuoYi_iframe[data-id="' + currentId + '"]', topWindow)[0].contentWindow;
|
||||
if($contentWindow.table == undefined){
|
||||
}else{
|
||||
if ($contentWindow.table.options.type == table_type.bootstrapTable) {
|
||||
$contentWindow.$.table.refresh();
|
||||
} else if ($contentWindow.table.options.type == table_type.bootstrapTreeTable) {
|
||||
$contentWindow.$.treeTable.refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 滚动到指定选项卡
|
||||
function scrollToTab(element) {
|
||||
var topWindow = $(window.parent.document);
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
<div class="tab-pane fade height-full" th:id="|menu_${menu.menuId}|">
|
||||
<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}" th:data-refresh="${cmenu.isRefresh == '0'}">
|
||||
<a class="menu-content" th:if="${#lists.isEmpty(cmenu.children)}" th:href="@{${cmenu.url}}" th:classappend="${#strings.isEmpty(cmenu.target)} ? |menuItem| : ${cmenu.target}" th:data-refresh="${cmenu.isRefresh}">
|
||||
<i th:class="${cmenu.icon} + ' fa-fw'"></i> <span class="nav-label">[[${cmenu.menuName}]]</span>
|
||||
</a>
|
||||
<a class="menu-content" th:if="${not #lists.isEmpty(cmenu.children)}" href="#">
|
||||
|
@ -60,7 +60,7 @@
|
|||
</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}" th:data-refresh="${emenu.isRefresh == '0'}">
|
||||
<a th:if="${#lists.isEmpty(emenu.children)}" th:href="@{${emenu.url}}" th:class="${#strings.isEmpty(emenu.target)} ? |menuItem| : ${emenu.target}" th:data-refresh="${emenu.isRefresh}">
|
||||
<i th:class="${emenu.icon} + ' fa-fw'"></i>
|
||||
[[${emenu.menuName}]]
|
||||
</a>
|
||||
|
@ -70,7 +70,7 @@
|
|||
<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}}" th:data-refresh="${fmenu.isRefresh == '0'}">[[${fmenu.menuName}]]</a></li>
|
||||
<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}}" th:data-refresh="${fmenu.isRefresh}">[[${fmenu.menuName}]]</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -50,21 +50,21 @@
|
|||
<a class="menuItem" th:href="@{/system/main}"><i class="fa fa-home"></i> <span class="nav-label">首页</span> </a>
|
||||
</li>
|
||||
<li th:each="menu : ${menus}">
|
||||
<a th:class="@{${!#strings.isEmpty(menu.url) && menu.url != '#'} ? ${menu.target}}" th:href="@{${#strings.isEmpty(menu.url)} ? |#| : ${menu.url}}" th:data-refresh="${menu.isRefresh == '0'}">
|
||||
<a th:class="@{${!#strings.isEmpty(menu.url) && menu.url != '#'} ? ${menu.target}}" th:href="@{${#strings.isEmpty(menu.url)} ? |#| : ${menu.url}}" th:data-refresh="${menu.isRefresh}">
|
||||
<i class="fa fa-bar-chart-o" th:class="${menu.icon}"></i>
|
||||
<span class="nav-label" th:text="${menu.menuName}">一级菜单</span>
|
||||
<span th:class="${#strings.isEmpty(menu.url) || menu.url == '#'} ? |fa arrow|"></span>
|
||||
</a>
|
||||
<ul class="nav nav-second-level collapse">
|
||||
<li th:each="cmenu : ${menu.children}">
|
||||
<a th:if="${#lists.isEmpty(cmenu.children)}" th:class="${#strings.isEmpty(cmenu.target)} ? |menuItem| : ${cmenu.target}" th:utext="${cmenu.menuName}" th:href="@{${cmenu.url}}" th:data-refresh="${cmenu.isRefresh == '0'}">二级菜单</a>
|
||||
<a th:if="${#lists.isEmpty(cmenu.children)}" th:class="${#strings.isEmpty(cmenu.target)} ? |menuItem| : ${cmenu.target}" th:utext="${cmenu.menuName}" th:href="@{${cmenu.url}}" th:data-refresh="${cmenu.isRefresh}">二级菜单</a>
|
||||
<a th:if="${not #lists.isEmpty(cmenu.children)}" href="#">[[${cmenu.menuName}]]<span class="fa arrow"></span></a>
|
||||
<ul th:if="${not #lists.isEmpty(cmenu.children)}" class="nav nav-third-level">
|
||||
<li th:each="emenu : ${cmenu.children}">
|
||||
<a th:if="${#lists.isEmpty(emenu.children)}" th:class="${#strings.isEmpty(emenu.target)} ? |menuItem| : ${emenu.target}" th:text="${emenu.menuName}" th:href="@{${emenu.url}}" th:data-refresh="${emenu.isRefresh == '0'}">三级菜单</a>
|
||||
<a th:if="${#lists.isEmpty(emenu.children)}" th:class="${#strings.isEmpty(emenu.target)} ? |menuItem| : ${emenu.target}" th:text="${emenu.menuName}" th:href="@{${emenu.url}}" th:data-refresh="${emenu.isRefresh}">三级菜单</a>
|
||||
<a th:if="${not #lists.isEmpty(emenu.children)}" href="#">[[${emenu.menuName}]]<span class="fa arrow"></span></a>
|
||||
<ul th:if="${not #lists.isEmpty(emenu.children)}" class="nav nav-four-level">
|
||||
<li th:each="fmenu : ${emenu.children}"><a th:if="${#lists.isEmpty(fmenu.children)}" th:class="${#strings.isEmpty(fmenu.target)} ? |menuItem| : ${fmenu.target}" th:text="${fmenu.menuName}" th:href="@{${fmenu.url}}" th:data-refresh="${fmenu.isRefresh == '0'}">四级菜单</a></li>
|
||||
<li th:each="fmenu : ${emenu.children}"><a th:if="${#lists.isEmpty(fmenu.children)}" th:class="${#strings.isEmpty(fmenu.target)} ? |menuItem| : ${fmenu.target}" th:text="${fmenu.menuName}" th:href="@{${fmenu.url}}" th:data-refresh="${fmenu.isRefresh}">四级菜单</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -80,12 +80,16 @@
|
|||
<label class="col-sm-2 control-label is-refresh" title="打开菜单选项卡是否刷新页面">是否刷新:<i class="fa fa-question-circle-o"></i></label>
|
||||
<div class="col-sm-3 is-refresh">
|
||||
<div class="radio-box">
|
||||
<input type="radio" id="refresh-no" name="isRefresh" value="1" checked>
|
||||
<label for="refresh-no">否</label>
|
||||
<input type="radio" id="refresh-no" name="isRefresh" value="0" checked>
|
||||
<label for="refresh-no">不刷新</label>
|
||||
</div>
|
||||
<div class="radio-box">
|
||||
<input type="radio" id="refresh-yes" name="isRefresh" value="0">
|
||||
<label for="refresh-yes">是</label>
|
||||
<input type="radio" id="refresh-yes" name="isRefresh" value="1">
|
||||
<label for="refresh-yes">全局刷新</label>
|
||||
</div>
|
||||
<div class="radio-box">
|
||||
<input type="radio" id="refresh-yes-onlyTable" name="isRefresh" value="2">
|
||||
<label for="refresh-yes">仅列表刷新</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -81,12 +81,16 @@
|
|||
<label class="col-sm-2 control-label is-refresh" title="打开菜单选项卡是否刷新页面">是否刷新:<i class="fa fa-question-circle-o"></i></label>
|
||||
<div class="col-sm-3 is-refresh">
|
||||
<div class="radio-box">
|
||||
<input type="radio" id="refresh-no" name="isRefresh" value="1" th:field="*{isRefresh}">
|
||||
<label for="refresh-no">否</label>
|
||||
<input type="radio" id="refresh-no" name="isRefresh" value="0" th:field="*{isRefresh}">
|
||||
<label for="refresh-no">不刷新</label>
|
||||
</div>
|
||||
<div class="radio-box">
|
||||
<input type="radio" id="refresh-yes" name="isRefresh" value="0" th:field="*{isRefresh}">
|
||||
<label for="refresh-yes">是</label>
|
||||
<input type="radio" id="refresh-yes" name="isRefresh" value="1" th:field="*{isRefresh}">
|
||||
<label for="refresh-yes">全局刷新</label>
|
||||
</div>
|
||||
<div class="radio-box">
|
||||
<input type="radio" id="refresh-yes-onlyTable" name="isRefresh" value="2" th:field="*{isRefresh}">
|
||||
<label for="refresh-yes">仅列表刷新</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -43,7 +43,7 @@ public class SysMenu extends BaseEntity
|
|||
/** 菜单状态(0显示 1隐藏) */
|
||||
private String visible;
|
||||
|
||||
/** 是否刷新(0刷新 1不刷新) */
|
||||
/** 是否刷新(0不刷新 1全页面刷新 2仅列表刷新) */
|
||||
private String isRefresh;
|
||||
|
||||
/** 权限字符串 */
|
||||
|
|
Loading…
Reference in New Issue