Commit 6b3a5ad0de85bc9b0b77643ef7f0dad59c6f822e

Authored by 孙向锦
1 parent 37b828b6

添加管理员界面

Showing 31 changed files with 1774 additions and 104 deletions
WebRoot/WEB-INF/jsp/sunvote/admin/admin_main.jsp 0 → 100644
  1 +<%@ page language="java" contentType="text/html; charset=UTF-8"
  2 + pageEncoding="UTF-8"%>
  3 +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
  4 +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
  5 +<%
  6 + String path = request.getContextPath();
  7 + String basePath = request.getScheme() + "://"
  8 + + request.getServerName() + ":" + request.getServerPort()
  9 + + path + "/";
  10 +%>
  11 +<!DOCTYPE html>
  12 +<html lang="zh-CN">
  13 +<head>
  14 +<meta charset="utf-8">
  15 +<meta http-equiv="X-UA-Compatible" content="IE=edge">
  16 +<meta name="viewport" content="width=device-width, initial-scale=1">
  17 +<title>中天电子-教育管理系统</title>
  18 +
  19 +<!-- Bootstrap -->
  20 +<link
  21 + href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css"
  22 + rel="stylesheet">
  23 +<link href="../static/css/teach.css?a=1" rel="stylesheet">
  24 +<link href="../static/css/mb_style.css" rel="stylesheet">
  25 +
  26 +<!-- HTML5 shim 和 Respond.js 是为了让 IE8 支持 HTML5 元素和媒体查询(media queries)功能 -->
  27 +<!-- 警告:通过 file:// 协议(就是直接将 html 页面拖拽到浏览器中)访问页面时 Respond.js 不起作用 -->
  28 +<!--[if lt IE 9]>
  29 + <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  30 + <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
  31 + <![endif]-->
  32 +</head>
  33 +<body>
  34 + <div class="header">
  35 + <div class="logo">
  36 + <img src="../static/images/logo.png" />
  37 + </div>
  38 + <div class="out">
  39 + <a href="../logout"><img src="../static/images/close.png" />退出登录</a>
  40 + </div>
  41 + <div class="clear"></div>
  42 + </div>
  43 + <div class="content">
  44 + <div class="content_l">
  45 + <div class="info_tab">
  46 + <div class="head_pic">
  47 + <img src="../static/images/head_defult.png" />
  48 + </div>
  49 + <div class="name">
  50 + <p>欢迎!</p>
  51 + <p id="school">${SNAME }</p>
  52 + <p id="name">${SNAME } 管理员</p>
  53 + </br></br>
  54 + </div>
  55 + </div>
  56 + <div class="class tab1">
  57 + <p>
  58 + 年级管理<span class="right jiao"></span>
  59 + </p>
  60 + <ul class="menu_1">
  61 + <c:forEach items="${gradeInfos}" var="var" varStatus="vs">
  62 + <li onclick="event.stopPropagation();chooseListClass('${var.SCHOOL_ID}','${var.GRADE_ID}')">
  63 + <p>${ var.GNAME }</p>
  64 + </li>
  65 + </c:forEach>
  66 +
  67 + </ul>
  68 + </div>
  69 + <%-- <div class="class tab1">
  70 + <p>
  71 + 科目管理<span class="right jiao"></span>
  72 + </p>
  73 + <ul class="menu_1">
  74 + <c:forEach items="${subjectInfos}" var="var" varStatus="vs">
  75 + <li onclick="event.stopPropagation();"><p>${var.SCNAME}</p>
  76 + </li>
  77 + </c:forEach>
  78 +
  79 + </ul>
  80 + </div> --%>
  81 + <div class="class tab1">
  82 + <p>
  83 + 任课管理<span class="right jiao"></span>
  84 + </p>
  85 + <ul class="menu_1">
  86 + <li onclick="event.stopPropagation();subject('${SCHOOL_ID}')"><p>科目管理</p></li>
  87 + <li onclick="event.stopPropagation();coursemanager('${SCHOOL_ID}')"><p>任课管理</p></li>
  88 + <li onclick="event.stopPropagation();teacher('${SCHOOL_ID}')"><p>教师管理</p></li>
  89 + </ul>
  90 + </div>
  91 + <div class="testpaper tab1">
  92 + <p>试卷管理<span class="right jiao"></span></p>
  93 + <ul class="menu_1">
  94 + <li >
  95 + <p id="qingsongkao_paper">轻松考试卷管理</p>
  96 + </li>
  97 + <li>
  98 + <p id="jishice_paper">即时测试卷管理</p>
  99 + </li>
  100 + </ul>
  101 +
  102 + </div>
  103 + <div class="analyse tab1">
  104 + <p>
  105 + 测验分析<span class="right jiao"></span>
  106 + </p>
  107 +
  108 + <ul class="menu_1">
  109 + <li >
  110 + <p>轻松考测验分析</p>
  111 + <ul class="menu_2">
  112 + <c:forEach items="${pd.TEACHER}" var="var" varStatus="vs">
  113 + <li onclick="event.stopPropagation();report('${var.CLASS_ID}')"><p>${var.CLASS_NAME} 成绩</p></li>
  114 + </c:forEach>
  115 + </ul>
  116 + </li>
  117 + <li>
  118 + <p>即时测测验分析</p>
  119 + <ul class="menu_2">
  120 + <c:forEach items="${pd.TEACHER}" var="var" varStatus="vs">
  121 + <li onclick="event.stopPropagation();report2('${var.CLASS_ID}')"><p>${var.CLASS_NAME} 成绩</p></li>
  122 + </c:forEach>
  123 + </ul>
  124 + </li>
  125 + </ul>
  126 + </div>
  127 + <div class="analyse tab1">
  128 + <p>
  129 + 系统设置<span class="right jiao"></span>
  130 + </p>
  131 +
  132 + <ul class="menu_1">
  133 + <li >
  134 + <p>学校设置</p>
  135 +
  136 + </li>
  137 + <li>
  138 + <p>年级设置</p>
  139 + </li>
  140 + <li>
  141 + <p>年级升级</p>
  142 + </li>
  143 + <li>
  144 + <p>其他配置</p>
  145 + </li>
  146 + </ul>
  147 + </div>
  148 + </div>
  149 + <div class="content_r">
  150 + <iframe name="mainFrame" id="mainFrame" frameborder="0" width="100%" height="100%"></iframe>
  151 +
  152 + </div>
  153 +
  154 + <div class="modal fade title_time" tabindex="-1" role="dialog">
  155 + <div class="modal-dialog" role="document" style="z-index:1400">
  156 + <div class="modal-content">
  157 + <div class="modal-header">
  158 + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  159 + <h4 class="modal-title">新建试卷</h4>
  160 + </div>
  161 + <div class="modal-body">
  162 + <div class="form-group">
  163 + <label for="enter_title" class="col-sm-4 control-label">测验标题</label>
  164 + <div class="col-sm-6">
  165 + <input type="text" class="form-control" id="enter_title" placeholder="输入测验标题(不能超过100个字符)" maxlength="100" minlength="1">
  166 + </div>
  167 + <div class="clearfix"></div>
  168 + </div>
  169 + <div class="form-group">
  170 + <label for="enter_time" class="col-sm-4 control-label">测验时长(分钟)</label>
  171 + <div class="col-sm-6">
  172 + <input type="number" class="form-control" id="enter_time" placeholder="输入测验时长(单位:分钟)" maxlength="3" oninput="if(value.length>3) value=value.slice(0,3)">
  173 + </div>
  174 + <div class="clearfix"></div>
  175 + </div>
  176 +
  177 + </div>
  178 + <div class="modal-footer">
  179 + <button type="button" class="btn btn-primary" id="time_submit">确定</button>
  180 + <button type="button" class="btn btn-primary" data-dismiss="modal">取消</button>
  181 + </div>
  182 + </div><!-- /.modal-content -->
  183 + </div><!-- /.modal-dialog -->
  184 + </div><!-- /.modal -->
  185 + <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
  186 + <script
  187 + src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
  188 + <script src="../static/js/model.js"></script>
  189 + <script src="../static/js/loading.js"></script>
  190 + <script src="../static/js/remove.js?a=2"></script>
  191 + <script src="../static/js/dailog.js"></script>
  192 + <script type="text/javascript">
  193 +
  194 + function subject(school_id){
  195 + var path = "../subject/listcs.do?school_id=" + school_id ;
  196 + //if($("#mainFrame").attr('src') != (path)){
  197 + $("#mainFrame").attr('src',path);
  198 + window.top.loading.show();
  199 + //}
  200 + }
  201 +
  202 + function coursemanager(school_id){
  203 + var path = "../coursemanagement/listcs.do?school_id=" + school_id ;
  204 + //if($("#mainFrame").attr('src') != (path)){
  205 + $("#mainFrame").attr('src',path);
  206 + window.top.loading.show();
  207 + //}
  208 + }
  209 + function teacher(school_id){
  210 + var path = "../teacher/listcs.do?school_id=" + school_id ;
  211 + if($("#mainFrame").attr('src') != (path)){
  212 + $("#mainFrame").attr('src',path);
  213 + window.top.loading.show();
  214 + }
  215 + }
  216 +
  217 + function chooseListClass(school_id,gradle_id){
  218 + var path = "../sclass/listcs.do?school_id=" + school_id + "&grade_id=" + gradle_id ;
  219 + if($("#mainFrame").attr('src') != (path)){
  220 + $("#mainFrame").attr('src',path);
  221 + window.top.loading.show();
  222 + }
  223 + }
  224 +
  225 + function report(classId){
  226 + //window.open('<%=basePath%>report/report.do?classid=' + classId);
  227 + //if($("#mainFrame").attr('src') != ('<%=basePath%>report/report.do?classid=' + classId)){
  228 + $("#mainFrame").attr('src','<%=basePath%>report/report.do?classid=' + classId);
  229 + window.top.loading.show();
  230 + //}
  231 + }
  232 + function report2(classId){
  233 + //window.open('<%=basePath%>report/report.do?classid=' + classId);
  234 + //if($("#mainFrame").attr('src') != ('<%=basePath%>report/report.do?classid=' + classId)){
  235 + $("#mainFrame").attr('src','<%=basePath%>teacher/test_list.do?classid=' + classId);
  236 + window.top.loading.show();
  237 + //}
  238 + }
  239 +
  240 + $("#time_submit").click(function(){
  241 + var name = $("#enter_title").val();
  242 + var time = $("#enter_time").val();
  243 + if(name != null&& name != '' && time != null && time != ''){
  244 + var itime = parseInt(time);
  245 + if(itime > 0 && itime <= 300){
  246 + self.location.href = "<%=basePath%>" + "paper/npaper.do?" + "name=" + name + "&time=" + time ;
  247 + $(".title_time").modal("hide");
  248 + }else{
  249 + alert("请输入正确的时间,时间不能超过300分钟");
  250 + }
  251 + }
  252 + });
  253 +
  254 + $("#qingsongkao_paper").click(function (){
  255 + var path = "../paper/list2.do?" ;
  256 + //$(".content_r").html('<iframe name="mainFrame" id="mainFrame" frameborder="0" style="width:100%;height:'+$(".content_l").height()+'px;" src=' + path + '></iframe>');
  257 + if($("#mainFrame").attr('src') != (path)){
  258 + $("#mainFrame").attr('src',path);
  259 + window.top.loading.show();
  260 + }
  261 + });
  262 +
  263 + $("#jishice_paper").click(function (){
  264 + var path = "../teacher/teach_paper.do?" ;
  265 + //if($("#mainFrame").attr('src') != (path)){
  266 + $("#mainFrame").attr('src',path);
  267 + window.top.loading.show();
  268 + //}
  269 + });
  270 + </script>
  271 +</body>
  272 +</html>
