view_39df51a513b14995232abf8eb845cd9a.c
7.33 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
175
176
177
178
179
180
181
182
183
184
185
186
187
/*
Generated from client/settings/base/deviceSettingsInfo.esp
*/
#include "esp.h"
static void view_39df51a513b14995232abf8eb845cd9a(HttpConn *conn) {
espRenderBlock(conn, "<!DOCTYPE html>\r\n\
<html>\r\n\
\r\n\
<head>\r\n\
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\r\n\
<title></title>\r\n\
<link href=\"../../css/frame.css\" rel=\"stylesheet\" />\r\n\
<link href=\"../../scripts/easyui/themes/default/easyui.css\" rel=\"stylesheet\" />\r\n\
<link href=\"../../scripts/easyui/themes/icon.css\" rel=\"stylesheet\" />\r\n\
<style type=\"text/css\">\r\n\
#deviceInfoForm {\r\n\
padding: 8px;\r\n\
}\r\n\
\r\n\
.tdTitle {\r\n\
width: 80px;\r\n\
}\r\n\
\r\n\
.settingBtn {\r\n\
margin-left: 10px;\r\n\
}\r\n\
</style>\r\n\
</head>\r\n\
\r\n\
<body>\r\n\
<form id=\"deviceInfoForm\">\r\n\
<table class=\"settingsContainer\">\r\n\
<tr>\r\n\
<td class=\"tdTitle\">\r\n\
<label>设备编号</label>\r\n\
</td>\r\n\
<td class=\"tdContent\">\r\n\
<input name=\"45\" id=\"45\" class=\"settingParameter \" type=\"text\" />\r\n\
</td>\r\n\
<td class=\"tdTitle\">\r\n\
<label>设备名称</label>\r\n\
</td>\r\n\
<td class=\"tdContent\">\r\n\
<input id=\"46\" name=\"46\" class=\"settingParameter \" type=\"text\" />\r\n\
</td>\r\n\
</tr>\r\n\
<tr>\r\n\
<td class=\"tdTitle\">\r\n\
<label>地点编号</label>\r\n\
</td>\r\n\
<td class=\"tdContent\">\r\n\
<input id=\"47\" name=\"47\" class=\"settingParameter \" type=\"text\" />\r\n\
</td>\r\n\
<td class=\"tdTitle\">\r\n\
<label>地点名称</label>\r\n\
</td>\r\n\
<td class=\"tdContent\">\r\n\
<input id=\"48\" name=\"48\" class=\"settingParameter \" type=\"text\" />\r\n\
</td>\r\n\
</tr>\r\n\
<tr>\r\n\
<td class=\"tdTitle\">\r\n\
<label>方向编号</label>\r\n\
</td>\r\n\
<td class=\"tdContent\">\r\n\
<input id=\"49\" name=\"49\" class=\"settingParameter \" type=\"text\" />\r\n\
</td>\r\n\
<td class=\"tdTitle\">\r\n\
<label>方向名称</label>\r\n\
</td>\r\n\
<td class=\"tdContent\">\r\n\
<input id=\"50\" name=\"50\" class=\"settingParameter \" type=\"text\" />\r\n\
</td>\r\n\
</tr>\r\n\
<tr>\r\n\
<td class=\"tdTitle\">\r\n\
<label>扩展信息1</label>\r\n\
</td>\r\n\
<td class=\"tdContent\">\r\n\
<input id=\"51\" name=\"51\" class=\"settingParameter \" type=\"text\" />\r\n\
</td>\r\n\
<td class=\"tdTitle\">\r\n\
<label>扩展信息2</label>\r\n\
</td>\r\n\
<td class=\"tdContent\">\r\n\
<input id=\"52\" name=\"52\" class=\"settingParameter \" type=\"text\" />\r\n\
</td>\r\n\
</tr>\r\n\
<tr>\r\n\
<td class=\"tdTitle\">\r\n\
<label>扩展信息3</label>\r\n\
</td>\r\n\
<td class=\"tdContent\">\r\n\
<input id=\"53\" name=\"53\" class=\"settingParameter \" type=\"text\" />\r\n\
</td>\r\n\
<td class=\"tdTitle\">\r\n\
<label>扩展信息4</label>\r\n\
</td>\r\n\
<td class=\"tdContent\">\r\n\
<input id=\"54\" name=\"54\" class=\"settingParameter \" type=\"text\" />\r\n\
</td>\r\n\
</tr>\r\n\
<tr>\r\n\
<td class=\"tdTitle\">\r\n\
<label>扩展信息5</label>\r\n\
</td>\r\n\
<td class=\"tdContent\">\r\n\
<input id=\"55\" name=\"55\" class=\"settingParameter \" type=\"text\" />\r\n\
</td>\r\n\
<td class=\"tdTitle\">\r\n\
<label>扩展信息6</label>\r\n\
</td>\r\n\
<td class=\"tdContent\">\r\n\
<input id=\"56\" name=\"56\" class=\"settingParameter \" type=\"text\" />\r\n\
</td>\r\n\
</tr>\r\n\
<tr>\r\n\
<td colspan=\"4\" style=\"padding-top:6px;\">\r\n\
<a href=\"#\" class=\"settingBtn\" id=\"btnSave\">保存</a>\r\n\
", 4199);
inputSecurityToken(); espRenderBlock(conn, "\r\n\
</td>\r\n\
</tr>\r\n\
</table>\r\n\
</form>\r\n\
<script src=\"../../scripts/easyui/jquery.min.js\"></script>\r\n\
<script src=\"../../scripts/easyui/jquery.easyui.min.js\"></script>\r\n\
<script src=\"../../scripts/easyui/locale/easyui-lang-zh_CN.js\"></script>\r\n\
<script src=\"../../scripts/utilities.js\"></script>\r\n\
<script src=\"../../scripts/jquery.validate.min.js\"></script>\r\n\
<script src=\"../../scripts/jquery.validate.extend.js\"></script>\r\n\
<script type=\"text/javascript\">\r\n\
//参数适配器\r\n\
var parameterAdaptor = new ParameterAdaptor();\r\n\
\r\n\
$().ready(function () {\r\n\
loadDeviceInfo();\r\n\
$(\"#btnSave\").click(saveParametersToServer);\r\n\
\r\n\
var rules = {};\r\n\
for (var i = 45; i <= 56; i++) {\r\n\
if (i == 47) {\r\n\
rules[i] = {\r\n\
maxByteLength: 30\r\n\
};\r\n\
} else {\r\n\
rules[i] = {\r\n\
maxByteLength: 60\r\n\
};\r\n\
}\r\n\
}\r\n\
$(\"#deviceInfoForm\").validate({\r\n\
rules: rules\r\n\
});\r\n\
});\r\n\
\r\n\
//加载设备信息\r\n\
function loadDeviceInfo() {\r\n\
var RefererInfo = \"deviceSettingsInfo\";\r\n\
parameterAdaptor.getParameters(RefererInfo, onLoadSuccess);\r\n\
}\r\n\
\r\n\
//加载表单数据\r\n\
function onLoadSuccess(data) {\r\n\
$(\"#deviceInfoForm\").form(\"load\", data.feedback);\r\n\
}\r\n\
\r\n\
//保存参数到服务器\r\n\
function saveParametersToServer() {\r\n\
var formObj = $(\"#deviceInfoForm\");\r\n\
if (!formObj.valid()) {\r\n\
$.messager.alert(\"提示\", \"参数验证有误,请修改后再提交!\", \"error\");\r\n\
return;\r\n\
}\r\n\
parameterAdaptor.saveParameters(formObj);\r\n\
}\r\n\
</script>\r\n\
</body>\r\n\
\r\n\
</html>", 1934);
}
ESP_EXPORT int esp_view_39df51a513b14995232abf8eb845cd9a(HttpRoute *route, MprModule *module) {
espDefineView(route, "client/settings/base/deviceSettingsInfo.esp", view_39df51a513b14995232abf8eb845cd9a);
return 0;
}