浏览代码

修复评卷时间编辑问题;登录跳转问题;回评给分板问题;给分板主观题总分显示问题

ting.yin 5 年之前
父节点
当前提交
e03087e9c0

+ 13 - 6
stmms-web/src/main/java/cn/com/qmth/stmms/common/controller/LoginController.java

@@ -187,10 +187,16 @@ public class LoginController {
                 aPview.addObject("message", "帐号不存在");
                 return aPview;
             }
+            if(loginType!=null){
+                ModelAndView view = new ModelAndView("redirect:/mark-login");
+                view.addObject("message", "帐号不存在");
+                return view;
+            }
             ModelAndView view = new ModelAndView(LOGIN_VIEW);
             view.addObject("message", "帐号不存在");
             view.addObject("showType", showType);
             view.addObject("indexLogo", indexLogo);
+            view.addObject(LOGIN_TYPE_KEY, loginType);
             return view;
         } else {
             return new ModelAndView("redirect:/login");
@@ -294,7 +300,14 @@ public class LoginController {
      * @return
      */
     public ModelAndView markerLogin(HttpServletRequest request, Marker marker, String password) {
+        StmmsSession session = RequestUtils.getSession(request);
+        String loginType = session.getParameter(LOGIN_TYPE_KEY);
         ModelAndView modelAndView = new ModelAndView(LOGIN_VIEW);
+        modelAndView.addObject("indexLogo", indexLogo);
+        modelAndView.addObject("showType", "mark-login");
+        if(loginType!=null){
+            modelAndView = new ModelAndView("redirect:/mark-login");
+        }
         ModelAndView modelAndViewForAP = new ModelAndView(AP_MARK_LOGIN_VIEW);
         if (!marker.getPassword().equals(password)) {
             if ("aopeng".equals(appIndex)) {
@@ -302,8 +315,6 @@ public class LoginController {
                 return modelAndViewForAP;
             }
             modelAndView.addObject("message", "密码错误");
-            modelAndView.addObject("indexLogo", indexLogo);
-            modelAndView.addObject("showType", "mark-login");
             return modelAndView;
         }
         if (marker.isEnable() == false) {
@@ -312,8 +323,6 @@ public class LoginController {
                 return modelAndViewForAP;
             }
             modelAndView.addObject("message", "帐号已禁用");
-            modelAndView.addObject("indexLogo", indexLogo);
-            modelAndView.addObject("showType", "mark-login");
             return modelAndView;
         }
         Exam exam = examService.findById(marker.getExamId());
@@ -328,8 +337,6 @@ public class LoginController {
                 return modelAndViewForAP;
             }
             modelAndView.addObject("message", "不在评卷时间范围 " + start + " " + end);
-            modelAndView.addObject("indexLogo", indexLogo);
-            modelAndView.addObject("showType", "mark-login");
             return modelAndView;
         }
 

+ 18 - 7
stmms-web/src/main/webapp/WEB-INF/views/modules/exam/examEdit.jsp

@@ -10,8 +10,15 @@
 			$("#name").focus();
 			$("#inputForm").validate({
 				submitHandler: function(form){
-					loading('正在提交,请稍等...');
-					form.submit();
+					var endTime = new Date($("#endTime").val()).getTime();
+					var startTime = new Date($("#startTime").val()).getTime();
+					if(startTime>=endTime){
+						alert("评卷结束时间必须晚于开始时间");
+						return;
+					}else{
+						loading('正在提交,请稍等...');
+						form.submit();
+					}
 				},
 				errorContainer: "#messageBox",
 				errorPlacement: function(error, element) {
@@ -23,6 +30,10 @@
 					}
 				}
 			});
+			$("#inputForm").submit(function(e){
+				
+				
+			});
 		});
 	</script>
 </head>
@@ -49,7 +60,7 @@
 		<div class="control-group">
 			<label class="control-label">考试日期:</label>
 			<div class="controls">
-				<input name="examTime" type="text" readonly="readonly" maxlength="20" class="Wdate required"
+				<input name="examTime" type="text" readonly="readonly" maxlength="20" class="Wdate required" 
 					value="${exam.examTime }"
 					onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
 			</div>
@@ -57,16 +68,16 @@
 				<div class="control-group">
 			<label class="control-label">评卷开始日期:</label>
 			<div class="controls">
-				<input name="startTime" type="text" readonly="readonly" maxlength="20" class="Wdate "
-					value="${exam.startTime }"
+				<input name="startTime" type="text" readonly="readonly" maxlength="30" class="Wdate " id="startTime"
+					value="<fmt:formatDate value="${exam.startTime}" pattern="yyyy-MM-dd HH:mm:ss" />"
 					onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
 			</div>
 		</div>
 		<div class="control-group">
 			<label class="control-label">评卷结束日期:</label>
 			<div class="controls">