0 273 \ No newline at end of file
... ...
WebRoot/WEB-INF/jsp/sunvote/coursemanagement/coursemanagement_list2.jsp 0 → 100644
  1 +<%@ page language="java" contentType="text/html; charset=UTF-8"
  2 + pageEncoding="UTF-8"%>
  3 +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
  4 +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
  5 +<%@ taglib prefix="myelfun" uri="/WEB-INF/tld/elfun.tld"%>
  6 +<%
  7 + String path = request.getContextPath();
  8 + String basePath = request.getScheme() + "://"
  9 + + request.getServerName() + ":" + request.getServerPort()
  10 + + path + "/";
  11 +%>
  12 +<!DOCTYPE html>
  13 +<html lang="en">
  14 +<head>
  15 +<base href="<%=basePath%>">
  16 +<!-- 下拉框 -->
  17 +<link rel="stylesheet" href="static/ace/css/chosen.css" />
  18 +<link
  19 + href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css"
  20 + rel="stylesheet">
  21 +<link href="static/css/teach.css" rel="stylesheet">
  22 +<!-- jsp文件头和头部 -->
  23 +<%@ include file="../../system/index/top.jsp"%>
  24 +<!-- 日期框 -->
  25 +<link rel="stylesheet" href="static/ace/css/datepicker.css" />
  26 +</head>
  27 +<body class="no-skin">
  28 +
  29 +
  30 +
  31 + <!-- 检索 -->
  32 + <form action="coursemanagement/listcs.do" method="post" name="Form"
  33 + id="Form">
  34 +
  35 + <div class="head_box">
  36 + <div class="box_header">
  37 + <div class="head_box_l">
  38 + <p>
  39 + <span class="right_b"></span>任课管理
  40 + </p>
  41 + </div>
  42 + <div class="head_box_r">
  43 +
  44 + </div>
  45 + <div class="clear"></div>
  46 + </div>
  47 + <div style="padding:0 5%;background:#fff;">
  48 + <table class="table table-striped">
  49 + <col style="width: 10%" />
  50 + <col style="width: 30%" />
  51 + <col style="width: 30%" />
  52 + <col style="width: 30%" />
  53 + <thead>
  54 + <tr>
  55 + <th><input type="checkbox" name='ids' id="ids" />序号</th>
  56 + <th>老师姓名</th>
  57 + <th>班级名称</th>
  58 + <th>科目</th>
  59 + </tr>
  60 + </thead>
  61 + </table>
  62 + </div>
  63 + </div>
  64 + <div class="table_box">
  65 + <table class="table table-striped">
  66 + <col style="width: 10%" />
  67 + <col style="width: 30%" />
  68 + <col style="width: 30%" />
  69 + <col style="width: 30%" />
  70 + <tbody>
  71 + <c:choose>
  72 + <c:when test="${not empty varList}">
  73 + <c:forEach items="${varList}" var="var" varStatus="vs">
  74 + <tr>
  75 + <td><input type="checkbox" name='ids' id="ids" value="${var.PAPER_ID}"/>${vs.index+1}</td>
  76 + <td >${var.NAME}</td>
  77 + <td >${var.CLASS_NAME}</td>
  78 + <td >${var.CNAME}</td>
  79 + </tr>
  80 +
  81 + </c:forEach>
  82 + </c:when>
  83 + <c:otherwise>
  84 + <tr class="main_info">
  85 + <td colspan="100" class="center" >没有相关数据</td>
  86 + </tr>
  87 + </c:otherwise>
  88 + </c:choose>
  89 + </tbody>
  90 + </table>
  91 +
  92 + </div>
  93 + </form>
  94 + <!-- /.main-container -->
  95 +
  96 + <!-- basic scripts -->
  97 + <!-- 页面底部js¨ -->
  98 + <%@ include file="../../system/index/foot.jsp"%>
  99 + <!-- 删除时确认窗口 -->
  100 + <script src="static/ace/js/bootbox.js"></script>
  101 + <!-- ace scripts -->
  102 + <script src="static/ace/js/ace/ace.js"></script>
  103 + <!-- 下拉框 -->
  104 + <script src="static/ace/js/chosen.jquery.js"></script>
  105 + <!-- 日期框 -->
  106 + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script>
  107 + <!--提示框-->
  108 + <script type="text/javascript" src="static/js/jquery.tips.js"></script>
  109 + <script type="text/javascript">
  110 + $(document).ready(function(){
  111 + window.top.loading.remove();
  112 + });
  113 + </script>
  114 +
  115 +
  116 +</body>
  117 +</html>
0 118 \ No newline at end of file
... ...
WebRoot/WEB-INF/jsp/sunvote/paper/paper_list2.jsp
... ... @@ -103,8 +103,6 @@
103 103 </c:choose>
104 104 </tbody>
105 105 </table>
106   -
107   -
108 106 <div class="footer">
109 107 <div class="creat">
110 108 <input type="button" onclick="parent.$('.title_time').modal('show');" value="新建试卷" />
... ...
WebRoot/WEB-INF/jsp/sunvote/schooladmin/schooladmin_edit.jsp 0 → 100644
  1 +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2 +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
  3 +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
  4 +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
  5 +<%
  6 + String path = request.getContextPath();
  7 + String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
  8 +%>
  9 +<!DOCTYPE html>
  10 +<html lang="en">
  11 + <head>
  12 + <base href="<%=basePath%>">
  13 + <!-- 下拉框 -->
  14 + <link rel="stylesheet" href="static/ace/css/chosen.css" />
  15 + <!-- jsp文件头和头部 -->
  16 + <%@ include file="../../system/index/top.jsp"%>
  17 + <!-- 日期框 -->
  18 + <link rel="stylesheet" href="static/ace/css/datepicker.css" />
  19 +</head>
  20 +<body class="no-skin">
  21 +<!-- /section:basics/navbar.layout -->
  22 +<div class="main-container" id="main-container">
  23 + <!-- /section:basics/sidebar -->
  24 + <div class="main-content">
  25 + <div class="main-content-inner">
  26 + <div class="page-content">
  27 + <div class="row">
  28 + <div class="col-xs-12">
  29 +
  30 + <form action="schooladmin/${msg }.do" name="Form" id="Form" method="post">
  31 + <input type="hidden" name="SCHOOLADMIN_ID" id="SCHOOLADMIN_ID" value="${pd.SCHOOLADMIN_ID}"/>
  32 + <div id="zhongxin" style="padding-top: 13px;">
  33 + <table id="table_report" class="table table-striped table-bordered table-hover">
  34 + <tr>
  35 + <td style="width:75px;text-align: right;padding-top: 13px;">学校:</td>
  36 + <td>
  37 + <select class="chosen-select form-control" name="SCHOOL_ID" id="SCHOOL_ID" data-placeholder="这里输入所属学校">
  38 + <c:forEach var="item" items="${schools}">
  39 + <option value="${item.ID}" <c:if test="${pd.SCHOOL_ID==item.ID}">selected="true"</c:if>>${item.NAME}</option>
  40 + </c:forEach>
  41 + </select>
  42 + </td>
  43 + </tr>
  44 + <tr>
  45 + <td style="width:75px;text-align: right;padding-top: 13px;">管理员账号:</td>
  46 + <td><input type="text" name="ACCOUT" id="ACCOUT" value="${pd.ACCOUT}" maxlength="255" placeholder="这里输入管理员账号" title="管理员账号" style="width:98%;"/></td>
  47 + </tr>
  48 + <tr>
  49 + <td style="width:75px;text-align: right;padding-top: 13px;">管理员密码:</td>
  50 + <td><input type="text" name="PASSWORD" id="PASSWORD" value="" maxlength="255" placeholder="这里输入管理员密码" title="管理员密码" style="width:98%;"/></td>
  51 + </tr>
  52 + <tr>
  53 + <td style="width:75px;text-align: right;padding-top: 13px;">管理员姓名:</td>
  54 + <td><input type="text" name="ROLE" id="ROLE" value="${pd.ROLE}" maxlength="255" placeholder="这里输入管理员角色" title="管理员角色" style="width:98%;"/></td>
  55 + </tr>
  56 + <tr>
  57 + <td style="width:75px;text-align: right;padding-top: 13px;">管理员备注:</td>
  58 + <td><input type="text" name="REMARK" id="REMARK" value="${pd.REMARK}" maxlength="255" placeholder="这里输入管理员备注" title="管理员备注" style="width:98%;"/></td>
  59 + </tr>
  60 + <tr>
  61 + <td style="text-align: center;" colspan="10">
  62 + <a class="btn btn-mini btn-primary" onclick="save();">保存</a>
  63 + <a class="btn btn-mini btn-danger" onclick="top.Dialog.close();">取消</a>
  64 + </td>
  65 + </tr>
  66 + </table>
  67 + </div>
  68 + <div id="zhongxin2" class="center" style="display:none"><br/><br/><br/><br/><br/><img src="static/images/jiazai.gif" /><br/><h4 class="lighter block green">提交中...</h4></div>
  69 + </form>
  70 + </div>
  71 + <!-- /.col -->
  72 + </div>
  73 + <!-- /.row -->
  74 + </div>
  75 + <!-- /.page-content -->
  76 + </div>
  77 + </div>
  78 + <!-- /.main-content -->
  79 +</div>
  80 +<!-- /.main-container -->
  81 +
  82 +
  83 + <!-- 页面底部js¨ -->
  84 + <%@ include file="../../system/index/foot.jsp"%>
  85 + <!-- 下拉框 -->
  86 + <script src="static/ace/js/chosen.jquery.js"></script>
  87 + <!-- 日期框 -->
  88 + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script>
  89 + <!--提示框-->
  90 + <script type="text/javascript" src="static/js/jquery.tips.js"></script>
  91 + <script type="text/javascript">
  92 + $(top.hangge());
  93 + //保存
  94 + function save(){
  95 + if($("#SCHOOL_ID").val()==""){
  96 + $("#SCHOOL_ID").tips({
  97 + side:3,
  98 + msg:'请输入学校ID',
  99 + bg:'#AE81FF',
  100 + time:2
  101 + });
  102 + $("#SCHOOL_ID").focus();
  103 + return false;
  104 + }
  105 + if($("#ACCOUT").val()==""){
  106 + $("#ACCOUT").tips({
  107 + side:3,
  108 + msg:'请输入管理员账号',
  109 + bg:'#AE81FF',
  110 + time:2
  111 + });
  112 + $("#ACCOUT").focus();
  113 + return false;
  114 + }
  115 + if($("#PASSWORD").val()==""){
  116 + $("#PASSWORD").tips({
  117 + side:3,
  118 + msg:'请输入管理员密码',
  119 + bg:'#AE81FF',
  120 + time:2
  121 + });
  122 + $("#PASSWORD").focus();
  123 + return false;
  124 + }
  125 + if($("#ROLE").val()==""){
  126 + $("#ROLE").tips({
  127 + side:3,
  128 + msg:'请输入管理员角色',
  129 + bg:'#AE81FF',
  130 + time:2
  131 + });
  132 + $("#ROLE").focus();
  133 + return false;
  134 + }
  135 + if($("#REMARK").val()==""){
  136 + $("#REMARK").tips({
  137 + side:3,
  138 + msg:'请输入管理员备注',
  139 + bg:'#AE81FF',
  140 + time:2
  141 + });
  142 + $("#REMARK").focus();
  143 + return false;
  144 + }
  145 + $("#Form").submit();
  146 + $("#zhongxin").hide();
  147 + $("#zhongxin2").show();
  148 + }
  149 +
  150 + $(function() {
  151 + //日期框
  152 + $('.date-picker').datepicker({autoclose: true,todayHighlight: true});
  153 + });
  154 + </script>
  155 +</body>
  156 +</html>
0 157 \ No newline at end of file
... ...
WebRoot/WEB-INF/jsp/sunvote/sclass/sclass_list.jsp renamed to WebRoot/WEB-INF/jsp/sunvote/schooladmin/schooladmin_list.jsp
... ... @@ -2,7 +2,6 @@
2 2 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
3 3 <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
4 4 <%@ taglib prefix="myelfun" uri="/WEB-INF/tld/elfun.tld"%>
5   -
6 5 <%
7 6 String path = request.getContextPath();
8 7 String basePath = request.getScheme() + "://"
... ... @@ -32,41 +31,9 @@
32 31 <div class="col-xs-12">
33 32  
34 33 <!-- 检索 -->
35   - <form action="sclass/list.do" method="post" name="Form" id="Form">
  34 + <form action="schooladmin/list.do" method="post" name="Form" id="Form">
