Commit 9b72ddbad9c51885cb5047b79eaff45f420f9d63
1 parent
3b178498
1.修改布置练习和班长管理
Showing
5 changed files
with
128 additions
and
290 deletions
WebRoot/WEB-INF/jsp/sunvote/headmaster/headmaster_edit.jsp
| @@ -16,6 +16,8 @@ | @@ -16,6 +16,8 @@ | ||
| 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" /> | ||
| 19 | </head> | 21 | </head> |
| 20 | <body class="no-skin"> | 22 | <body class="no-skin"> |
| 21 | <!-- /section:basics/navbar.layout --> | 23 | <!-- /section:basics/navbar.layout --> |
| @@ -30,7 +32,7 @@ | @@ -30,7 +32,7 @@ | ||
| 30 | <form action="headmaster/${msg }.do" name="Form" id="Form" method="post"> | 32 | <form action="headmaster/${msg }.do" name="Form" id="Form" method="post"> |
| 31 | <input type="hidden" name="HEADMASTER_ID" id="HEADMASTER_ID" value="${pd.HEADMASTER_ID}"/> | 33 | <input type="hidden" name="HEADMASTER_ID" id="HEADMASTER_ID" value="${pd.HEADMASTER_ID}"/> |
| 32 | <div id="zhongxin" style="padding-top: 13px;"> | 34 | <div id="zhongxin" style="padding-top: 13px;"> |
| 33 | - <table id="table_report" class="table table-striped table-bordered table-hover"> | 35 | + <table id="table_report" class="table"> |
| 34 | <tr> | 36 | <tr> |
| 35 | <td style="width:75px;text-align: right;padding-top: 13px;">姓名:</td> | 37 | <td style="width:75px;text-align: right;padding-top: 13px;">姓名:</td> |
| 36 | <td><input type="text" name="NAME" id="NAME" value="${pd.NAME}" maxlength="255" placeholder="这里输入姓名" title="姓名" style="width:98%;"/></td> | 38 | <td><input type="text" name="NAME" id="NAME" value="${pd.NAME}" maxlength="255" placeholder="这里输入姓名" title="姓名" style="width:98%;"/></td> |
| @@ -42,15 +44,7 @@ | @@ -42,15 +44,7 @@ | ||
| 42 | <tr> | 44 | <tr> |
| 43 | <td style="width:75px;text-align: right;padding-top: 13px;">密码:</td> | 45 | <td style="width:75px;text-align: right;padding-top: 13px;">密码:</td> |
| 44 | <td><input type="text" name="PASSWORD" id="PASSWORD" value="${pd.PASSWORD}" maxlength="255" placeholder="这里输入密码" title="密码" style="width:98%;"/></td> | 46 | <td><input type="text" name="PASSWORD" id="PASSWORD" value="${pd.PASSWORD}" maxlength="255" placeholder="这里输入密码" title="密码" style="width:98%;"/></td> |
| 45 | - </tr> | ||
| 46 | - <tr> | ||
| 47 | - <td style="width:75px;text-align: right;padding-top: 13px;">所在学校:</td> | ||
| 48 | - <td><input type="text" name="SCHOOL_ID" id="SCHOOL_ID" value="${pd.SCHOOL_ID}" maxlength="255" placeholder="这里输入所在学校" title="所在学校" style="width:98%;"/></td> | ||
| 49 | - </tr> | ||
| 50 | - <tr> | ||
| 51 | - <td style="width:75px;text-align: right;padding-top: 13px;">权限:</td> | ||
| 52 | - <td><input type="text" name="PERMISSION" id="PERMISSION" value="${pd.PERMISSION}" maxlength="255" placeholder="这里输入权限" title="权限" style="width:98%;"/></td> | ||
| 53 | - </tr> | 47 | + </tr> |
| 54 | <tr> | 48 | <tr> |
| 55 | <td style="width:75px;text-align: right;padding-top: 13px;">联系电话:</td> | 49 | <td style="width:75px;text-align: right;padding-top: 13px;">联系电话:</td> |
| 56 | <td><input type="text" name="PHONE" id="PHONE" value="${pd.PHONE}" maxlength="255" placeholder="这里输入联系电话" title="联系电话" style="width:98%;"/></td> | 50 | <td><input type="text" name="PHONE" id="PHONE" value="${pd.PHONE}" maxlength="255" placeholder="这里输入联系电话" title="联系电话" style="width:98%;"/></td> |
| @@ -58,7 +52,7 @@ | @@ -58,7 +52,7 @@ | ||
| 58 | <tr> | 52 | <tr> |
| 59 | <td style="text-align: center;" colspan="10"> | 53 | <td style="text-align: center;" colspan="10"> |
| 60 | <a class="btn btn-mini btn-primary" onclick="save();">保存</a> | 54 | <a class="btn btn-mini btn-primary" onclick="save();">保存</a> |
| 61 | - <a class="btn btn-mini btn-danger" onclick="top.Dialog.close();">取消</a> | 55 | + <a class="btn btn-mini btn-danger" onclick="window.top.modal.remove();">取消</a> |
| 62 | </td> | 56 | </td> |
| 63 | </tr> | 57 | </tr> |
| 64 | </table> | 58 | </table> |
| @@ -87,7 +81,7 @@ | @@ -87,7 +81,7 @@ | ||
| 87 | <!--提示框--> | 81 | <!--提示框--> |
| 88 | <script type="text/javascript" src="static/js/jquery.tips.js"></script> | 82 | <script type="text/javascript" src="static/js/jquery.tips.js"></script> |
| 89 | <script type="text/javascript"> | 83 | <script type="text/javascript"> |
| 90 | - $(top.hangge()); | 84 | + |
| 91 | //保存 | 85 | //保存 |
| 92 | function save(){ | 86 | function save(){ |
| 93 | if($("#NAME").val()==""){ | 87 | if($("#NAME").val()==""){ |
| @@ -120,26 +114,7 @@ | @@ -120,26 +114,7 @@ | ||
| 120 | $("#PASSWORD").focus(); | 114 | $("#PASSWORD").focus(); |
| 121 | return false; | 115 | return false; |
| 122 | } | 116 | } |
| 123 | - if($("#SCHOOL_ID").val()==""){ | ||
| 124 | - $("#SCHOOL_ID").tips({ | ||
| 125 | - side:3, | ||
| 126 | - msg:'请输入所在学校', | ||
| 127 | - bg:'#AE81FF', | ||
| 128 | - time:2 | ||
| 129 | - }); | ||
| 130 | - $("#SCHOOL_ID").focus(); | ||
| 131 | - return false; | ||
| 132 | - } | ||
| 133 | - if($("#PERMISSION").val()==""){ | ||
| 134 | - $("#PERMISSION").tips({ | ||
| 135 | - side:3, | ||
| 136 | - msg:'请输入权限', | ||
| 137 | - bg:'#AE81FF', | ||
| 138 | - time:2 | ||
| 139 | - }); | ||
| 140 | - $("#PERMISSION").focus(); | ||
| 141 | - return false; | ||
| 142 | - } | 117 | + |
| 143 | if($("#PHONE").val()==""){ | 118 | if($("#PHONE").val()==""){ |
| 144 | $("#PHONE").tips({ | 119 | $("#PHONE").tips({ |
| 145 | side:3, | 120 | side:3, |
WebRoot/WEB-INF/jsp/sunvote/headmaster/headmaster_list.jsp
| @@ -2,6 +2,7 @@ | @@ -2,6 +2,7 @@ | ||
| 2 | pageEncoding="UTF-8"%> | 2 | pageEncoding="UTF-8"%> |
| 3 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> | 3 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> |
| 4 | <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> | 4 | <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> |
| 5 | +<%@ taglib prefix="myelfun" uri="/WEB-INF/tld/elfun.tld"%> | ||
| 5 | <% | 6 | <% |
| 6 | String path = request.getContextPath(); | 7 | String path = request.getContextPath(); |
| 7 | String basePath = request.getScheme() + "://" | 8 | String basePath = request.getScheme() + "://" |
| @@ -13,90 +14,80 @@ | @@ -13,90 +14,80 @@ | ||
| 13 | <title>中天电子-教育管理系统</title> | 14 | <title>中天电子-教育管理系统</title> |
| 14 | <head> | 15 | <head> |
| 15 | <base href="<%=basePath%>"> | 16 | <base href="<%=basePath%>"> |
| 16 | -<link | ||
| 17 | - href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" | ||
| 18 | - rel="stylesheet"> | 17 | + |
| 18 | +<!-- 下拉框 --> | ||
| 19 | +<link rel="stylesheet" href="static/ace/css/chosen.css" /> | ||
| 20 | +<!-- jsp文件头和头部 --> | ||
| 21 | + | ||
| 22 | +<!-- 日期框 --> | ||
| 23 | +<link rel="stylesheet" href="static/ace/css/datepicker.css" /> | ||
| 24 | +<link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"> | ||
| 25 | +<link href="static/css/teach.css" rel="stylesheet"> | ||
| 19 | </head> | 26 | </head> |
| 20 | <body class="no-skin"> | 27 | <body class="no-skin"> |
| 28 | + | ||
| 29 | + | ||
| 21 | <!-- 检索 --> | 30 | <!-- 检索 --> |
| 22 | - <form action="headmaster/listcs.do" method="post" name="Form" id="Form"> | ||
| 23 | - <table style="margin-top:5px;"> | ||
| 24 | - </table> | ||
| 25 | - <!-- 检索 --> | 31 | + <form action="headmaster/list.do" method="post" name="Form" id="Form"> |
| 32 | + <input type="hidden" name="SCHOOL_ID" id="SCHOOL_ID" value="${pd.SCHOOL_ID}"/> | ||
| 33 | + <input type="hidden" name="GRADE_ID" id="GRADE_ID" value="${pd.GRADE_ID}"/> | ||
| 34 | + <div class="head_box"> | ||
| 35 | + <div class="box_header"> | ||
| 36 | + <div class="head_box_l"> | ||
| 37 | + <p> | ||
| 38 | + <span class="right_b"></span>班长管理 | ||
| 39 | + </p> | ||
| 40 | + </div> | ||
| 41 | + <div class="clearfix"></div> | ||
| 42 | + </div> | ||
| 43 | + <div style="background:#fff;padding:0 5%;" > | ||
| 26 | 44 | ||
| 27 | - <table id="simple-table" | ||
| 28 | - class="table table-striped table-bordered table-hover" | ||
| 29 | - style="margin-top:5px;"> | ||
| 30 | - <thead> | ||
| 31 | - <tr> | ||
| 32 | - <th class="center" style="width:35px;"><label class="pos-rel"><input | ||
| 33 | - type="checkbox" class="ace" id="zcheckbox" /><span class="lbl"></span></label> | ||
| 34 | - </th> | ||
| 35 | - <th class="center" style="width:50px;">序号</th> | ||
| 36 | - <th class="center">姓名</th> | ||
| 37 | - <th class="center">用户名</th> | ||
| 38 | - <th class="center">密码</th> | ||
| 39 | - <th class="center">所在学校</th> | ||
| 40 | - <th class="center">权限</th> | ||
| 41 | - <th class="center">联系电话</th> | ||
| 42 | - <th class="center">操作</th> | ||
| 43 | - </tr> | ||
| 44 | - </thead> | 45 | + <table class="table table-striped" > |
| 46 | + <col style="width: 10%" /> | ||
| 47 | + <col style="width: 10%" /> | ||
| 48 | + <col style="width: 10%" /> | ||
| 49 | + <col style="width: 10%" /> | ||
| 50 | + <col style="width: 20%" /> | ||
| 51 | + <col style="width: 20%" /> | ||
| 52 | + <thead> | ||
| 53 | + <tr> | ||
| 54 | + <th><input type="checkbox" value="0" name='ids' id="ids" />序号</th> | ||
| 55 | + <th class="center">姓名</th> | ||
| 56 | + <th class="center">用户名</th> | ||
| 57 | + <th class="center">密码</th> | ||
| 58 | + <th class="center">联系电话</th> | ||
| 59 | + <th class="center">操作</th> | ||
| 60 | + </tr> | ||
| 61 | + | ||
| 62 | + </thead> | ||
| 63 | + </table> | ||
| 64 | + </div> | ||
| 65 | + | ||
| 66 | + <div class="clearfix"></div> | ||
| 67 | + <!-- 检索 --> | ||
| 45 | 68 | ||
| 46 | - <tbody> | ||
| 47 | - <!-- 开始循环 --> | 69 | + </div> |
| 70 | + <div class="table_box" > | ||
| 71 | + <table class="table table-striped" > | ||
| 72 | + <col style="width: 10%" /> | ||
| 73 | + <col style="width: 10%" /> | ||
| 74 | + <col style="width: 10%" /> | ||
| 75 | + <col style="width: 10%" /> | ||
| 76 | + <col style="width: 20%" /> | ||
| 77 | + <col style="width: 20%" /> | ||
| 78 | + <tbody> | ||
| 79 | + <!-- 开始循环 --> | ||
| 48 | <c:choose> | 80 | <c:choose> |
| 49 | <c:when test="${not empty varList}"> | 81 | <c:when test="${not empty varList}"> |
| 50 | <c:forEach items="${varList}" var="var" varStatus="vs"> | 82 | <c:forEach items="${varList}" var="var" varStatus="vs"> |
| 51 | - <tr> | ||
| 52 | - <td class='center'><label class="pos-rel"><input | ||
| 53 | - type='checkbox' name='ids' value="${var.HEADMASTER_ID}" | ||
| 54 | - class="ace" /><span class="lbl"></span></label></td> | ||
| 55 | - <td class='center' style="width: 30px;">${vs.index+1}</td> | 83 | + <tr> |
| 84 | + <td><input type="checkbox" name='ids' id="ids" | ||
| 85 | + value="${var.ID}" />${vs.index+1}</td> | ||
| 56 | <td class='center'>${var.NAME}</td> | 86 | <td class='center'>${var.NAME}</td> |
| 57 | <td class='center'>${var.USERNAME}</td> | 87 | <td class='center'>${var.USERNAME}</td> |
| 58 | - <td class='center'>${var.PASSWORD}</td> | ||
| 59 | - <td class='center'>${var.SCHOOL_ID}</td> | ||
| 60 | - <td class='center'>${var.PERMISSION}</td> | 88 | + <td class='center'>${var.PASSWORD}</td> |
| 61 | <td class='center'>${var.PHONE}</td> | 89 | <td class='center'>${var.PHONE}</td> |
| 62 | - <td class="center"><span | ||
| 63 | - class="label label-large label-grey arrowed-in-right arrowed-in"><i | ||
| 64 | - class="ace-icon fa fa-lock" title="无权限"></i></span> | ||
| 65 | - <div class="hidden-sm hidden-xs btn-group"> | ||
| 66 | - <a class="btn btn-xs btn-success" title="编辑" | ||
| 67 | - onclick="edit('${var.HEADMASTER_ID}');"> <i | ||
| 68 | - class="ace-icon fa fa-pencil-square-o bigger-120" title="编辑"></i> | ||
| 69 | - </a> <a class="btn btn-xs btn-danger" | ||
| 70 | - onclick="del('${var.HEADMASTER_ID}');"> <i | ||
| 71 | - class="ace-icon fa fa-trash-o bigger-120" title="删除"></i> | ||
| 72 | - </a> | ||
| 73 | - </div> | ||
| 74 | - <div class="hidden-md hidden-lg"> | ||
| 75 | - <div class="inline pos-rel"> | ||
| 76 | - <button class="btn btn-minier btn-primary dropdown-toggle" | ||
| 77 | - data-toggle="dropdown" data-position="auto"> | ||
| 78 | - <i class="ace-icon fa fa-cog icon-only bigger-110"></i> | ||
| 79 | - </button> | ||
| 80 | - | ||
| 81 | - <ul | ||
| 82 | - class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close"> | ||
| 83 | - <li><a style="cursor:pointer;" | ||
| 84 | - onclick="edit('${var.HEADMASTER_ID}');" | ||
| 85 | - class="tooltip-success" data-rel="tooltip" title="修改"> | ||
| 86 | - <span class="green"> <i | ||
| 87 | - class="ace-icon fa fa-pencil-square-o bigger-120"></i> | ||
| 88 | - </span> | ||
| 89 | - </a></li> | ||
| 90 | - <li><a style="cursor:pointer;" | ||
| 91 | - onclick="del('${var.HEADMASTER_ID}');" | ||
| 92 | - class="tooltip-error" data-rel="tooltip" title="删除"> <span | ||
| 93 | - class="red"> <i | ||
| 94 | - class="ace-icon fa fa-trash-o bigger-120"></i> | ||
| 95 | - </span> | ||
| 96 | - </a></li> | ||
| 97 | - </ul> | ||
| 98 | - </div> | ||
| 99 | - </div></td> | 90 | + <td><a onclick="edit('${var.HEADMASTER_ID}');" style="margin-right:10px;"><img src="static/images/eidtor.png" /></a><a href="#" onclick="del('${var.HEADMASTER_ID}');"><img src="static/images/remove.png" /></a></td> |
| 100 | </tr> | 91 | </tr> |
| 101 | 92 | ||
| 102 | </c:forEach> | 93 | </c:forEach> |
| @@ -107,22 +98,20 @@ | @@ -107,22 +98,20 @@ | ||
| 107 | </tr> | 98 | </tr> |
| 108 | </c:otherwise> | 99 | </c:otherwise> |
| 109 | </c:choose> | 100 | </c:choose> |
| 110 | - </tbody> | ||
| 111 | - </table> | ||
| 112 | - <div class="page-header position-relative"> | ||
| 113 | - <table style="width:100%;"> | ||
| 114 | - <tr> | ||
| 115 | - <td style="vertical-align:top;"><c:if test="${QX.add == 1 }"> | ||
| 116 | - <a class="btn btn-mini btn-success" onclick="add();">新增</a> | ||
| 117 | - </c:if> <c:if test="${QX.del == 1 }"> | ||
| 118 | - <a class="btn btn-mini btn-danger" | ||
| 119 | - onclick="makeAll('确定要删除选中的数据吗?');" title="批量删除"><i | ||
| 120 | - class='ace-icon fa fa-trash-o bigger-120'></i></a> | ||
| 121 | - </c:if></td> | ||
| 122 | - <td style="vertical-align:top;"><div class="pagination" | ||
| 123 | - style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div></td> | ||
| 124 | - </tr> | 101 | + </tbody> |
| 125 | </table> | 102 | </table> |
| 103 | + <div class="footer" style="width:auto;margin: 0px 5%;"> | ||
| 104 | + <div class="creat"> | ||
| 105 | + <input type="button" onclick="add();" value="添加班级" /> | ||
| 106 | + </div> | ||
| 107 | + <div class="removeAll"> | ||
| 108 | + <input type="button" onclick="del();" value="删除" /> | ||
| 109 | + </div> | ||
| 110 | + | ||
| 111 | + <div class="page_box"> | ||
| 112 | + <div class="pagination" style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div> | ||
| 113 | + </div> | ||
| 114 | + </div> | ||
| 126 | </div> | 115 | </div> |
| 127 | </form> | 116 | </form> |
| 128 | </div> | 117 | </div> |
| @@ -138,169 +127,34 @@ | @@ -138,169 +127,34 @@ | ||
| 138 | function tosearch(){ | 127 | function tosearch(){ |
| 139 | $("#Form").submit(); | 128 | $("#Form").submit(); |
| 140 | } | 129 | } |
| 141 | - $(function() { | ||
| 142 | - | ||
| 143 | - //日期框 | ||
| 144 | - $('.date-picker').datepicker({ | ||
| 145 | - autoclose: true, | ||
| 146 | - todayHighlight: true | ||
| 147 | - }); | ||
| 148 | - | ||
| 149 | - //下拉框 | ||
| 150 | - if(!ace.vars['touch']) { | ||
| 151 | - $('.chosen-select').chosen({allow_single_deselect:true}); | ||
| 152 | - $(window) | ||
| 153 | - .off('resize.chosen') | ||
| 154 | - .on('resize.chosen', function() { | ||
| 155 | - $('.chosen-select').each(function() { | ||
| 156 | - var $this = $(this); | ||
| 157 | - $this.next().css({'width': $this.parent().width()}); | ||
| 158 | - }); | ||
| 159 | - }).trigger('resize.chosen'); | ||
| 160 | - $(document).on('settings.ace.chosen', function(e, event_name, event_val) { | ||
| 161 | - if(event_name != 'sidebar_collapsed') return; | ||
| 162 | - $('.chosen-select').each(function() { | ||
| 163 | - var $this = $(this); | ||
| 164 | - $this.next().css({'width': $this.parent().width()}); | ||
| 165 | - }); | ||
| 166 | - }); | ||
| 167 | - $('#chosen-multiple-style .btn').on('click', function(e){ | ||
| 168 | - var target = $(this).find('input[type=radio]'); | ||
| 169 | - var which = parseInt(target.val()); | ||
| 170 | - if(which == 2) $('#form-field-select-4').addClass('tag-input-style'); | ||
| 171 | - else $('#form-field-select-4').removeClass('tag-input-style'); | ||
| 172 | - }); | 130 | + //修改 |
| 131 | + function edit(Id){ | ||
| 132 | + window.top.modal.init({ | ||
| 133 | + 'title':'修改信息', | ||
| 134 | + 'url':'<%=basePath%>headmaster/goEdit.do?HEADMASTER_ID='+Id, | ||
| 135 | + func:function() { | ||
| 136 | + tosearch(); | ||
| 173 | } | 137 | } |
| 174 | - | ||
| 175 | - | ||
| 176 | - //复选框全选控制 | ||
| 177 | - var active_class = 'active'; | ||
| 178 | - $('#simple-table > thead > tr > th input[type=checkbox]').eq(0).on('click', function(){ | ||
| 179 | - var th_checked = this.checked;//checkbox inside "TH" table header | ||
| 180 | - $(this).closest('table').find('tbody > tr').each(function(){ | ||
| 181 | - var row = this; | ||
| 182 | - if(th_checked) $(row).addClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', true); | ||
| 183 | - else $(row).removeClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', false); | ||
| 184 | - }); | ||
| 185 | }); | 138 | }); |
| 186 | - }); | ||
| 187 | - | ||
| 188 | - //新增 | ||
| 189 | - function add(){ | ||
| 190 | - top.jzts(); | ||
| 191 | - var diag = new top.Dialog(); | ||
| 192 | - diag.Drag=true; | ||
| 193 | - diag.Title ="新增"; | ||
| 194 | - diag.URL = '<%=basePath%>headmaster/goAdd.do'; | ||
| 195 | - diag.Width = 450; | ||
| 196 | - diag.Height = 355; | ||
| 197 | - diag.Modal = true; //有无遮罩窗口 | ||
| 198 | - diag. ShowMaxButton = true; //最大化按钮 | ||
| 199 | - diag.ShowMinButton = true; //最小化按钮 | ||
| 200 | - diag.CancelEvent = function(){ //关闭事件 | ||
| 201 | - if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | ||
| 202 | - if('${page.currentPage}' == '0'){ | ||
| 203 | - tosearch(); | ||
| 204 | - }else{ | ||
| 205 | - tosearch(); | ||
| 206 | - } | ||
| 207 | - } | ||
| 208 | - diag.close(); | ||
| 209 | - }; | ||
| 210 | - diag.show(); | 139 | + window.top.modal.show(); |
| 211 | } | 140 | } |
| 212 | - | ||
| 213 | - //删除 | ||
| 214 | - function del(Id){ | ||
| 215 | - bootbox.confirm("确定要删除吗?", function(result) { | ||
| 216 | - if(result) { | ||
| 217 | - top.jzts(); | ||
| 218 | - var url = "<%=basePath%>headmaster/delete.do?HEADMASTER_ID="+Id+"&tm="+new Date().getTime(); | ||
| 219 | - $.get(url,function(data){ | ||
| 220 | - tosearch(); | ||
| 221 | - }); | ||
| 222 | - } | 141 | + function add(){ |
| 142 | + window.top.modal.init({ | ||
| 143 | + 'title':'添加班长', | ||
| 144 | + 'url':'<%=basePath%>headmaster/goAdd.do?school_id=${pd.SCHOOL_ID}&grade_id=${pd.GRADE_ID}', | ||
| 145 | + func:function() { | ||
| 146 | + tosearch(); | ||
| 147 | + } | ||
| 223 | }); | 148 | }); |
| 149 | + window.top.modal.show(); | ||
| 224 | } | 150 | } |
| 151 | + $(function() { | ||
| 152 | + | ||
| 153 | + | ||
| 225 | 154 | ||
| 226 | - //修改 | ||
| 227 | - function edit(Id){ | ||
| 228 | - top.jzts(); | ||
| 229 | - var diag = new top.Dialog(); | ||
| 230 | - diag.Drag=true; | ||
| 231 | - diag.Title ="编辑"; | ||
| 232 | - diag.URL = '<%=basePath%>headmaster/goEdit.do?HEADMASTER_ID='+Id; | ||
| 233 | - diag.Width = 450; | ||
| 234 | - diag.Height = 355; | ||
| 235 | - diag.Modal = true; //有无遮罩窗口 | ||
| 236 | - diag. ShowMaxButton = true; //最大化按钮 | ||
| 237 | - diag.ShowMinButton = true; //最小化按钮 | ||
| 238 | - diag.CancelEvent = function(){ //关闭事件 | ||
| 239 | - if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | ||
| 240 | - tosearch(); | ||
| 241 | - } | ||
| 242 | - diag.close(); | ||
| 243 | - }; | ||
| 244 | - diag.show(); | ||
| 245 | - } | ||
| 246 | 155 | ||
| 247 | - //批量操作 | ||
| 248 | - function makeAll(msg){ | ||
| 249 | - bootbox.confirm(msg, function(result) { | ||
| 250 | - if(result) { | ||
| 251 | - var str = ''; | ||
| 252 | - for(var i=0;i < document.getElementsByName('ids').length;i++){ | ||
| 253 | - if(document.getElementsByName('ids')[i].checked){ | ||
| 254 | - if(str=='') str += document.getElementsByName('ids')[i].value; | ||
| 255 | - else str += ',' + document.getElementsByName('ids')[i].value; | ||
| 256 | - } | ||
| 257 | - } | ||
| 258 | - if(str==''){ | ||
| 259 | - bootbox.dialog({ | ||
| 260 | - message: "<span class='bigger-110'>您没有选择任何内容!</span>", | ||
| 261 | - buttons: | ||
| 262 | - { "button":{ "label":"确定", "className":"btn-sm btn-success"}} | ||
| 263 | - }); | ||
| 264 | - $("#zcheckbox").tips({ | ||
| 265 | - side:1, | ||
| 266 | - msg:'点这里全选', | ||
| 267 | - bg:'#AE81FF', | ||
| 268 | - time:8 | ||
| 269 | - }); | ||
| 270 | - return; | ||
| 271 | - }else{ | ||
| 272 | - if(msg == '确定要删除选中的数据吗?'){ | ||
| 273 | - top.jzts(); | ||
| 274 | - $.ajax({ | ||
| 275 | - type: "POST", | ||
| 276 | - url: '<%=basePath%>headmaster/deleteAll.do?tm='+ new Date().getTime(), | ||
| 277 | - data : { | ||
| 278 | - DATA_IDS : str | ||
| 279 | - }, | ||
| 280 | - dataType : 'json', | ||
| 281 | - //beforeSend: validateData, | ||
| 282 | - cache : false, | ||
| 283 | - success : function(data) { | ||
| 284 | - $ | ||
| 285 | - .each( | ||
| 286 | - data.list, | ||
| 287 | - function( | ||
| 288 | - i, | ||
| 289 | - list) { | ||
| 290 | - tosearch(); | ||
| 291 | - }); | ||
| 292 | - } | ||
| 293 | - }); | ||
| 294 | - } | ||
| 295 | - } | ||
| 296 | - } | ||
| 297 | - }); | ||
| 298 | - }; | 156 | + }) |
| 299 | 157 | ||
| 300 | - //导出excel | ||
| 301 | - function toExcel() { | ||
| 302 | - window.location.href = '<%=basePath%>headmaster/excel.do'; | ||
| 303 | - } | ||
| 304 | </script> | 158 | </script> |
| 305 | 159 | ||
| 306 | 160 |
WebRoot/WEB-INF/jsp/sunvote/homework/homework_edit2.jsp
| @@ -192,7 +192,7 @@ | @@ -192,7 +192,7 @@ | ||
| 192 | <!--提示框--> | 192 | <!--提示框--> |
| 193 | <script type="text/javascript" src="static/js/jquery.tips.js"></script> | 193 | <script type="text/javascript" src="static/js/jquery.tips.js"></script> |
| 194 | <!--页面交互--> | 194 | <!--页面交互--> |
| 195 | - <script src="static/js/control_homework.js"></script> | 195 | + <script src="static/js/control_homework.js?t=12"></script> |
| 196 | <script> | 196 | <script> |
| 197 | $(function() { | 197 | $(function() { |
| 198 | window.top.loading.remove(); | 198 | window.top.loading.remove(); |
| @@ -205,7 +205,7 @@ | @@ -205,7 +205,7 @@ | ||
| 205 | }); | 205 | }); |
| 206 | 206 | ||
| 207 | $.ajax({ //获取该名教师下的班级信息 | 207 | $.ajax({ //获取该名教师下的班级信息 |
| 208 | - url:'<%=basePath%>/coursemanagement/teacherClass', | 208 | + url:'<%=basePath%>coursemanagement/teacherClass', |
| 209 | type:"get", | 209 | type:"get", |
| 210 | data:{teacher_id:"08b418184e5044c7b419caa830b834a7"}, | 210 | data:{teacher_id:"08b418184e5044c7b419caa830b834a7"}, |
| 211 | success:function(res){ | 211 | success:function(res){ |
| @@ -222,6 +222,19 @@ | @@ -222,6 +222,19 @@ | ||
| 222 | }); | 222 | }); |
| 223 | 223 | ||
| 224 | }); | 224 | }); |
| 225 | + | ||
| 226 | + function save_data(data){ | ||
| 227 | + $.ajax({ //获取该名教师下的班级信息 | ||
| 228 | + url:'<%=basePath%>homework/uploadHomework', | ||
| 229 | + type:"post", | ||
| 230 | + dataType:"text", | ||
| 231 | + data:{"JSON":data}, | ||
| 232 | + success:function(res){ | ||
| 233 | + alert("保存成功"); | ||
| 234 | + console.log(res); | ||
| 235 | + } | ||
| 236 | + }); | ||
| 237 | + } | ||
| 225 | </script> | 238 | </script> |
| 226 | </body> | 239 | </body> |
| 227 | </html> | 240 | </html> |
| 228 | \ No newline at end of file | 241 | \ No newline at end of file |
WebRoot/WEB-INF/jsp/sunvote/homework/homework_list.jsp
| @@ -93,8 +93,8 @@ | @@ -93,8 +93,8 @@ | ||
| 93 | <td >${var.COMPLETE_COUNT == "0" ? "未完成":"已完成"}</td> | 93 | <td >${var.COMPLETE_COUNT == "0" ? "未完成":"已完成"}</td> |
| 94 | <td >${var.ALL_SCORE}</td> | 94 | <td >${var.ALL_SCORE}</td> |
| 95 | <td> | 95 | <td> |
| 96 | - <a onclick="edit('${var.HOMEWORK_ID}');"><img src="static/images/remove.png" /></a> | ||
| 97 | - <a onclick="del('${var.HOMEWORK_ID}');"><img src="static/images/eidtor.png" /></a> | 96 | + <a onclick="edit('${var.HOMEWORK_ID}');"><img src="static/images/eidtor.png" /></a> |
| 97 | + <a onclick="del('${var.HOMEWORK_ID}');"><img src="static/images/remove.png" /></a> | ||
| 98 | </td> | 98 | </td> |
| 99 | </tr> | 99 | </tr> |
| 100 | 100 | ||
| @@ -156,17 +156,11 @@ | @@ -156,17 +156,11 @@ | ||
| 156 | window.top.loading.show(); | 156 | window.top.loading.show(); |
| 157 | } | 157 | } |
| 158 | function edit(Id){ | 158 | function edit(Id){ |
| 159 | - window.top.modal.init({ | ||
| 160 | - 'title':'布置练习', | ||
| 161 | - 'width':1200, | ||
| 162 | - 'height':600, | ||
| 163 | - 'url':'<%=basePath%>homework/goEdit2.do?school_id=${pd.SCHOOL_ID}&ID='+Id, | ||
| 164 | - func:function() { | ||
| 165 | - tosearch(); | ||
| 166 | - } | ||
| 167 | - }); | ||
| 168 | - window.top.modal.show(); | 159 | + var path = '<%=basePath%>homework/goEdit2.do?school_id=${pd.SCHOOL_ID}&ID='+Id; |
| 160 | + parent.$("#mainFrame").attr('src',path); | ||
| 161 | + window.top.loading.show(); | ||
| 169 | } | 162 | } |
| 163 | + | ||
| 170 | </script> | 164 | </script> |
| 171 | 165 | ||
| 172 | 166 |
WebRoot/static/js/control_homework.js
| @@ -309,7 +309,9 @@ | @@ -309,7 +309,9 @@ | ||
| 309 | saveData.QUESTION_COUNT=work.que_num; | 309 | saveData.QUESTION_COUNT=work.que_num; |
| 310 | saveData.QUESTIONS=QUESTIONS; | 310 | saveData.QUESTIONS=QUESTIONS; |
| 311 | 311 | ||
| 312 | - console.log(saveData); | 312 | + //console.log(saveData); |
| 313 | + save_data(JSON.stringify(saveData)); | ||
| 314 | + | ||
| 313 | 315 | ||
| 314 | } | 316 | } |
| 315 | 317 |