mul.html 5.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. {%set loadUrl = '/device/mul?ajax=1' %}
  2. {% if data['ajax'] == False %}
  3. <!DOCTYPE html>
  4. <html>
  5. <head>
  6. {%include '../inc/header.html'%}
  7. <link href="{{static_url('mobile/css/station.css')}}" rel="stylesheet">
  8. <style>
  9. .buttons dt {
  10. margin-top: -9px;
  11. padding-bottom: 9px;
  12. }
  13. .buttons .btn-switch {
  14. border-radius: 0px;
  15. height:32px;
  16. width: 40px;
  17. font-size:12px;
  18. cursor: pointer;
  19. outline:none;
  20. margin-left:-9px;
  21. }
  22. .buttons .open {
  23. color:white;
  24. }
  25. .buttons .disabled {
  26. color:#bababa;
  27. }
  28. .buttons .loading {
  29. background-image: url(data:image/gif;base64,R0lGODlhIAAgALMAAP///7Ozs/v7+9bW1uHh4fLy8rq6uoGBgTQ0NAEBARsbG8TExJeXl/39/VRUVAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQFBQAAACwAAAAAIAAgAAAE5xDISSlLrOrNp0pKNRCdFhxVolJLEJQUoSgOpSYT4RowNSsvyW1icA16k8MMMRkCBjskBTFDAZyuAEkqCfxIQ2hgQRFvAQEEIjNxVDW6XNE4YagRjuBCwe60smQUDnd4Rz1ZAQZnFAGDd0hihh12CEE9kjAEVlycXIg7BAsMB6SlnJ87paqbSKiKoqusnbMdmDC2tXQlkUhziYtyWTxIfy6BE8WJt5YEvpJivxNaGmLHT0VnOgGYf0dZXS7APdpB309RnHOG5gDqXGLDaC457D1zZ/V/nmOM82XiHQjYKhKP1oZmADdEAAAh+QQFBQAAACwAAAAAGAAXAAAEchDISasKNeuJFKoHs4mUYlJIkmjIV54Soypsa0wmLSnqoTEtBw52mG0AjhYpBxioEqRNy8V0qFzNw+GGwlJki4lBqx1IBgjMkRIghwjrzcDti2/Gh7D9qN774wQGAYOEfwCChIV/gYmDho+QkZKTR3p7EQAh+QQFBQAAACwBAAA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rBePS4bQdQZBdR5IcHmWEgUFQgWKaKbWwwSIhc4LonsXhBSCsQoOSScGQDJiWwOHQnAxWBIYJNXEoFCiEWDI9jCzESey7GwMM5doEwW4jJoypQQ743u1WcTV0CgFzbhJ5XClfHYd/EwZnHoYVDgiOfHKQNREAIfkEBQUAAAAsAAAPABkAEQAABGeQqUQruDjrW3vaYCZ5X2ie6EkcKaooTAsi7ytnTq046BBsNcTvItz4AotMwKZBIC6H6CVAJaCcT0CUBTgaTg5nTCu9GKiDEMPJg5YBBOpwlnVzLwtqyKnZagZWahoMB2M3GgsHSRsRACH5BAUFAAAALAEACAARABgAAARcMKR0gL34npkUyyCAcAmyhBijkGi2UW02VHFt33iu7yiDIDaD4/erEYGDlu/nuBAOJ9Dvc2EcDgFAYIuaXS3bbOh6MIC5IAP5Eh5fk2exC4tpgwZyiyFgvhEMBBEAIfkEBQUAAAAsAAACAA4AHQAABHMQyAnYoViSlFDGXBJ808Ep5KRwV8qEg+pRCOeoioKMwJK0Ekcu54h9AoghKgXIMZgAApQZcCCu2Ax2O6NUud2pmJcyHA4L0uDM/ljYDCnGfGakJQE5YH0wUBYBAUYfBIFkHwaBgxkDgX5lgXpHAXcpBIsRADs=);
  30. background-position: 50%;
  31. background-repeat: no-repeat;
  32. background-size: 15px 15px;
  33. }
  34. </style>
  35. </head>
  36. <body>
  37. {%set data['topName'] = '批量控制' %}
  38. {%set data['topUrl'] = '/device' %}
  39. {%include '../inc/top.html'%}
  40. <section class="has-bbar">
  41. <div id="loadMain">
  42. {% end %}
  43. {% for value in data['list'] %}
  44. {%set layer = '' %}
  45. {% if value['oper'] %}
  46. {%set layer = value['oper'] %}
  47. {% end %}
  48. {% if '成功' in layer or '批量' in layer or '正在' in layer %}
  49. {%set hint = 'hint--info' %}
  50. {% else %}
  51. {%set hint = 'hint--error' %}
  52. {% end %}
  53. {% if value['device_type'] == 1 %}
  54. <li class="form-input">
  55. <label><span>{{value['name']}}</span><p><a {% if layer %}data-hint="{{layer}}"{% end %} href="javascript:;" data-status="{% if value['value'] == '1' %}2{% else %}1{% end %}" onclick="Farm.Switch(this, '/device/mul', '{{value['id']}}')" class="{% if layer %}hint--left {{hint}} hint--always loading{% end %} btn btn-switch {% if value['value'] == '1' %}open{% end %}"><i></i></a></p></label>
  56. </li>
  57. {% else %}
  58. <li class="form-input buttons">
  59. <label><span>{{value['name']}}</span><p>
  60. <button {% if layer %}data-hint="{{layer}}"{% end %} onclick="Farm.Button(this, '/device/mul', '{{value['id']}}', 1, '#button_down_{{value['id']}}')" id="button_up_{{value['id']}}" class="btn btn-switch {% if layer and value['value'] in ('1','4') %}hint--left {{hint}} hint--always loading{% end %} {% if value['value'] in ('2','3') %}disabled{% end %} {% if value['value'] in ('1','4') %}open{% end %}">升</button>
  61. <button {% if layer %}data-hint="{{layer}}"{% end %} onclick="Farm.Button(this, '/device/mul', '{{value['id']}}', 5)" id="button_stop_{{value['id']}}" class="btn btn-switch {% if layer and value['value'] == '5' %}hint--left {{hint}} hint--always loading{% end %} {% if value['value'] == '5' %}open{% end %}">停</button>
  62. <button {% if layer %}data-hint="{{layer}}"{% end %} onclick="Farm.Button(this, '/device/mul', '{{value['id']}}', 2, '#button_up_{{value['id']}}')" id="button_down_{{value['id']}}" class="btn btn-switch {% if layer and value['value'] in ('2','3') %}hint--left {{hint}} hint--always loading{% end %} {% if value['value'] in ('1','4') %}disabled{% end %} {% if value['value'] in ('2','3') %}open{% end %}">降</button>
  63. </p></label>
  64. </dt>
  65. {% end %}
  66. {% end %}
  67. {% if data['ajax'] == False %}
  68. </div>
  69. </section>
  70. {%include '../inc/script.html'%}
  71. {%include 'inc/load.html'%}
  72. </body>
  73. </html>
  74. {% end %}