From f74f237e0179086fb19d08e80c31847ebc33f235 Mon Sep 17 00:00:00 2001
From: 18516761980 <4761516tqsxp>
Date: 星期一, 13 六月 2022 15:22:49 +0800
Subject: [PATCH] #
---
src/main/webapp/views/render.html | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/src/main/webapp/views/render.html b/src/main/webapp/views/render.html
index 36f5c3f..67129f0 100644
--- a/src/main/webapp/views/render.html
+++ b/src/main/webapp/views/render.html
@@ -584,17 +584,25 @@
headers: {'token': localStorage.getItem('token')},
method: 'POST',
success: function (res) {
- console.log(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 = ($('.item').eq(0).width() + 13) / 2;
+ var unit = 17;//($('.item').eq(0).width() + 13) / 2;
if (crns[i].bay < 0) {
crns[i].bay = 0
}
- crnEl.animate({left: (crns[i].bay * unit) + 'px'}, 1000);
+ // crnEl.animate({left: (crns[i].bay * unit) + 'px'}, 1000);
+ // crns[i].bay = 52;
+
+ if(crns[i].bay === 1){
+ crnEl.animate({left: 1150 + 'px'}, 1000);
+ } else {
+ crnEl.animate({left: (1150 - (crns[i].bay * unit)) + 'px'}, 1000);
+ }
+
}
} else if (res.code === 403) {
parent.location.href = baseUrl + "/login";
@@ -651,7 +659,7 @@
// 鍫嗗灈鏈哄亸绉诲姩鐢�
function crnAnimate(id, leftVal) {
- console.log(crn1Position)
+ // console.log(crn1Position)
switch (id) {
case 1:
$("#crn-1").animate({left: leftVal + 'px'}, 1000);
--
Gitblit v1.9.1