From 196f9b62a04204e7c05da99b53ab9f36d2d7a029 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期五, 17 十一月 2023 10:38:53 +0800
Subject: [PATCH] #
---
src/main/webapp/views/console.html | 28 +++++++++++++++-------------
1 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/src/main/webapp/views/console.html b/src/main/webapp/views/console.html
index 8d69b6c..afb3310 100644
--- a/src/main/webapp/views/console.html
+++ b/src/main/webapp/views/console.html
@@ -588,31 +588,33 @@
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;
-
+ var unit = 0;
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 = -28.5;
- offSet = 1710; //145
+ offSet = 1552;
- crnEl.animate({left: offSet + 'px'}, 1000);
- // if(crns[i].bay === 1){
- // crnEl.animate({left: offSet + 'px'}, 1000);
- // } else {
- // crnEl.animate({left: (offSet - unit + (crns[i].bay * unit)) + 'px'}, 1000);
- // }
+ if(crns[i].bay === 1){
+ if (i == 1) {
+ if (crns[i].bay < 27) {
+ crnEl.animate()
+ }
+ } else {
+ crnEl.animate({left: offSet + 'px'}, 1000);
+ }
+
+ } else {
+ crnEl.animate({left: (offSet - unit + (crns[i].bay * unit)) + 'px'}, 1000);
+ }
}
} else if (res.code === 403) {
@@ -634,7 +636,7 @@
if (res.code === 200) {
var barcodes = res.data;
for (var i = 0; i < barcodes.length; i++) {
- $("#code-decoder-data-" + barcodes[i].barcodeId).html(barcodes[i].codeValue);
+ $("#barcode-"+barcodes[i].barcodeId).html(barcodes[i].codeValue ? barcodes[i].codeValue : "--");
}
} else if (res.code === 403) {
parent.location.href = baseUrl + "/login";
--
Gitblit v1.9.1