15832144755
2021-08-27 3516f02277035cdc7ff137422709b16efe97ca4a
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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, shrink-to-fit=no">
    <title></title>
    <link href="/hxzkoa/hxzk/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <link href="/hxzkoa/hxzk/assets/img/favicon.ico" rel="icon" type="image/x-icon" />
    <link href="/hxzkoa/hxzk/assets/css/components/custom-modal.css" rel="stylesheet" type="text/css" />
    <link href="/hxzkoa/hxzk/assets/css/components/custom-sweetalert.css" rel="stylesheet" type="text/css" />
    <link href="/hxzkoa/hxzk/assets/css/dashboard/dash_2.css" rel="stylesheet" type="text/css" />
    <link href="/hxzkoa/hxzk/assets/css/elements/custom-pagination.css" rel="stylesheet" type="text/css" />
    <link href="/hxzkoa/hxzk/assets/css/loader.css" rel="stylesheet" type="text/css" />
    <link href="/hxzkoa/hxzk/assets/css/scrollspyNav.css" rel="stylesheet" type="text/css" />
    <link href="/hxzkoa/hxzk/assets/css/main.css" rel="stylesheet" type="text/css" />
    <link href="/hxzkoa/hxzk/assets/css/structure.css" rel="stylesheet" type="text/css" />
    <link href="/hxzkoa/hxzk/assets/css/elements/search.css" rel="stylesheet" type="text/css" />
    <link href="/hxzkoa/hxzk/plugins/apex/apexcharts.css" rel="stylesheet" type="text/css">
    <link href="/hxzkoa/hxzk/plugins/animate/animate.css" rel="stylesheet" type="text/css" />
    <link href="/hxzkoa/hxzk/plugins/highlight/styles/monokai-sublime.css" rel="stylesheet" type="text/css" />
    <link href="/hxzkoa/hxzk/plugins/sweetalerts/sweetalert2.min.css" rel="stylesheet" type="text/css" />
    <link href="/hxzkoa/hxzk/plugins/sweetalerts/sweetalert.css" rel="stylesheet" type="text/css" />
    <link href="/hxzkoa/hxzk/plugins/table/datatable/datatables.css" rel="stylesheet" type="text/css">
    <link href="/hxzkoa/hxzk/plugins/table/datatable/custom_dt_html5.css" rel="stylesheet" type="text/css">
    <link href="/hxzkoa/hxzk/plugins/table/datatable/dt-global_style.css" rel="stylesheet" type="text/css">
    <link href="/hxzkoa/hxzk/plugins/perfect-scrollbar/perfect-scrollbar.css" rel="stylesheet" type="text/css" />
    <link href="https://fonts.gstatic.com" rel="preconnect" >
    <link href="https://fonts.googleapis.com/css2?family=Ma+Shan+Zheng&display=swap" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css?family=Quicksand:400,500,600,700&display=swap" rel="stylesheet">
    <style>
        .panel-head {
            font-size: 1rem;
            color: rgba(255, 255, 255, .7);
            line-height: 2rem;
            text-align: center;
            background: linear-gradient(rgb(0, 20, 30), rgb(0, 40, 70));
            border: 2px solid rgba(0, 90, 120, .3);
        }
        .table-bordered td, .table-bordered th {
            border: 1px solid #ebedf2;
        }
    </style>
    <script src="/hxzkoa/hxzk/assets/js/app.js"></script>
    <script src="/hxzkoa/hxzk/assets/js/dashboard/dash_2.js"></script>
    <script src="/hxzkoa/hxzk/assets/js/loader.js"></script>
    <script src="/hxzkoa/hxzk/assets/js/libs/jquery-3.1.1.min.js"></script>
    <script src="/hxzkoa/hxzk/bootstrap/js/bootstrap.min.js"></script>
    <script src="/hxzkoa/hxzk/bootstrap/js/popper.min.js"></script>
    <script src="/hxzkoa/hxzk/plugins/apex/apexcharts.min.js"></script>
    <script src="/hxzkoa/hxzk/plugins/table/datatable/button-ext/jszip.min.js"></script>
    <script src="/hxzkoa/hxzk/plugins/table/jquery.table2excel.js"></script>
    <script src="/hxzkoa/hxzk/plugins/sweetalerts/promise-polyfill.js"></script>
    <script src="/hxzkoa/hxzk/plugins/sweetalerts/sweetalert2.min.js"></script>
    <script src="/hxzkoa/hxzk/plugins/sweetalerts/custom-sweetalert.js"></script>
    <script src="/hxzkoa/hxzk/plugins/perfect-scrollbar/perfect-scrollbar.min.js"></script>
