员工管理系统 - 员工列表
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>员工管理系统 - 员工列表</title>
<style>
header {
height: 50px;
width: 100%;
background-color: #2196f3;
color: white;
font-size: 24px;
text-align: center;
line-height: 50px;
position: relative;
}
header span {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
animation: move 10s linear infinite;
animation-delay: 1s;
}
@keyframes move {
0% {
transform: translateX(-100%);
}
100% {
transform: translateX(100%);
}
}
img {
width: 50px;
height: 50px;
}
table {
margin-top: 10px;
border-color: #2196f3;
text-align: center;
}
p {
text-align: center;
}
.btn {
display: inline-block;
padding: 10px 20px;
background-color: #4CAF50;
color: white;
text-decoration: none;
border: none;
border-radius: 5px;
margin: 10px;
position: fixed;
}
input[type="text"] {
padding: 5px;
border-radius: 5px;
border: 1px solid #ccc;
margin-left: 10px;
width: 100px;
}
.container {
display: flex;
justify-content: center;
align-items: center;
margin-top: 200px;
}
#top {
display: inline-block;
padding: 10px 20px;
background-color: #4CAF50;
color: white;
text-decoration: none;
border: none;
border-radius: 5px;
margin: 10px;
}
</style>
<header>
<span>欢迎 ${sessionScope.loginUser} 登陆成功</span>
</header>
<form action="InsertServlet" method="post">
<form id="formall" action="AllDelServlet" method="post">
<p>
<a href="javaScript:void(0)" id="delall" class="btn">全部删除</a>
编号:<input type="text" name="uid"></input>
姓名:<input type="text" name="uname"></input>
地址:<input type="text" name="address"></input>
<input type="submit" value="检索"></input>
</p>
<c:choose>
<c:when test="${not empty emp.list }">
<!-- 遍历 -->
<table border="1px" cellspacing="0" avling="center">
<tr>
<th><input type="checkbox" id="selectall" name="item"></th>
<th>编号</th>
<th>头像</th>
<th>姓名</th>
<th>年龄</th>
<th>性别</th>
<th>出生日期</th>
<th>身份证号</th>
<th>婚否</th>
<th>地址</th>
<th>邮箱</th>
<th>电话</th>
<th>学历</th>
<th>毕业学校</th>
<th>毕业日期</th>
<th>所在部门</th>
<th>操作</th>
</tr>
<c:forEach var="emp" items="${requestScope.emp.list }" varStatus="vs">
<tr>
<td><input type="checkbox" name="item"></td>
<td>${vs.count}</td>
<td>
<img src="${pageContext.request.contextPath}/img/url/${emp.photo}"></img>
</td>
<td>${emp.name}</td>
<td>${emp.age }</td>
<td>${emp.gender }</td>
<td>${DateTool.dateToString(emp.brithday)}</td>
<td>${emp.idCart }</td>
<td>${emp.wedlock }</td>
<td>${emp.address }</td>
<td>${emp.email }</td>
<td>${emp.phone }</td>
<td>${emp.degress }</td>
<td>${emp.school }</td>
<td>${DateTool.dateToString(emp.eDate) }</td>
<td>${emp.deptName.name }</td>
<td>
<a
href="UpdateBeForServlet?id=${emp.id }¤tPage=${requestScope.emp.currentPage}">编辑</a>
<a href="DelServlet?uid=${emp.id }¤tPage=${requestScope.emp.currentPage}"
onclick="return confirm('确定要删除吗?')">删除</a>
</td>
</tr>
</c:forEach>
</table>
</form>
</c:when>
<c:otherwise>
<p>没有数据</p>
</c:otherwise>
</c:choose>
</form>
<div class="container">
<a href="DoallServlet?page=1" class="btn" name="shou">首页</a>
<c:choose>
<c:when test="${ requestScope.emp.currentPage!=1}">
<a href="DoallServlet?page=${requestScope.emp.currentPage-1 }" class="btn" name="top">上一页</a>
</c:when>
<c:otherwise>
<span id="top">上一页</span>
</c:otherwise>
</c:choose>
当前第<span style="color:red">${requestScope.emp.currentPage}</span>页,共<span
style="color:red">${requestScope.emp.totalPage}</span>页
<c:choose>
<c:when test="${ requestScope.emp.currentPage != requestScope.emp.totalPage}">
<a href="DoallServlet?page=${requestScope.emp.currentPage+1 }" class="btn" name="bottom">下一页</a>
</c:when>
<c:otherwise>
<span id="top">下一页</span>
</c:otherwise>
</c:choose>
<a href="DoallServlet?page=${requestScope.emp.totalPage }" class="btn" name="wei">尾页</a>
<form action="DoallServlet" method="post">
<input type="text" name="page" placeholder="查找">
<input type="submit"></input>
</form>
</div>
</body>
</html>
原文地址: https://www.cveoy.top/t/topic/mT5k 著作权归作者所有。请勿转载和采集!