Browse Source

增加评卷员工作量的设定、评卷员及管理员可以修改评卷员密码

ting.yin 6 years ago
parent
commit
c8cf37acb4

+ 11 - 0
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/model/Marker.java

@@ -57,6 +57,9 @@ public class Marker implements Serializable {
 
 
     @Column(name = "mode")
     @Column(name = "mode")
     private String mode;
     private String mode;
+    
+    @Column(name = "top_count")
+    private String topCount;
 
 
     @Transient
     @Transient
     @ExcelField(title = "科目", align = 2, sort = 10)
     @ExcelField(title = "科目", align = 2, sort = 10)
@@ -252,4 +255,12 @@ public class Marker implements Serializable {
         this.group = group;
         this.group = group;
     }
     }
 
 
+	public String getTopCount() {
+		return topCount;
+	}
+
+	public void setTopCount(String topCount) {
+		this.topCount = topCount;
+	}
+
 }
 }

+ 20 - 0
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/query/MarkerSearchQuery.java

@@ -8,6 +8,8 @@ import cn.com.qmth.stmms.biz.exam.model.Marker;
 
 
 public class MarkerSearchQuery extends BaseQuery<Marker> {
 public class MarkerSearchQuery extends BaseQuery<Marker> {
 
 
+    private int id;
+
     private int examId;
     private int examId;
 
 
     private String subjectCode;
     private String subjectCode;
@@ -15,6 +17,8 @@ public class MarkerSearchQuery extends BaseQuery<Marker> {
     private String loginName;
     private String loginName;
 
 
     private int groupNumber;
     private int groupNumber;
+    
+    private String topCount;
 
 
     public void orderByLoginName() {
     public void orderByLoginName() {
         setSort(new Sort(Direction.ASC, "loginName"));
         setSort(new Sort(Direction.ASC, "loginName"));
@@ -56,4 +60,20 @@ public class MarkerSearchQuery extends BaseQuery<Marker> {
         this.groupNumber = groupNumber;
         this.groupNumber = groupNumber;
     }
     }
 
 
+	public int getId() {
+		return id;
+	}
+
+	public void setId(int id) {
+		this.id = id;
+	}
+
+	public String getTopCount() {
+		return topCount;
+	}
+
+	public void setTopCount(String topCount) {
+		this.topCount = topCount;
+	}
+
 }
 }

+ 32 - 1
stmms-web/src/main/java/cn/com/qmth/stmms/admin/exam/MarkerController.java

@@ -241,5 +241,36 @@ public class MarkerController extends BaseExamController {
         }
         }
         return "redirect:/admin/exam/marker?repage";
         return "redirect:/admin/exam/marker?repage";
     }
     }
-
+    
+    @RequestMapping(value = "/reSetPassword", method = RequestMethod.POST)
+    @ResponseBody
+    public JSONObject reSetPassword(@RequestParam Integer id,@RequestParam String password) {
+        Marker marker = markerService.findById(id);
+        JSONObject obj = new JSONObject();
+        if (marker != null) {
+            marker.setPassword(password);
+            marker = markerService.save(marker);
+            obj.accumulate("success", true);
+        } else {
+            obj.accumulate("success", false);
+            obj.accumulate("message", "该评卷员不存在");
+        }
+        return obj;
+    }
+    
+    @RequestMapping(value = "/setTaskCount", method = RequestMethod.POST)
+    @ResponseBody
+    public JSONObject setTaskCount(@RequestParam Integer id,@RequestParam Integer taskCount) {
+        Marker marker = markerService.findById(id);
+        JSONObject obj = new JSONObject();
+        if (marker != null) {
+            marker.setTopCount(taskCount.toString());
+            marker = markerService.save(marker);
+            obj.accumulate("success", true);
+        } else {
+            obj.accumulate("success", false);
+            obj.accumulate("message", "该评卷员不存在");
+        }
+        return obj;
+    }
 }
 }

+ 5 - 2
stmms-web/src/main/java/cn/com/qmth/stmms/mark/MarkController.java

@@ -195,7 +195,7 @@ public class MarkController extends BaseController {
         status.accumulate("markedCount", markedCount);
         status.accumulate("markedCount", markedCount);
         status.accumulate("exceptionCount", 0);
         status.accumulate("exceptionCount", 0);
         status.accumulate("valid", totalCount > 0);
         status.accumulate("valid", totalCount > 0);
-
+        status.accumulate("topCount", marker.getTopCount() == null ?0:marker.getTopCount());
         return status;
         return status;
     }
     }
 
 