</head>
<body class="alt-menu sidebar-noneoverflow">
    <!-- BEGIN LOADER -->
    <div id="load_screen"> <div class="loader"> <div class="loader-content">
        <div class="spinner-grow align-self-center"></div>
    </div></div></div>
    <!--  END LOADER -->    
    <div class="border-left" style="opacity:0.4;float:left;position:absolute;z-index:1;left:120px;height:20px;"><img alt="" src="/hxzkoa/resources/images/border.png" class="img-left"></div>
    <div class="border-right" style="opacity:0.4;float:right;position:absolute;z-index:2;right:120px;"><img alt="" src="/hxzkoa/resources/images/border2.png" class="img-right"></div>
    <!--  BEGIN NAVBAR  -->
    <div class="login-page"></div>
    <!--  END NAVBAR  -->
    <!--  BEGIN MAIN CONTAINER  -->
    <div class="main-container" id="container">
        <div class="overlay"></div>
        <div class="search-overlay"></div>
        <!--  BEGIN TOPBAR  -->
        <div class="header-page"></div>
        <!--  END TOPBAR  -->
        <!--  BEGIN CONTENT PART  -->
        <div id="content" class="main-content">
            <div class="layout-px-spacing">           
                <div class="row layout-top-spacing" id="cancel-row">
                    <div class="col-xl-12 col-lg-12 col-sm-12  layout-spacing">
                        <div class="widget-content widget-content-area br-6">
                            <div class="table-responsive mb-4 mt-4" style="height:400px;">
                            <div style="width:40%;float:left;">
                                <table id="html5-extension" class="table table-hover" style="width:100%;">      
                                        <thead>
                                            <tr>
                                             <th>设备IP</th>
                                             <th>设备名称</th>
                                             <th>MAC地址</th>
                                             <th>版本</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                             <tr align="center" class="d">
                                             <td>1</td>
                                             <td>2</td>
                                             <td>3</td>
                                             <td>4</td>
                                            </tr>
                                        </tbody>
                                </table>
                                <button type="button" class="btn btn-secondary add">保存</button>
                                <button type="button" class="btn btn-secondary modify" id="modifyAllButton">全部修改</button>
                                <button type="button" class="btn btn-secondary reset">重置</button>
                                <button type="button" class="btn btn-secondary restart">重启</button>
                            </div>
                            <div style="width:40%;margin-left:10%;float:left;">
                                <form id="form1" action="/hxzkoa/admin/AuditRegistServlet" method="post">
                                    <table width="100%">
                                     <tr>
                                      <td colspan="2">
                                       <!-- 校对信息 表格 -->
                                       <table width="100%" class="cont" >
                                        <tr>
                                         <td align="right"><label for="wifi_webname">用户名:</label></td>
                                         <td align="left">
                                          <input type="text" class="form-control" id="wifi_webname" value="">
                                         </td>
                                         <td align="right"><label for="static_ip">静态IP:</label></td>
                                         <td align="left"><input type="text" class="form-control" id="static_ip" value="192.168.0.1"></td>
                                        </tr>
                                        <tr>
                                         <td align="right"><label for="wifi_webPass">密码:</label></td>
                                         <td align="left"><input type="text" class="form-control" id="wifi_webPass" value=""></td>
                                         <td align="right"><label for="gate">网关:</label></td>
                                         <td align="left"><input type="text" class="form-control" id="gate" value=""></td>
                                        </tr>
                                        <tr>
                                         <td align="right"><label for="wifi_anchorid">设备ID:</label></td>
                                         <td align="left"><input type="text" class="form-control" id="wifi_anchorid" value=""></td>
                                         <td align="right"><label for="wifi_ziwang">子网掩码:</label></td>
                                         <td align="left"><input type="text" class="form-control" id="wifi_ziwang" value=""></td>
                                         </tr>
                                        <tr>
                                         <td align="right"><label for="wifi_port">目标端口:</label></td>
                                         <td align="left"><input type="text" class="form-control" id="wifi_port" value=""></td>
                                         <td align="right"><label for="wifi_ip">目标IP:</label></td>
                                         <td align="left"><input type="text" class="form-control" id="wifi_ip" value=""></td>
                                        </tr>
                                        <tr>
                                         <td align="right"><label for="wifi_model">工作模式:</label></td>
                                         <td align="left">
                                          <select class="form-control form-control-lg" id="wifi_model">
                                           <option value="">TCP-Client</option>
                                          </select>
                                         </td>
                                         <td align="right"><label for="mac">MAC地址:</label></td>
                                         <td align="left"><input type="text" class="form-control" id="mac" value=""></td>
                                         </tr>
                                        <tr>
                                         <td align="right"><label for="local_port">本地端口:</label></td>
                                         <td align="left"><input type="text" class="form-control" id="local_port" value=""></td>
                                         <td align="right"></td>
                                         <td align="left"></td>
                                        </tr>
                                        <tr>
                                         <td align="left" colspan="8">&nbsp;&nbsp;&nbsp;&nbsp;<textarea class="form-control" id="wifi_search" rows="3"></textarea></td>
                                        </tr>
                                        <tr>
                                         <td colspan="8" style="justify-content:center;">
                                         <button type="button" class="btn btn-secondary openweb">打开网页</button>
                                         <button type="button" class="btn btn-secondary clear">清空</button>
                                         <button type="button" class="btn btn-secondary more">more</button>
                                         </td>
                                        </tr>
                                       </table>
                                       </td>
                                     </tr>
                                    </table>
                                   </form>
                              </div>
                           </div>
                       </div>
                   </div>
               </div>
            </div>
        </div>
        <!--  END CONTENT PART  -->
    </div>
    <%
                String username=(String)session.getAttribute("username");
                if(username==null || username.equals("")){
                request.getRequestDispatcher("/hxzk/login.jsp").forward(request,response);
                return;
                }
                %>
    <!-- END MAIN CONTAINER -->    
    <script> 
        $(document).ready(function() {
            App.init();$.ajax({async : false, type : "POST",url : "/hxzkoa/getSysSetting_list.do",data : {},dataType : "json",success:function(data){title = data[0].title;document.title = title;},});$.ajax({async : false, type : "POST",url : "/hxzkoa/getSysSetting_list.do",data : {},dataType : "json",success:function(data){title = data[0].title;document.title = title;},});
        });
        $('.header-page').load('/hxzkoa/hxzk/top.html');$('.login-page').load('/hxzkoa/hxzk/head.html');
         // 新增功能
        $('.add').on('click', function() {
            var ip = $("#wifi_ip").val();
            var webname = $("#wifi_webname").val();
            var webPass = $("#wifi_webPass").val();
            var anchorid = $("#wifi_anchorid").val();
            var port = $("#wifi_port").val();
            var wifiname = $("#wifi_wifiname").val();
            var wifipass = $("#wifi_wifipass").val();
            var ziwang = $("#wifi_ziwang").val();
            var xieyitype = $('#wifi_xieyitype option:selected').val();
            var model = $('#wifi_model option:selected').val();
            if ($("#wifi_webname").val() == ""||$("#wifi_webPass").val() == "") {
                swal('输入有误','用户名和密码不能为空!','error');return;
            }
            $.ajax({
                async : false, //同步的
                type : "POST",
                url : "/hxzkoa/wifiManagement_modify.do",
                data : {
                    ip : ip,
                    webname : webname,
                    webPass : webPass,
                    anchorid : anchorid,
                    port : port,
                    wifiname : wifiname,
                    wifipass : wifipass,
                    ziwang : ziwang,
                    xieyitype : xieyitype,
                    model : model
                },
                dataType : "json"
            });
            swal({title:"Saved!",
               text:"保存成功!",
               type:"success",
               showCancelButton:false,
               showConfirmButton:false,
               buttons: false
            })
            setTimeout("window.location.reload()",1000);
        });
        $('.modify').on('click', function() {
            var ip = $("#wifi_ip").val();
            var webname = $("#wifi_webname").val();
            var webPass = $("#wifi_webPass").val();
            var anchorid = $("#wifi_anchorid").val();
            var port = $("#wifi_port").val();
            var wifiname = $("#wifi_wifiname").val();
            var wifipass = $("#wifi_wifipass").val();
            var ziwang = $("#wifi_ziwang").val();
            var xieyitype = $('#wifi_xieyitype option:selected').val();
            var model = $('#wifi_model option:selected').val();
            if ($("#wifi_webname").val() == ""||$("#wifi_webPass").val() == "") {
                swal('输入有误','用户名和密码不能为空!','error');return;
            }
            $.ajax({
                async : false, //同步的
                type : "POST",
                url : "/hxzkoa/wifiManagement_modify.do",
                data : {
                    ip : ip,
                    webname : webname,
                    webPass : webPass,
                    anchorid : anchorid,
                    port : port,
                    wifiname : wifiname,
                    wifipass : wifipass,
                    ziwang : ziwang,
                    xieyitype : xieyitype,
                    model : model
                },
                dataType : "json"
            });
            swal({title:"Saved!",
               text:"修改成功!",
               type:"success",
               showCancelButton:false,
               showConfirmButton:false,
               buttons: false
            })
            setTimeout("window.location.reload()",1000);
        });
        $('.clear').on('click', function() {
            $("#wifi_search").val("");
        });
        $('.openweb').on('click', function() {
            if ($("#wifi_ip").val() == ""||$("#wifi_port").val() == "") {
                swal('输入有误','IP和端口号不能为空!','error');return;
            }
            var ipPort = "http://"+$("#wifi_ip").val()+":"+$("#wifi_port").val()
            window.open(ipPort, "topFrame"); 
        });
        // 重置
        $(".reset").click(function() {
           swal({title:"Network!",
               text:"没有选中设备!",
               type:"error",
               showCancelButton:false,
               showConfirmButton:false,
               buttons: false,
               timer: 1000
            })
        });
        // 重启
        $(".restart").click(function() {
           swal({title:"Network!",
               text:"没有选中设备!",
               type:"error",
               showCancelButton:false,
               showConfirmButton:false,
               buttons: false,
               timer: 1000
            })
        });
        // more
        $(".more").click(function() {
            $.ajax({
                async : false, //同步的
                type : "POST",
                url : "/hxzkoa/networkManagement_more.do",
                dataType : "json",
                error : function() {
                    swal({title:"Network!",
                       text:"cmd /c systemFiles\\IP\\anchormage.exe执行失败!",
                       type:"error",
                       showCancelButton:false,
                       showConfirmButton:false,
                       buttons: false,
                       timer: 1000
                    })
                }
            });
        });
    </script>
</body>
</html>