You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

355 lines
11 KiB

2 years ago
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<!-- 页面meta -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>数据 - AdminLTE2定制版</title>
<meta name="description" content="AdminLTE2定制版">
<meta name="keywords" content="AdminLTE2定制版">
<!-- Tell the browser to be responsive to screen width -->
<meta
content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"
name="viewport">
<link rel="stylesheet" href="<%=basePath %>admin/plugins/bootstrap/css/bootstrap.min.css"/>
<link rel="stylesheet" href="<%=basePath %>admin/plugins/font-awesome/css/font-awesome.min.css"/>
<link rel="stylesheet" href="<%=basePath %>admin/plugins/ionicons/css/ionicons.min.css"/>
<link rel="stylesheet" href="<%=basePath %>admin/plugins/iCheck/square/blue.css"/>
<link rel="stylesheet" href="<%=basePath %>admin/plugins/morris/morris.css"/>
<link rel="stylesheet" href="<%=basePath %>admin/plugins/jvectormap/jquery-jvectormap-1.2.2.css"/>
<link rel="stylesheet" href="<%=basePath %>admin/plugins/datepicker/datepicker3.css"/>
<link rel="stylesheet" href="<%=basePath %>admin/plugins/daterangepicker/daterangepicker.css"/>
<link rel="stylesheet" href="<%=basePath %>admin/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css"/>
<link rel="stylesheet" href="<%=basePath %>admin/plugins/datatables/dataTables.bootstrap.css"/>
<link rel="stylesheet" href="<%=basePath %>admin/plugins/treeTable/jquery.treetable.css"/>
<link rel="stylesheet" href="<%=basePath %>admin/plugins/treeTable/jquery.treetable.theme.default.css"/>
<link rel="stylesheet" href="<%=basePath %>admin/plugins/select2/select2.css">
<link rel="stylesheet" href="<%=basePath %>admin/plugins/colorpicker/bootstrap-colorpicker.min.css">
<link rel="stylesheet" href="<%=basePath %>admin/plugins/bootstrap-markdown/css/bootstrap-markdown.min.css">
<link rel="stylesheet" href="<%=basePath %>admin/plugins/adminLTE/css/AdminLTE.css">
<link rel="stylesheet" href="<%=basePath %>admin/plugins/adminLTE/css/skins/_all-skins.min.css">
<link rel="stylesheet" href="<%=basePath %>admin/css/style.css">
<link rel="stylesheet" href="<%=basePath %>admin/plugins/ionslider/ion.rangeSlider.css">
<link rel="stylesheet" href="<%=basePath %>admin/plugins/ionslider/ion.rangeSlider.skinNice.css">
<link rel="stylesheet" href="<%=basePath %>admin/plugins/bootstrap-slider/slider.css">
<script src="<%=basePath %>admin/js/jquery-1.7.1.min.js"></script>
<script type="text/javascript">
$(function(){
var height=window.screen.height-150;
var width=window.screen.width;
//$('#right')[0].width=width;
$('#right')[0].height=height;
loadlist();
})
function loadlist()
{
$.ajax({
url: "../../UsersServlet?method=getUsersList",
type: "POST",
async: false,
dataType:'json',
data:{
username:$('#username').val(),
id:''
},
contentType: "application/x-www-form-urlencoded;charset=UTF-8",
success: function (data) {
var totalhtml='';
$.each(data.rows, function (i, val) {
totalhtml+='<tr>'+
'<td><input name="ids" id="ids" value="'+data.rows[i]["id"]+'" type="checkbox"></td>'+
'<td>'+data.rows[i]["id"]+'</td>'+
'<td>'+data.rows[i]["name"]+'</td>'+
'<td>'+data.rows[i]["truename"]+'</td>'+
'<td>'+data.rows[i]["password"]+'</td>'+
'<td>'+data.rows[i]["rolename"]+'</td>'+
'<td>开启</td>'+
'<td class="text-center">'+
'<a href="user-modify.jsp?id='+data.rows[i]["id"]+'" class="btn bg-olive btn-xs">详情</a>'+
'<a href="user-role-add.jsp?id='+data.rows[i]["id"]+'" class="btn bg-olive btn-xs">更改角色</a>'+
'</td>'+
'</tr>';
})
$('#tbody').html(totalhtml);
}
});
}
//实现获取复选框ID实现删除功能
function deleteByIds() {
//获取复选对象
var ids = document.getElementsByName("ids");
var arr = new Array();
for (var i = 0; i < ids.length; i++) {
//判断出被选中的复选框
if (ids[i].checked) {//true
//alert(ids[i].value);
//arr[i]=ids[i].value;
arr.push(ids[i].value)
}
}
$.ajax({
url: "../../UsersServlet?method=DeleteUsers",
type: "POST",
async: false,
dataType: 'json',
data: {
Usersids: arr.toString()
},
contentType: "application/x-www-form-urlencoded;charset=UTF-8",
success: function (data) {
$.each(data.rows, function (i, val) {
})
}
});
//location.href="../user/deleteByIds?ids="+arr;
}
</script>
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
<!-- 页面头部 -->
<jsp:include page="header.jsp"></jsp:include>
<!-- 页面头部 /-->
<!-- 导航侧栏 -->
<aside class="main-sidebar">
<!-- sidebar: style can be found in sidebar.less -->
<section class="sidebar">
<!-- Sidebar user panel -->
<div class="user-panel">
<!-- <div class="pull-left image">
<img src="<%=basePath %>admin/img/user2-160x160.jpg"
class="img-circle" alt="User Image">
</div> -->
<!-- <div class="pull-left info">
<p>xxx</p>
<a href="#"><i class="fa fa-circle text-success"></i> 在线</a>
</div> -->
</div>
<!-- sidebar menu: : style can be found in sidebar.less -->
<ul class="sidebar-menu">
<li id="admin-index"><a href="<%=basePath %>home/index.jsp"><i class="fa fa-dashboard"></i> <span>首页</span></a></li>
<%=request.getSession().getAttribute("menulist")%>
</ul>
</section>
<!-- /.sidebar -->
</aside>
<!-- 导航侧栏 /-->
<!-- 内容区域 -->
<div class="content-wrapper">
<!-- 正文区域 -->
<iframe id="right" name="right" runat="server" src="welcome.jsp" width="100%" height="100%" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="yes" allowtransparency="yes"></iframe>
<!-- 正文区域 /-->
</div>
<!-- @@close -->
<!-- 内容区域 /-->
<!-- 底部导航 -->
<footer class="main-footer">
<!-- 底部导航 /-->
</div>
<script src="<%=basePath %>admin/plugins/jQuery/jquery-2.2.3.min.js"></script>
<script src="<%=basePath %>admin/plugins/jQueryUI/jquery-ui.min.js"></script>
<script>
$.widget.bridge('uibutton', $.ui.button);
</script>
<script src="<%=basePath %>admin/plugins/bootstrap/js/bootstrap.min.js"></script>
<script src="<%=basePath %>admin/plugins/raphael/raphael-min.js"></script>
<script src="<%=basePath %>admin/plugins/morris/morris.min.js"></script>
<script src="<%=basePath %>admin/plugins/sparkline/jquery.sparkline.min.js"></script>
<script src="<%=basePath %>admin/plugins/jvectormap/jquery-jvectormap-1.2.2.min.js"></script>
<script src="<%=basePath %>admin/plugins/jvectormap/jquery-jvectormap-world-mill-en.js"></script>
<script src="<%=basePath %>admin/plugins/knob/jquery.knob.js"></script>
<script src="<%=basePath %>admin/plugins/daterangepicker/moment.min.js"></script>
<script src="<%=basePath %>admin/plugins/daterangepicker/daterangepicker.js"></script>
<script src="<%=basePath %>admin/plugins/daterangepicker/daterangepicker.zh-CN.js"></script>
<script src="<%=basePath %>admin/plugins/datepicker/bootstrap-datepicker.js"></script>
<script
src="<%=basePath %>admin/plugins/datepicker/locales/bootstrap-datepicker.zh-CN.js"></script>
<script
src="<%=basePath %>admin/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js"></script>
<script src="<%=basePath %>admin/plugins/slimScroll/jquery.slimscroll.min.js"></script>
<script src="<%=basePath %>admin/plugins/fastclick/fastclick.js"></script>
<script src="<%=basePath %>admin/plugins/iCheck/icheck.min.js"></script>
<script src="<%=basePath %>admin/plugins/adminLTE/js/app.min.js"></script>
<script src="<%=basePath %>admin/plugins/treeTable/jquery.treetable.js"></script>
<script src="<%=basePath %>admin/plugins/select2/select2.full.min.js"></script>
<script src="<%=basePath %>admin/plugins/colorpicker/bootstrap-colorpicker.min.js"></script>
<script
src="<%=basePath %>admin/plugins/bootstrap-wysihtml5/bootstrap-wysihtml5.zh-CN.js"></script>
<script src="<%=basePath %>admin/plugins/bootstrap-markdown/js/bootstrap-markdown.js"></script>
<script
src="<%=basePath %>admin/plugins/bootstrap-markdown/locale/bootstrap-markdown.zh.js"></script>
<script src="<%=basePath %>admin/plugins/bootstrap-markdown/js/markdown.js"></script>
<script src="<%=basePath %>admin/plugins/bootstrap-markdown/js/to-markdown.js"></script>
<script src="<%=basePath %>admin/plugins/ckeditor/ckeditor.js"></script>
<script src="<%=basePath %>admin/plugins/input-mask/jquery.inputmask.js"></script>
<script
src="<%=basePath %>admin/plugins/input-mask/jquery.inputmask.date.extensions.js"></script>
<script src="<%=basePath %>admin/plugins/input-mask/jquery.inputmask.extensions.js"></script>
<script src="<%=basePath %>admin/plugins/datatables/jquery.dataTables.min.js"></script>
<script src="<%=basePath %>admin/plugins/datatables/dataTables.bootstrap.min.js"></script>
<script src="<%=basePath %>admin/plugins/chartjs/Chart.min.js"></script>
<script src="<%=basePath %>admin/plugins/flot/jquery.flot.min.js"></script>
<script src="<%=basePath %>admin/plugins/flot/jquery.flot.resize.min.js"></script>
<script src="<%=basePath %>admin/plugins/flot/jquery.flot.pie.min.js"></script>
<script src="<%=basePath %>admin/plugins/flot/jquery.flot.categories.min.js"></script>
<script src="<%=basePath %>admin/plugins/ionslider/ion.rangeSlider.min.js"></script>
<script src="<%=basePath %>admin/plugins/bootstrap-slider/bootstrap-slider.js"></script>
<script>
$(document).ready(function() {
// 选择框
$(".select2").select2();
// WYSIHTML5编辑器
$(".textarea").wysihtml5({
locale : 'zh-CN'
});
});
// 设置激活菜单
function setSidebarActive(tagUri) {
var liObj = $("#" + tagUri);
if (liObj.length > 0) {
liObj.parent().parent().addClass("active");
liObj.addClass("active");
}
}
$(document)
.ready(
function() {
// 激活导航位置
setSidebarActive("admin-datalist");
// 列表按钮
$("#dataList td input[type='checkbox']")
.iCheck(
{
checkboxClass : 'icheckbox_square-blue',
increaseArea : '20%'
});
// 全选操作
$("#selall")
.click(
function() {
var clicks = $(this).is(
':checked');
if (!clicks) {
$(
"#dataList td input[type='checkbox']")
.iCheck(
"uncheck");
} else {
$(
"#dataList td input[type='checkbox']")
.iCheck("check");
}
$(this).data("clicks",
!clicks);
});
});
</script>
</body>
</html>