From 52cffc4ab8e9787a6f233295502c7c9788dddae1 Mon Sep 17 00:00:00 2001
From: fxl <473369119@qq.com>
Date: 星期二, 07 三月 2023 10:45:17 +0800
Subject: [PATCH] 3.7

---
 src/main/webapp/hxzk/fence/jiankongManagement.jsp |  674 ++++++++++++++++++++++++++++++-------------------------
 1 files changed, 365 insertions(+), 309 deletions(-)

diff --git a/src/main/webapp/hxzk/fence/jiankongManagement.jsp b/src/main/webapp/hxzk/fence/jiankongManagement.jsp
index a99f0b7..05a6ade 100644
--- a/src/main/webapp/hxzk/fence/jiankongManagement.jsp
+++ b/src/main/webapp/hxzk/fence/jiankongManagement.jsp
@@ -7,7 +7,7 @@
 				<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>
+				<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" />
@@ -36,6 +36,33 @@
 				<link href="https://fonts.googleapis.com/css?family=Quicksand:400,500,600,700&display=swap"
 					rel="stylesheet">
 				<style>
+					body {
+						margin: 0px;
+						width: 100%;
+						min-width: 1500px;
+						max-width: 100%;
+						height: 100%;
+						background-color: #F0F0F0;
+					}
+
+					#head {
+						background-color: #FFFF00;
+						width: 100%;
+						height: 100px;
+					}
+
+					#center {
+						background-color: #00FFFF;
+						width: 100%;
+						min-height: 100%;
+					}
+
+					#foot {
+						background-color: #FF00FF;
+						width: 100%;
+						height: 100px;
+					}
+
 					.panel-head {
 						font-size: 1rem;
 						color: rgba(255, 255, 255, .7);
@@ -76,10 +103,11 @@
 				</div>
 				<!--  END LOADER -->
 				<div class="border-left"
-					style="opacity:0.4;float:left;position:absolute;z-index:1;left:120px;height:20px;">
+					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;">
+				<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  -->
@@ -88,7 +116,7 @@
 				<!--  BEGIN MODAL  -->
 				<div class="modal fade addNew" tabindex="-1" role="dialog" aria-labelledby="myExtraLargeModalLabel"
 					aria-hidden="true">
-					<div class="modal-dialog modal-xl" role="document" style="width:30%;">
+					<div class="modal-dialog modal-xl" role="document" style="width: 30%;">
 						<div class="modal-content">
 							<div class="modal-header">
 								<h5 class="modal-title" id="myExtraLargeModalLabel">鏂板</h5>
@@ -105,74 +133,81 @@
 								<form action="form_action.asp" method="get">
 									<div class="form-group row  mb-4">
 										<label for="colFormLabelSm" class="col-sm-2 col-form-label col-form-label-sm"
-											style="font-size:12px;">鍖哄煙鍚嶇О:</label>
+											style="font-size: 12px;">鍖哄煙缁戝畾:</label>
 										<div class="col-sm-10">
-											<input class="form-control" type="hidden" id="fencename" />
-											<select class="form-control form-control-lg" id="bumen_m"
-												style="font-size:15px;">
+											<input class="form-control" type="hidden" id="fencename" /> <select
+												class="form-control form-control-lg" id="bumen_m"
+												style="font-size: 15px;">
 												<c:forEach items="${fences}" var="list">
-													<option value="${list.name}">${list.name}
-													</option>
+													<option value="${list.name}">${list.name}</option>
 												</c:forEach>
 											</select>
 										</div>
 									</div>
 									<div class="form-group row  mb-4">
 										<label for="colFormLabelSm" class="col-sm-2 col-form-label col-form-label-sm"
-											style="font-size:12px;">璁惧ID:</label>
+											style="font-size: 12px;">璁惧鐢ㄦ埛鍚�:</label>
 										<div class="col-sm-10">
-											<input class="form-control" type="text" id="shebeiid" />
+											<input class="form-control" type="text" id="yonghuming" />
 										</div>
 									</div>
 									<div class="form-group row  mb-4">
 										<label for="colFormLabelSm" class="col-sm-2 col-form-label col-form-label-sm"
-											style="font-size:12px;">閫氶亾ID:</label>
+											style="font-size: 12px;">璁惧瀵嗙爜:</label>
 										<div class="col-sm-10">
-											<input class="form-control" type="text" id="tongdaoid" />
+											<input class="form-control" type="text" id="mima" />
 										</div>
 									</div>
 									<div class="form-group row  mb-4">
 										<label for="colFormLabelSm" class="col-sm-2 col-form-label col-form-label-sm"
-											style="font-size:12px;">X鍧愭爣:</label>
+											style="font-size: 12px;">璁惧IP:</label>
+										<div class="col-sm-10">
+											<input class="form-control" type="text" id="baoliu1" />
+										</div>
+									</div>
+									<div class="form-group row  mb-4">
+										<label for="colFormLabelSm" class="col-sm-2 col-form-label col-form-label-sm"
+											style="font-size: 12px;">X鍧愭爣:</label>
 										<div class="col-sm-10">
 											<input class="form-control" type="text" id="posx" />
 										</div>
 									</div>
 									<div class="form-group row  mb-4">
 										<label for="colFormLabelSm" class="col-sm-2 col-form-label col-form-label-sm"
-											style="font-size:12px;">Y鍧愭爣:</label>
+											style="font-size: 12px;">Y鍧愭爣:</label>
 										<div class="col-sm-10">
 											<input class="form-control" type="text" id="posy" />
 										</div>
 									</div>
 									<div class="form-group row  mb-4">
 										<label for="colFormLabelSm" class="col-sm-2 col-form-label col-form-label-sm"
-											style="font-size:12px;">Z鍧愭爣:</label>
+											style="font-size: 12px;">Z鍧愭爣:</label>
 										<div class="col-sm-10">
 											<input class="form-control" type="text" id="posz" />
 										</div>
 									</div>
 									<div class="form-group row  mb-4">
 										<label for="colFormLabelSm" class="col-sm-2 col-form-label col-form-label-sm"
-											style="font-size:12px;">妤煎眰:</label>
+											style="font-size: 12px;">鎵�鍦ㄦゼ灞�:</label>
 										<div class="col-sm-10">
 											<input class="form-control" type="text" id="floor" />
 										</div>
 									</div>
 									<div class="form-group row  mb-4">
 										<label for="colFormLabelSm" class="col-sm-2 col-form-label col-form-label-sm"
-											style="font-size:12px;">鍚嶇О:</label>
+											style="font-size: 12px;">瑙嗛鍚嶇О:</label>
 										<div class="col-sm-10">
 											<input class="form-control" type="text" id="name" />
 										</div>
 									</div>
-									<div class="modal-footer" style="margin-top:10%; margin-left:10%;float:left;">
+									<div class="modal-footer" style="margin-top: 10%; margin-left: 10%; float: left;">
 										<button type="button" class="btn btn-primary add">淇濆瓨</button>
 										<a>
 											<c:forEach var="i" begin="1" end="28">&nbsp</c:forEach>
 										</a>
-										<button class="btn" data-dismiss="modal"><i
-												class="flaticon-cancel-12"></i>鍙栨秷</button>
+										<button class="btn" data-dismiss="modal">
+											<i class="flaticon-cancel-12"></i>鍙栨秷
+										</button>
 									</div>
 								</form>
 							</div>
@@ -181,7 +216,7 @@
 				</div>
 				<div class="modal fade modifyNew" tabindex="-1" role="dialog" aria-labelledby="myExtraLargeModalLabel"
 					aria-hidden="true">
-					<div class="modal-dialog modal-xl" role="document" style="width:30%;">
+					<div class="modal-dialog modal-xl" role="document" style="width: 30%;">
 						<div class="modal-content">
 							<div class="modal-header">
 								<h5 class="modal-title" id="myExtraLargeModalLabel">淇敼</h5>
@@ -198,107 +233,78 @@
 								<form action="form_action.asp" method="get">
 									<div class="form-group row  mb-4">
 										<label for="colFormLabelSm" class="col-sm-2 col-form-label col-form-label-sm"
-											style="font-size:12px;">鍖哄煙鍚嶇О:</label>
+											style="font-size: 12px;">鍖哄煙缁戝畾:</label>
 										<div class="col-sm-10">
-											<input class="form-control" type="hidden" id="fencenameg" />
-											<select class="form-control form-control-lg" id="bumen_mg"
-												style="font-size:15px;">
+											<input class="form-control" type="hidden" id="fencenameg" /> <select
+												class="form-control form-control-lg" id="bumen_mg"
+												style="font-size: 15px;">
 												<c:forEach items="${fences}" var="list">
-													<option value="${list.name}">${list.name}
-													</option>
+													<option value="${list.name}">${list.name}</option>
 												</c:forEach>
 											</select>
 										</div>
 									</div>
 									<div class="form-group row  mb-4">
 										<label for="colFormLabelSm" class="col-sm-2 col-form-label col-form-label-sm"
-											style="font-size:12px;">璁惧ID:</label>
+											style="font-size: 12px;">璁惧鐢ㄦ埛鍚�:</label>
 										<div class="col-sm-10">
-											<input class="form-control" type="text" id="shebeiidg" />
+											<input class="form-control" type="text" id="yonghumingg" />
 										</div>
 									</div>
 									<div class="form-group row  mb-4">
 										<label for="colFormLabelSm" class="col-sm-2 col-form-label col-form-label-sm"
-											style="font-size:12px;">閫氶亾ID:</label>
+											style="font-size: 12px;">璁惧瀵嗙爜:</label>
 										<div class="col-sm-10">
-											<input class="form-control" type="text" id="tongdaoidg" />
+											<input class="form-control" type="text" id="mimag" />
 										</div>
 									</div>
 									<div class="form-group row  mb-4">
 										<label for="colFormLabelSm" class="col-sm-2 col-form-label col-form-label-sm"
-											style="font-size:12px;">X鍧愭爣:</label>
+											style="font-size: 12px;">璁惧IP:</label>
+										<div class="col-sm-10">
+											<input class="form-control" type="text" id="baoliu1g" />
+										</div>
+									</div>
+									<div class="form-group row  mb-4">
+										<label for="colFormLabelSm" class="col-sm-2 col-form-label col-form-label-sm"
+											style="font-size: 12px;">X鍧愭爣:</label>
 										<div class="col-sm-10">
 											<input class="form-control" type="text" id="posxg" />
 										</div>
 									</div>
 									<div class="form-group row  mb-4">
 										<label for="colFormLabelSm" class="col-sm-2 col-form-label col-form-label-sm"
-											style="font-size:12px;">Y鍧愭爣:</label>
+											style="font-size: 12px;">Y鍧愭爣:</label>
 										<div class="col-sm-10">
 											<input class="form-control" type="text" id="posyg" />
 										</div>
 									</div>
 									<div class="form-group row  mb-4">
 										<label for="colFormLabelSm" class="col-sm-2 col-form-label col-form-label-sm"
-											style="font-size:12px;">Z鍧愭爣:</label>
+											style="font-size: 12px;">Z鍧愭爣:</label>
 										<div class="col-sm-10">
 											<input class="form-control" type="text" id="poszg" />
 										</div>
 									</div>
 									<div class="form-group row  mb-4">
 										<label for="colFormLabelSm" class="col-sm-2 col-form-label col-form-label-sm"
-											style="font-size:12px;">妤煎眰:</label>
+											style="font-size: 12px;">鎵�鍦ㄦゼ灞�:</label>
 										<div class="col-sm-10">
 											<input class="form-control" type="text" id="floorg" />
 										</div>
 									</div>
 									<div class="form-group row  mb-4">
 										<label for="colFormLabelSm" class="col-sm-2 col-form-label col-form-label-sm"
-											style="font-size:12px;">鍚嶇О:</label>
+											style="font-size: 12px;">瑙嗛鍚嶇О:</label>
 										<div class="col-sm-10">
 											<input class="form-control" type="text" id="nameg" />
 										</div>
 									</div>
-									<div class="modal-footer" style="margin-top:10%; margin-left:10%;float:left;">
+									<div class="modal-footer" style="margin-top: 10%; margin-left: 10%; float: left;">
 										<button type="button" class="btn btn-primary modify">淇濆瓨</button>
 										<a>
 											<c:forEach var="i" begin="1" end="28">&nbsp</c:forEach>
 										</a>
-										<button class="btn" data-dismiss="modal"><i
-												class="flaticon-cancel-12"></i>鍙栨秷</button>
-									</div>
-								</form>
-							</div>
-						</div>
-					</div>
-				</div>
-				<!-- <div class="modal fade importLable" tabindex="-1" role="dialog" aria-labelledby="myExtraLargeModalLabel"
-					aria-hidden="true">
-					<div class="modal-dialog modal-xl" role="document" style="width:25%;">
-						<div class="modal-content">
-							<div class="modal-header">
-								<h5 class="modal-title" id="myExtraLargeModalLabel">瀵煎叆鍩虹珯</h5>
-								<button type="button" class="close" data-dismiss="modal" aria-label="Close">
-									<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24"
-										viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
-										stroke-linecap="round" stroke-linejoin="round" class="feather feather-x">
-										<line x1="18" y1="6" x2="6" y2="18"></line>
-										<line x1="6" y1="6" x2="18" y2="18"></line>
-									</svg>
-								</button>
-							</div>
-							<div class="modal-body">
-								<form action="/hxzkoa/uploadAnchor.do" method="post" enctype="multipart/form-data">
-									<div class="form-group mb-4 mt-3"
-										style="width:50%; margin-left:25%; overflow:auto; _display:inline-block;">
-										<input type="file" class="form-control-file" name="file" id="importXls">
-									</div>
-									<input class="form-control" type="hidden" id="resultList" value="${resultList}" />
-									<div class="modal-footer" style="margin-top:10%; margin-left:10%;float:left;">
-										<button type="submit" class="btn btn-primary">淇濆瓨</button>
-										<a>
-											<c:forEach var="i" begin="1" end="28">&nbsp</c:forEach>
-										</a>
 										<button class="btn" data-dismiss="modal">
 											<i class="flaticon-cancel-12"></i>鍙栨秷
 										</button>
@@ -307,7 +313,7 @@
 							</div>
 						</div>
 					</div>
-				</div> -->
+				</div>
 				<!--  END MODAL  -->
 				<!--  BEGIN MAIN CONTAINER  -->
 				<div class="main-container" id="container">
@@ -323,10 +329,10 @@
 								<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">
-											<table id="html5-extension" class="table table-hover" style="width:100%">
+											<table id="html5-extension" class="table table-hover" style="width: 100%">
 												<div>
 													<div class="search-input-group-style input-group mb-3"
-														style="width:15%;float:left;margin-left:15px;margin-right:15px;">
+														style="width: 15%; float: left; margin-left: 15px; margin-right: 15px;">
 														<div class="input-group-prepend">
 															<span class="input-group-text search" id="basic-addon1"><svg
 																	xmlns="http://www.w3.org/2000/svg" width="24"
@@ -339,7 +345,7 @@
 																</svg></span>
 														</div>
 														<input type="text" id="search_input" class="form-control"
-															placeholder="璇疯緭鍏ュ洿鏍忓悕绉�" aria-label="Username"
+															placeholder="璇疯緭鍏ュ悕绉�" aria-label="Username"
 															aria-describedby="basic-addon1">
 													</div>
 
@@ -366,14 +372,15 @@
 													<tr align="center">
 														<th class="noExl">閫夋嫨</th>
 														<th>ID</th>
-														<th>鍖哄煙鍚嶇О</th>
-														<th>璁惧缂栧彿</th>
-														<th>閫氶亾缂栧彿</th>
+														<th>鍖哄煙缁戝畾</th>
+														<th>璁惧鐢ㄦ埛鍚�</th>
+														<th>璁惧瀵嗙爜</th>
+														<th>璁惧IP</th>
 														<th>X鍧愭爣</th>
 														<th>Y鍧愭爣</th>
 														<th>Z鍧愭爣</th>
-														<th>妤煎眰</th>
-														<th>鍚嶇О</th>
+														<th>鎵�鍦ㄦゼ灞�</th>
+														<th>瑙嗛鍚嶇О</th>
 														<th>娣诲姞鏃堕棿</th>
 													</tr>
 												</thead>
@@ -384,11 +391,13 @@
 																	type="checkbox" class="custom-control-input"
 																	id="${list.id}" name="selectIds"><label
 																	class="custom-control-label" for="${list.id}"
-																	style="position:raletive;left:20px;"></label></td>
+																	style="position: raletive; left: 20px;"></label>
+															</td>
 															<td>${list.id}</td>
 															<td>${list.fencename}</td>
-															<td>${list.shebeiid}</td>
-															<td>${list.tongdaoid}</td>
+															<td>${list.yonghuming}</td>
+															<td>${list.mima}</td>
+															<td>${list.baoliu1}</td>
 															<td>${list.posx}</td>
 															<td>${list.posy}</td>
 															<td>${list.posz}</td>
@@ -417,30 +426,63 @@
 						</div>
 						<!--  END CONTENT PART  -->
 					</div>
-					<% String superuser=(String)session.getAttribute("superuser"); String
-						deleteq=(String)session.getAttribute("deleteq"); String
-						alertq=(String)session.getAttribute("alertq"); String
-						deleteall=(String)session.getAttribute("deleteall"); %>
-						<input type="hidden" name="superuser" id="superuser" value="<%=superuser%>">
-						<input type="hidden" name="deleteq" id="deleteq" value="<%=deleteq%>">
-						<input type="hidden" name="alertq" id="alertq" value="<%=alertq%>">
-						<input type="hidden" name="deleteall" id="deleteall" value="<%=deleteall%>">
+					<% String superuser=(String) session.getAttribute("superuser"); String deleteq=(String)
+						session.getAttribute("deleteq"); String alertq=(String) session.getAttribute("alertq"); String
+						deleteall=(String) session.getAttribute("deleteall"); String username=(String)
+						session.getAttribute("username"); String fenceq=(String) session.getAttribute("fenceq"); if (username==null || username.equals("")) {
+						request.getRequestDispatcher("/hxzk/login.jsp").forward(request, response); return; } %>
+						<input type="hidden" name="superuser" id="superuser" value="<%=superuser%>"> <input
+							type="hidden" name="deleteq" id="deleteq" value="<%=deleteq%>"> <input type="hidden"
+							name="alertq" id="alertq" value="<%=alertq%>"> <input type="hidden" name="deleteall"
+							id="deleteall" value="<%=deleteall%>">
+							<input type="hidden" name="xianusera" id="xianusera" value="<%=username%>">
+							<input type="hidden" name="fenceq" id="fenceq" value="<%=fenceq%>">
 						<!-- END MAIN CONTAINER -->
 						<script>
 							// 椤甸潰鍒濆鍖�
-							$(document).ready(function () {
+							window.onload = function () {
 								App.init();
 								$.ajax({
 									async: false, //鍚屾鐨�
 									type: "POST",
-									url: "/hxzkoa/getSysSetting_list.do",
+									url: "/hxzkoa/getSysSetting_list2.do",
 									data: {
 
 									},
 									dataType: "json",
 									success: function (data) {
-										title = data[0].title
-										document.title = title;
+										title = data.dataList[0].title
+										//document.title = title;
+										if (data.dataList2[0].label == 0) {
+											$("#labela").css({ 'display': 'none' });
+										};
+										if (data.dataList2[0].achor == 0) {
+											$("#anchora").css({ 'display': 'none' });
+										};
+										if (data.dataList2[0].gps == 0) {
+											$("#gpsa").css({ 'display': 'none' });
+										};
+										if (data.dataList2[0].fence == 0) {
+											$("#fencea").css({ 'display': 'none' });
+										};
+										if (data.dataList2[0].warning == 0) {
+											$("#warninga").css({ 'display': 'none' });
+										};
+										if (data.dataList2[0].history == 0) {
+											$("#historya").css({ 'display': 'none' });
+										};
+										if (data.dataList2[0].attendance == 0) {
+											$("#attendancea").css({ 'display': 'none' });
+										};
+										if (data.dataList2[0].basiclnfo == 0) {
+											$("#basiclnfoa").css({ 'display': 'none' });
+										};
+										if (data.dataList2[0].video == 0) {
+											$("#videoa").css({ 'display': 'none' });
+										};
+										if (data.dataList2[0].gas == 0) {
+											$("#gasa").css({ 'display': 'none' });
+										};
 									},
 								});
 								$("#page_1").addClass("active");
@@ -448,6 +490,8 @@
 								var deleteq = document.getElementById("deleteq").value;
 								var alertq = document.getElementById("alertq").value;
 								var deleteall = document.getElementById("deleteall").value;
+								var fenceq = document.getElementById("fenceq").value;
+								document.getElementById("xianuser").innerHTML=document.getElementById("xianusera").value
 								//console.log(superuser)
 								if (superuser == "璁垮") {
 									$("#addButton").attr("disabled", "true");
@@ -467,100 +511,111 @@
 								if (deleteall == "鍚�") {
 									$("#deleteAllButton").attr("disabled", "true");
 								}
-							});
+								if (fenceq == "鍚�") {
+									$("#addButton").attr("disabled", "true");
+								}
+							};
 							// 鍔犺浇head澶嶇敤椤甸潰
-							$('.header-page').load('/hxzkoa/hxzk/top.html'); $('.login-page').load('/hxzkoa/hxzk/head.html');
+							$('.header-page').load('/hxzkoa/hxzk/top.html');
+							$('.login-page').load('/hxzkoa/hxzk/head.html');
 							// 鍒锋柊鍔熻兘
 							$(".reset").click(function () {
 								setTimeout("window.location.reload()", 1000);
 							});
 							// 鏂板鍔熻兘
-							$('.add').on('click', function () {
-								var reg = new RegExp("^[A-Za-z0-9]+$");
-								var fencename = $('#bumen_m option:selected').val();
-								var shebeiid = $("#shebeiid").val();
-								var tongdaoid = $("#tongdaoid").val();
-								var posx = $("#posx").val();
-								var posy = $("#posy").val();
-								var posz = $("#posz").val();
-								var floor = $("#floor").val();
-								var name = $("#name").val();
-								var reg2 = new RegExp("^[0-9][0-9]*$");
-								var sid = reg2.test(shebeiid);
-								var tid = reg2.test(tongdaoid);
-								if (fencename == "" || shebeiid == "" || tongdaoid == "" || posx == "" || posy == "" || posz == "" || floor == "" || name == "") {
-									swal('杈撳叆鏈夎', '杈撳叆涓嶈兘涓虹┖锛�', 'error'); return;
-								}
-								if ((!sid && shebeiid != "") || (!tid && tongdaoid != "")) {
-									swal('杈撳叆鏈夎', '涓嶈兘杈撳叆灏忔暟锛�', 'error'); return;
-								}
-								$.ajax({
-									async: false, //鍚屾鐨�
-									type: "POST",
-									dataType: "json",
-									url: "/hxzkoa/shipinManagement_add.do",
-									data: {
-										fencename: fencename,
-										shebeiid: shebeiid,
-										tongdaoid: tongdaoid,
-										posx: posx,
-										posy: posy,
-										posz: posz,
-										floor: floor,
-										name: name,
-									},
-									dataType: "json"
+							$('.add').on(
+								'click',
+								function () {
+									var reg = new RegExp("^[A-Za-z0-9]+$");
+									var fencename = $('#bumen_m option:selected').val();
+									var yonghuming = $("#yonghuming").val();
+									var mima = $("#mima").val();
+									var posx = $("#posx").val();
+									var posy = $("#posy").val();
+									var posz = $("#posz").val();
+									var floor = $("#floor").val();
+									var name = $("#name").val();
+									var baoliu1 = $("#baoliu1").val();
+									var reg2 = new RegExp("^[0-9][0-9]*$");
+									var sid = reg2.test(yonghuming);
+									var tid = reg2.test(mima);
+									if (fencename == "" || yonghuming == ""
+										|| mima == "" || posx == "" || posy == ""
+										|| posz == "" || floor == "" || name == "" || baoliu1 == "") {
+										swal('杈撳叆鏈夎', '杈撳叆涓嶈兘涓虹┖锛�', 'error');
+										return;
+									}
+									if ((!sid && yonghuming != "")
+										|| (!tid && mima != "")) {
+										swal('杈撳叆鏈夎', '涓嶈兘杈撳叆灏忔暟锛�', 'error');
+										return;
+									}
+									$.ajax({
+										async: false, //鍚屾鐨�
+										type: "POST",
+										dataType: "json",
+										url: "/hxzkoa/shipinManagement_add.do",
+										data: {
+											fencename: fencename,
+											yonghuming: yonghuming,
+											mima: mima,
+											posx: posx,
+											posy: posy,
+											posz: posz,
+											floor: floor,
+											name: name,
+											baoliu1: baoliu1,
+										},
+										dataType: "json"
+									});
+									swal({
+										title: "Saved!",
+										text: "淇濆瓨鎴愬姛锛�",
+										type: "success",
+										showCancelButton: false,
+										showConfirmButton: false,
+										buttons: false
+									})
+									setTimeout("window.location.reload()", 1000);
 								});
-								swal({
-									title: "Saved!",
-									text: "淇濆瓨鎴愬姛锛�",
-									type: "success",
-									showCancelButton: false,
-									showConfirmButton: false,
-									buttons: false
-								})
-								setTimeout("window.location.reload()", 1000);
-							});
 							// 淇敼鍔熻兘鍒濆鍖�
 							$('.initModify').on('click', function () {
 								var tr, state, firstId;
-								$('input[name="selectIds"]').each(
-									function () {
+								$('input[name="selectIds"]').each(function () {
+									state = $(this).prop('checked');
+									if (state) {
+										firstId = $(this).attr('id');
+										tr = $(this).parent().parent()[0];
+										$("#bumen_mg").val(tr.children[2].innerHTML);
+										$("#yonghumingg").val(tr.children[3].innerHTML);
+										$("#mimag").val(tr.children[4].innerHTML);
+										$("#baoliu1g").val(tr.children[5].innerHTML);
+										$("#posxg").val(tr.children[6].innerHTML);
+										$("#posyg").val(tr.children[7].innerHTML);
+										$("#poszg").val(tr.children[8].innerHTML);
+										$("#floorg").val(tr.children[9].innerHTML);
+										$("#nameg").val(tr.children[10].innerHTML);
+										return false;
+									}
+								});
+								if (!state) {
+									$('input[name="selectIds"]').each(function () {
 										state = $(this).prop('checked');
-										if (state) {
+										if (!state) {
 											firstId = $(this).attr('id');
 											tr = $(this).parent().parent()[0];
 											$("#bumen_mg").val(tr.children[2].innerHTML);
-											$("#shebeiidg").val(tr.children[3].innerHTML);
-											$("#tongdaoidg").val(tr.children[4].innerHTML);
-											$("#posxg").val(tr.children[5].innerHTML);
-											$("#posyg").val(tr.children[6].innerHTML);
-											$("#poszg").val(tr.children[7].innerHTML);
-											$("#floorg").val(tr.children[8].innerHTML);
-											$("#nameg").val(tr.children[9].innerHTML);
+											$("#yonghumingg").val(tr.children[3].innerHTML);
+											$("#mimag").val(tr.children[4].innerHTML);
+											$("#baoliu1g").val(tr.children[5].innerHTML);
+											$("#posxg").val(tr.children[6].innerHTML);
+											$("#posyg").val(tr.children[7].innerHTML);
+											$("#poszg").val(tr.children[8].innerHTML);
+											$("#floorg").val(tr.children[9].innerHTML);
+											$("#nameg").val(tr.children[10].innerHTML);
 											return false;
 										}
-									}
-								);
-								if (!state) {
-									$('input[name="selectIds"]').each(
-										function () {
-											state = $(this).prop('checked');
-											if (!state) {
-												firstId = $(this).attr('id');
-												tr = $(this).parent().parent()[0];
-												$("#bumen_mg").val(tr.children[2].innerHTML);
-												$("#shebeiidg").val(tr.children[3].innerHTML);
-												$("#tongdaoidg").val(tr.children[4].innerHTML);
-												$("#posxg").val(tr.children[5].innerHTML);
-												$("#posyg").val(tr.children[6].innerHTML);
-												$("#poszg").val(tr.children[7].innerHTML);
-												$("#floorg").val(tr.children[8].innerHTML);
-												$("#nameg").val(tr.children[9].innerHTML);
-												return false;
-											}
-										}
-									);
+									});
 									alert("璇烽�変腑涓�鏉℃暟鎹繘琛屼慨鏀�,褰撳墠榛樿绗竴鏉★紒");
 								}
 							});
@@ -569,8 +624,9 @@
 								var checkVal = [];
 								var obj = document.getElementsByName("selectIds");
 								var fencename = $('#bumen_mg option:selected').val();
-								var shebeiid = $("#shebeiidg").val();
-								var tongdaoid = $("#tongdaoidg").val();
+								var yonghuming = $("#yonghumingg").val();
+								var mima = $("#mimag").val();
+								var baoliu1 = $("#baoliu1g").val();
 								var posx = $("#posxg").val();
 								var posy = $("#posyg").val();
 								var posz = $("#poszg").val();
@@ -588,8 +644,9 @@
 									data: {
 										id: checkVal.toString(),
 										fencename: fencename,
-										shebeiid: shebeiid,
-										tongdaoid: tongdaoid,
+										yonghuming: yonghuming,
+										mima: mima,
+										baoliu1: baoliu1,
 										posx: posx,
 										posy: posy,
 										posz: posz,
@@ -648,11 +705,7 @@
 											})
 											setTimeout("window.location.reload()", 1000);
 										} else {
-											swal(
-												'鍒犻櫎澶辫触!',
-												'璇峰厛閫夋嫨鍒犻櫎鐨勫唴瀹�',
-												'error'
-											)
+											swal('鍒犻櫎澶辫触!', '璇峰厛閫夋嫨鍒犻櫎鐨勫唴瀹�', 'error')
 										}
 									}
 								})
@@ -688,138 +741,141 @@
 								})
 							});
 							// 鎼滅储鍔熻兘
