<%@ page contentType="text/html; charset=gb2312" %>
<%@ taglib uri="epmui.tld" prefix="epmui" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ page import="com.infohold.base.bean.ListBEAN"%>
<html>
<%
ListBEAN listBean = null;
if(request.getAttribute("list") != null) {
listBean = (ListBEAN)request.getAttribute("list");
}
int totalSize = 0;
int pageNo = 0;
int pageSize = 0;
if(listBean != null) {
totalSize = listBean.getTotalSize();
pageNo = listBean.getPageNo();
pageSize = listBean.getPageSize();
}
%>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<jsp:include page="../../Share/head.jsp" flush="true"/>
<title>外部单位管理</title>
</head>
<script language="javascript">
<!--
function moveMenu(menuid,menuordernum,movetype,rowid){
var num,prenum,premenuid,nextnum,nextmenuid,maxnum;
document.getElementById("movetype").value = movetype;
num = parseInt(rowid);
if(movetype=="up"){
if(num==1){
alert("当前已经处于第一位!");
}else{
prenum = document.getElementById("menuorder_"+(num-1)).value;
premenuid = document.getElementById("menuid_"+(num-1)).value;
document.getElementById("premenuid").value = premenuid;
document.getElementById("premenuordernum").value = prenum;
document.getElementById("nowmenuid").value = menuid;
document.getElementById("nowmenuordernum").value=menuordernum;
$('mode').value="updateWbdwForOrder";
document.getElementById("wbdwform").submit();
}
}else{
maxnum = parseInt(document.getElementById("totalMenus").value);
if(num>=maxnum){
alert("已经处于最后了!");
}else{
nextnum = document.getElementById("menuorder_"+(num+1)).value;
nextmenuid = document.getElementById("menuid_"+(num+1)).value;
document.getElementById("nextmenuid").value = nextmenuid;
document.getElementById("nextmenuordernum").value = nextnum;
document.getElementById("nowmenuid").value = menuid;
document.getElementById("nowmenuordernum").value = menuordernum;
$('mode').value="updateWbdwForOrder";
document.getElementById("wbdwform").submit();
}
}
}
// --></script>
<script type="text/javascript">
function gotoadd() {
location.href = '/comminfo/wbdw/wbdw_add.jsp';
}
function todel(thisform) {
selectcount = getNamedCheckBoxCheckedCount(wbdwform, wbdwform.id, "id");
if (selectcount == 0) {
alert("请先选择最少一条你要删除的信息。");
} else {
//window.location.href="gzjhzjdetailshow.do?info_type=1&jhzj_bh="+bh;
if (confirm('你确定要删除选定的记录?')) {
thisform.mode.value = "dealAction";
thisform.submit();
}
;
}
}
function toedit(thisform) {
selectcount = getNamedCheckBoxCheckedCount(wbdwform, wbdwform.id, "id");
if (selectcount == 0) {
alert("请先选择一条你要进行修改的条目。");
} else if (selectcount > 1) {
alert("一次只能选择一条信息进行修改。");
} else {
thisform.mode.value = "modifyPage";
thisform.submit();
}
}
</script>
<body >
<html:form action="/wbdwAction.do" method="post">
<input type="hidden" name="mode" >
<table class="wtable" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td valign="top">
<table class="vwTable" width="100%">
<tr class="main_tr1" height="24">
<td align="left" class="main_td">
<b><font class="Top_font2"> 当前位置:外部单位管理</font></b>
</td>
</tr>
</table>
<table class="vwTable" cellspacing="0" cellpadding="0" width="100%">
<tr class="main_tr2" height=26>
<td colspan="2">
<html:button property="button" styleClass="button_s" value="新 增" onclick="gotoadd()"/>
<html:button property="button" styleClass="button_s" value="修 改"
onclick="toedit(this.form)"/>
<html:button property="button" styleClass="button_s" value="删 除"
onclick="todel(this.form)"/>
</td>
</tr>
</table>
<br>
<table class="vwTable" border="1">
<tr class='MToolBar'>
<td width="4%" class="main_td"><div align="center"> </div></td>
<td class="main_td"><div align="center">外部单位名称</div></td>
<td width="32%" class="main_td"><div align="center">操作</div>
<html:hidden name="wbdwform" property="totalMenus"/>
</td>
</tr>
<logic:iterate id="row" name="list" property="list" indexId="rowid">
<tr class="list_tr" >
<td class="main_td" align="center"><html:multibox name="wbdwform" property="id" styleClass="cb">
<bean:write name="row" property="id"/>
</html:multibox></td>
<td align="center" class="main_td" >
<input type="hidden" name="menuorder_<%=rowid+1%>" id="menuorder_<%=rowid+1%>" value="<bean:write name="row" property="xh" />">
<input type="hidden" name="menuid_<%=rowid+1%>" id="menuid_<%=rowid+1%>"
value="<bean:write name="row" property="id" />">
<bean:write name="row" property="mc" />
</td>
<td class="main_td" align="center" >
<input type="button" class="button_s" value="上 移"
onClick="moveMenu('<bean:write name="row" property="id" />','<bean:write name="row" property="xh" />','up','<%=rowid+1%>');" />
<input type="button" class="button_s" value="下 移"
onClick="moveMenu('<bean:write name="row" property="id" />','<bean:write name="row" property="xh" />','down','<%=rowid+1%>');" /> </td>
</tr>
</logic:iterate>
<epmui:epmNavigation form="wbdwform" totalSize="<%=totalSize%>" pageSize="<%=pageSize%>" pageNo="<%=pageNo%>" imagepath="<%=request.getContextPath()%>"></epmui:epmNavigation>
</table>
<iframe name="ChildFrame" width="0" height="0"></iframe>
</td>
</tr>
</table>
<input type="hidden" name="moveflag" id="moveflag" value="1">
<input type="hidden" name="movetype" id="movetype">
<input type="hidden" name="premenuid" id="premenuid">
<input type="hidden" name="premenuordernum" id="premenuordernum">
<input type="hidden" name="nowmenuid" id="nowmenuid">
<input type="hidden" name="nowmenuordernum" id="nowmenuordernum">
<input type="hidden" name="nextmenuid" id="nextmenuid">
<input type="hidden" name="nextmenuordernum" id="nextmenuordernum">
</html:form>
</body>
</html>
action:部分
public ActionForward updateWbdwForOrder(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
WbdwForms wbdwform = (WbdwForms)form;
String moveflag = wbdwform.getMoveflag();
String movetype = wbdwform.getMovetype();
String changeid ="";
String changexh ="";
String nowid ="";
String nowxh="";
if("1".equals(moveflag)){
if("up".equals(movetype)){
nowid = wbdwform.getNowmenuid();
nowxh =wbdwform.getNowmenuordernum();
changeid= wbdwform.getPremenuid();
changexh = wbdwform.getPremenuordernum();
}else{
nowid = wbdwform.getNowmenuid();
nowxh =wbdwform.getNowmenuordernum();
changeid= wbdwform.getNextmenuid();
changexh = wbdwform.getNextmenuordernum();
}
}
service.updateWbdwForOrder(nowid, nowxh, changeid, changexh);
return mapping.findForward("towbdw");// Constant.Error-出错页面,Constant.info-程序
}
分享到:
相关推荐
针对此问题,该文结合One-Test-at-a-Time(OTT)策略提出了一种在线调整的组合测试用例优先级排序方法,引入多重待覆盖率、测试用例失效率和测试用例重要程度3个影响因子用于衡量组合测试用例优先级。根据测试用例的...
堆排序是一种基于比较的排序算法,通过构建大顶堆或小顶堆来实现元素的排序。其实现原理主要包括两个步骤:首先,将待排序的序列构建成一个大顶堆(或小顶堆),此时堆顶元素即为序列的最大值(或最小值);然后,将...
5. 若将{3,2,5,4,1}排为升序,则实施快速排序一趟后的结果是( )(其中,枢轴记录取首记录)。 A. {1,2,3,4,5} B. {1,2,4,5,3} C. {1,3,5,4,2} D. {2,5,4,1,3} . 若将{1,2,3,4,5,6,7,9,8}排为升序,则( ...
排序是计算机程序设计中的一种重要运算,它的功能是将一个数据元素的无序序列调整为一个有序序列。经排序的数据若按从大到小的顺序排列,则称为下降序。反之,若经排序的数据若按从小到大的顺序排列,则称为上升序。...
排序是计算机内经常进行的一种操作,其目的是将一组“无序”的记录序列调整为“有序”的记录序列。分内部排序和外部排序,若整个排序过程不需要访问外存便能完成,则称此类排序问题为内部排序。反之,若参加排序的...
1、冒泡排序属于稳定排序,是一种借助“交换”进行排序的方法。首先要将第一个记录的关键字和第二个记录的关键字进行比较,若为逆序,则将两个记录交换之,然后比较第二个记录与第三个记录的关键字,以此类推,直至...
对基本邻近排序算法(basic sorted-neighborhood method, SNM)进行分析, 指出其不足, 提出了SNM算法的一种改进方法。采用变步长伸缩窗口, 动态改变检测窗口大小, 避免漏配问题, 并减少不必要的比较。采用动态调整等级...
然后根据该模型的约束特点,提出一种基于排序映射的编码调整方式,并引入一种非线性扩张收缩因子自适应调整方法;最后在算法中嵌入一种判断和避免搜索早熟和停滞的有效方法。通过仿真对比验证,该算法具有较高的收敛...
堆排序(Heapsort)是指利用堆这种数据结构所设计的一种排序算法。堆积是一个近似完全二叉树的结构,并同时满足堆积的性质:即子结点的键值或索引总是小于(或者大于)它的父节点。 堆排序的平均时间复杂度为Ο...
为了提高图像检索的质量, 提出了一种基于半监督学习的图像检索方法。该方法提取图像的颜色、形状、纹理特征, 计算得到已知类别样本的中心图像, 检索过程中利用中心图像自适应调整相关度计算函数, 然后根据与查询图像...
在三种方法中效率最低。最坏情况下算法退化为(O(n*n)) 复制代码 代码如下:function quick_sort($array) { if(count($array) <= 1) return $array; $key = $array[0]; $rightArray = array(); $leftArray = ...
同时为了便于用户观看清楚每一步排序操作中数据的变化情况,用户可以调整观看每一次数据的变化情况,软件会对发生变化的数据进行标红处理。 软件目前支持的排序方式主要为题目所要求的直接插入排序、折半插入排序、...
排序是计算机内经常进行的一种操作,其目的是将一组“无序”的记录序列调整为“有序”的记录序列。
算法时间复杂度O(n2)--[n的平方] 4、折半插入排序 折半插入排序是对插入排序的改进,主要通过二分查找,获得插入的位置 折半插入是一种稳定的排序 排序时间复杂度O(n^2)附加空间O(1) 5、快速排序 快速排序是不稳定的...
// 对L.r[low]——L.r[high] 子序列进行一趟快速排序,返回分界线位置,即枢轴 L.r[0]=L.r[low]; int pivotkey=L.r[0].key; while (low) { while (low[high].key>=pivotkey) { high--; } L.r[low]=...
针对回归测试过程的特点,提出一种对测试用例集优化的新方法,即通过对测试用例集进行必要的消除冗余和调整排序,完成了对初始测试用例集的精简以及执行顺序的确定过程,使得有限的测试资源得到科学合理的分配。...
CN106997577A-一种订单策略动态调整方法及装置-公开.PDF CN106997620A-基于GPS数据点的计费方法和装置-公开.PDF CN106998319A-一种共享位置的方法、服务器以及客户端-公开.PDF CN106998530A-一种UE行程信息监控方法...
新方法主要对特征值和排序结果进行缓存以及对样本权重的更新规则进行适当调整。实验结果表明,使用该方法训练级联车牌检测器能较好地解决传统AdaBoost算法中所出现的权重扭曲及训练时间长的问题,在提高检测率的同时...
思路:对数组进行多轮冒泡,每一轮对数组中的元素两两比较,调整位置,冒出一个最大的数来。 //简单版: function bubbleSort($arr) { $n = count($arr); for($i=1;$i<$n;$i++) { //冒泡的轮数(最多$n-1轮) ...