<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增目标')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-strategytarget-add">
            <div  hidden class="form-group">
                <label class="col-sm-3 control-label">生效条件ID：</label>
                <div class="col-sm-8">
<!--                    <input name="conditionId" class="form-control" type="text">-->
                    <select name="conditionId" hidden class="form-control">
                        <option th:each="cond:${condList}" th:selected="${condId == cond.id}" th:value="${cond.id}" th:text="${cond.id}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">目标类型：</label>
                <div class="col-sm-8">
                    <label class="radio-box">
                        <input type="radio" name="targetType" value="1">灯光
                    </label>
                    <label class="radio-box">
                        <input type="radio" name="targetType" value="2">空调
                    </label>
                    <label class="radio-box">
                        <input type="radio" name="targetType" value="3">动向走势
                    </label>
                </div>
            </div>
            <div style="position: fixed;margin: -17px 181px 0px;color: red">
                *注：目标类型非灯光时，可不填
            </div>
            <div style="margin-top: 5px" id="dgld" class="form-group">
                <label class="col-sm-3 control-label">灯光亮度：</label>
                <div class="col-sm-8">
                    <input name="lightingNum" class="form-control" min="0" step="0.1" max="1" type="number">
                </div>
            </div>
            <div style="position: fixed;margin: -17px 181px 0px;color: red">
                *注：目标类型非空调时，可不填
            </div>
            <div style="margin-top: 5px" id="ktwd" class="form-group">
                <label class="col-sm-3 control-label">空调温度：</label>
                <div class="col-sm-8">
                    <input name="ktwd" class="form-control" type="number" min="16" max="32" step="1">
                </div>
            </div>

            <div style="position: fixed;margin: -17px 181px 0px;color: red">
                *注：目标类型非空调时，可不填
            </div>
            <div style="margin-top: 5px" id="ktfs" class="form-group">
                <label class="col-sm-3 control-label">空调风速：</label>
                <div class="col-sm-8">
                    <input name="ktfs" class="form-control" type="number" min="0" max="10" step="10">
                </div>
            </div>

            <div style="position: fixed;margin: -17px 181px 0px;color: red">
                *注：目标类型非动效走势时，可不填
            </div>
            <div style="margin-top: 5px" id="dxzs" class="form-group">
                <label class="col-sm-3 control-label">动效走势：</label>
                <div class="col-sm-8">
                    <select name="dxzs" class="form-control">
                        <option value="">所有</option>
                        <option value="1">日上网</option>
                        <option value="2">日购电</option>
                        <option value="3">放电量</option>
                        <option value="4">日充电</option>
                        <option value="5">日自用</option>
                    </select>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "zhny/strategytarget"
        $("#form-strategytarget-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-strategytarget-add').serialize());
            }
        }
    </script>
</body>
</html>