|
|
@ -9,80 +9,84 @@ |
|
|
|
<html lang="en"> |
|
|
|
<html lang="en"> |
|
|
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <!--输出,条件,迭代标签库--> |
|
|
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <!--输出,条件,迭代标签库--> |
|
|
|
<%@ page pageEncoding="utf-8" %> |
|
|
|
<%@ page pageEncoding="utf-8" %> |
|
|
|
|
|
|
|
<head> |
|
|
|
<script> |
|
|
|
<script> |
|
|
|
function showMenu() { |
|
|
|
function showMenu() { |
|
|
|
var child = $("." + $(this).attr("id")); |
|
|
|
var child = $("." + $(this).attr("id")); |
|
|
|
i = $(this).find('i'); |
|
|
|
i = $(this).find('i'); |
|
|
|
classPrefix = 'fas fa-angle-'; |
|
|
|
classPrefix = 'fas fa-angle-'; |
|
|
|
if (i.attr('class') == classPrefix + 'right') { |
|
|
|
if (i.attr('class') == classPrefix + 'right') { |
|
|
|
i.attr('class', classPrefix + 'down'); |
|
|
|
i.attr('class', classPrefix + 'down'); |
|
|
|
child.fadeIn() |
|
|
|
child.fadeIn() |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
i.attr('class', classPrefix + 'right'); |
|
|
|
i.attr('class', classPrefix + 'right'); |
|
|
|
hideMenu(child) |
|
|
|
hideMenu(child) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function hideMenu(child) { |
|
|
|
function hideMenu(child) { |
|
|
|
if (child.length > 1) { |
|
|
|
if (child.length > 1) { |
|
|
|
child.find('i').attr('class', classPrefix + 'right'); |
|
|
|
child.find('i').attr('class', classPrefix + 'right'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
child.each(function () { |
|
|
|
|
|
|
|
$(this).fadeOut(); |
|
|
|
|
|
|
|
hideMenu($("." + $(this).attr('id'))); |
|
|
|
|
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
child.each(function () { |
|
|
|
|
|
|
|
$(this).fadeOut(); |
|
|
|
|
|
|
|
hideMenu($("." + $(this).attr('id'))); |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function addMenu(menus, level,id) { |
|
|
|
function addMenu(menus, level, id) { |
|
|
|
|
|
|
|
|
|
|
|
for (var menu in menus) { |
|
|
|
for (var menu in menus) { |
|
|
|
href = menus[menu].href; |
|
|
|
href = menus[menu].href; |
|
|
|
menuId='#menu'+menus[menu].id; |
|
|
|
menuId = '#menu' + menus[menu].id; |
|
|
|
$("#list-tab").append('<a class="list-group-item list-group-item-action" data-href="'+menus[menu].href+'" data-id="'+menus[menu].id+'" id="' + menuId.substr(1) + '" data-toggle="list">\n' + |
|
|
|
$("#list-tab").append('<a class="list-group-item list-group-item-action" data-href="' + menus[menu].href + '" data-id="' + menus[menu].id + '" id="' + menuId.substr(1) + '" data-toggle="list">\n' + |
|
|
|
' ' + menus[menu].menuName + '\n' + |
|
|
|
' ' + menus[menu].menuName + '\n' + |
|
|
|
' </a>'); |
|
|
|
' </a>'); |
|
|
|
if (level > 0) { |
|
|
|
if (level > 0) { |
|
|
|
$(menuId).addClass('offset-' + level).addClass('menu' + id); |
|
|
|
$(menuId).addClass('offset-' + level).addClass('menu' + id); |
|
|
|
$(menuId).hide(); |
|
|
|
$(menuId).hide(); |
|
|
|
} |
|
|
|
} |
|
|
|
if (menus[menu].childMenu.length > 0) { |
|
|
|
if (menus[menu].childMenu.length > 0) { |
|
|
|
$(menuId).append('<i class="fas fa-angle-right"></i><span class="badge badge-primary badge-pill offset-8">' + menus[menu].childMenu.length + '</span>').click(showMenu); |
|
|
|
$(menuId).append('<i class="fas fa-angle-right"></i><span class="badge badge-primary badge-pill offset-8">' + menus[menu].childMenu.length + '</span>').click(showMenu); |
|
|
|
addMenu(menus[menu].childMenu, level + 1, menus[menu].id); |
|
|
|
addMenu(menus[menu].childMenu, level + 1, menus[menu].id); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
$(menuId).click(function () { |
|
|
|
$(menuId).click(function () { |
|
|
|
btnId='#btn'+$(this).data('id'); |
|
|
|
btnId = '#btn' + $(this).data('id'); |
|
|
|
if ($(btnId).length == 0) { |
|
|
|
if ($(btnId).length == 0) { |
|
|
|
$("#tabs").append('<button type="button" id="' + btnId.substr(1) + '" class="btn btn-secondary btn-lg" href="#iframe'+$(this).data('id')+'">' + $(this).text() + '\n' + |
|
|
|
$("#tabs").append('<button type="button" id="' + btnId.substr(1) + '" class="btn btn-secondary btn-lg" data-id="'+$(this).data('id')+'" href="#iframe' + $(this).data('id') + '">' + $(this).text() + '\n' + |
|
|
|
' <i class="fas fa-times" style="display: none"></i>\n' + |
|
|
|
' <i class="fas fa-times" style="display: none"></i>\n' + |
|
|
|
' </button>') |
|
|
|
' </button>') |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$(btnId).click(); |
|
|
|
$(btnId).click(); |
|
|
|
|
|
|
|
|
|
|
|
iframe='#iframe'+$(this).data('id'); |
|
|
|
iframe = '#iframe' + $(this).data('id'); |
|
|
|
if ($(iframe).length == 0) { |
|
|
|
if ($(iframe).length == 0) { |
|
|
|
$(top.document).find('#nav-tabContent').append('<div id="' + iframe.substr(1) + '" class="tab-pane fade embed-responsive embed-responsive-16by9" >\n' + |
|
|
|
$(top.document).find('#nav-tabContent').append('<div id="' + iframe.substr(1) + '" class="tab-pane fade embed-responsive embed-responsive-16by9" >\n' + |
|
|
|
' <iframe class="embed-responsive-item" src="'+$(this).data('href')+'"></iframe>\n' + |
|
|
|
' <iframe class="embed-responsive-item" src="' + $(this).data('href') + '"></iframe>\n' + |
|
|
|
' </div>'); |
|
|
|
' </div>'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$(iframe).addClass('active show'); |
|
|
|
$(iframe).addClass('active show'); |
|
|
|
$(iframe).siblings().removeClass('active show'); |
|
|
|
$(iframe).siblings().removeClass('active show'); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(function () { |
|
|
|
|
|
|
|
addMenu(${menus}.data, 0 |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="list-group" id="list-tab" role="tablist"> |
|
|
|
$(function () { |
|
|
|
|
|
|
|
addMenu(${menus}.data, 0 |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
</script> |
|
|
|
|
|
|
|
</head> |
|
|
|
|
|
|
|
<div class="show" id="navbarNavDropdown"> |
|
|
|
|
|
|
|
<div class="col-2"> |
|
|
|
|
|
|
|
<div class="list-group" id="list-tab" role="tablist"> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|