Commit 7d60b75e689c9194ac631a830ddec9fce9176acb
1 parent
5d2c2033
添加班级-1
Showing
11 changed files
with
682 additions
and
28 deletions
WebRoot/WEB-INF/jsp/sunvote/student/student_edit2.jsp
0 → 100644
1 | +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> | |
2 | +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> | |
3 | +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> | |
4 | +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> | |
5 | +<% | |
6 | + String path = request.getContextPath(); | |
7 | + String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; | |
8 | +%> | |
9 | +<!DOCTYPE html> | |
10 | +<html lang="en"> | |
11 | + <head> | |
12 | + <base href="<%=basePath%>"> | |
13 | + <!-- 下拉框 --> | |
14 | + <link rel="stylesheet" href="static/ace/css/chosen.css" /> | |
15 | + <!-- jsp文件头和头部 --> | |
16 | + <%@ include file="../../system/index/top.jsp"%> | |
17 | + <!-- 日期框 --> | |
18 | + <link rel="stylesheet" href="static/ace/css/datepicker.css" /> | |
19 | +</head> | |
20 | +<body class="no-skin"> | |
21 | +<!-- /section:basics/navbar.layout --> | |
22 | +<div class="main-container" id="main-container"> | |
23 | + <!-- /section:basics/sidebar --> | |
24 | + <div class="main-content"> | |
25 | + <div class="main-content-inner"> | |
26 | + <div class="page-content"> | |
27 | + <div class="row"> | |
28 | + <div class="col-xs-12"> | |
29 | + | |
30 | + <form action="student/${msg }.do" name="Form" id="Form" method="post"> | |
31 | + <input type="hidden" name="ID" id="ID" value="${pd.ID}"/> | |
32 | + <div id="zhongxin" style="padding-top: 13px;"> | |
33 | + <table id="table_report" class="table table-striped table-bordered table-hover"> | |
34 | + <tr> | |
35 | + <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> | |
37 | + </tr> | |
38 | + <tr> | |
39 | + <td style="width:75px;text-align: right;padding-top: 13px;">学籍号:</td> | |
40 | + <td><input type="text" name="SNO" id="SNO" value="${pd.SNO}" maxlength="255" placeholder="这里输入学籍号" title="学籍号" style="width:98%;"/></td> | |
41 | + </tr> | |
42 | + <tr> | |
43 | + <td style="width:75px;text-align: right;padding-top: 13px;">学号:</td> | |
44 | + <td><input type="text" name="NUMBER" id="NUMBER" value="${pd.NUMBER}" 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> | |
49 | + <%-- <input type="number" name="SEX" id="SEX" value="${pd.SEX}" maxlength="32" placeholder="这里输入性别" title="性别" style="width:98%;"/></td> --%> | |
50 | + <select class="chosen-select form-control" name="SEX" id="SEX" data-placeholder="这里输入班级类型"> | |
51 | + <option value="1" <c:if test="${pd.SEX==1}">selected="true"</c:if>>男</option> | |
52 | + <option value="0" <c:if test="${pd.SEX==0}">selected="true"</c:if>>女</option> | |
53 | + </select> | |
54 | + </td> | |
55 | + </tr> | |
56 | + <tr> | |
57 | + <td style="width:75px;text-align: right;padding-top: 13px;">组号:</td> | |
58 | + <td><input type="text" name="GROUPID" id="GROUPID" value="${pd.GROUPID}" maxlength="255" placeholder="这里输入组号" title="组号" style="width:98%;"/></td> | |
59 | + </tr> | |
60 | + <tr> | |
61 | + <td style="width:75px;text-align: right;padding-top: 13px;">签到码:</td> | |
62 | + <td><input type="text" name="SIGN_NO" id="SIGN_NO" value="${pd.SIGN_NO}" maxlength="255" placeholder="这里输入签到码" title="签到码" style="width:98%;"/></td> | |
63 | + </tr> | |
64 | + <tr> | |
65 | + <td style="width:75px;text-align: right;padding-top: 13px;">家长姓名:</td> | |
66 | + <td><input type="text" name="PARENT_NAME" id="PARENT_NAME" value="${pd.PARENT_NAME}" maxlength="255" placeholder="这里输入家长姓名" title="家长姓名" style="width:98%;"/></td> | |
67 | + </tr> | |
68 | + <tr> | |
69 | + <td style="width:75px;text-align: right;padding-top: 13px;">家长手机号:</td> | |
70 | + <td><input type="text" name="PARENT_PHONE" id="PARENT_PHONE" value="${pd.PARENT_PHONE}" maxlength="255" placeholder="这里输入家长手机号" title="家长手机号" style="width:98%;"/></td> | |
71 | + </tr> | |
72 | + <tr> | |
73 | + <td style="width:75px;text-align: right;padding-top: 13px;">键盘ID:</td> | |
74 | + <td><input type="text" name="KEYPAD_ID" id="KEYPAD_ID" value="${pd.KEYPAD_ID}" maxlength="255" placeholder="这里输入键盘ID" title="键盘ID" style="width:98%;"/></td> | |
75 | + </tr> | |
76 | + <tr> | |
77 | + <td style="width:75px;text-align: right;padding-top: 13px;">备注:</td> | |
78 | + <td><input type="text" name="REMARK" id="REMARK" value="${pd.REMARK}" maxlength="255" placeholder="这里输入备注" title="备注" style="width:98%;"/></td> | |
79 | + </tr> | |
80 | + <tr> | |
81 | + <td style="text-align: center;" colspan="10"> | |
82 | + <a class="btn btn-mini btn-primary" onclick="save();">保存</a> | |
83 | + <a class="btn btn-mini btn-danger" onclick="top.Dialog.close();">取消</a> | |
84 | + </td> | |
85 | + </tr> | |
86 | + </table> | |
87 | + </div> | |
88 | + <div id="zhongxin2" class="center" style="display:none"><br/><br/><br/><br/><br/><img src="static/images/jiazai.gif" /><br/><h4 class="lighter block green">提交中...</h4></div> | |
89 | + </form> | |
90 | + </div> | |
91 | + <!-- /.col --> | |
92 | + </div> | |
93 | + <!-- /.row --> | |
94 | + </div> | |
95 | + <!-- /.page-content --> | |
96 | + </div> | |
97 | + </div> | |
98 | + <!-- /.main-content --> | |
99 | +</div> | |
100 | +<!-- /.main-container --> | |
101 | + | |
102 | + | |
103 | + <!-- 页面底部js¨ --> | |
104 | + <%@ include file="../../system/index/foot.jsp"%> | |
105 | + <!-- 下拉框 --> | |
106 | + <script src="static/ace/js/chosen.jquery.js"></script> | |
107 | + <!-- 日期框 --> | |
108 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | |
109 | + <!--提示框--> | |
110 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | |
111 | + <script type="text/javascript"> | |
112 | + $(top.hangge()); | |
113 | + //保存 | |
114 | + function save(){ | |
115 | + if($("#NAME").val()==""){ | |
116 | + $("#NAME").tips({ | |
117 | + side:3, | |
118 | + msg:'请输入学生姓名', | |
119 | + bg:'#AE81FF', | |
120 | + time:2 | |
121 | + }); | |
122 | + $("#NAME").focus(); | |
123 | + return false; | |
124 | + } | |
125 | + if($("#SNO").val()==""){ | |
126 | + $("#SNO").tips({ | |
127 | + side:3, | |
128 | + msg:'请输入学籍号', | |
129 | + bg:'#AE81FF', | |
130 | + time:2 | |
131 | + }); | |
132 | + $("#SNO").focus(); | |
133 | + return false; | |
134 | + } | |
135 | + if($("#NUMBER").val()==""){ | |
136 | + $("#NUMBER").tips({ | |
137 | + side:3, | |
138 | + msg:'请输入学号', | |
139 | + bg:'#AE81FF', | |
140 | + time:2 | |
141 | + }); | |
142 | + $("#NUMBER").focus(); | |
143 | + return false; | |
144 | + } | |
145 | + if($("#SEX").val()==""){ | |
146 | + $("#SEX").tips({ | |
147 | + side:3, | |
148 | + msg:'请输入性别', | |
149 | + bg:'#AE81FF', | |
150 | + time:2 | |
151 | + }); | |
152 | + $("#SEX").focus(); | |
153 | + return false; | |
154 | + } | |
155 | + if($("#GROUPID").val()==""){ | |
156 | + $("#GROUPID").tips({ | |
157 | + side:3, | |
158 | + msg:'请输入组号', | |
159 | + bg:'#AE81FF', | |
160 | + time:2 | |
161 | + }); | |
162 | + $("#GROUPID").focus(); | |
163 | + return false; | |
164 | + } | |
165 | + if($("#SIGN_NO").val()==""){ | |
166 | + $("#SIGN_NO").tips({ | |
167 | + side:3, | |
168 | + msg:'请输入签到码', | |
169 | + bg:'#AE81FF', | |
170 | + time:2 | |
171 | + }); | |
172 | + $("#SIGN_NO").focus(); | |
173 | + return false; | |
174 | + } | |
175 | + if($("#PARENT_NAME").val()==""){ | |
176 | + $("#PARENT_NAME").tips({ | |
177 | + side:3, | |
178 | + msg:'请输入家长姓名', | |
179 | + bg:'#AE81FF', | |
180 | + time:2 | |
181 | + }); | |
182 | + $("#PARENT_NAME").focus(); | |
183 | + return false; | |
184 | + } | |
185 | + if($("#PARENT_PHONE").val()==""){ | |
186 | + $("#PARENT_PHONE").tips({ | |
187 | + side:3, | |
188 | + msg:'请输入家长手机号', | |
189 | + bg:'#AE81FF', | |
190 | + time:2 | |
191 | + }); | |
192 | + $("#PARENT_PHONE").focus(); | |
193 | + return false; | |
194 | + } | |
195 | + if($("#KEYPAD_ID").val()==""){ | |
196 | + $("#KEYPAD_ID").tips({ | |
197 | + side:3, | |
198 | + msg:'请输入键盘ID', | |
199 | + bg:'#AE81FF', | |
200 | + time:2 | |
201 | + }); | |
202 | + $("#KEYPAD_ID").focus(); | |
203 | + return false; | |
204 | + } | |
205 | + if($("#REMARK").val()==""){ | |
206 | + $("#REMARK").tips({ | |
207 | + side:3, | |
208 | + msg:'请输入备注', | |
209 | + bg:'#AE81FF', | |
210 | + time:2 | |
211 | + }); | |
212 | + $("#REMARK").focus(); | |
213 | + return false; | |
214 | + } | |
215 | + $("#Form").submit(); | |
216 | + $("#zhongxin").hide(); | |
217 | + $("#zhongxin2").show(); | |
218 | + } | |
219 | + | |
220 | + $(function() { | |
221 | + //日期框 | |
222 | + $('.date-picker').datepicker({autoclose: true,todayHighlight: true}); | |
223 | + }); | |
224 | + </script> | |
225 | +</body> | |
226 | +</html> | |
0 | 227 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/student/student_list2.jsp
0 → 100644
1 | +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> | |
2 | +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> | |
3 | +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> | |
4 | +<% | |
5 | + String path = request.getContextPath(); | |
6 | + String basePath = request.getScheme() + "://" | |
7 | + + request.getServerName() + ":" + request.getServerPort() | |
8 | + + path + "/"; | |
9 | +%> | |
10 | +<!DOCTYPE html> | |
11 | +<html lang="en"> | |
12 | +<head> | |
13 | +<base href="<%=basePath%>"> | |
14 | +<!-- 下拉框 --> | |
15 | +<link rel="stylesheet" href="static/ace/css/chosen.css" /> | |
16 | +<!-- jsp文件头和头部 --> | |
17 | +<%@ include file="../../system/index/top.jsp"%> | |
18 | +<!-- 日期框 --> | |
19 | +<link rel="stylesheet" href="static/ace/css/datepicker.css" /> | |
20 | +</head> | |
21 | +<body class="no-skin"> | |
22 | + | |
23 | + <!-- /section:basics/navbar.layout --> | |
24 | + <div class="main-container" id="main-container"> | |
25 | + <!-- /section:basics/sidebar --> | |
26 | + <div class="main-content"> | |
27 | + <div class="main-content-inner"> | |
28 | + <div class="page-content"> | |
29 | + <div class="row"> | |
30 | + <div class="col-xs-12"> | |
31 | + | |
32 | + <!-- 检索 --> | |
33 | + <form action="student/listcs.do" method="post" name="Form" id="Form"> | |
34 | + <table style="margin-top:5px;"> | |
35 | + <tr> | |
36 | + </tr> | |
37 | + </table> | |
38 | + <!-- 检索 --> | |
39 | + | |
40 | + <table id="simple-table" class="table table-striped table-bordered table-hover" style="margin-top:5px;"> | |
41 | + <thead> | |
42 | + <tr> | |
43 | + <th class="center" style="width:35px;"> | |
44 | + <label class="pos-rel"><input type="checkbox" class="ace" id="zcheckbox" /><span class="lbl"></span></label> | |
45 | + </th> | |
46 | + <th class="center" style="width:50px;">序号</th> | |
47 | + <th class="center">姓名</th> | |
48 | + <th class="center">性别</th> | |
49 | + <th class="center">组号</th> | |
50 | + <th class="center">签到码</th> | |
51 | + <th class="center">键盘ID</th> | |
52 | + <th class="center">操作</th> | |
53 | + </tr> | |
54 | + </thead> | |
55 | + | |
56 | + <tbody> | |
57 | + <!-- 开始循环 --> | |
58 | + <c:choose> | |
59 | + <c:when test="${not empty varList}"> | |
60 | + <c:forEach items="${varList}" var="var" varStatus="vs"> | |
61 | + <tr> | |
62 | + <td class='center'> | |
63 | + <label class="pos-rel"><input type='checkbox' name='ids' value="${var.ID}" class="ace" /><span class="lbl"></span></label> | |
64 | + </td> | |
65 | + <td class='center' style="width: 30px;">${vs.index+1}</td> | |
66 | + <td class='center'>${var.NAME}</td> | |
67 | + <td class='center'>${var.SEX == 1 ? "男":"女"}</td> | |
68 | + <td class='center'>${var.GROUPID}</td> | |
69 | + <td class='center'>${var.SIGN_NO}</td> | |
70 | + <td class='center'>${var.KEYPAD_ID}</td> | |
71 | + <td class="center"> | |
72 | + <div> | |
73 | + <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${var.ID}');"> | |
74 | + <i class="ace-icon fa fa-pencil-square-o bigger-120" title="编辑"></i> | |
75 | + </a> | |
76 | + <a class="btn btn-xs btn-danger" onclick="del('${var.ID}');"> | |
77 | + <i class="ace-icon fa fa-trash-o bigger-120" title="删除"></i> | |
78 | + </a> | |
79 | + </div> | |
80 | + </td> | |
81 | + </tr> | |
82 | + | |
83 | + </c:forEach> | |
84 | + <c:if test="${QX.cha == 0 }"> | |
85 | + <tr> | |
86 | + <td colspan="100" class="center">您无权查看</td> | |
87 | + </tr> | |
88 | + </c:if> | |
89 | + </c:when> | |
90 | + <c:otherwise> | |
91 | + <tr class="main_info"> | |
92 | + <td colspan="100" class="center" >没有相关数据</td> | |
93 | + </tr> | |
94 | + </c:otherwise> | |
95 | + </c:choose> | |
96 | + </tbody> | |
97 | + </table> | |
98 | + <div class="page-header position-relative"> | |
99 | + <table style="width:100%;"> | |
100 | + <tr> | |
101 | + <td style="vertical-align:top;"> | |
102 | + <a class="btn btn-mini btn-success" onclick="add();">新增</a> | |
103 | + <a class="btn btn-mini btn-danger" onclick="makeAll('确定要删除选中的数据吗?');" title="批量删除" ><i class='ace-icon fa fa-trash-o bigger-120'></i></a> | |
104 | + </td> | |
105 | + <td style="vertical-align:top;"><div class="pagination" style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div></td> | |
106 | + </tr> | |
107 | + </table> | |
108 | + </div> | |
109 | + </form> | |
110 | + | |
111 | + </div> | |
112 | + <!-- /.col --> | |
113 | + </div> | |
114 | + <!-- /.row --> | |
115 | + </div> | |
116 | + <!-- /.page-content --> | |
117 | + </div> | |
118 | + </div> | |
119 | + <!-- /.main-content --> | |
120 | + | |
121 | + <!-- 返回顶部 --> | |
122 | + <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse"> | |
123 | + <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i> | |
124 | + </a> | |
125 | + | |
126 | + </div> | |
127 | + <!-- /.main-container --> | |
128 | + | |
129 | + <!-- basic scripts --> | |
130 | + <!-- 页面底部js¨ --> | |
131 | + <%@ include file="../../system/index/foot.jsp"%> | |
132 | + <!-- 删除时确认窗口 --> | |
133 | + <script src="static/ace/js/bootbox.js"></script> | |
134 | + <!-- ace scripts --> | |
135 | + <script src="static/ace/js/ace/ace.js"></script> | |
136 | + <!-- 下拉框 --> | |
137 | + <script src="static/ace/js/chosen.jquery.js"></script> | |
138 | + <!-- 日期框 --> | |
139 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | |
140 | + <!--提示框--> | |
141 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | |
142 | + <script type="text/javascript"> | |
143 | + $(top.hangge());//关闭加载状态 | |
144 | + //检索 | |
145 | + function tosearch(){ | |
146 | + top.jzts(); | |
147 | + $("#Form").submit(); | |
148 | + } | |
149 | + $(function() { | |
150 | + | |
151 | + //日期框 | |
152 | + $('.date-picker').datepicker({ | |
153 | + autoclose: true, | |
154 | + todayHighlight: true | |
155 | + }); | |
156 | + | |
157 | + //下拉框 | |
158 | + if(!ace.vars['touch']) { | |
159 | + $('.chosen-select').chosen({allow_single_deselect:true}); | |
160 | + $(window) | |
161 | + .off('resize.chosen') | |
162 | + .on('resize.chosen', function() { | |
163 | + $('.chosen-select').each(function() { | |
164 | + var $this = $(this); | |
165 | + $this.next().css({'width': $this.parent().width()}); | |
166 | + }); | |
167 | + }).trigger('resize.chosen'); | |
168 | + $(document).on('settings.ace.chosen', function(e, event_name, event_val) { | |
169 | + if(event_name != 'sidebar_collapsed') return; | |
170 | + $('.chosen-select').each(function() { | |
171 | + var $this = $(this); | |
172 | + $this.next().css({'width': $this.parent().width()}); | |
173 | + }); | |
174 | + }); | |
175 | + $('#chosen-multiple-style .btn').on('click', function(e){ | |
176 | + var target = $(this).find('input[type=radio]'); | |
177 | + var which = parseInt(target.val()); | |
178 | + if(which == 2) $('#form-field-select-4').addClass('tag-input-style'); | |
179 | + else $('#form-field-select-4').removeClass('tag-input-style'); | |
180 | + }); | |
181 | + } | |
182 | + | |
183 | + | |
184 | + //复选框全选控制 | |
185 | + var active_class = 'active'; | |
186 | + $('#simple-table > thead > tr > th input[type=checkbox]').eq(0).on('click', function(){ | |
187 | + var th_checked = this.checked;//checkbox inside "TH" table header | |
188 | + $(this).closest('table').find('tbody > tr').each(function(){ | |
189 | + var row = this; | |
190 | + if(th_checked) $(row).addClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', true); | |
191 | + else $(row).removeClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', false); | |
192 | + }); | |
193 | + }); | |
194 | + }); | |
195 | + | |
196 | + //新增 | |
197 | + function add(){ | |
198 | + top.jzts(); | |
199 | + var diag = new top.Dialog(); | |
200 | + diag.Drag=true; | |
201 | + diag.Title ="新增"; | |
202 | + diag.URL = '<%=basePath%>student/goAdd2.do?class_id=${pd.CLASS_ID}&term_id=${pd.TERM_ID}'; | |
203 | + diag.Width = 450; | |
204 | + diag.Height = 355; | |
205 | + diag.Modal = true; //有无遮罩窗口 | |
206 | + diag. ShowMaxButton = true; //最大化按钮 | |
207 | + diag.ShowMinButton = true; //最小化按钮 | |
208 | + diag.CancelEvent = function(){ //关闭事件 | |
209 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | |
210 | + if('${page.currentPage}' == '0'){ | |
211 | + tosearch(); | |
212 | + }else{ | |
213 | + tosearch(); | |
214 | + } | |
215 | + } | |
216 | + diag.close(); | |
217 | + }; | |
218 | + diag.show(); | |
219 | + } | |
220 | + | |
221 | + //删除 | |
222 | + function del(Id){ | |
223 | + bootbox.confirm("确定要删除吗?", function(result) { | |
224 | + if(result) { | |
225 | + top.jzts(); | |
226 | + var url = "<%=basePath%>student/delete.do?ID="+Id+"&tm="+new Date().getTime(); | |
227 | + $.get(url,function(data){ | |
228 | + tosearch(); | |
229 | + }); | |
230 | + } | |
231 | + }); | |
232 | + } | |
233 | + | |
234 | + //修改 | |
235 | + function edit(Id){ | |
236 | + top.jzts(); | |
237 | + var diag = new top.Dialog(); | |
238 | + diag.Drag=true; | |
239 | + diag.Title ="编辑"; | |
240 | + diag.URL = '<%=basePath%>student/goEdit2.do?ID='+Id; | |
241 | + diag.Width = 450; | |
242 | + diag.Height = 355; | |
243 | + diag.Modal = true; //有无遮罩窗口 | |
244 | + diag. ShowMaxButton = true; //最大化按钮 | |
245 | + diag.ShowMinButton = true; //最小化按钮 | |
246 | + diag.CancelEvent = function(){ //关闭事件 | |
247 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | |
248 | + tosearch(); | |
249 | + } | |
250 | + diag.close(); | |
251 | + }; | |
252 | + diag.show(); | |
253 | + } | |
254 | + | |
255 | + //批量操作 | |
256 | + function makeAll(msg){ | |
257 | + bootbox.confirm(msg, function(result) { | |
258 | + if(result) { | |
259 | + var str = ''; | |
260 | + for(var i=0;i < document.getElementsByName('ids').length;i++){ | |
261 | + if(document.getElementsByName('ids')[i].checked){ | |
262 | + if(str=='') str += document.getElementsByName('ids')[i].value; | |
263 | + else str += ',' + document.getElementsByName('ids')[i].value; | |
264 | + } | |
265 | + } | |
266 | + if(str==''){ | |
267 | + bootbox.dialog({ | |
268 | + message: "<span class='bigger-110'>您没有选择任何内容!</span>", | |
269 | + buttons: | |
270 | + { "button":{ "label":"确定", "className":"btn-sm btn-success"}} | |
271 | + }); | |
272 | + $("#zcheckbox").tips({ | |
273 | + side:1, | |
274 | + msg:'点这里全选', | |
275 | + bg:'#AE81FF', | |
276 | + time:8 | |
277 | + }); | |
278 | + return; | |
279 | + }else{ | |
280 | + if(msg == '确定要删除选中的数据吗?'){ | |
281 | + top.jzts(); | |
282 | + $.ajax({ | |
283 | + type: "POST", | |
284 | + url: '<%=basePath%>student/deleteAll.do?tm='+new Date().getTime(), | |
285 | + data: {DATA_IDS:str}, | |
286 | + dataType:'json', | |
287 | + //beforeSend: validateData, | |
288 | + cache: false, | |
289 | + success: function(data){ | |
290 | + $.each(data.list, function(i, list){ | |
291 | + tosearch(); | |
292 | + }); | |
293 | + } | |
294 | + }); | |
295 | + } | |
296 | + } | |
297 | + } | |
298 | + }); | |
299 | + }; | |
300 | + | |
301 | + //导出excel | |
302 | + function toExcel(){ | |
303 | + window.location.href='<%=basePath%>student/excel.do'; | |
304 | + } | |
305 | + </script> | |
306 | + | |
307 | + | |
308 | +</body> | |
309 | +</html> | |
0 | 310 | \ No newline at end of file | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/teacher/creat_question.jsp
... | ... | @@ -78,7 +78,7 @@ |
78 | 78 | <div class="form-group"> |
79 | 79 | <label for="inputEmail3" class="col-sm-2 control-label">试题答案</label> |
80 | 80 | <div class="col-sm-10"> |
81 | - <input type="text" class="form-control" id="answer" placeholder="输入题目答案,以分号隔开"> | |
81 | + <input type="text" class="form-control" id="answer" placeholder="输入题目答案"> | |
82 | 82 | </div> |
83 | 83 | <div class="clearfix"></div> |
84 | 84 | </div> | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/teacher/teacher_main.jsp
... | ... | @@ -93,8 +93,8 @@ |
93 | 93 | </div> |
94 | 94 | </div> |
95 | 95 | <c:forEach items="${pd.TEACHER}" var="var" varStatus="vs"> |
96 | - <div class="class"> | |
97 | - <p><a href="javascript:;">${var.GRADE_NAME}${var.SUBJECT_NAME} <span>${var.CLASS_NAME}</span></a></p> | |
96 | + <div class="class" onclick="javascript:chooseClass(${var.CLASS_ID},${var.TERM_ID});"> | |
97 | + <p id="classStudent"><a href="javascript:;">${var.GRADE_NAME}${var.SUBJECT_NAME} <span>${var.CLASS_NAME}</span></a></p> | |
98 | 98 | </div> |
99 | 99 | </c:forEach> |
100 | 100 | <div class="test">测验</div> |
... | ... | @@ -207,6 +207,10 @@ |
207 | 207 | $(".test").click(function(){ |
208 | 208 | $(".content_r").html('<iframe name="mainFrame" id="mainFrame" frameborder="0" src="paper/list2.do?" style="width:100%;height:'+$(".content_l").height()+'px;"></iframe>'); |
209 | 209 | }) |
210 | + | |
211 | + function chooseClass(classID,termID){ | |
212 | + $(".content_r").html('<iframe name="mainFrame" id="mainFrame" frameborder="0" src="student/listcs.do?class_id="' + classID + '&term_id=' + termID + ' style="width:100%;height:'+$(".content_l").height()+'px;"></iframe>'); | |
213 | + } | |
210 | 214 | $(".analysis").click(function(){ |
211 | 215 | $(".content_r").html('<img src="static/images/analysis.png" width="100%" />'); |
212 | 216 | }) | ... | ... |
resources/mybatis1/api/V1Mapper.xml
... | ... | @@ -133,7 +133,8 @@ |
133 | 133 | sv_subject.CNAME AS SUBJECT_NAME, |
134 | 134 | sv_subject.ID AS SUBJECT_ID, |
135 | 135 | sv_school.`NAME` as SCHOOL_NAME, |
136 | - sv_school.ID AS SCHOOL_ID | |
136 | + sv_school.ID AS SCHOOL_ID, | |
137 | + term.TERM_ID | |
137 | 138 | FROM |
138 | 139 | sv_coursemanagement AS couse |
139 | 140 | LEFT JOIN sv_term AS term ON couse.TERM_ID = term.TERM_ID | ... | ... |
resources/mybatis1/sunvote/StudentMapper.xml
... | ... | @@ -41,29 +41,9 @@ |
41 | 41 | <insert id="save" parameterType="pd"> |
42 | 42 | insert into |
43 | 43 | <include refid="tableName"></include> |
44 | - ( | |
45 | - NAME, | |
46 | - SNO, | |
47 | - NUMBER, | |
48 | - SEX, | |
49 | - GROUPID, | |
50 | - SIGN_NO, | |
51 | - PARENT_NAME, | |
52 | - PARENT_PHONE, | |
53 | - KEYPAD_ID, | |
54 | - REMARK | |
55 | - ) values ( | |
56 | - #{NAME}, | |
57 | - #{SNO}, | |
58 | - #{NUMBER}, | |
59 | - #{SEX}, | |
60 | - #{GROUPID}, | |
61 | - #{SIGN_NO}, | |
62 | - #{PARENT_NAME}, | |
63 | - #{PARENT_PHONE}, | |
64 | - #{KEYPAD_ID}, | |
65 | - #{REMARK} | |
66 | - ) | |
44 | + (<include refid="Field"></include>) | |
45 | + values | |
46 | + (<include refid="FieldValue"></include>) | |
67 | 47 | </insert> |
68 | 48 | |
69 | 49 | <!-- 删除--> |
... | ... | @@ -123,6 +103,33 @@ |
123 | 103 | </if> |
124 | 104 | </select> |
125 | 105 | |
106 | + <!-- 列表 --> | |
107 | + <select id="dataclasslistPage" parameterType="page" resultType="pd"> | |
108 | + SELECT | |
109 | + sv_student.`NAME`, | |
110 | + sv_student.SNO, | |
111 | + sv_student.NUMBER, | |
112 | + sv_student.SEX, | |
113 | + sv_student.GROUPID, | |
114 | + sv_student.SIGN_NO, | |
115 | + sv_student.PARENT_NAME, | |
116 | + sv_student.PARENT_PHONE, | |
117 | + sv_student.KEYPAD_ID, | |
118 | + sv_student.REMARK, | |
119 | + sv_student.ID | |
120 | + FROM | |
121 | + sv_student | |
122 | + LEFT JOIN sv_classroster cr ON sv_student.ID = cr.STUDENT_ID | |
123 | + LEFT JOIN sv_term ON cr.TEAMID = sv_term.TERM_ID | |
124 | + WHERE | |
125 | + 1 = 1 | |
126 | + AND sv_term.START_DATE < NOW() | |
127 | + AND sv_term.END_DATE > NOW() | |
128 | + <if test="pd.CLASS_ID!= null and pd.CLASS_ID != ''"><!-- 关键词检索 --> | |
129 | + AND cr.SCLASS_ID = #{pd.CLASS_ID} | |
130 | + </if> | |
131 | + </select> | |
132 | + | |
126 | 133 | <!-- 列表(全部) --> |
127 | 134 | <select id="listAll" parameterType="pd" resultType="pd"> |
128 | 135 | select | ... | ... |
src/com/fh/controller/sunvote/student/StudentController.java
... | ... | @@ -8,7 +8,9 @@ import java.util.Date; |
8 | 8 | import java.util.HashMap; |
9 | 9 | import java.util.List; |
10 | 10 | import java.util.Map; |
11 | + | |
11 | 12 | import javax.annotation.Resource; |
13 | + | |
12 | 14 | import org.springframework.beans.propertyeditors.CustomDateEditor; |
13 | 15 | import org.springframework.stereotype.Controller; |
14 | 16 | import org.springframework.web.bind.WebDataBinder; |
... | ... | @@ -16,6 +18,7 @@ import org.springframework.web.bind.annotation.InitBinder; |
16 | 18 | import org.springframework.web.bind.annotation.RequestMapping; |
17 | 19 | import org.springframework.web.bind.annotation.ResponseBody; |
18 | 20 | import org.springframework.web.servlet.ModelAndView; |
21 | + | |
19 | 22 | import com.fh.controller.base.BaseController; |
20 | 23 | import com.fh.entity.Page; |
21 | 24 | import com.fh.util.AppUtil; |
... | ... | @@ -23,6 +26,7 @@ import com.fh.util.ObjectExcelView; |
23 | 26 | import com.fh.util.PageData; |
24 | 27 | import com.fh.util.Jurisdiction; |
25 | 28 | import com.fh.util.Tools; |
29 | +import com.fh.service.sunvote.classroster.ClassRosterManager; | |
26 | 30 | import com.fh.service.sunvote.student.StudentManager; |
27 | 31 | |
28 | 32 | /** |
... | ... | @@ -38,6 +42,9 @@ public class StudentController extends BaseController { |
38 | 42 | @Resource(name="studentService") |
39 | 43 | private StudentManager studentService; |
40 | 44 | |
45 | + @Resource(name="classrosterService") | |
46 | + private ClassRosterManager classrosterService; | |
47 | + | |
41 | 48 | /**保存 |
42 | 49 | * @param |
43 | 50 | * @throws Exception |
... | ... | @@ -55,6 +62,36 @@ public class StudentController extends BaseController { |
55 | 62 | return mv; |
56 | 63 | } |
57 | 64 | |
65 | + /**保存 | |
66 | + * @param | |
67 | + * @throws Exception | |
68 | + */ | |
69 | + @RequestMapping(value="/save2") | |
70 | + public ModelAndView save2() throws Exception{ | |
71 | + logBefore(logger, Jurisdiction.getUsername()+"新增Student"); | |
72 | + if(!Jurisdiction.buttonJurisdiction(menuUrl, "add")){return null;} //校验权限 | |
73 | + ModelAndView mv = this.getModelAndView(); | |
74 | + PageData pd = new PageData(); | |
75 | + String studentID = this.get32UUID(); | |
76 | + pd.put("ID", studentID); | |
77 | + pd = this.getPageData(); | |
78 | + studentService.save(pd); | |
79 | + | |
80 | + String termID = pd.getString("TERM_ID"); | |
81 | + String classID = pd.getString("CLASS_ID"); | |
82 | + pd.put("CLASSROSTER_ID", get32UUID()); | |
83 | + pd.put("STUDENT_ID", studentID); | |
84 | + pd.put("TERM_ID", termID); | |
85 | + pd.put("SCLASS_ID", classID); | |
86 | + classrosterService.save(pd); | |
87 | + | |
88 | + | |
89 | + | |
90 | + mv.addObject("msg","success"); | |
91 | + mv.setViewName("save_result"); | |
92 | + return mv; | |
93 | + } | |
94 | + | |
58 | 95 | /**删除 |
59 | 96 | * @param out |
60 | 97 | * @throws Exception |
... | ... | @@ -111,6 +148,26 @@ public class StudentController extends BaseController { |
111 | 148 | return mv; |
112 | 149 | } |
113 | 150 | |
151 | + /**列表 | |
152 | + * @param page | |
153 | + * @throws Exception | |
154 | + */ | |
155 | + @RequestMapping(value="/listcs") | |
156 | + public ModelAndView listClassStudent(Page page) throws Exception{ | |
157 | + logBefore(logger, Jurisdiction.getUsername()+"列表Student"); | |
158 | + //if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} //校验权限(无权查看时页面会有提示,如果不注释掉这句代码就无法进入列表页面,所以根据情况是否加入本句代码) | |
159 | + ModelAndView mv = this.getModelAndView(); | |
160 | + PageData pd = new PageData(); | |
161 | + pd = this.getPageData(); | |
162 | + page.setPd(pd); | |
163 | + List<PageData> varList = studentService.datalistclassPage(page); //列出Student列表 | |
164 | + mv.setViewName("sunvote/student/student_list2"); | |
165 | + mv.addObject("varList", varList); | |
166 | + mv.addObject("pd", pd); | |
167 | + mv.addObject("QX",Jurisdiction.getHC()); //按钮权限 | |
168 | + return mv; | |
169 | + } | |
170 | + | |
114 | 171 | /**去新增页面 |
115 | 172 | * @param |
116 | 173 | * @throws Exception |
... | ... | @@ -126,6 +183,21 @@ public class StudentController extends BaseController { |
126 | 183 | return mv; |
127 | 184 | } |
128 | 185 | |
186 | + /**去新增页面 | |
187 | + * @param | |
188 | + * @throws Exception | |
189 | + */ | |
190 | + @RequestMapping(value="/goAdd2") | |
191 | + public ModelAndView goAdd2()throws Exception{ | |
192 | + ModelAndView mv = this.getModelAndView(); | |
193 | + PageData pd = new PageData(); | |
194 | + pd = this.getPageData(); | |
195 | + mv.setViewName("sunvote/student/student_edit"); | |
196 | + mv.addObject("msg", "save2"); | |
197 | + mv.addObject("pd", pd); | |
198 | + return mv; | |
199 | + } | |
200 | + | |
129 | 201 | /**去修改页面 |
130 | 202 | * @param |
131 | 203 | * @throws Exception |
... | ... | @@ -133,10 +205,26 @@ public class StudentController extends BaseController { |
133 | 205 | @RequestMapping(value="/goEdit") |
134 | 206 | public ModelAndView goEdit()throws Exception{ |
135 | 207 | ModelAndView mv = this.getModelAndView(); |
208 | + PageData pd = this.getPageData(); | |
209 | + pd = studentService.findById(pd); //根据ID读取 | |
210 | + mv.setViewName("sunvote/student/student_edit"); | |
211 | + mv.addObject("msg", "edit"); | |
212 | + mv.addObject("pd", pd); | |
213 | + return mv; | |
214 | + } | |
215 | + /**去修改页面 | |
216 | + * @param | |
217 | + * @throws Exception | |
218 | + */ | |
219 | + @RequestMapping(value="/goEdit2") | |
220 | + public ModelAndView goEdit2()throws Exception{ | |
221 | + ModelAndView mv = this.getModelAndView(); | |
136 | 222 | PageData pd = new PageData(); |
137 | 223 | pd = this.getPageData(); |
224 | + String classID = pd.getString("CLASS_ID"); | |
138 | 225 | pd = studentService.findById(pd); //根据ID读取 |
139 | - mv.setViewName("sunvote/student/student_edit"); | |
226 | + pd.put("CLASS_ID", classID); | |
227 | + mv.setViewName("sunvote/student/student_edit2"); | |
140 | 228 | mv.addObject("msg", "edit"); |
141 | 229 | mv.addObject("pd", pd); |
142 | 230 | return mv; | ... | ... |
src/com/fh/controller/system/login/LoginController.java
... | ... | @@ -238,6 +238,8 @@ public class LoginController extends BaseController { |
238 | 238 | sData.get("SUBJECT_ID")); |
239 | 239 | session.setAttribute(USERNAME + Const.SUBJECT_NAME, |
240 | 240 | sData.get("SUBJECT_NAME")); |
241 | + session.setAttribute(USERNAME + Const.TERM_ID, | |
242 | + sData.get("TERM_ID")); | |
241 | 243 | } |
242 | 244 | mv.setViewName("sunvote/teacher/teacher_main"); |
243 | 245 | } | ... | ... |
src/com/fh/service/sunvote/student/StudentManager.java
1 | 1 | package com.fh.service.sunvote.student; |
2 | 2 | |
3 | 3 | import java.util.List; |
4 | + | |
4 | 5 | import com.fh.entity.Page; |
5 | 6 | import com.fh.util.PageData; |
6 | 7 | |
... | ... | @@ -36,6 +37,12 @@ public interface StudentManager{ |
36 | 37 | */ |
37 | 38 | public List<PageData> list(Page page)throws Exception; |
38 | 39 | |
40 | + /**列表 | |
41 | + * @param page | |
42 | + * @throws Exception | |
43 | + */ | |
44 | + public List<PageData> datalistclassPage(Page page)throws Exception; | |
45 | + | |
39 | 46 | /**列表(全部) |
40 | 47 | * @param pd |
41 | 48 | * @throws Exception | ... | ... |
src/com/fh/service/sunvote/student/impl/StudentService.java
... | ... | @@ -53,6 +53,15 @@ public class StudentService implements StudentManager{ |
53 | 53 | return (List<PageData>)dao.findForList("StudentMapper.datalistPage", page); |
54 | 54 | } |
55 | 55 | |
56 | + /**列表 | |
57 | + * @param page | |
58 | + * @throws Exception | |
59 | + */ | |
60 | + @SuppressWarnings("unchecked") | |
61 | + public List<PageData> datalistclassPage(Page page)throws Exception{ | |
62 | + return (List<PageData>)dao.findForList("StudentMapper.dataclasslistPage", page); | |
63 | + } | |
64 | + | |
56 | 65 | /**列表(全部) |
57 | 66 | * @param pd |
58 | 67 | * @throws Exception | ... | ... |
src/com/fh/util/Const.java
... | ... | @@ -25,6 +25,7 @@ public class Const { |
25 | 25 | public static final String CLASS_NAME = "CLASS_NAME"; |
26 | 26 | public static final String SUBJECT_ID = "SUBJECT_ID"; |
27 | 27 | public static final String SUBJECT_NAME = "SUBJECT_NAME"; |
28 | + public static final String TERM_ID = "TERM_ID"; | |
28 | 29 | |
29 | 30 | public static final String FALSE = "F"; |
30 | 31 | public static final String LOGIN = "/login_toLogin.do"; //登录地址 | ... | ... |