@@ -296,10 +296,13 @@ public class MarkController extends BaseController {
 
 
     @RequestMapping("/change-name")
     @RequestMapping("/change-name")
     @ResponseBody
     @ResponseBody
-    public JSONObject changeName(HttpServletRequest request, @RequestParam String name) {
+    public JSONObject changeName(HttpServletRequest request, @RequestParam String name,@RequestParam(required = false) String password) {
         Marker marker = RequestUtils.getWebUser(request).getMarker();
         Marker marker = RequestUtils.getWebUser(request).getMarker();
         JSONObject result = new JSONObject();
         JSONObject result = new JSONObject();
         marker.setName(name);
         marker.setName(name);
+        if(StringUtils.isNotEmpty(password)){
+            marker.setPassword(password);
+        }
         marker = markerService.save(marker);
         marker = markerService.save(marker);
         result.accumulate("success", marker != null);
         result.accumulate("success", marker != null);
         if (marker != null) {
         if (marker != null) {

+ 150 - 0
stmms-web/src/main/webapp/WEB-INF/views/modules/exam/markerList.jsp

@@ -6,6 +6,75 @@
 	<meta name="decorator" content="default"/>
 	<meta name="decorator" content="default"/>
 	<%@include file="/WEB-INF/views/include/head.jsp" %>
 	<%@include file="/WEB-INF/views/include/head.jsp" %>
 	<style type="text/css">.sort{color:#0663A2;cursor:pointer;}</style>
 	<style type="text/css">.sort{color:#0663A2;cursor:pointer;}</style>
+	<style type="text/css">
+        .sort{color:#0663A2;cursor:pointer;}
+        .taskWindow,.reSetPasswordWin{
+            width: 400px;
+            min-height: 150px;
+            background: #fff;
+            font-family: "微软雅黑", Fixedsys;
+            border: #5d6d7d solid 1px;
+            position: absolute;
+            left: 50%;
+            top: 50%;
+            margin: -150px 0 0 -200px;
+            text-align: center;
+            z-index: 99999;
+        }
+        .task-header,.password-header{
+            width: 100%;
+            height: 46px;
+            background: #5d6d7d;
+            color: #fff;
+        }
+        .task-content,.password-content{
+            font-size: 18px;
+            color: #005277;
+            text-align: left;
+            padding: 15px;
+            line-height: 30px;
+            word-wrap: break-word;
+        }
+        .image-close {
+            margin-top: 15px;
+            margin-right: 15px;
+            cursor: pointer;
+            float: right;
+        }
+        .title {
+            font-size: 22px;
+            font-weight: bold;
+            color: #fff;
+            margin: 0px;
+            padding: 13px 0 0 13px;
+            float: left;
+        }
+        .task-count,.password-value{
+            width: 150px;
+        }
+        .btn-info{
+            height: 25px;
+            margin-left: 320px;
+            margin-bottom: 20px;
+        }
+        .wrong,.passwordWrong{
+            font-size: 12px;
+            color: #f00;
+            line-height: 30px;
+            padding-left: 20px;
+        }
+        #cover{
+            position: fixed;
+            z-index:9999;
+            top:0px;
+            left:0px;
+            display: none;
+            width: 100%;
+            height: 100%;
+            opacity: 0.5;
+            background: #000 none repeat scroll 0% 0%;
+        }
+    </style>
 </head>
 </head>
 <body>
 <body>
     <ul class="nav nav-tabs">
     <ul class="nav nav-tabs">
@@ -50,6 +119,7 @@
 				<th>状态</th>
 				<th>状态</th>
 				<th>已评数量</th>
 				<th>已评数量</th>
 				<th>正在评卷</th>
 				<th>正在评卷</th>
+				<th>任务数</th>
 				<th>操作</th>
 				<th>操作</th>
 			</tr>
 			</tr>
 		</thead>
 		</thead>
@@ -72,6 +142,7 @@
 				<td>${marker.enable eq true ? "启用" : "禁用"}</td>
 				<td>${marker.enable eq true ? "启用" : "禁用"}</td>
 				<td>${marker.markedCount}</td>
 				<td>${marker.markedCount}</td>
 				<td>${marker.currentCount}</td>
 				<td>${marker.currentCount}</td>
+				<td>${marker.topCount}</td>
 				<td>
 				<td>
 				    <c:if test="${web_user.schoolAdmin==true}">
 				    <c:if test="${web_user.schoolAdmin==true}">
 					<a href="javascript:void(0)" class="delete-button" data-id="${marker.id}">删除</a>
 					<a href="javascript:void(0)" class="delete-button" data-id="${marker.id}">删除</a>
@@ -82,12 +153,25 @@
 					<a href="javascript:void(0)" class="toggle-button" data-id="${marker.id}" data-value="true">启用</a>
 					<a href="javascript:void(0)" class="toggle-button" data-id="${marker.id}" data-value="true">启用</a>
 					</c:if>
 					</c:if>
 					<a href="javascript:void(0)" class="release-button" data-id="${marker.id}">回收</a>
 					<a href="javascript:void(0)" class="release-button" data-id="${marker.id}">回收</a>
+					<a href="javascript:void(0)" class="task-button" data-id="${marker.id}" onclick="showTaskWin('${marker.id}');">设置评卷数</a>
+                    <a href="javascript:void(0)" class="reSetPassword-button" data-id="${marker.id}" onclick="reSetPassword('${marker.id}');">重置密码</a>
 					</c:if>
 					</c:if>
 				</td>
 				</td>
 			</tr>
 			</tr>
 		</c:forEach>
 		</c:forEach>
 		</tbody>
 		</tbody>
 	</table>
 	</table>
+	    <div class="taskWindow" style="display:none"><div class="task-header">
+        <p class="title">设置任务数</p><p class="image-close"><img src="${ctxStatic}/mark-new/images/images-close.png" /></p></div>
+        <div class="task-content"><input type="text" class="task-count" placeholder="请输入任务数"/><i class="wrong"></i></div>
+        <a href="#" class="btn btn-small btn-info task-btn">确定</a>
+    </div>
+
+    <div class="reSetPasswordWin" style="display:none"><div class="password-header">
+        <p class="title">重置密码</p><p class="image-close password-close"><img src="${ctxStatic}/mark-new/images/images-close.png" /></p></div>
+        <div class="password-content"><input type="text" class="password-value" placeholder="请输入新的密码"/><i class="passwordWrong"></i></div>
+        <a href="#" class="btn btn-small btn-info password-btn">确定</a>
+    </div>
 	<div class="pagination">${query}</div>
 	<div class="pagination">${query}</div>
 <script type="text/javascript">
 <script type="text/javascript">
 var searchSubjectCode = '${query.subjectCode}';
 var searchSubjectCode = '${query.subjectCode}';
@@ -174,6 +258,72 @@ function goSearch(){
 	$("#searchForm").submit();
 	$("#searchForm").submit();
 	return false;
 	return false;
 }
 }
+function showTaskWin(obj){
+	  $('.wrong').html('');
+	  $('.task-count').val('');
+	  $('.taskWindow').show();
+	  $('#cover').show();
+	  markerId = obj;
+	}
+	function reSetPassword(obj){
+	  $('.passwordWrong').html('');
+	  $('.password-value').val('');
+	  $('.reSetPasswordWin').show();
+	  $('#cover').show();
+	  markerId = obj;
+	}
+	$('.image-close').click(function () {
+	  $('.taskWindow').hide();
+	  $('#cover').hide();
+	});
+	$('.password-close').click(function () {
+	  $('.reSetPasswordWin').hide();
+	  $('#cover').hide();
+	});
+
+	$('.task-btn').click(function () {
+	  var taskCount = $('.task-count').val();
+	  var wrongMessage = $('.wrong');
+	       taskCount = taskCount.replace(/(^\s*)|(\s*$)/g, "");
+	       if(taskCount.length == 0){
+	         wrongMessage.html('任务数不能为空!');
+	         return false;
+	       }else {
+	         if(!/^\+?[1-9][0-9]*$/.test(taskCount)){
+	           wrongMessage.html('请输入正整数!');
+	           return false;
+	         }
+	       }
+	  $.post('${ctx}/admin/exam/marker/setTaskCount', {id: markerId,taskCount:taskCount}, function(result){
+	    if(result.success==true){
+	      $("#searchForm").submit();
+	    }else{
+	      alert(result.message);
+	    }
+	    $('.taskWindow').hide();
+	  });
+	});
+	    $('.password-btn').click(function () {
+	      var password = $('.password-value').val();
+	      var wrongMessage = $('.passwordWrong');
+	      password = password.replace(/(^\s*)|(\s*$)/g, "");
+	      if(password.length == 0){
+	        wrongMessage.html('密码不能为空!');
+	        return false;
+	      }else if(password.length < 4){
+	        wrongMessage.html('密码至少4位!');
+	        return false;
+	      }
+	      $.post('${ctx}/admin/exam/marker/reSetPassword', {id: markerId,password:password}, function(result){
+	        if(result.success==true){
+	          $("#searchForm").submit();
+	        }else{
+	          alert(result.message);
+	        }
+	        $('.reSetPasswordWin').hide();
+	      });
+	    });
+	    
 </script>	
 </script>	
 </body>
 </body>
 </html>
 </html>

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

@@ -363,6 +363,8 @@ i,em {
 	font-weight: bold;
 	font-weight: bold;
 	margin: 4px 0;
 	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 .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 .up{ height:27px; text-align:center; cursor:pointer;}
 .sidebar .step-list .sublist .down{height:22px; text-align:center; cursor:pointer;}*/
 .sidebar .step-list .sublist .down{height:22px; text-align:center; cursor:pointer;}*/
 .mark-steps .step-board .step-list .done {
 .mark-steps .step-board .step-list .done {
@@ -1134,7 +1136,33 @@ i,em {
 }
 }
 
 
 .wrong {
 .wrong {
-	font-size: 18px;
-	color: #f00;
-	line-height: 30px;
-}
+    font-size: 18px;
+    color: #f00;
+    line-height: 30px;
+}
+.message-popover .popover-cont .username,.password,.password2 {
+    font-size: 12px;
+    color: #f00;
+    line-height: 30px;
+    padding-left: 20px;
+}
+a.button.all-zero-button {
+	margin-right: 20px;
+}
+.message-popover .popover-cont .username-input,.password-input,.password2-input{
+    width: 200px;
+}
+.message-popover .text-userInfo {
+    margin: 0px 0 15px 0;
+    width: 50px;
+    float: right;
+    margin-right: 20px;
+}
+
+.password-input,.password2-input{
+    margin-left: 20px;
+}
+
+.username-input{
+    margin-left: 12px;
+}

+ 62 - 28
stmms-web/src/main/webapp/static/mark-new/js/modules/change-name.js

@@ -10,10 +10,12 @@ function ChangeName(option) {
     this.url = option.url;
     this.url = option.url;
     this.context = option.markControl.context;
     this.context = option.markControl.context;
     this.userName = option.markControl.container.header.find('#mark-user-name');
     this.userName = option.markControl.container.header.find('#mark-user-name');
-
     this.popover = getDom(this.popover_dom, this.markControl);
     this.popover = getDom(this.popover_dom, this.markControl);
-    this.popover.input = this.popover.find('input.user-input');
-    this.popover.message = this.popover.find('i.wrong');
+    this.popover.userNameInput = this.popover.find('input.username-input');
+    this.popover.passwordInput = this.popover.find('input.password-input');
+    this.popover.password2Input = this.popover.find('input.password2-input');
+    this.popover.userNameMessage = this.popover.find('i.username');
+    this.popover.password2Message = this.popover.find('i.password2');
     this.popover.submitButton = this.popover.find('a.btn');
     this.popover.submitButton = this.popover.find('a.btn');
     this.popover.cancelButton = this.popover.find('p.image-close');
     this.popover.cancelButton = this.popover.find('p.image-close');
     this.popover.appendTo(this.markControl.container);
     this.popover.appendTo(this.markControl.container);
@@ -27,33 +29,61 @@ function ChangeName(option) {
         self.toggle(false);
         self.toggle(false);
     });
     });
     this.popover.submitButton.click(function() {
     this.popover.submitButton.click(function() {
-        var text = self.popover.input.val();
-        if (text.length == 0) {
-            self.popover.message.html('姓名不能为空');
-        } else if (text.length > 8) {
-            self.popover.message.html('长度不能超过8个字');
-        } else {
-            $.post(self.url, {
-                name: text
-            }, function(result) {
-                if (result.success == true) {
-                    self.userName.html(result.name);
-                    self.toggle(false);
-                } else {
-                    self.popover.message.html('姓名修改失败,请稍后重试');
-                }
-            }).error(function() {
-                self.popover.message.html('网络通信错误,请稍后重试');
-            });
-        }
+              var logout = false;
+              var nameText = self.popover.userNameInput.val();
+                  nameText = nameText.replace(/(^\s*)|(\s*$)/g, "");
+              var pwText = self.popover.passwordInput.val();
+                  pwText = pwText.replace(/(^\s*)|(\s*$)/g, "");
+              var pw2Text = self.popover.password2Input.val();
+                  pw2Text = pw2Text.replace(/(^\s*)|(\s*$)/g, "");
+              if (nameText.length == 0) {
+                  self.popover.userNameMessage.html('姓名不能为空');
+                  return false;
+              } else if (nameText.length > 8) {
+                  self.popover.userNameMessage.html('长度不能超过8个字');
+                  return false;
+              }
+              if(pwText.length > 0 || pw2Text.length > 0) {
+                  logout = true;
+                  if (!pw2Text) {
+                    self.popover.password2Message.html('请再次输入您的密码');
+                    return false;
+                  }
+                  if (pwText != pw2Text) {
+                    self.popover.password2Message.html('两次密码请保持一致');
+                    return false;
+                  }
+                  if(pw2Text.length < 4){
+                    self.popover.password2Message.html('密码的长度至少4位');
+                    return false;
+                  }
+              }
+                $.post(self.url, {
+                    name: nameText,
+                    password:pwText
+                }, function(result) {
+                    if (result.success == true) {
+                        self.userName.html(result.name);
+                        self.toggle(false);
+                        if(logout){//修改密码后请重新登陆
+                          window.location.href = '/mark/logout';
+                        }
+                    } else {
+                        self.popover.userNameMessage.html('修改失败,请稍后重试');
+                    }
+                }).error(function() {
+                    self.popover.userNameMessage.html('网络通信错误,请稍后重试');
+                });
     });
     });
 }
 }
 
 
 ChangeName.prototype.toggle = function(enable) {
 ChangeName.prototype.toggle = function(enable) {
     if (enable == true) {
     if (enable == true) {
         this.enable = true;
         this.enable = true;
-        this.popover.input.val('');
-        this.popover.message.html('');
+        this.popover.userNameInput.val(this.userName.html());
+        this.popover.passwordInput.val('');
+        this.popover.userNameMessage.html('');
+        this.popover.password2Message.html('');
         this.popover.show();
         this.popover.show();
         this.context.listenKeyboard = false;
         this.context.listenKeyboard = false;
     } else {
     } else {
@@ -64,8 +94,12 @@ ChangeName.prototype.toggle = function(enable) {
 }
 }
 
 
 ChangeName.prototype.popover_dom = '<div class="message-popover" style="display:none"><div class="popover-header">\
 ChangeName.prototype.popover_dom = '<div class="message-popover" style="display:none"><div class="popover-header">\
-<p class="title">评卷员更名</p><p class="image-close"><img src="{staticServer}/mark-new/images/images-close.png" /></p></div>\
-<div class="popover-cont"><input type="text" class="user-input" placeholder="请输入您的姓名" />\
-<i class="wrong"></i></div>\
-<a href="#" class="btn btn-large btn-info text-c">确定</a>\
+<p class="title">修改个人信息</p><p class="image-close"><img src="{staticServer}/mark-new/images/images-close.png" /></p></div>\
+<div class="popover-cont"><span style="color: red;">*</span><input type="text" class="username-input" placeholder="请输入您的姓名" />\
+<i class="wrong username"></i></div>\
+<div class="popover-cont"><input type="password" class="password-input" placeholder="请输入新的密码" />\
+ <i class="wrong password"></i></div>\
+ <div class="popover-cont"><input type="password" class="password2-input" placeholder="请再次输入您的密码" /> \
+ <i class="wrong password2"></i></div>\
+<a href="#" class="btn btn-small btn-info text-userInfo">确定</a>\
 </div>';
 </div>';

+ 8 - 2
stmms-web/src/main/webapp/static/mark-new/js/modules/mark-status.js

@@ -24,7 +24,7 @@ function MarkStatus(option) {
         } else {
         } else {
             this.objectiveArea.hide();
             this.objectiveArea.hide();
         }
         }
-        //this.checkTopCount(task);
+        this.checkTopCount(task);
     });
     });
     this.markControl.on('task.get.none', this, function(event, context, status) {
     this.markControl.on('task.get.none', this, function(event, context, status) {
         this.topStatus.find('#stage-name').html('');
         this.topStatus.find('#stage-name').html('');
@@ -85,7 +85,7 @@ MarkStatus.prototype.checkTopCount = function(task) {
 
 
 MarkStatus.prototype.render = function(status) {
 MarkStatus.prototype.render = function(status) {
     if (status != undefined && status.valid === true) {
     if (status != undefined && status.valid === true) {
-        //var topCount = status.topCount;
+        var topCount = status.topCount;
         this.topStatus.find('#mark-count').html(status.personCount);
         this.topStatus.find('#mark-count').html(status.personCount);
 
 
         //大题进度信息区域
         //大题进度信息区域
@@ -100,6 +100,12 @@ MarkStatus.prototype.render = function(status) {
             } else if (markedPercent == '0' && markedCount > 0) {
             } else if (markedPercent == '0' && markedCount > 0) {
                 markedPercent = '1';
                 markedPercent = '1';
             }
             }
+            if(topCount > 0){
+                if(this.blockProgress.find('#top-count').length == 0){
+                  this.blockProgress.find('#todo-count').after('<i>任务数<em id="top-count"></em></i>');
+                  this.blockProgress.find('#top-count').html(topCount);
+                }
+            }
             this.blockProgress.find('#total-count').html(totalCount);
             this.blockProgress.find('#total-count').html(totalCount);
             this.blockProgress.find('#marked-count').html(markedCount);
             this.blockProgress.find('#marked-count').html(markedCount);
             this.blockProgress.find('#todo-count').html(leftCount);
             this.blockProgress.find('#todo-count').html(leftCount);

+ 43 - 0
stmms-web/src/main/webapp/static/mark-track/css/style.css

@@ -368,6 +368,9 @@ i,em {
 
 
 .mark-steps .step-board .sublist .red{ color: #ed5321; font-weight: bold; font-size: 32px; }
 .mark-steps .step-board .sublist .red{ color: #ed5321; font-weight: bold; font-size: 32px; }
 .mark-steps .step-board .sublist .fraction { height: 40px; line-height: 39px; color: #333; display: block; text-align: center; font-family: "微软雅黑"; font-size: 32px; font-weight: normal; margin: 5px 0 5px 0;}
 .mark-steps .step-board .sublist .fraction { height: 40px; line-height: 39px; color: #333; display: block; text-align: center; font-family: "微软雅黑"; font-size: 32px; font-weight: normal; margin: 5px 0 5px 0;}
+
+.mark-steps .step-board .newSubListCss{height: 30px; line-height: 29px; color: #333; display: block;text-align: center; font-family: "微软雅黑"; font-size: 20px; font-weight: normal; margin: 5px 0 5px 0;}
+.mark-steps .step-board .newSubListCss .red{ color: #ed5321; font-weight: bold; font-size: 20px; }
 /*总分板*/
 /*总分板*/
 .mark-steps .step-board .button{ text-align: center; margin-top: 0px; margin-bottom: 10px;}
 .mark-steps .step-board .button{ text-align: center; margin-top: 0px; margin-bottom: 10px;}
 .mark-steps .step-board .btn1{ border: none; height: 40px; width: 97px; background-color: #5d6d7d; border-radius: 15px; color:#FFF; font-size: 20px; font-family: "微软雅黑"; font-weight: bold;}
 .mark-steps .step-board .btn1{ border: none; height: 40px; width: 97px; background-color: #5d6d7d; border-radius: 15px; color:#FFF; font-size: 20px; font-family: "微软雅黑"; font-weight: bold;}
@@ -400,6 +403,17 @@ i,em {
 .mark-steps  .score_board .score ul li.unable{ background-color: #dedede; border: solid 1px #dedede;}
 .mark-steps  .score_board .score ul li.unable{ background-color: #dedede; border: solid 1px #dedede;}
 .mark-steps  .score_board .score ul li.unable p{ color: #999999;}
 .mark-steps  .score_board .score ul li.unable p{ color: #999999;}
 /*打分板普通状态、选中状态和不可选状态*/
 /*打分板普通状态、选中状态和不可选状态*/
+.mark-steps  .picture-list{ height: 80px !important;overflow: auto; border-bottom: solid 1px #BBBBBB;}
+.mark-steps  .picture-list .pictureScore{ margin: 5px; overflow: hidden;}
+.mark-steps  .picture-list .pictureScore ul li{ float: left; height: 30px; width: 50px; border: solid 1px #cccccc; background-color: #FFFFFF; margin: 5px 5px;}
+.mark-steps  .picture-list .pictureScore ul li p{ font-size: 20px; line-height: 30px; color: #999999; text-align: center;}
+.mark-steps  .picture-list .pictureScore ul li a{display: block; font-size: 20px; line-height: 30px; color: #999999; text-align: center;}
+.mark-steps  .picture-list .pictureScore ul li a:hover{ background-color: #ED5321; color: #FFFFFF;}
+.mark-steps  .picture-list .pictureScore ul li.selected{ background-color: #ED5321; border: solid 1px #ED5321;}
+.mark-steps  .picture-list .pictureScore ul li.selected p{ color: #FFFFFF;}
+.mark-steps  .picture-list .pictureScore ul li.unable{ background-color: #dedede; border: solid 1px #dedede;}
+.mark-steps  .picture-list .pictureScore ul li.unable p{ color: #999999;}
+/*轨迹模式下提供“X”、“√”等标记符号   */
 
 
 .mark-steps  .clear_button{text-align: center; margin-top: 0px;}
 .mark-steps  .clear_button{text-align: center; margin-top: 0px;}
 .mark-steps  .clear_button .btn1{ border: none; height: 40px; width: 120px; background-color: #5a7686; color:#FFF; font-size: 20px; font-family: "微软雅黑"; margin: 5px 5px;}
 .mark-steps  .clear_button .btn1{ border: none; height: 40px; width: 120px; background-color: #5a7686; color:#FFF; font-size: 20px; font-family: "微软雅黑"; margin: 5px 5px;}
@@ -1164,4 +1178,33 @@ i,em {
 	font-size: 18px;
 	font-size: 18px;
 	color: #f00;
 	color: #f00;
 	line-height: 30px;
 	line-height: 30px;
+}
+.message-popover .popover-cont .username,.password,.password2 {
+    font-size: 12px;
+    color: #f00;
+    line-height: 30px;
+    padding-left: 20px;
+}
+.message-popover .popover-cont .username-input,.password-input,.password2-input{
+    width: 200px;
+}
+.message-popover .text-userInfo {
+    margin: 0px 0 15px 0;
+    width: 50px;
+    float: right;
+    margin-right: 20px;
+}
+
+.password-input,.password2-input{
+    margin-left: 20px;
+}
+
+.username-input{
+    margin-left: 12px;
+}
+.buttonCss .selected{
+    background-image: -webkit-linear-gradient(top, #eaeaea, #ED5321);
+}
+.buttonCss{
+    border-bottom: 1px solid #b50505;!important;
 }
 }

+ 88 - 53
stmms-web/src/main/webapp/static/mark-track/js/modules/change-name.js

@@ -1,71 +1,106 @@
 //评卷状态模块
 //评卷状态模块
 var change_name = function(option, success) {
 var change_name = function(option, success) {
-    var object = new ChangeName(option);
-    success();
-    return object;
+  var object = new ChangeName(option);
+  success();
+  return object;
 }
 }
 
 
 function ChangeName(option) {
 function ChangeName(option) {
-    this.markControl = option.markControl;
-    this.url = option.url;
-    this.context = option.markControl.context;
-    this.userName = option.markControl.container.header.find('#mark-user-name');
+  this.markControl = option.markControl;
+  this.url = option.url;
+  this.context = option.markControl.context;
+  this.userName = option.markControl.container.header.find('#mark-user-name');
 
 
-    this.popover = getDom(this.popover_dom, this.markControl);
-    this.popover.input = this.popover.find('input.user-input');
-    this.popover.message = this.popover.find('i.wrong');
-    this.popover.submitButton = this.popover.find('a.btn');
-    this.popover.cancelButton = this.popover.find('p.image-close');
-    this.popover.appendTo(this.markControl.container);
+  this.popover = getDom(this.popover_dom, this.markControl);
+  this.popover.userNameInput = this.popover.find('input.username-input');
+  this.popover.passwordInput = this.popover.find('input.password-input');
+  this.popover.password2Input = this.popover.find('input.password2-input');
+  this.popover.userNameMessage = this.popover.find('i.username');
+  this.popover.password2Message = this.popover.find('i.password2');
+  this.popover.submitButton = this.popover.find('a.btn');
+  this.popover.cancelButton = this.popover.find('p.image-close');
+  this.popover.appendTo(this.markControl.container);
 
 
-    var self = this;
+  var self = this;
 
 
-    this.markControl.container.header.find('a.useinfo').click(function() {
-        self.toggle(true);
-    });
-    this.popover.cancelButton.click(function() {
+  this.markControl.container.header.find('a.useinfo').click(function() {
+    self.toggle(true);
+  });
+  this.popover.cancelButton.click(function() {
+    self.toggle(false);
+  });
+  this.popover.submitButton.click(function() {
+    var logout = false;
+    var nameText = self.popover.userNameInput.val();
+    nameText = nameText.replace(/(^\s*)|(\s*$)/g, "");
+    var pwText = self.popover.passwordInput.val();
+    pwText = pwText.replace(/(^\s*)|(\s*$)/g, "");
+    var pw2Text = self.popover.password2Input.val();
+    pw2Text = pw2Text.replace(/(^\s*)|(\s*$)/g, "");
+    if (nameText.length == 0) {
+      self.popover.userNameMessage.html('姓名不能为空');
+      return false;
+    } else if (nameText.length > 8) {
+      self.popover.userNameMessage.html('长度不能超过8个字');
+      return false;
+    }
+    if(pwText.length > 0 || pw2Text.length > 0) {
+      logout = true;
+      if (!pw2Text) {
+        self.popover.password2Message.html('请再次输入您的密码');
+        return false;
+      }
+      if (pwText != pw2Text) {
+        self.popover.password2Message.html('两次密码请保持一致');
+        return false;
+      }
+      if(pw2Text.length < 4){
+        self.popover.password2Message.html('密码的长度至少4位');
+        return false;
+      }
+    }
+    $.post(self.url, {
+      name: nameText,
+      password:pwText
+    }, function(result) {
+      if (result.success == true) {
+        self.userName.html(result.name);
         self.toggle(false);
         self.toggle(false);
-    });
-    this.popover.submitButton.click(function() {
-        var text = self.popover.input.val();
-        if (text.length == 0) {
-            self.popover.message.html('姓名不能为空');
-        } else if (text.length > 8) {
-            self.popover.message.html('长度不能超过8个字');
-        } else {
-            $.post(self.url, {
-                name: text
-            }, function(result) {
-                if (result.success == true) {
-                    self.userName.html(result.name);
-                    self.toggle(false);
-                } else {
-                    self.popover.message.html('姓名修改失败,请稍后重试');
-                }
-            }).error(function() {
-                self.popover.message.html('网络通信错误,请稍后重试');
-            });
+        if(logout){//修改密码后请重新登陆
+          window.location.href = '/mark/logout';
         }
         }
+      } else {
+        self.popover.userNameMessage.html('修改失败,请稍后重试');
+      }
+    }).error(function() {
+      self.popover.userNameMessage.html('网络通信错误,请稍后重试');
     });
     });
+  });
 }
 }
 
 
 ChangeName.prototype.toggle = function(enable) {
 ChangeName.prototype.toggle = function(enable) {
-    if (enable == true) {
-        this.enable = true;
-        this.popover.input.val('');
-        this.popover.message.html('');
-        this.popover.show();
-        this.context.listenKeyboard = false;
-    } else {
-        this.enable = false;
-        this.popover.hide();
-        this.context.listenKeyboard = true;
-    }
+  if (enable == true) {
+    this.enable = true;
+    this.popover.userNameInput.val(this.userName.html());
+    this.popover.passwordInput.val('');
+    this.popover.userNameMessage.html('');
+    this.popover.password2Message.html('');
+    this.popover.show();
+    this.context.listenKeyboard = false;
+  } else {
+    this.enable = false;
+    this.popover.hide();
+    this.context.listenKeyboard = true;
+  }
 }
 }
 
 
 ChangeName.prototype.popover_dom = '<div class="message-popover" style="display:none"><div class="popover-header">\
 ChangeName.prototype.popover_dom = '<div class="message-popover" style="display:none"><div class="popover-header">\
-<p class="title">评卷员更名</p><p class="image-close"><img src="{staticServer}/mark-new/images/images-close.png" /></p></div>\
-<div class="popover-cont"><input type="text" class="user-input" placeholder="请输入您的姓名" />\
-<i class="wrong"></i></div>\
-<a href="#" class="btn btn-large btn-info text-c">确定</a>\
+<p class="title">修改个人信息</p><p class="image-close"><img src="{staticServer}/mark-new/images/images-close.png" /></p></div>\
+<div class="popover-cont"><span style="color: red;">*</span><input type="text" class="username-input" placeholder="请输入您的姓名" />\
+<i class="wrong username"></i></div>\
+<div class="popover-cont"><input type="password" class="password-input" placeholder="请输入新的密码" />\
+ <i class="wrong password"></i></div>\
+ <div class="popover-cont"><input type="password" class="password2-input" placeholder="请再次输入您的密码" /> \
+ <i class="wrong password2"></i></div>\
+<a href="#" class="btn btn-small btn-info text-userInfo">确定</a>\
 </div>';
 </div>';

+ 8 - 2
stmms-web/src/main/webapp/static/mark-track/js/modules/mark-status.js

@@ -24,7 +24,7 @@ function MarkStatus(option) {
         } else {
         } else {
             this.objectiveArea.hide();
             this.objectiveArea.hide();
         }
         }
-        //this.checkTopCount(task);
+        this.checkTopCount(task);
     });
     });
     this.markControl.on('task.get.none', this, function(event, context, status) {
     this.markControl.on('task.get.none', this, function(event, context, status) {
         this.topStatus.find('#stage-name').html('');
         this.topStatus.find('#stage-name').html('');
@@ -85,7 +85,7 @@ MarkStatus.prototype.checkTopCount = function(task) {
 
 
 MarkStatus.prototype.render = function(status) {
 MarkStatus.prototype.render = function(status) {
     if (status != undefined && status.valid === true) {
     if (status != undefined && status.valid === true) {
-        //var topCount = status.topCount;
+        var topCount = status.topCount;
         this.topStatus.find('#mark-count').html(status.personCount);
         this.topStatus.find('#mark-count').html(status.personCount);
 
 
         //大题进度信息区域
         //大题进度信息区域
@@ -100,6 +100,12 @@ MarkStatus.prototype.render = function(status) {
             } else if (markedPercent == '0' && markedCount > 0) {
             } else if (markedPercent == '0' && markedCount > 0) {
                 markedPercent = '1';
                 markedPercent = '1';
             }
             }
+            if(topCount > 0){
+                if(this.blockProgress.find('#top-count').length == 0){
+                  this.blockProgress.find('#todo-count').after('<i>任务数<em id="top-count"></em></i>');
+                  this.blockProgress.find('#top-count').html(topCount);
+                }
+            }
             this.blockProgress.find('#total-count').html(totalCount);
             this.blockProgress.find('#total-count').html(totalCount);
             this.blockProgress.find('#marked-count').html(markedCount);
             this.blockProgress.find('#marked-count').html(markedCount);
             this.blockProgress.find('#todo-count').html(leftCount);
             this.blockProgress.find('#todo-count').html(leftCount);