|
|
@ -25,13 +25,13 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<div class="form-group" id="maxParam">
|
|
|
|
<label class="col-sm-3 control-label">阈值(最大):</label>
|
|
|
|
<label class="col-sm-3 control-label" id="maxParamLabel">阈值(最大):</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="maxValue" class="form-control" type="text">
|
|
|
|
<input name="maxValue" class="form-control" type="text">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<div class="form-group" id="minParam">
|
|
|
|
<label class="col-sm-3 control-label">阈值(最小):</label>
|
|
|
|
<label class="col-sm-3 control-label">阈值(最小):</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="minValue" class="form-control" type="text">
|
|
|
|
<input name="minValue" class="form-control" type="text">
|
|
|
@ -54,6 +54,9 @@
|
|
|
|
focusCleanup: true
|
|
|
|
focusCleanup: true
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//根据报警类型设置报警参数
|
|
|
|
|
|
|
|
updateParam();
|
|
|
|
|
|
|
|
|
|
|
|
$(()=>{
|
|
|
|
$(()=>{
|
|
|
|
var cp_keynum = "alarmType";
|
|
|
|
var cp_keynum = "alarmType";
|
|
|
|
var str = localStorage.getItem(cp_keynum);
|
|
|
|
var str = localStorage.getItem(cp_keynum);
|
|
|
@ -63,6 +66,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
$("#treeName").val(num.cp_num_value.substring(num.cp_num_value.indexOf('/')+1,num.cp_num_value.length ));
|
|
|
|
$("#treeName").val(num.cp_num_value.substring(num.cp_num_value.indexOf('/')+1,num.cp_num_value.length ));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
updateParam();
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
function submitHandler() {
|
|
|
|
function submitHandler() {
|
|
|
@ -90,6 +94,24 @@
|
|
|
|
$("#treeId").val(body.find('#treeId').val());
|
|
|
|
$("#treeId").val(body.find('#treeId').val());
|
|
|
|
$("#treeName").val(body.find('#treeName').val());
|
|
|
|
$("#treeName").val(body.find('#treeName').val());
|
|
|
|
$.modal.close(index);
|
|
|
|
$.modal.close(index);
|
|
|
|
|
|
|
|
updateParam();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function updateParam() {
|
|
|
|
|
|
|
|
if($("#treeId").val().length == 0){
|
|
|
|
|
|
|
|
$("#maxParam").hide();
|
|
|
|
|
|
|
|
$("#minParam").hide();
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
if($("#treeId").val().indexOf('A2') != -1){
|
|
|
|
|
|
|
|
$("#maxParamLabel").text("阈值(最大):");
|
|
|
|
|
|
|
|
$("#maxParam").show();
|
|
|
|
|
|
|
|
$("#minParam").show();
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
$("#maxParamLabel").text("报警数值:");
|
|
|
|
|
|
|
|
$("#maxParam").show();
|
|
|
|
|
|
|
|
$("#minParam").hide();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</body>
|
|
|
|