|
@@ -146,7 +146,7 @@
|
|
|
} else {
|
|
|
mapid = localStorage.getItem("mapid")
|
|
|
}
|
|
|
- IDARR = localStorage.getItem(mapid+agvid+"_id_arr");
|
|
|
+ //IDARR = localStorage.getItem(mapid+agvid+"_id_arr");
|
|
|
//获取按钮
|
|
|
createList();
|
|
|
//获取状态
|
|
@@ -184,20 +184,20 @@
|
|
|
}
|
|
|
});
|
|
|
//设置拖拽排序
|
|
|
- Sortable.create(document.getElementById('btlist'), {
|
|
|
- animation: 150, //动画参数
|
|
|
- // dropBubble:true,
|
|
|
- onUpdate: function(evt){ //拖拽完毕之后发生该事件
|
|
|
- var id_arr=[]
|
|
|
- for(var i=0, len=evt.from.children.length; i<len; i++){
|
|
|
- id_arr+=','+ evt.from.children[i].getAttribute('drag-id');
|
|
|
- }
|
|
|
- id_arr=id_arr.substr(1);
|
|
|
- //然后请求后台ajax 这样就完成了拖拽排序
|
|
|
- id_arr = id_arr.split(','); //["1", "4", "3", "2", "1", "11", "12"]
|
|
|
- localStorage.setItem(mapid+agvid+'_id_arr',JSON.stringify(id_arr));
|
|
|
- }
|
|
|
- });
|
|
|
+ // Sortable.create(document.getElementById('btlist'), {
|
|
|
+ // animation: 150, //动画参数
|
|
|
+ // // dropBubble:true,
|
|
|
+ // onUpdate: function(evt){ //拖拽完毕之后发生该事件
|
|
|
+ // var id_arr=[]
|
|
|
+ // for(var i=0, len=evt.from.children.length; i<len; i++){
|
|
|
+ // id_arr+=','+ evt.from.children[i].getAttribute('drag-id');
|
|
|
+ // }
|
|
|
+ // id_arr=id_arr.substr(1);
|
|
|
+ // //然后请求后台ajax 这样就完成了拖拽排序
|
|
|
+ // id_arr = id_arr.split(','); //["1", "4", "3", "2", "1", "11", "12"]
|
|
|
+ // localStorage.setItem(mapid+agvid+'_id_arr',JSON.stringify(id_arr));
|
|
|
+ // }
|
|
|
+ // });
|
|
|
})
|
|
|
//按钮点击事件
|
|
|
function onSelectStation(evt) {
|
|
@@ -292,6 +292,7 @@
|
|
|
function createList() {
|
|
|
$.get(url + "/map/getStations/" + mapid, function(data) {
|
|
|
trs = "";
|
|
|
+ var IDARR = ["100","101","102","103","104","105","106","107"]
|
|
|
if(IDARR == "" ||IDARR == null){
|
|
|
for (i in data) {
|
|
|
if (data[i].Name != "" && data[i].Name != "rect") {
|
|
@@ -303,7 +304,8 @@
|
|
|
}
|
|
|
}
|
|
|
}else{
|
|
|
- id_arr = JSON.parse(IDARR);//["4","5","2","999","7","1","6","8","3"]
|
|
|
+ //id_arr = JSON.parse(IDARR);//["4","5","2","999","7","1","6","8","3"]
|
|
|
+ id_arr = IDARR;
|
|
|
for(x in id_arr){
|
|
|
for (i in data) {
|
|
|
if((data[i].Id == id_arr[x]) && (data[i].Name !="") && (data[i].Name != "rect")){
|