自动化立体仓库 - WCS系统
#
vincent
2020-06-03 90963568d7f507417818f74d2131575f09eb1383
#
4个文件已修改
54 ■■■■ 已修改文件
src/main/webapp/static/css/crn.css 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/common.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/console.html 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/crn.html 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/css/crn.css
@@ -107,6 +107,7 @@
/* -------------------- 第三模块 -------------------- */
.crn-operation {
    position: relative;
    margin-top: 10px;
    height: 25%;
    background-color: #fff;
@@ -207,6 +208,22 @@
    color: #fff;
}
/* 手动操作遮罩 */
.crn-operation-shade {
    position: absolute;
    height: 100%;
    width: 100%;
    z-index: 1000;
    cursor: pointer;
    text-align: center;
    padding: 80px 0;
}
.crn-operation-shade-span {
    font-size: xx-large;
    font-weight: bold;
    color: red;
}
/* -------------------- 第四模块 -------------------- */
.crn-output-board {
    margin-top: 10px;
@@ -225,4 +242,4 @@
    overflow: auto;
    resize:none;
    color: #666;
}
}
src/main/webapp/static/js/common.js
@@ -2,7 +2,10 @@
// var baseUrl = "/wcs";
// 测试
var baseUrl = "";
// 系统运行状态
var systemRunning = true;
// 赋值
function setVal(el, val) {
    if (el.text() !== val){
        el.html(val);
src/main/webapp/views/console.html
@@ -619,7 +619,6 @@
</body>
<script>
    var systemRunning = true;
    var crn1Position = 0;
    var crn2Position = 0;
    // 初始化
@@ -639,7 +638,7 @@
    // 系统运行开关
    function systemSwitch() {
        if (systemRunning){
        if (top.systemRunning){
            layer.prompt({title: '请输入口令,并停止 WCS 系统', formType: 1,   shadeClose: true}, function(pass, idx){
                layer.close(idx);
                doSwitch(0, pass); // 停止wcs系统
@@ -670,11 +669,11 @@
                    if (res.data.status) {
                        $('#system-icon').attr("class", "system-icon-open");
                        $('#system-run-desc').html("系统运行中...");
                        systemRunning = true;
                        top.systemRunning = true;
                    } else {
                        $('#system-icon').attr("class", "system-icon-close");
                        $('#system-run-desc').html("系统已停止!");
                        systemRunning = false;
                        top.systemRunning = false;
                    }
                } else if (res.code === 403){
                    top.location.href = baseUrl+"/login";
@@ -697,11 +696,11 @@
                    if (res.data.status) {
                        $('#system-icon').attr("class", "system-icon-open");
                        $('#system-run-desc').html("系统运行中...");
                        systemRunning = true;
                        top.systemRunning = true;
                    } else {
                        $('#system-icon').attr("class", "system-icon-close");
                        $('#system-run-desc').html("系统已停止!");
                        systemRunning = false;
                        top.systemRunning = false;
                    }
                } else if (res.code === 403){
                    top.location.href = baseUrl+"/login";
src/main/webapp/views/crn.html
@@ -81,6 +81,12 @@
<!-- 手动操作 -->
<div class="crn-operation">
    <div class="crn-operation-shade">
        <span class="crn-operation-shade-span">
            WCS 系统运行中,请停止后操作
        </span>
    </div>
    <!-- 设备任务选择 -->
    <div class="task-select">
        <!-- 堆垛机选择 -->
@@ -177,6 +183,7 @@
        getCrnStateInfo();
        initCrnMsgTable();
        getCrnMsgInfo();
        operatorBlockShow();
    });
    // 数据更新
    setInterval(function () {
@@ -186,8 +193,22 @@
    },1000);
    setInterval(function () {
        getSiteOutput();
        operatorBlockShow();
    },500);
    // 判断手动操作模块是否可用
    function operatorBlockShow() {
        if (top.systemRunning) {
            $('.crn-operation').css("opacity", "0.5");
            $('.crn-operation-shade').show();
            $('.crn-operation-shade-span').show();
        }  else {
            $('.crn-operation').css("opacity", "1");
            $('.crn-operation-shade').hide();
            $('.crn-operation-shade-span').hide();
        }
    }
    // 获取堆垛机执行中的命令
    function getCommandLog() {
        $.ajax({