| | |
| | | // 初始化 |
| | | getSitesInfo(); |
| | | getCrnInfo(); |
| | | getHoistInfo(); |
| | | getSystemRunningStatus(); |
| | | getBarcodeInfo(); |
| | | getScaleInfo(); |
| | |
| | | }, 1000); |
| | | setInterval(function () { |
| | | getSitesInfo(); |
| | | getHoistInfo(); |
| | | }, 3000); |
| | | |
| | | // 系统运行开关 |
| | |
| | | } |
| | | |
| | | // 扫码器实时数据获取 |
| | | function getHoistInfo() { |
| | | $.ajax({ |
| | | url: baseUrl + "/console/latest/data/hoist", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200) { |
| | | var hoists = res.data; |
| | | for (var i = 0; i < hoists.length; i++) { |
| | | $("#hoist-"+hoists[i].hoistId).html(hoists[i].place ? hoists[i].place : "--"); |
| | | } |
| | | } else if (res.code === 403) { |
| | | parent.location.href = baseUrl + "/login"; |
| | | } else { |
| | | console.log(res.msg); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | // 扫码器实时数据获取 |
| | | function getBarcodeInfo() { |
| | | $.ajax({ |
| | | url: baseUrl + "/console/latest/data/barcode", |