viewdata.jsp 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. <%@ page contentType="text/html;charset=GBK"%>
  2. <%@ page import="com.yw.core.framework.model.FormItemBean"%>
  3. <%@ page import="com.yw.core.framework.view.ViewExpandAction"%>
  4. <%@ page import="com.yw.core.framework.view.TypeBean"%>
  5. <%@ page import="com.yw.core.framework.util.*"%>
  6. <%@ page import="java.util.*"%>
  7. <%
  8. HashMap hashMap =(HashMap)request.getAttribute("hashMap");
  9. List titleList=(List)hashMap.get("titleList");
  10. String viewAdd =(String)hashMap.get("viewAdd");
  11. if (viewAdd==null) viewAdd="0";
  12. String viewDel =(String)hashMap.get("viewDel");
  13. if (viewDel==null) viewDel="0";
  14. String viewEdit =(String)hashMap.get("viewEdit");
  15. if (viewEdit==null) viewEdit="0";
  16. String viewSee =(String)hashMap.get("viewSee");
  17. if (viewSee==null) viewSee="0";
  18. //String catKeys =(String)hashMap.get("catKeys");
  19. String catKey=(String)hashMap.get("catKey");
  20. String catCode=(String)hashMap.get("catCode");
  21. Vector keys=(Vector)hashMap.get("keys");
  22. String findKey=(String)hashMap.get("findKey");
  23. if (findKey==null) findKey="";
  24. String engineName=(String)hashMap.get("engineName");
  25. String viewMenuAppPath=(String)hashMap.get("viewMenuAppPath");
  26. String formName=(String)hashMap.get("formName");
  27. String agentName=(String)hashMap.get("agentName");
  28. String addAppName=(String)hashMap.get("addAppName");
  29. String delAppName=(String)hashMap.get("delAppName");
  30. String editAppName=(String)hashMap.get("editAppName");
  31. String seeAppName=(String)hashMap.get("seeAppName");
  32. String appName=(String)hashMap.get("appName");
  33. String sFormName=(String)hashMap.get("sFormName");
  34. String colCounts=(String)hashMap.get("colCounts");
  35. String rows=(String)hashMap.get("rows");
  36. String rowCounts=(String)hashMap.get("rowCounts");
  37. String iStart=(String)hashMap.get("iStart");
  38. String pages=(String)hashMap.get("pages");
  39. String jumps=(String)hashMap.get("jumps");
  40. String recNums=(String)hashMap.get("recNums");
  41. String iNowPage=(String)hashMap.get("iNowPage");
  42. String iCount=(String)hashMap.get("iCount");
  43. Vector indexList=(Vector)hashMap.get("indexList");
  44. String[][] viewDatas=(String[][])hashMap.get("viewDatas");
  45. String[] ids=(String[])hashMap.get("ids");
  46. String context =request.getParameter("context");
  47. %>
  48. <form name="ViewForm" id="ViewForm" method="post">
  49. <input name="engineName" type="hidden" value=<%=engineName%>></input>
  50. <input name="tmpDocIDs" type="hidden"></input>
  51. <input name="appName" type="hidden" value=<%=appName%>></input>
  52. <input name="delAppName" type="hidden" value=<%=delAppName%>></input>
  53. <input name="addAppName" type="hidden" value=<%=addAppName%>></input>
  54. <input name="editAppName" type="hidden" value=<%=editAppName%>></input>
  55. <input name="seeAppName" type="hidden" value=<%=seeAppName%>></input>
  56. <input name="tableName" type="hidden" value=<%=formName%>></input>
  57. <input name="recNums" type="hidden" value=<%=recNums%>></input>
  58. <input name="iCount" type="hidden" value=<%=iCount%>></input>
  59. <input name="pages" type="hidden" value=<%=pages%>></input>
  60. <input name="rows" type="hidden" value=<%=rows%>></input>
  61. <input name="catKeyName" type="hidden" value=<%=catKey%>></input>
  62. <input name="findKey" type="hidden" value=<%=findKey%>></input>
  63. <input name="iStart" type="hidden" value=<%=iStart%>></input>
  64. <input name="iNowPage" type="hidden" value=<%=iNowPage%>></input>
  65. <input name="context" type="hidden" value=<%=context%>></input>
  66. <div class="forum-container">
  67. <TABLE id="list-table">
  68. <tbody>
  69. <TR>
  70. <Th width="20px">
  71. <input type=checkbox class="checkbox" name="CheckedAll" id="CheckedAll">
  72. </Th>
  73. <%
  74. if (viewEdit.equals("1")) {
  75. %>
  76. <%
  77. }
  78. %>
  79. <%
  80. int idPos = 0;
  81. for (int i = 0; i < titleList.size(); i++) {
  82. FormItemBean formItemBean = (FormItemBean) titleList.get(i);
  83. String inList = formItemBean.getInList();
  84. if (inList == null)
  85. inList = "";
  86. if (!inList.equals("1")) {
  87. String tmp = formItemBean.getTitle().trim();
  88. %>
  89. <Th><%=tmp%></Th>
  90. <%
  91. }
  92. }
  93. %>
  94. <Th width="80px">
  95. 操作
  96. </Th>
  97. </TR>
  98. </tbody>
  99. <tbody id="tab">
  100. <%
  101. for (int i = 0; i < viewDatas.length; i++) {
  102. String id = ids[i];
  103. %>
  104. <tr name=tr<%=i + 1%> id=tr<%=i + 1%>>
  105. <!--
  106. <td width="30px"><%=(new Integer(rows).intValue())
  107. * (new Integer(iNowPage).intValue() - 1) + i + 1%>
  108. </td>
  109. -->
  110. <td width="20px">
  111. <input class="checkbox" type=checkbox name="items" id="checkBox<%=id%>" value=<%=id%>>
  112. </td>
  113. <!-- 数据 -->
  114. <%
  115. for (Integer j = 0; j < new Integer(colCounts).intValue(); j++) {
  116. //System.out.println("i:"+i+"j"+j+"___"+viewDatas[i][j]);
  117. String s = viewDatas[i][j];
  118. if (!indexList.contains(j.toString())) {
  119. if (s == null || s.equals("?") || s.equals("")
  120. || s.equals("null")) {
  121. s = " ";
  122. }
  123. %>
  124. <td title='<%=StringUtils.escapeHTMLTags(s)%>'><%=s%></td>
  125. <%
  126. }
  127. }
  128. %>
  129. <td width="50px">
  130. <ul id="jsddm" class="typemenu">
  131. <li><a href="#">菜单▼</a>
  132. <ul>
  133. <% if (viewAdd.equals("1")) { %>
  134. <a href="#" name="Add" id="Add" onclick="add();"/>&nbsp;增加</a>
  135. <% } %>
  136. <a href="#" onclick="edit('<%=id%>')">&nbsp;修改</a>
  137. <a href="#" onclick="dlgDel('<%=id%>','<%=i + 1%>')">&nbsp;删除</a>
  138. <a href="#" onclick="see('<%=id%>','<%=i + 1%>')">&nbsp;查看</a>
  139. </ul>
  140. </li>
  141. </ul>
  142. </td>
  143. </tr>
  144. <%
  145. }
  146. %>
  147. </tbody>
  148. </table>
  149. </div>
  150. </form>
  151. <!-- end data -->