plan.jsp 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. <%@ page contentType="text/html;charset=UTF-8" %>
  2. <%@ include file="/webpage/include/taglibf.jsp"%>
  3. <!DOCTYPE html>
  4. <html>
  5. <head>
  6. <meta charset="utf-8">
  7. <title>${fns:getConfig("productName")}</title>
  8. <link rel="stylesheet" href="${ctxStaticWeb}/css/base.css" />
  9. <link rel="stylesheet" href="${ctxStaticWeb}/css/second.css" />
  10. <link href="${ctx}/static/plugin/layui/dist/css/layui.css" rel="stylesheet"/>
  11. <script src="${ctx}/static/web/js/jquery-2.1.4.js"></script>
  12. <script src="${ctx}/static/plugin/jquery-validation/1.14.0/jquery.validate.js" type="text/javascript"></script>
  13. <script src="${ctx}/static/plugin/jquery-validation/1.14.0/localization/messages_zh.min.js" type="text/javascript"></script>
  14. <script src="${ctxStatic}/plugin/layui/layer/layer.js"></script>
  15. <script src="${ctxStatic}/plugin/layui/laytpl/laytpl.js"></script>
  16. <script>
  17. $().ready(function() {
  18. });
  19. function exit() {
  20. layer.confirm('确认要退出登录吗?', {icon: 3, title:'提示'}, function(index){
  21. window.location.href = "${ctxF}/logout";
  22. layer.close(index);
  23. });
  24. }
  25. function enroll(id) {
  26. top.layer.open({
  27. type: 2,
  28. area: ['900px', '500px'],
  29. title: '报名信息',
  30. auto:false,//是否使用响应式,使用百分比时,应设置为false
  31. maxmin: true, //开启最大化最小化按钮
  32. content: "${ctxF}/enroll?planId="+id,
  33. btn: ['确定', '关闭'],
  34. yes: function(index, layero){
  35. var iframeWin = layero.find('iframe')[0]; //得到弹出的窗口对象,执行窗口内iframe页的方法:iframeWin.method();
  36. iframeWin.contentWindow.save();//调用保存事件,在 弹出页内,需要定义save方法。处理保存事件。
  37. },
  38. cancel: function(index){
  39. }
  40. });
  41. }
  42. function enrollView(id) {
  43. top.layer.open({
  44. type: 2,
  45. area: ['900px', '500px'],
  46. title: '查看报名信息',
  47. auto:false,
  48. maxmin: true, //开启最大化最小化按钮
  49. content: "${ctxF}/enroll?planId="+id,
  50. btn: ['关闭'],
  51. cancel: function(index){
  52. }
  53. });
  54. }
  55. </script>
  56. </head>
  57. <body>
  58. <%@ include file="/webpage/modules/web/top.jsp"%>
  59. <div class="new w clearfix">
  60. <div class="personal">
  61. <div class="personal_l fl">
  62. <h2>个人中心</h2>
  63. <ul>
  64. <li><a href="${ctxF}/info" id="hrefperson">个人资料</a></li>
  65. <li><a href="${ctxF}/personalpwd" id="hrefpwd">修改密码</a></li>
  66. <li><a href="${ctxF}/count" id="hrefCount" >学习统计</a></li>
  67. <li><a href="${ctxF}/history" id="hrefhistory" >答题测试</a></li>
  68. <li><a href="${ctxF}/exam/wait" id="hrefexam">在线考试</a></li>
  69. <li><a href="${ctxF}/plan" id="hrefplan" class="do">培训计划</a></li>
  70. <li><a href="#" onclick="exit()">退出登录</a></li>
  71. </ul>
  72. </div>
  73. <div class="personal_r fr">
  74. <div class="position">当前位置:<a href="${ctx}/">网站首页</a>&nbsp;&#62;&nbsp;个人中心&nbsp;&#62;&nbsp;培训计划</div>
  75. <div class="information_study" id="ksls">
  76. <div class="table">
  77. <div class="table_top clearfix">
  78. <ul>
  79. <li class="title">培训标题</li><li class="width-10">培训时间</li><li class="width-10">培训讲师</li><li class="width-20">培训地点</li><li class="width-10">状态</li><li class="width-20">操作</li>
  80. </ul>
  81. </div>
  82. <c:forEach items="${planList}" var="plan" varStatus="status">
  83. <c:choose>
  84. <c:when test="${status.index % 2 == 0}">
  85. <div class=" clearfix">
  86. <ul>
  87. <li class="title">${plan.title}</li><li class="width-10">${fns:formatDate(plan.trainDate)}</li><li class="width-10">${plan.teacher}</li><li class="width-20">${plan.place}</li>
  88. <li class="width-10">
  89. <c:choose>
  90. <c:when test="${plan.signer==null || plan.signer==''}">
  91. --
  92. </c:when>
  93. <c:when test="${plan.signer=='1'}">
  94. 待审核
  95. </c:when>
  96. <c:when test="${plan.signer=='2'}">
  97. 审核通过
  98. </c:when>
  99. <c:when test="${plan.signer=='3'}">
  100. 审核未通过
  101. </c:when>
  102. </c:choose>
  103. </li>
  104. <li class="width-20">
  105. <c:choose>
  106. <c:when test="${plan.signer==null || plan.signer==''}">
  107. <button onclick="enroll('${plan.id}')" style="cursor: pointer; height:31px;border-radius: 4px;font-size:16px;color:#fff; background-color: #C7301E;width: 55px; border:none">报名</button>
  108. </c:when>
  109. <c:when test="${plan.signer=='1'}">
  110. <button onclick="enroll('${plan.id}')" style="cursor: pointer;height:31px;border-radius: 4px;font-size:16px;color:#fff; background-color: #C7301E; padding: 5px;border:none">报名修改</button>
  111. </c:when>
  112. <c:when test="${plan.signer=='2'}">
  113. <button onclick="enrollView('${plan.id}')" style="cursor: pointer;height:31px;border-radius: 4px;font-size:16px;color:#fff; background-color: #C7301E; padding: 5px;border:none">查看报名</button>
  114. </c:when>
  115. <c:when test="${plan.signer=='3'}">
  116. <button onclick="enrollView('${plan.id}')" style="cursor: pointer;height:31px;border-radius: 4px;font-size:16px;color:#fff; background-color: #C7301E; padding: 5px;border:none">查看报名</button>
  117. </c:when>
  118. </c:choose>
  119. </li>
  120. </ul>
  121. </div>
  122. </c:when>
  123. <c:otherwise>
  124. <div class="hui_bj">
  125. <ul>
  126. <li class="title">${plan.title}</li><li class="width-10">${fns:formatDate(plan.trainDate)}</li><li class="width-10">${plan.teacher}</li><li class="width-20">${plan.place}</li>
  127. <li class="width-10">
  128. <c:choose>
  129. <c:when test="${plan.signer==null || plan.signer==''}">
  130. --
  131. </c:when>
  132. <c:when test="${plan.signer=='1'}">
  133. 待审核
  134. </c:when>
  135. <c:when test="${plan.signer=='2'}">
  136. 审核通过
  137. </c:when>
  138. <c:when test="${plan.signer=='3'}">
  139. 审核未通过
  140. </c:when>
  141. </c:choose>
  142. </li>
  143. <li class="width-20">
  144. <c:choose>
  145. <c:when test="${plan.signer==null || plan.signer==''}">
  146. <button onclick="enroll('${plan.id}')" style="cursor: pointer; height:31px;border-radius: 4px;font-size:16px;color:#fff; background-color: #C7301E;width: 55px; border:none">报名</button>
  147. </c:when>
  148. <c:when test="${plan.signer=='1'}">
  149. <button onclick="enroll('${plan.id}')" style="cursor: pointer;height:31px;border-radius: 4px;font-size:16px;color:#fff; background-color: #C7301E; padding: 5px;border:none">报名修改</button>
  150. </c:when>
  151. <c:when test="${plan.signer=='2'}">
  152. <button onclick="enrollView('${plan.id}')" style="cursor: pointer;height:31px;border-radius: 4px;font-size:16px;color:#fff; background-color: #C7301E; padding: 5px;border:none">查看报名</button>
  153. </c:when>
  154. <c:when test="${plan.signer=='3'}">
  155. <button onclick="enrollView('${plan.id}')" style="cursor: pointer;height:31px;border-radius: 4px;font-size:16px;color:#fff; background-color: #C7301E; padding: 5px;border:none">查看报名</button>
  156. </c:when>
  157. </c:choose>
  158. </li>
  159. </ul>
  160. </div>
  161. </c:otherwise>
  162. </c:choose>
  163. </c:forEach>
  164. <c:if test="${planList==null || planList.size()==0}">
  165. <div class=" clearfix">
  166. <ul>
  167. <li>
  168. <a href="#">暂无数据</a>
  169. </li>
  170. </ul>
  171. </div>
  172. </c:if>
  173. <div style="margin:30px 0px;">
  174. <c:if test="${planList!=null && planList.size()>0}">
  175. <div id="pagination" style="text-align: center"></div>
  176. </c:if>
  177. </div>
  178. </div>
  179. </div>
  180. </div>
  181. </div>
  182. </div>
  183. <div class="footer">
  184. <%@ include file="/webpage/modules/web/footer.jsp"%>
  185. </div>
  186. <script src="${pageContext.request.contextPath}/static/plugin/layui/dist/layui.js"></script>
  187. <!-- 注意:如果你直接复制所有代码到本地,上述js路径需要改成你本地的 -->
  188. <script>
  189. layui.use(['laypage', 'layer'], function(){
  190. var laypage = layui.laypage
  191. ,layer = layui.layer;
  192. laypage.render({
  193. elem: 'pagination'
  194. ,count: ${page.count}//从服务器得到数据总数
  195. ,limit: ${page.pageSize}//每页展示多少条数据
  196. ,curr: ${page.pageNo}
  197. ,layout: ['count', 'prev', 'page', 'next', 'limit', 'refresh', 'skip']
  198. ,jump: function (obj, first) {
  199. //obj包含了当前分页的所有参数,比如:
  200. //console.log(obj.curr); //得到当前页,以便向服务端请求对应页的数据。
  201. //console.log(obj.limit); //得到每页显示的条数
  202. //首次不执行
  203. if (!first) {
  204. //do something
  205. var href = '${ctxF}/plan';
  206. href += '?pageNo=' + obj.curr;
  207. href += '&pageSize=' + obj.limit;
  208. //console.log(href)
  209. location.href = href;
  210. }
  211. }
  212. ,theme: '#c7301e'
  213. });
  214. });
  215. </script>
  216. </body>
  217. </html>