1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<title>全网监控智能分析平台</title>
<style>
.table-null .table{
margin-bottom: 0px;
}
.table-null .table > tbody > tr > td, .table-null .table > thead > tr > th{
text-align: center;
width: 25%;
}
.table-null td:first-child{
text-align: right;
width: 36%;
}
.table-null tr td:last-child .form-control,.table-null tr td:last-child table{
width: 400px;
}
</style>
<script type="text/javascript" src="${ctx}/static/js/validation.js"></script>
<script language="javascript">
$(document).ready(function() {
});
function submitForm() {
var url = '${ctx}/BaseManage/EWarningDropRuleManage/checkNameAndCode';
var data = 'name=' + $('#name').val() + "&code=" + $('#code').val() + "&ruleId=" + $('#eWarningDropRuleId').val();
if (validate()) {
$.ajax({
type : 'POST',
url: url,
data:data,
success: function(data) {
if(data == '1') {
alert("规则名称已存在");
$('#name').focus();
} else if (data == '2') {
alert("规则代码已存在");
$('#code').focus();
} else {
$('#detailForm').submit();
}
}
});
}
}
function validate() {
if(!checkNameAndCode()) {
return false;
}
if(!checkRequired()) {
return false;
}
return true;
}
</script>
</head>
<body>
<div class="col-xs-12" style="padding-top: 20px;">
<form id="detailForm" class="form-horizontal" role="form"
action="${ctx}/BaseManage/EWarningDropRuleManage/submitEWarningDropRuleFrame" method="post">
<input type="hidden" name="eWarningDropRuleId" id="eWarningDropRuleId" value="${eWarningDropRule.eWarningDropRuleId}">
<table class="table-null">
<tr>
<td>规则名称(<font color="red">必填</font>):</td>
<td><input type="input" class="form-control" id="name" name="name" value="${eWarningDropRule.name}" maxlength="33"></td>
</tr>
<tr>
<td>规则代码(<font color="red">必填</font>):</td>
<td><input type="input" class="form-control" id="code" name="code" value="${eWarningDropRule.code}" maxlength="100"></td>
</tr>
<tr>
<td>正常监测次(<font color="red">必填</font>):</td>
<td><input type="input" class="form-control required" id="correctNums" name="correctNums" value="${eWarningDropRule.correctNums}"></td>
</tr>
<tr>
<td></td>
<td>
<button type="button" id="modelSubmit" class="btn btn-primary" onclick="saveForm('eWarningDropRuleId');">确定</button>
<!-- <button type="reset" class="btn btn-default" id="modelReset">清空</button> -->
<button type="reset" class="btn btn-warning" id="modelBack" onclick="window.location.href='${ctx}/BaseManage/EWarningDropRuleManage/eWarningDropRuleListFrame'">返回</button>
</td>
</tr>
</table>
</form>
</div>
</body>
</html>