plateRecognizing.esp
7.37 KB
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="../../css/frame.css" rel="stylesheet" />
<link href="../../scripts/easyui/themes/default/easyui.css" rel="stylesheet" />
<link href="../../scripts/easyui/themes/icon.css" rel="stylesheet" />
<style type="text/css">
.plateWidthCalManual {
display: none;
}
</style>
</head>
<body>
<div style="padding:8px;">
<form id="plateForm">
<table class="settingsContainer">
<tr>
<td class="tdTitle">车牌识别宽度</td>
<td class="tdContent">
<select name="701" id="701" class="settingParameter">
<option value="0">手动指定</option>
<option value="1">自动计算</option>
</select>
</td>
</tr>
<tr class="plateWidthCalManual">
<td class="tdTitle">
车牌最小宽度
</td>
<td class="tdContent">
<input type="text" id="702" name="702" class="settingParameter"/>
</td>
</tr>
<tr class="plateWidthCalManual">
<td class="tdTitle">
车牌最大宽度
</td>
<td class="tdContent">
<input type="text" id="703" name="703" class="settingParameter"/>
</td>
</tr>
<tr>
<td class="tdTitle">车牌置信度阈值</td>
<td class="tdContent">
<input type="text" name="704" id="704" class="settingParameter" />
</td>
</tr>
<tr>
<td class="tdTitle">本地车牌</td>
<td class="tdContent">
<select name="705" id="705" class="settingParameter">
<option value='0'>京</option>
<option value='1'>沪</option>
<option value='2'>津</option>
<option value='3'>渝</option>
<option value='4'>冀</option>
<option value='5'>晋</option>
<option value='6'>蒙</option>
<option value='7'>辽</option>
<option value='8'>吉</option>
<option value='9'>黑</option>
<option value='10'>苏</option>
<option value='11'>浙</option>
<option value='12'>皖</option>
<option value='13'>闽</option>
<option value='14'>赣</option>
<option value='15'>鲁</option>
<option value='16'>豫</option>
<option value='17'>鄂</option>
<option value='18'>湘</option>
<option value='19'>粤</option>
<option value='20'>桂</option>
<option value='21'>琼</option>
<option value='22'>川</option>
<option value='23'>贵</option>
<option value='24'>云</option>
<option value='25'>藏</option>
<option value='26'>陕</option>
<option value='27'>甘</option>
<option value='28'>青</option>
<option value='29'>宁</option>
<option value='30'>新</option>
</select>
</td>
</tr>
<tr>
<td colspan="2">
<a href="#" class="settingBtn" id="btnSave">保存</a>
</td>
</tr>
</table>
<% inputSecurityToken(); %>
</form>
</div>
<script src="../../scripts/easyui/jquery.min.js"></script>
<script src="../../scripts/easyui/jquery.easyui.min.js"></script>
<script src="../../scripts/easyui/locale/easyui-lang-zh_CN.js"></script>
<script src="../../scripts/utilities.js"></script>
<script src="../../scripts/jquery.validate.min.js"></script>
<script src="../../scripts/jquery.validate.extend.js"></script>
<script type="text/javascript">
var parameterAdaptor = new ParameterAdaptor();
$().ready(function() {
loadInfo();
$("#btnSave").click(saveParametersToServer);
//车牌宽度自动识别
$("#701").change(showOrHiddenPlateWidthParameter);
$("#plateForm").validate({
rules: {
702: {
required:true,
range: [70, 230],
digits:true
},
703: {
required:true,
range: [70, 230],
digits:true,
ge:["#702","车牌最小宽度"]
},
704: {
required:true,
range: [0, 101],
digits: true
}
}
});
});
//更新车牌识别选项
function showOrHiddenPlateWidthParameter() {
var selectedValue = $("#701").val();
if (selectedValue == "1") {
$(".plateWidthCalManual").hide();
} else {
$(".plateWidthCalManual").show();
}
}
//加载参数
function loadInfo() {
var key = "PlateRecognizeSettings";
parameterAdaptor.getParameters(key, function(data) {
$("#plateForm").form("load", data.feedback);
//更新UI
updateUI();
});
}
//更新UI,比如一些根据值变更布局的地方
function updateUI() {
//更新车牌识别选项
showOrHiddenPlateWidthParameter();
}
//保存参数
function saveParametersToServer() {
var formObj = $("#plateForm");
if (!formObj.valid()) {
$.messager.alert("提示", "参数验证有误,请修改后再提交!", "error");
return;
}
parameterAdaptor.saveParameters(formObj);
}
</script>
</body>
</html>