From 2722343bfb3528b96c0c41860eb37079a073d2c5 Mon Sep 17 00:00:00 2001
From: lsh <lsh@163.com>
Date: 星期二, 10 九月 2024 09:43:11 +0800
Subject: [PATCH] #fs
---
src/main/webapp/views/console.html | 97 ++++++++++++------------------------------------
1 files changed, 24 insertions(+), 73 deletions(-)
diff --git a/src/main/webapp/views/console.html b/src/main/webapp/views/console.html
index eea7ecc..a02d07d 100644
--- a/src/main/webapp/views/console.html
+++ b/src/main/webapp/views/console.html
@@ -21,7 +21,7 @@
<h6>AUTOMATIC WAREHOUSE WCS MONITORING DIAGRAM</h6>
</div>
<div class="head-right">
- <img src="../static/images/zy-logo.png" alt="涓壃" height="44" width="80">
+<!-- <img src="../static/images/zy-logo.png" alt="寰愬伐姹変簯" height="44" width="80">-->
</div>
</div>
<!-- 璐ф灦 + 鍫嗗灈鏈� + 鍏ュ簱绔欑偣 -->
@@ -413,36 +413,7 @@
})
});
- // 鍫嗗灈鏈轰俊鎭�
- $('.machine').on('click', function () {
- var id = this.id.split("-")[1];
- $("#crnWindow").attr('style', 'display:block;');
- $("#siteWindow").attr("style", "display:none;");
- $('.detailed').empty();
- $('.detailed').append(id + '鍙峰爢鍨涙満');
- $.ajax({
- url: baseUrl + "/console/crn/detail",
- headers: {
- 'token': localStorage.getItem('token')
- },
- data: {
- crnNo: id
- },
- method: 'post',
- success: function (res) {
- for (var val in res.data) {
- var find = $("#crnWindow").find(":input[name='" + val + "']");
- if (find[0].type === 'text') {
- find.val(res.data[val]);
- } else if (find[0].type === 'checkbox') {
- find.attr("checked", res.data[val] === 'Y');
- }
- }
- }
- })
-
- })
// 寮圭獥鍏抽棴
$('button').on('click', function () {
$('#siteWindow').attr('style', 'display:none')
@@ -462,6 +433,8 @@
getSystemRunningStatus();
getBarcodeInfo();
getScaleInfo();
+ // carAnimate();
+ carAnimate2();
// 瀹炴椂璁块棶
setInterval(function () {
getCrnInfo();
@@ -573,48 +546,6 @@
carAnimate(Number(sites[i].siteId), Number(sites[i].nearbySta));
}
- }
- } else if (res.code === 403) {
- parent.location.href = baseUrl + "/login";
- } else {
- console.log(res.msg);
- }
- }
- });
- }
-
- // 鍫嗗灈鏈哄疄鏃舵暟鎹幏鍙�
- function getCrnInfo() {
- $.ajax({
- url: baseUrl + "/console/latest/data/crn",
- headers: {'token': localStorage.getItem('token')},
- method: 'POST',
- success: function (res) {
- // console.log(res)
- if (res.code === 200) {
- var crns = res.data;
- for (var i = 0; i < crns.length; i++) {
- var crnEl = $("#crn-" + crns[i].crnId);
- crnEl.attr("class", "machine " + crns[i].crnStatus);
- var unit = 0;//($('.item').eq(0).width() + 13) / 2;
-
- if (crns[i].bay < 0 || crns[i].bay === -2) {
- crns[i].bay = 1
- }
- // crnEl.animate({left: (crns[i].bay * unit) + 'px'}, 1000);
- // crns[i].bay = 15;
-
- var offSet = 0;
- unit = 60;
- offSet = 325;
-
-
- if(crns[i].bay === 1){
- crnEl.animate({left: offSet + 'px'}, 1000);
- } else {
- crnEl.animate({left: (offSet - unit + (crns[i].bay * unit)) + 'px'}, 1000);
- }
-
}
} else if (res.code === 403) {
parent.location.href = baseUrl + "/login";
@@ -772,6 +703,26 @@
$(siteId).animate({top: sitePosition[staNo]}, 1000);
}
- moveSite("#site-1", 117);//娴嬭瘯绉诲姩鏂规硶,鍙垹闄�
+ // moveSite("#site-1", 117);//娴嬭瘯绉诲姩鏂规硶,鍙垹闄�
+
+ // Rgv瀹炴椂鏁版嵁鑾峰彇
+ function carAnimate2() {
+ // console.log("1=============1")
+ $.ajax({
+ url: baseUrl + "/rgv/console/rgv/site/data",
+ headers: {'token': localStorage.getItem('token')},
+ method: 'POST',
+ success: function (res) {
+ if (res.code === 200) {
+ var rgvMap = res.data;
+ for (var i = 0; i < rgvMap.length; i++) {
+ moveSite("#site-"+rgvMap[i].id, rgvMap[i].title);
+ }
+ } else {
+ console.log(res.msg);
+ }
+ }
+ });
+ }
</script>
\ No newline at end of file
--
Gitblit v1.9.1