mirror of https://gitee.com/y_project/RuoYi.git
修复页签关闭后存在的跳转问题(I8JDIS)
parent
4933ea6d2f
commit
fd4fe83e9f
|
@ -61,7 +61,7 @@ $(window).bind("load resize", function() {
|
|||
$(".slimScrollDiv").css({ "overflow": "hidden" });
|
||||
$('.navbar-static-side').fadeOut();
|
||||
} else {
|
||||
if($('body').hasClass('canvas-menu')) {
|
||||
if ($('body').hasClass('canvas-menu')) {
|
||||
$('body').addClass('fixed-sidebar');
|
||||
$('body').removeClass('canvas-menu');
|
||||
$("body").removeClass("mini-navbar");
|
||||
|
@ -118,7 +118,7 @@ function fixedSidebar() {
|
|||
|
||||
// 设置锚点
|
||||
function setIframeUrl(href) {
|
||||
if($.common.equals("history", mode)) {
|
||||
if ($.common.equals("history", mode)) {
|
||||
storage.set('publicPath', href);
|
||||
} else {
|
||||
var nowUrl = window.location.href;
|
||||
|
@ -353,7 +353,6 @@ $(function() {
|
|||
var panelUrl = $(this).parents('.menuTab').data('panel');
|
||||
// 当前元素处于活动状态
|
||||
if ($(this).parents('.menuTab').hasClass('active')) {
|
||||
syncMenuTab($('.page-tabs-content').find('.active').attr('data-id'));
|
||||
|
||||
// 当前元素后面有同辈元素,使后面的一个元素处于活动状态
|
||||
if ($(this).parents('.menuTab').next('.menuTab').length) {
|
||||
|
@ -407,7 +406,7 @@ $(function() {
|
|||
}
|
||||
});
|
||||
|
||||
if($.common.isNotEmpty(panelUrl)){
|
||||
if ($.common.isNotEmpty(panelUrl)) {
|
||||
$('.menuTab[data-id="' + panelUrl + '"]').addClass('active').siblings('.menuTab').removeClass('active');
|
||||
$('.mainContent .RuoYi_iframe').each(function() {
|
||||
if ($(this).data('id') == panelUrl) {
|
||||
|
@ -432,7 +431,7 @@ $(function() {
|
|||
});
|
||||
}
|
||||
scrollToTab($('.menuTab.active'));
|
||||
syncMenuTab($('.page-tabs-content').find('.active').attr('data-id'));
|
||||
syncMenuTab($.common.isNotEmpty(panelUrl) ? panelUrl : $('.page-tabs-content').find('.active').attr('data-id'));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
var startLayDate;
|
||||
var endLayDate;
|
||||
var isScrollToTop = parent.isScrollToTop;
|
||||
|
||||
$(function() {
|
||||
|
||||
// layer扩展皮肤
|
||||
|
@ -231,7 +233,7 @@ var refreshItem = function(){
|
|||
/** 关闭选项卡 */
|
||||
var closeItem = function(dataId){
|
||||
var topWindow = $(window.parent.document);
|
||||
if($.common.isNotEmpty(dataId)){
|
||||
if ($.common.isNotEmpty(dataId)) {
|
||||
window.parent.$.modal.closeLoading();
|
||||
// 根据dataId关闭指定选项卡
|
||||
$('.menuTab[data-id="' + dataId + '"]', topWindow).remove();
|
||||
|
@ -241,7 +243,7 @@ var closeItem = function(dataId){
|
|||
}
|
||||
var panelUrl = window.frameElement.getAttribute('data-panel');
|
||||
$('.page-tabs-content .active i', topWindow).click();
|
||||
if($.common.isNotEmpty(panelUrl)){
|
||||
if ($.common.isNotEmpty(panelUrl)) {
|
||||
$('.menuTab[data-id="' + panelUrl + '"]', topWindow).addClass('active').siblings('.menuTab').removeClass('active');
|
||||
$('.mainContent .RuoYi_iframe', topWindow).each(function() {
|
||||
if ($(this).data('id') == panelUrl) {
|
||||
|
@ -288,7 +290,7 @@ function createMenuItem(dataUrl, menuName, isRefresh) {
|
|||
|
||||
// 添加选项卡对应的iframe
|
||||
var str1 = '<iframe class="RuoYi_iframe" name="iframe' + dataIndex + '" width="100%" height="100%" src="' + dataUrl + '" frameborder="0" data-id="' + dataUrl + '" data-panel="' + panelUrl + '" seamless></iframe>';
|
||||
if (parent.isScrollToTop) {
|
||||
if (isScrollToTop) {
|
||||
$('.mainContent', topWindow).find('iframe.RuoYi_iframe').hide().parents('.mainContent').append(str1);
|
||||
} else {
|
||||
$('.mainContent', topWindow).find('iframe.RuoYi_iframe').css({"visibility": "hidden", "position": "absolute"}).parents('.mainContent').append(str1);
|
||||
|
@ -363,7 +365,7 @@ function activeWindow() {
|
|||
}
|
||||
|
||||
function openToCurrentTab(obj) {
|
||||
if (parent.isScrollToTop) {
|
||||
if (isScrollToTop) {
|
||||
$(obj).show().siblings('.RuoYi_iframe').hide();
|
||||
} else {
|
||||
$(obj).css({"visibility": "visible", "position": "static"}).siblings('.RuoYi_iframe').css({"visibility": "hidden", "position": "absolute"});
|
||||
|
@ -373,22 +375,22 @@ function openToCurrentTab(obj) {
|
|||
/** 密码规则范围验证 */
|
||||
function checkpwd(chrtype, password) {
|
||||
if (chrtype == 1) {
|
||||
if(!$.common.numValid(password)){
|
||||
if (!$.common.numValid(password)) {
|
||||
$.modal.alertWarning("密码只能为0-9数字");
|
||||
return false;
|
||||
}
|
||||
} else if (chrtype == 2) {
|
||||
if(!$.common.enValid(password)){
|
||||
if (!$.common.enValid(password)) {
|
||||
$.modal.alertWarning("密码只能为a-z和A-Z字母");
|
||||
return false;
|
||||
}
|
||||
} else if (chrtype == 3) {
|
||||
if(!$.common.enNumValid(password)){
|
||||
if (!$.common.enNumValid(password)) {
|
||||
$.modal.alertWarning("密码必须包含字母以及数字");
|
||||
return false;
|
||||
}
|
||||
} else if (chrtype == 4) {
|
||||
if(!$.common.charValid(password)){
|
||||
if (!$.common.charValid(password)) {
|
||||
$.modal.alertWarning("密码必须包含字母、数字、以及特殊符号<font color='red'>~!@#$%^&*()-=_+</font>");
|
||||
return false;
|
||||
}
|
||||
|
@ -398,14 +400,14 @@ function checkpwd(chrtype, password) {
|
|||
|
||||
/** 开始时间/时分秒 */
|
||||
function beginOfTime(date) {
|
||||
if($.common.isNotEmpty(date)) {
|
||||
if ($.common.isNotEmpty(date)) {
|
||||
return $.common.sprintf("%s 00:00:00", date);
|
||||
}
|
||||
}
|
||||
|
||||
/** 结束时间/时分秒 */
|
||||
function endOfTime(date) {
|
||||
if($.common.isNotEmpty(date)) {
|
||||
if ($.common.isNotEmpty(date)) {
|
||||
return $.common.sprintf("%s 23:59:59", date);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -365,7 +365,7 @@ var table = {
|
|||
if ($.common.isNotEmpty(pageSize)) {
|
||||
params.pageSize = pageSize;
|
||||
}
|
||||
if ($.common.isNotEmpty(tableId)){
|
||||
if ($.common.isNotEmpty(tableId)) {
|
||||
$("#" + tableId).bootstrapTable('refresh', params);
|
||||
} else{
|
||||
$("#" + table.options.id).bootstrapTable('refresh', params);
|
||||
|
@ -425,7 +425,7 @@ var table = {
|
|||
shadeClose: true,
|
||||
btn1: function(index, layero){
|
||||
var file = layero.find('#file').val();
|
||||
if (file == '' || (!$.common.endWith(file, '.xls') && !$.common.endWith(file, '.xlsx'))){
|
||||
if (file == '' || (!$.common.endWith(file, '.xls') && !$.common.endWith(file, '.xlsx'))) {
|
||||
$.modal.msgWarning("请选择后缀为 “xls”或“xlsx”的文件。");
|
||||
return false;
|
||||
}
|
||||
|
@ -806,7 +806,7 @@ var table = {
|
|||
},
|
||||
// 获取iframe页的DOM
|
||||
getChildFrame: function (index) {
|
||||
if ($.common.isEmpty(index)){
|
||||
if ($.common.isEmpty(index)) {
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
return parent.layer.getChildFrame('body', index);
|
||||
} else {
|
||||
|
@ -815,7 +815,7 @@ var table = {
|
|||
},
|
||||
// 关闭窗体
|
||||
close: function (index) {
|
||||
if ($.common.isEmpty(index)){
|
||||
if ($.common.isEmpty(index)) {
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);
|
||||
} else {
|
||||
|
|
|
@ -336,7 +336,7 @@ var mode = "history";
|
|||
var historyPath = storage.get("historyPath");
|
||||
// 是否页签与菜单联动
|
||||
var isLinkage = true;
|
||||
//是否页签切换滚动到顶部
|
||||
// 是否页签切换滚动到顶部
|
||||
var isScrollToTop = true;
|
||||
|
||||
// 本地主题优先,未设置取系统配置
|
||||
|
|
Loading…
Reference in New Issue