Commit 6c3110ae650b4805023e12071e346a11a10bc116
1 parent
9aff16c2
1.添加模板列表页
Showing
5 changed files
with
57 additions
and
20 deletions
WebRoot/WEB-INF/jsp/sunvote/admin/admin_main.jsp
| @@ -167,7 +167,7 @@ | @@ -167,7 +167,7 @@ | ||
| 167 | <p>年级升级</p> | 167 | <p>年级升级</p> |
| 168 | </li> | 168 | </li> |
| 169 | <li> | 169 | <li> |
| 170 | - <p>模板设置</p> | 170 | + <p onclick="event.stopPropagation();pagetemplate('${var.SCHOOL_ID}')">模板设置</p> |
| 171 | </li> | 171 | </li> |
| 172 | <li> | 172 | <li> |
| 173 | <p>其他配置</p> | 173 | <p>其他配置</p> |
| @@ -268,6 +268,11 @@ | @@ -268,6 +268,11 @@ | ||
| 268 | $("#mainFrame").attr('src',path); | 268 | $("#mainFrame").attr('src',path); |
| 269 | window.top.loading.show(); | 269 | window.top.loading.show(); |
| 270 | } | 270 | } |
| 271 | + function pagetemplate(school_id){ | ||
| 272 | + var path = "../pagetemplate/listcs.do"; | ||
| 273 | + $("#mainFrame").attr('src',path); | ||
| 274 | + window.top.loading.show(); | ||
| 275 | + } | ||
| 271 | 276 | ||
| 272 | function coursemanager(school_id){ | 277 | function coursemanager(school_id){ |
| 273 | var path = "../coursemanagement/listcs.do?school_id=" + school_id ; | 278 | var path = "../coursemanagement/listcs.do?school_id=" + school_id ; |
WebRoot/WEB-INF/jsp/sunvote/coursemanagement/coursemanagement_edit2.jsp
| @@ -16,6 +16,9 @@ | @@ -16,6 +16,9 @@ | ||
| 16 | <%@ include file="../../system/index/top.jsp"%> | 16 | <%@ include file="../../system/index/top.jsp"%> |
| 17 | <!-- 日期框 --> | 17 | <!-- 日期框 --> |
| 18 | <link rel="stylesheet" href="static/ace/css/datepicker.css" /> | 18 | <link rel="stylesheet" href="static/ace/css/datepicker.css" /> |
| 19 | + <!-- 编辑页样式覆盖 --> | ||
| 20 | + <link rel="stylesheet" href="static/css/edit.css" /> | ||
| 21 | + | ||
| 19 | </head> | 22 | </head> |
| 20 | <body class="no-skin"> | 23 | <body class="no-skin"> |
| 21 | <!-- /section:basics/navbar.layout --> | 24 | <!-- /section:basics/navbar.layout --> |
| @@ -30,7 +33,7 @@ | @@ -30,7 +33,7 @@ | ||
| 30 | <form action="coursemanagement/${msg }.do" name="Form" id="Form" method="post"> | 33 | <form action="coursemanagement/${msg }.do" name="Form" id="Form" method="post"> |
| 31 | <input type="hidden" name="ID" id="ID" value="${pd.ID}"/> | 34 | <input type="hidden" name="ID" id="ID" value="${pd.ID}"/> |
| 32 | <div id="zhongxin" style="padding-top: 13px;"> | 35 | <div id="zhongxin" style="padding-top: 13px;"> |
| 33 | - <table id="table_report" class="table table-striped table-bordered table-hover"> | 36 | + <table id="table_report" class="table"> |
| 34 | <tr> | 37 | <tr> |
| 35 | <td style="width:75px;text-align: right;padding-top: 13px;">老师:</td> | 38 | <td style="width:75px;text-align: right;padding-top: 13px;">老师:</td> |
| 36 | <td> | 39 | <td> |
| @@ -52,16 +55,7 @@ | @@ -52,16 +55,7 @@ | ||
| 52 | </select> | 55 | </select> |
| 53 | </td> | 56 | </td> |
| 54 | </tr> | 57 | </tr> |
| 55 | - <tr> | ||
| 56 | - <td style="width:75px;text-align: right;padding-top: 13px;">年级:</td> | ||
| 57 | - <td> | ||
| 58 | - <select class="chosen-select form-control" name="GRADE_ID" id="GRADE_ID" data-placeholder="这里输入班级类型"> | ||
| 59 | - <c:forEach var="item" items="${grades}"> | ||
| 60 | - <option value="${item.ID}" <c:if test="${pd.GRADE_ID==item.ID}">selected="true"</c:if>>${item.NAME}</option> | ||
| 61 | - </c:forEach> | ||
| 62 | - </select> | ||
| 63 | - </td> | ||
| 64 | - </tr> | 58 | + |
| 65 | <tr> | 59 | <tr> |
| 66 | <td style="width:75px;text-align: right;padding-top: 13px;">科目:</td> | 60 | <td style="width:75px;text-align: right;padding-top: 13px;">科目:</td> |
| 67 | <td> | 61 | <td> |
| @@ -86,7 +80,7 @@ | @@ -86,7 +80,7 @@ | ||
| 86 | <tr> | 80 | <tr> |
| 87 | <td style="text-align: center;" colspan="10"> | 81 | <td style="text-align: center;" colspan="10"> |
| 88 | <a class="btn btn-mini btn-primary" onclick="save();">保存</a> | 82 | <a class="btn btn-mini btn-primary" onclick="save();">保存</a> |
| 89 | - <a class="btn btn-mini btn-danger" onclick="top.Dialog.close();">取消</a> | 83 | + <a class="btn btn-mini btn-danger" onclick="window.top.modal.remove();">取消</a> |
| 90 | </td> | 84 | </td> |
| 91 | </tr> | 85 | </tr> |
| 92 | </table> | 86 | </table> |
WebRoot/WEB-INF/jsp/sunvote/coursemanagement/coursemanagement_list2.jsp
| @@ -87,7 +87,7 @@ | @@ -87,7 +87,7 @@ | ||
| 87 | </table> | 87 | </table> |
| 88 | <div class="footer"> | 88 | <div class="footer"> |
| 89 | <div class="creat"> | 89 | <div class="creat"> |
| 90 | - <input type="button" value="分配任课" /> | 90 | + <input type="button" onclick="add()" value="分配任课" /> |
| 91 | </div> | 91 | </div> |
| 92 | <div class="removeAll"> | 92 | <div class="removeAll"> |
| 93 | <input type="button" onclick="deleteAll()" value="移除任课" /> | 93 | <input type="button" onclick="deleteAll()" value="移除任课" /> |
| @@ -117,8 +117,21 @@ | @@ -117,8 +117,21 @@ | ||
| 117 | <script type="text/javascript" src="static/js/jquery.tips.js"></script> | 117 | <script type="text/javascript" src="static/js/jquery.tips.js"></script> |
| 118 | <script type="text/javascript"> | 118 | <script type="text/javascript"> |
| 119 | $(document).ready(function(){ | 119 | $(document).ready(function(){ |
| 120 | - window.top.loading.remove(); | 120 | + window.top.loading.remove(); |
| 121 | + }); | ||
| 122 | + | ||
| 123 | + //新增 | ||
| 124 | + function add(){ | ||
| 125 | + window.top.modal.init({ | ||
| 126 | + 'title':'分配任课', | ||
| 127 | + 'url':'<%=basePath%>coursemanagement/goAdd2.do', | ||
| 128 | + func:function() { | ||
| 129 | + tosearch(); | ||
| 130 | + } | ||
| 121 | }); | 131 | }); |
| 132 | + window.top.modal.show(); | ||
| 133 | + } | ||
| 134 | + | ||
| 122 | </script> | 135 | </script> |
| 123 | 136 | ||
| 124 | 137 |
resources/dbconfig.properties
| 1 | #数据源 1 | 1 | #数据源 1 |
| 2 | -#url:jdbc:mysql://47.107.98.47:3306/education2?autoReconnect=true&failOverReadOnly=false&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8 | 2 | +url:jdbc:mysql://47.107.98.47:3306/education2?autoReconnect=true&failOverReadOnly=false&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8 |
| 3 | #url:jdbc:mysql://120.78.57.84:3306/education3?autoReconnect=true&failOverReadOnly=false&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8 | 3 | #url:jdbc:mysql://120.78.57.84:3306/education3?autoReconnect=true&failOverReadOnly=false&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8 |
| 4 | #url:jdbc:mysql://192.168.0.3:3306/education?autoReconnect=true&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8 | 4 | #url:jdbc:mysql://192.168.0.3:3306/education?autoReconnect=true&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8 |
| 5 | -url:jdbc:mysql://120.78.219.152:3306/fhadmin?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8 | 5 | +#url:jdbc:mysql://120.78.219.152:3306/fhadmin?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8 |
| 6 | driverClassName:com.mysql.jdbc.Driver | 6 | driverClassName:com.mysql.jdbc.Driver |
| 7 | -username:root | ||
| 8 | -password:ZrZxKeYp | ||
| 9 | #username:root | 7 | #username:root |
| 10 | -#password:admin | 8 | +#password:ZrZxKeYp |
| 9 | +username:root | ||
| 10 | +password:admin | ||
| 11 | filters:stat | 11 | filters:stat |
| 12 | maxActive:20 | 12 | maxActive:20 |
| 13 | initialSize:1 | 13 | initialSize:1 |
src/com/fh/controller/sunvote/pagetemplate/PageTemplateController.java
| @@ -118,6 +118,31 @@ public class PageTemplateController extends BaseController { | @@ -118,6 +118,31 @@ public class PageTemplateController extends BaseController { | ||
| 118 | return mv; | 118 | return mv; |
| 119 | } | 119 | } |
| 120 | 120 | ||
| 121 | + /**列表 | ||
| 122 | + * @param page | ||
| 123 | + * @throws Exception | ||
| 124 | + */ | ||
| 125 | + @RequestMapping(value="/listcs") | ||
| 126 | + public ModelAndView listcs(Page page) throws Exception{ | ||
| 127 | + logBefore(logger, Jurisdiction.getUsername()+"列表PageTemplate"); | ||
| 128 | + //if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} //校验权限(无权查看时页面会有提示,如果不注释掉这句代码就无法进入列表页面,所以根据情况是否加入本句代码) | ||
| 129 | + ModelAndView mv = this.getModelAndView(); | ||
| 130 | + PageData pd = new PageData(); | ||
| 131 | + pd = this.getPageData(); | ||
| 132 | + String keywords = pd.getString("keywords"); //关键词检索条件 | ||
| 133 | + if(null != keywords && !"".equals(keywords)){ | ||
| 134 | + pd.put("keywords", keywords.trim()); | ||
| 135 | + } | ||
| 136 | + page.setPd(pd); | ||
| 137 | + List<PageData> varList = pagetemplateService.list(page); //列出PageTemplate列表 | ||
| 138 | + mv.setViewName("sunvote/pagetemplate/pagetemplate_list2"); | ||
| 139 | + mv.addObject("varList", varList); | ||
| 140 | + mv.addObject("pd", pd); | ||
| 141 | + mv.addObject("QX",Jurisdiction.getHC()); //按钮权限 | ||
| 142 | + return mv; | ||
| 143 | + } | ||
| 144 | + | ||
| 145 | + | ||
| 121 | /**去新增页面 | 146 | /**去新增页面 |
| 122 | * @param | 147 | * @param |
| 123 | * @throws Exception | 148 | * @throws Exception |