219 lines
10 KiB
Plaintext
219 lines
10 KiB
Plaintext
|
|
<%@ page language="java" pageEncoding="UTF-8"%>
|
|||
|
|
<%@page import="com.sipai.entity.timeefficiency.TimeEfficiencyCommStr"%>
|
|||
|
|
<%request.setAttribute("PatrolType_Product", TimeEfficiencyCommStr.PatrolType_Product);%>
|
|||
|
|
<%request.setAttribute("PatrolType_Equipment", TimeEfficiencyCommStr.PatrolType_Equipment);%>
|
|||
|
|
<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 doUpdate() {
|
|||
|
|
$("#subForm").bootstrapValidator('validate');//提交验证
|
|||
|
|
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
|||
|
|
$.post(ext.contextPath + "/equipment/equipmentParamSet/doUpdate.do", $("#subForm").serialize(), function(data) {
|
|||
|
|
var mark = data.message;
|
|||
|
|
if(mark >0){
|
|||
|
|
showAlert('s','保存成功');
|
|||
|
|
closeModal('subModal');
|
|||
|
|
$("#faultTable").bootstrapTable('refresh');
|
|||
|
|
}else{
|
|||
|
|
showAlert('s','保存失败');
|
|||
|
|
closeModal('subModal');
|
|||
|
|
}
|
|||
|
|
},'json');
|
|||
|
|
|
|||
|
|
/* $.post(ext.contextPath + "/maintenance/faultLibrary/dosave.do", $("#subForm").serialize(), function(data) {
|
|||
|
|
if (data.code == 1) {
|
|||
|
|
closeModal('subModal');
|
|||
|
|
$("#faultTable").bootstrapTable('refresh');
|
|||
|
|
|
|||
|
|
}else if(data.code == 0){
|
|||
|
|
showAlert('d',data.msg);
|
|||
|
|
}else{
|
|||
|
|
showAlert('d',data.msg);
|
|||
|
|
}
|
|||
|
|
},'json'); */
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
$("#subForm").bootstrapValidator({
|
|||
|
|
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
|||
|
|
fields: {
|
|||
|
|
info:{
|
|||
|
|
validators: {
|
|||
|
|
notEmpty: {
|
|||
|
|
message: '参数名称不能为空'
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
paramName: {
|
|||
|
|
validators: {
|
|||
|
|
notEmpty: {
|
|||
|
|
message: '参数归属不能为空'
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
var chooseParams = function(id) {
|
|||
|
|
console.log(id);
|
|||
|
|
if(id==1||id==2){
|
|||
|
|
$("#alert3").hide();
|
|||
|
|
$("#evaluation4").hide();
|
|||
|
|
$("#alarmOutputLevel1").val('');
|
|||
|
|
$("#alarmOutputLevel2").val('');
|
|||
|
|
$("#alarmOutputLevel3").val('');
|
|||
|
|
$("#statusEvaluationProjectId").select2().val('').trigger("change");
|
|||
|
|
$("#allowableDatumDeviation").val('');
|
|||
|
|
$("#weight").val('');
|
|||
|
|
$("#evaluationCriteriaAndDecision").val('');
|
|||
|
|
$("#evaluationMethod").val('');
|
|||
|
|
}else if(id==3){
|
|||
|
|
$("#alert3").show();
|
|||
|
|
$("#evaluation4").hide();
|
|||
|
|
$("#statusEvaluationProjectId").select2().val('').trigger("change");
|
|||
|
|
$("#allowableDatumDeviation").val('');
|
|||
|
|
$("#weight").val('');
|
|||
|
|
$("#evaluationCriteriaAndDecision").val('');
|
|||
|
|
$("#evaluationMethod").val('');
|
|||
|
|
}else if(id==4){
|
|||
|
|
$("#alert3").hide();
|
|||
|
|
$("#alarmOutputLevel1").val('');
|
|||
|
|
$("#alarmOutputLevel2").val('');
|
|||
|
|
$("#alarmOutputLevel3").val('');
|
|||
|
|
$("#evaluation4").show();
|
|||
|
|
}
|
|||
|
|
};
|
|||
|
|
//参数列表
|
|||
|
|
var selectEquipmentClass = function() {
|
|||
|
|
$.post(ext.contextPath + '/equipment/equipmentParamSet/selectEquipmentParam.do', {} , function(data) {
|
|||
|
|
$("#equipmentClassSubDiv").html(data);
|
|||
|
|
openModal('equipmentClassSubModal');
|
|||
|
|
});
|
|||
|
|
};
|
|||
|
|
$(function() {
|
|||
|
|
$.post(ext.contextPath + "/equipment/equipmentParamSet/getEquipmentParamsetStatusEvaluationForSelect.do", {}, function(data) {
|
|||
|
|
var selelct =$("#statusEvaluationProjectId").select2({
|
|||
|
|
data: data,
|
|||
|
|
placeholder:'请选择',//默认文字提示
|
|||
|
|
allowClear: true,//允许清空
|
|||
|
|
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
|||
|
|
language: "zh-CN",
|
|||
|
|
minimumInputLength: 0,
|
|||
|
|
minimumResultsForSearch: 10,//数据大于10个启用搜索框
|
|||
|
|
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
|||
|
|
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
|||
|
|
});
|
|||
|
|
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'})
|
|||
|
|
selelct.val('${equParamDetailSet.statusEvaluationProjectId}').trigger("change");
|
|||
|
|
},'json');
|
|||
|
|
chooseParams('${equParamDetailSet.paramId}');
|
|||
|
|
})
|
|||
|
|
</script>
|
|||
|
|
<div class="modal fade" id="subModal">
|
|||
|
|
<div class="modal-dialog">
|
|||
|
|
<div class="modal-content">
|
|||
|
|
<div class="modal-header">
|
|||
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|||
|
|
<span aria-hidden="true">×</span></button>
|
|||
|
|
<h4 class="modal-title">新增详细参数</h4>
|
|||
|
|
</div>
|
|||
|
|
<div class="modal-body">
|
|||
|
|
<!-- 新增界面formid强制为subForm -->
|
|||
|
|
<form class="form-horizontal" id="subForm">
|
|||
|
|
<input type="hidden" id="id" name="id" value='${equParamDetailSet.id}'>
|
|||
|
|
|
|||
|
|
<!-- 界面提醒div强制id为alertDiv -->
|
|||
|
|
<div id="alertDiv"></div>
|
|||
|
|
<!-- <div id="equipmentClassSubDiv"></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="请输入参数名称" autocomplete="off" value="${equParamDetailSet.name}">
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<label class="col-sm-2 control-label">*参数归属</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<input type="text" class="form-control" id="paramName" name="paramName" onclick="selectEquipmentClass()" placeholder="点击选择" autocomplete="off" value="${equipmentParamset.name}">
|
|||
|
|
<input type="hidden" id="paramId" name="paramId" value="${equipmentParamset.id}">
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">*设备类别</label>
|
|||
|
|
<div class="col-sm-10">
|
|||
|
|
<input type="text" class="form-control" id="equipmentClassName" name="equipmentClassName" placeholder="" readonly="true" value="${equipmentClass.name}">
|
|||
|
|
<input type="hidden" id="equipmentClassId" name="equipmentClassId" value="${equipmentClass.id}">
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div id="alert3" style="display: none;">
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">*一级告警输出</label>
|
|||
|
|
<div class="col-sm-10">
|
|||
|
|
<input type="text" class="form-control" id="alarmOutputLevel1" name="alarmOutputLevel1" value="${equParamDetailSet.alarmOutputLevel1}">
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">*二级告警输出</label>
|
|||
|
|
<div class="col-sm-10">
|
|||
|
|
<input type="text" class="form-control" id="alarmOutputLevel2" name="alarmOutputLevel2" value="${equParamDetailSet.alarmOutputLevel2}">
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">*三级告警输出</label>
|
|||
|
|
<div class="col-sm-10">
|
|||
|
|
<input type="text" class="form-control" id="alarmOutputLevel3" name="alarmOutputLevel3" value="${equParamDetailSet.alarmOutputLevel3}">
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div id="evaluation4" style="display: none;">
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">*状态评价项目:</label>
|
|||
|
|
<div class="col-sm-10">
|
|||
|
|
<select class="form-control select2 " id="statusEvaluationProjectId" name ="statusEvaluationProjectId" style="width: 160px;"></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="allowableDatumDeviation" name="allowableDatumDeviation" placeholder="请输入纯数字" autocomplete="off" value="${equParamDetailSet.allowableDatumDeviation}">
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<label class="col-sm-2 control-label">*权重(%)</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<input type="text" class="form-control" id="weight" name="weight" placeholder="请输入纯数字" autocomplete="off" value="${equParamDetailSet.weight}">
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">*评估标准及决策</label>
|
|||
|
|
<div class="col-sm-10">
|
|||
|
|
<input type="text" class="form-control" id="evaluationCriteriaAndDecision" name="evaluationCriteriaAndDecision" value="${equParamDetailSet.evaluationCriteriaAndDecision}">
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">*评估方法</label>
|
|||
|
|
<div class="col-sm-10">
|
|||
|
|
<input type="text" class="form-control" id="evaluationMethod" name="evaluationMethod" value="${equParamDetailSet.evaluationMethod}">
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
</form>
|
|||
|
|
</div>
|
|||
|
|
<div class="modal-footer">
|
|||
|
|
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
|||
|
|
<button type="button" class="btn btn-primary" onclick="doUpdate()" id="btn_save">保存</button>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<!-- /.modal-content -->
|
|||
|
|
</div>
|
|||
|
|
<!-- /.modal-dialog -->
|
|||
|
|
</div>
|