瀏覽代碼

修改仲裁批量处理回评失效问题

luoshi 6 年之前
父節點
當前提交
287c314ba8

+ 1 - 1
stmms-web/src/main/webapp/WEB-INF/views/modules/exam/arbitrateBatchProcess.jsp

@@ -79,7 +79,7 @@
 				mode : 'loop',
 				statusUrl : '${ctx}/admin/exam/arbitrate/status?subjectCode=${group.subjectCode}&groupNumber=${group.number}',
 				getUrl : '${ctx}/admin/exam/arbitrate/getTask?subjectCode=${group.subjectCode}&groupNumber=${group.number}',
-				historyUrl : '${ctx}/subjectheader/arbitrate/history/${group.subjectCode}/${group.number}',
+				historyUrl : '${ctx}/admin/exam/arbitrate/history/${group.subjectCode}/${group.number}',
 				submitUrl : '${ctx}/admin/exam/arbitrate/saveTask',
 				clearUrl : '${ctx}/admin/exam/arbitrate/clear'
 			});

+ 22 - 19
stmms-web/src/main/webapp/static/mark-new/js/modules/arbitration-process.js

@@ -13,30 +13,15 @@ function ArbitrationProcess(option) {
     this.markControl.on('task.get.none', this, function(event, context, data) {
         this.container.list.empty();
         this.markControl.trigger('mark.sidebar.close');
-        this.container.addClass('hide');
+        this.container.hide();
     });
     this.markControl.on('task.get.success', this, function(event, context, data) {
         if (context.task.previous != true) {
-            var historyList = context.task.arbitrationList;
-            this.container.list.empty();
-            if (isArray(historyList) && historyList.length > 0) {
-                for (var i in historyList) {
-                    var history = historyList[i];
-                    var row = getDom(this.history_row_dom, this.markControl).appendTo(this.container.list);
-                    row.find('.history-name').html(history.markerName);
-
-                    var date = new Date();
-                    date.setTime(history.markTime);
-                    row.find('.history-time').html(date.format('hh:mm:ss'));
-                    row.find('.history-score').html(history.totalScore);
-                }
-            }
-            this.markControl.trigger('mark.sidebar.open');
-            this.container.removeClass('hide');
+            this.render(context.task)
         }
     });
-    this.markControl.on('mark.history.open', this, function(event, context, data) {
-        this.container.addClass('hide');
+    this.markControl.on('mark.history.close', this, function(event, context, data) {
+        this.init();
     });
 }
 
@@ -47,6 +32,24 @@ ArbitrationProcess.prototype.init = function() {
     this.container.list = getDom(this.history_list_dom, this.markControl).appendTo(this.container).find('#history-list');
 }
 
+ArbitrationProcess.prototype.render = function(task) {
+    var historyList = task.arbitrationList;
+    this.container.list.empty();
+    if (isArray(historyList) && historyList.length > 0) {
+		for (var i in historyList) {
+			var history = historyList[i];
+            var row = getDom(this.history_row_dom, this.markControl).appendTo(this.container.list);
+            row.find('.history-name').html(history.markerName);
+
+            var date = new Date();
+            date.setTime(history.markTime);
+            row.find('.history-time').html(date.format('hh:mm:ss'));
+            row.find('.history-score').html(history.totalScore);
+    	}
+    }
+	this.markControl.trigger('mark.sidebar.open');
+	this.container.show();
+}
 
 ArbitrationProcess.prototype.header_dom = '<div class="header">\
 <p class="fl">给分记录</p></div>';