#
1
2 天以前 68242c8f3acc051368eeb1246b2fb6327a783bfc
src/main/webapp/views/console.html
@@ -56,8 +56,8 @@
                    <span class="machine-put-flag">入库</span>
                    <span class="machine-take-flag">出库</span>
                    <span class="machine-stock-move-flag">库到库</span>
                    <span class="machine-site-move-flag">站到站</span>
                    <span class="machine-p-move-flag">PToP</span>
<!--                    <span class="machine-site-move-flag">站到站</span>-->
<!--                    <span class="machine-p-move-flag">PToP</span>-->
                    <span class="machine-error-flag">异常</span>
                    <span class="machine-auto-flag">自动</span>
                    <span class="machine-unauto-flag">非自动/手动</span>
@@ -689,11 +689,16 @@
        }
    }
    // 小车偏移动画
    function carAnimate(id, target) {
        // debugger
        var targetTop = 0;
        if (id === 1 || id === '1' || id === '2' || id === 2 || id === '3' || id === 3 ||id === '4' || id === 4) {
        // 确保 target 是有效的站点
        if (target === -1) {
            console.log("站点无效,跳过动画");
            return; // 跳过无效站点
        }
        // 计算目标站点的 top 值
            switch (target) {
                case 1004:
                    targetTop += 84;
@@ -732,7 +737,7 @@
                    targetTop += 128;
                    break;
                case 2009:
                    targetTop += 19.;
                targetTop += 190;
                    break;
                case 2012:
                    targetTop += 240;
@@ -756,15 +761,23 @@
                    targetTop += 580;
                    break;
                default:
                    return;
            }
        } else {
            return;
                return; // 无效的站点,跳过
        }
        $("#site-" + id).animate({top: targetTop + 'px'}, 0);
        // 获取当前站点位置
        var currentTop = $("#site-" + id).position().top;
        // 计算两个站点之间的距离
        var distance = Math.abs(targetTop - currentTop);
        // 计算动画时间,距离越远时间越长,最小时间为500ms,最大为2000ms
        var duration = Math.max(500, Math.min(distance / 2, 2000));
        // 执行动画,平滑地移动到目标位置
        $("#site-" + id).animate({ top: targetTop + 'px' }, duration);
    }
    // 检查 URL 中是否包含 fullscreen=true 参数
    function checkFullscreen() {
        const urlParams = new URLSearchParams(window.location.search);