| | |
| | | </div> |
| | | </body> |
| | | <script> |
| | | |
| | | // 空白行数 |
| | | var crnStateTableBlankRows = 0; |
| | | var crnMsgTableBlankRows = 0; |
| | |
| | | setInterval(function () { |
| | | getCrnStateInfo(); |
| | | getCrnMsgInfo(); |
| | | getCommandLog(); |
| | | },1000); |
| | | setInterval(function () { |
| | | getSiteOutput(); |
| | | },500); |
| | | |
| | | // 获取堆垛机执行中的命令 |
| | | function getCommandLog() { |
| | | $.ajax({ |
| | | url: baseUrl + "/crn/command/ongoing", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200) { |
| | | var commands = res.data; |
| | | for (var i=0; i<commands.length;i++){ |
| | | $("#crn"+commands[i].crnNo).val(commands[i].command); |
| | | } |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/login"; |
| | | } else { |
| | | alert(res.msg); |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | // 堆垛机信息表获取 ---- 表一 |
| | | function getCrnStateInfo() { |