1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- <%
- //对应TaskController里的tranTaskUserMap方法,返回某个任务节点的所有跳转分支的任务节点及其执行人员列表
- %>
- <%@page pageEncoding="UTF-8" %>
- <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
- <table class="table-grid" style="width:1000px;margin:0px auto;border:1px solid #b9dae9">
- <thead>
- <tr>
- <th height="28" style="display:none;">执行路径</th>
- <c:if test="${canChoicePath}">
- <th height="28">选择同步条件后的执行路径</th>
- </c:if>
- <th>目标任务</th>
- </tr>
- </thead>
- <c:forEach items="${nodeTranUserList}" var="nodeTranUser" varStatus="i">
- <tr>
- <td height="28" width="18%" nowrap="nowrap" style="background:#f7fbff;display:none;">
- <c:if test="${selectPath==1 }">
- <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> />
- </c:if>
- ${nodeTranUser.nodeName}<!-- 跳转的目标节点 -->
- </td>
- <c:if test="${canChoicePath}">
- <td style="background:#f7fbff; ">
- <c:forEach items="${nodeTranUser.nextPathMap}" var="nextPath">
- <div>
- <label><input type="checkbox" include="1" name="nextPathId" value="${nextPath.key}"/>
- ${nextPath.value}</label>
- </div>
- </c:forEach>
- </td>
- </c:if>
- <td style="background:#f7fbff;">
- <c:forEach items="${nodeTranUser.nodeUserMapSet}" var="nodeUserMap">
- <div style="width:32%;float:left; border-right:1px solid #b9dae9;text-align:center; padding-left:10px;">
- ${nodeUserMap.nodeName}
- <input type="hidden" include='1' name="lastDestTaskId" value="${nodeUserMap.nodeId}"/>
- <span name="spanSelectUser">
- <c:forEach items="${nodeUserMap.taskExecutors}" var="executor">
- <input type="checkbox" include='1' name="${nodeUserMap.nodeId}_userId" checked="checked" value="${executor.type}^${executor.executeId}^${executor.executor}"/> ${executor.executor}
- </c:forEach>
- </span>
- <a href="javascript:;" class="link grant" onclick="selExeUsers(this,'${nodeUserMap.nodeId}','${scope}')">选择...</a>
- </div>
- </c:forEach>
- </td>
- </tr>
- </c:forEach>
- </table>
- <script type="text/javascript">
- //初始化
- $(function() {
- //删除没选中的include,不提交
- $("[name=destTask]").not(":checked").each(function(){
- var me=$(this);
- me.closest("tr").find("input").each(function(){
- $(this).removeAttr("include");
- });
- });
- //建立click方法
- $("[name=destTask]").click(function(){
- $("[name=destTask]").each(function(){
- var me=$(this);
- if(me.attr("checked")=="checked"){
- me.closest("tr").find("input").each(function(){
- $(this).attr("include","1");
- });
- }else{
- me.closest("tr").find("input").each(function(){
- $(this).removeAttr("include");
- });
- }
- });
- });
- });
- </script>
|