⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 list.jsp

📁 中应用程序的访问权限对Java Web Console 中应用程序的访问权限 成功登录 Web 控制台后,可能无法自动访问在该控制台中注册的所有应用程序。通常,必须安装应用程序,才能让所有的用户在控制
💻 JSP
字号:
<%@ page language="java" pageEncoding="utf-8"%>
<jsp:directive.page import="edu.yinhe.system.vo.PaginationVO" />
<jsp:directive.page import="edu.yinhe.mis.vo.DepartmentVO" />
<jsp:directive.page import="edu.yinhe.mis.vo.DictionaryVO" />
<jsp:directive.page import="edu.yinhe.mis.dto.DepartmentDTO" />
<jsp:directive.page import="java.util.ArrayList" />
<jsp:directive.page import="java.util.HashMap" />
<jsp:directive.page import="java.net.URLEncoder" />
<%
String path = request.getContextPath();
%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean"
	prefix="bean"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html"
	prefix="html"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic"
	prefix="logic"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<HTML xmlns="http://www.w3.org/1999/xhtml">
	<HEAD>
		<TITLE>部门列表</TITLE>
		<META content="noindex, nofollow" name=robots>
		<META http-equiv=Content-Type content="text/html; charset=utf-8">
		<META http-equiv=Content-Type content="text/html; charset=UTF-8">
		<LINK href="../css/CSS.css" type=text/css rel=stylesheet>
		<LINK href="<%=path%>/admins/css/general.css" type=text/css
			rel=stylesheet>
		<LINK href="<%=path%>/admins/css/main.css" type=text/css
			rel=stylesheet>
		<SCRIPT src="<%=path%>/admins/js/transport.js" type=text/javascript></SCRIPT>
		<SCRIPT src="<%=path%>/admins/js/common.js" type=text/javascript></SCRIPT>
		<SCRIPT src="<%=path%>/admins/js/utils.js" type=text/javascript></SCRIPT>
		<SCRIPT src="<%=path%>/admins/js/listtable.js" type=text/javascript></SCRIPT>
		<SCRIPT src="<%=path%>/admins/js/login.js" type=text/javascript></SCRIPT>
		<SCRIPT src="transport.js" type=text/javascript></SCRIPT>

		<SCRIPT src="common.js" type=text/javascript></SCRIPT>

		<SCRIPT language=JavaScript>
		
		function toclear(){
		document.all.departmentName.value="";
		document.all.principal.value="";
		document.all.superdepartmentName.value="";
		document.all.address.value="";
		return;
		}
		
		function checkbox(checked){
			var a=document.getElementsByName("checkbox");
			for(var i=0;i<a.length;i++){
				a[i].checked=checked;
			}
		}
			
			
			function deleteAll(){
			var dep=document.getElementsByName("checkbox");
			var did="";
			var flag=false;
			for(var i=0; i<dep.length; i++){
				if(dep[i].checked==true){
					did=did+" "+dep[i].value;
					flag=true;
				}
			}
			if(flag==false){
				alert("您没有选择删除对象!!");
			}
			else{
				
				document.location.href="<%=path%>/admins/core/department.html?method=remove&did="+did;
			}
			return flag;
		}


</SCRIPT>

		<META content="MSHTML 6.00.2900.3243" name=GENERATOR>
		<style type="text/css">
