| | |
| | | </dependencies> |
| | | |
| | | <build> |
| | | <finalName>szfzwcs</finalName> |
| | | <finalName>xzjlwcs</finalName> |
| | | <plugins> |
| | | <plugin> |
| | | <groupId>org.springframework.boot</groupId> |
| | |
| | | name: @pom.build.finalName@ |
| | | datasource: |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | url: jdbc:sqlserver://localhost:1433;databasename=szfzasrs |
| | | url: jdbc:sqlserver://192.168.4.15:1433;databasename=xzjlasrs |
| | | username: sa |
| | | # password: Zoneyung@zy56$ |
| | | password: sa@123 |
| | |
| | | |
| | | /* 库位组 */ |
| | | .stock-group .item { |
| | | width: 80px; |
| | | width: 40px; |
| | | height: 30px; |
| | | float: left; |
| | | border-top: 1px solid rgb(194,76,65); |
| | |
| | | .btn-16:active { |
| | | top: 2px; |
| | | } |
| | | |
| | | .sxcar{ |
| | | width: 40px; |
| | | height: 30px; |
| | | background-image: url(../images/sxcar.png); |
| | | background-size: 100% 100%; |
| | | position: relative; |
| | | top: 0; |
| | | left: 0; |
| | | } |
| | |
| | | var baseUrl = "/szfzwcs"; |
| | | var baseUrl = "/xzjlwcs"; |
| | | |
| | | // 赋值 |
| | | function setVal(el, val) { |
New file |
| | |
| | | [[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[-1,-1,-1,-1,0,0,0,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-23],[-1,-1,-1,-1,0,0,0,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-22],[-1,-1,-1,-1,0,0,0,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-21],[-1,-1,-1,-1,0,0,0,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-3],[-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-2],[-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1],[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]] |
| | |
| | | <h6>AUTOMATIC WAREHOUSE WCS MONITORING DIAGRAM</h6> |
| | | </header> |
| | | <main class="main"> |
| | | <!--第1列 --> |
| | | <div class="site-row site-row-1" id="fool1"> |
| | | <div id="site-100" class="site" style="height: 38px;line-height: 38px;width:156px;">100</div> |
| | | |
| | | <div id="site-101" class="site" style="height: 38px;line-height: 38px;width:156px;">101</div> |
| | | |
| | | <div id="site-102" class="site" style="height: 38px;line-height: 38px;width:156px;">102</div> |
| | | </div> |
| | | <!--第2列--> |
| | | <div class="site-row site-row-2" id="fool2" style="display: none"> |
| | | <div id="site-200" class="site" style="height: 38px;line-height: 38px;width:156px;">200</div> |
| | | |
| | | <div id="site-201" class="site" style="height: 38px;line-height: 38px;width:156px;">201</div> |
| | | |
| | | <div id="site-202" class="site" style="height: 38px;line-height: 38px;width:156px;">202</div> |
| | | </div> |
| | | |
| | | <!--第3列--> |
| | | <div class="site-row site-row-3" id="fool3" style="display: none"> |
| | | <div id="site-300" class="site" style="height: 38px;line-height: 38px;width:156px;">300</div> |
| | | |
| | | <div id="site-301" class="site" style="height: 38px;line-height: 38px;width:156px;">301</div> |
| | | |
| | | <div id="site-302" class="site" style="height: 38px;line-height: 38px;width:156px;">302</div> |
| | | </div> |
| | | |
| | | <!--楼层按钮--> |
| | | |
| | | <button class="floorBtn btn-16" onclick="changFloor(1)" style="margin-top: 150px">1F</button> |
| | | <button class="floorBtn btn-16" onclick="changFloor(2)" style="margin-top: 200px">2F</button> |
| | | <button class="floorBtn btn-16" onclick="changFloor(3)" style="margin-top: 250px">3F</button> |
| | | <button class="floorBtn btn-16" onclick="testMove()" style="margin-top: 250px">测试移动小车</button> |
| | | |
| | | <!-- 货架 + 堆垛机 + 入库站点 --> |
| | | <div class="main-part"> |
| | | <!-- 第一组 --> |
| | | <div class="lane" style="margin-bottom: 280px"> |
| | | <div class="lane" id="mapDataId" style="margin-bottom: 280px"> |
| | | <div class="sxcar" id="sxcar-1"></div> |
| | | <!-- 货架 --> |
| | | <div class="stock-group"> |
| | | <button class="item">1</button> |
| | | <button class="item">2</button> |
| | | <button class="item">3</button> |
| | | <button class="item">4</button> |
| | | <button class="item" style="border: none;background-color: #6ca7a8"></button> |
| | | <button class="item" style="border: none;background-color: #6ca7a8"></button> |
| | | <button class="item">7</button> |
| | | <button class="item">8</button> |
| | | <button class="item">9</button> |
| | | <button class="item">10</button> |
| | | <button class="item">11</button> |
| | | <button class="item">12</button> |
| | | <button class="item">13</button> |
| | | <span class="row-no">1#</span> |
| | | </div> |
| | | <div class="stock-group"> |
| | | <button class="item">1</button> |
| | | <button class="item">2</button> |
| | | <button class="item">3</button> |
| | | <button class="item">4</button> |
| | | <button class="item" style="border: none;background-color: #6ca7a8"></button> |
| | | <button class="item" style="border: none;background-color: #6ca7a8"></button> |
| | | <button class="item">7</button> |
| | | <button class="item">8</button> |
| | | <button class="item">9</button> |
| | | <button class="item">10</button> |
| | | <button class="item">11</button> |
| | | <button class="item">12</button> |
| | | <button class="item">13</button> |
| | | <span class="row-no">2#</span> |
| | | </div> |
| | | <div class="stock-group"> |
| | | <button class="item">1</button> |
| | | <button class="item">2</button> |
| | | <button class="item">3</button> |
| | | <button class="item">4</button> |
| | | <button class="item" style="border: none;background-color: #6ca7a8"></button> |
| | | <button class="item" style="border: none;background-color: #6ca7a8"></button> |
| | | <button class="item">7</button> |
| | | <button class="item">8</button> |
| | | <button class="item">9</button> |
| | | <button class="item">10</button> |
| | | <button class="item">11</button> |
| | | <button class="item">12</button> |
| | | <button class="item">13</button> |
| | | <span class="row-no">3#</span> |
| | | </div> |
| | | <div class="stock-group"> |
| | | <button class="item">1</button> |
| | | <button class="item">2</button> |
| | | <button class="item">3</button> |
| | | <button class="item">4</button> |
| | | <button class="item" style="border: none;background-color: #6ca7a8"></button> |
| | | <button class="item" style="border: none;background-color: #6ca7a8"></button> |
| | | <button class="item">7</button> |
| | | <button class="item">8</button> |
| | | <button class="item">9</button> |
| | | <button class="item">10</button> |
| | | <button class="item">11</button> |
| | | <button class="item">12</button> |
| | | <button class="item">13</button> |
| | | <span class="row-no">4#</span> |
| | | </div> |
| | | |
| | | <!-- <div class="stock-group">--> |
| | | <!-- <button class="item">1</button>--> |
| | | <!-- <button class="item">2</button>--> |
| | | <!-- <button class="item">3</button>--> |
| | | <!-- <button class="item">4</button>--> |
| | | <!-- <button class="item">5</button>--> |
| | | <!-- <button class="item">6</button>--> |
| | | <!-- <button class="item">7</button>--> |
| | | <!-- <button class="item">8</button>--> |
| | | <!-- <button class="item">9</button>--> |
| | | <!-- <button class="item">10</button>--> |
| | | <!-- <button class="item">11</button>--> |
| | | <!-- <button class="item">12</button>--> |
| | | <!-- <button class="item">13</button>--> |
| | | <!-- <button class="item">14</button>--> |
| | | <!-- <button class="item">15</button>--> |
| | | <!-- <button class="item">16</button>--> |
| | | <!-- <button class="item">17</button>--> |
| | | <!-- <button class="item">18</button>--> |
| | | <!-- <button class="item">19</button>--> |
| | | <!-- <button class="item">20</button>--> |
| | | <!-- <button class="item">21</button>--> |
| | | <!-- <button class="item">22</button>--> |
| | | <!-- <button class="item">23</button>--> |
| | | <!-- <button class="item">24</button>--> |
| | | <!-- <button class="item">25</button>--> |
| | | <!-- <span class="row-no">1#</span>--> |
| | | <!-- </div>--> |
| | | <!-- 堆垛机 --> |
| | | <div class="crn"> |
| | | <hr class="pathway"> |
| | | <div id="crn-1" class="machine"></div> |
| | | </div> |
| | | |
| | | <!-- 货架 --> |
| | | <div class="stock-group"> |
| | | <button class="item">1</button> |
| | | <button class="item">2</button> |
| | | <button class="item">3</button> |
| | | <button class="item">4</button> |
| | | <button class="item">5</button> |
| | | <button class="item">6</button> |
| | | <button class="item">7</button> |
| | | <button class="item">8</button> |
| | | <button class="item">9</button> |
| | | <button class="item">10</button> |
| | | <button class="item">11</button> |
| | | <button class="item">12</button> |
| | | <button class="item">13</button> |
| | | <span class="row-no">5#</span> |
| | | </div> |
| | | <div class="stock-group"> |
| | | <button class="item">1</button> |
| | | <button class="item">2</button> |
| | | <button class="item">3</button> |
| | | <button class="item">4</button> |
| | | <button class="item">5</button> |
| | | <button class="item">6</button> |
| | | <button class="item">7</button> |
| | | <button class="item">8</button> |
| | | <button class="item">9</button> |
| | | <button class="item">10</button> |
| | | <button class="item">11</button> |
| | | <button class="item">12</button> |
| | | <button class="item">13</button> |
| | | <span class="row-no">6#</span> |
| | | </div> |
| | | <div class="stock-group"> |
| | | <button class="item">1</button> |
| | | <button class="item">2</button> |
| | | <button class="item">3</button> |
| | | <button class="item">4</button> |
| | | <button class="item">5</button> |
| | | <button class="item">6</button> |
| | | <button class="item">7</button> |
| | | <button class="item">8</button> |
| | | <button class="item">9</button> |
| | | <button class="item">10</button> |
| | | <button class="item">11</button> |
| | | <button class="item">12</button> |
| | | <button class="item">13</button> |
| | | <span class="row-no">7#</span> |
| | | </div> |
| | | <div class="stock-group"> |
| | | <button class="item">1</button> |
| | | <button class="item">2</button> |
| | | <button class="item">3</button> |
| | | <button class="item">4</button> |
| | | <button class="item">5</button> |
| | | <button class="item">6</button> |
| | | <button class="item">7</button> |
| | | <button class="item">8</button> |
| | | <button class="item">9</button> |
| | | <button class="item">10</button> |
| | | <button class="item">11</button> |
| | | <button class="item">12</button> |
| | | <button class="item">13</button> |
| | | <span class="row-no">8#</span> |
| | | </div> |
| | | <div class="stock-group"> |
| | | <button class="item">1</button> |
| | | <button class="item">2</button> |
| | | <button class="item">3</button> |
| | | <button class="item">4</button> |
| | | <button class="item">5</button> |
| | | <button class="item">6</button> |
| | | <button class="item">7</button> |
| | | <button class="item">8</button> |
| | | <button class="item">9</button> |
| | | <button class="item">10</button> |
| | | <button class="item">11</button> |
| | | <button class="item">12</button> |
| | | <button class="item">13</button> |
| | | <span class="row-no">9#</span> |
| | | </div> |
| | | <div class="stock-group"> |
| | | <button class="item">1</button> |
| | | <button class="item">2</button> |
| | | <button class="item">3</button> |
| | | <button class="item">4</button> |
| | | <button class="item">5</button> |
| | | <button class="item">6</button> |
| | | <button class="item">7</button> |
| | | <button class="item">8</button> |
| | | <button class="item">9</button> |
| | | <button class="item">10</button> |
| | | <button class="item">11</button> |
| | | <button class="item">12</button> |
| | | <button class="item">13</button> |
| | | <span class="row-no">10#</span> |
| | | </div> |
| | | <div class="stock-group"> |
| | | <button class="item">1</button> |
| | | <button class="item">2</button> |
| | | <button class="item">3</button> |
| | | <button class="item">4</button> |
| | | <button class="item">5</button> |
| | | <button class="item">6</button> |
| | | <button class="item">7</button> |
| | | <button class="item">8</button> |
| | | <button class="item">9</button> |
| | | <button class="item">10</button> |
| | | <button class="item">11</button> |
| | | <button class="item">12</button> |
| | | <button class="item">13</button> |
| | | <span class="row-no">11#</span> |
| | | </div> |
| | | <!-- <div class="crn">--> |
| | | <!-- <hr class="pathway">--> |
| | | <!-- <div id="crn-1" class="machine"></div>--> |
| | | <!-- </div>--> |
| | | </div> |
| | | </div> |
| | | </main> |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | $(function (){ |
| | | initMap() |
| | | }) |
| | | |
| | | //计算四向穿梭车图标位置 |
| | | function getCarPosition(x,y) { |
| | | let top = (x * 30) + "px" |
| | | let left = (y * 40 - 40) + "px" //需要减去小车自己所占宽度 |
| | | return [top,left]; |
| | | } |
| | | |
| | | //移动四向穿梭车图标 |
| | | function moveCar(id,x,y) { |
| | | //获取具体位置top和left值 |
| | | let position = getCarPosition(x,y) |
| | | let top = position[0] |
| | | let left = position[1] |
| | | console.log(top,left) |
| | | $("#sxcar-" + id).animate({top: top,left: left}, 1000); |
| | | } |
| | | |
| | | //初始化地图 |
| | | function initMap() { |
| | | //母轨道第一次索引,用于定位小车 |
| | | let firstMotherIndex = [0,0]; |
| | | |
| | | $.ajax({ |
| | | type:"get", |
| | | url: baseUrl + "/static/js/map.json", |
| | | success: (data) => { |
| | | let content = "" |
| | | data.forEach((rowData,index) => { |
| | | let lastGroup = '<div class="stock-group">' |
| | | //去掉上下边缘禁区 |
| | | if(!(index == 0 || data.length - 1 == index)){ |
| | | let row = '<div class="stock-group">'; |
| | | rowData.forEach((colData,idx) => { |
| | | //去掉左右边缘禁区 |
| | | if(!(idx == 0 || rowData.length - 1 == idx)){ |
| | | let col; |
| | | switch (colData){ |
| | | case -1: |
| | | //-1禁区不显示,但是需要占用元素位置 |
| | | col = '<button class="item" style="visibility: hidden">' + idx + '</button>'; |
| | | break; |
| | | case 3: |
| | | //母轨道 |
| | | col = '<button class="item" style="background: #5af;">⇅⇄</button>'; |
| | | if (firstMotherIndex[0] === 0 && firstMotherIndex[1] === 0) { |
| | | //第一次遇到母轨道,则保存该轨道地址(用于小车初始化定位) |
| | | firstMotherIndex = [index,idx] |
| | | } |
| | | break; |
| | | default: |
| | | col = '<button class="item">' + index + '</button>'; |
| | | } |
| | | |
| | | if(data.length - 2 == index){ |
| | | //到达真实数据的最后一行,打上行数标记 |
| | | lastGroup += '<button class="item">' + idx + '#</button>'; |
| | | } |
| | | row += col |
| | | } |
| | | }) |
| | | lastGroup += '</div>'; |
| | | row += lastGroup; |
| | | row += '</div>'; |
| | | content += row |
| | | } |
| | | }) |
| | | |
| | | |
| | | moveCar(1, firstMotherIndex[0], firstMotherIndex[1]); |
| | | $("#mapDataId").append(content) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | function testMove() { |
| | | let json = "[{\n" + |
| | | "\t\t\"x\": 5,\n" + |
| | | "\t\t\"y\": 5\n" + |
| | | "\t},\n" + |
| | | "\t{\n" + |
| | | "\t\t\"x\": 6,\n" + |
| | | "\t\t\"y\": 5\n" + |
| | | "\t},\n" + |
| | | "\t{\n" + |
| | | "\t\t\"x\": 7,\n" + |
| | | "\t\t\"y\": 5\n" + |
| | | "\t},\n" + |
| | | "\t{\n" + |
| | | "\t\t\"x\": 8,\n" + |
| | | "\t\t\"y\": 5\n" + |
| | | "\t},\n" + |
| | | "\t{\n" + |
| | | "\t\t\"x\": 9,\n" + |
| | | "\t\t\"y\": 5\n" + |
| | | "\t},\n" + |
| | | "\t{\n" + |
| | | "\t\t\"x\": 10,\n" + |
| | | "\t\t\"y\": 5\n" + |
| | | "\t},\n" + |
| | | "\t{\n" + |
| | | "\t\t\"x\": 11,\n" + |
| | | "\t\t\"y\": 5\n" + |
| | | "\t},\n" + |
| | | "\t{\n" + |
| | | "\t\t\"x\": 11,\n" + |
| | | "\t\t\"y\": 6\n" + |
| | | "\t},\n" + |
| | | "\t{\n" + |
| | | "\t\t\"x\": 12,\n" + |
| | | "\t\t\"y\": 6\n" + |
| | | "\t},\n" + |
| | | "\t{\n" + |
| | | "\t\t\"x\": 13,\n" + |
| | | "\t\t\"y\": 6\n" + |
| | | "\t},\n" + |
| | | "\t{\n" + |
| | | "\t\t\"x\": 14,\n" + |
| | | "\t\t\"y\": 6\n" + |
| | | "\t},\n" + |
| | | "\t{\n" + |
| | | "\t\t\"x\": 15,\n" + |
| | | "\t\t\"y\": 6\n" + |
| | | "\t},\n" + |
| | | "\t{\n" + |
| | | "\t\t\"x\": 16,\n" + |
| | | "\t\t\"y\": 6\n" + |
| | | "\t},\n" + |
| | | "\t{\n" + |
| | | "\t\t\"x\": 17,\n" + |
| | | "\t\t\"y\": 6\n" + |
| | | "\t},\n" + |
| | | "\t{\n" + |
| | | "\t\t\"x\": 18,\n" + |
| | | "\t\t\"y\": 6\n" + |
| | | "\t},\n" + |
| | | "\t{\n" + |
| | | "\t\t\"x\": 19,\n" + |
| | | "\t\t\"y\": 6\n" + |
| | | "\t},\n" + |
| | | "\t{\n" + |
| | | "\t\t\"x\": 19,\n" + |
| | | "\t\t\"y\": 7\n" + |
| | | "\t},\n" + |
| | | "\t{\n" + |
| | | "\t\t\"x\": 19,\n" + |
| | | "\t\t\"y\": 8\n" + |
| | | "\t},\n" + |
| | | "\t{\n" + |
| | | "\t\t\"x\": 20,\n" + |
| | | "\t\t\"y\": 8\n" + |
| | | "\t},\n" + |
| | | "\t{\n" + |
| | | "\t\t\"x\": 21,\n" + |
| | | "\t\t\"y\": 8\n" + |
| | | "\t},\n" + |
| | | "\t{\n" + |
| | | "\t\t\"x\": 22,\n" + |
| | | "\t\t\"y\": 8\n" + |
| | | "\t},\n" + |
| | | "\t{\n" + |
| | | "\t\t\"x\": 23,\n" + |
| | | "\t\t\"y\": 8\n" + |
| | | "\t}\n" + |
| | | "]"; |
| | | json = JSON.parse(json) |
| | | json.forEach((item,index) => { |
| | | moveCar(1, item.x, item.y); |
| | | }) |
| | | |
| | | } |
| | | |
| | | // 小车偏移动画 |
| | | function carAnimate(id, target) { |
| | | if (id === 1000) { |