Commit 837ae11deb73983a1755edc6464aa2070c0f9a0e
1 parent
79b45d50
添加班長管理
Showing
41 changed files
with
1024 additions
and
478 deletions
WebRoot/WEB-INF/jsp/sunvote/admin/admin_main.jsp
@@ -60,8 +60,8 @@ | @@ -60,8 +60,8 @@ | ||
60 | </p> | 60 | </p> |
61 | <ul class="menu_1"> | 61 | <ul class="menu_1"> |
62 | <c:forEach items="${gradeInfos}" var="var" varStatus="vs"> | 62 | <c:forEach items="${gradeInfos}" var="var" varStatus="vs"> |
63 | - <li onclick="event.stopPropagation();chooseListClass('${var.SCHOOL_ID}','${var.GRADE_ID}')"> | ||
64 | - <p>${ var.GNAME }</p> | 63 | + <li onclick="event.stopPropagation();chooseListClass('${var.SCHOOL_ID}','${var.ID}')"> |
64 | + <p>${ var.NAME }</p> | ||
65 | </li> | 65 | </li> |
66 | </c:forEach> | 66 | </c:forEach> |
67 | 67 | ||
@@ -87,8 +87,8 @@ | @@ -87,8 +87,8 @@ | ||
87 | <li> <p>科目管理</p> | 87 | <li> <p>科目管理</p> |
88 | <ul class="menu_2"> | 88 | <ul class="menu_2"> |
89 | <c:forEach items="${gradeInfos}" var="var" varStatus="vs"> | 89 | <c:forEach items="${gradeInfos}" var="var" varStatus="vs"> |
90 | - <li onclick="event.stopPropagation();subject('${SCHOOL_ID}')"> | ||
91 | - <p>${ var.GNAME }</p> | 90 | + <li onclick="event.stopPropagation();subject('${SCHOOL_ID}','${var.ID }')"> |
91 | + <p>${ var.NAME }</p> | ||
92 | </li> | 92 | </li> |
93 | </c:forEach> | 93 | </c:forEach> |
94 | </ul> | 94 | </ul> |
@@ -167,6 +167,9 @@ | @@ -167,6 +167,9 @@ | ||
167 | <p onclick="event.stopPropagation();pagetemplate('${SCHOOL_ID}')">模板设置</p> | 167 | <p onclick="event.stopPropagation();pagetemplate('${SCHOOL_ID}')">模板设置</p> |
168 | </li> | 168 | </li> |
169 | <li> | 169 | <li> |
170 | + <p onclick="event.stopPropagation();monitor('${SCHOOL_ID}')">班长管理</p> | ||
171 | + </li> | ||
172 | + <li> | ||
170 | <p onclick="event.stopPropagation();other('${SCHOOL_ID}')">其他配置</p> | 173 | <p onclick="event.stopPropagation();other('${SCHOOL_ID}')">其他配置</p> |
171 | </li> | 174 | </li> |
172 | </ul> | 175 | </ul> |
@@ -203,7 +206,8 @@ | @@ -203,7 +206,8 @@ | ||
203 | <div class="form-group"> | 206 | <div class="form-group"> |
204 | <label for="enter_time" class="col-sm-4 control-label">年级</label> | 207 | <label for="enter_time" class="col-sm-4 control-label">年级</label> |
205 | <div class="col-sm-6"> | 208 | <div class="col-sm-6"> |
206 | - <select class="chosen-select form-control" name="grade_id" id="grade_id" data-placeholder="这里输入所属学校"> | 209 | + <select class="chosen-select form-control" name="grade_id" id="grade_id" onchange="getSubjects('${SCHOOL_ID}')" data-placeholder="这里输入所属学校"> |
210 | + <option value="-1">--请选择--</option> | ||
207 | <c:forEach items="${gradeInfos}" var="var" varStatus="vs"> | 211 | <c:forEach items="${gradeInfos}" var="var" varStatus="vs"> |
208 | <option value="${var.GRADE_ID}">${var.GNAME}</option> | 212 | <option value="${var.GRADE_ID}">${var.GNAME}</option> |
209 | </c:forEach> | 213 | </c:forEach> |
@@ -214,10 +218,7 @@ | @@ -214,10 +218,7 @@ | ||
214 | <div class="form-group"> | 218 | <div class="form-group"> |
215 | <label for="enter_time" class="col-sm-4 control-label">科目</label> | 219 | <label for="enter_time" class="col-sm-4 control-label">科目</label> |
216 | <div class="col-sm-6"> | 220 | <div class="col-sm-6"> |
217 | - <select class="chosen-select form-control" name="subject_id" id="subject_id" data-placeholder="这里输入所属学校"> | ||
218 | - <c:forEach items="${subjectInfos}" var="var" varStatus="vs"> | ||
219 | - <option value="${var.SUBJECT_ID}">${var.SCNAME}</option> | ||
220 | - </c:forEach> | 221 | + <select class="chosen-select form-control" name="subject_id" id="subject_id" onchange="getTemplates()" data-placeholder="这里输入所属学校"> |
221 | </select> | 222 | </select> |
222 | </div> | 223 | </div> |
223 | <div class="clearfix"></div> | 224 | <div class="clearfix"></div> |
@@ -227,13 +228,11 @@ | @@ -227,13 +228,11 @@ | ||
227 | <div class="col-sm-6"> | 228 | <div class="col-sm-6"> |
228 | <select class="chosen-select form-control" name="TEMPLATE_ID" id="TEMPLATE_ID" data-placeholder="这里输入所属学校"> | 229 | <select class="chosen-select form-control" name="TEMPLATE_ID" id="TEMPLATE_ID" data-placeholder="这里输入所属学校"> |
229 | <option value="">自定义</option> | 230 | <option value="">自定义</option> |
230 | - <c:forEach items="${templateInfos}" var="var" varStatus="vs"> | ||
231 | - <option value="${var.PAGETEMPLATE_ID}">${var.NAME}</option> | ||
232 | - </c:forEach> | ||
233 | </select> | 231 | </select> |
234 | </div> | 232 | </div> |
235 | <div class="clearfix"></div> | 233 | <div class="clearfix"></div> |
236 | </div> | 234 | </div> |
235 | + | ||
237 | </div> | 236 | </div> |
238 | <div class="modal-footer"> | 237 | <div class="modal-footer"> |
239 | <button type="button" class="btn btn-primary" id="time_submit">确定</button> | 238 | <button type="button" class="btn btn-primary" id="time_submit">确定</button> |
@@ -260,6 +259,48 @@ | @@ -260,6 +259,48 @@ | ||
260 | //} | 259 | //} |
261 | } | 260 | } |
262 | 261 | ||
262 | + function getSubjects(school_id){ | ||
263 | + var grade_id = $("#grade_id").val(); | ||
264 | + var path = "../subject/listdata?school_id=" + school_id + "&grade_id=" + grade_id ; | ||
265 | + $("#subject_id").empty(); | ||
266 | + if(grade != '-1'){ | ||
267 | + $.ajax({ | ||
268 | + type: 'post', | ||
269 | + url : path, | ||
270 | + async: true, | ||
271 | + dataType: "json", | ||
272 | + success: function(data) { | ||
273 | + for(var key in data){ | ||
274 | + $("#subject_id").append("<option value='"+data[key].ID+"'>"+data[key].CNAME+"</option>"); | ||
275 | + } | ||
276 | + getTemplates(); | ||
277 | + } | ||
278 | + }); | ||
279 | + } | ||
280 | + } | ||
281 | + | ||
282 | + function getTemplates(){ | ||
283 | + var grade_id = $("#grade_id").val(); | ||
284 | + var subject_id = $("#subject_id").val(); | ||
285 | + var school_id = schoolId; | ||
286 | + if(grade != '-1' && subject_id != ''){ | ||
287 | + var path = "../pagetemplate/listdata?school_id=" + school_id + "&grade_id=" + grade_id + "&subject_id=" + subject_id ; | ||
288 | + $("#TEMPLATE_ID").empty(); | ||
289 | + $("#TEMPLATE_ID").append("<option value=''>自定义</option>"); | ||
290 | + $.ajax({ | ||
291 | + type: 'post', | ||
292 | + url : path, | ||
293 | + async: true, | ||
294 | + dataType: "json", | ||
295 | + success: function(data) { | ||
296 | + for(var key in data){ | ||
297 | + $("#TEMPLATE_ID").append("<option value='"+data[key].PAGETEMPLATE_ID+"'>"+data[key].NAME+"</option>"); | ||
298 | + } | ||
299 | + } | ||
300 | + }); | ||
301 | + } | ||
302 | + } | ||
303 | + | ||
263 | function school(schoolId){ | 304 | function school(schoolId){ |
264 | var path = "../school/goEdit2.do?ID=" + schoolId ; | 305 | var path = "../school/goEdit2.do?ID=" + schoolId ; |
265 | $("#mainFrame").attr('src',path); | 306 | $("#mainFrame").attr('src',path); |
@@ -281,6 +322,12 @@ | @@ -281,6 +322,12 @@ | ||
281 | window.top.loading.show(); | 322 | window.top.loading.show(); |
282 | } | 323 | } |
283 | 324 | ||
325 | + function monitor(school_id){ | ||
326 | + var path = "../headmaster/list.do?school_id=" + school_id ; | ||
327 | + $("#mainFrame").attr('src',path); | ||
328 | + window.top.loading.show(); | ||
329 | + } | ||
330 | + | ||
284 | function coursemanager(school_id){ | 331 | function coursemanager(school_id){ |
285 | var path = "../coursemanagement/listcs.do?school_id=" + school_id ; | 332 | var path = "../coursemanagement/listcs.do?school_id=" + school_id ; |
286 | //if($("#mainFrame").attr('src') != (path)){ | 333 | //if($("#mainFrame").attr('src') != (path)){ |
WebRoot/WEB-INF/jsp/sunvote/coursemanagement/coursemanagement_edit2.jsp
@@ -32,6 +32,7 @@ | @@ -32,6 +32,7 @@ | ||
32 | 32 | ||
33 | <form action="coursemanagement/${msg }.do" name="Form" id="Form" method="post"> | 33 | <form action="coursemanagement/${msg }.do" name="Form" id="Form" method="post"> |
34 | <input type="hidden" name="ID" id="ID" value="${pd.ID}"/> | 34 | <input type="hidden" name="ID" id="ID" value="${pd.ID}"/> |
35 | + <input type="hidden" name="SCHOOL_ID" id="SCHOOL_ID" value="${pd.SCHOOL_ID}"/> | ||
35 | <div id="zhongxin" style="padding-top: 13px;"> | 36 | <div id="zhongxin" style="padding-top: 13px;"> |
36 | <table id="table_report" class="table"> | 37 | <table id="table_report" class="table"> |
37 | <tr> | 38 | <tr> |
WebRoot/WEB-INF/jsp/sunvote/coursemanagement/coursemanagement_list2.jsp
@@ -28,7 +28,7 @@ | @@ -28,7 +28,7 @@ | ||
28 | <!-- 检索 --> | 28 | <!-- 检索 --> |
29 | <form action="coursemanagement/listcs.do" method="post" name="Form" | 29 | <form action="coursemanagement/listcs.do" method="post" name="Form" |
30 | id="Form" style="background:#fff;"> | 30 | id="Form" style="background:#fff;"> |
31 | - <input type="hidden" name="SCHOOL_ID" id="PAPER_ID" value="${pd.SCHOOL_ID}"/> | 31 | + <input type="hidden" name="SCHOOL_ID" id="SCHOOL_ID" value="${pd.SCHOOL_ID}"/> |
32 | <div class="head_box"> | 32 | <div class="head_box"> |
33 | <div class="box_header"> | 33 | <div class="box_header"> |
34 | <div class="head_box_l"> | 34 | <div class="head_box_l"> |
@@ -69,7 +69,7 @@ | @@ -69,7 +69,7 @@ | ||
69 | <c:when test="${not empty varList}"> | 69 | <c:when test="${not empty varList}"> |
70 | <c:forEach items="${varList}" var="var" varStatus="vs"> | 70 | <c:forEach items="${varList}" var="var" varStatus="vs"> |
71 | <tr> | 71 | <tr> |
72 | - <td><input type="checkbox" name='ids' id="ids" value="${var.PAPER_ID}"/>${vs.index+1}</td> | 72 | + <td><input type="checkbox" name='ids' id="ids" value="${var.ID}"/>${vs.index+1}</td> |
73 | <td >${var.NAME}</td> | 73 | <td >${var.NAME}</td> |
74 | <td >${var.CLASS_NAME}</td> | 74 | <td >${var.CLASS_NAME}</td> |
75 | <td >${var.CNAME}</td> | 75 | <td >${var.CNAME}</td> |
@@ -120,11 +120,15 @@ | @@ -120,11 +120,15 @@ | ||
120 | window.top.loading.remove(); | 120 | window.top.loading.remove(); |
121 | }); | 121 | }); |
122 | 122 | ||
123 | + function tosearch(){ | ||
124 | + $("#Form").submit(); | ||
125 | + } | ||
126 | + | ||
123 | //新增 | 127 | //新增 |
124 | function add(){ | 128 | function add(){ |
125 | window.top.modal.init({ | 129 | window.top.modal.init({ |
126 | 'title':'分配任课', | 130 | 'title':'分配任课', |
127 | - 'url':'<%=basePath%>coursemanagement/goAdd2.do', | 131 | + 'url':'<%=basePath%>coursemanagement/goAdd2.do?school_id=${pd.SCHOOL_ID}', |
128 | func:function() { | 132 | func:function() { |
129 | tosearch(); | 133 | tosearch(); |
130 | } | 134 | } |
@@ -132,6 +136,39 @@ | @@ -132,6 +136,39 @@ | ||
132 | window.top.modal.show(); | 136 | window.top.modal.show(); |
133 | } | 137 | } |
134 | 138 | ||
139 | + function deleteAll(){ | ||
140 | + window.top.remove.init({"title":"移除任课","ok":"确定","cancel":"取消","func":function(success){ | ||
141 | + if(success){ | ||
142 | + var str = ''; | ||
143 | + for(var i=0;i < document.getElementsByName('ids').length;i++){ | ||
144 | + if(document.getElementsByName('ids')[i].checked){ | ||
145 | + if(str=='') str += document.getElementsByName('ids')[i].value; | ||
146 | + else str += ',' + document.getElementsByName('ids')[i].value; | ||
147 | + } | ||
148 | + } | ||
149 | + if(str==''){ | ||
150 | + | ||
151 | + }else{ | ||
152 | + $.ajax({ | ||
153 | + type: "POST", | ||
154 | + url: '<%=basePath%>coursemanagement/deleteAll.do?tm='+new Date().getTime(), | ||
155 | + data: {DATA_IDS:str}, | ||
156 | + dataType:'json', | ||
157 | + //beforeSend: validateData, | ||
158 | + cache: false, | ||
159 | + success: function(data){ | ||
160 | + tosearch(); | ||
161 | + } | ||
162 | + }); | ||
163 | + } | ||
164 | + } | ||
165 | + else{ | ||
166 | + console.log("false"); | ||
167 | + } | ||
168 | + }}); | ||
169 | + window.top.remove.show(); | ||
170 | + } | ||
171 | + | ||
135 | </script> | 172 | </script> |
136 | 173 | ||
137 | 174 |
WebRoot/WEB-INF/jsp/sunvote/grade/grade_edit2.jsp
@@ -30,21 +30,20 @@ | @@ -30,21 +30,20 @@ | ||
30 | <div class="col-xs-12"> | 30 | <div class="col-xs-12"> |
31 | 31 | ||
32 | <form action="grade/${msg }.do" name="Form" id="Form" method="post"> | 32 | <form action="grade/${msg }.do" name="Form" id="Form" method="post"> |
33 | - <input type="hidden" name="ID" id="ID" value="${pd.ID}"/> | 33 | + <input type="hidden" name="SCHOOL_ID" id="SCHOOL_ID" value="${pd.SCHOOL_ID}"/> |
34 | <div id="zhongxin" style="padding-top: 13px;"> | 34 | <div id="zhongxin" style="padding-top: 13px;"> |
35 | <table id="table_report" class="table"> | 35 | <table id="table_report" class="table"> |
36 | <tr> | 36 | <tr> |
37 | - <td style="width:75px;text-align: right;padding-top: 13px;">年级名称:</td> | ||
38 | - <td><input type="text" name="NAME" id="NAME" value="${pd.NAME}" maxlength="255" placeholder="这里输入年级名称" title="年级名称" style="width:98%;"/></td> | ||
39 | - </tr> | ||
40 | - <tr> | ||
41 | - <td style="width:75px;text-align: right;padding-top: 13px;">年级描述:</td> | ||
42 | - <td><input type="text" name="DESC" id="DESC" value="${pd.DESC}" maxlength="255" placeholder="这里输入年级描述" title="年级描述" style="width:98%;"/></td> | ||
43 | - </tr> | ||
44 | - <tr> | ||
45 | - <td style="width:75px;text-align: right;padding-top: 13px;">备注:</td> | ||
46 | - <td><input type="text" name="REMARK" id="REMARK" value="${pd.REMARK}" maxlength="255" placeholder="这里输入备注" title="备注" style="width:98%;"/></td> | 37 | + <td style="width:75px;text-align: right;padding-top: 13px;">科目名称:</td> |
38 | + <td> | ||
39 | + <select class="chosen-select form-control" name="GRADE_ID" id="GRADE_ID" data-placeholder=""> | ||
40 | + <c:forEach var="item" items="${gradeList}"> | ||
41 | + <option value="${item.ID}">${item.NAME}</option> | ||
42 | + </c:forEach> | ||
43 | + </select> | ||
44 | + </td> | ||
47 | </tr> | 45 | </tr> |
46 | + | ||
48 | <tr> | 47 | <tr> |
49 | <td style="text-align: center;" colspan="10"> | 48 | <td style="text-align: center;" colspan="10"> |
50 | <a class="btn btn-mini btn-primary" onclick="save();">保存</a> | 49 | <a class="btn btn-mini btn-primary" onclick="save();">保存</a> |
@@ -80,34 +79,14 @@ | @@ -80,34 +79,14 @@ | ||
80 | $(top.hangge()); | 79 | $(top.hangge()); |
81 | //保存 | 80 | //保存 |
82 | function save(){ | 81 | function save(){ |
83 | - if($("#NAME").val()==""){ | ||
84 | - $("#NAME").tips({ | 82 | + if($("#GRADE_ID").val()==""){ |
83 | + $("#GRADE_ID").tips({ | ||
85 | side:3, | 84 | side:3, |
86 | msg:'请输入年级名称', | 85 | msg:'请输入年级名称', |
87 | bg:'#AE81FF', | 86 | bg:'#AE81FF', |
88 | time:2 | 87 | time:2 |
89 | }); | 88 | }); |
90 | - $("#NAME").focus(); | ||
91 | - return false; | ||
92 | - } | ||
93 | - if($("#DESC").val()==""){ | ||
94 | - $("#DESC").tips({ | ||
95 | - side:3, | ||
96 | - msg:'请输入年级描述', | ||
97 | - bg:'#AE81FF', | ||
98 | - time:2 | ||
99 | - }); | ||
100 | - $("#DESC").focus(); | ||
101 | - return false; | ||
102 | - } | ||
103 | - if($("#REMARK").val()==""){ | ||
104 | - $("#REMARK").tips({ | ||
105 | - side:3, | ||
106 | - msg:'请输入备注', | ||
107 | - bg:'#AE81FF', | ||
108 | - time:2 | ||
109 | - }); | ||
110 | - $("#REMARK").focus(); | 89 | + $("#GRADE_ID").focus(); |
111 | return false; | 90 | return false; |
112 | } | 91 | } |
113 | $("#Form").submit(); | 92 | $("#Form").submit(); |
WebRoot/WEB-INF/jsp/sunvote/grade/grade_list2.jsp
@@ -25,6 +25,8 @@ | @@ -25,6 +25,8 @@ | ||
25 | </head> | 25 | </head> |
26 | <body class="no-skin"> | 26 | <body class="no-skin"> |
27 | <form action="grade/listcs.do" method="post" name="Form" id="Form"> | 27 | <form action="grade/listcs.do" method="post" name="Form" id="Form"> |
28 | + <input type="hidden" name="SCHOOL_ID" id="SCHOOL_ID" value="${pd.SCHOOL_ID}"/> | ||
29 | + | ||
28 | <div class="head_box"> | 30 | <div class="head_box"> |
29 | <div class="box_header"> | 31 | <div class="box_header"> |
30 | <div class="head_box_l"> | 32 | <div class="head_box_l"> |
@@ -42,7 +44,7 @@ | @@ -42,7 +44,7 @@ | ||
42 | <col style="width: 45%" /> | 44 | <col style="width: 45%" /> |
43 | <thead> | 45 | <thead> |
44 | <tr> | 46 | <tr> |
45 | - <th><input type="checkbox" name='ids' id="ids" />序号</th> | 47 | + <th><input type="checkbox" name='ids' id="ids" value="${var.SCHOOLGRADESUBJECT_ID}" />序号</th> |
46 | <th class="center">年级名称</th> | 48 | <th class="center">年级名称</th> |
47 | <th class="center">年级描述</th> | 49 | <th class="center">年级描述</th> |
48 | </tr> | 50 | </tr> |
@@ -63,7 +65,7 @@ | @@ -63,7 +65,7 @@ | ||
63 | <c:forEach items="${varList}" var="var" varStatus="vs"> | 65 | <c:forEach items="${varList}" var="var" varStatus="vs"> |
64 | <tr> | 66 | <tr> |
65 | <td><input type="checkbox" name='ids' id="ids" | 67 | <td><input type="checkbox" name='ids' id="ids" |
66 | - value="${var.ID}" />${vs.index+1}</td> | 68 | + value="${var.SCHOOLGRADESUBJECT_ID}" />${vs.index+1}</td> |
67 | <td class='center'>${var.NAME}</td> | 69 | <td class='center'>${var.NAME}</td> |
68 | <td class='center'>${var.DESC}</td> | 70 | <td class='center'>${var.DESC}</td> |
69 | <td class='center'></td> | 71 | <td class='center'></td> |
@@ -116,10 +118,15 @@ | @@ -116,10 +118,15 @@ | ||
116 | window.top.loading.remove(); | 118 | window.top.loading.remove(); |
117 | }); | 119 | }); |
118 | 120 | ||
121 | + //检索 | ||
122 | + function tosearch(){ | ||
123 | + $("#Form").submit(); | ||
124 | + } | ||
125 | + | ||
119 | function add(){ | 126 | function add(){ |
120 | window.top.modal.init({ | 127 | window.top.modal.init({ |
121 | - 'title':'添加班级', | ||
122 | - 'url':'<%=basePath%>grade/goAdd2.do', | 128 | + 'title':'添加年级', |
129 | + 'url':'<%=basePath%>grade/goAdd2.do?school_id=${pd.SCHOOL_ID}', | ||
123 | func:function() { | 130 | func:function() { |
124 | tosearch(); | 131 | tosearch(); |
125 | } | 132 | } |
@@ -152,7 +159,7 @@ | @@ -152,7 +159,7 @@ | ||
152 | }else{ | 159 | }else{ |
153 | $.ajax({ | 160 | $.ajax({ |
154 | type: "POST", | 161 | type: "POST", |
155 | - url: '<%=basePath%>grade/deleteAll.do?tm='+new Date().getTime(), | 162 | + url: '<%=basePath%>grade/deleteAll2.do?tm='+new Date().getTime(), |
156 | data: {DATA_IDS:str}, | 163 | data: {DATA_IDS:str}, |
157 | dataType:'json', | 164 | dataType:'json', |
158 | //beforeSend: validateData, | 165 | //beforeSend: validateData, |
WebRoot/WEB-INF/jsp/sunvote/headmaster/headmaster_list.jsp
1 | -<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> | 1 | +<%@ page language="java" contentType="text/html; charset=UTF-8" |
2 | + pageEncoding="UTF-8"%> | ||
2 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> | 3 | <%@ 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="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> |
4 | <% | 5 | <% |
@@ -9,206 +10,132 @@ | @@ -9,206 +10,132 @@ | ||
9 | %> | 10 | %> |
10 | <!DOCTYPE html> | 11 | <!DOCTYPE html> |
11 | <html lang="en"> | 12 | <html lang="en"> |
13 | +<title>中天电子-教育管理系统</title> | ||
12 | <head> | 14 | <head> |
13 | <base href="<%=basePath%>"> | 15 | <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" /> | 16 | +<link |
17 | + href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" | ||
18 | + rel="stylesheet"> | ||
20 | </head> | 19 | </head> |
21 | <body class="no-skin"> | 20 | <body class="no-skin"> |
21 | + <!-- 检索 --> | ||
22 | + <form action="headmaster/listcs.do" method="post" name="Form" id="Form"> | ||
23 | + <table style="margin-top:5px;"> | ||
24 | + </table> | ||
25 | + <!-- 检索 --> | ||
22 | 26 | ||
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="headmaster/list.do" method="post" name="Form" id="Form"> | ||
34 | - <table style="margin-top:5px;"> | 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 | + | ||
46 | + <tbody> | ||
47 | + <!-- 开始循环 --> | ||
48 | + <c:choose> | ||
49 | + <c:when test="${not empty varList}"> | ||
50 | + <c:forEach items="${varList}" var="var" varStatus="vs"> | ||
35 | <tr> | 51 | <tr> |
36 | - <td> | ||
37 | - <div class="nav-search"> | ||
38 | - <span class="input-icon"> | ||
39 | - <input type="text" placeholder="这里输入关键词" class="nav-search-input" id="nav-search-input" autocomplete="off" name="keywords" value="${pd.keywords }" placeholder="这里输入关键词"/> | ||
40 | - <i class="ace-icon fa fa-search nav-search-icon"></i> | ||
41 | - </span> | 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> | ||
56 | + <td class='center'>${var.NAME}</td> | ||
57 | + <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> | ||
61 | + <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> | ||
42 | </div> | 73 | </div> |
43 | - </td> | ||
44 | - <td style="padding-left:2px;"><input class="span10 date-picker" name="lastStart" id="lastStart" value="" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" style="width:88px;" placeholder="开始日期" title="开始日期"/></td> | ||
45 | - <td style="padding-left:2px;"><input class="span10 date-picker" name="lastEnd" name="lastEnd" value="" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" style="width:88px;" placeholder="结束日期" title="结束日期"/></td> | ||
46 | - <td style="vertical-align:top;padding-left:2px;"> | ||
47 | - <select class="chosen-select form-control" name="name" id="id" data-placeholder="请选择" style="vertical-align:top;width: 120px;"> | ||
48 | - <option value=""></option> | ||
49 | - <option value="">全部</option> | ||
50 | - <option value="">1</option> | ||
51 | - <option value="">2</option> | ||
52 | - </select> | ||
53 | - </td> | ||
54 | - <c:if test="${QX.cha == 1 }"> | ||
55 | - <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> | ||
56 | - </c:if> | ||
57 | - <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> | ||
58 | - </tr> | ||
59 | - </table> | ||
60 | - <!-- 检索 --> | ||
61 | - | ||
62 | - <table id="simple-table" class="table table-striped table-bordered table-hover" style="margin-top:5px;"> | ||
63 | - <thead> | ||
64 | - <tr> | ||
65 | - <th class="center" style="width:35px;"> | ||
66 | - <label class="pos-rel"><input type="checkbox" class="ace" id="zcheckbox" /><span class="lbl"></span></label> | ||
67 | - </th> | ||
68 | - <th class="center" style="width:50px;">序号</th> | ||
69 | - <th class="center">姓名</th> | ||
70 | - <th class="center">用户名</th> | ||
71 | - <th class="center">密码</th> | ||
72 | - <th class="center">所在学校</th> | ||
73 | - <th class="center">权限</th> | ||
74 | - <th class="center">联系电话</th> | ||
75 | - <th class="center">操作</th> | ||
76 | - </tr> | ||
77 | - </thead> | ||
78 | - | ||
79 | - <tbody> | ||
80 | - <!-- 开始循环 --> | ||
81 | - <c:choose> | ||
82 | - <c:when test="${not empty varList}"> | ||
83 | - <c:if test="${QX.cha == 1 }"> | ||
84 | - <c:forEach items="${varList}" var="var" varStatus="vs"> | ||
85 | - <tr> | ||
86 | - <td class='center'> | ||
87 | - <label class="pos-rel"><input type='checkbox' name='ids' value="${var.HEADMASTER_ID}" class="ace" /><span class="lbl"></span></label> | ||
88 | - </td> | ||
89 | - <td class='center' style="width: 30px;">${vs.index+1}</td> | ||
90 | - <td class='center'>${var.NAME}</td> | ||
91 | - <td class='center'>${var.USERNAME}</td> | ||
92 | - <td class='center'>${var.PASSWORD}</td> | ||
93 | - <td class='center'>${var.SCHOOL_ID}</td> | ||
94 | - <td class='center'>${var.PERMISSION}</td> | ||
95 | - <td class='center'>${var.PHONE}</td> | ||
96 | - <td class="center"> | ||
97 | - <c:if test="${QX.edit != 1 && QX.del != 1 }"> | ||
98 | - <span class="label label-large label-grey arrowed-in-right arrowed-in"><i class="ace-icon fa fa-lock" title="无权限"></i></span> | ||
99 | - </c:if> | ||
100 | - <div class="hidden-sm hidden-xs btn-group"> | ||
101 | - <c:if test="${QX.edit == 1 }"> | ||
102 | - <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${var.HEADMASTER_ID}');"> | ||
103 | - <i class="ace-icon fa fa-pencil-square-o bigger-120" title="编辑"></i> | ||
104 | - </a> | ||
105 | - </c:if> | ||
106 | - <c:if test="${QX.del == 1 }"> | ||
107 | - <a class="btn btn-xs btn-danger" onclick="del('${var.HEADMASTER_ID}');"> | ||
108 | - <i class="ace-icon fa fa-trash-o bigger-120" title="删除"></i> | ||
109 | - </a> | ||
110 | - </c:if> | ||
111 | - </div> | ||
112 | - <div class="hidden-md hidden-lg"> | ||
113 | - <div class="inline pos-rel"> | ||
114 | - <button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown" data-position="auto"> | ||
115 | - <i class="ace-icon fa fa-cog icon-only bigger-110"></i> | ||
116 | - </button> | ||
117 | - | ||
118 | - <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close"> | ||
119 | - <c:if test="${QX.edit == 1 }"> | ||
120 | - <li> | ||
121 | - <a style="cursor:pointer;" onclick="edit('${var.HEADMASTER_ID}');" class="tooltip-success" data-rel="tooltip" title="修改"> | ||
122 | - <span class="green"> | ||
123 | - <i class="ace-icon fa fa-pencil-square-o bigger-120"></i> | ||
124 | - </span> | ||
125 | - </a> | ||
126 | - </li> | ||
127 | - </c:if> | ||
128 | - <c:if test="${QX.del == 1 }"> | ||
129 | - <li> | ||
130 | - <a style="cursor:pointer;" onclick="del('${var.HEADMASTER_ID}');" class="tooltip-error" data-rel="tooltip" title="删除"> | ||
131 | - <span class="red"> | ||
132 | - <i class="ace-icon fa fa-trash-o bigger-120"></i> | ||
133 | - </span> | ||
134 | - </a> | ||
135 | - </li> | ||
136 | - </c:if> | ||
137 | - </ul> | ||
138 | - </div> | ||
139 | - </div> | ||
140 | - </td> | ||
141 | - </tr> | ||
142 | - | ||
143 | - </c:forEach> | ||
144 | - </c:if> | ||
145 | - <c:if test="${QX.cha == 0 }"> | ||
146 | - <tr> | ||
147 | - <td colspan="100" class="center">您无权查看</td> | ||
148 | - </tr> | ||
149 | - </c:if> | ||
150 | - </c:when> | ||
151 | - <c:otherwise> | ||
152 | - <tr class="main_info"> | ||
153 | - <td colspan="100" class="center" >没有相关数据</td> | ||
154 | - </tr> | ||
155 | - </c:otherwise> | ||
156 | - </c:choose> | ||
157 | - </tbody> | ||
158 | - </table> | ||
159 | - <div class="page-header position-relative"> | ||
160 | - <table style="width:100%;"> | ||
161 | - <tr> | ||
162 | - <td style="vertical-align:top;"> | ||
163 | - <c:if test="${QX.add == 1 }"> | ||
164 | - <a class="btn btn-mini btn-success" onclick="add();">新增</a> | ||
165 | - </c:if> | ||
166 | - <c:if test="${QX.del == 1 }"> | ||
167 | - <a class="btn btn-mini btn-danger" onclick="makeAll('确定要删除选中的数据吗?');" title="批量删除" ><i class='ace-icon fa fa-trash-o bigger-120'></i></a> | ||
168 | - </c:if> | ||
169 | - </td> | ||
170 | - <td style="vertical-align:top;"><div class="pagination" style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div></td> | ||
171 | - </tr> | ||
172 | - </table> | ||
173 | - </div> | ||
174 | - </form> | ||
175 | - | ||
176 | - </div> | ||
177 | - <!-- /.col --> | ||
178 | - </div> | ||
179 | - <!-- /.row --> | ||
180 | - </div> | ||
181 | - <!-- /.page-content --> | ||
182 | - </div> | ||
183 | - </div> | ||
184 | - <!-- /.main-content --> | 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> | ||
185 | 80 | ||
186 | - <!-- 返回顶部 --> | ||
187 | - <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse"> | ||
188 | - <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i> | ||
189 | - </a> | 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> | ||
100 | + </tr> | ||
190 | 101 | ||
102 | + </c:forEach> | ||
103 | + </c:when> | ||
104 | + <c:otherwise> | ||
105 | + <tr class="main_info"> | ||
106 | + <td colspan="100" class="center">没有相关数据</td> | ||
107 | + </tr> | ||
108 | + </c:otherwise> | ||
109 | + </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> | ||
125 | + </table> | ||
126 | + </div> | ||
127 | + </form> | ||
191 | </div> | 128 | </div> |
192 | <!-- /.main-container --> | 129 | <!-- /.main-container --> |
193 | 130 | ||
194 | <!-- basic scripts --> | 131 | <!-- basic scripts --> |
195 | <!-- 页面底部js¨ --> | 132 | <!-- 页面底部js¨ --> |
196 | <%@ include file="../../system/index/foot.jsp"%> | 133 | <%@ include file="../../system/index/foot.jsp"%> |
197 | - <!-- 删除时确认窗口 --> | ||
198 | - <script src="static/ace/js/bootbox.js"></script> | ||
199 | - <!-- ace scripts --> | ||
200 | - <script src="static/ace/js/ace/ace.js"></script> | ||
201 | - <!-- 下拉框 --> | ||
202 | - <script src="static/ace/js/chosen.jquery.js"></script> | ||
203 | - <!-- 日期框 --> | ||
204 | - <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | ||
205 | - <!--提示框--> | ||
206 | - <script type="text/javascript" src="static/js/jquery.tips.js"></script> | 134 | + |
207 | <script type="text/javascript"> | 135 | <script type="text/javascript"> |
208 | - $(top.hangge());//关闭加载状态 | 136 | + window.top.loading.remove(); |
209 | //检索 | 137 | //检索 |
210 | function tosearch(){ | 138 | function tosearch(){ |
211 | - top.jzts(); | ||
212 | $("#Form").submit(); | 139 | $("#Form").submit(); |
213 | } | 140 | } |
214 | $(function() { | 141 | $(function() { |
@@ -346,26 +273,33 @@ | @@ -346,26 +273,33 @@ | ||
346 | top.jzts(); | 273 | top.jzts(); |
347 | $.ajax({ | 274 | $.ajax({ |
348 | type: "POST", | 275 | type: "POST", |
349 | - url: '<%=basePath%>headmaster/deleteAll.do?tm='+new Date().getTime(), | ||
350 | - data: {DATA_IDS:str}, | ||
351 | - dataType:'json', | ||
352 | - //beforeSend: validateData, | ||
353 | - cache: false, | ||
354 | - success: function(data){ | ||
355 | - $.each(data.list, function(i, list){ | ||
356 | - tosearch(); | ||
357 | - }); | 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 | + } | ||
358 | } | 296 | } |
359 | }); | 297 | }); |
360 | - } | ||
361 | - } | ||
362 | - } | ||
363 | - }); | ||
364 | }; | 298 | }; |
365 | - | 299 | + |
366 | //导出excel | 300 | //导出excel |
367 | - function toExcel(){ | ||
368 | - window.location.href='<%=basePath%>headmaster/excel.do'; | 301 | + function toExcel() { |
302 | + window.location.href = '<%=basePath%>headmaster/excel.do'; | ||
369 | } | 303 | } |
370 | </script> | 304 | </script> |
371 | 305 |
WebRoot/WEB-INF/jsp/sunvote/headmaster/headmaster_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="headmaster/list.do" method="post" name="Form" id="Form"> | ||
34 | + <table style="margin-top:5px;"> | ||
35 | + <tr> | ||
36 | + <td> | ||
37 | + <div class="nav-search"> | ||
38 | + <span class="input-icon"> | ||
39 | + <input type="text" placeholder="这里输入关键词" class="nav-search-input" id="nav-search-input" autocomplete="off" name="keywords" value="${pd.keywords }" placeholder="这里输入关键词"/> | ||
40 | + <i class="ace-icon fa fa-search nav-search-icon"></i> | ||
41 | + </span> | ||
42 | + </div> | ||
43 | + </td> | ||
44 | + <td style="padding-left:2px;"><input class="span10 date-picker" name="lastStart" id="lastStart" value="" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" style="width:88px;" placeholder="开始日期" title="开始日期"/></td> | ||
45 | + <td style="padding-left:2px;"><input class="span10 date-picker" name="lastEnd" name="lastEnd" value="" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" style="width:88px;" placeholder="结束日期" title="结束日期"/></td> | ||
46 | + <td style="vertical-align:top;padding-left:2px;"> | ||
47 | + <select class="chosen-select form-control" name="name" id="id" data-placeholder="请选择" style="vertical-align:top;width: 120px;"> | ||
48 | + <option value=""></option> | ||
49 | + <option value="">全部</option> | ||
50 | + <option value="">1</option> | ||
51 | + <option value="">2</option> | ||
52 | + </select> | ||
53 | + </td> | ||
54 | + <c:if test="${QX.cha == 1 }"> | ||
55 | + <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> | ||
56 | + </c:if> | ||
57 | + <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> | ||
58 | + </tr> | ||
59 | + </table> | ||
60 | + <!-- 检索 --> | ||
61 | + | ||
62 | + <table id="simple-table" class="table table-striped table-bordered table-hover" style="margin-top:5px;"> | ||
63 | + <thead> | ||
64 | + <tr> | ||
65 | + <th class="center" style="width:35px;"> | ||
66 | + <label class="pos-rel"><input type="checkbox" class="ace" id="zcheckbox" /><span class="lbl"></span></label> | ||
67 | + </th> | ||
68 | + <th class="center" style="width:50px;">序号</th> | ||
69 | + <th class="center">姓名</th> | ||
70 | + <th class="center">用户名</th> | ||
71 | + <th class="center">密码</th> | ||
72 | + <th class="center">所在学校</th> | ||
73 | + <th class="center">权限</th> | ||
74 | + <th class="center">联系电话</th> | ||
75 | + <th class="center">操作</th> | ||
76 | + </tr> | ||
77 | + </thead> | ||
78 | + | ||
79 | + <tbody> | ||
80 | + <!-- 开始循环 --> | ||
81 | + <c:choose> | ||
82 | + <c:when test="${not empty varList}"> | ||
83 | + <c:if test="${QX.cha == 1 }"> | ||
84 | + <c:forEach items="${varList}" var="var" varStatus="vs"> | ||
85 | + <tr> | ||
86 | + <td class='center'> | ||
87 | + <label class="pos-rel"><input type='checkbox' name='ids' value="${var.HEADMASTER_ID}" class="ace" /><span class="lbl"></span></label> | ||
88 | + </td> | ||
89 | + <td class='center' style="width: 30px;">${vs.index+1}</td> | ||
90 | + <td class='center'>${var.NAME}</td> | ||
91 | + <td class='center'>${var.USERNAME}</td> | ||
92 | + <td class='center'>${var.PASSWORD}</td> | ||
93 | + <td class='center'>${var.SCHOOL_ID}</td> | ||
94 | + <td class='center'>${var.PERMISSION}</td> | ||
95 | + <td class='center'>${var.PHONE}</td> | ||
96 | + <td class="center"> | ||
97 | + <c:if test="${QX.edit != 1 && QX.del != 1 }"> | ||
98 | + <span class="label label-large label-grey arrowed-in-right arrowed-in"><i class="ace-icon fa fa-lock" title="无权限"></i></span> | ||
99 | + </c:if> | ||
100 | + <div class="hidden-sm hidden-xs btn-group"> | ||
101 | + <c:if test="${QX.edit == 1 }"> | ||
102 | + <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${var.HEADMASTER_ID}');"> | ||
103 | + <i class="ace-icon fa fa-pencil-square-o bigger-120" title="编辑"></i> | ||
104 | + </a> | ||
105 | + </c:if> | ||
106 | + <c:if test="${QX.del == 1 }"> | ||
107 | + <a class="btn btn-xs btn-danger" onclick="del('${var.HEADMASTER_ID}');"> | ||
108 | + <i class="ace-icon fa fa-trash-o bigger-120" title="删除"></i> | ||
109 | + </a> | ||
110 | + </c:if> | ||
111 | + </div> | ||
112 | + <div class="hidden-md hidden-lg"> | ||
113 | + <div class="inline pos-rel"> | ||
114 | + <button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown" data-position="auto"> | ||
115 | + <i class="ace-icon fa fa-cog icon-only bigger-110"></i> | ||
116 | + </button> | ||
117 | + | ||
118 | + <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close"> | ||
119 | + <c:if test="${QX.edit == 1 }"> | ||
120 | + <li> | ||
121 | + <a style="cursor:pointer;" onclick="edit('${var.HEADMASTER_ID}');" class="tooltip-success" data-rel="tooltip" title="修改"> | ||
122 | + <span class="green"> | ||
123 | + <i class="ace-icon fa fa-pencil-square-o bigger-120"></i> | ||
124 | + </span> | ||
125 | + </a> | ||
126 | + </li> | ||
127 | + </c:if> | ||
128 | + <c:if test="${QX.del == 1 }"> | ||
129 | + <li> | ||
130 | + <a style="cursor:pointer;" onclick="del('${var.HEADMASTER_ID}');" class="tooltip-error" data-rel="tooltip" title="删除"> | ||
131 | + <span class="red"> | ||
132 | + <i class="ace-icon fa fa-trash-o bigger-120"></i> | ||
133 | + </span> | ||
134 | + </a> | ||
135 | + </li> | ||
136 | + </c:if> | ||
137 | + </ul> | ||
138 | + </div> | ||
139 | + </div> | ||
140 | + </td> | ||
141 | + </tr> | ||
142 | + | ||
143 | + </c:forEach> | ||
144 | + </c:if> | ||
145 | + <c:if test="${QX.cha == 0 }"> | ||
146 | + <tr> | ||
147 | + <td colspan="100" class="center">您无权查看</td> | ||
148 | + </tr> | ||
149 | + </c:if> | ||
150 | + </c:when> | ||
151 | + <c:otherwise> | ||
152 | + <tr class="main_info"> | ||
153 | + <td colspan="100" class="center" >没有相关数据</td> | ||
154 | + </tr> | ||
155 | + </c:otherwise> | ||
156 | + </c:choose> | ||
157 | + </tbody> | ||
158 | + </table> | ||
159 | + <div class="page-header position-relative"> | ||
160 | + <table style="width:100%;"> | ||
161 | + <tr> | ||
162 | + <td style="vertical-align:top;"> | ||
163 | + <c:if test="${QX.add == 1 }"> | ||
164 | + <a class="btn btn-mini btn-success" onclick="add();">新增</a> | ||
165 | + </c:if> | ||
166 | + <c:if test="${QX.del == 1 }"> | ||
167 | + <a class="btn btn-mini btn-danger" onclick="makeAll('确定要删除选中的数据吗?');" title="批量删除" ><i class='ace-icon fa fa-trash-o bigger-120'></i></a> | ||
168 | + </c:if> | ||
169 | + </td> | ||
170 | + <td style="vertical-align:top;"><div class="pagination" style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div></td> | ||
171 | + </tr> | ||
172 | + </table> | ||
173 | + </div> | ||
174 | + </form> | ||
175 | + | ||
176 | + </div> | ||
177 | + <!-- /.col --> | ||
178 | + </div> | ||
179 | + <!-- /.row --> | ||
180 | + </div> | ||
181 | + <!-- /.page-content --> | ||
182 | + </div> | ||
183 | + </div> | ||
184 | + <!-- /.main-content --> | ||
185 | + | ||
186 | + <!-- 返回顶部 --> | ||
187 | + <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse"> | ||
188 | + <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i> | ||
189 | + </a> | ||
190 | + | ||
191 | + </div> | ||
192 | + <!-- /.main-container --> | ||
193 | + | ||
194 | + <!-- basic scripts --> | ||
195 | + <!-- 页面底部js¨ --> | ||
196 | + <%@ include file="../../system/index/foot.jsp"%> | ||
197 | + <!-- 删除时确认窗口 --> | ||
198 | + <script src="static/ace/js/bootbox.js"></script> | ||
199 | + <!-- ace scripts --> | ||
200 | + <script src="static/ace/js/ace/ace.js"></script> | ||
201 | + <!-- 下拉框 --> | ||
202 | + <script src="static/ace/js/chosen.jquery.js"></script> | ||
203 | + <!-- 日期框 --> | ||
204 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | ||
205 | + <!--提示框--> | ||
206 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | ||
207 | + <script type="text/javascript"> | ||
208 | + $(top.hangge());//关闭加载状态 | ||
209 | + //检索 | ||
210 | + function tosearch(){ | ||
211 | + top.jzts(); | ||
212 | + $("#Form").submit(); | ||
213 | + } | ||
214 | + $(function() { | ||
215 | + | ||
216 | + //日期框 | ||
217 | + $('.date-picker').datepicker({ | ||
218 | + autoclose: true, | ||
219 | + todayHighlight: true | ||
220 | + }); | ||
221 | + | ||
222 | + //下拉框 | ||
223 | + if(!ace.vars['touch']) { | ||
224 | + $('.chosen-select').chosen({allow_single_deselect:true}); | ||
225 | + $(window) | ||
226 | + .off('resize.chosen') | ||
227 | + .on('resize.chosen', function() { | ||
228 | + $('.chosen-select').each(function() { | ||
229 | + var $this = $(this); | ||
230 | + $this.next().css({'width': $this.parent().width()}); | ||
231 | + }); | ||
232 | + }).trigger('resize.chosen'); | ||
233 | + $(document).on('settings.ace.chosen', function(e, event_name, event_val) { | ||
234 | + if(event_name != 'sidebar_collapsed') return; | ||
235 | + $('.chosen-select').each(function() { | ||
236 | + var $this = $(this); | ||
237 | + $this.next().css({'width': $this.parent().width()}); | ||
238 | + }); | ||
239 | + }); | ||
240 | + $('#chosen-multiple-style .btn').on('click', function(e){ | ||
241 | + var target = $(this).find('input[type=radio]'); | ||
242 | + var which = parseInt(target.val()); | ||
243 | + if(which == 2) $('#form-field-select-4').addClass('tag-input-style'); | ||
244 | + else $('#form-field-select-4').removeClass('tag-input-style'); | ||
245 | + }); | ||
246 | + } | ||
247 | + | ||
248 | + | ||
249 | + //复选框全选控制 | ||
250 | + var active_class = 'active'; | ||
251 | + $('#simple-table > thead > tr > th input[type=checkbox]').eq(0).on('click', function(){ | ||
252 | + var th_checked = this.checked;//checkbox inside "TH" table header | ||
253 | + $(this).closest('table').find('tbody > tr').each(function(){ | ||
254 | + var row = this; | ||
255 | + if(th_checked) $(row).addClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', true); | ||
256 | + else $(row).removeClass(active_class).find('input[type=checkbox]').eq(0).prop('checked', false); | ||
257 | + }); | ||
258 | + }); | ||
259 | + }); | ||
260 | + | ||
261 | + //新增 | ||
262 | + function add(){ | ||
263 | + top.jzts(); | ||
264 | + var diag = new top.Dialog(); | ||
265 | + diag.Drag=true; | ||
266 | + diag.Title ="新增"; | ||
267 | + diag.URL = '<%=basePath%>headmaster/goAdd.do'; | ||
268 | + diag.Width = 450; | ||
269 | + diag.Height = 355; | ||
270 | + diag.Modal = true; //有无遮罩窗口 | ||
271 | + diag. ShowMaxButton = true; //最大化按钮 | ||
272 | + diag.ShowMinButton = true; //最小化按钮 | ||
273 | + diag.CancelEvent = function(){ //关闭事件 | ||
274 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | ||
275 | + if('${page.currentPage}' == '0'){ | ||
276 | + tosearch(); | ||
277 | + }else{ | ||
278 | + tosearch(); | ||
279 | + } | ||
280 | + } | ||
281 | + diag.close(); | ||
282 | + }; | ||
283 | + diag.show(); | ||
284 | + } | ||
285 | + | ||
286 | + //删除 | ||
287 | + function del(Id){ | ||
288 | + bootbox.confirm("确定要删除吗?", function(result) { | ||
289 | + if(result) { | ||
290 | + top.jzts(); | ||
291 | + var url = "<%=basePath%>headmaster/delete.do?HEADMASTER_ID="+Id+"&tm="+new Date().getTime(); | ||
292 | + $.get(url,function(data){ | ||
293 | + tosearch(); | ||
294 | + }); | ||
295 | + } | ||
296 | + }); | ||
297 | + } | ||
298 | + | ||
299 | + //修改 | ||
300 | + function edit(Id){ | ||
301 | + top.jzts(); | ||
302 | + var diag = new top.Dialog(); | ||
303 | + diag.Drag=true; | ||
304 | + diag.Title ="编辑"; | ||
305 | + diag.URL = '<%=basePath%>headmaster/goEdit.do?HEADMASTER_ID='+Id; | ||
306 | + diag.Width = 450; | ||
307 | + diag.Height = 355; | ||
308 | + diag.Modal = true; //有无遮罩窗口 | ||
309 | + diag. ShowMaxButton = true; //最大化按钮 | ||
310 | + diag.ShowMinButton = true; //最小化按钮 | ||
311 | + diag.CancelEvent = function(){ //关闭事件 | ||
312 | + if(diag.innerFrame.contentWindow.document.getElementById('zhongxin').style.display == 'none'){ | ||
313 | + tosearch(); | ||
314 | + } | ||
315 | + diag.close(); | ||
316 | + }; | ||
317 | + diag.show(); | ||
318 | + } | ||
319 | + | ||
320 | + //批量操作 | ||
321 | + function makeAll(msg){ | ||
322 | + bootbox.confirm(msg, function(result) { | ||
323 | + if(result) { | ||
324 | + var str = ''; | ||
325 | + for(var i=0;i < document.getElementsByName('ids').length;i++){ | ||
326 | + if(document.getElementsByName('ids')[i].checked){ | ||
327 | + if(str=='') str += document.getElementsByName('ids')[i].value; | ||
328 | + else str += ',' + document.getElementsByName('ids')[i].value; | ||
329 | + } | ||
330 | + } | ||
331 | + if(str==''){ | ||
332 | + bootbox.dialog({ | ||
333 | + message: "<span class='bigger-110'>您没有选择任何内容!</span>", | ||
334 | + buttons: | ||
335 | + { "button":{ "label":"确定", "className":"btn-sm btn-success"}} | ||
336 | + }); | ||
337 | + $("#zcheckbox").tips({ | ||
338 | + side:1, | ||
339 | + msg:'点这里全选', | ||
340 | + bg:'#AE81FF', | ||
341 | + time:8 | ||
342 | + }); | ||
343 | + return; | ||
344 | + }else{ | ||
345 | + if(msg == '确定要删除选中的数据吗?'){ | ||
346 | + top.jzts(); | ||
347 | + $.ajax({ | ||
348 | + type: "POST", | ||
349 | + url: '<%=basePath%>headmaster/deleteAll.do?tm='+new Date().getTime(), | ||
350 | + data: {DATA_IDS:str}, | ||
351 | + dataType:'json', | ||
352 | + //beforeSend: validateData, | ||
353 | + cache: false, | ||
354 | + success: function(data){ | ||
355 | + $.each(data.list, function(i, list){ | ||
356 | + tosearch(); | ||
357 | + }); | ||
358 | + } | ||
359 | + }); | ||
360 | + } | ||
361 | + } | ||
362 | + } | ||
363 | + }); | ||
364 | + }; | ||
365 | + | ||
366 | + //导出excel | ||
367 | + function toExcel(){ | ||
368 | + window.location.href='<%=basePath%>headmaster/excel.do'; | ||
369 | + } | ||
370 | + </script> | ||
371 | + | ||
372 | + | ||
373 | +</body> | ||
374 | +</html> | ||
0 | \ No newline at end of file | 375 | \ No newline at end of file |
WebRoot/WEB-INF/jsp/sunvote/pagetemplate/pagetemplate_list2.jsp
@@ -73,12 +73,13 @@ | @@ -73,12 +73,13 @@ | ||
73 | 73 | ||
74 | <c:forEach items="${varList}" var="var" varStatus="vs"> | 74 | <c:forEach items="${varList}" var="var" varStatus="vs"> |
75 | <tr> | 75 | <tr> |
76 | - <td><input type="checkbox" name='ids' id="ids" value="${var.ID}" />${vs.index+1}</td> | 76 | + <td><input type="checkbox" name='ids' id="ids" value="${var.PAGETEMPLATE_ID}" />${vs.index+1}</td> |
77 | <td class='center'>${var.NAME}</td> | 77 | <td class='center'>${var.NAME}</td> |
78 | <td class='center'>${myelfun:findSubjectCName(var.SUBJECT_ID)}</td> | 78 | <td class='center'>${myelfun:findSubjectCName(var.SUBJECT_ID)}</td> |
79 | <td class='center'>${myelfun:findGradeName(var.GRADE_ID)}</td> | 79 | <td class='center'>${myelfun:findGradeName(var.GRADE_ID)}</td> |
80 | <td class='center'>${var.PAGE_SCORE}</td> | 80 | <td class='center'>${var.PAGE_SCORE}</td> |
81 | - <td><a onclick="edit('${var.ID}');" style="margin-right:10px;"><img src="static/images/eidtor.png" /></a><a onclick="del('${var.ID}');"><img src="static/images/remove.png" /></a></td> | 81 | + <td><a hidden onclick="edit('${var.PAGETEMPLATE_ID}');" style="margin-right:10px;"><img src="static/images/eidtor.png" /></a> |
82 | + <a onclick="del('${var.PAGETEMPLATE_ID}');"><img src="static/images/remove.png" /></a></td> | ||
82 | </tr> | 83 | </tr> |
83 | 84 | ||
84 | </c:forEach> | 85 | </c:forEach> |
@@ -98,7 +99,7 @@ | @@ -98,7 +99,7 @@ | ||
98 | <input type="button" onclick="$('.title_time').modal('show');" value="添加模板" /> | 99 | <input type="button" onclick="$('.title_time').modal('show');" value="添加模板" /> |
99 | </div> | 100 | </div> |
100 | <div class="removeAll"> | 101 | <div class="removeAll"> |
101 | - <input type="button" onclick="del()" value="批量删除" /> | 102 | + <input type="button" onclick="del('')" value="批量删除" /> |
102 | </div> | 103 | </div> |
103 | <div class="page_box"> | 104 | <div class="page_box"> |
104 | 105 | ||
@@ -189,7 +190,7 @@ | @@ -189,7 +190,7 @@ | ||
189 | var grade_id = $("#grade_id").val(); | 190 | var grade_id = $("#grade_id").val(); |
190 | 191 | ||
191 | if(name != null&& name != ''){ | 192 | if(name != null&& name != ''){ |
192 | - self.location.href = "<%=basePath%>" + "pagetemplate/npaper.do?name=" + name + "&grade_id=" + grade_id +"&subject_id=" + subject_id ; | 193 | + self.location.href = "<%=basePath%>" + "pagetemplate/npaper.do?school_id=${pd.SCHOOL_ID}&subject_id=" + subject_id + "&grade_id=" + grade_id + "&name=" + name; |
193 | $(".title_time").modal("hide"); | 194 | $(".title_time").modal("hide"); |
194 | }else{ | 195 | }else{ |
195 | alert("请输入正确的模板名称"); | 196 | alert("请输入正确的模板名称"); |
@@ -233,17 +234,21 @@ | @@ -233,17 +234,21 @@ | ||
233 | }; | 234 | }; |
234 | diag.show(); | 235 | diag.show(); |
235 | } | 236 | } |
236 | - | 237 | + function tosearch(){ |
238 | + $("#Form").submit(); | ||
239 | + } | ||
237 | //删除 | 240 | //删除 |
238 | function del(Id){ | 241 | function del(Id){ |
239 | window.top.remove.init({"title":"删除","func":function(success){ | 242 | window.top.remove.init({"title":"删除","func":function(success){ |
240 | if(success){ | 243 | if(success){ |
241 | - var str = ''; | ||
242 | - for(var i=0;i < document.getElementsByName('ids').length;i++){ | ||
243 | - if(document.getElementsByName('ids')[i].checked){ | ||
244 | - if(str=='') str += document.getElementsByName('ids')[i].value; | ||
245 | - else str += ',' + document.getElementsByName('ids')[i].value; | ||
246 | - } | 244 | + var str = Id; |
245 | + if(str == ''){ | ||
246 | + for(var i=0;i < document.getElementsByName('ids').length;i++){ | ||
247 | + if(document.getElementsByName('ids')[i].checked){ | ||
248 | + if(str=='') str += document.getElementsByName('ids')[i].value; | ||
249 | + else str += ',' + document.getElementsByName('ids')[i].value; | ||
250 | + } | ||
251 | + } | ||
247 | } | 252 | } |
248 | if(str==''){ | 253 | if(str==''){ |
249 | 254 |
WebRoot/WEB-INF/jsp/sunvote/school/school_edit2.jsp
@@ -63,6 +63,8 @@ | @@ -63,6 +63,8 @@ | ||
63 | </head> | 63 | </head> |
64 | <body class="no-skin"> | 64 | <body class="no-skin"> |
65 | <!-- /section:basics/navbar.layout --> | 65 | <!-- /section:basics/navbar.layout --> |
66 | + <form action="school/${msg }.do" name="Form" id="Form" method="post"> | ||
67 | + <input type="hidden" name="ID" id="ID" value="${pd.ID}"/> | ||
66 | <div class="head_box" style="position:relative;"> | 68 | <div class="head_box" style="position:relative;"> |
67 | <div class="box_header"> | 69 | <div class="box_header"> |
68 | <div class="head_box_l"> | 70 | <div class="head_box_l"> |
@@ -81,7 +83,7 @@ | @@ -81,7 +83,7 @@ | ||
81 | <div class="form-group"> | 83 | <div class="form-group"> |
82 | <label for="enter_title" class="col-sm-4 control-label">学校名称:</label> | 84 | <label for="enter_title" class="col-sm-4 control-label">学校名称:</label> |
83 | <div class="col-sm-8"> | 85 | <div class="col-sm-8"> |
84 | - <input type="text" class="form-control" id="enter_title" disabled placeholder="输入学校名称" maxlength="100" minlength="1" value="${pd.NAME}"> | 86 | + <input type="text" class="form-control" disabled placeholder="输入学校名称" maxlength="100" minlength="1" name="NAME" id="NAME" value="${pd.NAME}"> |
85 | </div> | 87 | </div> |
86 | <div class="clearfix"></div> | 88 | <div class="clearfix"></div> |
87 | </div> | 89 | </div> |
@@ -89,28 +91,28 @@ | @@ -89,28 +91,28 @@ | ||
89 | <div class="form-group"> | 91 | <div class="form-group"> |
90 | <label for="enter_time" class="col-sm-4 control-label">学校地址:</label> | 92 | <label for="enter_time" class="col-sm-4 control-label">学校地址:</label> |
91 | <div class="col-sm-8"> | 93 | <div class="col-sm-8"> |
92 | - <input type="text" class="form-control" id="enter_time" disabled placeholder="输入学校地址" value="${pd.ADDRESS}" maxlength="255" > | 94 | + <input type="text" class="form-control" disabled placeholder="输入学校地址" name="ADDRESS" id="ADDRESS" value="${pd.ADDRESS}" maxlength="255" > |
93 | </div> | 95 | </div> |
94 | <div class="clearfix"></div> | 96 | <div class="clearfix"></div> |
95 | </div> | 97 | </div> |
96 | <div class="form-group"> | 98 | <div class="form-group"> |
97 | <label for="enter_time" class="col-sm-4 control-label">校长:</label> | 99 | <label for="enter_time" class="col-sm-4 control-label">校长:</label> |
98 | <div class="col-sm-8"> | 100 | <div class="col-sm-8"> |
99 | - <input type="text" class="form-control" id="enter_time" disabled placeholder="输入校长名称" value="${pd.PRESIDENT}" maxlength="255" > | 101 | + <input type="text" class="form-control" disabled placeholder="输入校长名称" name="PRESIDENT" id="PRESIDENT" value="${pd.PRESIDENT}" maxlength="255" > |
100 | </div> | 102 | </div> |
101 | <div class="clearfix"></div> | 103 | <div class="clearfix"></div> |
102 | </div> | 104 | </div> |
103 | <div class="form-group"> | 105 | <div class="form-group"> |
104 | <label for="enter_time" class="col-sm-4 control-label">联系电话:</label> | 106 | <label for="enter_time" class="col-sm-4 control-label">联系电话:</label> |
105 | <div class="col-sm-8"> | 107 | <div class="col-sm-8"> |
106 | - <input type="text" class="form-control" id="enter_time" disabled placeholder="输入联系电话" value="${pd.PHONE}" maxlength="255" > | 108 | + <input type="text" class="form-control" disabled placeholder="输入联系电话" name="PHONE" id="PHONE" value="${pd.PHONE}" maxlength="255" > |
107 | </div> | 109 | </div> |
108 | <div class="clearfix"></div> | 110 | <div class="clearfix"></div> |
109 | </div> | 111 | </div> |
110 | <div class="form-group"> | 112 | <div class="form-group"> |
111 | <label for="enter_time" class="col-sm-4 control-label">备注:</label> | 113 | <label for="enter_time" class="col-sm-4 control-label">备注:</label> |
112 | <div class="col-sm-8"> | 114 | <div class="col-sm-8"> |
113 | - <input type="text" class="form-control" id="enter_time" disabled placeholder="输入备注" value="${pd.REMARK}" maxlength="255" > | 115 | + <input type="text" class="form-control" disabled placeholder="输入备注" name="REMARK" id="REMARK" value="${pd.REMARK}" maxlength="255" > |
114 | </div> | 116 | </div> |
115 | <div class="clearfix"></div> | 117 | <div class="clearfix"></div> |
116 | </div> | 118 | </div> |
@@ -121,7 +123,7 @@ | @@ -121,7 +123,7 @@ | ||
121 | <div class="edit_btn"> | 123 | <div class="edit_btn"> |
122 | <input type="button" class="edit_btn_sty" data-state="edit" id="btn" value="修改" /> | 124 | <input type="button" class="edit_btn_sty" data-state="edit" id="btn" value="修改" /> |
123 | </div> | 125 | </div> |
124 | - | 126 | + </form> |
125 | 127 | ||
126 | 128 | ||
127 | 129 | ||
@@ -145,6 +147,7 @@ | @@ -145,6 +147,7 @@ | ||
145 | $("#btn").val("保存"); | 147 | $("#btn").val("保存"); |
146 | $(this).attr({"class":"save_btn_sty","data-state":"save"}); | 148 | $(this).attr({"class":"save_btn_sty","data-state":"save"}); |
147 | }else if(state=="save"){ | 149 | }else if(state=="save"){ |
150 | + $("#Form").submit(); | ||
148 | $(".form-control").attr("disabled","disabled"); | 151 | $(".form-control").attr("disabled","disabled"); |
149 | $("#btn").val("修改"); | 152 | $("#btn").val("修改"); |
150 | $(this).attr({"class":"edit_btn_sty","data-state":"edit"}); | 153 | $(this).attr({"class":"edit_btn_sty","data-state":"edit"}); |
WebRoot/WEB-INF/jsp/sunvote/sclass/sclass_edit2.jsp
@@ -49,7 +49,7 @@ | @@ -49,7 +49,7 @@ | ||
49 | <td style="width:75px;text-align: right;padding-top: 13px;">所属年级:</td> | 49 | <td style="width:75px;text-align: right;padding-top: 13px;">所属年级:</td> |
50 | <td> | 50 | <td> |
51 | <%-- <input type="text" name="GRADE_ID" id="GRADE_ID" value="${pd.GRADE_ID}" maxlength="255" placeholder="这里输入所属年级" title="所属年级" style="width:98%;"/></td> --%> | 51 | <%-- <input type="text" name="GRADE_ID" id="GRADE_ID" value="${pd.GRADE_ID}" maxlength="255" placeholder="这里输入所属年级" title="所属年级" style="width:98%;"/></td> --%> |
52 | - <select class="chosen-select form-control" name="GRADE_ID" id="GRADE_ID" data-placeholder="这里输入所属年级" > | 52 | + <select class="chosen-select form-control" name="GRADE_ID" disabled="disabled" id="GRADE_ID" data-placeholder="这里输入所属年级" > |
53 | <c:forEach var="item" items="${grades}"> | 53 | <c:forEach var="item" items="${grades}"> |
54 | <option value="${item.ID}" <c:if test="${pd.GRADE_ID==item.ID}">selected="true"</c:if>>${item.NAME}</option> | 54 | <option value="${item.ID}" <c:if test="${pd.GRADE_ID==item.ID}">selected="true"</c:if>>${item.NAME}</option> |
55 | </c:forEach> | 55 | </c:forEach> |
WebRoot/WEB-INF/jsp/sunvote/subject/subject_edit2.jsp
@@ -28,7 +28,7 @@ | @@ -28,7 +28,7 @@ | ||
28 | <div class="row"> | 28 | <div class="row"> |
29 | <div class="col-xs-12"> | 29 | <div class="col-xs-12"> |
30 | 30 | ||
31 | - <form action="subject/${msg }.do" name="Form" id="Form" method="post"> | 31 | + <form action="subject/${msg}.do" name="Form" id="Form" method="post"> |
32 | <input type="hidden" name="SCHOOL_ID" id="SCHOOL_ID" value="${pd.SCHOOL_ID}"/> | 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}"/> | 33 | <input type="hidden" name="GRADE_ID" id="GRADE_ID" value="${pd.GRADE_ID}"/> |
34 | <div id="zhongxin" style="padding-top: 13px;"> | 34 | <div id="zhongxin" style="padding-top: 13px;"> |
@@ -75,14 +75,13 @@ | @@ -75,14 +75,13 @@ | ||
75 | <!--提示框--> | 75 | <!--提示框--> |
76 | <script type="text/javascript" src="static/js/jquery.tips.js"></script> | 76 | <script type="text/javascript" src="static/js/jquery.tips.js"></script> |
77 | <script type="text/javascript"> | 77 | <script type="text/javascript"> |
78 | - $(top.hangge()); | 78 | + |
79 | //保存 | 79 | //保存 |
80 | function save(){ | 80 | function save(){ |
81 | $("#Form").submit(); | 81 | $("#Form").submit(); |
82 | $("#zhongxin").hide(); | 82 | $("#zhongxin").hide(); |
83 | $("#zhongxin2").show(); | 83 | $("#zhongxin2").show(); |
84 | - window.top.modal.remove(); | ||
85 | - tosearch(); | 84 | + // window.top.modal.remove(); |
86 | } | 85 | } |
87 | 86 | ||
88 | $(function() { | 87 | $(function() { |
WebRoot/WEB-INF/jsp/sunvote/subject/subject_list2.jsp
@@ -27,6 +27,7 @@ | @@ -27,6 +27,7 @@ | ||
27 | <body class="no-skin"> | 27 | <body class="no-skin"> |
28 | <form action="subject/listcs.do" method="post" name="Form" id="Form"> | 28 | <form action="subject/listcs.do" method="post" name="Form" id="Form"> |
29 | <input type="hidden" name="SCHOOL_ID" id="SCHOOL_ID" value="${pd.SCHOOL_ID}"/> | 29 | <input type="hidden" name="SCHOOL_ID" id="SCHOOL_ID" value="${pd.SCHOOL_ID}"/> |
30 | + <input type="hidden" name="GRADE_ID" id="GRADE_ID" value="${pd.GRADE_ID}"/> | ||
30 | <div class="head_box"> | 31 | <div class="head_box"> |
31 | <div class="box_header"> | 32 | <div class="box_header"> |
32 | <div class="head_box_l"> | 33 | <div class="head_box_l"> |
@@ -119,6 +120,9 @@ | @@ -119,6 +120,9 @@ | ||
119 | $(document).ready(function(){ | 120 | $(document).ready(function(){ |
120 | window.top.loading.remove(); | 121 | window.top.loading.remove(); |
121 | }); | 122 | }); |
123 | + function tosearch(){ | ||
124 | + $("#Form").submit(); | ||
125 | + } | ||
122 | function del(Id){ | 126 | function del(Id){ |
123 | window.top.remove.init({"title":"删除","func":function(success){ | 127 | window.top.remove.init({"title":"删除","func":function(success){ |
124 | if(success){ | 128 | if(success){ |
WebRoot/WEB-INF/jsp/sunvote/teacher/creat_template.jsp
@@ -12,7 +12,7 @@ | @@ -12,7 +12,7 @@ | ||
12 | 12 | ||
13 | <html lang="en"> | 13 | <html lang="en"> |
14 | <head> | 14 | <head> |
15 | - <title>创建试卷</title> | 15 | + <title>创建模板</title> |
16 | <!-- 最新版本的 Bootstrap 核心 CSS 文件 --> | 16 | <!-- 最新版本的 Bootstrap 核心 CSS 文件 --> |
17 | <link rel="stylesheet" href="../static/css/bootstrap.min.css"> | 17 | <link rel="stylesheet" href="../static/css/bootstrap.min.css"> |
18 | <link rel="stylesheet" href="../static/css/style.css"/> | 18 | <link rel="stylesheet" href="../static/css/style.css"/> |
@@ -114,17 +114,13 @@ | @@ -114,17 +114,13 @@ | ||
114 | <img src="../static/images/loading.gif" width="200px" style="position:absolute;top:0;bottom:0;left:0;right:0;margin:auto;"/> | 114 | <img src="../static/images/loading.gif" width="200px" style="position:absolute;top:0;bottom:0;left:0;right:0;margin:auto;"/> |
115 | </div> | 115 | </div> |
116 | <script> | 116 | <script> |
117 | - var testData = ${pd.JSON}; | ||
118 | var template = ${TEMPLEATE == null ? "[]" : TEMPLEATE.CONTENT}; | 117 | var template = ${TEMPLEATE == null ? "[]" : TEMPLEATE.CONTENT}; |
119 | - var URL = "<%=basePath%>api/v1/uploadpaper"; | 118 | + var URL = "<%=basePath%>pagetemplate/save2.do?user_id=${pd.USER_ID}&name=${pd.NAME}&subject_id=${pd.SUBJECT_ID}&school_id=${pd.SCHOOL_ID}&grade_id=${pd.GRADE_ID}&content="; |
120 | var JUMP_URL = "<%=basePath%>/${JUMP_URL}"; | 119 | var JUMP_URL = "<%=basePath%>/${JUMP_URL}"; |
121 | - if(testData.questions.length>0){ | ||
122 | - var title = testData.title; | ||
123 | - if(title == null || title == ''){ | ||
124 | - title = "浏览试卷"; | ||
125 | - } | ||
126 | - $("title").html(title); | ||
127 | - } | 120 | + var subject_id = '${pd.SUBJECT_ID}'; |
121 | + var school_id = '${pd.SCHOOL_ID}'; | ||
122 | + var grade_id = '${pd.GRADE_ID}'; | ||
123 | + var title = '${pd.NAME}'; | ||
128 | $(document).ready(function(){ | 124 | $(document).ready(function(){ |
129 | var _height = $(".page-header").height(); | 125 | var _height = $(".page-header").height(); |
130 | $(".content").css("padding-top",_height); | 126 | $(".content").css("padding-top",_height); |
@@ -136,7 +132,7 @@ | @@ -136,7 +132,7 @@ | ||
136 | //var testData={"title":"TEST1","exam_time":46,"paper_type":"1","subject_id":"1","grade_id":"1","user_id":"1","score":5,"questions":[{"chapter_id":"0","problem_type_id":"0","knowledge_id":"0","content":"单选","option_num":"","option_content":"","answer":"","difficulty":"","analysis":"","question_from":"","score":1,"part_score":"","remark":"","rank":"1","no_name":"一、","questions":[{"chapter_id":"0","problem_type_id":"0","knowledge_id":"0","content":"","option_num":4,"option_content":"","answer":"A","difficulty":"0","analysis":"","question_from":"1","score":1,"part_score":"0","remark":"","rank":"2","no_name":"1.1"},{"chapter_id":"0","problem_type_id":"0","knowledge_id":"0","content":"","option_num":4,"option_content":"","answer":"B","difficulty":"0","analysis":"","question_from":"1","score":1,"part_score":"0","remark":"","rank":"2","no_name":"1.2"},{"chapter_id":"0","problem_type_id":"0","knowledge_id":"0","content":"","option_num":4,"option_content":"","answer":"C","difficulty":"0","analysis":"","question_from":"1","score":1,"part_score":"0","remark":"","rank":"2","no_name":"1.3"},{"chapter_id":"0","problem_type_id":"0","knowledge_id":"0","content":"","option_num":4,"option_content":"","answer":"D","difficulty":"0","analysis":"","question_from":"1","score":1,"part_score":"0","remark":"","rank":"2","no_name":"1.4"},{"chapter_id":"0","problem_type_id":"0","knowledge_id":"0","content":"","option_num":4,"option_content":"","answer":"A","difficulty":"0","analysis":"","question_from":"1","score":1,"part_score":"0","remark":"","rank":"2","no_name":"1.5"}]}]}; | 132 | //var testData={"title":"TEST1","exam_time":46,"paper_type":"1","subject_id":"1","grade_id":"1","user_id":"1","score":5,"questions":[{"chapter_id":"0","problem_type_id":"0","knowledge_id":"0","content":"单选","option_num":"","option_content":"","answer":"","difficulty":"","analysis":"","question_from":"","score":1,"part_score":"","remark":"","rank":"1","no_name":"一、","questions":[{"chapter_id":"0","problem_type_id":"0","knowledge_id":"0","content":"","option_num":4,"option_content":"","answer":"A","difficulty":"0","analysis":"","question_from":"1","score":1,"part_score":"0","remark":"","rank":"2","no_name":"1.1"},{"chapter_id":"0","problem_type_id":"0","knowledge_id":"0","content":"","option_num":4,"option_content":"","answer":"B","difficulty":"0","analysis":"","question_from":"1","score":1,"part_score":"0","remark":"","rank":"2","no_name":"1.2"},{"chapter_id":"0","problem_type_id":"0","knowledge_id":"0","content":"","option_num":4,"option_content":"","answer":"C","difficulty":"0","analysis":"","question_from":"1","score":1,"part_score":"0","remark":"","rank":"2","no_name":"1.3"},{"chapter_id":"0","problem_type_id":"0","knowledge_id":"0","content":"","option_num":4,"option_content":"","answer":"D","difficulty":"0","analysis":"","question_from":"1","score":1,"part_score":"0","remark":"","rank":"2","no_name":"1.4"},{"chapter_id":"0","problem_type_id":"0","knowledge_id":"0","content":"","option_num":4,"option_content":"","answer":"A","difficulty":"0","analysis":"","question_from":"1","score":1,"part_score":"0","remark":"","rank":"2","no_name":"1.5"}]}]}; |
137 | //var testData={"title":"TEST1","exam_time":46,"paper_type":"1","subject_id":"1","grade_id":"1","user_id":"1","score":5,"questions":[]}; | 133 | //var testData={"title":"TEST1","exam_time":46,"paper_type":"1","subject_id":"1","grade_id":"1","user_id":"1","score":5,"questions":[]}; |
138 | </script> | 134 | </script> |
139 | -<script type="text/javascript" src="../static/js/control_template.js?a=3"></script> | 135 | +<script type="text/javascript" src="../static/js/control_template.js?a=0"></script> |
140 | 136 | ||
141 | 137 | ||
142 | </body> | 138 | </body> |
WebRoot/WEB-INF/jsp/sunvote/teacher/teacher_list2.jsp
@@ -181,7 +181,7 @@ | @@ -181,7 +181,7 @@ | ||
181 | 181 | ||
182 | </div> | 182 | </div> |
183 | <div class="modal-footer"> | 183 | <div class="modal-footer"> |
184 | - <button type="button" class="btn btn-primary" id="time_submit">确定</button> | 184 | + <button type="button" class="btn btn-primary" id="time_submit" onclick="save()">确定</button> |
185 | <button type="button" class="btn btn-primary" data-dismiss="modal">取消</button> | 185 | <button type="button" class="btn btn-primary" data-dismiss="modal">取消</button> |
186 | </div> | 186 | </div> |
187 | </div><!-- /.modal-content --> | 187 | </div><!-- /.modal-content --> |
@@ -216,6 +216,10 @@ | @@ -216,6 +216,10 @@ | ||
216 | }); | 216 | }); |
217 | window.top.modal.show(); | 217 | window.top.modal.show(); |
218 | } | 218 | } |
219 | + | ||
220 | + function save(){ | ||
221 | + | ||
222 | + } | ||
219 | </script> | 223 | </script> |
220 | 224 | ||
221 | 225 |
WebRoot/static/js/control_template.js
@@ -189,24 +189,12 @@ $(function() { | @@ -189,24 +189,12 @@ $(function() { | ||
189 | 189 | ||
190 | /* 提交保存数据 */ | 190 | /* 提交保存数据 */ |
191 | $("#save").click(function() { | 191 | $("#save").click(function() { |
192 | - var url = URL; | ||
193 | - | ||
194 | - var data = { | ||
195 | - title : $(".header_box h1").text(), | ||
196 | - //exam_time : parseInt($("#time").text()), | ||
197 | - //paper_type : testData.paper_type, | ||
198 | - subject_id : testData.subject_id, | ||
199 | - grade_id : testData.grade_id, | ||
200 | - user_id : testData.user_id, | ||
201 | - school_id : testData.school_id, | ||
202 | - score : total_score, | ||
203 | - questions : [] | ||
204 | - }; | 192 | + var content = []; |
205 | 193 | ||
206 | if ($(".section").length > 0) { | 194 | if ($(".section").length > 0) { |
207 | var rank = 0; | 195 | var rank = 0; |
208 | for (i = 0; i < $(".section").length; i++) { | 196 | for (i = 0; i < $(".section").length; i++) { |
209 | - data.questions[i] = { | 197 | + content[i] = { |
210 | index: i+1, | 198 | index: i+1, |
211 | type: $(".section").eq(i).attr("data-type"), | 199 | type: $(".section").eq(i).attr("data-type"), |
212 | questionNum: $(".section").eq(i).attr("data-questionNum"), | 200 | questionNum: $(".section").eq(i).attr("data-questionNum"), |
@@ -215,15 +203,7 @@ $(function() { | @@ -215,15 +203,7 @@ $(function() { | ||
215 | }; | 203 | }; |
216 | } | 204 | } |
217 | } | 205 | } |
218 | - | ||
219 | - if (data.questions.length > 0) { | ||
220 | - data = JSON.stringify(data); | ||
221 | - dataJson = { | ||
222 | - "json" : data | ||
223 | - }; | ||
224 | - ajax_submit(url, dataJson); | ||
225 | - } else | ||
226 | - alert("请添加试题"); | 206 | + self.location.href = URL + JSON.stringify(content) + "&page_score=" + total_score; |
227 | }); | 207 | }); |
228 | 208 | ||
229 | /* ajax封装函数 */ | 209 | /* ajax封装函数 */ |
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/education?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 |
resources/mybatis1/api/V1Mapper.xml
@@ -166,26 +166,18 @@ | @@ -166,26 +166,18 @@ | ||
166 | <!-- 通过admin ID获取科目数据 --> | 166 | <!-- 通过admin ID获取科目数据 --> |
167 | <select id="getAdminInfo" parameterType="pd" resultType="pd"> | 167 | <select id="getAdminInfo" parameterType="pd" resultType="pd"> |
168 | SELECT | 168 | SELECT |
169 | - sv_school.`NAME` AS SNAME, | ||
170 | - sv_school_admin.SCHOOL_ID, | ||
171 | - sv_schoolgradesubject.GRADE_ID, | ||
172 | - sv_grade.`NAME` as GNAME, | ||
173 | - sv_schoolgradesubject.SUBJECT_ID, | ||
174 | - sv_subject.CNAME as SCNAME | ||
175 | - FROM | ||
176 | - sv_school_admin | 169 | + sv_school.`NAME` AS SNAME, |
170 | + sv_school_admin.SCHOOL_ID, | ||
171 | + sv_school_admin.SCHOOL_ID AS ID | ||
172 | + FROM | ||
173 | + sv_school_admin | ||
177 | LEFT JOIN sv_school ON sv_school_admin.SCHOOL_ID = sv_school.ID | 174 | LEFT JOIN sv_school ON sv_school_admin.SCHOOL_ID = sv_school.ID |
178 | - LEFT JOIN sv_schoolgradesubject ON sv_school_admin.SCHOOL_ID = sv_schoolgradesubject.SCHOOL_ID | ||
179 | - LEFT JOIN sv_grade on sv_grade.ID = sv_schoolgradesubject.GRADE_ID | ||
180 | - LEFT JOIN sv_subject on sv_subject.ID = sv_schoolgradesubject.SUBJECT_ID | ||
181 | WHERE | 175 | WHERE |
182 | sv_school_admin.SCHOOLADMIN_ID = #{ID} | 176 | sv_school_admin.SCHOOLADMIN_ID = #{ID} |
183 | - | ||
184 | - ORDER BY GRADE_ID , SUBJECT_ID | ||
185 | - | ||
186 | </select> | 177 | </select> |
187 | 178 | ||
188 | 179 | ||
180 | + | ||
189 | <!-- 通过admin ID获取科目数据 --> | 181 | <!-- 通过admin ID获取科目数据 --> |
190 | <select id="getClassBySchoolAndGradle" parameterType="pd" resultType="pd"> | 182 | <select id="getClassBySchoolAndGradle" parameterType="pd" resultType="pd"> |
191 | SELECT | 183 | SELECT |
resources/mybatis1/sunvote/ClassTypeMapper.xml
@@ -26,9 +26,11 @@ | @@ -26,9 +26,11 @@ | ||
26 | insert into | 26 | insert into |
27 | <include refid="tableName"></include> | 27 | <include refid="tableName"></include> |
28 | ( | 28 | ( |
29 | + ID, | ||
29 | NAME, | 30 | NAME, |
30 | REMARK | 31 | REMARK |
31 | ) values ( | 32 | ) values ( |
33 | + #{ID}, | ||
32 | #{NAME}, | 34 | #{NAME}, |
33 | #{REMARK} | 35 | #{REMARK} |
34 | ) | 36 | ) |
resources/mybatis1/sunvote/CourseManagementMapper.xml
@@ -132,21 +132,20 @@ | @@ -132,21 +132,20 @@ | ||
132 | <select id="listCourse" parameterType="pd" resultType="pd"> | 132 | <select id="listCourse" parameterType="pd" resultType="pd"> |
133 | SELECT | 133 | SELECT |
134 | sv_teacher.`NAME`, | 134 | sv_teacher.`NAME`, |
135 | - sv_teacher.`ID`, | ||
136 | sv_sclass.CLASS_NAME, | 135 | sv_sclass.CLASS_NAME, |
137 | - sv_sclass.ID, | ||
138 | sv_subject.CNAME, | 136 | sv_subject.CNAME, |
139 | - sv_subject.ID, | 137 | + SV_COURSEMANAGEMENT.SUBJECT_ID, |
138 | + SV_COURSEMANAGEMENT.TEACHER_ID, | ||
139 | + SV_COURSEMANAGEMENT.CLASS_ID, | ||
140 | + SV_COURSEMANAGEMENT.ID, | ||
140 | SV_COURSEMANAGEMENT.HEAD_MASTER | 141 | SV_COURSEMANAGEMENT.HEAD_MASTER |
141 | FROM | 142 | FROM |
142 | SV_COURSEMANAGEMENT | 143 | SV_COURSEMANAGEMENT |
143 | LEFT JOIN sv_sclass ON SV_COURSEMANAGEMENT.CLASS_ID = sv_sclass.ID | 144 | LEFT JOIN sv_sclass ON SV_COURSEMANAGEMENT.CLASS_ID = sv_sclass.ID |
144 | - LEFT JOIN sv_schoolgradesubject ON sv_sclass.GRADE_ID = sv_schoolgradesubject.GRADE_ID | ||
145 | - AND sv_sclass.SCHOOL_ID = sv_schoolgradesubject.SCHOOL_ID | ||
146 | LEFT JOIN sv_teacher ON sv_coursemanagement.TEACHER_ID = sv_teacher.ID | 145 | LEFT JOIN sv_teacher ON sv_coursemanagement.TEACHER_ID = sv_teacher.ID |
147 | LEFT JOIN sv_subject on sv_coursemanagement.SUBJECT_ID = sv_subject.ID | 146 | LEFT JOIN sv_subject on sv_coursemanagement.SUBJECT_ID = sv_subject.ID |
148 | WHERE | 147 | WHERE |
149 | - sv_schoolgradesubject.SCHOOL_ID = #{SCHOOL_ID} | 148 | + SV_COURSEMANAGEMENT.SCHOOL_ID = #{SCHOOL_ID} |
150 | 149 | ||
151 | </select> | 150 | </select> |
152 | 151 | ||
@@ -154,21 +153,20 @@ | @@ -154,21 +153,20 @@ | ||
154 | <select id="listCourselistPage" parameterType="page" resultType="pd"> | 153 | <select id="listCourselistPage" parameterType="page" resultType="pd"> |
155 | SELECT | 154 | SELECT |
156 | sv_teacher.`NAME`, | 155 | sv_teacher.`NAME`, |
157 | - sv_teacher.`ID` AS TID, | ||
158 | sv_sclass.CLASS_NAME, | 156 | sv_sclass.CLASS_NAME, |
159 | - sv_sclass.ID AS CID, | ||
160 | sv_subject.CNAME, | 157 | sv_subject.CNAME, |
161 | - sv_subject.ID AS SID, | 158 | + SV_COURSEMANAGEMENT.SUBJECT_ID, |
159 | + SV_COURSEMANAGEMENT.TEACHER_ID, | ||
160 | + SV_COURSEMANAGEMENT.CLASS_ID, | ||
161 | + SV_COURSEMANAGEMENT.ID, | ||
162 | SV_COURSEMANAGEMENT.HEAD_MASTER | 162 | SV_COURSEMANAGEMENT.HEAD_MASTER |
163 | FROM | 163 | FROM |
164 | SV_COURSEMANAGEMENT | 164 | SV_COURSEMANAGEMENT |
165 | LEFT JOIN sv_sclass ON SV_COURSEMANAGEMENT.CLASS_ID = sv_sclass.ID | 165 | LEFT JOIN sv_sclass ON SV_COURSEMANAGEMENT.CLASS_ID = sv_sclass.ID |
166 | - LEFT JOIN sv_schoolgradesubject ON sv_sclass.GRADE_ID = sv_schoolgradesubject.GRADE_ID | ||
167 | - AND sv_sclass.SCHOOL_ID = sv_schoolgradesubject.SCHOOL_ID | ||
168 | LEFT JOIN sv_teacher ON sv_coursemanagement.TEACHER_ID = sv_teacher.ID | 166 | LEFT JOIN sv_teacher ON sv_coursemanagement.TEACHER_ID = sv_teacher.ID |
169 | LEFT JOIN sv_subject on sv_coursemanagement.SUBJECT_ID = sv_subject.ID | 167 | LEFT JOIN sv_subject on sv_coursemanagement.SUBJECT_ID = sv_subject.ID |
170 | WHERE | 168 | WHERE |
171 | - sv_schoolgradesubject.SCHOOL_ID = #{pd.SCHOOL_ID} | 169 | + SV_COURSEMANAGEMENT.SCHOOL_ID = #{pd.SCHOOL_ID} |
172 | 170 | ||
173 | </select> | 171 | </select> |
174 | 172 |
resources/mybatis1/sunvote/GradeMapper.xml
@@ -67,16 +67,21 @@ | @@ -67,16 +67,21 @@ | ||
67 | from | 67 | from |
68 | <include refid="tableName"></include> | 68 | <include refid="tableName"></include> |
69 | where 1=1 | 69 | where 1=1 |
70 | - <if test="pd.keywords!= null and pd.keywords != ''"><!-- 关键词检索 --> | ||
71 | - and | ||
72 | - ( | ||
73 | - <!-- 根据需求自己加检索条件 | ||
74 | - 字段1 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | ||
75 | - or | ||
76 | - 字段2 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | ||
77 | - --> | ||
78 | - ) | ||
79 | - </if> | 70 | + |
71 | + </select> | ||
72 | + | ||
73 | + <!-- 列表 --> | ||
74 | + <select id="datalistPageInSchool" parameterType="page" resultType="pd"> | ||
75 | + select | ||
76 | + <include refid="Field"></include> | ||
77 | + ,sv_schoolgradesubject.SCHOOLGRADESUBJECT_ID | ||
78 | + FROM | ||
79 | + sv_grade LEFT JOIN sv_schoolgradesubject on sv_grade.ID = sv_schoolgradesubject.GRADE_ID | ||
80 | + WHERE 1 =1 | ||
81 | + <if test="pd.SCHOOL_ID != null and pd.SCHOOL_ID != ''"><!-- 关键词检索 --> | ||
82 | + and sv_schoolgradesubject.SCHOOL_ID = #{pd.SCHOOL_ID} | ||
83 | + </if> | ||
84 | + GROUP BY sv_grade.ID | ||
80 | </select> | 85 | </select> |
81 | 86 | ||
82 | <!-- 列表(全部) --> | 87 | <!-- 列表(全部) --> |
@@ -87,6 +92,48 @@ | @@ -87,6 +92,48 @@ | ||
87 | <include refid="tableName"></include> | 92 | <include refid="tableName"></include> |
88 | </select> | 93 | </select> |
89 | 94 | ||
95 | + <!-- 列表(全部) --> | ||
96 | + <select id="listAllNot" parameterType="pd" resultType="pd"> | ||
97 | + select | ||
98 | + <include refid="Field"></include> | ||
99 | + from | ||
100 | + <include refid="tableName"></include> | ||
101 | + where | ||
102 | + sv_grade.ID not IN ( | ||
103 | + SELECT | ||
104 | + GRADE_ID | ||
105 | + FROM | ||
106 | + sv_schoolgradesubject | ||
107 | + WHERE | ||
108 | + <if test="SCHOOL_ID != null and SCHOOL_ID != ''"><!-- 关键词检索 --> | ||
109 | + sv_schoolgradesubject.SCHOOL_ID = #{SCHOOL_ID} | ||
110 | + </if> | ||
111 | + GROUP BY | ||
112 | + GRADE_ID | ||
113 | + ) | ||
114 | + </select> | ||
115 | + | ||
116 | + <!-- 列表学校年级信息 --> | ||
117 | + <select id="listAllInschool" parameterType="pd" resultType="pd"> | ||
118 | + SELECT | ||
119 | + <include refid="Field"></include> | ||
120 | + FROM | ||
121 | + <include refid="tableName"></include> | ||
122 | + WHERE | ||
123 | + sv_grade.ID IN ( | ||
124 | + SELECT | ||
125 | + GRADE_ID | ||
126 | + FROM | ||
127 | + sv_schoolgradesubject | ||
128 | + WHERE | ||
129 | + <if test="SCHOOL_ID != null and SCHOOL_ID != ''"><!-- 关键词检索 --> | ||
130 | + sv_schoolgradesubject.SCHOOL_ID = #{SCHOOL_ID} | ||
131 | + </if> | ||
132 | + GROUP BY | ||
133 | + GRADE_ID | ||
134 | + ) | ||
135 | + </select> | ||
136 | + | ||
90 | <!-- 批量删除 --> | 137 | <!-- 批量删除 --> |
91 | <delete id="deleteAll" parameterType="String"> | 138 | <delete id="deleteAll" parameterType="String"> |
92 | delete from | 139 | delete from |
resources/mybatis1/sunvote/HeadmasterMapper.xml
@@ -100,15 +100,8 @@ | @@ -100,15 +100,8 @@ | ||
100 | from | 100 | from |
101 | <include refid="tableName"></include> | 101 | <include refid="tableName"></include> |
102 | where 1=1 | 102 | where 1=1 |
103 | - <if test="pd.keywords!= null and pd.keywords != ''"><!-- 关键词检索 --> | ||
104 | - and | ||
105 | - ( | ||
106 | - <!-- 根据需求自己加检索条件 | ||
107 | - 字段1 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | ||
108 | - or | ||
109 | - 字段2 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%') | ||
110 | - --> | ||
111 | - ) | 103 | + <if test="pd.SCHOOL_ID != null and pd.SCHOOL_ID != ''"> |
104 | + and SCHOOL_ID = #{pd.SCHOOL_ID} | ||
112 | </if> | 105 | </if> |
113 | </select> | 106 | </select> |
114 | 107 | ||
@@ -118,6 +111,10 @@ | @@ -118,6 +111,10 @@ | ||
118 | <include refid="Field"></include> | 111 | <include refid="Field"></include> |
119 | from | 112 | from |
120 | <include refid="tableName"></include> | 113 | <include refid="tableName"></include> |
114 | + where 1 = 1 | ||
115 | + <if test="SCHOOL_ID != null and SCHOOL_ID != ''"> | ||
116 | + and SCHOOL_ID = #{SCHOOL_ID} | ||
117 | + </if> | ||
121 | </select> | 118 | </select> |
122 | 119 | ||
123 | <!-- 批量删除 --> | 120 | <!-- 批量删除 --> |
resources/mybatis1/sunvote/PageTemplateMapper.xml
@@ -84,6 +84,18 @@ | @@ -84,6 +84,18 @@ | ||
84 | from | 84 | from |
85 | <include refid="tableName"></include> | 85 | <include refid="tableName"></include> |
86 | where 1=1 | 86 | where 1=1 |
87 | + <if test="pd.SCHOOL_ID != null and pd.SCHOOL_ID != ''"> | ||
88 | + and SCHOOL_ID = #{pd.SCHOOL_ID} | ||
89 | + </if> | ||
90 | + <if test="pd.SUBJECT_ID != null and pd.SUBJECT_ID != ''"> | ||
91 | + and SUBJECT_ID = #{pd.SUBJECT_ID} | ||
92 | + </if> | ||
93 | + <if test="pd.GRADE_ID != null and pd.GRADE_ID != ''"> | ||
94 | + and GRADE_ID = #{pd.GRADE_ID} | ||
95 | + </if> | ||
96 | + <if test="pd.USER_ID != null and pd.USER_ID != ''"> | ||
97 | + and (USER_ID = #{pd.USER_ID} or USER_ID IS NULL) | ||
98 | + </if> | ||
87 | <if test="pd.keywords!= null and pd.keywords != ''"><!-- 关键词检索 --> | 99 | <if test="pd.keywords!= null and pd.keywords != ''"><!-- 关键词检索 --> |
88 | and | 100 | and |
89 | ( | 101 | ( |
resources/mybatis1/sunvote/SchoolMapper.xml
@@ -32,12 +32,14 @@ | @@ -32,12 +32,14 @@ | ||
32 | insert into | 32 | insert into |
33 | <include refid="tableName"></include> | 33 | <include refid="tableName"></include> |
34 | ( | 34 | ( |
35 | + ID, | ||
35 | NAME, | 36 | NAME, |
36 | ADDRESS, | 37 | ADDRESS, |
37 | PRESIDENT, | 38 | PRESIDENT, |
38 | PHONE, | 39 | PHONE, |
39 | REMARK | 40 | REMARK |
40 | ) values ( | 41 | ) values ( |
42 | + #{ID}, | ||
41 | #{NAME}, | 43 | #{NAME}, |
42 | #{ADDRESS}, | 44 | #{ADDRESS}, |
43 | #{PRESIDENT}, | 45 | #{PRESIDENT}, |
resources/mybatis1/sunvote/SubjectMapper.xml
@@ -109,6 +109,10 @@ | @@ -109,6 +109,10 @@ | ||
109 | <if test="SCHOOL_ID != null and SCHOOL_ID != ''"> | 109 | <if test="SCHOOL_ID != null and SCHOOL_ID != ''"> |
110 | and sv_schoolgradesubject.SCHOOL_ID = #{SCHOOL_ID} | 110 | and sv_schoolgradesubject.SCHOOL_ID = #{SCHOOL_ID} |
111 | </if> | 111 | </if> |
112 | + <if test="GRADE_ID != null and GRADE_ID != ''"> | ||
113 | + and sv_schoolgradesubject.GRADE_ID = #{GRADE_ID} | ||
114 | + </if> | ||
115 | + group by sv_schoolgradesubject.SUBJECT_ID | ||
112 | </select> | 116 | </select> |
113 | 117 | ||
114 | <!-- 列表(全部) --> | 118 | <!-- 列表(全部) --> |
src/com/fh/controller/sunvote/attachkeyboard/AttachKeyboardController.java
@@ -21,13 +21,12 @@ import org.springframework.web.servlet.ModelAndView; | @@ -21,13 +21,12 @@ import org.springframework.web.servlet.ModelAndView; | ||
21 | 21 | ||
22 | import com.fh.controller.base.BaseController; | 22 | import com.fh.controller.base.BaseController; |
23 | import com.fh.entity.Page; | 23 | import com.fh.entity.Page; |
24 | +import com.fh.service.sunvote.attachkeyboard.AttachKeyboardManager; | ||
25 | +import com.fh.service.sunvote.sclass.SClassManager; | ||
24 | import com.fh.util.AppUtil; | 26 | import com.fh.util.AppUtil; |
27 | +import com.fh.util.Jurisdiction; | ||
25 | import com.fh.util.ObjectExcelView; | 28 | import com.fh.util.ObjectExcelView; |
26 | import com.fh.util.PageData; | 29 | import com.fh.util.PageData; |
27 | -import com.fh.util.Jurisdiction; | ||
28 | -import com.fh.util.Tools; | ||
29 | -import com.fh.service.sunvote.attachkeyboard.AttachKeyboardManager; | ||
30 | -import com.fh.service.sunvote.sclass.SClassManager; | ||
31 | 30 | ||
32 | /** | 31 | /** |
33 | * 说明:班级附加键盘 | 32 | * 说明:班级附加键盘 |
src/com/fh/controller/sunvote/classtype/ClassTypeController.java
@@ -49,6 +49,7 @@ public class ClassTypeController extends BaseController { | @@ -49,6 +49,7 @@ public class ClassTypeController extends BaseController { | ||
49 | ModelAndView mv = this.getModelAndView(); | 49 | ModelAndView mv = this.getModelAndView(); |
50 | PageData pd = new PageData(); | 50 | PageData pd = new PageData(); |
51 | pd = this.getPageData(); | 51 | pd = this.getPageData(); |
52 | + pd.put("ID", get32UUID()); | ||
52 | classtypeService.save(pd); | 53 | classtypeService.save(pd); |
53 | mv.addObject("msg","success"); | 54 | mv.addObject("msg","success"); |
54 | mv.setViewName("save_result"); | 55 | mv.setViewName("save_result"); |
src/com/fh/controller/sunvote/coursemanagement/CourseManagementController.java
@@ -218,12 +218,13 @@ public class CourseManagementController extends BaseController { | @@ -218,12 +218,13 @@ public class CourseManagementController extends BaseController { | ||
218 | mv.addObject("teachers",teachers); | 218 | mv.addObject("teachers",teachers); |
219 | List<PageData> classs = sclassService.listAll(pd); | 219 | List<PageData> classs = sclassService.listAll(pd); |
220 | mv.addObject("classs",classs); | 220 | mv.addObject("classs",classs); |
221 | - List<PageData> subjects = subjectService.listAll(pd); | 221 | + |
222 | + List<PageData> subjects = subjectService.listAllSchool(pd); | ||
222 | mv.addObject("subjects", subjects); | 223 | mv.addObject("subjects", subjects); |
223 | 224 | ||
224 | List<PageData> terms = termService.listAll(pd); | 225 | List<PageData> terms = termService.listAll(pd); |
225 | mv.addObject("terms", terms); | 226 | mv.addObject("terms", terms); |
226 | - List<PageData> grades = gradeService.listAll(pd); | 227 | + List<PageData> grades = gradeService.listAllInschool(pd); |
227 | mv.addObject("grades", grades); | 228 | mv.addObject("grades", grades); |
228 | mv.addObject("msg", "save"); | 229 | mv.addObject("msg", "save"); |
229 | mv.addObject("pd", pd); | 230 | mv.addObject("pd", pd); |
@@ -265,7 +266,6 @@ public class CourseManagementController extends BaseController { | @@ -265,7 +266,6 @@ public class CourseManagementController extends BaseController { | ||
265 | @ResponseBody | 266 | @ResponseBody |
266 | public Object deleteAll() throws Exception{ | 267 | public Object deleteAll() throws Exception{ |
267 | logBefore(logger, Jurisdiction.getUsername()+"批量删除CourseManagement"); | 268 | logBefore(logger, Jurisdiction.getUsername()+"批量删除CourseManagement"); |
268 | - if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限 | ||
269 | PageData pd = new PageData(); | 269 | PageData pd = new PageData(); |
270 | Map<String,Object> map = new HashMap<String,Object>(); | 270 | Map<String,Object> map = new HashMap<String,Object>(); |
271 | pd = this.getPageData(); | 271 | pd = this.getPageData(); |
src/com/fh/controller/sunvote/grade/GradeController.java
@@ -22,6 +22,7 @@ import org.springframework.web.servlet.ModelAndView; | @@ -22,6 +22,7 @@ import org.springframework.web.servlet.ModelAndView; | ||
22 | import com.fh.controller.base.BaseController; | 22 | import com.fh.controller.base.BaseController; |
23 | import com.fh.entity.Page; | 23 | import com.fh.entity.Page; |
24 | import com.fh.service.sunvote.grade.GradeManager; | 24 | import com.fh.service.sunvote.grade.GradeManager; |
25 | +import com.fh.service.sunvote.schoolgradesubject.SchoolGradeSubjectManager; | ||
25 | import com.fh.util.AppUtil; | 26 | import com.fh.util.AppUtil; |
26 | import com.fh.util.Jurisdiction; | 27 | import com.fh.util.Jurisdiction; |
27 | import com.fh.util.ObjectExcelView; | 28 | import com.fh.util.ObjectExcelView; |
@@ -40,6 +41,9 @@ public class GradeController extends BaseController { | @@ -40,6 +41,9 @@ public class GradeController extends BaseController { | ||
40 | @Resource(name="gradeService") | 41 | @Resource(name="gradeService") |
41 | private GradeManager gradeService; | 42 | private GradeManager gradeService; |
42 | 43 | ||
44 | + @Resource(name="schoolgradesubjectService") | ||
45 | + private SchoolGradeSubjectManager schoolgradesubjectService; | ||
46 | + | ||
43 | /**保存 | 47 | /**保存 |
44 | * @param | 48 | * @param |
45 | * @throws Exception | 49 | * @throws Exception |
@@ -58,6 +62,23 @@ public class GradeController extends BaseController { | @@ -58,6 +62,23 @@ public class GradeController extends BaseController { | ||
58 | return mv; | 62 | return mv; |
59 | } | 63 | } |
60 | 64 | ||
65 | + /**保存 | ||
66 | + * @param | ||
67 | + * @throws Exception | ||
68 | + */ | ||
69 | + @RequestMapping(value="/save2") | ||
70 | + public ModelAndView save2() throws Exception{ | ||
71 | + logBefore(logger, Jurisdiction.getUsername()+"新增Grade"); | ||
72 | + ModelAndView mv = this.getModelAndView(); | ||
73 | + PageData pd = new PageData(); | ||
74 | + pd = this.getPageData(); | ||
75 | + pd.put("SCHOOLGRADESUBJECT_ID",get32UUID()); | ||
76 | + schoolgradesubjectService.save(pd); | ||
77 | + mv.addObject("msg","success"); | ||
78 | + mv.setViewName("save_result2"); | ||
79 | + return mv; | ||
80 | + } | ||
81 | + | ||
61 | /**删除 | 82 | /**删除 |
62 | * @param out | 83 | * @param out |
63 | * @throws Exception | 84 | * @throws Exception |
@@ -97,7 +118,7 @@ public class GradeController extends BaseController { | @@ -97,7 +118,7 @@ public class GradeController extends BaseController { | ||
97 | @RequestMapping(value="/list") | 118 | @RequestMapping(value="/list") |
98 | public ModelAndView list(Page page) throws Exception{ | 119 | public ModelAndView list(Page page) throws Exception{ |
99 | logBefore(logger, Jurisdiction.getUsername()+"列表Grade"); | 120 | logBefore(logger, Jurisdiction.getUsername()+"列表Grade"); |
100 | - //if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} //校验权限(无权查看时页面会有提示,如果不注释掉这句代码就无法进入列表页面,所以根据情况是否加入本句代码) | 121 | +// if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} //校验权限(无权查看时页面会有提示,如果不注释掉这句代码就无法进入列表页面,所以根据情况是否加入本句代码) |
101 | ModelAndView mv = this.getModelAndView(); | 122 | ModelAndView mv = this.getModelAndView(); |
102 | PageData pd = new PageData(); | 123 | PageData pd = new PageData(); |
103 | pd = this.getPageData(); | 124 | pd = this.getPageData(); |
@@ -121,7 +142,6 @@ public class GradeController extends BaseController { | @@ -121,7 +142,6 @@ public class GradeController extends BaseController { | ||
121 | @RequestMapping(value="/listcs") | 142 | @RequestMapping(value="/listcs") |
122 | public ModelAndView listcs(Page page) throws Exception{ | 143 | public ModelAndView listcs(Page page) throws Exception{ |
123 | logBefore(logger, Jurisdiction.getUsername()+"列表Grade"); | 144 | logBefore(logger, Jurisdiction.getUsername()+"列表Grade"); |
124 | - //if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} //校验权限(无权查看时页面会有提示,如果不注释掉这句代码就无法进入列表页面,所以根据情况是否加入本句代码) | ||
125 | ModelAndView mv = this.getModelAndView(); | 145 | ModelAndView mv = this.getModelAndView(); |
126 | PageData pd = new PageData(); | 146 | PageData pd = new PageData(); |
127 | pd = this.getPageData(); | 147 | pd = this.getPageData(); |
@@ -131,7 +151,7 @@ public class GradeController extends BaseController { | @@ -131,7 +151,7 @@ public class GradeController extends BaseController { | ||
131 | } | 151 | } |
132 | page.setPd(pd); | 152 | page.setPd(pd); |
133 | 153 | ||
134 | - List<PageData> varList = gradeService.list(page); //列出Grade列表 | 154 | + List<PageData> varList = gradeService.datalistPageInSchool(page); //列出Grade列表 |
135 | mv.setViewName("sunvote/grade/grade_list2"); | 155 | mv.setViewName("sunvote/grade/grade_list2"); |
136 | mv.addObject("varList", varList); | 156 | mv.addObject("varList", varList); |
137 | mv.addObject("pd", pd); | 157 | mv.addObject("pd", pd); |
@@ -162,8 +182,10 @@ public class GradeController extends BaseController { | @@ -162,8 +182,10 @@ public class GradeController extends BaseController { | ||
162 | ModelAndView mv = this.getModelAndView(); | 182 | ModelAndView mv = this.getModelAndView(); |
163 | PageData pd = new PageData(); | 183 | PageData pd = new PageData(); |
164 | pd = this.getPageData(); | 184 | pd = this.getPageData(); |
185 | + List<PageData> list = gradeService.listAllNot(pd); | ||
186 | + mv.addObject("gradeList", list); | ||
165 | mv.setViewName("sunvote/grade/grade_edit2"); | 187 | mv.setViewName("sunvote/grade/grade_edit2"); |
166 | - mv.addObject("msg", "save"); | 188 | + mv.addObject("msg", "save2"); |
167 | mv.addObject("pd", pd); | 189 | mv.addObject("pd", pd); |
168 | return mv; | 190 | return mv; |
169 | } | 191 | } |
@@ -210,6 +232,31 @@ public class GradeController extends BaseController { | @@ -210,6 +232,31 @@ public class GradeController extends BaseController { | ||
210 | return AppUtil.returnObject(pd, map); | 232 | return AppUtil.returnObject(pd, map); |
211 | } | 233 | } |
212 | 234 | ||
235 | + /**批量删除 | ||
236 | + * @param | ||
237 | + * @throws Exception | ||
238 | + */ | ||
239 | + @RequestMapping(value="/deleteAll2") | ||
240 | + @ResponseBody | ||
241 | + public Object deleteAll2() throws Exception{ | ||
242 | + logBefore(logger, Jurisdiction.getUsername()+"批量删除Grade"); | ||
243 | + PageData pd = new PageData(); | ||
244 | + Map<String,Object> map = new HashMap<String,Object>(); | ||
245 | + pd = this.getPageData(); | ||
246 | + List<PageData> pdList = new ArrayList<PageData>(); | ||
247 | + String DATA_IDS = pd.getString("DATA_IDS"); | ||
248 | + if(null != DATA_IDS && !"".equals(DATA_IDS)){ | ||
249 | + String ArrayDATA_IDS[] = DATA_IDS.split(","); | ||
250 | + schoolgradesubjectService.deleteAll(ArrayDATA_IDS); | ||
251 | + pd.put("msg", "ok"); | ||
252 | + }else{ | ||
253 | + pd.put("msg", "no"); | ||
254 | + } | ||
255 | + pdList.add(pd); | ||
256 | + map.put("list", pdList); | ||
257 | + return AppUtil.returnObject(pd, map); | ||
258 | + } | ||
259 | + | ||
213 | /**导出到excel | 260 | /**导出到excel |
214 | * @param | 261 | * @param |
215 | * @throws Exception | 262 | * @throws Exception |
src/com/fh/controller/sunvote/headmaster/HeadmasterController.java
@@ -114,6 +114,28 @@ public class HeadmasterController extends BaseController { | @@ -114,6 +114,28 @@ public class HeadmasterController extends BaseController { | ||
114 | return mv; | 114 | return mv; |
115 | } | 115 | } |
116 | 116 | ||
117 | + /**列表 | ||
118 | + * @param page | ||
119 | + * @throws Exception | ||
120 | + */ | ||
121 | + @RequestMapping(value="/listcs") | ||
122 | + public ModelAndView listcs(Page page) throws Exception{ | ||
123 | + logBefore(logger, Jurisdiction.getUsername()+"列表Headmaster"); | ||
124 | + ModelAndView mv = this.getModelAndView(); | ||
125 | + PageData pd = new PageData(); | ||
126 | + pd = this.getPageData(); | ||
127 | + String keywords = pd.getString("keywords"); //关键词检索条件 | ||
128 | + if(null != keywords && !"".equals(keywords)){ | ||
129 | + pd.put("keywords", keywords.trim()); | ||
130 | + } | ||
131 | + page.setPd(pd); | ||
132 | + List<PageData> varList = headmasterService.list(page); //列出Headmaster列表 | ||
133 | + mv.setViewName("sunvote/headmaster/headmaster_list2"); | ||
134 | + mv.addObject("varList", varList); | ||
135 | + mv.addObject("pd", pd); | ||
136 | + return mv; | ||
137 | + } | ||
138 | + | ||
117 | /**去新增页面 | 139 | /**去新增页面 |
118 | * @param | 140 | * @param |
119 | * @throws Exception | 141 | * @throws Exception |
src/com/fh/controller/sunvote/pagetemplate/PageTemplateController.java
@@ -11,7 +11,6 @@ import java.util.Map; | @@ -11,7 +11,6 @@ import java.util.Map; | ||
11 | 11 | ||
12 | import javax.annotation.Resource; | 12 | import javax.annotation.Resource; |
13 | 13 | ||
14 | -import org.apache.shiro.session.Session; | ||
15 | import org.springframework.beans.propertyeditors.CustomDateEditor; | 14 | import org.springframework.beans.propertyeditors.CustomDateEditor; |
16 | import org.springframework.stereotype.Controller; | 15 | import org.springframework.stereotype.Controller; |
17 | import org.springframework.web.bind.WebDataBinder; | 16 | import org.springframework.web.bind.WebDataBinder; |
@@ -20,19 +19,15 @@ import org.springframework.web.bind.annotation.RequestMapping; | @@ -20,19 +19,15 @@ import org.springframework.web.bind.annotation.RequestMapping; | ||
20 | import org.springframework.web.bind.annotation.ResponseBody; | 19 | import org.springframework.web.bind.annotation.ResponseBody; |
21 | import org.springframework.web.servlet.ModelAndView; | 20 | import org.springframework.web.servlet.ModelAndView; |
22 | 21 | ||
23 | -import com.fh.bean.Paper; | ||
24 | -import com.fh.bean.Question; | ||
25 | import com.fh.controller.base.BaseController; | 22 | import com.fh.controller.base.BaseController; |
26 | import com.fh.entity.Page; | 23 | import com.fh.entity.Page; |
27 | -import com.fh.entity.system.User; | 24 | +import com.fh.service.sunvote.pagetemplate.PageTemplateManager; |
25 | +import com.fh.service.sunvote.schoolgradesubject.SchoolGradeSubjectManager; | ||
28 | import com.fh.util.AppUtil; | 26 | import com.fh.util.AppUtil; |
29 | -import com.fh.util.Const; | 27 | +import com.fh.util.Jurisdiction; |
30 | import com.fh.util.ObjectExcelView; | 28 | import com.fh.util.ObjectExcelView; |
31 | import com.fh.util.PageData; | 29 | import com.fh.util.PageData; |
32 | -import com.fh.util.Jurisdiction; | ||
33 | -import com.fh.util.Tools; | ||
34 | -import com.fh.service.sunvote.pagetemplate.PageTemplateManager; | ||
35 | -import com.fh.service.sunvote.schoolgradesubject.SchoolGradeSubjectManager; | 30 | +import com.google.gson.Gson; |
36 | 31 | ||
37 | /** | 32 | /** |
38 | * 说明:试卷模板管理 | 33 | * 说明:试卷模板管理 |
@@ -74,6 +69,30 @@ public class PageTemplateController extends BaseController { | @@ -74,6 +69,30 @@ public class PageTemplateController extends BaseController { | ||
74 | return mv; | 69 | return mv; |
75 | } | 70 | } |
76 | 71 | ||
72 | + /**保存 | ||
73 | + * | ||
74 | + * 模板内容(数组) | ||
75 | + 题型 | ||
76 | + 小题个数 | ||
77 | + 每个题目的选项数 | ||
78 | + 每个题目的分数 | ||
79 | + * @param | ||
80 | + * @throws Exception | ||
81 | + */ | ||
82 | + @RequestMapping(value="/save2") | ||
83 | + public ModelAndView save2() throws Exception{ | ||
84 | + logBefore(logger, Jurisdiction.getUsername()+"新增PageTemplate"); | ||
85 | + PageData pd = new PageData(); | ||
86 | + pd = this.getPageData(); | ||
87 | + if(pd.get("PAGETEMPLATE_ID") == null){ | ||
88 | + pd.put("PAGETEMPLATE_ID", this.get32UUID()); //主键 | ||
89 | + pagetemplateService.save(pd); | ||
90 | + }else{ | ||
91 | + pagetemplateService.edit(pd); | ||
92 | + } | ||
93 | + return this.listcs(getPage()); | ||
94 | + } | ||
95 | + | ||
77 | /**删除 | 96 | /**删除 |
78 | * @param out | 97 | * @param out |
79 | * @throws Exception | 98 | * @throws Exception |
@@ -81,7 +100,6 @@ public class PageTemplateController extends BaseController { | @@ -81,7 +100,6 @@ public class PageTemplateController extends BaseController { | ||
81 | @RequestMapping(value="/delete") | 100 | @RequestMapping(value="/delete") |
82 | public void delete(PrintWriter out) throws Exception{ | 101 | public void delete(PrintWriter out) throws Exception{ |
83 | logBefore(logger, Jurisdiction.getUsername()+"删除PageTemplate"); | 102 | logBefore(logger, Jurisdiction.getUsername()+"删除PageTemplate"); |
84 | - if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限 | ||
85 | PageData pd = new PageData(); | 103 | PageData pd = new PageData(); |
86 | pd = this.getPageData(); | 104 | pd = this.getPageData(); |
87 | pagetemplateService.delete(pd); | 105 | pagetemplateService.delete(pd); |
@@ -134,10 +152,25 @@ public class PageTemplateController extends BaseController { | @@ -134,10 +152,25 @@ public class PageTemplateController extends BaseController { | ||
134 | * @param page | 152 | * @param page |
135 | * @throws Exception | 153 | * @throws Exception |
136 | */ | 154 | */ |
155 | + @RequestMapping(value = "/listdata", produces = "application/json;charset=UTF-8") | ||
156 | + @ResponseBody | ||
157 | + public String list() throws Exception{ | ||
158 | + logBefore(logger, Jurisdiction.getUsername()+"列表PageTemplate"); | ||
159 | + //if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} //校验权限(无权查看时页面会有提示,如果不注释掉这句代码就无法进入列表页面,所以根据情况是否加入本句代码) | ||
160 | + PageData pd = new PageData(); | ||
161 | + pd = this.getPageData(); | ||
162 | + List<PageData> varList = pagetemplateService.listAll(pd); //列出PageTemplate列表 | ||
163 | + Gson gson = new Gson(); | ||
164 | + return gson.toJson(varList); | ||
165 | + } | ||
166 | + | ||
167 | + /**列表 | ||
168 | + * @param page | ||
169 | + * @throws Exception | ||
170 | + */ | ||
137 | @RequestMapping(value="/listcs") | 171 | @RequestMapping(value="/listcs") |
138 | public ModelAndView listcs(Page page) throws Exception{ | 172 | public ModelAndView listcs(Page page) throws Exception{ |
139 | logBefore(logger, Jurisdiction.getUsername()+"列表PageTemplate"); | 173 | logBefore(logger, Jurisdiction.getUsername()+"列表PageTemplate"); |
140 | - //if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} //校验权限(无权查看时页面会有提示,如果不注释掉这句代码就无法进入列表页面,所以根据情况是否加入本句代码) | ||
141 | ModelAndView mv = this.getModelAndView(); | 174 | ModelAndView mv = this.getModelAndView(); |
142 | PageData pd = new PageData(); | 175 | PageData pd = new PageData(); |
143 | pd = this.getPageData(); | 176 | pd = this.getPageData(); |
@@ -198,7 +231,6 @@ public class PageTemplateController extends BaseController { | @@ -198,7 +231,6 @@ public class PageTemplateController extends BaseController { | ||
198 | @ResponseBody | 231 | @ResponseBody |
199 | public Object deleteAll() throws Exception{ | 232 | public Object deleteAll() throws Exception{ |
200 | logBefore(logger, Jurisdiction.getUsername()+"批量删除PageTemplate"); | 233 | logBefore(logger, Jurisdiction.getUsername()+"批量删除PageTemplate"); |
201 | - if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限 | ||
202 | PageData pd = new PageData(); | 234 | PageData pd = new PageData(); |
203 | Map<String,Object> map = new HashMap<String,Object>(); | 235 | Map<String,Object> map = new HashMap<String,Object>(); |
204 | pd = this.getPageData(); | 236 | pd = this.getPageData(); |
@@ -258,47 +290,23 @@ public class PageTemplateController extends BaseController { | @@ -258,47 +290,23 @@ public class PageTemplateController extends BaseController { | ||
258 | 290 | ||
259 | @RequestMapping(value="/npaper") | 291 | @RequestMapping(value="/npaper") |
260 | public ModelAndView newpaper() throws Exception{ | 292 | public ModelAndView newpaper() throws Exception{ |
261 | - logBefore(logger, Jurisdiction.getUsername()+"Paper详细信息"); | 293 | + logBefore(logger, Jurisdiction.getUsername()+"新增模板"); |
262 | ModelAndView mv = this.getModelAndView(); | 294 | ModelAndView mv = this.getModelAndView(); |
263 | PageData pd = new PageData(); | 295 | PageData pd = new PageData(); |
264 | pd = this.getPageData(); | 296 | pd = this.getPageData(); |
265 | - String paperType = pd.getString("PAPER_TYPE") ; | ||
266 | - Paper paper = new Paper(); | ||
267 | - paper.setTitle(pd.getString("NAME")); | ||
268 | - paper.setExam_time(pd.getString("TIME")); | ||
269 | - Session session = Jurisdiction.getSession(); | ||
270 | - User user = (User)session.getAttribute(Const.SESSION_USER); | ||
271 | - paper.setUser_id(user.getUSER_ID()); | ||
272 | - paper.setPaper_type(paperType == null || "".equals(paperType.trim()) ? "1" :paperType); | ||
273 | - String subjectId = pd.getString("SUBJECT_ID"); | ||
274 | - paper.setSubject_id(subjectId == null || "".equals(subjectId.trim())? getSubjectId():subjectId); | ||
275 | - String gradeId = pd.getString("GRADE_ID"); | ||
276 | - paper.setGrade_id( gradeId== null || "".equals(gradeId.trim())? getGradeID() : gradeId); | ||
277 | - String schoolId = pd.getString("SCHOOL_ID") ; | ||
278 | - paper.setSchool_id(schoolId == null || "".equals(schoolId.trim())? getSchoolID() : schoolId); | ||
279 | - paper.setQuestions(new ArrayList<Question>()); | ||
280 | - | ||
281 | - pd.put("JSON", paper.toJson()); | ||
282 | - logger.info(paper.toJson()); | ||
283 | - | ||
284 | String TEMPLATE_ID = pd.getString("TEMPLATE_ID"); | 297 | String TEMPLATE_ID = pd.getString("TEMPLATE_ID"); |
285 | if(TEMPLATE_ID != null && !"".equals(TEMPLATE_ID)){ | 298 | if(TEMPLATE_ID != null && !"".equals(TEMPLATE_ID)){ |
286 | pd.put("PAGETEMPLATE_ID", TEMPLATE_ID); | 299 | pd.put("PAGETEMPLATE_ID", TEMPLATE_ID); |
287 | PageData template = pagetemplateService.findById(pd); | 300 | PageData template = pagetemplateService.findById(pd); |
288 | mv.addObject("TEMPLEATE", template); | 301 | mv.addObject("TEMPLEATE", template); |
289 | } | 302 | } |
290 | - | 303 | + pd.put("USER_ID", getUserID()); |
291 | if(isChineseLanguageClient()){ | 304 | if(isChineseLanguageClient()){ |
292 | mv.setViewName("sunvote/teacher/creat_template"); | 305 | mv.setViewName("sunvote/teacher/creat_template"); |
293 | }else{ | 306 | }else{ |
294 | - mv.setViewName("sunvote/teacher/en_creat_question"); | 307 | + mv.setViewName("sunvote/teacher/en_creat_template"); |
295 | } | 308 | } |
296 | mv.addObject("pd", pd); | 309 | mv.addObject("pd", pd); |
297 | - if(paperType != null && "2".equals(paperType)){ | ||
298 | - mv.addObject("JUMP_URL", "/main/admin"); | ||
299 | - }else{ | ||
300 | - mv.addObject("JUMP_URL", "/main/teacher"); | ||
301 | - } | ||
302 | mv.addObject("QX",Jurisdiction.getHC()); //按钮权限 | 310 | mv.addObject("QX",Jurisdiction.getHC()); //按钮权限 |
303 | return mv; | 311 | return mv; |
304 | } | 312 | } |
src/com/fh/controller/sunvote/paper/PaperController.java
@@ -30,6 +30,7 @@ import com.fh.service.sunvote.pagetemplate.PageTemplateManager; | @@ -30,6 +30,7 @@ import com.fh.service.sunvote.pagetemplate.PageTemplateManager; | ||
30 | import com.fh.service.sunvote.paper.PaperManager; | 30 | import com.fh.service.sunvote.paper.PaperManager; |
31 | import com.fh.service.sunvote.paperquestion.PaperQuestionManager; | 31 | import com.fh.service.sunvote.paperquestion.PaperQuestionManager; |
32 | import com.fh.service.sunvote.question.QuestionManager; | 32 | import com.fh.service.sunvote.question.QuestionManager; |
33 | +import com.fh.service.sunvote.schoolgradesubject.SchoolGradeSubjectManager; | ||
33 | import com.fh.util.AppUtil; | 34 | import com.fh.util.AppUtil; |
34 | import com.fh.util.Const; | 35 | import com.fh.util.Const; |
35 | import com.fh.util.Jurisdiction; | 36 | import com.fh.util.Jurisdiction; |
@@ -57,6 +58,9 @@ public class PaperController extends BaseController { | @@ -57,6 +58,9 @@ public class PaperController extends BaseController { | ||
57 | @Resource(name = "v1Service") | 58 | @Resource(name = "v1Service") |
58 | private V1Manager v1Service ; | 59 | private V1Manager v1Service ; |
59 | 60 | ||
61 | + @Resource(name="schoolgradesubjectService") | ||
62 | + private SchoolGradeSubjectManager schoolgradesubjectService; | ||
63 | + | ||
60 | @Resource(name="pagetemplateService") | 64 | @Resource(name="pagetemplateService") |
61 | private PageTemplateManager pagetemplateService; | 65 | private PageTemplateManager pagetemplateService; |
62 | 66 | ||
@@ -411,27 +415,10 @@ public class PaperController extends BaseController { | @@ -411,27 +415,10 @@ public class PaperController extends BaseController { | ||
411 | 415 | ||
412 | PageData tpd = new PageData(); | 416 | PageData tpd = new PageData(); |
413 | tpd.put("ID", getUserID()); | 417 | tpd.put("ID", getUserID()); |
414 | - List<PageData> adminInfos = v1Service.getAdminInfo(tpd); | ||
415 | - List<PageData> gradeInfos = new ArrayList<PageData>(); | ||
416 | - List<PageData> subjectInfos = new ArrayList<PageData>(); | ||
417 | - // 查询学校信息 | ||
418 | - for(PageData pad : adminInfos){ | ||
419 | - PageData tmpd = new PageData(); | ||
420 | - Object gradeId = pad.get("GRADE_ID"); | ||
421 | - tmpd.put("SNAME", pad.get("SNAME"));// 学校名称 | ||
422 | - tmpd.put("SCHOOL_ID", pad.get("SCHOOL_ID"));//学校ID | ||
423 | - tmpd.put("GRADE_ID", pad.get("GRADE_ID"));//年级id | ||
424 | - tmpd.put("GNAME", pad.get("GNAME"));//年级名称 | ||
425 | - tmpd.put("SUBJECT_ID", pad.get("SUBJECT_ID"));// 科目id | ||
426 | - tmpd.put("SCNAME", pad.get("SCNAME"));// 科目名称 | ||
427 | - if(gradeId != null && !"".equals(gradeId)){ | ||
428 | - gradeInfos.add(tmpd); | ||
429 | - }else{ | ||
430 | - subjectInfos.add(tmpd); | ||
431 | - } | ||
432 | - mv.addObject("SNAME", pad.get("SNAME")); | ||
433 | - mv.addObject("SCHOOL_ID", pad.get("SCHOOL_ID")); | ||
434 | - } | 418 | + PageData adminInfos = v1Service.getAdminInfo(tpd); |
419 | + List<PageData> gradeInfos = schoolgradesubjectService.listAllGrade(adminInfos); | ||
420 | + List<PageData> subjectInfos = schoolgradesubjectService.listAllSubject(adminInfos); | ||
421 | + | ||
435 | mv.addObject("gradeInfos", gradeInfos); | 422 | mv.addObject("gradeInfos", gradeInfos); |
436 | mv.addObject("subjectInfos", subjectInfos); | 423 | mv.addObject("subjectInfos", subjectInfos); |
437 | 424 |
src/com/fh/controller/sunvote/school/SchoolController.java
@@ -56,6 +56,7 @@ public class SchoolController extends BaseController { | @@ -56,6 +56,7 @@ public class SchoolController extends BaseController { | ||
56 | PageData pd = new PageData(); | 56 | PageData pd = new PageData(); |
57 | pd = this.getPageData(); | 57 | pd = this.getPageData(); |
58 | FHLOG.save(getUsername(), "新增学校:" + pd.getString("NAME")); | 58 | FHLOG.save(getUsername(), "新增学校:" + pd.getString("NAME")); |
59 | + pd.put("ID", get32UUID()); | ||
59 | schoolService.save(pd); | 60 | schoolService.save(pd); |
60 | mv.addObject("msg","success"); | 61 | mv.addObject("msg","success"); |
61 | mv.setViewName("save_result"); | 62 | mv.setViewName("save_result"); |
@@ -98,6 +99,20 @@ public class SchoolController extends BaseController { | @@ -98,6 +99,20 @@ public class SchoolController extends BaseController { | ||
98 | return mv; | 99 | return mv; |
99 | } | 100 | } |
100 | 101 | ||
102 | + /**修改 | ||
103 | + * @param | ||
104 | + * @throws Exception | ||
105 | + */ | ||
106 | + @RequestMapping(value="/edit2") | ||
107 | + public ModelAndView edit2() throws Exception{ | ||
108 | + logBefore(logger, Jurisdiction.getUsername()+"修改学校"); | ||
109 | + ModelAndView mv = this.getModelAndView(); | ||
110 | + PageData pd = new PageData(); | ||
111 | + pd = this.getPageData(); | ||
112 | + schoolService.edit(pd); | ||
113 | + return goEdit2(); | ||
114 | + } | ||
115 | + | ||
101 | 116 | ||
102 | /**列表 | 117 | /**列表 |
103 | * @param page | 118 | * @param page |
@@ -211,7 +226,7 @@ public class SchoolController extends BaseController { | @@ -211,7 +226,7 @@ public class SchoolController extends BaseController { | ||
211 | pd = this.getPageData(); | 226 | pd = this.getPageData(); |
212 | pd = schoolService.findById(pd); //根据ID读取 | 227 | pd = schoolService.findById(pd); //根据ID读取 |
213 | mv.setViewName("sunvote/school/school_edit2"); | 228 | mv.setViewName("sunvote/school/school_edit2"); |
214 | - mv.addObject("msg", "edit"); | 229 | + mv.addObject("msg", "edit2"); |
215 | mv.addObject("pd", pd); | 230 | mv.addObject("pd", pd); |
216 | return mv; | 231 | return mv; |
217 | } | 232 | } |
src/com/fh/controller/sunvote/sclass/SClassController.java
@@ -21,17 +21,16 @@ import org.springframework.web.servlet.ModelAndView; | @@ -21,17 +21,16 @@ import org.springframework.web.servlet.ModelAndView; | ||
21 | 21 | ||
22 | import com.fh.controller.base.BaseController; | 22 | import com.fh.controller.base.BaseController; |
23 | import com.fh.entity.Page; | 23 | import com.fh.entity.Page; |
24 | -import com.fh.util.AppUtil; | ||
25 | -import com.fh.util.ObjectExcelView; | ||
26 | -import com.fh.util.PageData; | ||
27 | -import com.fh.util.Jurisdiction; | ||
28 | -import com.fh.util.Tools; | ||
29 | import com.fh.service.sunvote.basestation.BasestationManager; | 24 | import com.fh.service.sunvote.basestation.BasestationManager; |
30 | import com.fh.service.sunvote.classtype.ClassTypeManager; | 25 | import com.fh.service.sunvote.classtype.ClassTypeManager; |
31 | import com.fh.service.sunvote.grade.GradeManager; | 26 | import com.fh.service.sunvote.grade.GradeManager; |
32 | import com.fh.service.sunvote.school.SchoolManager; | 27 | import com.fh.service.sunvote.school.SchoolManager; |
33 | import com.fh.service.sunvote.sclass.SClassManager; | 28 | import com.fh.service.sunvote.sclass.SClassManager; |
34 | import com.fh.service.system.fhlog.FHlogManager; | 29 | import com.fh.service.system.fhlog.FHlogManager; |
30 | +import com.fh.util.AppUtil; | ||
31 | +import com.fh.util.Jurisdiction; | ||
32 | +import com.fh.util.ObjectExcelView; | ||
33 | +import com.fh.util.PageData; | ||
35 | 34 | ||
36 | /** | 35 | /** |
37 | * 说明:班级 | 36 | * 说明:班级 |
@@ -67,7 +66,6 @@ public class SClassController extends BaseController { | @@ -67,7 +66,6 @@ public class SClassController extends BaseController { | ||
67 | @RequestMapping(value="/save") | 66 | @RequestMapping(value="/save") |
68 | public ModelAndView save() throws Exception{ | 67 | public ModelAndView save() throws Exception{ |
69 | logBefore(logger, Jurisdiction.getUsername()+"新增SClass"); | 68 | logBefore(logger, Jurisdiction.getUsername()+"新增SClass"); |
70 | - if(!Jurisdiction.buttonJurisdiction(menuUrl, "add")){return null;} //校验权限 | ||
71 | ModelAndView mv = this.getModelAndView(); | 69 | ModelAndView mv = this.getModelAndView(); |
72 | PageData pd = new PageData(); | 70 | PageData pd = new PageData(); |
73 | pd = this.getPageData(); | 71 | pd = this.getPageData(); |
@@ -78,6 +76,23 @@ public class SClassController extends BaseController { | @@ -78,6 +76,23 @@ public class SClassController extends BaseController { | ||
78 | return mv; | 76 | return mv; |
79 | } | 77 | } |
80 | 78 | ||
79 | + /**保存 | ||
80 | + * @param | ||
81 | + * @throws Exception | ||
82 | + */ | ||
83 | + @RequestMapping(value="/save2") | ||
84 | + public ModelAndView save2() throws Exception{ | ||
85 | + logBefore(logger, Jurisdiction.getUsername()+"新增SClass"); | ||
86 | + ModelAndView mv = this.getModelAndView(); | ||
87 | + PageData pd = new PageData(); | ||
88 | + pd = this.getPageData(); | ||
89 | + pd.put("ID", get32UUID()); | ||
90 | + sclassService.save(pd); | ||
91 | + mv.addObject("msg","success"); | ||
92 | + mv.setViewName("save_result2"); | ||
93 | + return mv; | ||
94 | + } | ||
95 | + | ||
81 | /**删除 | 96 | /**删除 |
82 | * @param out | 97 | * @param out |
83 | * @throws Exception | 98 | * @throws Exception |
@@ -116,7 +131,6 @@ public class SClassController extends BaseController { | @@ -116,7 +131,6 @@ public class SClassController extends BaseController { | ||
116 | @RequestMapping(value="/edit2") | 131 | @RequestMapping(value="/edit2") |
117 | public ModelAndView edit2() throws Exception{ | 132 | public ModelAndView edit2() throws Exception{ |
118 | logBefore(logger, Jurisdiction.getUsername()+"修改SClass"); | 133 | logBefore(logger, Jurisdiction.getUsername()+"修改SClass"); |
119 | - if(!Jurisdiction.buttonJurisdiction(menuUrl, "edit")){return null;} //校验权限 | ||
120 | ModelAndView mv = this.getModelAndView(); | 134 | ModelAndView mv = this.getModelAndView(); |
121 | PageData pd = new PageData(); | 135 | PageData pd = new PageData(); |
122 | pd = this.getPageData(); | 136 | pd = this.getPageData(); |
@@ -220,7 +234,7 @@ public class SClassController extends BaseController { | @@ -220,7 +234,7 @@ public class SClassController extends BaseController { | ||
220 | mv.addObject("grades", grades); | 234 | mv.addObject("grades", grades); |
221 | List<PageData> classTypes = classtypeService.listAll(pd); | 235 | List<PageData> classTypes = classtypeService.listAll(pd); |
222 | mv.addObject("classTypes", classTypes); | 236 | mv.addObject("classTypes", classTypes); |
223 | - mv.addObject("msg", "save"); | 237 | + mv.addObject("msg", "save2"); |
224 | mv.addObject("pd", pd); | 238 | mv.addObject("pd", pd); |
225 | return mv; | 239 | return mv; |
226 | } | 240 | } |
src/com/fh/controller/sunvote/subject/SubjectController.java
@@ -15,19 +15,20 @@ import org.springframework.beans.propertyeditors.CustomDateEditor; | @@ -15,19 +15,20 @@ import org.springframework.beans.propertyeditors.CustomDateEditor; | ||
15 | import org.springframework.stereotype.Controller; | 15 | import org.springframework.stereotype.Controller; |
16 | import org.springframework.web.bind.WebDataBinder; | 16 | import org.springframework.web.bind.WebDataBinder; |
17 | import org.springframework.web.bind.annotation.InitBinder; | 17 | import org.springframework.web.bind.annotation.InitBinder; |
18 | +import org.springframework.web.bind.annotation.RequestBody; | ||
18 | import org.springframework.web.bind.annotation.RequestMapping; | 19 | import org.springframework.web.bind.annotation.RequestMapping; |
19 | import org.springframework.web.bind.annotation.ResponseBody; | 20 | import org.springframework.web.bind.annotation.ResponseBody; |
20 | import org.springframework.web.servlet.ModelAndView; | 21 | import org.springframework.web.servlet.ModelAndView; |
21 | 22 | ||
22 | import com.fh.controller.base.BaseController; | 23 | import com.fh.controller.base.BaseController; |
23 | import com.fh.entity.Page; | 24 | import com.fh.entity.Page; |
25 | +import com.fh.service.sunvote.schoolgradesubject.SchoolGradeSubjectManager; | ||
26 | +import com.fh.service.sunvote.subject.SubjectManager; | ||
24 | import com.fh.util.AppUtil; | 27 | import com.fh.util.AppUtil; |
28 | +import com.fh.util.Jurisdiction; | ||
25 | import com.fh.util.ObjectExcelView; | 29 | import com.fh.util.ObjectExcelView; |
26 | import com.fh.util.PageData; | 30 | import com.fh.util.PageData; |
27 | -import com.fh.util.Jurisdiction; | ||
28 | -import com.fh.util.Tools; | ||
29 | -import com.fh.service.sunvote.schoolgradesubject.SchoolGradeSubjectManager; | ||
30 | -import com.fh.service.sunvote.subject.SubjectManager; | 31 | +import com.google.gson.Gson; |
31 | 32 | ||
32 | /** | 33 | /** |
33 | * 说明:科目 | 34 | * 说明:科目 |
@@ -75,7 +76,7 @@ public class SubjectController extends BaseController { | @@ -75,7 +76,7 @@ public class SubjectController extends BaseController { | ||
75 | pd.put("SCHOOLGRADESUBJECT_ID", this.get32UUID()); //主键 | 76 | pd.put("SCHOOLGRADESUBJECT_ID", this.get32UUID()); //主键 |
76 | schoolgradesubjectService.save(pd); | 77 | schoolgradesubjectService.save(pd); |
77 | mv.addObject("msg","success"); | 78 | mv.addObject("msg","success"); |
78 | - mv.setViewName("save_result"); | 79 | + mv.setViewName("save_result2"); |
79 | return mv; | 80 | return mv; |
80 | } | 81 | } |
81 | 82 | ||
@@ -155,6 +156,20 @@ public class SubjectController extends BaseController { | @@ -155,6 +156,20 @@ public class SubjectController extends BaseController { | ||
155 | return mv; | 156 | return mv; |
156 | } | 157 | } |
157 | 158 | ||
159 | + /**列表 | ||
160 | + * @param page | ||
161 | + * @throws Exception | ||
162 | + */ | ||
163 | + @RequestMapping(value="/listdata",produces = "application/json;charset=UTF-8") | ||
164 | + @ResponseBody | ||
165 | + public String listData() throws Exception{ | ||
166 | + PageData pd = new PageData(); | ||
167 | + pd = this.getPageData(); | ||
168 | + List<PageData> varList = subjectService.listAllSchool(pd); //列出Subject列表 | ||
169 | + Gson gson = new Gson(); | ||
170 | + return gson.toJson(varList); | ||
171 | + } | ||
172 | + | ||
158 | /**去新增页面 | 173 | /**去新增页面 |
159 | * @param | 174 | * @param |
160 | * @throws Exception | 175 | * @throws Exception |
@@ -227,7 +242,6 @@ public class SubjectController extends BaseController { | @@ -227,7 +242,6 @@ public class SubjectController extends BaseController { | ||
227 | @ResponseBody | 242 | @ResponseBody |
228 | public Object deleteAll() throws Exception{ | 243 | public Object deleteAll() throws Exception{ |
229 | logBefore(logger, Jurisdiction.getUsername()+"批量删除Subject"); | 244 | logBefore(logger, Jurisdiction.getUsername()+"批量删除Subject"); |
230 | - if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限 | ||
231 | PageData pd = new PageData(); | 245 | PageData pd = new PageData(); |
232 | Map<String,Object> map = new HashMap<String,Object>(); | 246 | Map<String,Object> map = new HashMap<String,Object>(); |
233 | pd = this.getPageData(); | 247 | pd = this.getPageData(); |
src/com/fh/controller/sunvote/term/TermController.java
@@ -8,7 +8,9 @@ import java.util.Date; | @@ -8,7 +8,9 @@ import java.util.Date; | ||
8 | import java.util.HashMap; | 8 | import java.util.HashMap; |
9 | import java.util.List; | 9 | import java.util.List; |
10 | import java.util.Map; | 10 | import java.util.Map; |
11 | + | ||
11 | import javax.annotation.Resource; | 12 | import javax.annotation.Resource; |
13 | + | ||
12 | import org.springframework.beans.propertyeditors.CustomDateEditor; | 14 | import org.springframework.beans.propertyeditors.CustomDateEditor; |
13 | import org.springframework.stereotype.Controller; | 15 | import org.springframework.stereotype.Controller; |
14 | import org.springframework.web.bind.WebDataBinder; | 16 | import org.springframework.web.bind.WebDataBinder; |
@@ -16,14 +18,14 @@ import org.springframework.web.bind.annotation.InitBinder; | @@ -16,14 +18,14 @@ import org.springframework.web.bind.annotation.InitBinder; | ||
16 | import org.springframework.web.bind.annotation.RequestMapping; | 18 | import org.springframework.web.bind.annotation.RequestMapping; |
17 | import org.springframework.web.bind.annotation.ResponseBody; | 19 | import org.springframework.web.bind.annotation.ResponseBody; |
18 | import org.springframework.web.servlet.ModelAndView; | 20 | import org.springframework.web.servlet.ModelAndView; |
21 | + | ||
19 | import com.fh.controller.base.BaseController; | 22 | import com.fh.controller.base.BaseController; |
20 | import com.fh.entity.Page; | 23 | import com.fh.entity.Page; |
24 | +import com.fh.service.sunvote.term.TermManager; | ||
21 | import com.fh.util.AppUtil; | 25 | import com.fh.util.AppUtil; |
26 | +import com.fh.util.Jurisdiction; | ||
22 | import com.fh.util.ObjectExcelView; | 27 | import com.fh.util.ObjectExcelView; |
23 | import com.fh.util.PageData; | 28 | import com.fh.util.PageData; |
24 | -import com.fh.util.Jurisdiction; | ||
25 | -import com.fh.util.Tools; | ||
26 | -import com.fh.service.sunvote.term.TermManager; | ||
27 | 29 | ||
28 | /** | 30 | /** |
29 | * 说明:学期名称 | 31 | * 说明:学期名称 |
src/com/fh/controller/system/login/LoginController.java
@@ -31,6 +31,7 @@ import com.fh.service.sunvote.event.EventManager; | @@ -31,6 +31,7 @@ import com.fh.service.sunvote.event.EventManager; | ||
31 | import com.fh.service.sunvote.pagetemplate.PageTemplateManager; | 31 | import com.fh.service.sunvote.pagetemplate.PageTemplateManager; |
32 | import com.fh.service.sunvote.school.SchoolManager; | 32 | import com.fh.service.sunvote.school.SchoolManager; |
33 | import com.fh.service.sunvote.schooladmin.SchoolAdminManager; | 33 | import com.fh.service.sunvote.schooladmin.SchoolAdminManager; |
34 | +import com.fh.service.sunvote.schoolgradesubject.SchoolGradeSubjectManager; | ||
34 | import com.fh.service.sunvote.sclass.SClassManager; | 35 | import com.fh.service.sunvote.sclass.SClassManager; |
35 | import com.fh.service.sunvote.teacher.TeacherManager; | 36 | import com.fh.service.sunvote.teacher.TeacherManager; |
36 | import com.fh.service.system.appuser.AppuserManager; | 37 | import com.fh.service.system.appuser.AppuserManager; |
@@ -85,6 +86,9 @@ public class LoginController extends BaseController { | @@ -85,6 +86,9 @@ public class LoginController extends BaseController { | ||
85 | @Resource(name = "v1Service") | 86 | @Resource(name = "v1Service") |
86 | private V1Manager v1Service; | 87 | private V1Manager v1Service; |
87 | 88 | ||
89 | + @Resource(name="schoolgradesubjectService") | ||
90 | + private SchoolGradeSubjectManager schoolgradesubjectService; | ||
91 | + | ||
88 | @Resource(name="schooladminService") | 92 | @Resource(name="schooladminService") |
89 | private SchoolAdminManager schooladminService; | 93 | private SchoolAdminManager schooladminService; |
90 | 94 | ||
@@ -292,36 +296,16 @@ public class LoginController extends BaseController { | @@ -292,36 +296,16 @@ public class LoginController extends BaseController { | ||
292 | PageData tpd = new PageData(); | 296 | PageData tpd = new PageData(); |
293 | tpd.put("ID", user.getUSER_ID()); | 297 | tpd.put("ID", user.getUSER_ID()); |
294 | String schoolId = "" ; | 298 | String schoolId = "" ; |
295 | - List<PageData> adminInfos = v1Service.getAdminInfo(tpd); | ||
296 | - List<PageData> gradeInfos = new ArrayList<PageData>(); | ||
297 | - List<PageData> subjectInfos = new ArrayList<PageData>(); | 299 | + PageData adminInfos = v1Service.getAdminInfo(tpd); |
298 | // 查询学校信息 | 300 | // 查询学校信息 |
299 | Object tgradleId = "" ; | 301 | Object tgradleId = "" ; |
300 | - for(PageData pad : adminInfos){ | ||
301 | - PageData tmpd = new PageData(); | ||
302 | - Object gradeId = pad.get("GRADE_ID"); | ||
303 | - tmpd.put("SNAME", pad.get("SNAME"));// 学校名称 | ||
304 | - tmpd.put("SCHOOL_ID", pad.get("SCHOOL_ID"));//学校ID | ||
305 | - tmpd.put("GRADE_ID", pad.get("GRADE_ID"));//年级id | ||
306 | - tmpd.put("GNAME", pad.get("GNAME"));//年级名称 | ||
307 | - tmpd.put("SUBJECT_ID", pad.get("SUBJECT_ID"));// 科目id | ||
308 | - tmpd.put("SCNAME", pad.get("SCNAME"));// 科目名称 | ||
309 | - if(gradeId != null && !gradeId.equals(tgradleId)){ | ||
310 | - tgradleId = gradeId ; | ||
311 | - List<PageData> classInfos = sclassService.listAll(tmpd); | ||
312 | - tmpd.put("classInfos", classInfos); | ||
313 | - gradeInfos.add(tmpd); | ||
314 | - subjectInfos = new ArrayList<PageData>(); | ||
315 | - tmpd.put("subjectInfos", subjectInfos); | ||
316 | - } | ||
317 | - subjectInfos.add(tmpd); | ||
318 | - schoolId = pad.getString("SCHOOL_ID"); | ||
319 | - mv.addObject("SNAME", pad.get("SNAME")); | ||
320 | - mv.addObject("SCHOOL_ID", pad.get("SCHOOL_ID")); | ||
321 | - } | 302 | + |
322 | session.setAttribute(USERNAME + Const.ROLE_ID, | 303 | session.setAttribute(USERNAME + Const.ROLE_ID, |
323 | "admin"); | 304 | "admin"); |
305 | + List<PageData> gradeInfos = schoolgradesubjectService.listAllGrade(adminInfos); | ||
324 | mv.addObject("gradeInfos", gradeInfos); | 306 | mv.addObject("gradeInfos", gradeInfos); |
307 | + mv.addObject("adminInfos", adminInfos); | ||
308 | + mv.addObject("SCHOOL_ID", adminInfos.get("ID")); | ||
325 | session.setAttribute(Const.SESSION_USERNAME, USERNAME); // 放入用户名到session | 309 | session.setAttribute(Const.SESSION_USERNAME, USERNAME); // 放入用户名到session |
326 | if(isChineseLanguageClient()){ | 310 | if(isChineseLanguageClient()){ |
327 | mv.setViewName("sunvote/admin/admin_main"); | 311 | mv.setViewName("sunvote/admin/admin_main"); |
src/com/fh/service/api/V1Manager.java
@@ -22,7 +22,7 @@ public interface V1Manager { | @@ -22,7 +22,7 @@ public interface V1Manager { | ||
22 | 22 | ||
23 | public List<PageData> getLastWrongQuestionInfo(PageData pd) throws Exception; | 23 | public List<PageData> getLastWrongQuestionInfo(PageData pd) throws Exception; |
24 | 24 | ||
25 | - public List<PageData> getAdminInfo(PageData pd) throws Exception; | 25 | + public PageData getAdminInfo(PageData pd) throws Exception; |
26 | 26 | ||
27 | public List<PageData> getClassBySchoolAndGradle(PageData pd) throws Exception; | 27 | public List<PageData> getClassBySchoolAndGradle(PageData pd) throws Exception; |
28 | 28 |
src/com/fh/service/api/impl/V1Service.java
@@ -47,8 +47,8 @@ public class V1Service implements V1Manager { | @@ -47,8 +47,8 @@ public class V1Service implements V1Manager { | ||
47 | } | 47 | } |
48 | 48 | ||
49 | @Override | 49 | @Override |
50 | - public List<PageData> getAdminInfo(PageData pd) throws Exception { | ||
51 | - return (List<PageData>)dao.findForList("V1Mapper.getAdminInfo", pd); | 50 | + public PageData getAdminInfo(PageData pd) throws Exception { |
51 | + return (PageData)dao.findForObject("V1Mapper.getAdminInfo", pd); | ||
52 | } | 52 | } |
53 | 53 | ||
54 | @Override | 54 | @Override |
src/com/fh/service/sunvote/grade/GradeManager.java
@@ -36,11 +36,20 @@ public interface GradeManager{ | @@ -36,11 +36,20 @@ public interface GradeManager{ | ||
36 | */ | 36 | */ |
37 | public List<PageData> list(Page page)throws Exception; | 37 | public List<PageData> list(Page page)throws Exception; |
38 | 38 | ||
39 | + /**列表 | ||
40 | + * @param page | ||
41 | + * @throws Exception | ||
42 | + */ | ||
43 | + public List<PageData> datalistPageInSchool(Page page)throws Exception; | ||
44 | + | ||
45 | + public List<PageData> listAllInschool(PageData pd)throws Exception; | ||
46 | + | ||
39 | /**列表(全部) | 47 | /**列表(全部) |
40 | * @param pd | 48 | * @param pd |
41 | * @throws Exception | 49 | * @throws Exception |
42 | */ | 50 | */ |
43 | public List<PageData> listAll(PageData pd)throws Exception; | 51 | public List<PageData> listAll(PageData pd)throws Exception; |
52 | + public List<PageData> listAllNot(PageData pd)throws Exception; | ||
44 | 53 | ||
45 | /**通过id获取数据 | 54 | /**通过id获取数据 |
46 | * @param pd | 55 | * @param pd |
src/com/fh/service/sunvote/grade/impl/GradeService.java
@@ -52,6 +52,14 @@ public class GradeService implements GradeManager{ | @@ -52,6 +52,14 @@ public class GradeService implements GradeManager{ | ||
52 | public List<PageData> list(Page page)throws Exception{ | 52 | public List<PageData> list(Page page)throws Exception{ |
53 | return (List<PageData>)dao.findForList("GradeMapper.datalistPage", page); | 53 | return (List<PageData>)dao.findForList("GradeMapper.datalistPage", page); |
54 | } | 54 | } |
55 | + /**列表 | ||
56 | + * @param page | ||
57 | + * @throws Exception | ||
58 | + */ | ||
59 | + @SuppressWarnings("unchecked") | ||
60 | + public List<PageData> datalistPageInSchool(Page page)throws Exception{ | ||
61 | + return (List<PageData>)dao.findForList("GradeMapper.datalistPageInSchool", page); | ||
62 | + } | ||
55 | 63 | ||
56 | /**列表(全部) | 64 | /**列表(全部) |
57 | * @param pd | 65 | * @param pd |
@@ -62,6 +70,18 @@ public class GradeService implements GradeManager{ | @@ -62,6 +70,18 @@ public class GradeService implements GradeManager{ | ||
62 | return (List<PageData>)dao.findForList("GradeMapper.listAll", pd); | 70 | return (List<PageData>)dao.findForList("GradeMapper.listAll", pd); |
63 | } | 71 | } |
64 | 72 | ||
73 | + public List<PageData> listAllNot(PageData pd)throws Exception{ | ||
74 | + return (List<PageData>)dao.findForList("GradeMapper.listAllNot", pd); | ||
75 | + } | ||
76 | + /**列表(全部) | ||
77 | + * @param pd | ||
78 | + * @throws Exception | ||
79 | + */ | ||
80 | + @SuppressWarnings("unchecked") | ||
81 | + public List<PageData> listAllInschool(PageData pd)throws Exception{ | ||
82 | + return (List<PageData>)dao.findForList("GradeMapper.listAllInschool", pd); | ||
83 | + } | ||
84 | + | ||
65 | /**通过id获取数据 | 85 | /**通过id获取数据 |
66 | * @param pd | 86 | * @param pd |
67 | * @throws Exception | 87 | * @throws Exception |
src/com/fh/util/Jurisdiction.java
@@ -22,11 +22,11 @@ public class Jurisdiction { | @@ -22,11 +22,11 @@ public class Jurisdiction { | ||
22 | * 根据点击的菜单的xxx.do去菜单中的URL去匹配,当匹配到了此菜单,判断是否有此菜单的权限,没有的话跳转到404页面 | 22 | * 根据点击的菜单的xxx.do去菜单中的URL去匹配,当匹配到了此菜单,判断是否有此菜单的权限,没有的话跳转到404页面 |
23 | * 根据按钮权限,授权按钮(当前点的菜单和角色中各按钮的权限匹对) | 23 | * 根据按钮权限,授权按钮(当前点的菜单和角色中各按钮的权限匹对) |
24 | */ | 24 | */ |
25 | -// String USERNAME = getUsername(); //获取当前登录者loginname | ||
26 | -// Session session = getSession(); | ||
27 | -// List<Menu> menuList = (List<Menu>)session.getAttribute(USERNAME + Const.SESSION_allmenuList); //获取菜单列表 | ||
28 | -// return readMenu(menuList,menuUrl,session,USERNAME); | ||
29 | - return true; | 25 | + String USERNAME = getUsername(); //获取当前登录者loginname |
26 | + Session session = getSession(); | ||
27 | + List<Menu> menuList = (List<Menu>)session.getAttribute(USERNAME + Const.SESSION_allmenuList); //获取菜单列表 | ||
28 | + return readMenu(menuList,menuUrl,session,USERNAME); | ||
29 | +// return true; | ||
30 | } | 30 | } |
31 | 31 | ||
32 | /**校验菜单权限并初始按钮权限用于页面按钮显示与否(递归处理) | 32 | /**校验菜单权限并初始按钮权限用于页面按钮显示与否(递归处理) |