1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <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 %}" />
- <input type="hidden" name="update_loop" id="update_loop" value="{% if 'info' in data and data['info'] and 'loop' in data['info'] and data['info']['loop'] %}{{data['info']['loop']}}{% end %}" />
- <div class="form">
- <label><span>设备条件:</span>
- <select id="update_gateway" onchange="device($(this))" name="update_gateway_id" class="w138">
- {% for v in data['gateway'] %}
- <option value="{{v['id']}}" {% if 'info' in data and data['info'] and 'gateway_id' in data['info'] and data['info']['gateway_id'] == v['id'] %}selected{% end %}>{{v['name']}}</option>
- {% end %}
- </select>
- <select id="update_device" name="update_device_id" class="w138">
- {% for v in data['device_list'] %}
- <option value="{{v['id']}}" {% if 'info' in data and data['info'] and 'device_id' in data['info'] and data['info']['device_id'] == v['id'] %}selected{% end %}>{{v['name']}}</option>
- {% end %}
- </select>
- </label>
- <div class="lavel"><span>条件判断:</span>
- <select id="update_condition" name="update_condition" class="w138">
- {% for v in data['condition'] %}
- <option value="{{v['id']}}" {% if 'info' in data and data['info'] and 'condition' in data['info'] and data['info']['condition'] == v['id'] %}selected{% end %}>{{v['name']}}</option>
- {% end %}
- </select>
- <input type="text" name="update_value" id="update_value" value="{% if 'info' in data and data['info'] and 'value' in data['info'] and data['info']['value'] %}{{data['info']['value']}}{% end %}" placeholder="判断条件的值" />
- </div>
- <label><span>执行结果:</span>
- <select id="update_oper" name="update_oper">
- {% for v in data['opers'] %}
- <option value="{{v['id']}}" {% if 'info' in data and data['info'] and 'oper' in data['info'] and data['info']['oper'] == v['id'] %}selected{% end %}>{{v['name']}}</option>
- {% end %}
- </select>
- </label>
- <label>
- <input type="checkbox" name="update_notice" id="update_notice" value="1" {% if 'info' in data and data['info'] and 'notice' in data['info'] and data['info']['notice'] == True %}checked{% end %} style="width:20px;" />报警提醒
- </label>
- {%include 'select.html'%}
- </div>
|