Răsfoiți Sursa

云阅卷评卷员可以自行修改密码

nikang 7 ani în urmă
părinte
comite
2f9336afbd

+ 4 - 1
stmms-web/src/main/java/cn/com/qmth/stmms/mark/MarkController.java

@@ -297,10 +297,13 @@ public class MarkController extends BaseController {
 
     @RequestMapping("/change-name")
     @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();
         JSONObject result = new JSONObject();
         marker.setName(name);
+        if(StringUtils.isNotEmpty(password)){
+            marker.setPassword(password);
+        }
         marker = markerService.save(marker);
         result.accumulate("success", marker != null);
         if (marker != null) {

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

@@ -18,23 +18,23 @@ textarea
 {
 margin
 :
- 
+
 0;
 padding
 :
- 
+
 0;
 font-size
 :
- 
+
 14
 px
 ;
 
-    
+
 outline
 :
- 
+
 none
 ;
 
@@ -363,6 +363,8 @@ 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 .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;}*/
 .mark-steps .step-board .step-list .done {
@@ -1132,13 +1134,29 @@ i,em {
 	border-radius: 0px;
 	overflow: hidden;
 }
-
 .wrong {
-	font-size: 18px;
+	font-size: 12px;
 	color: #f00;
 	line-height: 30px;
+    padding-left: 20px;
 }
 
 a.button.all-zero-button {
 	margin-right: 20px;
 }
+
+.message-popover .text-userInfo {
+    margin: 0px 0 15px 0;
+    width: 50px;
+    float: right;
+    margin-right: 20px;
+}
+
+.passWord-input{
+    margin-left: 20px;
+}
+
+.userName-input{
+    margin-left: 12px;
+}
+

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

@@ -12,8 +12,9 @@ function ChangeName(option) {
     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.userNameInput = this.popover.find('input.userName-input');
+    this.popover.passWordInput = this.popover.find('input.passWord-input');
+    this.popover.userNameMessage = this.popover.find('i.userName');
     this.popover.submitButton = this.popover.find('a.btn');
     this.popover.cancelButton = this.popover.find('p.image-close');
     this.popover.appendTo(this.markControl.container);
@@ -27,23 +28,27 @@ function ChangeName(option) {
         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个字');
+        var nameText = self.popover.userNameInput.val();
+            nameText = nameText.replace(/(^\s*)|(\s*$)/g, "");
+        var pwText = self.popover.passWordInput.val();
+            pwText = pwText.replace(/(^\s*)|(\s*$)/g, "");
+        if (nameText.length == 0) {
+            self.popover.userNameMessage.html('姓名不能为空');
+        } else if (nameText.length > 8) {
+            self.popover.userNameMessage.html('长度不能超过8个字');
         } else {
             $.post(self.url, {
-                name: text
+                name: nameText,
+                password:pwText
             }, function(result) {
                 if (result.success == true) {
                     self.userName.html(result.name);
                     self.toggle(false);
                 } else {
-                    self.popover.message.html('姓名修改失败,请稍后重试');
+                    self.popover.userNameMessage.html('修改失败,请稍后重试');
                 }
             }).error(function() {
-                self.popover.message.html('网络通信错误,请稍后重试');
+                self.popover.userNameMessage.html('网络通信错误,请稍后重试');
             });
         }
     });
@@ -52,8 +57,9 @@ function ChangeName(option) {
 ChangeName.prototype.toggle = function(enable) {
     if (enable == true) {
         this.enable = true;
-        this.popover.input.val('');
-        this.popover.message.html('');
+        this.popover.userNameInput.val('');
+        this.popover.passWordInput.val('');
+        this.popover.userNameMessage.html('');
         this.popover.show();
         this.context.listenKeyboard = false;
     } else {
@@ -64,8 +70,10 @@ ChangeName.prototype.toggle = function(enable) {
 }
 
 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="text" class="passWord-input" placeholder="请输入新的密码" />\
+ <i class="wrong passWord"></i></div>\
+<a href="#" class="btn btn-small btn-info text-userInfo">确定</a>\
 </div>';

+ 32 - 2
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 .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 .btn1{ border: none; height: 40px; width: 97px; background-color: #5d6d7d; border-radius: 15px; color:#FFF; font-size: 20px; font-family: "微软雅黑"; font-weight: bold;}
@@ -401,6 +404,18 @@ i,em {
 .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 .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:hover{ background-color: #ed5321;}
@@ -1161,7 +1176,22 @@ i,em {
 }
 
 .wrong {
-	font-size: 18px;
+	font-size: 12px;
 	color: #f00;
 	line-height: 30px;
-}
+	padding-left: 20px;
+}
+.message-popover .text-userInfo {
+	margin: 0px 0 15px 0;
+	width: 50px;
+	float: right;
+	margin-right: 20px;
+}
+
+.passWord-input{
+	margin-left: 20px;
+}
+
+.userName-input{
+	margin-left: 12px;
+}

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

@@ -12,8 +12,9 @@ function ChangeName(option) {
     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.userNameInput = this.popover.find('input.userName-input');
+    this.popover.passWordInput = this.popover.find('input.passWord-input');
+    this.popover.userNameMessage = this.popover.find('i.userName');
     this.popover.submitButton = this.popover.find('a.btn');
     this.popover.cancelButton = this.popover.find('p.image-close');
     this.popover.appendTo(this.markControl.container);
@@ -27,23 +28,27 @@ function ChangeName(option) {
         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个字');
+          var nameText = self.popover.userNameInput.val();
+          nameText = nameText.replace(/(^\s*)|(\s*$)/g, "");
+          var pwText = self.popover.passWordInput.val();
+          pwText = pwText.replace(/(^\s*)|(\s*$)/g, "");
+        if (nameText.length == 0) {
+            self.popover.userNameMessage.html('姓名不能为空');
+        } else if (nameText.length > 8) {
+            self.popover.userNameMessage.html('长度不能超过8个字');
         } else {
             $.post(self.url, {
-                name: text
+              name: nameText,
+              password:pwText
             }, function(result) {
                 if (result.success == true) {
                     self.userName.html(result.name);
                     self.toggle(false);
                 } else {
-                    self.popover.message.html('姓名修改失败,请稍后重试');
+                    self.popover.userNameMessage.html('修改失败,请稍后重试');
                 }
             }).error(function() {
-                self.popover.message.html('网络通信错误,请稍后重试');
+                self.popover.userNameMessage.html('网络通信错误,请稍后重试');
             });
         }
     });
@@ -52,8 +57,9 @@ function ChangeName(option) {
 ChangeName.prototype.toggle = function(enable) {
     if (enable == true) {
         this.enable = true;
-        this.popover.input.val('');
-        this.popover.message.html('');
+        this.popover.userNameInput.val('');
+        this.popover.passWordInput.val('');
+        this.popover.userNameMessage.html('');
         this.popover.show();
         this.context.listenKeyboard = false;
     } else {
@@ -64,8 +70,10 @@ ChangeName.prototype.toggle = function(enable) {
 }
 
 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="text" class="passWord-input" placeholder="请输入新的密码" />\
+ <i class="wrong passWord"></i></div>\
+<a href="#" class="btn btn-small btn-info text-userInfo">确定</a>\
 </div>';