Fruit of Eden преди 6 години
родител
ревизия
d551f6463a
променени са 2 файла, в които са добавени 9 реда и са изтрити 9 реда
  1. 7 7
      js/basic.js
  2. 2 2
      js/common.js

+ 7 - 7
js/basic.js

@@ -285,23 +285,23 @@ function on_secname_retn(obj, sta) {
 }
 
 function getSectorId(spotId){
-    var secName = null;
+    var secId = null;
     Sectors.list.forEach(function(val, aid, arr){
         if(val.sector.spotId === spotId){
-            secName = val.sector.sectorName;
+            secId = val.sector.sectorId;
         }
     });
-    if(secName == null) {
+    if(secId == null) {
         get_data("fcSectorSpot/list?spotId=" + spotId, on_secid_retn);
-        return "[工位:"+sectorId+"]";
+        return -1;
     }else{
-        return secName;
+        return secId;
     }
 }
 
 function on_secid_retn(obj, sta) {
-    var secid = this.url.substring(this.url.indexOf("sectorId=") + 9);
-    let rsecid = parseInt(secid);
+    var spotId = this.url.substring(this.url.indexOf("spotId=") + 7);
+    let rsecid = parseInt(spotId);
     var out = first_parse(this, obj);
     if(out.list.length > 0){
         Sectors.list.push({

+ 2 - 2
js/common.js

@@ -179,7 +179,7 @@ function getSpotHtml1(htmlbody, i) {
 function getSpotHtml2(htmlbody, i) {
     if(typeof badid[i] === "undefined"){
         htmlbody += "<tr>";
-        htmlbody += `<tr style="background-color: ${badColor[i]}">
+        htmlbody += `<tr>
                     <td> - </td>
                     <td> - </td>
                     <td> - </td>
@@ -188,7 +188,7 @@ function getSpotHtml2(htmlbody, i) {
         return htmlbody;
     }
     htmlbody += "<tr>";
-    htmlbody += `<tr>
+    htmlbody += `<tr style="background-color: ${badColor[i]}">
                     <td>${badid[i]}</td>
                     <td>${badpass[i]}</td>
                     <td>${badfailrate[i] + '%'}</td>