36 35 <table style="margin-top:5px;">
37   - <tr>
38   - <td style="vertical-align:top;padding-left:2px;">
39   - <select class="chosen-select form-control" name="SCHOOL_ID" id="SCHOOL_ID" data-placeholder="请选择" style="vertical-align:top;width: 120px;">
40   - <option value=""></option>
41   - <option value="">全部</option>
42   - <c:forEach var="item" items="${schools}">
43   - <option value="${item.ID}" >${item.NAME}</option>
44   - </c:forEach>
45   - </select>
46   - </td>
47   - <td style="vertical-align:top;padding-left:2px;">
48   - <select class="chosen-select form-control" name="GRADE_ID" id="GRADE_ID" data-placeholder="请选择" style="vertical-align:top;width: 120px;">
49   - <option value=""></option>
50   - <option value="">全部</option>
51   - <c:forEach var="item" items="${grades}">
52   - <option value="${item.ID}">${item.NAME}</option>
53   - </c:forEach>
54   - </select>
55   - </td>
56   - <td style="vertical-align:top;padding-left:2px;">
57   - <select class="chosen-select form-control" name="CLASS_TYPE" id="CLASS_TYPE" data-placeholder="请选择" style="vertical-align:top;width: 120px;">
58   - <option value=""></option>
59   - <option value="">全部</option>
60   - <c:forEach var="item" items="${classTypes}">
61   - <option value="${item.ID}">${item.NAME}</option>
62   - </c:forEach>
63   - </select>
64   - </td>
65   - <c:if test="${QX.cha == 1 }">
66   - <td style="vertical-align:top;padding-left:2px"><a class="btn btn-light btn-xs" onclick="tosearch();" title="检索"><i id="nav-search-icon" class="ace-icon fa fa-search bigger-110 nav-search-icon blue"></i></a></td>
67   - </c:if>
68   - <c:if test="${QX.toExcel == 1 }"><td style="vertical-align:top;padding-left:2px;"><a class="btn btn-light btn-xs" onclick="toExcel();" title="导出到EXCEL"><i id="nav-search-icon" class="ace-icon fa fa-download bigger-110 nav-search-icon blue"></i></a></td></c:if>
69   - </tr>
  36 +
70 37 </table>
71 38 <!-- 检索 -->
72 39  
... ... @@ -77,12 +44,11 @@
77 44 <label class="pos-rel"><input type="checkbox" class="ace" id="zcheckbox" /><span class="lbl"></span></label>
78 45 </th>
79 46 <th class="center" style="width:50px;">序号</th>
80   - <th class="center">所属学校</th>
81   - <th class="center">所属年级</th>
82   - <th class="center">班级类型</th>
83   - <th class="center">班级名称</th>
84   - <th class="center">班级编码</th>
85   - <th class="center">班级基站</th>
  47 + <th class="center">学校</th>
  48 + <th class="center">管理员账号</th>
  49 + <th class="center">管理员密码</th>
  50 + <th class="center">管理员角色</th>
  51 + <th class="center">管理员姓名</th>
86 52 <th class="center">操作</th>
87 53 </tr>
88 54 </thead>
... ... @@ -95,27 +61,26 @@
95 61 <c:forEach items="${varList}" var="var" varStatus="vs">
96 62 <tr>
97 63 <td class='center'>
98   - <label class="pos-rel"><input type='checkbox' name='ids' value="${var.ID}" class="ace" /><span class="lbl"></span></label>
  64 + <label class="pos-rel"><input type='checkbox' name='ids' value="${var.SCHOOLADMIN_ID}" class="ace" /><span class="lbl"></span></label>
99 65 </td>
100 66 <td class='center' style="width: 30px;">${vs.index+1}</td>
101 67 <td class='center'>${myelfun:findSchoolName(var.SCHOOL_ID)}</td>
102   - <td class='center'>${myelfun:findGradeName(var.GRADE_ID)}</td>
103   - <td class='center'>${myelfun:findClassTypeName(var.CLASS_TYPE)}</td>
104   - <td class='center'>${var.CLASS_NAME}</td>
105   - <td class='center'>${var.CLASS_CODE}</td>
106   - <td class='center'>${myelfun:findBasestationName(var.BASESTATION_ID)}</td>
  68 + <td class='center'>${var.ACCOUT}</td>
  69 + <td class='center'>************</td>
  70 + <td class='center'>${var.ROLE}</td>
  71 + <td class='center'>${var.REMARK}</td>
107 72 <td class="center">
108 73 <c:if test="${QX.edit != 1 && QX.del != 1 }">
109 74 <span class="label label-large label-grey arrowed-in-right arrowed-in"><i class="ace-icon fa fa-lock" title="无权限"></i></span>
110 75 </c:if>
111 76 <div class="hidden-sm hidden-xs btn-group">
112 77 <c:if test="${QX.edit == 1 }">
113   - <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${var.ID}');">
  78 + <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${var.SCHOOLADMIN_ID}');">
114 79 <i class="ace-icon fa fa-pencil-square-o bigger-120" title="编辑"></i>
115 80 </a>
116 81 </c:if>
117 82 <c:if test="${QX.del == 1 }">
118   - <a class="btn btn-xs btn-danger" onclick="del('${var.ID}');">
  83 + <a class="btn btn-xs btn-danger" onclick="del('${var.SCHOOLADMIN_ID}');">
119 84 <i class="ace-icon fa fa-trash-o bigger-120" title="删除"></i>
120 85 </a>
121 86 </c:if>
... ... @@ -129,7 +94,7 @@
129 94 <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close">
130 95 <c:if test="${QX.edit == 1 }">
131 96 <li>
132   - <a style="cursor:pointer;" onclick="edit('${var.ID}');" class="tooltip-success" data-rel="tooltip" title="修改">
  97 + <a style="cursor:pointer;" onclick="edit('${var.SCHOOLADMIN_ID}');" class="tooltip-success" data-rel="tooltip" title="修改">
133 98 <span class="green">
134 99 <i class="ace-icon fa fa-pencil-square-o bigger-120"></i>
135 100 </span>
... ... @@ -138,7 +103,7 @@
138 103 </c:if>
139 104 <c:if test="${QX.del == 1 }">
140 105 <li>
141   - <a style="cursor:pointer;" onclick="del('${var.ID}');" class="tooltip-error" data-rel="tooltip" title="删除">
  106 + <a style="cursor:pointer;" onclick="del('${var.SCHOOLADMIN_ID}');" class="tooltip-error" data-rel="tooltip" title="删除">
142 107 <span class="red">
143 108 <i class="ace-icon fa fa-trash-o bigger-120"></i>
144 109 </span>
... ... @@ -275,7 +240,7 @@
275 240 var diag = new top.Dialog();
276 241 diag.Drag=true;
277 242 diag.Title ="新增";
278   - diag.URL = '<%=basePath%>sclass/goAdd.do';
  243 + diag.URL = '<%=basePath%>schooladmin/goAdd.do';
