126 lines
4.6 KiB
Plaintext
126 lines
4.6 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">
|
|
var showSelectFun = function() {
|
|
var bizid=$('#bizid').val();
|
|
$.post(ext.contextPath + '/report/drainageDataomprehensiveTableConfigure/showListSelect.do', {formId:"subForm",hiddenId:"pid",textId:"_pname",bizid:bizid} , function(data) {
|
|
$("#drainageDataomprehensiveTableConfigureSelectDiv").html(data);
|
|
openModal('configureSelectModal');
|
|
});
|
|
};
|
|
function dosave() {
|
|
//if ($("#subForm").form('validate')) {
|
|
$.post(ext.contextPath + "/report/drainageDataomprehensiveTableConfigure/doupdate.do", $("#subForm").serialize(), function(result) {
|
|
if (result == 1) {
|
|
showAlert('s','保存成功');
|
|
}else{
|
|
showAlert('d','保存失败');
|
|
}
|
|
});
|
|
//}
|
|
}
|
|
|
|
|
|
function dodel() {
|
|
|
|
swal({
|
|
text: "您确定要删除此记录?",
|
|
dangerMode: true,
|
|
buttons: {
|
|
cancel: {
|
|
text: "取消",
|
|
value: null,
|
|
visible: true,
|
|
className: "btn btn-default btn-sm",
|
|
closeModal: true,
|
|
},
|
|
confirm: {
|
|
text: "确定",
|
|
value: true,
|
|
visible: true,
|
|
className: "btn btn-danger btn-sm",
|
|
closeModal: true
|
|
}
|
|
}
|
|
})
|
|
.then(function(willDelete) {
|
|
if (willDelete) {
|
|
$.post(ext.contextPath + '/report/drainageDataomprehensiveTableConfigure/dodel.do', $("#subForm").serialize(), function(data) {
|
|
if(data.res>0){
|
|
initTreeView();
|
|
}else{
|
|
showAlert('d','删除失败');
|
|
}
|
|
},'json');
|
|
|
|
}
|
|
});
|
|
}
|
|
$(function() {
|
|
$("#active").select2({minimumResultsForSearch: 10}).val("${drainageDataomprehensiveTableConfigure.active}").trigger("change");
|
|
});
|
|
|
|
var showMpidList = function() {
|
|
var bizid= $("#bizid").val();
|
|
$.post(ext.contextPath + '/data/measurepoint/selectMeasurepointByBizid.do', {formId:"subForm",bizid:bizid} , function(data) {
|
|
$("#showMpidListDiv").html(data);
|
|
openModal("showMpidListModal");
|
|
});
|
|
};
|
|
</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>
|
|
<a onclick="dodel()" class="btn btn-box-tool" data-toggle="tooltip" title="删除"><i class="glyphicon glyphicon-trash"></i></a>
|
|
</div>
|
|
</div>
|
|
<!-- /.box-header -->
|
|
<div class="box-body ">
|
|
<form class="form-horizontal " id="subForm">
|
|
<input id="id" name="id" type="hidden" value="${drainageDataomprehensiveTableConfigure.id}"/>
|
|
<input id="bizid" name="bizid" type="hidden" value="${bizid}" />
|
|
<!-- 界面提醒div强制id为alertDiv -->
|
|
<c:if test="${ishavelist=='1'}">
|
|
<div id="alertDiv"></div>
|
|
<div id="drainageDataomprehensiveTableConfigureSelectDiv"></div>
|
|
<div id="showMpidListDiv"></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" value="${drainageDataomprehensiveTableConfigure.name }" readonly>
|
|
</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>
|
|
|
|
<div class="form-group">
|
|
<label class="col-sm-2 control-label">测量点</label>
|
|
<div class="col-sm-4">
|
|
<input type="text" class="form-control" id="mpid" name ="mpid" placeholder="点击选择" value="${drainageDataomprehensiveTableConfigure.mpid}" onclick="showMpidList();">
|
|
</div>
|
|
</div>
|
|
</c:if>
|
|
<c:if test="${ishavelist=='0'}">
|
|
暂无数据
|
|
</c:if>
|
|
</form>
|
|
</div>
|
|
</div>
|