From cc00a02cb14dc74ae8941bc930ff40d1b8cbb8c3 Mon Sep 17 00:00:00 2001
From: 18516761980 <4761516tqsxp>
Date: 星期三, 09 三月 2022 17:08:59 +0800
Subject: [PATCH] Merge branch 'xgmwcs' of http://47.97.1.152:5880/r/zy-wcs into xgmwcs
---
src/main/webapp/views/console.html | 117 ++++++++++++++++++++++++----------------------------------
1 files changed, 49 insertions(+), 68 deletions(-)
diff --git a/src/main/webapp/views/console.html b/src/main/webapp/views/console.html
index f007331..a1d0f1f 100644
--- a/src/main/webapp/views/console.html
+++ b/src/main/webapp/views/console.html
@@ -955,7 +955,7 @@
<div class="body-head">杈撻�佺嚎鐘舵��</div>
<div class="state states">
<span>杩愯緭绾挎�绘暟</span>
- <span class="line-ss">45</span>
+ <span class="line-ss">48</span>
</div>
<div class="button"><span>鎵�鏈夌姸鎬�</span></div>
<div class="button item-group">
@@ -1219,80 +1219,61 @@
</body>
</html>
<script>
- var tData = [
- {"time":"2022-02-22 14:24:53","barcode":"80000009"},
- {"time":"2022-02-22 14:24:53","barcode":"80000019"},
- {"time":"2022-02-22 14:24:53","barcode":"80000019"},
- {"time":"2022-02-22 14:24:53","barcode":"80000019"},
- {"time":"2022-02-22 14:24:53","barcode":"80000019"},
- {"time":"2022-02-22 14:24:53","barcode":"80000019"},
- {"time":"2022-02-22 14:24:53","barcode":"80000019"},
- {"time":"2022-02-22 14:24:53","barcode":"80000019"},
- {"time":"2022-02-22 14:24:53","barcode":"80000019"},
- {"time":"2022-02-22 14:24:53","barcode":"80000019"},
- {"time":"2022-02-22 14:24:53","barcode":"80000019"},
- {"time":"2022-02-22 14:24:53","barcode":"80000019"},
- {"time":"2022-02-22 14:24:53","barcode":"80000019"},
- {"time":"2022-02-22 14:24:53","barcode":"80000019"},
- {"time":"2022-02-22 14:24:53","barcode":"80000019"},
- {"time":"2022-02-22 14:24:53","barcode":"80000019"},
- {"time":"2022-02-22 14:24:53","barcode":"80000019"},
- {"time":"2022-02-22 14:24:53","barcode":"80000019"},
- {"time":"2022-02-22 14:24:53","barcode":"80000019"},
- {"time":"2022-02-22 14:24:53","barcode":"80000019"},
- {"time":"2022-02-22 14:24:53","barcode":"80000019"},
- {"time":"2022-02-22 14:24:53","barcode":"80000019"},
- {"time":"2022-02-22 14:24:53","barcode":"80000019"},
- {"time":"2022-02-22 14:24:53","barcode":"80000019"},
- {"time":"2022-02-22 14:24:53","barcode":"80000019"},
- ]
- var tDate1 = []
- var tDate2 = []
- var tDate3 = []
- // function getCodeData(){
- // $.ajax({
- // url:baseUrl +'/xgmwcs/console/barcode/output/site',
- // method:'GET',
- // success:function (res) {
- // if(res.code === 200){
- // tData = res.data
- // }
- // }
- // })
- // }
- // setInterval(getCodeData(),1000)
- if(tData.length<=5){
- tData1 = tData
- } else if (tData.length<=10){
- tDate1 = tData.slice(0,5)
- tData.splice(0,5)
- tDate2 = tData
- } else if(tData.length<=15){
- tDate1 = tData.slice(0,5)
- tDate2 = tData.slice(6,10)
- tData.splice(0,10)
- tDate3 = tData
- } else {
- tData = tData.slice(-15)
- tDate1 = tData.slice(-15)
- tDate2 = tData.slice(-10)
- tDate3 = tData.slice(-5)
+ var tData = []
+ var tData1 = []
+ var tData2 = []
+ var tData3 = []
+ function getCodeData(){
+ $.ajax({
+ url:baseUrl +'/console/barcode/output/site',
+ method:'GET',
+ success:function (res) {
+ if(res.code === 200){
+ tData = eval(res.data);
+ if(tData.length<=5){
+ tData1 = tData
+ } else if (tData.length<=10){
+ tData1 = tData.slice(0,5)
+ tData.splice(0,5)
+ tData2 = tData
+ } else if(tData.length<=15){
+ tData1 = tData.slice(0,5)
+ tData2 = tData.slice(6,10)
+ tData.splice(0,10)
+ tData3 = tData
+ } else {
+ tData = tData.slice(-15)
+ tData1 = tData.slice(-15)
+ tData2 = tData.slice(-10)
+ tData3 = tData.slice(-5)
+
+ }
+ }
+ }
+ })
}
+ setInterval(function () {
+ getCodeData();
+ renderBarCode();
+ }, 1000)
+
+
+
+
function renderBarCode() {
- for (var i = 0;i<tDate1.length;i++){
- var str1 = '<li><span>' + tDate1[i].barcode + '</span><span class="right">' + tDate1[i].time + '</span></li>'
+ for (var i = 0;i<tData1.length;i++){
+ var str1 = '<li><span>' + tData1[i].barcode + '</span><span class="right">' + tData1[i].time + '</span></li>'
$('#barcode1').append(str1)
}
- for(var j = 0;j<tDate2.length;j++){
- var str2 = '<li><span>' + tDate2[j].barcode + '</span><span class="right">' + tDate2[j].time + '</span></li>'
+ for(var j = 0;j<tData2.length;j++){
+ var str2 = '<li><span>' + tData2[j].barcode + '</span><span class="right">' + tData2[j].time + '</span></li>'
$('#barcode2').append(str2)
}
- for(var k = 0;k<tDate3.length;k++){
- var str3 = '<li><span>' + tDate3[k].barcode + '</span><span class="right">' + tDate3[k].time + '</span></li>'
+ for(var k = 0;k<tData3.length;k++){
+ var str3 = '<li><span>' + tData3[k].barcode + '</span><span class="right">' + tData3[k].time + '</span></li>'
$('#barcode3').append(str3)
}
}
- setInterval(renderBarCode(),1000)
</script>
<script type="text/javascript">
// 寮圭獥绔欑偣淇℃伅
@@ -1315,9 +1296,9 @@
for (var val in res.data) {
var find = $("#siteWindow").find(":input[name='" + val + "']");
if (find[0].type==='text') {
- find.val(data[val]);
+ find.val(res.data[val]);
} else if (find[0].type === 'checkbox') {
- find.attr("checked", data[val] === 'Y');
+ find.attr("checked", res.data[val] === 'Y');
}
}
}
--
Gitblit v1.9.1