#
luxiaotao1123
2020-08-24 a14eed06347169ce05969069e506076a3440bccd
#
2个文件已修改
1个文件已添加
56 ■■■■■ 已修改文件
src/main/resources/application.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/image/bg.jpg 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/console.html 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application.yml
@@ -35,7 +35,7 @@
  enable: false
# 下位机配置
wcs-slave:
#wcs-slave:
  # 堆垛机
  crn[0]:
    id: 1
src/main/webapp/static/image/bg.jpg
src/main/webapp/views/console.html
@@ -89,8 +89,17 @@
    <!-- 台车1 -->
    <!-- 台车轨道 -->
    <div id="car-track-1" class="car-track" style="position: absolute; top: 122px; left: 100px; width: 100px; height: 200px; background: url(../static/image/bg.jpg);"></div>
    <!-- 台车实例 -->
    <div id="site-8" class="site car" style="
        position: absolute;
        top: 122px;
        left: 100px;
        width: 100px;
        height: 40px;
        line-height: 40px">8</div>
    <!-- 第一列(宽度 100px) -->
    <div class="site-row site-row-1">
@@ -646,5 +655,48 @@
        });
    });
    // 小车偏移动画
    function carAnimate(id, target) {
        var targetTop = 122;
        if (id === 8) {
            switch (target) {
                case 1:
                    targetTop += 160;
                    break;
                case 2:
                    targetTop += 120;
                    break;
                case 3:
                    targetTop += 80;
                    break;
                case 4:
                    targetTop += 40;
                    break;
                case 7:
                    targetTop += 0;
                    break;
                default:
                    return;
            }
        } else {
            return;
        }
        $("#site-" + id).animate({top: targetTop+'px'}, 1000);
    }
    // 台车点击事件
    $(document).on("click", ".car", function () {
        var value = prompt('目标站:', "1");
        if (value == null) {
            alert('不能为空!');
        } else if (value === '') {
            alert('不能为空!');
        } else {
            carAnimate(8, Number(value));
        }
    })
</script>
</html>