Browse Source

普通模式下回评给分修复为清空之前的轨迹;修复轨迹模式下回评全零分给分板问题

ting.yin 5 years ago
parent
commit
c0347d4a65

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

@@ -582,7 +582,7 @@ MarkControl.prototype.submitTask = function(submitUrl) {
         task.markTime = undefined;
         var timestamp = new Date().getTime();
         task.spent = timestamp - task.spent;
-        	
+        task.trackList = [];	
         this.trigger('task.submit.before');
         
         if (this.taskControl != undefined) {

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

@@ -24,6 +24,9 @@ function MarkBoard(option) {
     this.markControl.on('task.load.finish', this, function(event, context, eventObject) {
         this.initByTask(context.task);
     });
+    this.markControl.on('history.submit.success', this, function(event, context, eventObject) {
+        this.initByTask(context.task);
+    });
     this.markControl.on('mark.focus.change', this, function(event, context, eventObject) {
     	this.onFocusChange();
     });
@@ -420,6 +423,9 @@ MarkBoard.prototype.allZeroSubmit = function() {
         for (var i in this.stepList) {
             this.stepList[i].markScore = 0;
         }
+        for (var i in this.task.markStepList) {
+        	this.task.markStepList[i].markScore = 0;
+        }
         this.onTaskSubmit();
     }
 }

+ 7 - 0
stmms-web/src/main/webapp/static/mark-track/js/modules/mark-board.js

@@ -27,6 +27,9 @@ function MarkBoard(option) {
 	this.markControl.on('task.load.finish', this, function(event, context, eventObject) {
 		this.initByTask(context.task);
 	});
+    this.markControl.on('history.submit.success', this, function(event, context, eventObject) {
+        this.initByTask(context.task);
+    });
 	this.markControl.on('special.tag.enable', this, function(event, context, eventObject) {
 		this.specialTag=true;
 	});
@@ -435,6 +438,10 @@ MarkBoard.prototype.allZeroSubmit = function() {
 			    positionY: 0
 			});
 		}
+		for (var i in this.task.markStepList) {
+        	this.task.markStepList[i].markScore = 0;
+        	this.task.markStepList[i].trackList = [];
+        }
 		this.onTaskSubmit();
 	}
 }