Commit 67dfaf5ca1bff69839f507c8d1b3a4ab5612bc41

Authored by 孙向锦
1 parent 3371dbc6

提交代码

WebRoot/WEB-INF/jsp/sunvote/student/student_edit2.jsp
... ... @@ -56,6 +56,15 @@ li input {
56 56 width: 100%;
57 57 }
58 58  
  59 +li select {
  60 + height: 30px;
  61 + line-height: 30px;
  62 + background: #f5f5f5;
  63 + border: 1px solid #ccc;
  64 + outline-style: none;
  65 + width: 100%;
  66 +}
  67 +
59 68 .btn {
60 69 width: 80%;
61 70 height: 40px;
... ... @@ -89,26 +98,28 @@ input[type="text"],select {
89 98 <input type="hidden" name="TERM_ID" id="TERM_ID" value="${pd.TERM_ID}" />
90 99 <div id="zhongxin">
91 100 <li>
92   - <p>学生姓名:</p>
  101 + <p><span style="color:#f00">*</span>学生姓名:</p>
93 102 <div class="li_r">
94 103 <input type="text" name="NAME" id="NAME" value="${pd.NAME}"
95 104 maxlength="255" placeholder="这里输入学生姓名" title="学生姓名" />
96 105 </div>
97 106 </li>
98 107 <li>
99   - <p>学籍号:</p>
  108 + <p><span style="color:#f00">*</span>学号:</p>
100 109 <div class="li_r">
101   - <input type="text" name="SNO" id="SNO" value="${pd.SNO}"
102   - maxlength="255" placeholder="这里输入学籍号" title="学籍号" />
  110 + <input type="text" name="NUMBER" id="NUMBER" value="${pd.NUMBER}"
  111 + maxlength="255" placeholder="这里输入学号" title="学号" />
103 112 </div>
104 113 </li>
105 114 <li>
106   - <p>学号:</p>
  115 + <p><span style="color:#f00">*</span>键盘ID:</p>
107 116 <div class="li_r">
108   - <input type="text" name="NUMBER" id="NUMBER" value="${pd.NUMBER}"
109   - maxlength="255" placeholder="这里输入学号" title="学号" />
  117 + <input type="text" name="KEYPAD_ID" id="KEYPAD_ID"
  118 + value="${pd.KEYPAD_ID}" maxlength="10" placeholder="这里输入键盘ID"
  119 + title="键盘ID" />
110 120 </div>
111 121 </li>
  122 +
112 123 <li>
113 124 <p>性别:</p>
114 125 <div class="li_r">
... ... @@ -119,53 +130,7 @@ input[type=&quot;text&quot;],select {
119 130 </select>
120 131 </div>
121 132 </li>
122   - <li>
123   - <p>组号:</p>
124   - <div class="li_r">
125   - <input type="text" name="GROUPID" id="GROUPID"
126   - value="${pd.GROUPID}" maxlength="255" placeholder="这里输入组号"
127   - title="组号" />
128   - </div>
129   - </li>
130   - <li>
131   - <p>签到码:</p>
132   - <div class="li_r">
133   - <input type="text" name="SIGN_NO" id="SIGN_NO"
134   - value="${pd.SIGN_NO}" maxlength="255" placeholder="这里输入签到码"
135   - title="签到码" />
136   - </div>
137   - </li>
138   - <li>
139   - <p>家长姓名:</p>
140   - <div class="li_r">
141   - <input type="text" name="PARENT_NAME" id="PARENT_NAME"
142   - value="${pd.PARENT_NAME}" maxlength="255" placeholder="这里输入家长姓名"
143   - title="家长姓名" />
144   - </div>
145   - </li>
146   - <li>
147   - <p>家长手机:</p>
148   - <div class="li_r">
149   - <input type="text" name="PARENT_PHONE" id="PARENT_PHONE"
150   - value="${pd.PARENT_PHONE}" maxlength="255" placeholder="这里输入家长手机号"
151   - title="家长手机号" />
152   - </div>
153   - </li>
154   - <li>
155   - <p>键盘ID:</p>
156   - <div class="li_r">
157   - <input type="text" name="KEYPAD_ID" id="KEYPAD_ID"
158   - value="${pd.KEYPAD_ID}" maxlength="255" placeholder="这里输入键盘ID"
159   - title="键盘ID" />
160   - </div>
161   - </li>
162   - <li>
163   - <p>备注:</p>
164   - <div class="li_r">
165   - <input type="text" name="REMARK" id="REMARK" value="${pd.REMARK}"
166   - maxlength="255" placeholder="这里输入备注" title="备注" />
167   - </div>
168   - </li>
  133 +
169 134  
170 135 <div class="btn">
171 136 <a onclick="save();">保存</a>
... ... @@ -201,6 +166,17 @@ input[type=&quot;text&quot;],select {
201 166 $("#NAME").focus();
202 167 return false;
203 168 }
  169 +
  170 + if ($("#NUMBER").val() == "") {
  171 + $("#NUMBER").tips({
  172 + side : 3,
  173 + msg : '请输入学生姓名',
  174 + bg : '#AE81FF',
  175 + time : 2
  176 + });
  177 + $("#NUMBER").focus();
  178 + return false;
  179 + }
204 180  
205 181 if ($("#KEYPAD_ID").val() == ""
206 182 || $("#KEYPAD_ID").val().length != 10) {
... ... @@ -221,10 +197,7 @@ input[type=&quot;text&quot;],select {
221 197  
222 198 $(function() {
223 199 //日期框
224   - $('.date-picker').datepicker({
225   - autoclose : true,
226   - todayHighlight : true
227   - });
  200 +
228 201 });
229 202 </script>
230 203 </body>
... ...
WebRoot/WEB-INF/jsp/sunvote/student/student_edit2_bakk.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 + <style>
  20 + .table td{border:0 !important;}
  21 + .btn1 {
  22 + width: 80%;
  23 + height: 40px;
  24 + margin: 0 auto;
  25 + background: #3bc2d6;
  26 + margin-top: 5%;
  27 +}
  28 +
  29 +.btn1 a {
  30 + display: block;
  31 + width: 100%;
  32 + height: 100%;
  33 + color: #fff;
  34 + text-decoration: none;
  35 + text-align: center;
  36 + line-height: 40px;
  37 + font-size: 20px;
  38 +}
  39 + </style>
  40 +</head>
  41 +<body class="no-skin">
  42 +<!-- /section:basics/navbar.layout -->
  43 +<div class="main-container" id="main-container">
  44 + <!-- /section:basics/sidebar -->
  45 + <div class="main-content">
  46 + <div class="main-content-inner">
  47 + <div class="page-content">
  48 + <div class="row">
  49 + <div class="col-xs-12">
  50 +
  51 + <form action="student/${msg }.do" name="Form" id="Form" method="post">
  52 + <input type="hidden" name="ID" id="ID" value="${pd.ID}"/>
  53 + <input type="hidden" name="CLASS_ID" id="CLASS_ID" value="${pd.CLASS_ID}"/>
  54 + <input type="hidden" name="TERM_ID" id="TERM_ID" value="${pd.TERM_ID}"/>
  55 + <div id="zhongxin" style="padding-top: 13px;">
  56 + <table id="table_report" class="table">
  57 + <tr>
  58 + <td style="width:90px;text-align: right;padding-top: 13px;">姓名:</td>
  59 + <td><input type="text" name="NAME" id="NAME" value="${pd.NAME}" maxlength="255" placeholder="这里输入学生姓名" title="学生姓名" style="width:98%;"/></td>
  60 + </tr>
  61 + <tr>
  62 + <td style="width:90px;text-align: right;padding-top: 13px;">学籍号:</td>
  63 + <td><input type="text" name="SNO" id="SNO" value="${pd.SNO}" maxlength="255" placeholder="这里输入学籍号" title="学籍号" style="width:98%;"/></td>
  64 + </tr>
  65 + <tr>
  66 + <td style="width:90px;text-align: right;padding-top: 13px;">学号:</td>
  67 + <td><input type="text" name="NUMBER" id="NUMBER" value="${pd.NUMBER}" maxlength="255" placeholder="这里输入学号" title="学号" style="width:98%;"/></td>
  68 + </tr>
  69 + <tr>
  70 + <td style="width:90px;text-align: right;padding-top: 13px;">性别:</td>
  71 + <td>
  72 + <%-- <input type="number" name="SEX" id="SEX" value="${pd.SEX}" maxlength="32" placeholder="这里输入性别" title="性别" style="width:98%;"/></td> --%>
  73 + <select class="chosen-select form-control" name="SEX" id="SEX" data-placeholder="这里输入班级类型" style="width:98%;">
  74 + <option value="1" <c:if test="${pd.SEX==1}">selected="true"</c:if>>男</option>
  75 + <option value="0" <c:if test="${pd.SEX==0}">selected="true"</c:if>>女</option>
  76 + </select>
  77 + </td>
  78 + </tr>
  79 + <tr>
  80 + <td style="width:90px;text-align: right;padding-top: 13px;">组号:</td>
  81 + <td><input type="text" name="GROUPID" id="GROUPID" value="${pd.GROUPID}" maxlength="255" placeholder="这里输入组号" title="组号" style="width:98%;"/></td>
  82 + </tr>
  83 + <tr>
  84 + <td style="width:90px;text-align: right;padding-top: 13px;">签到码:</td>
  85 + <td><input type="text" name="SIGN_NO" id="SIGN_NO" value="${pd.SIGN_NO}" maxlength="255" placeholder="这里输入签到码" title="签到码" style="width:98%;"/></td>
  86 + </tr>
  87 + <tr>
  88 + <td style="width:90px;text-align: right;padding-top: 13px;">家长姓名:</td>
  89 + <td><input type="text" name="PARENT_NAME" id="PARENT_NAME" value="${pd.PARENT_NAME}" maxlength="255" placeholder="这里输入家长姓名" title="家长姓名" style="width:98%;"/></td>
  90 + </tr>
  91 + <tr>
  92 + <td style="width:90px;text-align: right;padding-top: 13px;">家长手机号:</td>
  93 + <td><input type="text" name="PARENT_PHONE" id="PARENT_PHONE" value="${pd.PARENT_PHONE}" maxlength="255" placeholder="这里输入家长手机号" title="家长手机号" style="width:98%;"/></td>
  94 + </tr>
  95 + <tr>
  96 + <td style="width:90px;text-align: right;padding-top: 13px;">键盘ID:</td>
  97 + <td><input type="text" name="KEYPAD_ID" id="KEYPAD_ID" value="${pd.KEYPAD_ID}" maxlength="255" placeholder="这里输入键盘ID" title="键盘ID" style="width:98%;"/></td>
  98 + </tr>
  99 + <tr>
  100 + <td style="width:90px;text-align: right;padding-top: 13px;">备注:</td>
  101 + <td><input type="text" name="REMARK" id="REMARK" value="${pd.REMARK}" maxlength="255" placeholder="这里输入备注" title="备注" style="width:98%;"/></td>
  102 + </tr>
  103 + <tr>
  104 + <td style="text-align: center;" colspan="10">
  105 + <!-- <a class="btn" onclick="save();"><div style="width:100px;">保存</div></a> -->
  106 + <div class="btn1">
  107 + <a onclick="save();">保存</a>
  108 + </div>
  109 + </td>
  110 + </tr>
  111 + </table>
  112 + </div>
  113 + <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>
  114 + </form>
  115 + </div>
  116 + <!-- /.col -->
  117 + </div>
  118 + <!-- /.row -->
  119 + </div>
  120 + <!-- /.page-content -->
  121 + </div>
  122 + </div>
  123 + <!-- /.main-content -->
  124 +</div>
  125 +<!-- /.main-container -->
  126 +
  127 +
  128 + <!-- 页面底部js¨ -->
  129 + <%@ include file="../../system/index/foot.jsp"%>
  130 + <!-- 下拉框 -->
  131 + <script src="static/ace/js/chosen.jquery.js"></script>
  132 + <!-- 日期框 -->
  133 + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script>
  134 + <!--提示框-->
  135 + <script type="text/javascript" src="static/js/jquery.tips.js"></script>
  136 + <script type="text/javascript">
  137 + $(top.hangge());
  138 + //保存
  139 + function save(){
  140 + if($("#NAME").val()==""){
  141 + $("#NAME").tips({
  142 + side:3,
  143 + msg:'请输入学生姓名',
  144 + bg:'#AE81FF',
  145 + time:2
  146 + });
  147 + $("#NAME").focus();
  148 + return false;
  149 + }
  150 +
  151 + $("#Form").submit();
  152 + $("#zhongxin").hide();
  153 + $("#zhongxin2").show();
  154 + }
  155 +
  156 + $(function() {
  157 + //日期框
  158 + $('.date-picker').datepicker({autoclose: true,todayHighlight: true});
  159 + });
  160 + </script>
  161 +</body>
  162 +</html>
0 163 \ No newline at end of file
... ...
WebRoot/WEB-INF/jsp/sunvote/student/uploadexcel.jsp
... ... @@ -117,7 +117,8 @@ display: block;
117 117 </tr>
118 118 <tr>
119 119 <td style="text-align: center;padding-top: 10px;">
120   - <a class="btn btn-mini btn-primary" style="background-color:#3bc2d6 !important;border-color:#3bc2d6 !important;width:300px; height:50px;line-height:50px;font-size:18px;margin-top:5%;padding:0" onclick="save();">导入</a>
  120 + <a class="btn btn-mini btn-primary" style="background-color:#3bc2d6 !important;border-color:#3bc2d6 !important;width:200px; height:50px;line-height:50px;font-size:18px;margin-top:5%;padding:0" onclick="save();">导入</a>
  121 + <a class="btn btn-mini btn-primary" style="background-color:#87b87f !important;border-color:#87b87f !important;width:200px; height:50px;line-height:50px;font-size:18px;margin-top:5%;padding:0" href="static/files/Template.xls" target="_blank" >下载模板</a>
121 122 </td>
122 123 </tr>
123 124 </table>
... ...
WebRoot/WEB-INF/jsp/sunvote/teacher/creat_question.jsp
... ... @@ -53,7 +53,9 @@
53 53 <div class="form-group">
54 54 <label for="inputEmail3" class="col-sm-2 control-label">试题答案</label>
55 55 <div class="col-sm-10">
56   - <input type="text" class="form-control" id="answer" placeholder="输入题目答案(例如:“ABCDA”)">
  56 + <input type="text" class="form-control" id="answer" placeholder="输入题目答案(例如:“ABCDA”)" maxlength="119">
  57 +
  58 + <div class="tips" style="color:#f00"></div>
57 59 </div>
58 60 <div class="clearfix"></div>
59 61 </div>
... ... @@ -77,7 +79,7 @@
77 79 <div class="form-group">
78 80 <label for="inputEmail3" class="col-sm-2 control-label">单题分数</label>
79 81 <div class="col-sm-10">
80   - <input type="number" class="form-control" id="fraction" placeholder="">
  82 + <input type="number" class="form-control" id="fraction" placeholder="" value="1">
81 83 </div>
82 84 <div class="clearfix"></div>
83 85 </div>
... ... @@ -115,7 +117,7 @@
115 117 <div class="form-group">
116 118 <label for="index_s_2" class="col-sm-2 control-label">题数</label>
117 119 <div class="col-sm-10">
118   - <input type="number" class="form-control" id="index_s_2" placeholder="请输入题目数量">
  120 + <input type="number" class="form-control" id="index_s_2" placeholder="请输入题目数量(1-100)" oninput="if(value.length>3) value=value.slice(0,3)">
119 121 </div>
120 122 <!-- <div class="col-sm-1"><span style="line-height:34px;">——</span></div>
121 123 <div class="col-sm-4">
... ... @@ -143,7 +145,7 @@
143 145 <div class="form-group">
144 146 <label for="fraction2" class="col-sm-2 control-label">单题分数</label>
145 147 <div class="col-sm-10">
146   - <input type="number" class="form-control" id="fraction2" placeholder="请输入单题分数">
  148 + <input type="number" class="form-control" id="fraction2" value="1" placeholder="请输入单题分数">
147 149 </div>
148 150 <div class="clearfix"></div>
149 151 </div>
... ...
WebRoot/WEB-INF/jsp/sunvote/teacher/teacher_main.jsp
... ... @@ -97,14 +97,14 @@
97 97 <div class="form-group">
98 98 <label for="enter_title" class="col-sm-4 control-label">测验标题</label>
99 99 <div class="col-sm-6">
100   - <input type="text" class="form-control" id="enter_title" placeholder="输入测验标题">
  100 + <input type="text" class="form-control" id="enter_title" placeholder="输入测验标题(不能超过100个字符)" maxlength="100" minlength="1">
101 101 </div>
102 102 <div class="clearfix"></div>
103 103 </div>
104 104 <div class="form-group">
105 105 <label for="enter_time" class="col-sm-4 control-label">测验时长(分钟)</label>
106 106 <div class="col-sm-6">
107   - <input type="number" class="form-control" id="enter_time" placeholder="输入测验时长">
  107 + <input type="number" class="form-control" id="enter_time" placeholder="输入测验时长(单位:分钟)" maxlength="3" oninput="if(value.length>3) value=value.slice(0,3)">
108 108 </div>
109 109 <div class="clearfix"></div>
110 110 </div>
... ... @@ -146,8 +146,13 @@
146 146 var name = $("#enter_title").val();
147 147 var time = $("#enter_time").val();
148 148 if(name != null&& name != '' && time != null && time != ''){
149   - self.location.href = "<%=basePath%>" + "paper/npaper.do?" + "name=" + name + "&time=" + time ;
150   - $(".title_time").modal("hide");
  149 + var itime = parseInt(time);
  150 + if(itime > 0 && itime <= 300){
  151 + self.location.href = "<%=basePath%>" + "paper/npaper.do?" + "name=" + name + "&time=" + time ;
  152 + $(".title_time").modal("hide");
  153 + }else{
  154 + alert("请输入正确的时间,时间不能超过300分钟");
  155 + }
151 156 }
152 157 });
153 158  
... ...
WebRoot/static/files/Template.xls 0 → 100644
No preview for this file type
WebRoot/static/js/control-604.js
... ... @@ -136,9 +136,15 @@
136 136 alert("请输入题目分数");
137 137 return;
138 138 }
139   - $('.fast').modal('hide');
140   - //score += parseInt(fraction)*answer.split(",").length;
141   - creat(answer,num_ans,fraction);
  139 + var frac = parseInt(fraction);
  140 + if(frac > 0){
  141 + $('.fast').modal('hide');
  142 + //score += parseInt(fraction)*answer.split(",").length;
  143 + creat(answer,num_ans,fraction);
  144 + }else{
  145 + alert("请输入正确分数");
  146 + return;
  147 + }
142 148 })
143 149  
144 150 /*添加试题的确定按钮*/
... ... @@ -160,6 +166,11 @@
160 166 alert("请输入题目分数");
161 167 return;
162 168 }
  169 + var iindex_e_2 = parseInt(index_e_2);
  170 + if(iindex_e_2 < 1 || iindex_e_2 > 100){
  171 + alert("题目个数不合法");
  172 + return;
  173 + }
