#fs
lsh
2024-09-10 4375805e5769179d7684a3af3e9132be68c38321
src/main/webapp/views/console-old.html
@@ -863,36 +863,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')
@@ -1029,33 +1000,6 @@
        });
    }
    // 堆垛机实时数据获取
    function getCrnInfo() {
        $.ajax({
            url: baseUrl + "/console/latest/data/crn",
            headers: {'token': localStorage.getItem('token')},
            method: 'POST',
            success: function (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;
                        if (crns[i].bay < 0) {
                            crns[i].bay = 0
                        }
                        crnEl.animate({left: (crns[i].bay * unit) + 'px'}, 1000);
                    }
                } else if (res.code === 403) {
                    parent.location.href = baseUrl + "/login";
                } else {
                    console.log(res.msg);
                }
            }
        });
    }
    // 扫码器实时数据获取
    function getBarcodeInfo() {
        $.ajax({
@@ -1129,72 +1073,6 @@
    }
    // 页面点击事件监听 ---------------------------------------------------------
    // 输送设备点击事件
    // $('.site').on('click', function () {
    //    var id = this.id.split("-")[1];
    //    if (id === undefined) {
    //       return;
    //    }
    //    layer.open({
    //       title: id + " 站点信息详情",
    //       closeBtn: 0,
    //       skin: 'layui-layer-lan',
    //       offset: '180px',
    //       type: 1,
    //       shadeClose: true,
    //       content: $('#siteWindow'),
    //       area: ['35rem', '18rem'],
    //       btn: ['确定', '关闭'],
    //       success: function(layero, index){
    //          http.post(baseUrl+"/console/site/detail", {siteId: id}, function (res) {
    //             for (var val in res.data) {
    //                var find = $("#siteWindow").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');
    //                }
    //             }
    //          })
    //       },
    //       end: function () {
    //          $(':input', $("#siteWindow")).val('').removeAttr('checked').removeAttr('selected');
    //       }
    //    });
    // });
    // 堆垛机点击事件
    // $('.machine').on('click', function () {
    //    var id = this.id.split("-")[1];
    //    layer.open({
    //       title: id+"号堆垛机",
    //       skin: 'layui-layer-lan',
    //       closeBtn: 0,
    //       type: 1,
    //       offset: '150px',
    //       shadeClose: true,
    //       content: $("#crnWindow"),
    //       area: ['40rem', '20rem'],
    //       btn: ['确定', '关闭'],
    //       success: function(layero, index){
    //          http.post(baseUrl+"/console/crn/detail", {crnNo: id}, 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');
    //                }
    //             }
    //          })
    //       },
    //       end: function () {
    //          $(':input', $("#crnWindow")).val('').removeAttr('checked').removeAttr('selected');
    //       }
    //    });
    // });
    // 小车偏移动画
    function carAnimate(id, target) {