89 lines
3.3 KiB
Plaintext
89 lines
3.3 KiB
Plaintext
|
|
<%@ page language="java" pageEncoding="UTF-8"%>
|
||
|
|
<style type="text/css">
|
||
|
|
.select2-container .select2-selection--single{
|
||
|
|
height:34px;
|
||
|
|
line-height: 34px;
|
||
|
|
}
|
||
|
|
.select2-selection__arrow{
|
||
|
|
margin-top:3px;
|
||
|
|
}
|
||
|
|
</style>
|
||
|
|
<script type="text/javascript">
|
||
|
|
var showStructureCard4SelectFun = function() {
|
||
|
|
$.post(ext.contextPath + '/structure/showList4Select.do', {formId:"subForm",hiddenId:"pid",textId:"_pname"} , function(data) {
|
||
|
|
$("#fault4SelectDiv").html(data);
|
||
|
|
openModal('fault4SelectModal');
|
||
|
|
});
|
||
|
|
};
|
||
|
|
function dosave() {
|
||
|
|
//if ($("#subForm").form('validate')) {
|
||
|
|
$.post(ext.contextPath + "/structure/dosave.do", $("#subForm").serialize(), function(result) {
|
||
|
|
var data = eval("("+result+")");
|
||
|
|
if (data.res == 1) {
|
||
|
|
initTreeView();
|
||
|
|
//showAlert('s','保存成功');
|
||
|
|
}else{
|
||
|
|
showAlert('d','保存失败');
|
||
|
|
}
|
||
|
|
});
|
||
|
|
//}
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
$(function() {
|
||
|
|
$("#active").select2({minimumResultsForSearch: -1});
|
||
|
|
$("#type").select2({minimumResultsForSearch: -1});
|
||
|
|
});
|
||
|
|
</script>
|
||
|
|
<div class="box box-primary" >
|
||
|
|
<div class="box-header with-border">
|
||
|
|
<h3 class="box-title">新增</h3>
|
||
|
|
|
||
|
|
<div class="box-tools pull-right">
|
||
|
|
<a onclick="dosave()" class="btn btn-box-tool" data-toggle="tooltip" title="保存"><i class="glyphicon glyphicon-floppy-disk"></i></a>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<!-- /.box-header -->
|
||
|
|
<div class="box-body ">
|
||
|
|
<form class="form-horizontal " id="subForm">
|
||
|
|
<%-- <input id="id" name="id" type="hidden" />--%>
|
||
|
|
<!-- 界面提醒div强制id为alertDiv -->
|
||
|
|
<div id="alertDiv"></div>
|
||
|
|
<div id="fault4SelectDiv"></div>
|
||
|
|
<div class="form-group">
|
||
|
|
<label class="col-sm-2 control-label">名称</label>
|
||
|
|
<div class="col-sm-4">
|
||
|
|
<input type="text" class="form-control" id="name" name ="name" placeholder="名称" ">
|
||
|
|
</div>
|
||
|
|
<label class="col-sm-2 control-label">上级菜单</label>
|
||
|
|
<div class="col-sm-4">
|
||
|
|
<input type="text" class="form-control" id="_pname" name ="_pname" placeholder="上级菜单" onclick="showStructureCard4SelectFun();" value="${pname}"></input>
|
||
|
|
<input id="pid" name="pid" type="hidden" value="${param.pid}"/>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<div class="form-group">
|
||
|
|
<label class="col-sm-2 control-label">类型</label>
|
||
|
|
<div class="col-sm-4">
|
||
|
|
<select id ="type" name="type" class="form-control select2">
|
||
|
|
<option value="0" >构筑物</option>
|
||
|
|
<option value="1" >工艺单体</option>
|
||
|
|
</select>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<div class="form-group">
|
||
|
|
<label class="col-sm-2 control-label">顺序</label>
|
||
|
|
<div class="col-sm-4">
|
||
|
|
<input type="text" class="form-control" id="morder" name ="morder" placeholder="顺序" value=0>
|
||
|
|
</div>
|
||
|
|
<label class="col-sm-2 control-label">启用</label>
|
||
|
|
<div class="col-sm-4">
|
||
|
|
<select id ="active" name="active" class="form-control select2">
|
||
|
|
<option value="1" >启用</option>
|
||
|
|
<option value="0" >禁用</option>
|
||
|
|
</select>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</form>
|
||
|
|
</div>
|
||
|
|
</div>
|