|
|
@ -41,14 +41,14 @@ $(function() { |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
$(window).bind("load resize", |
|
|
$(window).bind("load resize", |
|
|
function() { |
|
|
function() { |
|
|
if ($(this).width() < 769) { |
|
|
if ($(this).width() < 769) { |
|
|
$('body').addClass('mini-navbar'); |
|
|
$('body').addClass('mini-navbar'); |
|
|
$('.navbar-static-side').fadeIn(); |
|
|
$('.navbar-static-side').fadeIn(); |
|
|
$(".sidebar-collapse .logo").addClass("hide"); |
|
|
$(".sidebar-collapse .logo").addClass("hide"); |
|
|
$(".slimScrollDiv").css({ "overflow":"hidden" }) |
|
|
$(".slimScrollDiv").css({ "overflow":"hidden" }) |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
function NavToggle() { |
|
|
function NavToggle() { |
|
|
$('.navbar-minimalize').trigger('click'); |
|
|
$('.navbar-minimalize').trigger('click'); |
|
|
@ -59,16 +59,16 @@ function SmoothlyMenu() { |
|
|
$('#side-menu').hide(); |
|
|
$('#side-menu').hide(); |
|
|
$(".sidebar-collapse .logo").removeClass("hide"); |
|
|
$(".sidebar-collapse .logo").removeClass("hide"); |
|
|
setTimeout(function() { |
|
|
setTimeout(function() { |
|
|
$('#side-menu').fadeIn(500); |
|
|
$('#side-menu').fadeIn(500); |
|
|
}, |
|
|
}, |
|
|
100); |
|
|
100); |
|
|
} else if ($('body').hasClass('fixed-sidebar')) { |
|
|
} else if ($('body').hasClass('fixed-sidebar')) { |
|
|
$('#side-menu').hide(); |
|
|
$('#side-menu').hide(); |
|
|
$(".sidebar-collapse .logo").addClass("hide"); |
|
|
$(".sidebar-collapse .logo").addClass("hide"); |
|
|
setTimeout(function() { |
|
|
setTimeout(function() { |
|
|
$('#side-menu').fadeIn(500); |
|
|
$('#side-menu').fadeIn(500); |
|
|
}, |
|
|
}, |
|
|
300); |
|
|
300); |
|
|
} else { |
|
|
} else { |
|
|
$('#side-menu').removeAttr('style'); |
|
|
$('#side-menu').removeAttr('style'); |
|
|
} |
|
|
} |
|
|
@ -105,7 +105,7 @@ $(function() { |
|
|
//滚动到指定选项卡
|
|
|
//滚动到指定选项卡
|
|
|
function scrollToTab(element) { |
|
|
function scrollToTab(element) { |
|
|
var marginLeftVal = calSumWidth($(element).prevAll()), |
|
|
var marginLeftVal = calSumWidth($(element).prevAll()), |
|
|
marginRightVal = calSumWidth($(element).nextAll()); |
|
|
marginRightVal = calSumWidth($(element).nextAll()); |
|
|
// 可视区域非tab宽度
|
|
|
// 可视区域非tab宽度
|
|
|
var tabOuterWidth = calSumWidth($(".content-tabs").children().not(".menuTabs")); |
|
|
var tabOuterWidth = calSumWidth($(".content-tabs").children().not(".menuTabs")); |
|
|
//可视区域tab宽度
|
|
|
//可视区域tab宽度
|
|
|
@ -127,9 +127,9 @@ $(function() { |
|
|
scrollVal = marginLeftVal - $(element).prev().outerWidth(true); |
|
|
scrollVal = marginLeftVal - $(element).prev().outerWidth(true); |
|
|
} |
|
|
} |
|
|
$('.page-tabs-content').animate({ |
|
|
$('.page-tabs-content').animate({ |
|
|
marginLeft: 0 - scrollVal + 'px' |
|
|
marginLeft: 0 - scrollVal + 'px' |
|
|
}, |
|
|
}, |
|
|
"fast"); |
|
|
"fast"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//查看左侧隐藏的选项卡
|
|
|
//查看左侧隐藏的选项卡
|
|
|
@ -160,9 +160,9 @@ $(function() { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
$('.page-tabs-content').animate({ |
|
|
$('.page-tabs-content').animate({ |
|
|
marginLeft: 0 - scrollVal + 'px' |
|
|
marginLeft: 0 - scrollVal + 'px' |
|
|
}, |
|
|
}, |
|
|
"fast"); |
|
|
"fast"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//查看右侧隐藏的选项卡
|
|
|
//查看右侧隐藏的选项卡
|
|
|
@ -191,9 +191,9 @@ $(function() { |
|
|
scrollVal = calSumWidth($(tabElement).prevAll()); |
|
|
scrollVal = calSumWidth($(tabElement).prevAll()); |
|
|
if (scrollVal > 0) { |
|
|
if (scrollVal > 0) { |
|
|
$('.page-tabs-content').animate({ |
|
|
$('.page-tabs-content').animate({ |
|
|
marginLeft: 0 - scrollVal + 'px' |
|
|
marginLeft: 0 - scrollVal + 'px' |
|
|
}, |
|
|
}, |
|
|
"fast"); |
|
|
"fast"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@ -208,9 +208,9 @@ $(function() { |
|
|
function menuItem() { |
|
|
function menuItem() { |
|
|
// 获取标识数据
|
|
|
// 获取标识数据
|
|
|
var dataUrl = $(this).attr('href'), |
|
|
var dataUrl = $(this).attr('href'), |
|
|
dataIndex = $(this).data('index'), |
|
|
dataIndex = $(this).data('index'), |
|
|
menuName = $.trim($(this).text()), |
|
|
menuName = $.trim($(this).text()), |
|
|
flag = true; |
|
|
flag = true; |
|
|
$(".nav ul li, .nav li").removeClass("selected"); |
|
|
$(".nav ul li, .nav li").removeClass("selected"); |
|
|
$(this).parent("li").addClass("selected"); |
|
|
$(this).parent("li").addClass("selected"); |
|
|
setIframeUrl($(this).attr("href")); |
|
|
setIframeUrl($(this).attr("href")); |
|
|
@ -245,8 +245,8 @@ $(function() { |
|
|
|
|
|
|
|
|
$.modal.loading("数据加载中,请稍后..."); |
|
|
$.modal.loading("数据加载中,请稍后..."); |
|
|
|
|
|
|
|
|
$('.mainContent iframe:visible').load(function () { |
|
|
$('.mainContent iframe:visible').on("load",function () { |
|
|
$.modal.closeLoading(); |
|
|
$.modal.closeLoading(); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
// 添加选项卡
|
|
|
// 添加选项卡
|
|
|
@ -257,10 +257,10 @@ $(function() { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function menuBlank() { |
|
|
function menuBlank() { |
|
|
// 新窗口打开外网以http://开头,如http://ruoyi.vip
|
|
|
// 新窗口打开外网以http://开头,如http://ruoyi.vip
|
|
|
var dataUrl = $(this).attr('href'); |
|
|
var dataUrl = $(this).attr('href'); |
|
|
window.open(dataUrl); |
|
|
window.open(dataUrl); |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
$('.menuItem').on('click', menuItem); |
|
|
$('.menuItem').on('click', menuItem); |
|
|
@ -291,9 +291,9 @@ $(function() { |
|
|
var marginLeftVal = parseInt($('.page-tabs-content').css('margin-left')); |
|
|
var marginLeftVal = parseInt($('.page-tabs-content').css('margin-left')); |
|
|
if (marginLeftVal < 0) { |
|
|
if (marginLeftVal < 0) { |
|
|
$('.page-tabs-content').animate({ |
|
|
$('.page-tabs-content').animate({ |
|
|
marginLeft: (marginLeftVal + currentWidth) + 'px' |
|
|
marginLeft: (marginLeftVal + currentWidth) + 'px' |
|
|
}, |
|
|
}, |
|
|
"fast"); |
|
|
"fast"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 移除当前选项卡
|
|
|
// 移除当前选项卡
|
|
|
@ -331,14 +331,14 @@ $(function() { |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
if($.common.isNotEmpty(panelUrl)){ |
|
|
if($.common.isNotEmpty(panelUrl)){ |
|
|
$('.menuTab[data-id="' + panelUrl + '"]').addClass('active').siblings('.menuTab').removeClass('active'); |
|
|
$('.menuTab[data-id="' + panelUrl + '"]').addClass('active').siblings('.menuTab').removeClass('active'); |
|
|
$('.mainContent .RuoYi_iframe').each(function() { |
|
|
$('.mainContent .RuoYi_iframe').each(function() { |
|
|
if ($(this).data('id') == panelUrl) { |
|
|
if ($(this).data('id') == panelUrl) { |
|
|
$(this).show().siblings('.RuoYi_iframe').hide(); |
|
|
$(this).show().siblings('.RuoYi_iframe').hide(); |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
// 当前元素不处于活动状态
|
|
|
// 当前元素不处于活动状态
|
|
|
@ -387,22 +387,22 @@ $(function() { |
|
|
|
|
|
|
|
|
// 刷新iframe
|
|
|
// 刷新iframe
|
|
|
function refreshTab() { |
|
|
function refreshTab() { |
|
|
var currentId = $('.page-tabs-content').find('.active').attr('data-id'); |
|
|
var currentId = $('.page-tabs-content').find('.active').attr('data-id'); |
|
|
var target = $('.RuoYi_iframe[data-id="' + currentId + '"]'); |
|
|
var target = $('.RuoYi_iframe[data-id="' + currentId + '"]'); |
|
|
var url = target.attr('src'); |
|
|
var url = target.attr('src'); |
|
|
target.attr('src', url).ready(); |
|
|
target.attr('src', url).ready(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 页签全屏
|
|
|
// 页签全屏
|
|
|
function fullScreenTab() { |
|
|
function fullScreenTab() { |
|
|
var currentId = $('.page-tabs-content').find('.active').attr('data-id'); |
|
|
var currentId = $('.page-tabs-content').find('.active').attr('data-id'); |
|
|
var target = $('.RuoYi_iframe[data-id="' + currentId + '"]'); |
|
|
var target = $('.RuoYi_iframe[data-id="' + currentId + '"]'); |
|
|
target.fullScreen(true); |
|
|
target.fullScreen(true); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 关闭当前选项卡
|
|
|
// 关闭当前选项卡
|
|
|
function tabCloseCurrent() { |
|
|
function tabCloseCurrent() { |
|
|
$('.page-tabs-content').find('.active i').trigger("click"); |
|
|
$('.page-tabs-content').find('.active i').trigger("click"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//关闭其他选项卡
|
|
|
//关闭其他选项卡
|
|
|
@ -416,7 +416,7 @@ $(function() { |
|
|
|
|
|
|
|
|
// 关闭全部选项卡
|
|
|
// 关闭全部选项卡
|
|
|
function tabCloseAll() { |
|
|
function tabCloseAll() { |
|
|
$('.page-tabs-content').children("[data-id]").not(":first").each(function() { |
|
|
$('.page-tabs-content').children("[data-id]").not(":first").each(function() { |
|
|
$('.RuoYi_iframe[data-id="' + $(this).data('id') + '"]').remove(); |
|
|
$('.RuoYi_iframe[data-id="' + $(this).data('id') + '"]').remove(); |
|
|
$(this).remove(); |
|
|
$(this).remove(); |
|
|
}); |
|
|
}); |
|
|
@ -430,7 +430,7 @@ $(function() { |
|
|
|
|
|
|
|
|
// 全屏显示
|
|
|
// 全屏显示
|
|
|
$('#fullScreen').on('click', function () { |
|
|
$('#fullScreen').on('click', function () { |
|
|
$(document).toggleFullScreen(); |
|
|
$(document).toggleFullScreen(); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
// 页签刷新按钮
|
|
|
// 页签刷新按钮
|
|
|
@ -464,8 +464,8 @@ $(function() { |
|
|
|
|
|
|
|
|
// 关闭全屏
|
|
|
// 关闭全屏
|
|
|
$('#ax_close_max').click(function(){ |
|
|
$('#ax_close_max').click(function(){ |
|
|
$('#content-main').toggleClass('max'); |
|
|
$('#content-main').toggleClass('max'); |
|
|
$('#ax_close_max').hide(); |
|
|
$('#ax_close_max').hide(); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
// 双击选项卡全屏显示
|
|
|
// 双击选项卡全屏显示
|
|
|
@ -476,13 +476,13 @@ $(function() { |
|
|
|
|
|
|
|
|
// 设置锚点
|
|
|
// 设置锚点
|
|
|
function setIframeUrl(href) { |
|
|
function setIframeUrl(href) { |
|
|
if($.common.equals("history", mode)) { |
|
|
if($.common.equals("history", mode)) { |
|
|
storage.set('publicPath', href); |
|
|
storage.set('publicPath', href); |
|
|
} else { |
|
|
} else { |
|
|
var nowUrl = window.location.href; |
|
|
var nowUrl = window.location.href; |
|
|
var newUrl = nowUrl.substring(0, nowUrl.indexOf("#")); |
|
|
var newUrl = nowUrl.substring(0, nowUrl.indexOf("#")); |
|
|
window.location.href = newUrl + "#" + href; |
|
|
window.location.href = newUrl + "#" + href; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
$(window).keydown(function(event) { |
|
|
$(window).keydown(function(event) { |
|
|
@ -764,7 +764,7 @@ var initUtil={ |
|
|
|
|
|
|
|
|
$.modal.loading("数据加载中,请稍后..."); |
|
|
$.modal.loading("数据加载中,请稍后..."); |
|
|
|
|
|
|
|
|
$('.mainContent iframe:visible').load(function () { |
|
|
$('.mainContent iframe:visible').on("load",function () { |
|
|
$.modal.closeLoading(); |
|
|
$.modal.closeLoading(); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|