279 244 diag.Width = 450;
280 245 diag.Height = 355;
281 246 diag.Modal = true; //有无遮罩窗口
... ... @@ -299,7 +264,7 @@
299 264 bootbox.confirm("确定要删除吗?", function(result) {
300 265 if(result) {
301 266 top.jzts();
302   - var url = "<%=basePath%>sclass/delete.do?ID="+Id+"&tm="+new Date().getTime();
  267 + var url = "<%=basePath%>schooladmin/delete.do?SCHOOLADMIN_ID="+Id+"&tm="+new Date().getTime();
303 268 $.get(url,function(data){
304 269 tosearch();
305 270 });
... ... @@ -313,7 +278,7 @@
313 278 var diag = new top.Dialog();
314 279 diag.Drag=true;
315 280 diag.Title ="编辑";
316   - diag.URL = '<%=basePath%>sclass/goEdit.do?ID='+Id;
  281 + diag.URL = '<%=basePath%>schooladmin/goEdit.do?SCHOOLADMIN_ID='+Id;
317 282 diag.Width = 450;
318 283 diag.Height = 355;
319 284 diag.Modal = true; //有无遮罩窗口
... ... @@ -357,7 +322,7 @@
357 322 top.jzts();
358 323 $.ajax({
359 324 type: "POST",
360   - url: '<%=basePath%>sclass/deleteAll.do?tm='+new Date().getTime(),
  325 + url: '<%=basePath%>schooladmin/deleteAll.do?tm='+new Date().getTime(),
361 326 data: {DATA_IDS:str},
362 327 dataType:'json',
363 328 //beforeSend: validateData,
... ... @@ -376,7 +341,7 @@
376 341  
377 342 //导出excel
378 343 function toExcel(){
379   - window.location.href='<%=basePath%>sclass/excel.do';
  344 + window.location.href='<%=basePath%>schooladmin/excel.do';
380 345 }
381 346 </script>
382 347  
... ...
WebRoot/WEB-INF/jsp/sunvote/sclass/sclass_list2.jsp 0 → 100644
  1 +<%@ page language="java" contentType="text/html; charset=UTF-8"
  2 + pageEncoding="UTF-8"%>
  3 +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
  4 +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
  5 +<%@ taglib prefix="myelfun" uri="/WEB-INF/tld/elfun.tld"%>
  6 +
  7 +<%
  8 + String path = request.getContextPath();
  9 + String basePath = request.getScheme() + "://"
  10 + + request.getServerName() + ":" + request.getServerPort()
  11 + + path + "/";
  12 +%>
  13 +<!DOCTYPE html>
  14 +<html lang="en">
  15 +<head>
  16 +<base href="<%=basePath%>">
  17 +<!-- 下拉框 -->
  18 +<link rel="stylesheet" href="static/ace/css/chosen.css" />
  19 +<!-- jsp文件头和头部 -->
  20 +<%@ include file="../../system/index/top.jsp"%>
  21 +<!-- 日期框 -->
  22 +<link rel="stylesheet" href="static/ace/css/datepicker.css" />
  23 +<link
  24 + href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css"
  25 + rel="stylesheet">
  26 +<link href="static/css/teach.css" rel="stylesheet">
  27 +</head>
  28 +<body class="no-skin">
  29 +
  30 + <!-- 检索 -->
  31 + <form action="sclass/listcs.do" method="post" name="Form" id="Form">
  32 + <div class="head_box">
  33 + <div class="box_header">
  34 + <div class="head_box_l">
  35 + <p>
  36 + <span class="right_b"></span>班级管理
  37 + </p>
  38 + </div>
  39 + <div class="clearfix"></div>
  40 + </div>
  41 + <div style="padding:0 5%;background:#fff;">
  42 +
  43 + <table class="table table-striped">
  44 + <col style="width: 10%" />
  45 + <col style="width: 22%" />
  46 + <col style="width: 22%" />
  47 + <col style="width: 23%" />
  48 + <col style="width: 23%" />
  49 + <thead>
  50 + <tr>
  51 + <th><input type="checkbox" value="0" name='ids' id="ids" />序号</th>
  52 + <th class="center">班级名称</th>
  53 + <th class="center">班级类型</th>
  54 + <th class="center">班级编码</th>
  55 + <th class="center">班级基站</th>
  56 + </tr>
  57 + </thead>
  58 + </table>
  59 + </div>
  60 +
  61 + <div class="clearfix"></div>
  62 + <!-- 检索 -->
  63 +
  64 + </div>
  65 + <div class="table_box">
  66 + <table class="table table-striped">
  67 + <col style="width: 10%" />
  68 + <col style="width: 22%" />
  69 + <col style="width: 22%" />
  70 + <col style="width: 23%" />
  71 + <col style="width: 23%" />
  72 + <tbody>
  73 + <!-- 开始循环 -->
  74 + <c:choose>
  75 + <c:when test="${not empty varList}">
  76 + <c:forEach items="${varList}" var="var" varStatus="vs">
  77 + <tr>
  78 + <td><input type="checkbox" name='ids' id="ids"
  79 + value="${var.ID}" />${vs.index+1}</td>
  80 + <td class='center'><a href="student/listcs.do?class_id=${var.ID }">${var.CLASS_NAME}</a></td>
  81 + <td class='center'>${myelfun:findClassTypeName(var.CLASS_TYPE)}</td>
  82 + <td class='center'>${var.CLASS_CODE}</td>
  83 + <td class='center'>${myelfun:findBasestationName(var.BASESTATION_ID)}</td>
  84 + </tr>
  85 + </c:forEach>
  86 + </c:when>
  87 + <c:otherwise>
  88 + <tr class="main_info">
  89 + <td colspan="100" class="center">没有相关数据</td>
  90 + </tr>
  91 + </c:otherwise>
  92 + </c:choose>
  93 + </tbody>
  94 + </table>
  95 + <%-- <div class="footer">
  96 + <div class="creat">
  97 + <input type="button" onclick="add();" value="添加学生" />
  98 + </div>
  99 + <div class="creat">
  100 + <input type="button" onclick="upload();" value="批量导入" />
  101 + </div>
  102 + <div class="removeAll">
  103 + <input type="button" onclick="deleteAll();" value="批量删除" />
  104 + </div>
  105 + <div class="page_box">
  106 + <div class="pagination"
  107 + style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div>
  108 + </div>
  109 + </div> --%>
  110 + </div>
  111 + </form>
  112 + <!-- basic scripts -->
  113 + <!-- 页面底部js¨ -->
  114 + <%@ include file="../../system/index/foot.jsp"%>
  115 + <!-- 删除时确认窗口 -->
  116 + <script src="static/ace/js/bootbox.js"></script>
  117 + <!-- ace scripts -->
  118 + <script src="static/ace/js/ace/ace.js"></script>
  119 + <!-- 下拉框 -->
  120 + <script src="static/ace/js/chosen.jquery.js"></script>
  121 + <!-- 日期框 -->
  122 + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script>
  123 + <!--提示框-->
  124 + <script type="text/javascript" src="static/js/jquery.tips.js"></script>
  125 + <script type="text/javascript">
  126 + $(document).ready(function() {
  127 + window.top.loading.remove();
  128 + });
  129 + </script>
  130 +
  131 +
  132 +</body>
  133 +</html>
0 134 \ No newline at end of file
... ...
WebRoot/WEB-INF/jsp/sunvote/subject/subject_list2.jsp 0 → 100644
  1 +<%@ page language="java" contentType="text/html; charset=UTF-8"
  2 + pageEncoding="UTF-8"%>
  3 +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
  4 +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
  5 +<%
  6 + String path = request.getContextPath();
  7 + String basePath = request.getScheme() + "://"
  8 + + request.getServerName() + ":" + request.getServerPort()
  9 + + path + "/";
  10 +%>
  11 +<!DOCTYPE html>
  12 +<html lang="en">
  13 +<head>
  14 +<base href="<%=basePath%>">
  15 +<!-- 下拉框 -->
  16 +<link rel="stylesheet" href="static/ace/css/chosen.css" />
  17 +<!-- jsp文件头和头部 -->
  18 +<%@ include file="../../system/index/top.jsp"%>
  19 +<!-- 日期框 -->
  20 +<link rel="stylesheet" href="static/ace/css/datepicker.css" />
  21 +<link
  22 + href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css"
  23 + rel="stylesheet">
  24 +<link href="static/css/teach.css" rel="stylesheet">
  25 +</head>
  26 +<body class="no-skin">
  27 + <form action="subject/listcs.do" method="post" name="Form" id="Form">
  28 + <div class="head_box">
  29 + <div class="box_header">
  30 + <div class="head_box_l">
  31 + <p>
  32 + <span class="right_b"></span>科目管理
  33 + </p>
  34 + </div>
  35 + <div class="head_box_r"></div>
  36 + <div class="clear"></div>
  37 + </div>
  38 + <div style="padding:0 5%;background:#fff;">
  39 + <table class="table table-striped">
  40 + <col style="width: 10%" />
  41 + <col style="width: 30%" />
  42 + <col style="width: 30%" />
  43 + <col style="width: 30%" />
  44 + <thead>
  45 + <tr>
  46 + <th><input type="checkbox" name='ids' id="ids" />序号</th>
  47 + <th class="center">中文名称</th>
  48 + <th class="center">英文名称</th>
  49 + <th class="center">备注</th>
  50 + </tr>
  51 + </thead>
  52 + </table>
  53 + </div>
  54 + </div>
  55 + <div class="table_box">
  56 + <table class="table table-striped">
  57 + <col style="width: 10%" />
  58 + <col style="width: 30%" />
  59 + <col style="width: 30%" />
  60 + <col style="width: 35%" />
  61 +
  62 + <tbody>
  63 + <c:choose>
  64 + <c:when test="${not empty varList}">
  65 + <c:forEach items="${varList}" var="var" varStatus="vs">
  66 + <tr>
  67 + <td><input type="checkbox" name='ids' id="ids"
  68 + value="${var.ID}" />${vs.index+1}</td>
  69 + <td class='center'>${var.CNAME}</td>
  70 + <td class='center'>${var.ENAME}</td>
  71 + <td class='center'>${var.REMARK}</td>
  72 +
  73 + </tr>
  74 +
  75 + </c:forEach>
  76 + </c:when>
  77 + <c:otherwise>
  78 + <tr class="main_info">
  79 + <td colspan="100" class="center">没有相关数据</td>
  80 + </tr>
  81 + </c:otherwise>
  82 + </c:choose>
  83 + </tbody>
  84 + </table>
  85 + <div class="footer">
  86 + <div class="creat"></div>
  87 + <div class="removeAll"></div>
  88 + <div class="page_box">
  89 +
  90 + <div class="pagination"
  91 + style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div>
  92 + </div>
  93 + </div>
  94 + </div>
  95 + </form>
  96 +
  97 + <!-- /.main-container -->
  98 +
  99 + <!-- basic scripts -->
  100 + <!-- 页面底部js¨ -->
  101 + <%@ include file="../../system/index/foot.jsp"%>
  102 + <!-- 删除时确认窗口 -->
  103 + <script src="static/ace/js/bootbox.js"></script>
  104 + <!-- ace scripts -->
  105 + <script src="static/ace/js/ace/ace.js"></script>
  106 + <!-- 下拉框 -->
  107 + <script src="static/ace/js/chosen.jquery.js"></script>
  108 + <!-- 日期框 -->
  109 + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script>
  110 + <!--提示框-->
  111 + <script type="text/javascript" src="static/js/jquery.tips.js"></script>
  112 + <script type="text/javascript">
  113 + $(document).ready(function(){
  114 + window.top.loading.remove();
  115 + });
  116 + </script>
  117 +
  118 +
  119 +</body>
  120 +</html>
0 121 \ No newline at end of file
... ...
WebRoot/WEB-INF/jsp/sunvote/teacher/teacher_list2.jsp 0 → 100644
  1 +<%@ page language="java" contentType="text/html; charset=UTF-8"
  2 + pageEncoding="UTF-8"%>
  3 +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
  4 +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
  5 +<%@ taglib prefix="myelfun" uri="/WEB-INF/tld/elfun.tld"%>
  6 +<%
  7 + String path = request.getContextPath();
  8 + String basePath = request.getScheme() + "://"
  9 + + request.getServerName() + ":" + request.getServerPort()
  10 + + path + "/";
  11 +%>
  12 +<!DOCTYPE html>
  13 +<html lang="en">
  14 +<head>
  15 +<base href="<%=basePath%>">
  16 +<!-- 下拉框 -->
  17 +<link rel="stylesheet" href="static/ace/css/chosen.css" />
  18 +<!-- jsp文件头和头部 -->
  19 +<%@ include file="../../system/index/top.jsp"%>
  20 +<!-- 日期框 -->
  21 +<link rel="stylesheet" href="static/ace/css/datepicker.css" />
  22 +<link
  23 + href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css"
  24 + rel="stylesheet">
  25 +<link href="static/css/teach.css" rel="stylesheet">
  26 +</head>
  27 +<body class="no-skin">
  28 +
  29 + <form action="teacher/listcs.do" method="post" name="Form" id="Form">
  30 + <div class="head_box">
  31 + <div class="box_header">
  32 + <div class="head_box_l">
  33 + <p>
  34 + <span class="right_b"></span>教师管理
  35 + </p>
  36 + </div>
  37 + <div class="head_box_r"></div>
  38 + <div class="clear"></div>
  39 + </div>
  40 + <div style="padding:0 5%;background:#fff;">
  41 + <table class="table table-striped">
  42 + <col style="width: 10%" />
  43 + <col style="width: 10%" />
  44 + <col style="width: 10%" />
  45 + <col style="width: 10%" />
  46 + <col style="width: 15%" />
  47 + <col style="width: 15%" />
  48 + <col style="width: 15%" />
  49 + <col style="width: 15%" />
  50 + <thead>
  51 + <tr>
  52 + <th><input type="checkbox" value="0" name='ids' id="ids" />序号</th>
  53 + <th class="center">姓名</th>
  54 + <th class="center">电话</th>
  55 + <th class="center">座机电话</th>
  56 + <th class="center">证件号</th>
  57 + <th class="center">账号</th>
  58 + <th class="center">性别</th>
  59 + <th class="center">教师卡编号</th>
  60 + </tr>
  61 + </thead>
  62 + </table>
  63 + </div>
  64 + </div>
  65 + <div class="table_box">
  66 + <table class="table table-striped">
  67 + <col style="width: 10%" />
  68 + <col style="width: 10%" />
  69 + <col style="width: 10%" />
  70 + <col style="width: 10%" />
  71 + <col style="width: 15%" />
  72 + <col style="width: 15%" />
  73 + <col style="width: 15%" />
  74 + <col style="width: 15%" />
  75 + <tbody>
  76 + <!-- 开始循环 -->
  77 + <c:choose>
  78 + <c:when test="${not empty varList}">
  79 + <c:forEach items="${varList}" var="var" varStatus="vs">
  80 + <tr>
  81 + <td><input type="checkbox" name='ids' id="ids" value="${var.ID}" />${vs.index+1}</td>
  82 + <td class='center'>${var.NAME}</td>
  83 + <td class='center'>${var.PHONE}</td>
  84 + <td class='center'>${var.SEAT_PHONE}</td>
  85 + <td class='center'>${var.CARD_NO}</td>
  86 + <td class='center'>${var.ACCOUT}</td>
  87 + <td class='center'>${var.SEX == 1? "男":"女"}</td>
  88 + <td class='center'>${var.KEYPAD_ID}</td>
  89 + </tr>
  90 +
  91 + </c:forEach>
  92 + </c:when>
  93 + <c:otherwise>
  94 + <tr class="main_info">
  95 + <td colspan="100" class="center">没有相关数据</td>
  96 + </tr>
  97 + </c:otherwise>
  98 + </c:choose>
  99 + </tbody>
  100 + </table>
  101 + </div>
  102 + </form>
  103 +
  104 +
  105 +
  106 + <!-- basic scripts -->
  107 + <!-- 页面底部js¨ -->
  108 + <%@ include file="../../system/index/foot.jsp"%>
  109 + <!-- 删除时确认窗口 -->
  110 + <script src="static/ace/js/bootbox.js"></script>
  111 + <!-- ace scripts -->
  112 + <script src="static/ace/js/ace/ace.js"></script>
  113 + <!-- 下拉框 -->
  114 + <script src="static/ace/js/chosen.jquery.js"></script>
  115 + <!-- 日期框 -->
  116 + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script>
  117 + <!--提示框-->
  118 + <script type="text/javascript" src="static/js/jquery.tips.js"></script>
  119 + <script type="text/javascript">
  120 + $(document).ready(function() {
  121 + window.top.loading.remove();
  122 + });
  123 + </script>
  124 +
  125 +
  126 +</body>
  127 +</html>
0 128 \ No newline at end of file
... ...
WebRoot/WEB-INF/jsp/system/index/login.jsp
... ... @@ -109,6 +109,8 @@
109 109 saveCookie();
110 110 if(data.teacher != null){
111 111 window.location.href="main/teacher";
  112 + }else if(data.admin != null){
  113 + window.location.href="main/admin";
112 114 }else{
113 115 window.location.href="main/index";
114 116 }
... ...
WebRoot/afterService/speed/index.html
... ... @@ -59,7 +59,9 @@
59 59  
60 60 function category(index,data1,data2){
61 61 var myChart = echarts.init(document.getElementById('main'+index));
62   - console.log(data2)
  62 + console.log("-----------------------------------");
  63 + console.log(data1);
  64 + console.log(data2);
63 65 var option = {
64 66 xAxis: {
65 67 type: 'category',
... ... @@ -79,21 +81,25 @@
79 81 function getData(){
80 82 var dw="byte/s";
81 83 var _html="";
82   - var i=0;
83   - var j=0;
  84 +
84 85 $.ajax({
85 86 url:"/SunvoteEducation/api/v1/printmsg",
86 87 type:"post",
87 88 async:"true",
88 89 success:function(data){
  90 +
  91 + var j=0;
89 92 console.log(data.data);
90 93 for(var js2 in data.data){
91   - j++;
  94 +
92 95 console.log(j);
93 96 var data1=[];
94 97 var data2=[];
  98 + var i=-1;
  99 + var speedNumN ;
  100 + var dwN ;
95 101 for(var js1 in data.data[js2]){
96   - data1[i] = i;
  102 + data1[i] = parseInt(js1);
97 103 var speedNum=parseInt(data.data[js2][js1]);
98 104 data2[i]=speedNum.toFixed(2);
99 105 if(speedNum>1024){
... ... @@ -105,24 +111,14 @@
105 111 dw="Mb/s";
106 112 }
107 113 speedNum=speedNum.toFixed(2);
108   -
109   - i++;
110   - }
111   - if(typeof(data.data[js2][js1])=="undefined"){
112   - var speedNum=0;
113   - }else{
114   - var speedNum=parseInt(data.data[js2][js1]);
115   - if(speedNum>1024){
116   - dw="kb/s";
117   - speedNum=parseInt(data.data[js2][js1])/1024;
118   - }
119   - if(speedNum>1024){
120   - speedNum = speedNum/1024;
121   - dw="Mb/s";
  114 + if(data1[i] > i){
  115 + i = data1[i];
  116 + speedNumN = speedNum;
  117 + dwN = dw;
122 118 }
123   - speedNum=speedNum.toFixed(2);
124 119 }
125   - _html+='<li><div class="libox"><span>'+js2+'</span><img src="down.png" /><span class="speed">'+speedNum+dw+'</span></div><div class="tabBox"><div id="main'+j+'" style="width: 1000px;height:400px;margin:0 auto;"></div></div></li>';
  120 +
  121 + _html+='<li><div class="libox"><span>'+js2+'</span><img src="down.png" /><span class="speed">'+speedNumN+dwN+'</span></div><div class="tabBox"><div id="main'+j+'" style="width: 1000px;height:400px;margin:0 auto;"></div></div></li>';
126 122 $(".container ul").html(_html);
127 123 console.log(data2);
128 124 if(data1.length==0){
... ... @@ -130,22 +126,27 @@
130 126 }else{
131 127 category(j,data1,data2);
132 128 }
133   -
  129 +
  130 + j++;
134 131 }
135 132  
136 133 }
137 134 })
  135 + if(time == 1){
  136 + setTimeout("getData()",1000);
  137 + }
138 138 }
139 139 getData();
140 140 $(document).on("click","img",function(){
141 141 $(this).parent('.libox').eq(0).siblings('.tabBox').toggle();
142 142 })
143   - var timer;
  143 + var time = 0;
144 144 $("#start").click(function(){
145   - timer=self.setInterval("getData()",1000);
  145 + time = 1;
  146 + setTimeout("getData()",1000);
146 147 })
147 148 $("#stop").click(function(){
148   - timer=window.clearInterval(timer)
  149 + time = 0 ;
149 150 })
150 151  
151 152 </script>
... ...
resources/mybatis1/api/V1Mapper.xml
... ... @@ -161,6 +161,45 @@
161 161 AND term.END_DATE &gt; now();
162 162  
163 163 </select>
  164 + <!-- 通过admin ID获取科目数据 -->
  165 + <select id="getAdminInfo" parameterType="pd" resultType="pd">
  166 + SELECT
  167 + sv_school.`NAME` AS SNAME,
  168 + sv_school_admin.SCHOOL_ID,
  169 + sv_schoolgradesubject.GRADE_ID,
  170 + sv_grade.`NAME` as GNAME,
  171 + sv_schoolgradesubject.SUBJECT_ID,
  172 + sv_subject.CNAME as SCNAME
  173 + FROM
  174 + sv_school_admin
  175 + LEFT JOIN sv_school ON sv_school_admin.SCHOOL_ID = sv_school.ID
  176 + LEFT JOIN sv_schoolgradesubject ON sv_school_admin.SCHOOL_ID = sv_schoolgradesubject.SCHOOL_ID
  177 + LEFT JOIN sv_grade on sv_grade.ID = sv_schoolgradesubject.GRADE_ID
  178 + LEFT JOIN sv_subject on sv_subject.ID = sv_schoolgradesubject.SUBJECT_ID
  179 + WHERE
  180 + sv_school_admin.SCHOOLADMIN_ID = #{ID}
  181 +
  182 + ORDER BY GRADE_ID , SUBJECT_ID
  183 +
  184 + </select>
  185 +
  186 + <!-- 通过admin ID获取科目数据 -->
  187 + <select id="getClassBySchoolAndGradle" parameterType="pd" resultType="pd">
  188 + SELECT
  189 + SCHOOL_ID,
  190 + GRADE_ID,
  191 + CLASS_TYPE,
  192 + CLASS_NAME,
  193 + CLASS_CODE,
  194 + BASESTATION_ID,
  195 + ID
  196 + FROM
  197 + sv_sclass
  198 + WHERE
  199 + sv_sclass.SCHOOL_ID = #{SCHOOL_ID}
  200 + AND sv_sclass.GRADE_ID = #{GRADE_ID};
  201 +
  202 + </select>
164 203  
165 204 <!-- 通过教师ID获取科目数据 -->
166 205 <select id="getQuestionWrongInfo" parameterType="pd" resultType="pd">
... ...
resources/mybatis1/sunvote/CourseManagementMapper.xml
... ... @@ -124,8 +124,34 @@
124 124 <include refid="Field"></include>
125 125 from
126 126 <include refid="tableName"></include>
  127 + where 1 =1
  128 +
127 129 </select>
128 130  
  131 + <!-- 列表(全部) -->
  132 + <select id="listCourse" parameterType="pd" resultType="pd">
  133 + SELECT
  134 + sv_teacher.`NAME`,
  135 + sv_teacher.`ID`,
  136 + sv_sclass.CLASS_NAME,
  137 + sv_sclass.ID,
  138 + sv_subject.CNAME,
  139 + sv_subject.ID,
  140 + SV_COURSEMANAGEMENT.HEAD_MASTER
  141 + FROM
  142 + SV_COURSEMANAGEMENT
  143 + 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
  147 + LEFT JOIN sv_subject on sv_coursemanagement.SUBJECT_ID = sv_subject.ID
  148 + WHERE
  149 + sv_schoolgradesubject.SCHOOL_ID = #{SCHOOL_ID}
  150 +
  151 + </select>
  152 +
  153 +
  154 +
129 155 <!-- 批量删除 -->
130 156 <delete id="deleteAll" parameterType="String">
131 157 delete from
... ...
resources/mybatis1/sunvote/SchoolAdminMapper.xml 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3 +<mapper namespace="SchoolAdminMapper">
  4 +
  5 + <!--表名 -->
  6 + <sql id="tableName">
  7 + SV_SCHOOL_ADMIN
  8 + </sql>
  9 +
  10 + <!-- 字段 -->
  11 + <sql id="Field">
  12 + SCHOOL_ID,
  13 + ACCOUT,
  14 + PASSWORD,
  15 + ROLE,
  16 + REMARK,
  17 + SCHOOLADMIN_ID
  18 + </sql>
  19 +
  20 + <!-- 字段值 -->
  21 + <sql id="FieldValue">
  22 + #{SCHOOL_ID},
  23 + #{ACCOUT},
  24 + #{PASSWORD},
  25 + #{ROLE},
  26 + #{REMARK},
  27 + #{SCHOOLADMIN_ID}
  28 + </sql>
  29 +
  30 + <!-- 新增-->
  31 + <insert id="save" parameterType="pd">
  32 + insert into
  33 + <include refid="tableName"></include>
  34 + (
  35 + <include refid="Field"></include>
  36 + ) values (
  37 + <include refid="FieldValue"></include>
  38 + )
  39 + </insert>
  40 +
  41 + <!-- 删除-->
  42 + <delete id="delete" parameterType="pd">
  43 + delete from
  44 + <include refid="tableName"></include>
  45 + where
  46 + SCHOOLADMIN_ID = #{SCHOOLADMIN_ID}
  47 + </delete>
  48 +
  49 + <!-- 修改 -->
  50 + <update id="edit" parameterType="pd">
  51 + update
  52 + <include refid="tableName"></include>
  53 + set
  54 + SCHOOL_ID = #{SCHOOL_ID},
  55 + ACCOUT = #{ACCOUT},
  56 + PASSWORD = #{PASSWORD},
  57 + ROLE = #{ROLE},
  58 + REMARK = #{REMARK},
  59 + SCHOOLADMIN_ID = SCHOOLADMIN_ID
  60 + where
  61 + SCHOOLADMIN_ID = #{SCHOOLADMIN_ID}
  62 + </update>
  63 +
  64 + <!-- 通过ID获取数据 -->
  65 + <select id="findById" parameterType="pd" resultType="pd">
  66 + select
  67 + <include refid="Field"></include>
  68 + from
  69 + <include refid="tableName"></include>
  70 + where
  71 + SCHOOLADMIN_ID = #{SCHOOLADMIN_ID}
  72 + </select>
  73 +
  74 + <!-- 通过用户名 和密码 获取数据 -->
  75 + <select id="findByusername" parameterType="pd" resultType="pd">
  76 + select
  77 + <include refid="Field"></include>
  78 + from
  79 + <include refid="tableName"></include>
  80 + where
  81 + ACCOUT = #{ACCOUT}
  82 + and PASSWORD = #{PASSWORD}
  83 + </select>
  84 +
  85 + <!-- 列表 -->
  86 + <select id="datalistPage" parameterType="page" resultType="pd">
  87 + select
  88 + <include refid="Field"></include>
  89 + from
  90 + <include refid="tableName"></include>
  91 + where 1=1
  92 + <if test="pd.keywords!= null and pd.keywords != ''"><!-- 关键词检索 -->
  93 + and
  94 + (
  95 + <!-- 根据需求自己加检索条件
  96 + 字段1 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%')
  97 + or
  98 + 字段2 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%')
  99 + -->
  100 + )
  101 + </if>
  102 + </select>
  103 +
  104 + <!-- 列表(全部) -->
  105 + <select id="listAll" parameterType="pd" resultType="pd">
  106 + select
  107 + <include refid="Field"></include>
  108 + from
  109 + <include refid="tableName"></include>
  110 + </select>
  111 +
  112 + <!-- 批量删除 -->
  113 + <delete id="deleteAll" parameterType="String">
  114 + delete from
  115 + <include refid="tableName"></include>
  116 + where
  117 + SCHOOLADMIN_ID in
  118 + <foreach item="item" index="index" collection="array" open="(" separator="," close=")">
  119 + #{item}
  120 + </foreach>
  121 + </delete>
  122 +
  123 + <!-- fh313596790qq(青苔) -->
  124 +</mapper>
0 125 \ No newline at end of file
... ...
resources/mybatis1/sunvote/SubjectMapper.xml
... ... @@ -94,6 +94,21 @@
94 94 <include refid="Field"></include>
95 95 from
96 96 <include refid="tableName"></include>
  97 +
  98 + </select>
  99 +
  100 + <!-- 列表(全部) -->
  101 + <select id="listAllSchool" parameterType="pd" resultType="pd">
  102 + select
  103 + <include refid="Field"></include>
  104 + from
  105 + <include refid="tableName"></include>
  106 +
  107 + INNER JOIN sv_schoolgradesubject ON sv_subject.ID = sv_schoolgradesubject.SUBJECT_ID
  108 + WHERE 1 =1
  109 + <if test="SCHOOL_ID != null and SCHOOL_ID != ''">
  110 + and sv_schoolgradesubject.SCHOOL_ID = #{SCHOOL_ID}
  111 + </if>
97 112 </select>
98 113  
99 114 <!-- 批量删除 -->
... ... @@ -107,5 +122,4 @@
107 122 </foreach>
108 123 </delete>
109 124  
110   - <!-- fh313596790qq(青苔) -->
111 125 </mapper>
112 126 \ No newline at end of file
... ...
resources/mybatis1/sunvote/TeacherMapper.xml
... ... @@ -152,6 +152,11 @@
152 152 <include refid="Field"></include>
153 153 from
154 154 <include refid="tableName"></include>
  155 + where 1 = 1
  156 + <if test="SCHOOL_ID != null and SCHOOL_ID != ''"><!-- 关键词检索 -->
  157 + and
  158 + (SCHOOL_ID = #{SCHOOL_ID})
  159 + </if>
155 160 </select>
156 161  
157 162 <!-- 批量删除 -->
... ...
src/com/fh/controller/api/CustomMultipartResolver.java
... ... @@ -27,6 +27,7 @@ public class CustomMultipartResolver extends CommonsMultipartResolver {
27 27 @SuppressWarnings("unchecked")
28 28 public MultipartParsingResult parseRequest(HttpServletRequest request)
29 29 throws MultipartException {
  30 + FileUploadProgressListener.count++;
30 31 String encoding = determineEncoding(request);
31 32 FileUpload fileUpload = prepareFileUpload(encoding);
32 33 FileUploadProgressListener progressListener = new FileUploadProgressListener();
... ... @@ -47,8 +48,9 @@ public class CustomMultipartResolver extends CommonsMultipartResolver {
47 48 }
48 49 catch (FileUploadException ex) {
49 50 throw new MultipartException("Could not parse multipart servlet request", ex);
  51 + }finally{
  52 + FileUploadProgressListener.count--;
50 53 }
51   -
52 54 }
53 55  
54 56  
... ...
src/com/fh/controller/api/FileUploadProgressListener.java
... ... @@ -6,18 +6,20 @@ import org.apache.commons.fileupload.ProgressListener;
6 6  
7 7 public class FileUploadProgressListener implements ProgressListener {
8 8  
9   - public static HashMap<String,HashMap<String,String>> map = new HashMap();
10   - static{
11   - HashMap<String,String> temp = new HashMap<String,String>();
12   - temp.put("0", "1545");
13   - map.put("192.168.0.2",temp );
14   - map.put("192.168.0.3", temp);
15   - map.put("192.168.0.4", temp);
16   - map.put("192.168.0.5", temp);
17   - map.put("192.168.0.6", temp);
18   - }
  9 + public static HashMap<String,HashMap<String,String>> map = new HashMap(200);
  10 +
  11 + public static int count = 0;
  12 +// static{
  13 +// HashMap<String,String> temp = new HashMap<String,String>();
  14 +// temp.put("0", "1545");
  15 +// map.put("192.168.0.2",temp );
  16 +// map.put("192.168.0.3", temp);
  17 +// map.put("192.168.0.4", temp);
  18 +// map.put("192.168.0.5", temp);
  19 +// map.put("192.168.0.6", temp);
  20 +// }
19 21  
20   - public static HashMap<String,Boolean> result = new HashMap();
  22 + public static HashMap<String,Boolean> result = new HashMap(200);
21 23 private String ip ;
22 24 private long last = 0 ;
23 25 private HashMap<String,String> ipMap;
... ...
src/com/fh/controller/sunvote/coursemanagement/CourseManagementController.java
... ... @@ -142,6 +142,23 @@ public class CourseManagementController extends BaseController {
142 142 return mv;
143 143 }
144 144  
  145 + /**列表
  146 + * @param page
  147 + * @throws Exception
  148 + */
  149 + @RequestMapping(value="/listcs")
  150 + public ModelAndView listcs() throws Exception{
  151 + ModelAndView mv = this.getModelAndView();
  152 + PageData pd = new PageData();
  153 + pd = this.getPageData();
  154 + List<PageData> varList = coursemanagementService.listCourse(pd); //列出CourseManagement列表
  155 + mv.setViewName("sunvote/coursemanagement/coursemanagement_list2");
  156 + mv.addObject("varList", varList);
  157 + mv.addObject("pd", pd);
  158 + mv.addObject("QX",Jurisdiction.getHC()); //按钮权限
  159 + return mv;
  160 + }
  161 +
145 162 /**去新增页面
146 163 * @param
147 164 * @throws Exception
... ...
src/com/fh/controller/sunvote/schooladmin/SchoolAdminController.java 0 → 100644
  1 +package com.fh.controller.sunvote.schooladmin;
  2 +
  3 +import java.io.PrintWriter;
  4 +import java.text.DateFormat;
  5 +import java.text.SimpleDateFormat;
  6 +import java.util.ArrayList;
  7 +import java.util.Date;
  8 +import java.util.HashMap;
  9 +import java.util.List;
  10 +import java.util.Map;
  11 +
  12 +import javax.annotation.Resource;
  13 +
  14 +import org.apache.shiro.crypto.hash.SimpleHash;
  15 +import org.springframework.beans.propertyeditors.CustomDateEditor;
  16 +import org.springframework.stereotype.Controller;
  17 +import org.springframework.web.bind.WebDataBinder;
  18 +import org.springframework.web.bind.annotation.InitBinder;
  19 +import org.springframework.web.bind.annotation.RequestMapping;
  20 +import org.springframework.web.bind.annotation.ResponseBody;
  21 +import org.springframework.web.servlet.ModelAndView;
  22 +
  23 +import com.fh.controller.base.BaseController;
  24 +import com.fh.entity.Page;
  25 +import com.fh.util.AppUtil;
  26 +import com.fh.util.ObjectExcelView;
  27 +import com.fh.util.PageData;
  28 +import com.fh.util.Jurisdiction;
  29 +import com.fh.util.Tools;
  30 +import com.fh.service.sunvote.school.SchoolManager;
  31 +import com.fh.service.sunvote.schooladmin.SchoolAdminManager;
  32 +import com.fh.service.system.user.UserManager;
  33 +
  34 +/**
  35 + * 说明:学校管理员
  36 + * 创建人:FH Q313596790
  37 + * 创建时间:2018-09-17
  38 + */
  39 +@Controller
  40 +@RequestMapping(value="/schooladmin")
  41 +public class SchoolAdminController extends BaseController {
  42 +
  43 + String menuUrl = "schooladmin/list.do"; //菜单地址(权限用)
  44 + @Resource(name="schooladminService")
  45 + private SchoolAdminManager schooladminService;
  46 +
  47 + @Resource(name = "schoolService")
  48 + private SchoolManager schoolService;
  49 +
  50 + @Resource(name = "userService")
  51 + private UserManager userService;
  52 +
  53 + /**保存
  54 + * @param
  55 + * @throws Exception
  56 + */
  57 + @RequestMapping(value="/save")
  58 + public ModelAndView save() throws Exception{
  59 + logBefore(logger, Jurisdiction.getUsername()+"新增SchoolAdmin");
  60 + if(!Jurisdiction.buttonJurisdiction(menuUrl, "add")){return null;} //校验权限
  61 + ModelAndView mv = this.getModelAndView();
  62 + PageData pd = new PageData();
  63 + pd = this.getPageData();
  64 + pd.put("USER_ID", pd.getString("ID")); // ID 主键
  65 + pd.put("LAST_LOGIN", ""); // 最后登录时间
  66 + pd.put("IP", ""); // IP
  67 + pd.put("STATUS", "0"); // 状态
  68 + pd.put("SKIN", "default");
  69 + pd.put("RIGHTS", "");
  70 + pd.put("USERNAME", pd.getString("ACCOUT"));
  71 + pd.put("ROLE_ID", "51824b61dd6941f19c673996374781e5");
  72 + pd.put("PASSWORD",
  73 + new SimpleHash("SHA-1", pd.getString("ACCOUT"), pd
  74 + .getString("PASSWORD")).toString()); // 密码加密
  75 +
  76 + if (null == userService.findByUsername(pd)) { // 判断用户名是否存在
  77 + userService.saveU(pd); // 执行保存
  78 + pd.put("SCHOOLADMIN_ID", this.get32UUID()); //主键
  79 + schooladminService.save(pd);
  80 + }
  81 +
  82 + mv.addObject("msg","success");
  83 + mv.setViewName("save_result");
  84 + return mv;
  85 + }
  86 +
  87 + /**删除
  88 + * @param out
  89 + * @throws Exception
  90 + */
  91 + @RequestMapping(value="/delete")
  92 + public void delete(PrintWriter out) throws Exception{
  93 + logBefore(logger, Jurisdiction.getUsername()+"删除SchoolAdmin");
  94 + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限
  95 + PageData pd = new PageData();
  96 + pd = this.getPageData();
  97 + schooladminService.delete(pd);
  98 + out.write("success");
  99 + out.close();
  100 + }
  101 +
  102 + /**修改
  103 + * @param
  104 + * @throws Exception
  105 + */
  106 + @RequestMapping(value="/edit")
  107 + public ModelAndView edit() throws Exception{
  108 + logBefore(logger, Jurisdiction.getUsername()+"修改SchoolAdmin");
  109 + if(!Jurisdiction.buttonJurisdiction(menuUrl, "edit")){return null;} //校验权限
  110 + ModelAndView mv = this.getModelAndView();
  111 + PageData pd = new PageData();
  112 + pd = this.getPageData();
  113 + schooladminService.edit(pd);
  114 + mv.addObject("msg","success");
  115 + mv.setViewName("save_result");
  116 + return mv;
  117 + }
  118 +
  119 + /**列表
  120 + * @param page
  121 + * @throws Exception
  122 + */
  123 + @RequestMapping(value="/list")
  124 + public ModelAndView list(Page page) throws Exception{
  125 + logBefore(logger, Jurisdiction.getUsername()+"列表SchoolAdmin");
  126 + //if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} //校验权限(无权查看时页面会有提示,如果不注释掉这句代码就无法进入列表页面,所以根据情况是否加入本句代码)
  127 + ModelAndView mv = this.getModelAndView();
  128 + PageData pd = new PageData();
  129 + pd = this.getPageData();
  130 + String keywords = pd.getString("keywords"); //关键词检索条件
  131 + if(null != keywords && !"".equals(keywords)){
  132 + pd.put("keywords", keywords.trim());
  133 + }
  134 + page.setPd(pd);
  135 + List<PageData> varList = schooladminService.list(page); //列出SchoolAdmin列表
  136 + mv.setViewName("sunvote/schooladmin/schooladmin_list");
  137 + mv.addObject("varList", varList);
  138 + List<PageData> schools = schoolService.listAll(pd);
  139 + mv.addObject("schools", schools);
  140 + mv.addObject("pd", pd);
  141 + mv.addObject("QX",Jurisdiction.getHC()); //按钮权限
  142 + return mv;
  143 + }
  144 +
  145 + /**去新增页面
  146 + * @param
  147 + * @throws Exception
  148 + */
  149 + @RequestMapping(value="/goAdd")
  150 + public ModelAndView goAdd()throws Exception{
  151 + ModelAndView mv = this.getModelAndView();
  152 + PageData pd = new PageData();
  153 + pd = this.getPageData();
  154 + mv.setViewName("sunvote/schooladmin/schooladmin_edit");
  155 + List<PageData> schools = schoolService.listAll(pd);
  156 + mv.addObject("schools", schools);
  157 + mv.addObject("msg", "save");
  158 + mv.addObject("pd", pd);
  159 + return mv;
  160 + }
  161 +
  162 + /**去修改页面
  163 + * @param
  164 + * @throws Exception
  165 + */
  166 + @RequestMapping(value="/goEdit")
  167 + public ModelAndView goEdit()throws Exception{
  168 + ModelAndView mv = this.getModelAndView();
  169 + PageData pd = new PageData();
  170 + pd = this.getPageData();
  171 + pd = schooladminService.findById(pd); //根据ID读取
  172 + mv.setViewName("sunvote/schooladmin/schooladmin_edit");
  173 + mv.addObject("msg", "edit");
  174 + List<PageData> schools = schoolService.listAll(pd);
  175 + mv.addObject("schools", schools);
  176 + mv.addObject("pd", pd);
  177 + return mv;
  178 + }
  179 +
  180 + /**批量删除
  181 + * @param
  182 + * @throws Exception
  183 + */
  184 + @RequestMapping(value="/deleteAll")
  185 + @ResponseBody
  186 + public Object deleteAll() throws Exception{
  187 + logBefore(logger, Jurisdiction.getUsername()+"批量删除SchoolAdmin");
  188 + if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限
  189 + PageData pd = new PageData();
  190 + Map<String,Object> map = new HashMap<String,Object>();
  191 + pd = this.getPageData();
  192 + List<PageData> pdList = new ArrayList<PageData>();
  193 + String DATA_IDS = pd.getString("DATA_IDS");
  194 + if(null != DATA_IDS && !"".equals(DATA_IDS)){
  195 + String ArrayDATA_IDS[] = DATA_IDS.split(",");
  196 + schooladminService.deleteAll(ArrayDATA_IDS);
  197 + pd.put("msg", "ok");
  198 + }else{
  199 + pd.put("msg", "no");
  200 + }
  201 + pdList.add(pd);
  202 + map.put("list", pdList);
  203 + return AppUtil.returnObject(pd, map);
  204 + }
  205 +
  206 + /**导出到excel
  207 + * @param
  208 + * @throws Exception
  209 + */
  210 + @RequestMapping(value="/excel")
  211 + public ModelAndView exportExcel() throws Exception{
  212 + logBefore(logger, Jurisdiction.getUsername()+"导出SchoolAdmin到excel");
  213 + if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;}
  214 + ModelAndView mv = new ModelAndView();
  215 + PageData pd = new PageData();
  216 + pd = this.getPageData();
  217 + Map<String,Object> dataMap = new HashMap<String,Object>();
  218 + List<String> titles = new ArrayList<String>();
  219 + titles.add("学校ID"); //1
  220 + titles.add("管理员账号"); //2
  221 + titles.add("管理员密码"); //3
  222 + titles.add("管理员角色"); //4
  223 + titles.add("管理员备注"); //5
  224 + dataMap.put("titles", titles);
  225 + List<PageData> varOList = schooladminService.listAll(pd);
  226 + List<PageData> varList = new ArrayList<PageData>();
  227 + for(int i=0;i<varOList.size();i++){
  228 + PageData vpd = new PageData();
  229 + vpd.put("var1", varOList.get(i).getString("SCHOOL_ID")); //1
  230 + vpd.put("var2", varOList.get(i).getString("ACCOUT")); //2
  231 + vpd.put("var3", varOList.get(i).getString("PASSWORD")); //3
  232 + vpd.put("var4", varOList.get(i).getString("ROLE")); //4
  233 + vpd.put("var5", varOList.get(i).getString("REMARK")); //5
  234 + varList.add(vpd);
  235 + }
  236 + dataMap.put("varList", varList);
  237 + ObjectExcelView erv = new ObjectExcelView();
  238 + mv = new ModelAndView(erv,dataMap);
  239 + return mv;
  240 + }
  241 +
  242 + @InitBinder
  243 + public void initBinder(WebDataBinder binder){
  244 + DateFormat format = new SimpleDateFormat("yyyy-MM-dd");
  245 + binder.registerCustomEditor(Date.class, new CustomDateEditor(format,true));
  246 + }
  247 +}
... ...
src/com/fh/controller/sunvote/sclass/SClassController.java
... ... @@ -117,7 +117,6 @@ public class SClassController extends BaseController {
117 117 @RequestMapping(value="/list")
118 118 public ModelAndView list(Page page) throws Exception{
119 119 logBefore(logger, Jurisdiction.getUsername()+"列表SClass");
120   - //if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} //校验权限(无权查看时页面会有提示,如果不注释掉这句代码就无法进入列表页面,所以根据情况是否加入本句代码)
121 120 ModelAndView mv = this.getModelAndView();
122 121 PageData pd = new PageData();
123 122 pd = this.getPageData();
... ... @@ -142,6 +141,23 @@ public class SClassController extends BaseController {
142 141 return mv;
143 142 }
144 143  
  144 + /**列表
  145 + * @param page
  146 + * @throws Exception
  147 + */
  148 + @RequestMapping(value="/listcs")
  149 + public ModelAndView listcs(Page page) throws Exception{
  150 + logBefore(logger, Jurisdiction.getUsername()+"列表SClass");
  151 + ModelAndView mv = this.getModelAndView();
  152 + PageData pd = this.getPageData();
  153 + mv.setViewName("sunvote/sclass/sclass_list2");
  154 + List<PageData> varList = sclassService.listAll(pd); //列出SClass列表
  155 + mv.addObject("varList", varList);
  156 + mv.addObject("pd", pd);
  157 + mv.addObject("QX",Jurisdiction.getHC()); //按钮权限
  158 + return mv;
  159 + }
  160 +
145 161 /**去新增页面
146 162 * @param
147 163 * @throws Exception
... ...
src/com/fh/controller/sunvote/subject/SubjectController.java
... ... @@ -111,6 +111,25 @@ public class SubjectController extends BaseController {
111 111 return mv;
112 112 }
113 113  
  114 + /**列表
  115 + * @param page
  116 + * @throws Exception
  117 + */
  118 + @RequestMapping(value="/listcs")
  119 + public ModelAndView listcs() throws Exception{
  120 + logBefore(logger, Jurisdiction.getUsername()+"列表Subject");
  121 + //if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} //校验权限(无权查看时页面会有提示,如果不注释掉这句代码就无法进入列表页面,所以根据情况是否加入本句代码)
  122 + ModelAndView mv = this.getModelAndView();
  123 + PageData pd = new PageData();
  124 + pd = this.getPageData();
  125 + List<PageData> varList = subjectService.listAllSchool(pd); //列出Subject列表
  126 + mv.setViewName("sunvote/subject/subject_list2");
  127 + mv.addObject("varList", varList);
  128 + mv.addObject("pd", pd);
  129 + mv.addObject("QX",Jurisdiction.getHC()); //按钮权限
  130 + return mv;
  131 + }
  132 +
114 133 /**去新增页面
115 134 * @param
116 135 * @throws Exception
... ...
src/com/fh/controller/sunvote/teacher/TeacherController.java
... ... @@ -303,6 +303,26 @@ public class TeacherController extends BaseController {
303 303 * @param page
304 304 * @throws Exception
305 305 */
  306 + @RequestMapping(value = "/listcs")
  307 + public ModelAndView listcs() throws Exception {
  308 + logBefore(logger, Jurisdiction.getUsername() + "列表Teacher");
  309 + ModelAndView mv = this.getModelAndView();
  310 + PageData pd = new PageData();
  311 + pd = this.getPageData();
  312 + List<PageData> varList = teacherService.listAll(pd); // 列出Teacher列表
  313 + mv.setViewName("sunvote/teacher/teacher_list2");
  314 + mv.addObject("varList", varList);
  315 +
  316 + mv.addObject("pd", pd);
  317 + return mv;
  318 + }
  319 +
  320 + /**
  321 + * 列表
  322 + *
  323 + * @param page
  324 + * @throws Exception
  325 + */
306 326 @RequestMapping(value = "/index")
307 327 public ModelAndView index() throws Exception {
308 328 logBefore(logger, Jurisdiction.getUsername() + "列表Teacher");
... ...
src/com/fh/controller/system/login/LoginController.java
... ... @@ -29,6 +29,8 @@ import com.fh.service.api.V1Manager;
29 29 import com.fh.service.fhoa.datajur.DatajurManager;
30 30 import com.fh.service.sunvote.event.EventManager;
31 31 import com.fh.service.sunvote.school.SchoolManager;
  32 +import com.fh.service.sunvote.schooladmin.SchoolAdminManager;
  33 +import com.fh.service.sunvote.sclass.SClassManager;
32 34 import com.fh.service.sunvote.teacher.TeacherManager;
33 35 import com.fh.service.system.appuser.AppuserManager;
34 36 import com.fh.service.system.buttonrights.ButtonrightsManager;
... ... @@ -48,7 +50,6 @@ import com.fh.util.Tools;
48 50  
49 51 /**
50 52 * 总入口
51   - * @author fh QQ 3 1 3 5 9 6 7 9 0[青苔]
52 53 * 修改日期:2015/11/2
53 54 */
54 55 /**
... ... @@ -82,9 +83,16 @@ public class LoginController extends BaseController {
82 83  
83 84 @Resource(name = "v1Service")
84 85 private V1Manager v1Service;
  86 +
  87 + @Resource(name="schooladminService")
  88 + private SchoolAdminManager schooladminService;
85 89  
86 90 @Resource(name = "eventService")
87 91 private EventManager eventService;
  92 +
  93 + @Resource(name="sclassService")
  94 + private SClassManager sclassService;
  95 +
88 96  
89 97 /**
90 98 * 访问登录页
... ... @@ -161,6 +169,18 @@ public class LoginController extends BaseController {
161 169 user.setTeacherID(pageData.getString("ID"));
162 170 }
163 171 }
  172 + if("51824b61dd6941f19c673996374781e5".equals(pd
  173 + .getString("ROLE_ID"))){
  174 + map.put("admin", pd.getString("RIGHTS"));
  175 + PageData tpd = new PageData();
  176 + tpd.put("ACCOUT", pd.get("USERNAME"));
  177 + tpd.put("PASSWORD", passwd);
  178 + PageData pageData = schooladminService.findByusername(tpd);
  179 + if(pageData != null){
  180 + user.setTeacherID(pageData.getString("SCHOOLADMIN_ID"));
  181 + user.setUSER_ID(pageData.getString("SCHOOLADMIN_ID"));
  182 + }
  183 + }
164 184 user.setLAST_LOGIN(pd.getString("LAST_LOGIN"));
165 185 user.setIP(pd.getString("IP"));
166 186 user.setSTATUS(pd.getString("STATUS"));
... ... @@ -209,12 +229,12 @@ public class LoginController extends BaseController {
209 229 User user = (User) session.getAttribute(Const.SESSION_USER); // 读取session中的用户信息(单独用户信息)
210 230 if (user != null) {
211 231 User userr = (User) session.getAttribute(Const.SESSION_USERROL); // 读取session中的用户信息(含角色信息)
212   - if (null == userr) {
213   - user = userService.getUserAndRoleById(user.getUSER_ID()); // 通过用户ID读取用户信息和角色信息
214   - session.setAttribute(Const.SESSION_USERROL, user); // 存入session
215   - } else {
216   - user = userr;
217   - }
  232 +// if (null == userr) {
  233 +// userr = userService.getUserAndRoleById(user.getUSER_ID()); // 通过用户ID读取用户信息和角色信息
  234 +// session.setAttribute(Const.SESSION_USERROL, user); // 存入session
  235 +// } else {
  236 +// user = userr;
  237 +// }
218 238 String USERNAME = user.getUSERNAME();
219 239 if ("teacher".equals(changeMenu)) {
220 240 PageData tpd = new PageData();
... ... @@ -248,6 +268,41 @@ public class LoginController extends BaseController {
248 268 pd.put("SYSNAME", Tools.readTxtFile(Const.SYSNAME)); // 读取系统名称
249 269 mv.addObject("pd", pd);
250 270 return mv;
  271 + }else if("admin".equals(changeMenu)){
  272 + PageData tpd = new PageData();
  273 + tpd.put("ID", user.getUSER_ID());
  274 +
  275 + List<PageData> adminInfos = v1Service.getAdminInfo(tpd);
  276 + List<PageData> gradeInfos = new ArrayList<PageData>();
  277 + List<PageData> subjectInfos = new ArrayList<PageData>();
  278 + // 查询学校信息
  279 + for(PageData pad : adminInfos){
  280 + PageData tmpd = new PageData();
  281 + Object gradeId = pad.get("GRADE_ID");
  282 + tmpd.put("SNAME", pad.get("SNAME"));// 学校名称
  283 + tmpd.put("SCHOOL_ID", pad.get("SCHOOL_ID"));//学校ID
  284 + tmpd.put("GRADE_ID", pad.get("GRADE_ID"));//年级id
  285 + tmpd.put("GNAME", pad.get("GNAME"));//年级名称
  286 + tmpd.put("SUBJECT_ID", pad.get("SUBJECT_ID"));// 科目id
  287 + tmpd.put("SCNAME", pad.get("SCNAME"));// 科目名称
  288 + if(gradeId != null && !"".equals(gradeId)){
  289 + List<PageData> classInfos = sclassService.listAll(tmpd);
  290 + tmpd.put("classInfos", classInfos);
  291 + gradeInfos.add(tmpd);
  292 + }else{
  293 + subjectInfos.add(tmpd);
  294 + }
  295 + mv.addObject("SNAME", pad.get("SNAME"));
  296 + mv.addObject("SCHOOL_ID", pad.get("SCHOOL_ID"));
  297 + }
  298 + mv.addObject("gradeInfos", gradeInfos);
  299 + mv.addObject("subjectInfos", subjectInfos);
  300 + session.setAttribute(Const.SESSION_USERNAME, USERNAME); // 放入用户名到session
  301 + mv.setViewName("sunvote/admin/admin_main");
  302 + mv.addObject("user", user);
  303 + pd.put("SYSNAME", Tools.readTxtFile(Const.SYSNAME)); // 读取系统名称
  304 + mv.addObject("pd", pd);
  305 + return mv;
251 306 }
252 307  
253 308 Role role = user.getRole(); // 获取用户角色
... ...
src/com/fh/service/api/V1Manager.java
... ... @@ -21,4 +21,8 @@ public interface V1Manager {
21 21 public List<PageData> getQuestionWrongInfo(PageData pd) throws Exception ;
22 22  
23 23 public List<PageData> getLastWrongQuestionInfo(PageData pd) throws Exception;
  24 +
  25 + public List<PageData> getAdminInfo(PageData pd) throws Exception;
  26 +
  27 + public List<PageData> getClassBySchoolAndGradle(PageData pd) throws Exception;
24 28 }
... ...
src/com/fh/service/api/impl/V1Service.java
... ... @@ -47,6 +47,11 @@ public class V1Service implements V1Manager {
47 47 }
48 48  
49 49 @Override
  50 + public List<PageData> getAdminInfo(PageData pd) throws Exception {
  51 + return (List<PageData>)dao.findForList("V1Mapper.getAdminInfo", pd);
  52 + }
  53 +
  54 + @Override
50 55 public List<PageData> getQuestionWrongInfo(PageData pd) throws Exception {
51 56 return (List<PageData>)dao.findForList("V1Mapper.getQuestionWrongInfo", pd);
52 57 }
... ... @@ -56,4 +61,10 @@ public class V1Service implements V1Manager {
56 61 return (List<PageData>)dao.findForList("V1Mapper.getLastWrongQuestionInfo", pd);
57 62 }
58 63  
  64 + @Override
  65 + public List<PageData> getClassBySchoolAndGradle(PageData pd)
  66 + throws Exception {
  67 + return (List<PageData>)dao.findForList("V1Mapper.getClassBySchoolAndGradle", pd);
  68 + }
  69 +
59 70 }
... ...
src/com/fh/service/sunvote/coursemanagement/CourseManagementManager.java
1 1 package com.fh.service.sunvote.coursemanagement;
2 2  
3 3 import java.util.List;
  4 +
4 5 import com.fh.entity.Page;
5 6 import com.fh.util.PageData;
6 7  
... ... @@ -54,5 +55,8 @@ public interface CourseManagementManager{
54 55 */
55 56 public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
56 57  
  58 +
  59 + public List<PageData> listCourse(PageData pd)throws Exception;
  60 +
57 61 }
58 62  
... ...
src/com/fh/service/sunvote/coursemanagement/impl/CourseManagementService.java
... ... @@ -61,6 +61,10 @@ public class CourseManagementService implements CourseManagementManager{
61 61 public List<PageData> listAll(PageData pd)throws Exception{
62 62 return (List<PageData>)dao.findForList("CourseManagementMapper.listAll", pd);
63 63 }
  64 + @SuppressWarnings("unchecked")
  65 + public List<PageData> listCourse(PageData pd)throws Exception{
  66 + return (List<PageData>)dao.findForList("CourseManagementMapper.listCourse", pd);
  67 + }
64 68  
65 69 /**通过id获取数据
66 70 * @param pd
... ...
src/com/fh/service/sunvote/schooladmin/SchoolAdminManager.java 0 → 100644
  1 +package com.fh.service.sunvote.schooladmin;
  2 +
  3 +import java.util.List;
  4 +
  5 +import com.fh.entity.Page;
  6 +import com.fh.util.PageData;
  7 +
  8 +/**
  9 + * 说明: 学校管理员接口
  10 + * 创建人:FH Q313596790
  11 + * 创建时间:2018-09-17
  12 + * @version
  13 + */
  14 +public interface SchoolAdminManager{
  15 +
  16 + /**新增
  17 + * @param pd
  18 + * @throws Exception
  19 + */
  20 + public void save(PageData pd)throws Exception;
  21 +
  22 + /**删除
  23 + * @param pd
  24 + * @throws Exception
  25 + */
  26 + public void delete(PageData pd)throws Exception;
  27 +
  28 + /**修改
  29 + * @param pd
  30 + * @throws Exception
  31 + */
  32 + public void edit(PageData pd)throws Exception;
  33 +
  34 + /**列表
  35 + * @param page
  36 + * @throws Exception
  37 + */
  38 + public List<PageData> list(Page page)throws Exception;
  39 +
  40 + /**列表(全部)
  41 + * @param pd
  42 + * @throws Exception
  43 + */
  44 + public List<PageData> listAll(PageData pd)throws Exception;
  45 +
  46 + /**通过id获取数据
  47 + * @param pd
  48 + * @throws Exception
  49 + */
  50 + public PageData findById(PageData pd)throws Exception;
  51 +
  52 + /**批量删除
  53 + * @param ArrayDATA_IDS
  54 + * @throws Exception
  55 + */
  56 + public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
  57 +
  58 + /**
  59 + *
  60 + * @param pd
  61 + * @return
  62 + * @throws Exception
  63 + */
  64 + public PageData findByusername(PageData pd)throws Exception;
  65 +
  66 +}
  67 +
... ...
src/com/fh/service/sunvote/schooladmin/impl/SchoolAdminService.java 0 → 100644
  1 +package com.fh.service.sunvote.schooladmin.impl;
  2 +
  3 +import java.util.List;
  4 +import javax.annotation.Resource;
  5 +import org.springframework.stereotype.Service;
  6 +import com.fh.dao.DaoSupport;
  7 +import com.fh.entity.Page;
  8 +import com.fh.util.PageData;
  9 +import com.fh.service.sunvote.schooladmin.SchoolAdminManager;
  10 +
  11 +/**
  12 + * 说明: 学校管理员
  13 + * 创建人:FH Q313596790
  14 + * 创建时间:2018-09-17
  15 + * @version
  16 + */
  17 +@Service("schooladminService")
  18 +public class SchoolAdminService implements SchoolAdminManager{
  19 +
  20 + @Resource(name = "daoSupport")
  21 + private DaoSupport dao;
  22 +
  23 + /**新增
  24 + * @param pd
  25 + * @throws Exception
  26 + */
  27 + public void save(PageData pd)throws Exception{
  28 + dao.save("SchoolAdminMapper.save", pd);
  29 + }
  30 +
  31 + /**删除
  32 + * @param pd
  33 + * @throws Exception
  34 + */
  35 + public void delete(PageData pd)throws Exception{
  36 + dao.delete("SchoolAdminMapper.delete", pd);
  37 + }
  38 +
  39 + /**修改
  40 + * @param pd
  41 + * @throws Exception
  42 + */
  43 + public void edit(PageData pd)throws Exception{
  44 + dao.update("SchoolAdminMapper.edit", pd);
  45 + }
  46 +
  47 + /**列表
  48 + * @param page
  49 + * @throws Exception
  50 + */
  51 + @SuppressWarnings("unchecked")
  52 + public List<PageData> list(Page page)throws Exception{
  53 + return (List<PageData>)dao.findForList("SchoolAdminMapper.datalistPage", page);
  54 + }
  55 +
  56 + /**列表(全部)
  57 + * @param pd
  58 + * @throws Exception
  59 + */
  60 + @SuppressWarnings("unchecked")
  61 + public List<PageData> listAll(PageData pd)throws Exception{
  62 + return (List<PageData>)dao.findForList("SchoolAdminMapper.listAll", pd);
  63 + }
  64 +
  65 + /**通过id获取数据
  66 + * @param pd
  67 + * @throws Exception
  68 + */
  69 + public PageData findById(PageData pd)throws Exception{
  70 + return (PageData)dao.findForObject("SchoolAdminMapper.findById", pd);
  71 + }
  72 +
  73 + /**通过id获取数据
  74 + * @param pd
  75 + * @throws Exception
  76 + */
  77 + public PageData findByusername(PageData pd)throws Exception{
  78 + return (PageData)dao.findForObject("SchoolAdminMapper.findByusername", pd);
  79 + }
  80 +
  81 + /**批量删除
  82 + * @param ArrayDATA_IDS
  83 + * @throws Exception
  84 + */
  85 + public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
  86 + dao.delete("SchoolAdminMapper.deleteAll", ArrayDATA_IDS);
  87 + }
  88 +
  89 +}
  90 +
... ...
src/com/fh/service/sunvote/subject/SubjectManager.java
1 1 package com.fh.service.sunvote.subject;
2 2  
3 3 import java.util.List;
  4 +
4 5 import com.fh.entity.Page;
5 6 import com.fh.util.PageData;
6 7  
... ... @@ -42,6 +43,9 @@ public interface SubjectManager{
42 43 */
43 44 public List<PageData> listAll(PageData pd)throws Exception;
44 45  
  46 +
  47 + public List<PageData> listAllSchool(PageData pd)throws Exception;
  48 +
45 49 /**通过id获取数据
46 50 * @param pd
47 51 * @throws Exception
... ...
src/com/fh/service/sunvote/subject/impl/SubjectService.java
... ... @@ -62,6 +62,15 @@ public class SubjectService implements SubjectManager{
62 62 return (List<PageData>)dao.findForList("SubjectMapper.listAll", pd);
63 63 }
64 64  
  65 + /**列表(全部)
  66 + * @param pd
  67 + * @throws Exception
  68 + */
  69 + @SuppressWarnings("unchecked")
  70 + public List<PageData> listAllSchool(PageData pd)throws Exception{
  71 + return (List<PageData>)dao.findForList("SubjectMapper.listAllSchool", pd);
  72 + }
  73 +
65 74 /**通过id获取数据
66 75 * @param pd
67 76 * @throws Exception
... ...