| | |
| | | <script type="text/javascript" src="../static/js/common.js"></script> |
| | | <script type="text/javascript" src="../static/js/layer/layer.js"></script> |
| | | <style> |
| | | .demoBtn { |
| | | vertical-align: middle; |
| | | width: 20%; |
| | | height: 25px; |
| | | left: 0; |
| | | top: 0; |
| | | text-shadow: inherit; |
| | | font-size: 15px; |
| | | margin-left: 5px; |
| | | margin-right: 5px; |
| | | display: inline-block; |
| | | background-color: #FF5722; |
| | | border: none; |
| | | color: #FFF; |
| | | box-shadow: 1px 1px 5px #B6B6B6; |
| | | border-radius: 3px; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .demoBtn:hover { |
| | | opacity: 0.8 |
| | | } |
| | | .demoBtn:focus { |
| | | outline: 0; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | |
| | | <h2>执行中的命令</h2> |
| | | <div class="crn-command-item"> |
| | | <label>1#</label> |
| | | <span> </span> |
| | | <button id="demoBtn-1" class="demoBtn" onclick="demoSwitch(this.id)">演示</button> |
| | | <!-- <span> </span>--> |
| | | <input id="crn1" disabled="disabled"> |
| | | </div> |
| | | <div class="crn-command-item"> |
| | | <label>2#</label> |
| | | <button id="demoBtn-2" class="demoBtn" onclick="demoSwitch(this.id)">演示</button> |
| | | <!-- <span> </span>--> |
| | | <input id="crn2" disabled="disabled"> |
| | | </div> |
| | | </div> |
| | | <!-- 堆垛机状态位信息 --> |
| | |
| | | </div> |
| | | <div class="select-container-item"> |
| | | <span>排</span> |
| | | <label><input id="sourceRow" type="number" name="points" min="0" style="background-color: #a9eeff" /></label> |
| | | <label><input id="sourceRow" type="number" name="points" min="1" style="background-color: #a9eeff" value="1" /></label> |
| | | </div> |
| | | <div class="select-container-item"> |
| | | <span>列</span> |
| | | <label><input id="sourceBay" type="number" name="points" min="0" style="background-color: #a9eeff" /></label> |
| | | <label><input id="sourceBay" type="number" name="points" min="0" style="background-color: #a9eeff" value="0" /></label> |
| | | </div> |
| | | <div class="select-container-item"> |
| | | <span>层</span> |
| | | <label><input id="sourceLev" type="number" name="points" min="0" style="background-color: #a9eeff" /></label> |
| | | <label><input id="sourceLev" type="number" name="points" min="1" style="background-color: #a9eeff" value="1" /></label> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <div class="select-container-item"> |
| | | <span>排</span> |
| | | <label><input id="row" type="number" name="points" min="0" style="background-color: #a9eeff" /></label> |
| | | <label><input id="row" type="number" name="points" min="1" style="background-color: #a9eeff" value="1" /></label> |
| | | </div> |
| | | <div class="select-container-item"> |
| | | <span>列</span> |
| | | <label><input id="bay" type="number" name="points" min="0" style="background-color: #a9eeff" /></label> |
| | | <label><input id="bay" type="number" name="points" min="0" style="background-color: #a9eeff" value="0" /></label> |
| | | </div> |
| | | <div class="select-container-item"> |
| | | <span>层</span> |
| | | <label><input id="lev" type="number" name="points" min="0" style="background-color: #a9eeff" /></label> |
| | | <label><input id="lev" type="number" name="points" min="1" style="background-color: #a9eeff" value="1" /></label> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | } else if (res.code === 403) { |
| | | window.location.href = baseUrl + "/login"; |
| | | } else { |
| | | alert(res.msg); |
| | | console.log(res.msg); |
| | | } |
| | | } |
| | | }) |
| | |
| | | } else if (res.code === 403){ |
| | | window.location.href = baseUrl+"/login"; |
| | | } else { |
| | | alert(res.msg); |
| | | console.log(res.msg); |
| | | } |
| | | } |
| | | }); |
| | |
| | | } else if (res.code === 403){ |
| | | window.location.href = baseUrl+"/login"; |
| | | } else { |
| | | alert(res.msg); |
| | | console.log(res.msg); |
| | | } |
| | | } |
| | | }); |
| | |
| | | |
| | | // 手动复位 |
| | | function handleReset() { |
| | | http.post(baseUrl+"/crn/operator/clearCommand", getReqParam(), function (res) { |
| | | http.post(baseUrl+"/crn/operator/handleReset", getReqParam(), function (res) { |
| | | layer.msg(res.msg); |
| | | }); |
| | | } |
| | |
| | | } else if (res.code === 403) { |
| | | window.location.href = baseUrl + "/login"; |
| | | } else { |
| | | alert(res.msg); |
| | | console.log(res.msg); |
| | | } |
| | | } |
| | | }) |
| | |
| | | crnOutputDom.scrollTop = crnOutputDom.scrollHeight; |
| | | } |
| | | |
| | | // function demoSwitch(el) { |
| | | // var crnId = el.split("-")[1]; |
| | | // layer.prompt({title: '请输入口令,并开始'+crnId+"号堆垛机演示", formType: 1, shadeClose: true}, function (pass, idx) { |
| | | // layer.close(idx); |
| | | // doDemo(crnId, pass); // 停止wcs系统 |
| | | // }); |
| | | // } |
| | | |
| | | function demoSwitch(el) { |
| | | var crnId = el.split("-")[1]; |
| | | layer.confirm(crnId + ' 号堆垛机确定开始演示吗?', function(){ |
| | | doDemo(crnId, 'root'); // 停止wcs系统 |
| | | }); |
| | | } |
| | | |
| | | function doDemo(crnId, password) { |
| | | // 加载tips |
| | | var index = layer.load(1, { |
| | | shade: [0.1,'#fff'] |
| | | }); |
| | | $.ajax({ |
| | | url: baseUrl+ "/crn/demo/switch", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | // async: false, |
| | | data: { |
| | | crnId: Number(crnId), |
| | | password: password |
| | | }, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(index); |
| | | if (res.code === 200){ |
| | | layer.msg(res.msg, {icon: 1}); |
| | | } else if (res.code === 403){ |
| | | window.location.href = baseUrl+"/login"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }); |
| | | |
| | | } |
| | | |
| | | </script> |
| | | </html> |