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

📄 list.jsp

📁 中应用程序的访问权限对Java Web Console 中应用程序的访问权限 成功登录 Web 控制台后,可能无法自动访问在该控制台中注册的所有应用程序。通常,必须安装应用程序,才能让所有的用户在控制
💻 JSP
字号:
<%@ page language="java" pageEncoding="utf-8"%>
<jsp:directive.page import="edu.yinhe.mis.dto.DictionaryDTO"/>
<jsp:directive.page import="java.util.HashMap"/>
<jsp:directive.page import="java.net.URLEncoder"/>
<jsp:directive.page import="java.util.ArrayList"/>
<jsp:directive.page import="edu.yinhe.mis.vo.DictionaryVO"/>
<jsp:directive.page import="java.util.Iterator"/>
<%@ 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"%>
<jsp:directive.page import="edu.yinhe.system.vo.PaginationVO"/>
<%
	String path = request.getContextPath();
%>
<HTML><HEAD><TITLE>银河综合信息管理平台</TITLE>
<META content="noindex, nofollow" name=robots>
<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>
<!--
// 这里把JS用到的所有语言都赋值到这里

</SCRIPT>
</HEAD>
<BODY>
<H1>
<SPAN>银河综合信息管理平台 &nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;&nbsp;&nbsp; 数据字典查询:</SPAN></H1>
<DIV class=form-div>

<form action="<%=path%>/admins/core/dictionary.html?method=query" method="post">
<jsp:include page="/admins/core/dictionary.html">
	<jsp:param name="method" value="cascade" />
</jsp:include>
  <table width="100%" height="29" border="0" cellpadding="0" cellspacing="0">
<% 
	DictionaryDTO dictionaryDto = (DictionaryDTO)request.getAttribute("dto");
	ArrayList arrylist = (ArrayList)request.getAttribute("grandpa");
%>
      <tr>
       <td width="5%" height="29"><img height=22 alt=SEARCH src="../images/icon_search.gif" width=26 border=0></td>
       <td align="left" width="8%">名称:</td>
       <td align="left" width="14%"><input type=text size=15 name="name" id="name"
       	<%if(dictionaryDto.getName()!=null && !"".equals(dictionaryDto.getName())){ %>
       		value="<%=dictionaryDto.getName() %>"
        <%} %> 
       id="s1" onblur="beginValidate()" ></td>
       <td align="center" width="9%">值 :</td>
       <td align="center" width="14%"><input type=text size=15 name="value" id="value"
       		<%if(dictionaryDto.getValue()!=null && !"".equals(dictionaryDto.getValue())){ %>
       		value="<%=dictionaryDto.getValue() %>"
       <%} %> 
       id="s2" onblur="beginValidate()" >
        </td>
       <TD>
      <DIV align=right><STRONG>BOSS:</STRONG></DIV></TD>
    <TD colSpan=3><select id="slt1" onchange="getFather()" name="scope" >
    	<option value="" >请选择</option>
    		<%
    					if (arrylist != null) {
    					for (Iterator it = arrylist.iterator(); it.hasNext();) {
    				DictionaryVO vo = (DictionaryVO) it.next();
    		%>
    			<option value="<%=vo.getId()%>" 
    			<%if(dictionaryDto!=null && dictionaryDto.getScope()!=null && !dictionaryDto.getScope().equals("") && dictionaryDto.getScope().equals(vo.getId())){ %>
    				selected="selected"
    			<%} %>
    			
    			><%=vo.getName()%></option>
    		<%
    				}
    				}
    		%>	
    	</select></TD>
    	<TD >
    		<DIV id="fathername"></DIV>
    			</TD>
    			<TD>
    		<DIV id="father"></DIV>
    				
    	</TD>
    <TD colSpan=3></TD>
       <td width="5%"><input name="submit" type=submit class=button value="搜索" ></td>
       <td width="5%"><input name="button" type="button" class="button" value="清除" onclick="clearText()"></td>
    
     </tr>
  </table>
 </form>
