| | |
| | | @GetMapping("/map/getData/{floor}/{lev}/auth") |
| | | @ManagerAuth |
| | | public String getMapData(@PathVariable("floor") Integer floor, @PathVariable("lev") Integer lev) { |
| | | BasMap basMap = agvBasMapService.selectLatestMap(lev,floor); |
| | | BasMap basMap = agvBasMapService.selectLatestMap(1,floor); |
| | | //解析json地图数据 |
| | | List<ArrayList> arrayLists = JSON.parseArray(basMap.getData(), ArrayList.class); |
| | | |
| | |
| | | x = generateMap3Bay(bay); |
| | | } |
| | | |
| | | |
| | | ArrayList rowData = arrayLists.get(x); |
| | | Object o = rowData.get(y); |
| | | |
| | | JSONObject jsonObject = JSON.parseObject(o.toString()); |
| | | if (DISABLE_LOC_NO.contains(locMast.getLocNo())) { |
| | | //禁止库位 |
| | | jsonObject.put("value", 10);//将禁用库位进行设置 |
| | | } |
| | | jsonObject.put("value","0"); |
| | | |
| | | jsonObject.put("locNo", locMast.getLocNo());//设置库位号 |
| | | jsonObject.put("locSts", locMast.getLocSts());//库位状态 |
| | | //更新list |
| | |
| | | if(row > 3){ |
| | | x --; |
| | | } |
| | | if(row > 4){ |
| | | if(row > 5){ |
| | | x --; |
| | | } |
| | | if(row > 6){ |
| | | if(row > 7){ |
| | | x --; |
| | | } |
| | | if(row > 8){ |
| | | if(row > 9){ |
| | | x --; |
| | | } |
| | | if(row > 10){ |
| | |
| | | |
| | | private Integer generateMap3Row(int row){ |
| | | int x = row; |
| | | Integer[] rowAdd = {2,4,6,8,9,11,12,14,16,18,19,21,23,25,27,29,31,33}; |
| | | Integer[] rowAdd = {2,4,6,7,8,10,12,13,15,17,19,21,23,24,26,28,30,32}; |
| | | for(int i=0; i<rowAdd.length; i++){ |
| | | if(row >= rowAdd[i]){ |
| | | x ++; |
| | |
| | | } |
| | | |
| | | private Integer generateMap3Bay(int bay){ |
| | | int y = 73-bay; |
| | | if(bay >= 15) y --; |
| | | if(bay >= 47) y --; |
| | | int y = 76-bay; |
| | | if(bay >= 18) y --; |
| | | if(bay >= 26) y --; |
| | | if(bay >= 50) y --; |
| | | return y; |
| | | } |
| | | |
| | |
| | | <div style="margin-top: 20px;"><button class="layui-btn" @click="currentLev = 6" :style="{background: currentLev==6?'red':''}">6F</button></div> |
| | | <div style="margin-top: 20px;"><button class="layui-btn" @click="currentLev = 7" :style="{background: currentLev==7?'red':''}">7F</button></div> |
| | | <div style="margin-top: 20px;"><button class="layui-btn" @click="currentLev = 8" :style="{background: currentLev==8?'red':''}">8F</button></div> |
| | | <div class="lev-for-floor3" style="margin-top: 20px; display: none;"><button class="layui-btn" @click="currentLev = 8" :style="{background: currentLev==8?'red':''}">9F</button></div> |
| | | <div class="lev-for-floor3" style="margin-top: 20px; display: none;"><button class="layui-btn" @click="currentLev = 8" :style="{background: currentLev==8?'red':''}">10F</button></div> |
| | | <div class="lev-for-floor3" style="margin-top: 20px; display: none;"><button class="layui-btn" @click="currentLev = 8" :style="{background: currentLev==8?'red':''}">11F</button></div> |
| | | <div class="lev-for-floor3" style="margin-top: 20px; display: none;"><button class="layui-btn" @click="currentLev = 8" :style="{background: currentLev==8?'red':''}">12F</button></div> |
| | | <div class="lev-for-floor1" style="margin-top: 20px;"><button class="layui-btn" @click="currentLev = 8" :style="{background: currentLev==8?'red':''}">9F</button></div> |
| | | <div class="lev-for-floor1" style="margin-top: 20px;"><button class="layui-btn" @click="currentLev = 8" :style="{background: currentLev==8?'red':''}">10F</button></div> |
| | | <div class="lev-for-floor1" style="margin-top: 20px;"><button class="layui-btn" @click="currentLev = 8" :style="{background: currentLev==8?'red':''}">11F</button></div> |
| | | <div class="lev-for-floor1" style="margin-top: 20px;"><button class="layui-btn" @click="currentLev = 8" :style="{background: currentLev==8?'red':''}">12F</button></div> |
| | | </div> |
| | | </div> |
| | | <div style="padding: 40px 20px 10px 10px;" :style="window.innerWidth < 2000 ? 'margin-top: 0px;' : 'flex: 5;margin-top: -70px;'"> |
| | |
| | | currentFloor: { |
| | | deep: true, |
| | | handler(val) { |
| | | if(this.currentFloor == 3){ |
| | | $(".lev-for-floor3").show(); |
| | | if(this.currentFloor == 1){ |
| | | $(".lev-for-floor1").show(); |
| | | }else{ |
| | | $(".lev-for-floor3").hide(); |
| | | $(".lev-for-floor1").hide(); |
| | | } |
| | | |
| | | this.init() |