1
0
Просмотр исходного кода

Merge remote-tracking branch 'origin/stmms_ft_dev' into test_20181225

ting.yin 6 лет назад
Родитель
Сommit
cc9eb9eaa2

+ 1 - 1
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/mark/dao/MarkLibraryDao.java

@@ -59,7 +59,7 @@ public interface MarkLibraryDao extends JpaRepository<MarkLibrary, Integer>, Jpa
             LibraryStatus status);
 
     @Modifying(clearAutomatically = true)
-    @Query("update MarkLibrary m set m.status=?2, m.tags=null, m.markerId=null, m.markerTime=null, m.markerScore=null, m.markerScoreList=null where m.markerId=?1 and m.headerId==null ")
+    @Query("update MarkLibrary m set m.status=?2, m.tags=null, m.markerId=null, m.markerTime=null, m.markerScore=null, m.markerScoreList=null where m.markerId=?1 and m.headerId=null ")
     void resetByMarkerId(Integer markerId, LibraryStatus status);
 
     @Modifying(clearAutomatically = true)

+ 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>';