</DIV>
<DIV class=list-div id=listDiv>
  <table width="86%" height="52" cellpadding=3 cellspacing=1 id=listTable>

   <tr>
        <th width="30%" align="center"><input type="checkbox" name="checkbox1" onclick="checkbox(this.checked)" >名称</th>
        <th width="25%" align="center">属性值</th>
        <th width="25%" align="center">范围</th>
        <th width="25%" align="center">父ID</th>
        <th width="10%" align="center">删除</th>
        <th width="10%" 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="<%=path %>/admins/core/dictionary.html?method=toEdit&did=<bean:write name='list' property='id'/>&flag=1" ><bean:write name="list" property="name" /></A></td>
        <td align="center" ><bean:write name="list" property="value" /></td>
        <td align="center" ><bean:write name="list" property="scope" /></td>
        <td align="center" ><bean:write name="list" property="pid" /></td>
        <td align=center >
		  <div align="center"> 
		    <a title=删除 onClick="return confirm('您确定要删除选定的内容吗,且连它子类一起删除吗??')" 
      					 href="dictionary.html?method=remove&did=<bean:write name='list' property='id'/>"><html:img alt="删除" page="/admins/images/icon_trash.gif" width="15" border="0"/></a>
      		</div>
       </td>
      	<td> 
      	  <div align="center"> 
            <a title=修改 href="dictionary.html?method=toEdit&did=<bean:write name='list' property='id'/>&flag=0"><html:img alt="修改" page="/admins/images/icon_edit.gif" width="15" border="0"/></a>
      	</div>    
     </td>
     </tr>
     </logic:iterate>
     <tr colspan=4>
     	<TD height='30' colspan='5'>
     		<INPUT class=button  type="button" value=" 批量删除 " onclick="delete_All()">
     	</TD>
     </tr>
     </table>
     <%PaginationVO paginationVO =(PaginationVO) request.getAttribute("paginationVO");
     		HashMap hasmap = new  HashMap();
     		if(dictionaryDto.getName()!=null && !"".equals(dictionaryDto.getName())){
     			hasmap.put("name",URLEncoder.encode(dictionaryDto.getName()));
     		}
     		if(dictionaryDto.getPid()!=null && !"".equals(dictionaryDto.getPid())){
     			hasmap.put("pid",dictionaryDto.getPid());
     		}
     		if(dictionaryDto.getValue()!=null && !"".equals(dictionaryDto.getValue())){
     			hasmap.put("value",dictionaryDto.getValue());
     		}
     		if(dictionaryDto.getScope()!=null && !"".equals(dictionaryDto.getScope())){
     			hasmap.put("scope",dictionaryDto.getScope());
     		}
     		hasmap.put("currentPage",paginationVO.getCurrentPage());
     		hasmap.put("allPage",paginationVO.getAllPages());
     		pageContext.setAttribute("hasmap",hasmap);
     	 %>
    <div align="center">	 
     <tr colspan=4 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/dictionary.html?method=query&type=0" name="hasmap" >首页</html:link>&nbsp;&nbsp;|&nbsp;&nbsp;
			<html:link page="/admins/core/dictionary.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/dictionary.html?method=query&type=2" name="hasmap" >下一页</html:link>
			<html:link page="/admins/core/dictionary.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>
		<%} %>
     </tr>
   </div> 
     </DIV>
<DIV id=footer>版权所有 © 2005-2007 湖北银河信息技术学院,并保留所有权利。</DIV>
<SCRIPT language=JavaScript>
	var xmlhttp;
	function createXMLHttpRequest(){
			if(window.ActiveXObject){
				xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			}
			else if(window.XMLHttpRequest){
				xmlhttp = new XMLHttpRequest();
			}
		}
		function getFather(){
			var selected = document.all.slt1.value;
				createXMLHttpRequest();
				xmlhttp.onreadystatechange = processor1;
				xmlhttp.open("GET","<%=path %>/admins/core/dictionary.html?method=cascade1&selected="+selected,true);
				xmlhttp.send(null);
		}
		function processor1(){
			var result;
			var selected = document.all.slt1.value;
			
			if(xmlhttp.readyState == 4){
				if(xmlhttp.status == 200){			
					result = xmlhttp.responseText;
					while(document.all.fathername.childNodes.length>0){
						document.all.fathername.removeChild(document.all.fathername.childNodes[0]);
					}
					while(document.all.father.childNodes.length>0){
						document.all.father.removeChild(document.all.father.childNodes[0]);
					}
					if(0==selected){
						document.all.hiddenname.innerHTML=result.substring(0,result.indexOf('_'));
						document.all.hidden.innerHTML=result.substring(result.indexOf('_')+1,result.length);
					}else{
					document.all.fathername.innerHTML=result.substring(0,result.indexOf('_'));
					document.all.father.innerHTML=result.substring(result.indexOf('_')+1,result.length);
					}
					
				}
			}
		}
		
		
		
		function checkbox(checked){
			var a =document.getElementsByName("checkbox");
			for(var i=0;i<a.length;i++){
				a[i].checked=checked;
			}
		}
		
		function delete_All(){
			var des = document.getElementsByName("checkbox");
			var did="";
			var flag=false;
			for(var i=0;i<des.length;i++){
				if(des[i].checked==true){
					did = did+"_"+des[i].value;
					flag=true;
				}
			}
			if(flag==false){
				alert("您没请选择对象!!");
			}else{
				document.location.href="<%=path %>/admins/core/dictionary.html?method=remove&did="+did;
			}
			return flag;
		}
		
		function clearText(){
			document.all.fathername.innerHTML="";
			document.all.father.innerHTML="";
			document.all.name.value="";
			document.all.value.value="";
			document.all.slt1.value="";
		}
		
</SCRIPT>
</BODY>
</HTML>

⌨️ 快捷键说明

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