flow_list_monitored.jsp
上传用户:jhtang88
上传日期:2014-01-27
资源大小:28528k
文件大小:5k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html; charset=utf-8"%>
  2. <%@ page import="java.util.*"%>
  3. <%@ page import="cn.js.fan.util.*"%>
  4. <%@ page import="cn.js.fan.db.*"%>
  5. <%@ page import="com.redmoon.oa.flow.*"%>
  6. <%@ page import="com.redmoon.oa.dept.*"%>
  7. <html>
  8. <head>
  9. <title>我监控的流程列表</title>
  10. <link href="admin/default.css" rel="stylesheet" type="text/css">
  11. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  12. <style type="text/css">
  13. <!--
  14. .style4 {
  15. color: #FFFFFF;
  16. font-weight: bold;
  17. }
  18. -->
  19. </style>
  20. </head>
  21. <body bgcolor="#FFFFFF" text="#000000">
  22. <jsp:useBean id="docmanager" scope="page" class="cn.js.fan.module.cms.DocumentMgr"/>
  23. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  24. <%
  25. String priv="read";
  26. if (!privilege.isUserPrivValid(request,priv))
  27. {
  28. out.println(cn.js.fan.web.SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "pvg_invalid")));
  29. return;
  30. }
  31. String op = StrUtil.getNullString(request.getParameter("op"));
  32. %>
  33. <table cellSpacing="0" cellPadding="0" width="100%">
  34.   <tbody>
  35.     <tr>
  36.       <td height="28" class="head">我监控的工作流&nbsp;</td>
  37.     </tr>
  38.   </tbody>
  39. </table>
  40. <%
  41. String strcurpage = StrUtil.getNullString(request.getParameter("CPages"));
  42. if (strcurpage.equals(""))
  43. strcurpage = "1";
  44. if (!StrUtil.isNumeric(strcurpage)) {
  45. out.print(StrUtil.makeErrMsg("标识非法!"));
  46. return;
  47. }
  48. int pagesize = 20;
  49. int curpage = Integer.parseInt(strcurpage);
  50. WorkflowDb wf = new WorkflowDb();
  51. PostDb pd = new PostDb();
  52. pd = pd.getPostDbByUserName(privilege.getUser(request));
  53. ListResult lr = wf.listMonitored(privilege.getUser(request), curpage, pagesize);
  54. int total = lr.getTotal();
  55. Paginator paginator = new Paginator(request, total, pagesize);
  56. // 设置当前页数和总页数
  57. int totalpages = paginator.getTotalPages();
  58. if (totalpages==0)
  59. {
  60. curpage = 1;
  61. totalpages = 1;
  62. }
  63. Vector v = lr.getResult();
  64. Iterator ir = null;
  65. if (v!=null)
  66. ir = v.iterator();
  67. %>
  68. <br>
  69. <table width="92%" border="0" align="center" class="p9">
  70.   <tr>
  71.     <td height="24" align="right">找到符合条件的记录 <b><%=paginator.getTotal() %></b> 条 每页显示 <b><%=paginator.getPageSize() %></b> 条 页次 <b><%=paginator.getCurrentPage() %>/<%=paginator.getTotalPages() %></b></td>
  72.   </tr>
  73. </table>
  74. <table style="BORDER-RIGHT: #a6a398 1px solid; BORDER-TOP: #a6a398 1px solid; BORDER-LEFT: #a6a398 1px solid; BORDER-BOTTOM: #a6a398 1px solid" cellSpacing="0" cellPadding="3" width="95%" align="center">
  75.   <tbody>
  76.     <tr>
  77.       <td class="thead" style="PADDING-LEFT: 10px" noWrap width="6%">首页</td>
  78.       <td class="thead" style="PADDING-LEFT: 10px" noWrap width="29%">标题</td>
  79.       <td class="thead" noWrap width="15%"><img src="admin/images/tl.gif" align="absMiddle" width="10" height="15">类型</td>
  80.       <td class="thead" noWrap width="17%"><img src="admin/images/tl.gif" align="absMiddle" width="10" height="15">开始时间</td>
  81.       <td class="thead" noWrap width="12%"><img src="admin/images/tl.gif" align="absMiddle" width="10" height="15">创建者</td>
  82.       <td class="thead" noWrap width="9%"><img src="admin/images/tl.gif" align="absMiddle" width="10" height="15">状态</td>
  83.       <td class="thead" noWrap width="12%"><img src="admin/images/tl.gif" align="absMiddle" width="10" height="15">管理</td>
  84.     </tr>
  85.     <%
  86. Leaf ft = new Leaf();
  87. while (ir.hasNext()) {
  88.   WorkflowDb wfd = (WorkflowDb)ir.next(); 
  89. %>
  90.     <tr class="row" style="BACKGROUND-COLOR: #ffffff">
  91.       <td style="PADDING-LEFT: 10px">
  92.       <img src="admin/images/arrow.gif" align="absmiddle"><%=wfd.getId()%></td>
  93.       <td style="PADDING-LEFT: 10px">&nbsp;&nbsp;<%=StrUtil.getLeft(wfd.getTitle(), 30)%></td>
  94.       <td>
  95.   <%
  96.   Leaf lf = ft.getLeaf(wfd.getTypeCode());
  97.   if (lf!=null)
  98.    out.print(lf.getName());
  99.   %>   </td>
  100.       <td><%=DateUtil.format(wfd.getBeginDate(), "yy-MM-dd HH:mm:ss")%> </td>
  101.       <td><%=wfd.getUserName()%></td>
  102.       <td><%=wfd.getStatusDesc()%>   </td>
  103.       <td><a href="flow_modify.jsp?flowId=<%=wfd.getId()%>">查看/修改</a></td>
  104.     </tr>
  105. <%}%>
  106.   </tbody>
  107. </table>
  108. <table width="96%"  border="0" align="center" cellpadding="0" cellspacing="0">
  109.   <tr>
  110.     <td align="right">&nbsp;</td>
  111.   </tr>
  112.   <tr>
  113.     <td align="right"><%
  114. String querystr = "op="+op;
  115.     out.print(paginator.getCurPageBlock("?"+querystr));
  116. %></td>
  117.   </tr>
  118. </table>
  119. <HR noShade SIZE=1>
  120. </body>
  121. <script language="javascript">
  122. <!--
  123. function form1_onsubmit()
  124. {
  125. errmsg = "";
  126. if (form1.pwd.value!=form1.pwd_confirm.value)
  127. errmsg += "密码与确认密码不致,请检查!n"
  128. if (errmsg!="")
  129. {
  130. alert(errmsg);
  131. return false;
  132. }
  133. }
  134. //-->
  135. </script>
  136. </html>