</style>
	</HEAD>
	<BODY>
		<H1>
			<SPAN>学校综合管理系统管理中心 &nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;&nbsp;&nbsp;
				部门查询:</SPAN>
		</H1>
		<jsp:include page="/admins/core/department.html">
			<jsp:param name="method" value="loadName" />
		</jsp:include>
		<jsp:include page="/admins/core/department.html">
			<jsp:param name="method" value="loadAddress" />
		</jsp:include>
		<DIV class=form-div>
			<form action="<%=path%>/admins/core/department.html?method=query"
				method="post" name="departmentForm">
				<table width="100%" height="29" border="0" cellpadding="0"
					cellspacing="0">
					<%
								DepartmentDTO deptdto = (DepartmentDTO) request
								.getAttribute("deptdto");
					%>
					<tr>
						<td width="5%" height="29">
							<img height=22 alt=SEARCH src="../images/icon_search.gif"
								width=26 border=0>
						</td>
						<td align="center" width="10%">
							部门名称 :
						</td>
						<td align="center" width="10%">
							<input size=12 name="departmentName"
								<%if(deptdto.getDepartmentName()!=null){%>
								value="<%=deptdto.getDepartmentName()%>" <%}else{ %> value=""
								<%}%> maxlength="15">
						</td>
						<td align="center" width="9%">
							负责人 :
						</td>
						<td align="center" width="10%">
							<input size=10 name="principal"
								<%if(deptdto.getPrincipal()!=null){%>
								value="<%=deptdto.getPrincipal()%>" <%}else{ %> value="" <%}%>
								maxlength="15">
						</td>
						<td align="center" width="10%">
							上级部门:
						</td>
						<td width="10%">
							<select name="superdepartmentName">
								<option value="">
									请选择...
								</option>
								<%
									ArrayList listname = (ArrayList) request.getAttribute("listname");
									DictionaryVO dicvo = null;
									for (int i = 0; i < listname.size(); i++) {
										dicvo = (DictionaryVO) listname.get(i);
								%>
								<option value="<%=dicvo.getName()%>"
									<%if(deptdto.getSuperdepartmentName()!=null && deptdto.getSuperdepartmentName().equals(dicvo.getName())){%>
									selected="selected" <%}%>>
									<%=dicvo.getName()%>
								</option>
								<%
								}
								%>
							</select>
						</td>
						<td align="center" width="7%">
							地址:
						</td>
						<td width="10%">
							<select name="address">
								<option value="">
									请选择...
								</option>
								<%
											ArrayList listaddress = (ArrayList) request
											.getAttribute("listaddress");
									for (int i = 0; i < listaddress.size(); i++) {
										dicvo = (DictionaryVO) listaddress.get(i);
								%>
								<option value="<%=dicvo.getName()%>"
									<%if(deptdto.getAddress()!=null && deptdto.getAddress().equals(dicvo.getName())){%>
									selected="selected" <%}%>>
									<%=dicvo.getName()%>
								</option>
								<%
								}
								%>
							</select>
						</td>
						<td width="12%">
							<input name="submit" type=submit class=button value=" 搜索 ">
						</td>
						<td width="12%">
							<input type=button class=button onclick="toclear()" value=" 重置 ">
						</td>
					</tr>
				</table>
			</form>
		</DIV>


		<DIV class=list-div id=listDiv>

			<table width="90%" height="52" cellpadding=3 cellspacing=1
				id=listTable>
				<tbody>
					<tr>
						<th width="15%" align="center">
							<input type="checkbox" name="checkbox1"
								onclick="checkbox(this.checked)">
							部门名称
						</th>
						<th width="15%" align="center">
							部门编号
						</th>
						<th width="15%" align="center">
							上级部门
						</th>
						<th width="15%" align="center">
							负责人
						</th>
						<th width="15%" align="center">
							地址
						</th>
						<th width="15%" align="center">
							删除
						</th>
						<th width="15%" align="center">
							修改
						</th>
					</tr>
					<logic:iterate id="list" name="list">

						<tr>
							<td class=first-cell align=left>
								<input type="checkbox" name="checkbox"
									value="<bean:write name='list' property='id' />">
									<a href="department.html?method=loadDept&did=<bean:write name='list' property='id'/>"><bean:write name="list" property="departmentName" /></a>
								
							</td>
							<td align="center">
								<bean:write name="list" property="departmentNo" />
							</td>
							<td align="center">
								<bean:write name="list" property="superdepartmentName" />
							</td>
							<td align="center">
								<bean:write name="list" property="principal" />
							</td>
							<td align="center">
								<bean:write name="list" property="address" />
							</td>
							<td align="center">
								
									<input type="hidden" name="batchid" value="" />
									<a title=删除 onClick="return confirm('您确定要删除选定的内容吗?')"
										href="department.html?method=remove&did=<bean:write name='list' property='id'/>"><html:img
											alt="删除" page="/admins/images/icon_trash.gif" width="15"
											border="0" /> </a>
									
								
							</td>
							<td align="center">
								
								<a title=修改
									href="department.html?method=load&did=<bean:write name='list' property='id'/>"><html:img
									alt="修改" page="/admins/images/icon_edit.gif" width="15"
									border="0" /> </a>
							
							</td>
						</tr>
					</logic:iterate>
					<tr colspan=4>
						<TD height='30' colspan='7'>
							<INPUT class=button type="button" value=" 批量删除 "
								onclick="deleteAll()">
						</TD>
					</tr>
			</table>
			<br>

			<%
						PaginationVO paginationVO = (PaginationVO) request
						.getAttribute("paginationVO");
				HashMap hasmap = new HashMap();
				if (deptdto.getDepartmentName() != null
						&& !"".equals(deptdto.getDepartmentName())) {
					hasmap.put("departmentName", URLEncoder.encode(deptdto
					.getDepartmentName()));
				}
				if (deptdto.getDepartmentNo() != null
						&& !"".equals(deptdto.getDepartmentNo())) {
					hasmap.put("departmentNo", URLEncoder.encode(deptdto
					.getDepartmentNo()));
				}
				if (deptdto.getSuperdepartmentName() != null
						&& !"".equals(deptdto.getSuperdepartmentName())) {
					hasmap.put("superdepartmentName", URLEncoder.encode(deptdto
					.getSuperdepartmentName()));
				}
				if (deptdto.getPrincipal() != null
						&& !"".equals(deptdto.getPrincipal())) {
					hasmap.put("principal", URLEncoder.encode(deptdto
					.getPrincipal()));
				}
				if (deptdto.getAddress() != null
						&& !"".equals(deptdto.getAddress())) {
					hasmap.put("address", URLEncoder.encode(deptdto.getAddress()));
				}
				hasmap.put("currentPage", paginationVO.getCurrentPage());
				hasmap.put("allPage", paginationVO.getAllPages());
				pageContext.setAttribute("hasmap", hasmap);
			%>
			<tr colspan=4 align="center">
				<TD height='30' colspan='5'>
					<div align='CENTER'>

						共<%=paginationVO.getAllPages()%>页 &nbsp;&nbsp;|&nbsp;&nbsp; 共<%=paginationVO.getResultsNumber()%>记录&nbsp;&nbsp;|&nbsp;&nbsp;
						当前第<%=paginationVO.getCurrentPage()%>页&nbsp;&nbsp;|&nbsp;&nbsp;
						<%
						if (paginationVO.getCurrentPage() > 1) {
						%>
						<html:link page="/admins/core/department.html?method=query&type=0"
							name="hasmap">首页</html:link>
						&nbsp;&nbsp;|&nbsp;&nbsp;
						<html:link page="/admins/core/department.html?method=query&type=1"
							name="hasmap">上一页</html:link>
						&nbsp;&nbsp;|&nbsp;&nbsp;
						<%
						} else {
						%>
						<font color='#999999'>&lt;首页&gt;</font> |
						<font color='#999999'>&lt;上一页&gt;</font>&nbsp;|&nbsp;
						<%
							}
							if (paginationVO.getCurrentPage() < paginationVO.getAllPages()) {
						%>
						<html:link page="/admins/core/department.html?method=query&type=2"
							name="hasmap">下一页</html:link>
						<html:link page="/admins/core/department.html?method=query&type=3"
							name="hasmap">尾页</html:link>
						&nbsp;&nbsp;|&nbsp;&nbsp;
						<%
						} else {
						%>
						<font color='#999999'>&lt;下一页&gt;</font> |
						<font color='#999999'>&lt;尾页&gt;</font>
						<%
						}
							%>

					</div>
				</TD>
			</tr>

		</DIV>

		<DIV id=footer>
			版权所有 © 2005-2007 湖北银河信息技术学院,并保留所有权利。
		</DIV>

	</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -