Commit b64ef269ba3682f3626090114f6d01c6dad71642
1 parent
6b3a5ad0
修改管理员界面
Showing
1 changed file
with
385 additions
and
0 deletions
WebRoot/WEB-INF/jsp/sunvote/sclass/sclass_list.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="myelfun" uri="/WEB-INF/tld/elfun.tld"%> | |
5 | + | |
6 | +<% | |
7 | + String path = request.getContextPath(); | |
8 | + String basePath = request.getScheme() + "://" | |
9 | + + request.getServerName() + ":" + request.getServerPort() | |
10 | + + path + "/"; | |
11 | +%> | |
12 | +<!DOCTYPE html> | |
13 | +<html lang="en"> | |
14 | +<head> | |
15 | +<base href="<%=basePath%>"> | |
16 | +<!-- 下拉框 --> | |
17 | +<link rel="stylesheet" href="static/ace/css/chosen.css" /> | |
18 | +<!-- jsp文件头和头部 --> | |
19 | +<%@ include file="../../system/index/top.jsp"%> | |
20 | +<!-- 日期框 --> | |
21 | +<link rel="stylesheet" href="static/ace/css/datepicker.css" /> | |
22 | +</head> | |
23 | +<body class="no-skin"> | |
24 | + | |
25 | + <!-- /section:basics/navbar.layout --> | |
26 | + <div class="main-container" id="main-container"> | |
27 | + <!-- /section:basics/sidebar --> | |
28 | + <div class="main-content"> | |
29 | + <div class="main-content-inner"> | |
30 | + <div class="page-content"> | |
31 | + <div class="row"> | |
32 | + <div class="col-xs-12"> | |
33 | + | |
34 | + <!-- 检索 --> | |
35 | + <form action="sclass/list.do" method="post" name="Form" id="Form"> | |
36 | + <table style="margin-top:5px;"> | |
37 | + <tr> | |
38 | + <td style="vertical-align:top;padding-left:2px;"> | |
39 | + <select class="chosen-select form-control" name="SCHOOL_ID" id="SCHOOL_ID" data-placeholder="请选择" style="vertical-align:top;width: 120px;"> | |
40 | + <option value=""></option> | |
41 | + <option value="">全部</option> | |
42 | + <c:forEach var="item" items="${schools}"> | |
43 | + <option value="${item.ID}" >${item.NAME}</option> | |
44 | + </c:forEach> | |
45 | + </select> | |
46 | + </td> | |
47 | + <td style="vertical-align:top;padding-left:2px;"> | |
48 | + <select class="chosen-select form-control" name="GRADE_ID" id="GRADE_ID" data-placeholder="请选择" style="vertical-align:top;width: 120px;"> | |
49 | + <option value=""></option> | |
50 | + <option value="">全部</option> | |
51 | + <c:forEach var="item" items="${grades}"> | |
52 | + <option value="${item.ID}">${item.NAME}</option> | |
53 | + </c:forEach> | |
54 | + </select> | |
55 | + </td> | |
56 | + <td style="vertical-align:top;padding-left:2px;"> | |
57 | + <select class="chosen-select form-control" name="CLASS_TYPE" id="CLASS_TYPE" data-placeholder="请选择" style="vertical-align:top;width: 120px;"> | |
58 | + <option value=""></option> | |
59 | + <option value="">全部</option> | |
60 | + <c:forEach var="item" items="${classTypes}"> | |
61 | + <option value="${item.ID}">${item.NAME}</option> | |
62 | + </c:forEach> | |
63 | + </select> | |
64 | + </td> | |
65 | + <c:if test="${QX.cha == 1 }"> | |
66 | + <td style="vertical-align:top;padding-left:2px"><a class="btn btn-light btn-xs" onclick="tosearch();" title="检索"><i id="nav-search-icon" class="ace-icon fa fa-search bigger-110 nav-search-icon blue"></i></a></td> | |
67 | + </c:if> | |
68 | + <c:if test="${QX.toExcel == 1 }"><td style="vertical-align:top;padding-left:2px;"><a class="btn btn-light btn-xs" onclick="toExcel();" title="导出到EXCEL"><i id="nav-search-icon" class="ace-icon fa fa-download bigger-110 nav-search-icon blue"></i></a></td></c:if> | |
69 | + </tr> | |
70 | + </table> | |
71 | + <!-- 检索 --> | |
72 | + | |
73 | + <table id="simple-table" class="table table-striped table-bordered table-hover" style="margin-top:5px;"> | |
74 | + <thead> | |
75 | + <tr> | |
76 | + <th class="center" style="width:35px;"> | |
77 | + <label class="pos-rel"><input type="checkbox" class="ace" id="zcheckbox" /><span class="lbl"></span></label> | |
78 | + </th> | |
79 | + <th class="center" style="width:50px;">序号</th> | |
80 | + <th class="center">所属学校</th> | |
81 | + <th class="center">所属年级</th> | |
82 | + <th class="center">班级类型</th> | |
83 | + <th class="center">班级名称</th> | |
84 | + <th class="center">班级编码</th> | |
85 | + <th class="center">班级基站</th> | |
86 | + <th class="center">操作</th> | |
87 | + </tr> | |
88 | + </thead> | |
89 | + | |
90 | + <tbody> | |
91 | + <!-- 开始循环 --> | |
92 | + <c:choose> | |
93 | + <c:when test="${not empty varList}"> | |
94 | + <c:if test="${QX.cha == 1 }"> | |
95 | + <c:forEach items="${varList}" var="var" varStatus="vs"> | |
96 | + <tr> | |
97 | + <td class='center'> | |
98 | + <label class="pos-rel"><input type='checkbox' name='ids' value="${var.ID}" class="ace" /><span class="lbl"></span></label> | |
99 | + </td> | |
100 | + <td class='center' style="width: 30px;">${vs.index+1}</td> | |
101 | + <td class='center'>${myelfun:findSchoolName(var.SCHOOL_ID)}</td> | |
102 | + <td class='center'>${myelfun:findGradeName(var.GRADE_ID)}</td> | |
103 | + <td class='center'>${myelfun:findClassTypeName(var.CLASS_TYPE)}</td> | |
104 | + <td class='center'>${var.CLASS_NAME}</td> | |
105 | + <td class='center'>${var.CLASS_CODE}</td> | |
106 | + <td class='center'>${myelfun:findBasestationName(var.BASESTATION_ID)}</td> | |
107 | + <td class="center"> | |
108 | + <c:if test="${QX.edit != 1 && QX.del != 1 }"> | |
109 | + <span class="label label-large label-grey arrowed-in-right arrowed-in"><i class="ace-icon fa fa-lock" title="无权限"></i></span> | |
110 | + </c:if> | |
111 | + <div class="hidden-sm hidden-xs btn-group"> | |
112 | + <c:if test="${QX.edit == 1 }"> | |
113 | + <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${var.ID}');"> | |
114 | + <i class="ace-icon fa fa-pencil-square-o bigger-120" title="编辑"></i> | |
115 | + </a> | |
116 | + </c:if> | |
117 | + <c:if test="${QX.del == 1 }"> | |
118 | + <a class="btn btn-xs btn-danger" onclick="del('${var.ID}');"> | |
119 | + <i class="ace-icon fa fa-trash-o bigger-120" title="删除"></i> | |
120 | + </a> | |
121 | + </c:if> | |
122 | + </div> | |
123 | + <div class="hidden-md hidden-lg"> | |
124 | + <div class="inline pos-rel"> | |
125 | + <button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown" data-position="auto"> | |
126 | + <i class="ace-icon fa fa-cog icon-only bigger-110"></i> | |
127 | + </button> | |
128 | + | |
129 | + <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close"> | |
130 | + <c:if test="${QX.edit == 1 }"> | |
131 | + <li> | |
132 | + <a style="cursor:pointer;" onclick="edit('${var.ID}');" class="tooltip-success" data-rel="tooltip" title="修改"> | |
133 | + <span class="green"> | |
134 | + <i class="ace-icon fa fa-pencil-square-o bigger-120"></i> | |
135 | + </span> | |
136 | + </a> | |
137 | + </li> | |
138 | + </c:if> | |
139 | + <c:if test="${QX.del == 1 }"> | |
140 | + <li> | |
141 | + <a style="cursor:pointer;" onclick="del('${var.ID}');" class="tooltip-error" data-rel="tooltip" title="删除"> | |
142 | + <span class="red"> | |
143 | + <i class="ace-icon fa fa-trash-o bigger-120"></i> | |
144 | + </span> | |
145 | + </a> | |
146 | + </li> | |
147 | + </c:if> | |
148 | + </ul> | |
149 | + </div> | |
150 | + </div> | |
151 | + </td> | |
152 | + </tr> | |
153 | + | |
154 | + </c:forEach> | |
155 | + </c:if> | |
156 | + <c:if test="${QX.cha == 0 }"> | |
157 | + <tr> | |
158 | + <td colspan="100" class="center">您无权查看</td> | |
159 | + </tr> | |
160 | + </c:if> | |
161 | + </c:when> | |
162 | + <c:otherwise> | |
163 | + <tr class="main_info"> | |
164 | + <td colspan="100" class="center" >没有相关数据</td> | |
165 | + </tr> | |
166 | + </c:otherwise> | |
167 | + </c:choose> | |
168 | + </tbody> | |
169 | + </table> | |
170 | + <div class="page-header position-relative"> | |
171 | + <table style="width:100%;"> | |
172 | + <tr> | |
173 | + <td style="vertical-align:top;"> | |
174 | + <c:if test="${QX.add == 1 }"> | |
175 | + <a class="btn btn-mini btn-success" onclick="add();">新增</a> | |
176 | + </c:if> | |
177 | + <c:if test="${QX.del == 1 }"> | |
178 | + <a class="btn btn-mini btn-danger" onclick="makeAll('确定要删除选中的数据吗?');" title="批量删除" ><i class='ace-icon fa fa-trash-o bigger-120'></i></a> | |
179 | + </c:if> | |
180 | + </td> | |
181 | + <td style="vertical-align:top;"><div class="pagination" style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div></td> | |
182 | + </tr> | |
183 | + </table> | |
184 | + </div> | |
185 | + </form> | |
186 | + | |
187 | + </div> | |
188 | + <!-- /.col --> | |
189 | + </div> | |
190 | + <!-- /.row --> | |
191 | + </div> | |
192 | + <!-- /.page-content --> | |
193 | + </div> | |
194 | + </div> | |
195 | + <!-- /.main-content --> | |
196 | + | |
197 | + <!-- 返回顶部 --> | |
198 | + <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse"> | |
199 | + <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i> | |
200 | + </a> | |
201 | + | |
202 | + </div> | |
203 | + <!-- /.main-container --> | |
204 | + | |
205 | + <!-- basic scripts --> | |
206 | + <!-- 页面底部js¨ --> | |
207 | + <%@ include file="../../system/index/foot.jsp"%> | |
208 | + <!-- 删除时确认窗口 --> | |
209 | + <script src="static/ace/js/bootbox.js"></script> | |
210 | + <!-- ace scripts --> | |
211 | + <script src="static/ace/js/ace/ace.js"></script> | |
212 | + <!-- 下拉框 --> | |
213 | + <script src="static/ace/js/chosen.jquery.js"></script> | |
214 | + <!-- 日期框 --> | |
215 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | |
216 | + <!--提示框--> | |
217 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | |
218 | + <script type="text/javascript"> | |
219 | + $(top.hangge());//关闭加载状态 | |
220 | + //检索 | |
221 | + function tosearch(){ | |
222 | + top.jzts(); | |
223 | + $("#Form").submit(); | |
224 | + } | |
225 | + $(function() { | |
226 | + | |
227 | + //日期框 | |
228 | + $('.date-picker').datepicker({ | |
229 | + autoclose: true, | |
230 | + todayHighlight: true | |
231 | + }); | |
232 | + | |
233 | + //下拉框 | |
234 | + if(!ace.vars['touch']) { | |
235 | + $('.chosen-select').chosen({allow_single_deselect:true}); | |
236 | + $(window) | |
237 | + .off('resize.chosen') | |
238 | + .on('resize.chosen', function() { | |
239 | + $('.chosen-select').each(function() { | |
240 | + var $this = $(this); | |
241 | + $this.next().css({'width': $this.parent().width()}); | |
242 | + }); | |
243 | + }).trigger('resize.chosen'); | |
244 | + $(document).on('settings.ace.chosen', function(e, event_name, event_val) { | |
245 | + if(event_name != 'sidebar_collapsed') return; | |
246 | + $('.chosen-select').each(function() { | |
247 | + var $this = $(this); | |
248 | + $this.next().css({'width': $this.parent().width()}); | |
249 | + }); | |
250 | + }); | |
251 | + $('#chosen-multiple-style .btn').on('click', function(e){ | |
252 | + var target = $(this).find('input[type=radio]'); | |
253 | + var which = parseInt(target.val()); | |
254 | + if(which == 2) $('#form-field-select-4').addClass('tag-input-style'); | |
255 | + else $('#form-field-select-4').removeClass('tag-input-style'); | |
256 | + }); | |
257 | + } | |
258 | + | |
259 | + | |
260 | + //复选框全选控制 | |
261 | + var active_class = 'active'; | |
262 | + $('#simple-table > thead > tr > th input[type=checkbox]').eq(0).on('click', function(){ | |
263 | + var th_checked = this.checked;//checkbox inside "TH" table header | |
264 | + $(this).closest('table').find('tbody > tr').each(function(){ | |
265 | + var row = this; | |
266 | + if(th_checked) $(row).addClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', true); | |
267 | + else $(row).removeClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', false); | |
268 | + }); | |
269 | + }); | |
270 | + }); | |
271 | + | |
272 | + //新增 | |
273 | + function add(){ | |
274 | + top.jzts(); | |
275 | + var diag = new top.Dialog(); | |
276 | + diag.Drag=true; | |
277 | + diag.Title ="新增"; | |
278 | + diag.URL = '<%=basePath%>sclass/goAdd.do'; | |
279 | + diag.Width = 450; | |
280 | + diag.Height = 355; | |
281 | + diag.Modal = true; //有无遮罩窗口 | |
282 | + diag. ShowMaxButton = true; //最大化按钮 | |
283 | + diag.ShowMinButton = true; //最小化按钮 | |
284 | + diag.CancelEvent = function(){ //关闭事件 | |
285 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | |
286 | + if('${page.currentPage}' == '0'){ | |
287 | + tosearch(); | |
288 | + }else{ | |
289 | + tosearch(); | |
290 | + } | |
291 | + } | |
292 | + diag.close(); | |
293 | + }; | |
294 | + diag.show(); | |
295 | + } | |
296 | + | |
297 | + //删除 | |
298 | + function del(Id){ | |
299 | + bootbox.confirm("确定要删除吗?", function(result) { | |
300 | + if(result) { | |
301 | + top.jzts(); | |
302 | + var url = "<%=basePath%>sclass/delete.do?ID="+Id+"&tm="+new Date().getTime(); | |
303 | + $.get(url,function(data){ | |
304 | + tosearch(); | |
305 | + }); | |
306 | + } | |
307 | + }); | |
308 | + } | |
309 | + | |
310 | + //修改 | |
311 | + function edit(Id){ | |
312 | + top.jzts(); | |
313 | + var diag = new top.Dialog(); | |
314 | + diag.Drag=true; | |
315 | + diag.Title ="编辑"; | |
316 | + diag.URL = '<%=basePath%>sclass/goEdit.do?ID='+Id; | |
317 | + diag.Width = 450; | |
318 | + diag.Height = 355; | |
319 | + diag.Modal = true; //有无遮罩窗口 | |
320 | + diag. ShowMaxButton = true; //最大化按钮 | |
321 | + diag.ShowMinButton = true; //最小化按钮 | |
322 | + diag.CancelEvent = function(){ //关闭事件 | |
323 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | |
324 | + tosearch(); | |
325 | + } | |
326 | + diag.close(); | |
327 | + }; | |
328 | + diag.show(); | |
329 | + } | |
330 | + | |
331 | + //批量操作 | |
332 | + function makeAll(msg){ | |
333 | + bootbox.confirm(msg, function(result) { | |
334 | + if(result) { | |
335 | + var str = ''; | |
336 | + for(var i=0;i < document.getElementsByName('ids').length;i++){ | |
337 | + if(document.getElementsByName('ids')[i].checked){ | |
338 | + if(str=='') str += document.getElementsByName('ids')[i].value; | |
339 | + else str += ',' + document.getElementsByName('ids')[i].value; | |
340 | + } | |
341 | + } | |
342 | + if(str==''){ | |
343 | + bootbox.dialog({ | |
344 | + message: "<span class='bigger-110'>您没有选择任何内容!</span>", | |
345 | + buttons: | |
346 | + { "button":{ "label":"确定", "className":"btn-sm btn-success"}} | |
347 | + }); | |
348 | + $("#zcheckbox").tips({ | |
349 | + side:1, | |
350 | + msg:'点这里全选', | |
351 | + bg:'#AE81FF', | |
352 | + time:8 | |
353 | + }); | |
354 | + return; | |
355 | + }else{ | |
356 | + if(msg == '确定要删除选中的数据吗?'){ | |
357 | + top.jzts(); | |
358 | + $.ajax({ | |
359 | + type: "POST", | |
360 | + url: '<%=basePath%>sclass/deleteAll.do?tm='+new Date().getTime(), | |
361 | + data: {DATA_IDS:str}, | |
362 | + dataType:'json', | |
363 | + //beforeSend: validateData, | |
364 | + cache: false, | |
365 | + success: function(data){ | |
366 | + $.each(data.list, function(i, list){ | |
367 | + tosearch(); | |
368 | + }); | |
369 | + } | |
370 | + }); | |
371 | + } | |
372 | + } | |
373 | + } | |
374 | + }); | |
375 | + }; | |
376 | + | |
377 | + //导出excel | |
378 | + function toExcel(){ | |
379 | + window.location.href='<%=basePath%>sclass/excel.do'; | |
380 | + } | |
381 | + </script> | |
382 | + | |
383 | + | |
384 | +</body> | |
385 | +</html> | |
0 | 386 | \ No newline at end of file | ... | ... |