|  |  | 
 |  |  |                     <div data-steNo="1" class="ste-command-item"> | 
 |  |  |                         <label>1#</label> | 
 |  |  |                         <button class="demoBtn pos-btn">数据维护</button> | 
 |  |  |                         <button id="mode-1" class="demoBtn mode-btn" > - </button> | 
 |  |  |                         <button id="mode-1" class="demoBtn mode-btn" >设备信息</button> | 
 |  |  |                     </div> | 
 |  |  |                 </div> | 
 |  |  |                 <!-- 堆垛机状态位信息 --> | 
 |  |  | 
 |  |  |         }) | 
 |  |  |     }) | 
 |  |  |  | 
 |  |  |     var layerIdx0; | 
 |  |  |     $(document).on('click ','.mode-btn', function () { | 
 |  |  |         let steNo = Number($(this).parent().attr("data-steNo")); | 
 |  |  |         layer.confirm("改变" + steNo + ' 号穿梭车在线状态吗?', function(){ | 
 |  |  |             var index = layer.load(1, { | 
 |  |  |                 shade: [0.1,'#fff'] | 
 |  |  |             }); | 
 |  |  |             $.ajax({ | 
 |  |  |                 url: baseUrl+ "/ste/mode/switch", | 
 |  |  |                 headers: {'token': localStorage.getItem('token')}, | 
 |  |  |                 data: { | 
 |  |  |                     steNo: Number(steNo), | 
 |  |  |                     password: 'root' | 
 |  |  |                 }, | 
 |  |  |                 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}); | 
 |  |  |                     } | 
 |  |  |                 } | 
 |  |  |             }); | 
 |  |  |         }); | 
 |  |  |         layerIdx0 = layer.open({ | 
 |  |  |             type: 1, | 
 |  |  |             title: false, | 
 |  |  |             shadeClose: true, | 
 |  |  |             offset: [$(this).offset().top + 30 + 'px', $(this).offset().left + 'px'], | 
 |  |  |             anim: 5, | 
 |  |  |             shade: [0], | 
 |  |  |             area: ['310px', '370px'], | 
 |  |  |             closeBtn: 0, | 
 |  |  |             content: $("#ste-detl"), | 
 |  |  |             success: function(layero, index){ | 
 |  |  |                 http.get(baseUrl+ "/ste/sensor/detl/"+steNo, null, function (res) { | 
 |  |  |                     $('#steNo').val(steNo); | 
 |  |  |  | 
 |  |  |                 }) | 
 |  |  |             }, | 
 |  |  |             end: function () { | 
 |  |  |                 $('#steNo').val(""); | 
 |  |  |             } | 
 |  |  |         }) | 
 |  |  |     }) | 
 |  |  |  | 
 |  |  |     // $(document).on('click ','.mode-btn', function () { | 
 |  |  |     //     let steNo = Number($(this).parent().attr("data-steNo")); | 
 |  |  |     //     layer.confirm("改变" + steNo + ' 号穿梭车在线状态吗?', function(){ | 
 |  |  |     //         var index = layer.load(1, { | 
 |  |  |     //             shade: [0.1,'#fff'] | 
 |  |  |     //         }); | 
 |  |  |     //         $.ajax({ | 
 |  |  |     //             url: baseUrl+ "/ste/mode/switch", | 
 |  |  |     //             headers: {'token': localStorage.getItem('token')}, | 
 |  |  |     //             data: { | 
 |  |  |     //                 steNo: Number(steNo), | 
 |  |  |     //                 password: 'root' | 
 |  |  |     //             }, | 
 |  |  |     //             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}); | 
 |  |  |     //                 } | 
 |  |  |     //             } | 
 |  |  |     //         }); | 
 |  |  |     //     }); | 
 |  |  |     // }) | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  | 
 |  |  |                         steStateTableFullRows = table.length; | 
 |  |  |                     } | 
 |  |  |                     for (let i=1;i<=table.length;i++){ | 
 |  |  |                         $("#mode-"+table[i-1].steNo).html(table[i-1].statusVal===0?'联机':'脱机'); | 
 |  |  |                         // $("#mode-"+table[i-1].steNo).html(table[i-1].statusVal===0?'联机':'脱机'); | 
 |  |  |                         let tr = tableEl.find("tr").eq(i); | 
 |  |  |                         setVal(tr.children("td").eq(0), table[i-1].steNo); | 
 |  |  |                         setVal(tr.children("td").eq(1), table[i-1].statusType); |