|
@@ -54,57 +54,59 @@
|
|
<div class="mui-row">
|
|
<div class="mui-row">
|
|
<div class="mui-col mui-col-xs-12">
|
|
<div class="mui-col mui-col-xs-12">
|
|
<span id="agvstatus" style="position: fixed;">·</span>
|
|
<span id="agvstatus" style="position: fixed;">·</span>
|
|
- <div id="title" style="text-align: center;padding-bottom: 5px;background: url(img/title_bg.png) no-repeat 0 7px;background-size:100%;">
|
|
|
|
|
|
+ <div id="title" style="text-align: center;padding-bottom: 2px;background: url(img/title_bg.png) no-repeat 0 7px;background-size:100%;">
|
|
<a style="color: #FFFFFF;font-size: 20px;">华力西曼克</a>
|
|
<a style="color: #FFFFFF;font-size: 20px;">华力西曼克</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="mui-col mui-col-xs-12" style="height: 245px;text-align: center;background: url(img/top_bg.png) no-repeat 0 0;background-size:100%;">
|
|
|
|
- <div class="mui-col mui-col-xs-12" style="padding-top: 10px;height: 30px;">
|
|
|
|
- <div style=" width: 50%;float: left;">
|
|
|
|
- <img id="speed" src="" style="margin-left: -80px;width: 13%;">
|
|
|
|
- </div>
|
|
|
|
- <div style=" width: 50%;float: left;">
|
|
|
|
- <img id="battery" src="img/battery-100.png" style="margin-right: -80px;width: 23%;">
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <div class="mui-col mui-col-xs-12">
|
|
|
|
- <div id="tgts" style="width: 120px;height:90px;border-radius: 12px;border: 2px solid #298890;float: left;margin-left: 23px;">
|
|
|
|
- <div style="margin-left: -60px;margin-top: 15px;">
|
|
|
|
- <a style="color: #FFFFFF;font-size: 18px;">目标</a><br>
|
|
|
|
|
|
+ <div class="mui-col mui-col-xs-12" id="btt" style="min-height:480px;overflow-y:auto;max-height:480px">
|
|
|
|
+ <div class="mui-col mui-col-xs-12" style="height: 235px;text-align: center;background: url(img/top_bg2.png) no-repeat 0 0;background-size:100%;">
|
|
|
|
+ <div class="mui-col mui-col-xs-12" style="padding-top: 10px;height: 30px;">
|
|
|
|
+ <div style=" width: 50%;float: left;">
|
|
|
|
+ <img id="speed" src="" style="margin-left: -80px;width: 13%;">
|
|
</div>
|
|
</div>
|
|
- <div style="margin-left: -60px;margin-top: 10px;">
|
|
|
|
- <a style="color: #FFFFFF;font-size: 18px;">站点</a><br>
|
|
|
|
- </div>
|
|
|
|
- <div style="margin-left: 40px;margin-top: -35px;">
|
|
|
|
- <a id="tgtstation" style="color: #FFFFFF;font-size: 50px;"></a><br>
|
|
|
|
|
|
+ <div style=" width: 50%;float: left;">
|
|
|
|
+ <img id="battery" src="img/battery-100.png" style="margin-right: -80px;width: 23%;">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div id="jack" style="width: 120px;height:90px;border-radius: 12px;border: 2px solid #298890;float: right;margin-right: 20px;">
|
|
|
|
- <div style="margin-left: -60px;margin-top: 15px;">
|
|
|
|
- <a style="color: #FFFFFF;font-size: 18px;">顶升</a><br>
|
|
|
|
- </div>
|
|
|
|
- <div style="margin-left: -60px;margin-top: 10px;">
|
|
|
|
- <a style="color: #FFFFFF;font-size: 18px;">状态</a><br>
|
|
|
|
|
|
+ <div class="mui-col mui-col-xs-12" style="margin-top: -5px;">
|
|
|
|
+ <div id="tgts" style="width: 120px;height:90px;border-radius: 12px;border: 2px solid #298890;float: left;margin-left: 23px;">
|
|
|
|
+ <div style="margin-left: -60px;margin-top: 15px;">
|
|
|
|
+ <a style="color: #FFFFFF;font-size: 18px;">目标</a><br>
|
|
|
|
+ </div>
|
|
|
|
+ <div style="margin-left: -60px;margin-top: 10px;">
|
|
|
|
+ <a style="color: #FFFFFF;font-size: 18px;">站点</a><br>
|
|
|
|
+ </div>
|
|
|
|
+ <div style="margin-left: 40px;margin-top: -35px;">
|
|
|
|
+ <a id="tgtstation" style="color: #FFFFFF;font-size: 50px;"></a><br>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
- <div style="margin-left: 50px;margin-top: -53px;">
|
|
|
|
- <img id="liftstatus" src="img/liftstatus.png" width="60%">
|
|
|
|
|
|
+ <div id="jack" style="width: 120px;height:90px;border-radius: 12px;border: 2px solid #298890;float: right;margin-right: 20px;">
|
|
|
|
+ <div style="margin-left: -60px;margin-top: 15px;">
|
|
|
|
+ <a style="color: #FFFFFF;font-size: 18px;">顶升</a><br>
|
|
|
|
+ </div>
|
|
|
|
+ <div style="margin-left: -60px;margin-top: 10px;">
|
|
|
|
+ <a style="color: #FFFFFF;font-size: 18px;">状态</a><br>
|
|
|
|
+ </div>
|
|
|
|
+ <div style="margin-left: 50px;margin-top: -53px;">
|
|
|
|
+ <img id="liftstatus" src="img/liftstatus.png" width="60%">
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <div class="mui-col mui-col-xs-12" style="height: 40px;padding-left: 15px;margin-top: -5px;">
|
|
|
|
+ <div id="stop" style="width: 30%;height: 40px;line-height:40px;float: left;margin-left: 5px;background: url(img/btn4_bg.png);color: #FFFFFF;text-align: center;">停止</div>
|
|
|
|
+ <div id="run" style="width: 30%;height: 40px;line-height:40px;float: left;margin-left: 5px;background: url(img/btn4_bg.png);color: #FFFFFF;text-align: center;">运行</div>
|
|
|
|
+ <div id="warning" style="width: 30%;height: 40px;line-height:40px;float: left;margin-left: 5px;background: url(img/btn4_bg.png);color: #FFFFFF;text-align: center;">注意</div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="mui-col mui-col-xs-12">
|
|
|
|
+ <div id="info" style="width: 89%;height: 35px;margin-left: 19px;color:#fff;font-size:15px;line-height: 30px;background-color: #0b6d78;border-radius: 3px;text-align: center;padding-left: 5px;"></div>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
- <div class="mui-col mui-col-xs-12" style="height: 40px;padding-left: 15px;">
|
|
|
|
- <div id="stop" style="width: 30%;height: 40px;line-height:40px;float: left;margin-left: 5px;background: url(img/btn4_bg.png);color: #FFFFFF;text-align: center;">停止</div>
|
|
|
|
- <div id="run" style="width: 30%;height: 40px;line-height:40px;float: left;margin-left: 5px;background: url(img/btn4_bg.png);color: #FFFFFF;text-align: center;">运行</div>
|
|
|
|
- <div id="warning" style="width: 30%;height: 40px;line-height:40px;float: left;margin-left: 5px;background: url(img/btn4_bg.png);color: #FFFFFF;text-align: center;">注意</div>
|
|
|
|
- </div>
|
|
|
|
- <div class="mui-col mui-col-xs-12">
|
|
|
|
- <div id="info" style="width: 89%;height: 35px;margin-left: 19px;color:#fff;font-size:15px;line-height: 30px;background-color: #0b6d78;border-radius: 3px;text-align: center;padding-left: 5px;"></div>
|
|
|
|
|
|
+ <div class="mui-col mui-col-xs-12" style="margin-top: -5px;">
|
|
|
|
+ <div id="btlist" style="padding-left: 15px;height:190px">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="mui-col mui-col-xs-12" style="background: url(img/btlist6_bg.png) no-repeat 10px 0;margin-top: 5px;">
|
|
|
|
- <div id="btlist" style="padding:5px 0 0 15px;min-height:190px;overflow-y:auto;max-height:190px">
|
|
|
|
- </div>
|
|
|
|
</div>
|
|
</div>
|
|
- <div class="mui-col mui-col-xs-12" style="text-align: center;margin: 22px 0 0 0;">
|
|
|
|
|
|
+ <div class="mui-col mui-col-xs-12" style="text-align:center;margin-top: 10px;">
|
|
<div class="mui-col mui-col-xs-3" id="gomoving">
|
|
<div class="mui-col mui-col-xs-3" id="gomoving">
|
|
<button type="button" class="mui-btn mui-btn-royal mui-btn-block operation" id="moving" style="border:1px solid #4a5a6a;">移动</button>
|
|
<button type="button" class="mui-btn mui-btn-royal mui-btn-block operation" id="moving" style="border:1px solid #4a5a6a;">移动</button>
|
|
</div>
|
|
</div>
|
|
@@ -115,9 +117,6 @@
|
|
<button type="button" class="mui-btn mui-btn-royal mui-btn-block operation" id="cancel" style="border:1px solid #4a5a6a;">取消</button>
|
|
<button type="button" class="mui-btn mui-btn-royal mui-btn-block operation" id="cancel" style="border:1px solid #4a5a6a;">取消</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="mui-col mui-col-xs-12" style="padding: 0;border-bottom:0px solid #525663;">
|
|
|
|
- <div style="height: 25px;background: url(img/bottom_bg.png) no-repeat 0 10px;"></div>
|
|
|
|
- </div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -146,7 +145,6 @@
|
|
} else {
|
|
} else {
|
|
mapid = localStorage.getItem("mapid")
|
|
mapid = localStorage.getItem("mapid")
|
|
}
|
|
}
|
|
- //IDARR = localStorage.getItem(mapid+agvid+"_id_arr");
|
|
|
|
//获取按钮
|
|
//获取按钮
|
|
createList();
|
|
createList();
|
|
//获取状态
|
|
//获取状态
|
|
@@ -183,21 +181,6 @@
|
|
return
|
|
return
|
|
}
|
|
}
|
|
});
|
|
});
|
|
- //设置拖拽排序
|
|
|
|
- // 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) {
|
|
function onSelectStation(evt) {
|
|
@@ -291,39 +274,44 @@
|
|
//填充按钮列表
|
|
//填充按钮列表
|
|
function createList() {
|
|
function createList() {
|
|
$.get(url + "/map/getStations/" + mapid, function(data) {
|
|
$.get(url + "/map/getStations/" + mapid, function(data) {
|
|
|
|
+ IDARR = localStorage.getItem(mapid+agvid+"ARR");
|
|
trs = "";
|
|
trs = "";
|
|
- var IDARR = ["100","101","102","103","104","105","106","107"]
|
|
|
|
- if(IDARR == "" ||IDARR == null){
|
|
|
|
|
|
+ if(IDARR == "" ||IDARR == undefined){
|
|
|
|
+ ARRS = [];
|
|
for (i in data) {
|
|
for (i in data) {
|
|
if (data[i].Name != "" && data[i].Name != "rect") {
|
|
if (data[i].Name != "" && data[i].Name != "rect") {
|
|
var ids = data[i].Id - (agvid * 100)
|
|
var ids = data[i].Id - (agvid * 100)
|
|
- trs += '<div class="mui-col mui-col-xs-3" drag-id="'+data[i].Id+'">' +
|
|
|
|
- '<button type="button" class="mui-btn mui-btn-royal mui-btn-block" name="stbtn" id="' + ids +
|
|
|
|
- '" value="' + ids + '">' +
|
|
|
|
- data[i].Name + '</button></div>'
|
|
|
|
|
|
+ ARRS.push(parseInt(data[i].Id));
|
|
|
|
+ trs += '<div class="mui-col mui-col-xs-3" drag-id="'+ids+'">' +
|
|
|
|
+ '<button type="button" class="mui-btn mui-btn-royal mui-btn-block" name="stbtn" id="' + ids +
|
|
|
|
+ '" value="' + ids + '">' +
|
|
|
|
+ data[i].Name + '</button></div>'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- }else{
|
|
|
|
- //id_arr = JSON.parse(IDARR);//["4","5","2","999","7","1","6","8","3"]
|
|
|
|
- id_arr = IDARR;
|
|
|
|
- for(x in id_arr){
|
|
|
|
|
|
+ ARR = ARRS.join(",");
|
|
|
|
+ localStorage.setItem(mapid + agvid + 'ARR', ARR);
|
|
|
|
+ } else {
|
|
|
|
+ arr = IDARR.split(",");// 在每个逗号(,)处进行分解。
|
|
|
|
+ var id_arr = arr.sort(function(a, b){return a - b});//按从小到大排序
|
|
|
|
+ for (x in id_arr) {
|
|
for (i in data) {
|
|
for (i in data) {
|
|
- if((data[i].Id == id_arr[x]) && (data[i].Name !="") && (data[i].Name != "rect")){
|
|
|
|
|
|
+ if((data[i].Name != "") && data[i].Name != "rect"){
|
|
var ids = data[i].Id - (agvid * 100)
|
|
var ids = data[i].Id - (agvid * 100)
|
|
- trs += '<div class="mui-col mui-col-xs-3" drag-id="'+data[i].Id+'">' +
|
|
|
|
- '<button type="button" class="mui-btn mui-btn-royal mui-btn-block" name="stbtn" id="' + ids +
|
|
|
|
- '" value="' + ids + '">' +
|
|
|
|
- data[i].Name + '</button></div>'
|
|
|
|
|
|
+ if ((data[i].Id == id_arr[x])) {
|
|
|
|
+ trs += '<div class="mui-col mui-col-xs-3" drag-id="'+ids+'">' +
|
|
|
|
+ '<button type="button" class="mui-btn mui-btn-royal mui-btn-block" name="stbtn" id="' + ids +
|
|
|
|
+ '" value="' + ids + '">' +
|
|
|
|
+ data[i].Name + '</button></div>'
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
$btlist.append(trs);
|
|
$btlist.append(trs);
|
|
//注册按钮点击事件click touchstart
|
|
//注册按钮点击事件click touchstart
|
|
- $("button[name]").on("click", onSelectStation);
|
|
|
|
|
|
+ $("button[name]").on("touchstart", onSelectStation);
|
|
});
|
|
});
|
|
}
|
|
}
|
|
-
|
|
|
|
//新建ws连接,获取agv的状态
|
|
//新建ws连接,获取agv的状态
|
|
let ws;
|
|
let ws;
|
|
function startLog() {
|
|
function startLog() {
|
|
@@ -471,7 +459,7 @@
|
|
$("#info").text("前磁导脱线");
|
|
$("#info").text("前磁导脱线");
|
|
}
|
|
}
|
|
if (v == 32) {
|
|
if (v == 32) {
|
|
- $("#info").text("反磁导脱线");
|
|
|
|
|
|
+ $("#info").text("后磁导脱线");
|
|
}
|
|
}
|
|
if (v == 33) {
|
|
if (v == 33) {
|
|
$("#info").text("左磁导脱线");
|
|
$("#info").text("左磁导脱线");
|