<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" 
      xmlns:sec="http://www.pollix.at/thymeleaf/shiro">
<head th:replace="admin/common/html/tableHead :: tableHead(~{::title},~{::link},~{::style})">

<title th:text=${title}></title>
<!-- 这儿引用单独的css link -->
<!-- Ladda for Bootstrap 3按钮加载进度插件 -->
<link rel="stylesheet" th:href="@{/static/admin/assets/js/button/ladda/ladda.min.css}">
<!-- bootstrap-table表单样式 -->
<link th:href="@{/static/admin/assets/js/bootstrap/css/bootstrap-table/bootstrap-table.min.css}" rel="stylesheet"/>

<!-- 用户界面自定义css -->
<link th:href="@{/static/admin/user/css/user-add.css}" rel="stylesheet"/>
<style type="text/css"></style>

</head>

<body>
      	   	      	      	      	      	      	      	      	      	      	      	      	      	      	      	      	      	      	      	      	      	      	      	      	      
<div class="content-wrap">
	<div class="row">
		<div class="col-sm-12">
			<div class="nest" id="elementClose">
				<div class="">
				</div>
				<div class="body-nest" id="element">
					<div class="panel-body">
						<form  class="form-horizontal m" id="form-edit" th:object="${Weatherfd}">
							<input id="id" name="id" type="hidden" th:field="*{id}"/>
						
									<div class="form-group">
										<label class="col-sm-3 control-label ">日期：</label>
										<div class="col-sm-8">
											<input class="form-control MyDate" type="text" id="recodedata" name="recodedata" th:value="*{#dates.format(recodedata,'yyyy-MM-dd HH:mm:ss')}"/>
										</div>
									</div>
									
								
									<div class="form-group">
										<label class="col-sm-3 control-label ">地点：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="region" name="region" th:value="*{region}"/>
										</div>
									</div>

								
									<div class="form-group">
										<label class="col-sm-3 control-label ">风场编号：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="windpowerstationid" name="windpowerstationid" th:value="*{windpowerstationid}"/>
										</div>
									</div>

								
									<div class="form-group">
										<label class="col-sm-3 control-label ">气象：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="weather" name="weather" th:value="*{weather}"/>
										</div>
									</div>

								
									<div class="form-group">
										<label class="col-sm-3 control-label ">最高温度：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="maximumtem" name="maximumtem" th:value="*{maximumtem}"/>
										</div>
									</div>

								
									<div class="form-group">
										<label class="col-sm-3 control-label ">最低温度：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="minimumtem" name="minimumtem" th:value="*{minimumtem}"/>
										</div>
									</div>

								
									<div class="form-group">
										<label class="col-sm-3 control-label ">日出时间：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="sunrise" name="sunrise" th:value="*{sunrise}"/>
										</div>
									</div>

								
									<div class="form-group">
										<label class="col-sm-3 control-label ">日落时间：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="sunset" name="sunset" th:value="*{sunset}"/>
										</div>
									</div>

								
									<div class="form-group">
										<label class="col-sm-3 control-label ">持续时间：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="sunduration" name="sunduration" th:value="*{sunduration}"/>
										</div>
									</div>

								
									<div class="form-group">
										<label class="col-sm-3 control-label ">白天气：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="weather1" name="weather1" th:value="*{weather1}"/>
										</div>
									</div>

								
									<div class="form-group">
										<label class="col-sm-3 control-label ">白温度：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="temperature1" name="temperature1" th:value="*{temperature1}"/>
										</div>
									</div>

								
									<div class="form-group">
										<label class="col-sm-3 control-label ">白体感温度：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="realfeel1" name="realfeel1" th:value="*{realfeel1}"/>
										</div>
									</div>

								
									<div class="form-group">
										<label class="col-sm-3 control-label ">白降水：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="precipitation1" name="precipitation1" th:value="*{precipitation1}"/>
										</div>
									</div>

								
									<div class="form-group">
										<label class="col-sm-3 control-label ">白风向：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="winddirection1" name="winddirection1" th:value="*{winddirection1}"/>
										</div>
									</div>

								
									<div class="form-group">
										<label class="col-sm-3 control-label ">白风速：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="speed1" name="speed1" th:value="*{speed1}"/>
										</div>
									</div>

								
									<div class="form-group">
										<label class="col-sm-3 control-label ">白阵风速：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="gust1" name="gust1" th:value="*{gust1}"/>
										</div>
									</div>

								
									<div class="form-group">
										<label class="col-sm-3 control-label ">夜天气：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="weather2" name="weather2" th:value="*{weather2}"/>
										</div>
									</div>

								
									<div class="form-group">
										<label class="col-sm-3 control-label ">夜温度：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="temperature2" name="temperature2" th:value="*{temperature2}"/>
										</div>
									</div>

								
									<div class="form-group">
										<label class="col-sm-3 control-label ">夜体感：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="realfeel2" name="realfeel2" th:value="*{realfeel2}"/>
										</div>
									</div>

								
									<div class="form-group">
										<label class="col-sm-3 control-label ">夜降水：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="precipitation2" name="precipitation2" th:value="*{precipitation2}"/>
										</div>
									</div>

								
									<div class="form-group">
										<label class="col-sm-3 control-label ">夜风向：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="winddirection2" name="winddirection2" th:value="*{winddirection2}"/>
										</div>
									</div>

								
									<div class="form-group">
										<label class="col-sm-3 control-label ">夜风速：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="speed2" name="speed2" th:value="*{speed2}"/>
										</div>
									</div>

								
									<div class="form-group">
										<label class="col-sm-3 control-label ">夜阵风速：</label>
										<div class="col-sm-8">
											<input class="form-control" type="text" id="gust2" name="gust2" th:value="*{gust2}"/>
										</div>
									</div>

			
									<div class="form-group">
										<div class="form-control-static col-sm-offset-9">
											<button type="submit" class="btn btn-primary">提交</button>
											<button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
										</div>
									</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>

<!-- 通用js -->
<div th:include="admin/common/html/js :: onload_js">
   
</div>
<!-- bootstarp 表格 -->
<script th:src="@{/static/admin/assets/js/bootstrap/js/bootstrap-table/bootstrap-table.min.js}" type="text/javascript"></script>
<script th:src="@{/static/admin/assets/js/bootstrap/js/bootstrap-table/locale/bootstrap-table-zh-CN.min.js}" type="text/javascript"></script>
<script th:src="@{/static/admin/assets/js/bootstrap/js/base_list.js}" type="text/javascript"></script>


<!-- 弹窗 -->
<script th:src="@{/static/admin/assets/js/layer/layer.js}" type="text/javascript"></script>
<!-- 遮罩层 -->
<script th:src="@{/static/admin/assets/js/blockUI/jquery.blockUI.js}" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
	 $(".MyDate").datetimepicker({
		 	format: "yyyy-mm-dd hh:00:00",
	        startDate: new Date(),
	        autoclose: true,
	        todayBtn: true,
	        language: 'zh-CN',
	        initialDate:new Date(),
	        minView: 1      
	    });
	
})


$("#form-edit").validate({
	submitHandler : function(form) {
		edit();
	}
});

function edit() {
	var dataFormJson = $("#form-edit").serialize();
	$.ajax({
		cache : true,
		type : "POST",
		url : rootPath + "/WeatherfdController/edit",
		data : dataFormJson,
		async : false,
		error : function(request) {
			$.modal.alertError("系统错误");
		},
		success : function(data) {
			$.operate.saveSuccess(data);
		}
	});
}
</script>

</body>


</html>
