| | |
| | | |
| | | var user = JSON.parse(localStorage.getItem('user')); |
| | | var selectDeptId = JSON.parse(localStorage.getItem('selectDeptId')); |
| | | url = user.url + "/api-phone/v35/gateway"; |
| | | url = user.url + "/api/phone/v35/gateway"; |
| | | data.tokenAuth = user.tokenAuth; |
| | | data.data.deptId = selectDeptId; |
| | | getData(); |
| | |
| | | success: function(result) { |
| | | if (result.code == "0000") { |
| | | depotList = result.data; |
| | | // console.log(JSON.stringify(depotList)) |
| | | renderDepotList(); |
| | | } else { |
| | | mui.alert(result.msg, '提示', ["确定"], function() {}, "div"); |
| | |
| | | |
| | | //渲染 |
| | | function renderDepotList() { |
| | | |
| | | if (depotList && depotList.length > 0) { |
| | | var html = ''; |
| | | $.each(depotList, function(index, item) { |
| | |
| | | html += '<img src="images/a9.png">'; |
| | | } |
| | | |
| | | html += '</div><div class="txt">' + item.name + '</div>'; |
| | | html += '</div><div class="txt">' + item.depotName + '</div>'; |
| | | |
| | | //根据仓库状态显示不同颜色 |
| | | if(item.depotStatus == "01"){ |
| | |
| | | //功能模块跳转 |
| | | mui(".mui-content").on("tap", ".mui-scroll-wrapper ul li a", function() { |
| | | var index = this.getAttribute("id"); |
| | | var depotId = depotList[index].id; |
| | | var depotId = depotList[index].depotId; |
| | | var depotType = depotList[index].depotType; |
| | | var depotName = depotList[index].name; |
| | | var depotName = depotList[index].depotName; |
| | | var html = null; |
| | | //粮情详细 |
| | | if (tag == "grain") { |
| | |
| | | } |
| | | //气调操作 |
| | | if (tag == "n2") { |
| | | html = "device-n2"; |
| | | html = "device-modeN2"; |
| | | } |
| | | //温控操作 |
| | | if (tag == "temp") { |