128 lines
5.1 KiB
Plaintext
128 lines
5.1 KiB
Plaintext
|
|
<%@ page language="java" pageEncoding="UTF-8"%>
|
|||
|
|
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
|||
|
|
<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">
|
|||
|
|
function dosave() {
|
|||
|
|
$("#jspConfigureDetailSubForm").bootstrapValidator('validate');//提交验证
|
|||
|
|
if ($("#jspConfigureDetailSubForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
|||
|
|
$.post(ext.contextPath + "/jspConfigure/jspConfigureDetailSave.do", $("#jspConfigureDetailSubForm").serialize(), function(data) {
|
|||
|
|
if (data.res == 1){
|
|||
|
|
//closeModal('subModal');
|
|||
|
|
//$("#table").bootstrapTable('refresh');
|
|||
|
|
showAlert('s','保存成功');
|
|||
|
|
initTreeView();
|
|||
|
|
editFun(data.id);
|
|||
|
|
}else if(data.res == 0){
|
|||
|
|
showAlert('d','保存失败');
|
|||
|
|
}else{
|
|||
|
|
showAlert('d',data.res);
|
|||
|
|
}
|
|||
|
|
},'json');
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
//输入框验证
|
|||
|
|
$("#jspConfigureDetailSubForm").bootstrapValidator({
|
|||
|
|
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
|||
|
|
fields: {
|
|||
|
|
dataName: {
|
|||
|
|
validators: {
|
|||
|
|
notEmpty: {
|
|||
|
|
message: '名称不能为空'
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
function selectmpids() {
|
|||
|
|
var mpids = $('#jspConfigureDetailSubForm #mpcode').val();
|
|||
|
|
$.post(ext.contextPath + '/work/mpoint/mpointList4LayerES.do', {
|
|||
|
|
mpids: mpids,
|
|||
|
|
// mpids: '',
|
|||
|
|
fucname: 'ckmpidDone'
|
|||
|
|
}, function (data) {
|
|||
|
|
$("#mpSelectDiv").html(data);
|
|||
|
|
openModal('subModalMpoint');
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
function ckmpidDone(data) {
|
|||
|
|
var arr = "";
|
|||
|
|
if(data.length>0){
|
|||
|
|
var arrs = data.split(',');
|
|||
|
|
arr = arrs[0]
|
|||
|
|
}
|
|||
|
|
$('#jspConfigureDetailSubForm #mpcode').val(arr);
|
|||
|
|
$('#jspConfigureDetailSubForm #value').val(0);
|
|||
|
|
closeModal('subModalMpoint');
|
|||
|
|
}
|
|||
|
|
</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="jspConfigureDetailSubForm">
|
|||
|
|
<input id="configureId" name="configureId" type="hidden" value="${param.configureId}" />
|
|||
|
|
<!-- 界面提醒div强制id为alertDiv -->
|
|||
|
|
<div id="alertDiv"></div>
|
|||
|
|
<div id="jspConfigureDetailSubDiv"></div>
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">*显示名称</label>
|
|||
|
|
<div class="col-sm-6">
|
|||
|
|
<input type="text" class="form-control" id="dataName" name ="dataName" placeholder="名称" >
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">测量点位</label>
|
|||
|
|
<div class="col-sm-6">
|
|||
|
|
<input type="text" class="form-control" id="mpcode" name ="mpcode" placeholder="数据点位" onclick="selectmpids();" >
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">数据单位</label>
|
|||
|
|
<div class="col-sm-6">
|
|||
|
|
<input type="text" class="form-control" name ="unit" placeholder="数据单位" >
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">默认数据</label>
|
|||
|
|
<div class="col-sm-6">
|
|||
|
|
<input type="text" class="form-control" id="value" name ="value" placeholder="默认数据" >
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">顺序</label>
|
|||
|
|
<div class="col-sm-6">
|
|||
|
|
<input type="text" class="form-control" id="morder" name ="morder" placeholder="顺序" >
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">启用状态</label>
|
|||
|
|
<div class="col-sm-6">
|
|||
|
|
<select class="form-control select2" id="active" name ="active" style="width: 270px;">
|
|||
|
|
<option value= "1" selected = "selected">启用</option>
|
|||
|
|
<option value= "0">禁用</option>
|
|||
|
|
</select>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</form>
|
|||
|
|
</div>
|
|||
|
|
</div>
|