| | |
| | | </div> |
| | | <div id="checked" style="overflow-y: scroll;height: 80%;border: 1px solid #888" > |
| | | <label for=""><input type="checkbox" name="monitor" checked="checked" value="1">1号显示器</label> |
| | | <label for=""><input type="checkbox" name="monitor" >2号显示器</label> |
| | | <label for=""><input type="checkbox" name="monitor">3号显示器</label> |
| | | <label for=""><input type="checkbox" name="monitor" value="113">2号显示器</label> |
| | | <label for=""><input type="checkbox" name="monitor" value="3">3号显示器</label> |
| | | <label for=""><input type="checkbox" name="monitor">4号显示器</label> |
| | | <label for=""><input type="checkbox" name="monitor">5号显示器</label> |
| | | <label for=""><input type="checkbox" name="monitor">6号显示器</label> |
| | |
| | | </body> |
| | | </html> |
| | | <script> |
| | | var inputValue = '' |
| | | $(function() { |
| | | $(".label").click(function() { |
| | | $(this).addClass("abc").siblings().removeClass("abc"); |
| | |
| | | }); |
| | | $('#sendMessage').click(function () { |
| | | var sendMessage = $('#sendContent').val() |
| | | $('input:checkbox[name=monitor]').each(function () { |
| | | if ($(this).is(':checked')) { |
| | | console.log(sendMessage) |
| | | } else { |
| | | console.log('m') |
| | | inputValue = '' |
| | | $('input:checkbox[name=monitor]:checked').each(function () { |
| | | var ledId = parseInt($(this).val()) |
| | | $.ajax({ |
| | | url: baseUrl+"/monitor/led/add/program", |
| | | data: {ledId:ledId,msg:sendMessage}, |
| | | method: 'GET', |
| | | success: function (res) { |
| | | console.log(res) |
| | | } |
| | | }) |
| | | }) |
| | | |
| | | }) |
| | |
| | | var sendMessage = 'K' |
| | | $('input:checkbox[name=monitor]').each(function () { |
| | | if ($(this).is(':checked')) { |
| | | console.log(sendMessage) |
| | | console.log($(this).find(':checked')) |
| | | } else { |
| | | console.log('m') |
| | | } |
| | |
| | | }); |
| | | |
| | | var crnId = 1; |
| | | var lcdId = 110; |
| | | var lcdId = 100; |
| | | var lcdData = 'TEST DATA' |
| | | var lcdControll = 1; |
| | | $('.lcd').click(function () { |
| | |
| | | switch (id) { |
| | | case 1: |
| | | crnId = 1; |
| | | lcdId = 113; |
| | | lcdId = 100; |
| | | break; |
| | | case 2: |
| | | crnId = 2; |
| | |
| | | getOther2(crnId,lcdId) |
| | | getInfo(lcdId); |
| | | getError(lcdId); |
| | | getProgram(lcdId) |
| | | }, 1000); |
| | | |
| | | |
| | |
| | | }); |
| | | } |
| | | |
| | | function getProgram(ledId) { |
| | | console.log(ledId) |
| | | $.ajax({ |
| | | url: baseUrl+"/monitor/led/program", |
| | | data: {ledId:ledId}, |
| | | method: 'GET', |
| | | success: function (res) { |
| | | console.log(res) |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | |
| | | |