Files
SIPAIIS_WMS_JSSW/src/main/webapp/jsp/pipeline/pipelineDataAdd.jsp

170 lines
7.2 KiB
Plaintext
Raw Normal View History

2026-03-01 23:20:13 +08:00
<%@ 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">
function dosave() {
$("#subForm").bootstrapValidator('validate');
if ($("#subForm").data('bootstrapValidator').isValid()) {
$.post(ext.contextPath + "/pipeline/pipelineData/save.do", $("#subForm").serialize(), function(data) {
if (data.res == 1) {
closeModal('subModal');
$("#table").bootstrapTable('refresh');
showAlert('s', '保存成功', 'mainAlertdiv');
} else if (data.res == 0) {
showAlert('d', '保存失败', 'alertDiv');
} else {
showAlert('d', data.res, 'alertDiv');
}
}, 'json');
}
}
$("#subForm").bootstrapValidator({
live: 'disabled',
fields: {
pipelineName: {
validators: {
notEmpty: {
message: '管道名称不能为空'
}
}
},
diameterMm: {
validators: {
numeric: {
message: '请输入有效数字'
}
}
},
lengthM: {
validators: {
numeric: {
message: '请输入有效数字'
}
}
},
startBurialDepthM: {
validators: {
numeric: {
message: '请输入有效数字'
}
}
},
endBurialDepthM: {
validators: {
numeric: {
message: '请输入有效数字'
}
}
},
startGroundElevationM: {
validators: {
numeric: {
message: '请输入有效数字'
}
}
},
endGroundElevationM: {
validators: {
numeric: {
message: '请输入有效数字'
}
}
},
pipelineInvertElevationM: {
validators: {
numeric: {
message: '请输入有效数字'
}
}
}
}
});
</script>
<div class="modal fade" id="subModal">
<div class="modal-dialog" style="width: 700px;">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title">新增管道数据</h4>
</div>
<div class="modal-body">
<form class="form-horizontal" id="subForm">
<div id="alertDiv"></div>
<div class="form-group">
<label class="col-sm-3 control-label">*管道名称</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="pipelineName" name="pipelineName" placeholder="请输入管道名称">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">场内场外</label>
<div class="col-sm-8">
<select class="form-control" id="pipelineArea" name="pipelineArea">
<option value="">请选择</option>
<option value="OUT_SIDE">场外管道</option>
<option value="In_SIDE">场内管道</option>
</select>
</div>
</div>
<div class="form-group">
2026-03-01 23:20:13 +08:00
<label class="col-sm-3 control-label">直径(mm)</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="diameterMm" name="diameterMm" placeholder="请输入管道直径">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">长度(m)</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="lengthM" name="lengthM" placeholder="请输入管道长度">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">起点埋深(m)</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="startBurialDepthM" name="startBurialDepthM" placeholder="请输入起点埋深">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">终点埋深(m)</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="endBurialDepthM" name="endBurialDepthM" placeholder="请输入终点埋深">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">起点地面高程(m)</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="startGroundElevationM" name="startGroundElevationM" placeholder="请输入起点地面高程">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">终点地面高程(m)</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="endGroundElevationM" name="endGroundElevationM" placeholder="请输入终点地面高程">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">管道底部标高(m)</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="pipelineInvertElevationM" name="pipelineInvertElevationM" placeholder="请输入管道底部标高">
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
<button type="button" class="btn btn-primary" onclick="dosave()" id="btn_save">保存</button>
</div>
</div>
</div>
</div>