taskTranTaskUserMap.jsp 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <%
  2. //对应TaskController里的tranTaskUserMap方法,返回某个任务节点的所有跳转分支的任务节点及其执行人员列表
  3. %>
  4. <%@page pageEncoding="UTF-8" %>
  5. <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
  6. <table class="table-grid" style="width:1000px;margin:0px auto;border:1px solid #b9dae9">
  7. <thead>
  8. <tr>
  9. <th height="28" style="display:none;">执行路径</th>
  10. <c:if test="${canChoicePath}">
  11. <th height="28">选择同步条件后的执行路径</th>
  12. </c:if>
  13. <th>目标任务</th>
  14. </tr>
  15. </thead>
  16. <c:forEach items="${nodeTranUserList}" var="nodeTranUser" varStatus="i">
  17. <tr>
  18. <td height="28" width="18%" nowrap="nowrap" style="background:#f7fbff;display:none;">
  19. <c:if test="${selectPath==1 }">
  20. <input type="radio" name="destTask" style="width:15px;height:15px;margin:auto auto;display:block;" include="1" value="${nodeTranUser.nodeId}" <c:if test="${i.count==1}">checked="checked"</c:if> />
  21. </c:if>
  22. ${nodeTranUser.nodeName}<!-- 跳转的目标节点 -->
  23. </td>
  24. <c:if test="${canChoicePath}">
  25. <td style="background:#f7fbff; ">
  26. <c:forEach items="${nodeTranUser.nextPathMap}" var="nextPath">
  27. <div>
  28. <label><input type="checkbox" include="1" name="nextPathId" value="${nextPath.key}"/>
  29. ${nextPath.value}</label>
  30. </div>
  31. </c:forEach>
  32. </td>
  33. </c:if>
  34. <td style="background:#f7fbff;">
  35. <c:forEach items="${nodeTranUser.nodeUserMapSet}" var="nodeUserMap">
  36. <div style="width:32%;float:left; border-right:1px solid #b9dae9;text-align:center; padding-left:10px;">
  37. ${nodeUserMap.nodeName}
  38. <input type="hidden" include='1' name="lastDestTaskId" value="${nodeUserMap.nodeId}"/>
  39. <span name="spanSelectUser">
  40. <c:forEach items="${nodeUserMap.taskExecutors}" var="executor">
  41. <input type="checkbox" include='1' name="${nodeUserMap.nodeId}_userId" checked="checked" value="${executor.type}^${executor.executeId}^${executor.executor}"/>&nbsp;${executor.executor}
  42. </c:forEach>
  43. </span>
  44. &nbsp;&nbsp;<a href="javascript:;" class="link grant" onclick="selExeUsers(this,'${nodeUserMap.nodeId}','${scope}')">选择...</a>
  45. </div>
  46. </c:forEach>
  47. </td>
  48. </tr>
  49. </c:forEach>
  50. </table>
  51. <script type="text/javascript">
  52. //初始化
  53. $(function() {
  54. //删除没选中的include,不提交
  55. $("[name=destTask]").not(":checked").each(function(){
  56. var me=$(this);
  57. me.closest("tr").find("input").each(function(){
  58. $(this).removeAttr("include");
  59. });
  60. });
  61. //建立click方法
  62. $("[name=destTask]").click(function(){
  63. $("[name=destTask]").each(function(){
  64. var me=$(this);
  65. if(me.attr("checked")=="checked"){
  66. me.closest("tr").find("input").each(function(){
  67. $(this).attr("include","1");
  68. });
  69. }else{
  70. me.closest("tr").find("input").each(function(){
  71. $(this).removeAttr("include");
  72. });
  73. }
  74. });
  75. });
  76. });
  77. </script>