env_update.html 1.8 KB

123456789101112131415161718192021222324252627282930313233
  1. <input type="hidden" name="id" id="id" value="{% if 'info' in data and data['info'] and 'id' in data['info'] and data['info']['id'] > 0 %}{{data['info']['id']}}{% end %}" />
  2. <div class="form">
  3. <label><span>环境名称</span><input type="text" name="update_name" id="update_name" value="{% if 'info' in data and data['info'] and 'name' in data['info'] and data['info']['name'] %}{{data['info']['name']}}{% end %}" placeholder="环境名称" /></label>
  4. <label><span>环境排序:</span><input type="text" name="update_inorder" id="update_inorder" value="{% if 'info' in data and data['info'] and 'inorder' in data['info'] and data['info']['inorder'] %}{{data['info']['inorder']}}{% end %}" placeholder="排序,数字越小越靠前" /></label>
  5. <label><span>选择设备:</span></label>
  6. <div class="flex-cont">
  7. <div class="scroller">
  8. <ul>
  9. {% for v in data['gateway'] %}
  10. <li tab-id="{{v['id']}}" id="gateway_{{v['id']}}"><a href="javascript:;">{{v['name']}}</a></li>
  11. {% end %}
  12. </ul>
  13. </div>
  14. <div class="scroller">
  15. {% for k,v in enumerate(data['gateway']) %}
  16. <ul tab-cont-id="{{v['id']}}" {% if k == 0 %}style="display: block;"{% end %}>
  17. {% if data['device'] and v['id'] in data['device'] %}
  18. {% for d in data['device'][v['id']] %}
  19. <li><label><input type="radio" style="width: 14px;
  20. height: 14px;
  21. vertical-align: middle;
  22. padding: 0;
  23. margin: 0 10px 0 0;"name="update_device_id" id="update_device_id" value="{{d['id']}}" data-parent="{{v['id']}}" {% if 'device_id' in data['info'] and d['id'] == data['info']['device_id'] %}checked{% end %}><span>{{d['name']}}</span></label></li>
  24. {% end %}
  25. {% end %}
  26. </ul>
  27. {% end %}
  28. </div>
  29. </div>
  30. </div>