-				<input name="endTime" type="text" readonly="readonly" maxlength="20" class="Wdate "
-					value="${exam.endTime }"
+				<input name="endTime" type="text" readonly="readonly" maxlength="30" class="Wdate " id="endTime"
+					value="<fmt:formatDate value="${exam.endTime}" pattern="yyyy-MM-dd HH:mm:ss" />"
 					onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
 			</div>
 		</div>

+ 1 - 1
stmms-web/src/main/webapp/static/mark-new/css/style.css

@@ -363,7 +363,7 @@ i,em {
 	font-weight: bold;
 	margin: 4px 0;
 }
-.mark-steps .step-board .newSubListCss{height: 20px;line-height: 19px; color: #333; display: block;text-align: center; font-family: "微软雅黑"; font-size: 16px; font-weight: normal; margin: 5px 0 5px 0;}
+.mark-steps .step-board .newSubListCss{height: 35px;line-height: 19px; color: #333; display: block;text-align: center; font-family: "微软雅黑"; font-size: 16px; font-weight: normal; margin: 5px 0 5px 0;}
 .mark-steps .step-board .newSubListCss .red{ color: #ed5321; font-weight: bold; font-size: 16px; }
 /*.sidebar .step-list .sublist .up{ height:27px; text-align:center; cursor:pointer;}
 .sidebar .step-list .sublist .down{height:22px; text-align:center; cursor:pointer;}*/

+ 12 - 11
stmms-web/src/main/webapp/static/mark-new/js/mark-control.js

@@ -573,21 +573,22 @@ MarkControl.prototype.submitTask = function(submitUrl) {
         		return;
         	}
         }
-        
-        task.markStepList = undefined;
-        task.pictureUrls = undefined;
-        task.sheetUrls = undefined;
-        task.imageData = undefined;
-        task.markFinish = undefined;
-        task.markTime = undefined;
-        var timestamp = new Date().getTime();
-        task.spent = timestamp - task.spent;
-        task.trackList = [];	
+        var submitObj = {
+                statusValue: task.statusValue,
+                studentId: task.studentId,
+                libraryId: task.libraryId,
+                totalScore: task.totalScore,
+                scoreList: task.scoreList,
+                trackList: [],
+                tagList: task.tagList,
+                markId:task.markId,
+                spent: new Date().getTime() - task.spent
+            }
         this.trigger('task.submit.before');
         
         if (this.taskControl != undefined) {
             //已定义任务引擎
-            this.taskControl.submit(task, function(status) {
+            this.taskControl.submit(submitObj, function(status) {
                 if (status != undefined && status.valid == true) {
                     markControl.context.status = status;
                     markControl.trigger('mark.status.change', status);

+ 1 - 1
stmms-web/src/main/webapp/static/mark-new/js/modules/mark-board.js

@@ -687,7 +687,7 @@ MarkBoard.prototype.onFocusChange = function() {
 
 MarkBoard.prototype.step_board_dom = '<div class="span2 mark-steps" style="display:none"><div class="step-board">\
 <a href="#" class="header" id="show-score-board-button"><< 鼠标给分</a>\
-<div class="newSubListCss"><span class="fraction" style="margin-right: 10px;">主观分<i class="red" id="subject-score"></i></span>\
+<div class="newSubListCss"><span class="fraction" style="margin-right: 10px;">主观分<i class="red" id="subject-score"></i></span><br/>\
 <span class="fraction">总分<i class="red" id="ObjectiveAndSubjectScore"></i></span></div>\
 <div class="sublist"><p class="fraction">总分 <i id="total-score">5</i></p></div>\
 <a href="#" class="header all-zero-button">全零分</a>\

+ 12 - 11
stmms-web/src/main/webapp/static/mark-track/js/mark-control.js

@@ -589,21 +589,22 @@ MarkControl.prototype.submitTask = function(submitUrl) {
         		return;
         	}
         }
-        task.markStepList = undefined;
-        task.pictureUrls = undefined;
-        task.sheetUrls = undefined;
-        task.imageData = undefined;
-        task.markFinish = undefined;
-        task.markTime = undefined;
-        task.paperUrl = undefined;
-        task.answerUrl = undefined;
-        var timestamp = new Date().getTime();
-        task.spent = timestamp - task.spent;
+        var submitObj = {
+                statusValue: task.statusValue,
+                studentId: task.studentId,
+                libraryId: task.libraryId,
+                totalScore: task.totalScore,
+                scoreList: task.scoreList,
+                trackList: [],
+                tagList: task.tagList,
+                markId:task.markId,
+                spent: new Date().getTime() - task.spent
+            }
         this.trigger('task.submit.before');
         this.trigger('mark.specialTag.before');
         if (this.taskControl != undefined) {
             // 已定义任务引擎
-            this.taskControl.submit(task, function(status) {
+            this.taskControl.submit(submitObj, function(status) {
                 if (status != undefined && status.valid == true) {
                     markControl.context.status = status;
                     markControl.trigger('mark.status.change', status);