163 174 //console.log(typeof(type_2));
164 175 addQuestion(type_2,num_ans_2,index_s_2,index_e_2,fraction2);
165 176 $('.addQuestion').modal('hide');
... ... @@ -192,7 +203,11 @@
192 203 /*更改多选答案*/
193 204 $(document).on('click','.check li',function(){
194 205 //$(this).siblings().removeClass("on");
195   - $(this).addClass("on");
  206 + if($(this).hasClass('on')){
  207 + $(this).removeClass("on");
  208 + }else{
  209 + $(this).addClass("on");
  210 + }
196 211 })
197 212 /*提交保存数据*/
198 213 $("#save").click(function(){
... ... @@ -241,6 +256,10 @@
241 256 answer+=$(".section").eq(i).find(".question").eq(j).find(".on").eq(k).text();
242 257 //console.log(answer);
243 258 }
  259 + if(answer == ''){
  260 + alert("还有试题未编辑答案。");
  261 + return;
  262 + }
244 263 data.questions[j]={
245 264 chapter_id: "0",
246 265 problem_type_id: "0",
... ... @@ -408,24 +427,27 @@ function creatHtml(data){
408 427  
409 428 var answerLen = 0 ;
410 429 /*快速建题中,每输入五个答案就加一个空格*/
411   -$("#answer").on("input propertychange",function(event){
412   - if($("#answer").val().length > answerLen){
413   - var answerStr = $("#answer").val();
414   - var result = "";
415   - if(answerStr.length > 5){
416   - answerStr = answerStr.replace(new RegExp(" ","gm"),"");
417   - for(var i = 0 ; i < answerStr.length ; i++){
418   - result += answerStr[i];
419   - if(i % 5 == 4){
420   - result += " ";
421   - }
  430 +$("#answer").on("input propertychange", function(event) {
  431 + var answerStr = "";
  432 + answerStr = $("#answer").val();
  433 + var result = "";
  434 + if (answerStr.length > 5) {
  435 + answerStr = answerStr.replace(new RegExp(" ", "gm"), "");
  436 + for (var i = 0; i < answerStr.length; i++) {
  437 + result += answerStr[i];
  438 + if (i % 5 == 4 && i != answerStr.length -1) {
  439 + result += " ";
422 440 }
423   - }else{
424   - result = answerStr;
425 441 }
426   - $("#answer").val(result);
  442 + } else {
  443 + result = answerStr;
  444 + }
  445 + $("#answer").val(result);
  446 + if (answerStr.length > 0) {
  447 + $(".tips").text("共" + answerStr.length + "题");
  448 + } else {
  449 + $(".tips").text("");
427 450 }
428   - answerLen = $("#answer").val().length;
429 451 })
430 452  
431 453 /*数字转汉字数字*/
... ...
src/com/fh/controller/api/V1.java
... ... @@ -1106,7 +1106,7 @@ public class V1 extends BaseController {
1106 1106 eventPd.put("EVENT_ID", get32UUID());
1107 1107 eventPd.put("EVENT_NAME", apiName);
1108 1108 eventPd.put("EVENT_USER", getUsername());
1109   - eventPd.put("EVENT_TYPE", "0");
  1109 + eventPd.put("EVENT_TYPE", "-1");
1110 1110 eventPd.put("EVENT_START_TIME", Tools.date2Str(new Date()));
1111 1111 eventPd.put("CLIENT_ID", "SERVER");
1112 1112 eventPd.put("EVENT_IP", getRemoteIp());
... ...
src/com/fh/controller/sunvote/student/StudentController.java
... ... @@ -205,6 +205,7 @@ public class StudentController extends BaseController {
205 205 return mv;
206 206 }
207 207  
  208 +
208 209 /**修改
209 210 * @param
210 211 * @throws Exception
... ...