115 lines
4.5 KiB
Plaintext
115 lines
4.5 KiB
Plaintext
|
<%@ page contentType="text/html;charset=UTF-8" %>
|
|||
|
<%@ include file="/webpage/include/taglib.jsp"%>
|
|||
|
<html>
|
|||
|
<head>
|
|||
|
<title>区域管理</title>
|
|||
|
<meta name="decorator" content="default"/>
|
|||
|
<script type="text/javascript">
|
|||
|
var validateForm;
|
|||
|
function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
|
|||
|
if(validateForm.form()){
|
|||
|
$("#inputForm").submit();
|
|||
|
return true;
|
|||
|
}
|
|||
|
|
|||
|
return false;
|
|||
|
}
|
|||
|
$(document).ready(function() {
|
|||
|
$("#name").focus();
|
|||
|
treeBackMetod2();
|
|||
|
validateForm = $("#inputForm").validate({
|
|||
|
submitHandler: function(form){
|
|||
|
loading('正在提交,请稍等...');
|
|||
|
form.submit();
|
|||
|
},
|
|||
|
errorContainer: "#messageBox",
|
|||
|
errorPlacement: function(error, element) {
|
|||
|
$("#messageBox").text("输入有误,请先更正。");
|
|||
|
if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
|
|||
|
error.appendTo(element.parent().parent());
|
|||
|
} else {
|
|||
|
error.insertAfter(element);
|
|||
|
}
|
|||
|
}
|
|||
|
});
|
|||
|
});
|
|||
|
function treeBackMetod2(){
|
|||
|
var parent = $("input[name=parent\\.id]:hidden").val();
|
|||
|
$.ajax({
|
|||
|
type:'POST',
|
|||
|
url:'${ctx}/sys/area/getAreaByqy',
|
|||
|
data:{"parent":parent},
|
|||
|
async:false,
|
|||
|
dataType:'json',
|
|||
|
success:function(data){
|
|||
|
var obj = eval(data);
|
|||
|
var cStr = "<select id=\"type\" name=\"type\" class=\"form-control valid\" aria-invalid=\"false\">";
|
|||
|
for(var i = 0;i<obj.length;i++){
|
|||
|
var s=obj[i];
|
|||
|
cStr=cStr+"<option value=\""+s.value+"\">"+s.label+"</option>";
|
|||
|
// if(i%5==0&&i!=0){
|
|||
|
// cStr=cStr+"</br>";
|
|||
|
// }
|
|||
|
}
|
|||
|
cStr+="</select>";
|
|||
|
$("#areaCheckBoxs").empty();
|
|||
|
$("#areaCheckBoxs").html(cStr);
|
|||
|
// $('.i-checks-custom').iCheck({
|
|||
|
// checkboxClass: 'icheckbox_square-green',
|
|||
|
// radioClass: 'iradio_square-green',
|
|||
|
// });
|
|||
|
}
|
|||
|
});
|
|||
|
}
|
|||
|
</script>
|
|||
|
<style type="text/css">
|
|||
|
/* .title{ */
|
|||
|
/* width: 0; */
|
|||
|
/* height: 0; */
|
|||
|
/* border-top: 10px solid red; */
|
|||
|
/* border-left: 10px solid transparent; */
|
|||
|
/* } */
|
|||
|
</style>
|
|||
|
</head>
|
|||
|
<body>
|
|||
|
<form:form id="inputForm" modelAttribute="area" action="${ctx}/sys/area/save" method="post" class="form-horizontal">
|
|||
|
<form:hidden path="id"/>
|
|||
|
<sys:message content="${message}"/>
|
|||
|
<table class="table table-bordered table-condensed dataTables-example dataTable no-footer">
|
|||
|
<tbody>
|
|||
|
<tr>
|
|||
|
<td class="width-15 active"><label class="pull-right">上级区域:</label></td>
|
|||
|
<td class="width-35" ><sys:treeselect id="area" name="parent.id" value="${area.parent.id}" labelName="parent.name" labelValue="${area.parent.name}"
|
|||
|
title="区域" url="/sys/area/treeData" extId="${area.id}" cssClass="form-control m-s" allowClear="true" treeBackMetod="treeBackMetod2"/></td>
|
|||
|
<td class="width-15 active"> </td>
|
|||
|
<td class="width-35" > </td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td class="width-15 active"><label class="pull-right"><font color="red">*</font>区域名称:</label></td>
|
|||
|
<td class="width-35" ><form:input path="name" htmlEscape="false" maxlength="32" class="form-control required"/></td>
|
|||
|
<td class="width-15 active "><label class="pull-right">区域编码:</label><div class="title"></div></td>
|
|||
|
<td class="width-35" ><form:input path="code" htmlEscape="false" maxlength="32" class="form-control"/>
|
|||
|
<span class="help-inline">
|
|||
|
注:对应Arcgis中的区域编码</span></td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td class="width-15 active"><label class="pull-right">区域类型:</label></td>
|
|||
|
<td class="width-35" id="areaCheckBoxs">
|
|||
|
<form:select path="type" class="form-control">
|
|||
|
<form:options items="${fns:getDictList('sys_area_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
|
|||
|
</form:select>
|
|||
|
</td>
|
|||
|
<%-- <td class="width-15 active"><label class="pull-right">区域面积(k㎡):</label></td>
|
|||
|
<td class="width-35" ><form:input path="grid.gridArea" htmlEscape="false" maxlength="20" class="form-control number"/></td> --%>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td class="width-15 active"><label class="pull-right">备注:</label></td>
|
|||
|
<td class="width-35" colspan="3"><form:textarea path="remarks" htmlEscape="false" rows="3" maxlength="85" class="form-control"/></td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
</tr>
|
|||
|
</tbody>
|
|||
|
</table>
|
|||
|
</form:form>
|
|||
|
</body>
|
|||
|
</html>
|