Selaa lähdekoodia

给分板小数相减问题

ting.yin 4 vuotta sitten
vanhempi
commit
43fffbaf51

+ 2 - 2
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/common/BaseQuery.java

@@ -261,10 +261,10 @@ public class BaseQuery<T> implements Pageable {
         sb.append("<li class=\"disabled controls\"><a href=\"javascript:\">当前 ");
         sb.append("<input type=\"text\" value=\"" + pageNumber
                 + "\" onkeypress=\"var e=window.event||this;var c=e.keyCode||e.which;if(c==13)");
-        sb.append(funcName + "(this.value," + pageSize + ");\" onclick=\"this.select();\"/> / ");
+        sb.append(funcName + "(this.value," + pageSize + ");\" onclick=\"this.select();\"/> / ");
         sb.append("<input type=\"text\" value=\"" + pageSize
                 + "\" onkeypress=\"var e=window.event||this;var c=e.keyCode||e.which;if(c==13)");
-        sb.append(funcName + "(" + pageNumber + ",this.value);\" onclick=\"this.select();\"/> ,");
+        sb.append(funcName + "(" + pageNumber + ",this.value);\" onclick=\"this.select();\"/> ,");
         sb.append("共 " + totalCount + " 条" + (message != null ? message : "") + "</a><li>\n");
 
         sb.insert(0, "<ul>\n").append("</ul>\n");

+ 4 - 0
stmms-web/src/main/webapp/static/mark-track/js/mark-control.js

@@ -708,6 +708,10 @@ function numberAdd(n1, n2) {
     return (n1 * 10 + n2 * 10) / 10;
 }
 
+function numberMinus(n1, n2) {
+    return (n1 * 10 - n2 * 10) / 10;
+}
+
 function getDom(content, markControl) {
     if (markControl != undefined && markControl.option.staticServer != undefined) {
         content = content.replace(/{staticServer}/g, markControl.option.staticServer);

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

@@ -404,7 +404,7 @@ MarkBoard.prototype.updateStepScore = function (step) {
         }
         totalScore = numberAdd(totalScore,step.trackList[i].score);
     }
-    var leftScore = totalScore != undefined ? (step.max - totalScore) : step.max;
+    var leftScore = totalScore != undefined ? numberMinus(step.max , totalScore) : step.max;
     for (var i = 0; i < step.scoreArray.length; i++) {
         var dom = step.scoreArray[i];
         dom.removeClass('selected');