#
luxiaotao1123
2022-02-22 e6a9ef6750e94944c16286711ec5d48cd57393f4
#
1个文件已修改
34 ■■■■■ 已修改文件
src/main/webapp/views/console.html 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/console.html
@@ -1219,23 +1219,18 @@
</body>
</html>
<script>
    function getCodeData(){
        $.ajax({
            url:baseUrl +'/xgmwcs/console/barcode/output/site',
            method:'GET',
            success:function (res) {
                console.log(res)
                if(res.code === 200){
                    tData = res.data
                }
            }
        })
    }
    setInterval(getCodeData(),1000)
    var tData = []
    var tDate1 = []
    var tDate2 = []
    var tDate3 = []
    function getCodeData(){
        $.ajax({
            url:baseUrl +'/console/barcode/output/site',
            method:'GET',
            success:function (res) {
                if(res.code === 200){
                    tData = eval(res.data);
                    console.log(tData)
    if(tData.length<=5){
        tData1 = tData
    } else if (tData.length<=10){
@@ -1256,9 +1251,21 @@
        tDate3 = tData.slice(-5)
    }
                }
            }
        })
    }
    setInterval(function () {
        getCodeData();
        renderBarCode();
    }, 1000)
    function renderBarCode() {
        for (var i = 0;i<tDate1.length;i++){
            console.log(tDate1[i])
            var str1 = '<li><span>' + tDate1[i].barcode + '</span><span class="right">' + tDate1[i].time + '</span></li>'
            $('#barcode1').append(str1)
        }
@@ -1271,7 +1278,6 @@
            $('#barcode3').append(str3)
        }
    }
    setInterval(renderBarCode(),1000)
</script>
<script type="text/javascript">
    // 弹窗站点信息