manto07m vor 3 Jahren
Ursprung
Commit
06e5608cf7
1 geänderte Dateien mit 1 neuen und 36 gelöschten Zeilen
  1. 1 36
      script/js/r03.js

+ 1 - 36
script/js/r03.js

@@ -61,29 +61,10 @@ function GetWellNameList(wellNameList) {
     window.localStorage.setItem("wellNameList", wellNameList);
 }
 
-//display well name and send its name to showWell function
-function getEquipmentName(equipment) {
-    $.ajaxSettings.async = false;
-    $.ajax({
-        url: '/BIM-Monitor/script/php/getEquipmentName.php',
-        type: "GET",
-        data: {
-            equipment: equipment,
-        }
-    }).success(function (data) {
-        GetWellNameList(data);
-    }).error(function (error) {
-        console.log("錯誤");
-    });
-    $.ajaxSettings.async = true;
-}
-
 //unity載入後會先跑LoadPage();
 function LoadPage() {
 
     var option = window.localStorage.getItem("option");
-    getEquipmentName(option);
-
     $('#' + window.localStorage.getItem("option")).removeClass('hidden').removeAttr('disabled');
 
     document.getElementById("monitorSelect2").innerHTML = "選擇觀測儀器";
@@ -113,23 +94,7 @@ function LoadPage() {
     var wellNameList = window.localStorage.getItem("wellNameList");
     var wellNameListsLocal = wellNameList.split(",");
 
-    var order = new Array(wellNameListsLocal.length);
-    for (i = 0; i < wellNameListsLocal.length; i++) {
-        order[i] = wellNameListsLocal[i].match(/\d+/g);
-    }
-    for (i = 0; i < order.length; i++) {
-        for (j = 0; j < order.length; j++) {
-            if (order[j] > order[j + 1]) {
-                let temp = order[j];
-                order[j] = order[j + 1];
-                order[j + 1] = temp;
-                let temp2 = wellNameListsLocal[j];
-                wellNameListsLocal[j] = wellNameListsLocal[j + 1];
-                wellNameListsLocal[j + 1] = temp2;
-            }
-        }
-    }
-    wellNameLists = wellNameListsLocal;
+    wellNameLists = wellNameListsLocal.sort();
     wellTBA = wellTBALocal;
 
     SetList();