-							$(".search").click(function () {
-								var input = $("#search_input").val();
-								if (input == "") {
-									swal('杈撳叆鏈夎', '杈撳叆涓嶈兘涓虹┖锛�', 'error'); return;
-								}
-								if (isNaN(input)) {
-									//swal('杈撳叆鏈夎','璇疯緭鍏ユ暟瀛楋紒','error');return;
-								}
-								$.ajax({
-									async: false, //鍚屾鐨�
-									type: "POST",
-									url: "/hxzkoa/shipinManagement_ssearch.do",
-									data: {
-										input: input
-									},
-									dataType: "json",
-									success: function (data) {
-										//鎼滅储瀹屾垚鍚庡埛鏂伴〉闈�,鍙樉绀烘煡鍒扮殑閮ㄥ垎
-										var str = "";
-										for (var k in data.dataList) {
-											str += "<tr align=\"center\" class=\"d\"><td class=\"noExl custom-control custom-checkbox\"><input type=\"checkbox\" class=\"custom-control-input\" id="+ data.dataList[k].id +" name=\"selectIds\"><label class=\"custom-control-label\" for="+ data.dataList[k].id +" style=\"position:raletive;left:20px;\"></label></td><td>"+data.dataList[k].id+"</td><td>"+data.dataList[k].fencename+"</td><td>"+data.dataList[k].shebeiid+"</td><td>"+data.dataList[k].tongdaoid+"</td><td>"+data.dataList[k].addtime+"</td></tr>"
+							$(".search")
+								.click(
+									function () {
+										var input = $("#search_input").val();
+										if (input == "") {
+											swal('杈撳叆鏈夎', '杈撳叆涓嶈兘涓虹┖锛�', 'error');
+											return;
 										}
-										$("#nr").html(str);
-										if (!data.pageList.length == 0) {
-											str = "";
-											str += "<li><a href=\"javascript:page('pre');\">涓婁竴椤�</a></li>";
-											for (var k = 0; k < data.pageList.length; k++) {
-												str += "<li id=\"page_" + data.pageList[k] + "\"><a href=\"javascript:page('" + data.pageList[k] + "');\">" + data.pageList[k] + "</a></li>";
-											}
-											str += "<li><a href=\"javascript:page('next');\">涓嬩竴椤�</a></li>";
-											$("#pageListId").html(str);
+										if (isNaN(input)) {
+											//swal('杈撳叆鏈夎','璇疯緭鍏ユ暟瀛楋紒','error');return;
 										}
-										$("#pageListId>li.active").removeClass("active");
-										$("#page_" + data.curPage).addClass("active");
-										$("#curPage").val(data.curPage);
+										$
+											.ajax({
+												async: false, //鍚屾鐨�
+												type: "POST",
+												url: "/hxzkoa/shipinManagement_ssearch.do",
+												data: {
+													input: input
+												},
+												dataType: "json",
+												success: function (data) {
+													//鎼滅储瀹屾垚鍚庡埛鏂伴〉闈�,鍙樉绀烘煡鍒扮殑閮ㄥ垎
+													var str = "";
+													for (var k in data.dataList) {
+														str += "<tr align=\"center\" class=\"d\"><td class=\"noExl custom-control custom-checkbox\"><input type=\"checkbox\" class=\"custom-control-input\" id=" + data.dataList[k].id + " name=\"selectIds\"><label class=\"custom-control-label\" for=" + data.dataList[k].id + " style=\"position:raletive;left:20px;\"></label></td><td>"
+															+ data.dataList[k].id
+															+ "</td><td>"
+															+ data.dataList[k].fencename
+															+ "</td><td>"
+															+ data.dataList[k].yonghuming
+															+ "</td><td>"
+															+ data.dataList[k].mima
+															+ "</td><td>"
+															+ data.dataList[k].baoliu1
+															+ "</td><td>"
+															+ data.dataList[k].posx
+															+ "</td><td>"
+															+ data.dataList[k].posy
+															+ "</td><td>"
+															+ data.dataList[k].posz
+															+ "</td><td>"
+															+ data.dataList[k].floor
+															+ "</td><td>"
+															+ data.dataList[k].name
+															+ "</td><td>"
+															+ data.dataList[k].addtime
+															+ "</td></tr>"
+													}
+													$("#nr").html(str);
+													if (!data.pageList.length == 0) {
+														str = "";
+														str += "<li><a href=\"javascript:page('pre');\">涓婁竴椤�</a></li>";
+														for (var k = 0; k < data.pageList.length; k++) {
+															str += "<li id=\"page_" + data.pageList[k] + "\"><a href=\"javascript:page('"
+																+ data.pageList[k]
+																+ "');\">"
+																+ data.pageList[k]
+																+ "</a></li>";
+														}
+														str += "<li><a href=\"javascript:page('next');\">涓嬩竴椤�</a></li>";
+														$("#pageListId").html(str);
+													}
+													$("#pageListId>li.active")
+														.removeClass("active");
+													$("#page_" + data.curPage)
+														.addClass("active");
+													$("#curPage").val(data.curPage);
 
-									},
-									error: function () {
-										//console.log('error');
-									}
-								});
-							});
-							// $(".namess").click(function () {
-							// 	var input = $("#names").val();
-							// 	if (input == "") {
-							// 		swal('杈撳叆鏈夎', '杈撳叆涓嶈兘涓虹┖锛�', 'error'); return;
-							// 	}
-							// 	if (isNaN(input)) {
-							// 		//swal('杈撳叆鏈夎','璇疯緭鍏ユ暟瀛楋紒','error');return;
-							// 	}
-							// 	$.ajax({
-							// 		async: false, //鍚屾鐨�
-							// 		type: "POST",
-							// 		url: "/hxzkoa/shipinManagement_cesearch.do",
-							// 		data: {
-							// 			input: input
-							// 		},
-							// 		dataType: "json",
-							// 		success: function (data) {
-							// 			//鎼滅储瀹屾垚鍚庡埛鏂伴〉闈�,鍙樉绀烘煡鍒扮殑閮ㄥ垎
-							// 			var str = "";
-							// 			for (var k in data.dataList) {
-							// 				str += "<tr align=\"center\" class=\"d\"><td class=\"noExl custom-control custom-checkbox\"><input type=\"checkbox\" class=\"custom-control-input\" id="+ data.dataList[k].id +" name=\"selectIds\"><label class=\"custom-control-label\" for="+ data.dataList[k].id +" style=\"position:raletive;left:20px;\"></label></td><td>"+data.dataList[k].id+"</td><td>"+data.dataList[k].fencename+"</td><td>"+data.dataList[k].shebeiid+"</td><td>"+data.dataList[k].tongdaoid+"</td><td>"+data.dataList[k].addtime+"</td></tr>"
-							// 			}
-							// 			$("#nr").html(str);
-							// 			if (!data.pageList.length == 0) {
-							// 				str = "";
-							// 				str += "<li><a href=\"javascript:page('pre');\">涓婁竴椤�</a></li>";
-							// 				for (var k = 0; k < data.pageList.length; k++) {
-							// 					str += "<li id=\"page_" + data.pageList[k] + "\"><a href=\"javascript:page('" + data.pageList[k] + "');\">" + data.pageList[k] + "</a></li>";
-							// 				}
-							// 				str += "<li><a href=\"javascript:page('next');\">涓嬩竴椤�</a></li>";
-							// 				$("#pageListId").html(str);
-							// 			}
-							// 			$("#pageListId>li.active").removeClass("active");
-							// 			$("#page_" + data.curPage).addClass("active");
-							// 			$("#curPage").val(data.curPage);
-
-							// 		},
-							// 		error: function () {
-							// 			//console.log('error');
-							// 		}
-							// 	});
-							// });
-							// 瀵煎嚭琛ㄦ牸
-							// $(".toAllExcel").click(function () {
-							// 	window.location.href = '/hxzkoa/anchorManagement_export.do';
-							// 	swal({
-							// 		title: "Exported!",
-							// 		text: "瀵煎嚭鎴愬姛锛�",
-							// 		type: "success",
-							// 		showCancelButton: false,
-							// 		showConfirmButton: false,
-							// 		buttons: false
-							// 	})
-							// 	setTimeout("window.location.reload()", 1000);
-							// });
+												},
+												error: function () {
+													//console.log('error');
+												}
+											});
+									});
 							// 鍒嗛〉璺宠浆
 							function page(page) {
 								var curPage = $("#curPage").val();
-								$.ajax({
-									async: false, //鍚屾鐨�
-									type: "POST",
-									url: "/hxzkoa/shipinManagement_page.do",
-									data: {
-										page: page,
-										curPage: curPage
-									},
-									dataType: "json",
-									success: function (data) {
-										var str = "";
-										for (var k in data.dataList) {
-											str += "<tr align=\"center\" class=\"d\"><td class=\"noExl custom-control custom-checkbox\"><input type=\"checkbox\" class=\"custom-control-input\" id="+ data.dataList[k].id +" name=\"selectIds\"><label class=\"custom-control-label\" for="+ data.dataList[k].id +" style=\"position:raletive;left:20px;\"></label></td><td>"+data.dataList[k].id+"</td><td>"+data.dataList[k].fencename+"</td><td>"+data.dataList[k].shebeiid+"</td><td>"+data.dataList[k].tongdaoid+"</td><td>"+data.dataList[k].addtime+"</td></tr>"
-										}
-										$("#nr").html(str);
-										if (!data.pageList.length == 0) {
-											str = "";
-											str += "<li><a href=\"javascript:page('pre');\">涓婁竴椤�</a></li>";
-											for (var k = 0; k < data.pageList.length; k++) {
-												str += "<li id=\"page_" + data.pageList[k] + "\"><a href=\"javascript:page('" + data.pageList[k] + "');\">" + data.pageList[k] + "</a></li>";
+								$
+									.ajax({
+										async: false, //鍚屾鐨�
+										type: "POST",
+										url: "/hxzkoa/shipinManagement_page.do",
+										data: {
+											page: page,
+											curPage: curPage
+										},
+										dataType: "json",
+										success: function (data) {
+											var str = "";
+											for (var k in data.dataList) {
+												str += "<tr align=\"center\" class=\"d\"><td class=\"noExl custom-control custom-checkbox\"><input type=\"checkbox\" class=\"custom-control-input\" id=" + data.dataList[k].id + " name=\"selectIds\"><label class=\"custom-control-label\" for=" + data.dataList[k].id + " style=\"position:raletive;left:20px;\"></label></td><td>"
+													+ data.dataList[k].id
+													+ "</td><td>"
+													+ data.dataList[k].fencename
+													+ "</td><td>"
+													+ data.dataList[k].yonghuming
+													+ "</td><td>"
+													+ data.dataList[k].mima
+													+ "</td><td>"
+													+ data.dataList[k].baoliu1
+													+ "</td><td>"
+													+ data.dataList[k].posy
+													+ "</td><td>"
+													+ data.dataList[k].posz
+													+ "</td><td>"
+													+ data.dataList[k].floor
+													+ "</td><td>"
+													+ data.dataList[k].name
+													+ "</td><td>"
+													+ data.dataList[k].addtime
+													+ "</td></tr>"
 											}
-											str += "<li><a href=\"javascript:page('next');\">涓嬩竴椤�</a></li>";
-											$("#pageListId").html(str);
+											$("#nr").html(str);
+											if (!data.pageList.length == 0) {
+												str = "";
+												str += "<li><a href=\"javascript:page('pre');\">涓婁竴椤�</a></li>";
+												for (var k = 0; k < data.pageList.length; k++) {
+													str += "<li id=\"page_" + data.pageList[k] + "\"><a href=\"javascript:page('"
+														+ data.pageList[k]
+														+ "');\">"
+														+ data.pageList[k]
+														+ "</a></li>";
+												}
+												str += "<li><a href=\"javascript:page('next');\">涓嬩竴椤�</a></li>";
+												$("#pageListId").html(str);
+											}
+											$("#pageListId>li.active")
+												.removeClass("active");
+											$("#page_" + data.curPage).addClass("active");
+											$("#curPage").val(data.curPage);
+										},
+										error: function () {
+											//console.log('error');
 										}
-										$("#pageListId>li.active").removeClass("active");
-										$("#page_" + data.curPage).addClass("active");
-										$("#curPage").val(data.curPage);
-									},
-									error: function () {
-										//console.log('error');
-									}
-								});
+									});
 							}
 							$(".table tbody").on('click', 'tr', function (e) {
 								//console.log(e.target.type)

--
Gitblit v1.10.0