| | |
| | | <body> |
| | | <div id="root"> |
| | | <div class="head"> |
| | | <h1>自动仓库WCS监控图</h1> |
| | | <h6>AUTOMATIC WAREHOUSE WCS MONITORING DIAGRAM</h6> |
| | | <div class="head-left"> |
| | | <h1>自动仓库WCS监控图</h1> |
| | | <h6>AUTOMATIC WAREHOUSE WCS MONITORING DIAGRAM</h6> |
| | | </div> |
| | | <div class="head-right"> |
| | | <img src="../static/images/zy-logo.png" alt="中扬" height="44" width="80" > |
| | | </div> |
| | | </div> |
| | | <!--第1列(宽度 70px) --> |
| | | <div class="site-row site-row-1"> |
| | |
| | | </div> |
| | | <!-- 第4列(宽度 70px 140px) --> |
| | | |
| | | <!--<!– 第5列(宽度 70px) –>--> |
| | | <div class="site-row site-row-5"> |
| | | <!--<!– 第4列(宽度 70px) –>--> |
| | | <div class="site-row site-row-4"> |
| | | <div id="site-163" class="site" style="height: 28.5px;line-height: 28.5px">163</div> |
| | | <div id="site-162" class="site" style="height: 28.5px;line-height: 28.5px">162</div> |
| | | <div id="site-161" class="site" style="height: 71px;line-height: 71px">161</div> |
| | |
| | | <div id="site-151" class="site" style="height: 28.5px;line-height: 28.5px">151</div> |
| | | <div id="site-150" class="site" style="height: 28.5px;line-height: 28.5px">150</div> |
| | | </div> |
| | | <!--<!– 第6列(宽度 70px) –>--> |
| | | <div class="site-row site-row-6"> |
| | | <!--<!– 第5列(宽度 70px) –>--> |
| | | <div class="site-row site-row-5"> |
| | | <div id="site-120" class="site" style="height: 28.5px;line-height: 28.5px">120</div> |
| | | <div id="site-121" class="site" style="height: 28.5px;line-height: 28.5px">121</div> |
| | | <div id="site-122" class="site" style="height: 71px;line-height: 71px">122</div> |
| | |
| | | <div id="site-131" class="site" style="height: 71px;line-height: 71px">131</div> |
| | | <div id="site-132" class="site" style="height: 28.5px;line-height: 28.5px">132</div> |
| | | <div id="site-133" class="site" style="height: 28.5px;line-height: 28.5px">133</div> |
| | | </div> |
| | | <!--<!– 第6列(宽度 70px) –>--> |
| | | <div class="site-row site-row-6"> |
| | | <div id="site-183" class="site">183</div> |
| | | <div id="site-184" class="site" style="margin-top: 21px">184</div> |
| | | <div id="site-185" class="site" style="margin-top: 73px">185</div> |
| | | <div id="site-186" class="site" style="margin-top: 21px">186</div> |
| | | <div id="site-187" class="site" style="margin-top: 73px">187</div> |
| | | <div id="site-188" class="site" style="margin-top: 21px">188</div> |
| | | <div id="site-189" class="site" style="margin-top: 73px">189</div> |
| | | <div id="site-190" class="site" style="margin-top: 21px">190</div> |
| | | <div id="site-191" class="site" style="margin-top: 73px">191</div> |
| | | <div id="site-192" class="site" style="margin-top: 21px">192</div> |
| | | </div> |
| | | |
| | | <!-- 货架 + 堆垛机 + 入库站点 --> |
| | |
| | | <div class="body-head">输送线状态</div> |
| | | <div class="state states"> |
| | | <span>运输线总数</span> |
| | | <span class="line-ss">45</span> |
| | | <span class="line-ss">58</span> |
| | | </div> |
| | | <div class="button"><span>所有状态</span></div> |
| | | <div class="button item-group"> |
| | |
| | | </body> |
| | | </html> |
| | | <script> |
| | | var tData = [] |
| | | var tData1 = [] |
| | | var tData2 = [] |
| | | var tData3 = [] |
| | | function getCodeData(){ |
| | | $.ajax({ |
| | | url:baseUrl +'/xgmwcs/console/barcode/output/site', |
| | | url:baseUrl +'/console/barcode/output/site', |
| | | method:'GET', |
| | | success:function (res) { |
| | | console.log(res) |
| | | if(res.code === 200){ |
| | | tData = res.data |
| | | tData = eval(res.data); |
| | | if(tData.length<=5){ |
| | | tData1 = tData |
| | | } else if (tData.length<=10){ |
| | | tData1 = tData.slice(0,5) |
| | | tData.splice(0,5) |
| | | tData2 = tData |
| | | } else if(tData.length<=15){ |
| | | tData1 = tData.slice(0,5) |
| | | tData2 = tData.slice(6,10) |
| | | tData.splice(0,10) |
| | | tData3 = tData |
| | | } else { |
| | | tData = tData.slice(-15) |
| | | tData1 = tData.slice(-15) |
| | | tData2 = tData.slice(-10) |
| | | tData3 = tData.slice(-5) |
| | | |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | setInterval(getCodeData(),1000) |
| | | var tData = [] |
| | | var tDate1 = [] |
| | | var tDate2 = [] |
| | | var tDate3 = [] |
| | | if(tData.length<=5){ |
| | | tData1 = tData |
| | | } else if (tData.length<=10){ |
| | | tDate1 = tData.slice(0,5) |
| | | tData.splice(0,5) |
| | | tDate2 = tData |
| | | console.log(tDate2) |
| | | } else if(tData.length<=15){ |
| | | tDate1 = tData.slice(0,5) |
| | | tDate2 = tData.slice(6,10) |
| | | tData.splice(0,10) |
| | | tDate3 = tData |
| | | console.log(tDate3) |
| | | } else { |
| | | tData = tData.slice(-15) |
| | | tDate1 = tData.slice(-15) |
| | | tDate2 = tData.slice(-10) |
| | | tDate3 = tData.slice(-5) |
| | | setInterval(function () { |
| | | getCodeData(); |
| | | renderBarCode(); |
| | | }, 1000) |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | function renderBarCode() { |
| | | for (var i = 0;i<tDate1.length;i++){ |
| | | var str1 = '<li><span>' + tDate1[i].barcode + '</span><span class="right">' + tDate1[i].time + '</span></li>' |
| | | for (var i = 0;i<tData1.length;i++){ |
| | | var str1 = '<li><span>' + tData1[i].barcode + '</span><span class="right">' + tData1[i].time + '</span></li>' |
| | | $('#barcode1').append(str1) |
| | | } |
| | | for(var j = 0;j<tDate2.length;j++){ |
| | | var str2 = '<li><span>' + tDate2[j].barcode + '</span><span class="right">' + tDate2[j].time + '</span></li>' |
| | | for(var j = 0;j<tData2.length;j++){ |
| | | var str2 = '<li><span>' + tData2[j].barcode + '</span><span class="right">' + tData2[j].time + '</span></li>' |
| | | $('#barcode2').append(str2) |
| | | } |
| | | for(var k = 0;k<tDate3.length;k++){ |
| | | var str3 = '<li><span>' + tDate3[k].barcode + '</span><span class="right">' + tDate3[k].time + '</span></li>' |
| | | for(var k = 0;k<tData3.length;k++){ |
| | | var str3 = '<li><span>' + tData3[k].barcode + '</span><span class="right">' + tData3[k].time + '</span></li>' |
| | | $('#barcode3').append(str3) |
| | | } |
| | | } |
| | | setInterval(renderBarCode(),1000) |
| | | </script> |
| | | <script type="text/javascript"> |
| | | // 弹窗站点信息 |
| | |
| | | for (var val in res.data) { |
| | | var find = $("#siteWindow").find(":input[name='" + val + "']"); |
| | | if (find[0].type==='text') { |
| | | find.val(data[val]); |
| | | find.val(res.data[val]); |
| | | } else if (find[0].type === 'checkbox') { |
| | | find.attr("checked", data[val] === 'Y'); |
| | | find.attr("checked", res.data[val] === 'Y'); |
| | | } |
| | | } |
| | | } |
| | |
| | | }, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | console.log(res) |
| | | layer.close(index); |
| | | if (res.code === 200){ |
| | | if (res.data.status) { |