<%@ page language="java" contentType="text/html; charset=UTF-8"
		 pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<!DOCTYPE html>
<html lang="zh-CN">
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
	<title>台账管理</title>
	<meta name="description" content="">
	<meta name="author" content="">
	<link rel="stylesheet" href="${ctx}/css/plugin/bootstrap/bootstrap.min.css">
	<link rel="stylesheet" href="${ctx}/css/plugin/metroStyle/metroStyle.css">
	<link rel="stylesheet" href="${ctx}/js/plugin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="${ctx}/css/plugin/mulitiCheckbox/fSelect.css">
    <link rel="stylesheet" href="${ctx}/css/plugin/bootstrap/bootstrap-datetimepicker.css">
	<link rel="stylesheet" href="${ctx}/css/basic.css">
<script src="${ctx}/js/plugin/jquery.min.js"></script>
<script src="${ctx}/js/plugin/layui/layer.js"></script>
<script src="${ctx}/jspJS/utils/loading.js"></script>
</head>
<script type="text/javascript">
</script>
<style type="text/css">
	#rightContent label {
		max-width: none;
	}
	.btn {
		padding: 2px 6px;
	}

	.title{
		text-align: right;
	}
	#lineTable td{
		padding: 10px 0;
	}
	#devTable td{
		padding: 3px 0;
	}
	.focus{
		color:red;
	}
</style>
<body style="overflow-y:hidden">
<div class="left-menu" style="color:#333;top:1%;bottom:2%;overflow-y:scroll;">
    <div class="pdt5"><input style="width:155px;" id="search_value" type="text" value="" placeholder="请输入关键词" />
    <input type="button" value="搜索" onclick="javascript: searchNode(search_value.value)" style="padding:0 5px;"></div>
	<div id="tree" class="ztree" style="padding:2px 2px;"></div>
</div>
<div  id="rightContent" style="position:absolute;left:270px;right:20px;top:0;bottom:0;z-index:1;">
<%--变电站信息部分--%>
<div id="subDiv" class="disnone">
	<table id="subTable" class="width100">
		<tr>
			<td class="title"  colspan="1"><label class="focus">*</label>电站ID：</td>
			<td colspan="5"><input type="text" id="subID" class="width100" readonly value=""  ></td>
			<td class="title"  colspan="1"><label class="focus">*</label>电站名称：</td>
			<td colspan="5"><input type="text" id="subName" class="width100" readonly value=""  ></td>
		</tr>
		<tr>
			<td class="title">电网设备编号：</td>
			<td colspan="3"><input type="text" id="powerDeviceNo" class="width100" readonly value=""  ></td>
			<td class="title">电压等级(kV)：</td>
			<td colspan="3"><input type="text" id="vol" class="width100" readonly value=""  ></td>
			<td class="title"><label class="focus">*</label>电站类型：</td>
			<td colspan="3"><input type="text" id="subType" class="width100" readonly value=""  ></td>
		</tr>
		<tr>
			<td class="title"><label class="focus">*</label>所属地市：</td>
			<td colspan="3"><input type="text" id="subCity" class="width100" readonly value=""  ></td>
			<td class="title"><label class="focus">*</label>运维单位：</td>
			<td colspan="3"><input type="text" id="subRunCompany" class="width100" readonly value=""  ></td>
			<td class="title"><label class="focus">*</label>维护班组：</td>
			<td colspan="3"><input type="text" id="subMaintain" class="width100" readonly value=""  ></td>
		</tr>
		<tr>
			<td class="title"><label class="focus">*</label>是否智能站：</td>
			<td colspan="3"><input type="text" id="isIntelligent" class="width100" readonly value=""  ></td>
			<td class="title"><label class="focus">*</label>是否枢纽站：</td>
			<td colspan="3"><input type="text" id="isCroe" class="width100" readonly value=""  ></td>
			<td class="title"><label class="focus">*</label>重要级别：</td>
			<td colspan="3"><input type="text" id="importantLevel" class="width100" readonly value=""  ></td>
		</tr>
		<tr>
			<td class="title">换流站类型：</td>
			<td colspan="3"><input type="text" id="exchangeTyoe" class="width100" readonly value=""  ></td>
			<td class="title">所属直流系统：</td>
			<td colspan="3"><input type="text" id="dcOwnerSystem" class="width100" readonly value=""  ></td>
			<td class="title">直流输送容量：</td>
			<td colspan="3"><input type="text" id="dcContent" class="width100" readonly value=""  ></td>
		</tr>
		<tr>
			<td class="title">经度：</td>
			<td colspan="3"><input type="text" id="longitude" class="width100" readonly value=""  ></td>
			<td class="title">纬度：</td>
			<td colspan="3"><input type="text" id="latitude" class="width100" readonly value=""  ></td>
			<td class="title"><label class="focus">*</label>海拔：</td>
			<td colspan="3"><input type="text" id="elevation" class="width100" readonly value=""  ></td>
		</tr>
		<tr>
			<td class="title"><label class="focus">*</label>地区特征：</td>
			<td colspan="3"><input type="text" id="areaFeature" class="width100" readonly value=""  ></td>
			<td class="title">顺序号：</td>
			<td colspan="3"><input type="text" id="orderNo" class="width100" readonly value=""  ></td>
			<td class="title">当前状态：</td>
			<td colspan="3"><input type="text" id="currentStatus" class="width100" readonly value=""  ></td>
		</tr>
		<tr>
			<td class="title">电系铭牌运行库ID：</td>
			<td colspan="3"><input type="text" id="runKurkID" class="width100" readonly value=""  ></td>
			<td class="title">运行编号：</td>
			<td colspan="3"><input type="text" id="runNo" class="width100" readonly value=""  ></td>
			<td class="title">资产性质：</td>
			<td colspan="3"><input type="text" id="assetNature" class="width100" readonly value=""  ></td>
		</tr>
		<tr>
			<td class="title">资产单位：</td>
			<td colspan="3"><input type="text" id="assetCompany" class="width100" readonly value=""  ></td>
			<td class="title">投运日期：</td>
			<td colspan="3"><input type="text" id="subRunDate" class="width100" readonly value=""  ></td>
			<td class="title">是否代维：</td>
			<td colspan="3"><input type="text" id="isProxy" class="width100" readonly value=""  ></td>
		</tr>
		<tr>
			<td class="title">值班方式：</td>
			<td colspan="3"><input type="text" id="dutyWay" class="width100" readonly value=""  ></td>
			<td class="title">布置方式：</td>
			<td colspan="3"><input type="text" id="layoutWay" class="width100" readonly value=""  ></td>
			<td class="title">污秽等级：</td>
			<td colspan="3"><input type="text" id="filthyLevel" class="width100" readonly value=""  ></td>
		</tr>
		<tr>
			<td class="title">站址：</td>
			<td colspan="3"><input type="text" id="location" class="width100" readonly value=""  ></td>
			<td class="title">占地面积：</td>
			<td colspan="3"><input type="text" id="floorSpace" class="width100" readonly value=""  ></td>
			<td class="title">建筑面积：</td>
			<td colspan="3"><input type="text" id="buildSpace" class="width100" readonly value=""  ></td>
		</tr>
		<tr>
			<td class="title">联系电话：</td>
			<td colspan="3"><input type="text" id="telNo" class="width100" readonly value=""  ></td>
			<td class="title">接地电阻：</td>
			<td colspan="3"><input type="text" id="groundResistance" class="width100" readonly value=""  ></td>
			<td class="title">备注：</td>
			<td colspan="3"><input type="text" id="subMark" class="width100" readonly value=""  ></td>
		</tr>
		<tr>
			<td class="title">防误方式：</td>
			<td colspan="3"><input type="text" id="defenseWay" class="width100" readonly value=""  ></td>
			<td class="title">是否独立建筑物：</td>
			<td colspan="3"><input type="text" id="isSingleBuild" class="width100" readonly value=""  ></td>
			<td class="title">是否地下站：</td>
			<td colspan="3"><input type="text" id="isLowerSub" class="width100" readonly value=""  ></td>
		</tr>
		<tr>
			<td class="title">重要程度：</td>
			<td colspan="3"><input type="text" id="subImportLevel" class="width100" readonly value=""  ></td>
			<td class="title">配变总容量：</td>
			<td colspan="3"><input type="text" id="totalContent" class="width100" readonly value=""  ></td>
			<td class="title">无功补偿容量：</td>
			<td colspan="3"><input type="text" id="noWorkCompensationContent" class="width100" readonly value=""  ></td>
		</tr>
		<tr>
			<td class="title">箱变类型：</td>
			<td colspan="3"><input type="text" id="boxType" class="width100" readonly value=""  ></td>
			<td class="title">是否具有环网：</td>
			<td colspan="3"><input type="text" id="hasCircleNet" class="width100" readonly value=""  ></td>
			<td class="title">登记时间：</td>
			<td colspan="3"><input type="text" id="subSignDate" class="width100" readonly value=""  ></td>
		</tr>
		<tr>
			<td class="title">设备主人：</td>
			<td colspan="3"><input type="text" id="subOwner" class="width100" readonly value=""  ></td>
			<td class="title">资产单位名称：</td>
			<td colspan="3"><input type="text" id="assetCompanyName" class="width100" readonly value=""  ></td>
			<td class="title">维护班组名称：</td>
			<td colspan="3"><input type="text" id="subMaintainName" class="width100" readonly value=""  ></td>
		</tr>
		<tr>
			<td class="title">设备主人名称：</td>
			<td colspan="3"><input type="text" id="subOwnerName" class="width100" readonly value=""  ></td>
			<td class="title">所属地市名称：</td>
			<td colspan="3"><input type="text" id="subOwnerCity" class="width100" readonly value=""  ></td>
			<td class="title">运维单位名称：</td>
			<td colspan="3"><input type="text" id="maintenanceUnitName" class="width100" readonly value=""  ></td>
		</tr>
		<tr>
			<td class="title">变电站简称：</td>
			<td colspan="3"><input type="text" id="subForShort" class="width100" readonly value=""  ></td>
			<td class="title">最高调度管辖权：</td>
			<td colspan="3"><input type="text" id="highWeight" class="width100" readonly value=""  ></td>
			<td class="title">是否满足n-1：</td>
			<td colspan="3"><input type="text" id="isNforOne" class="width100" readonly value=""  ></td>
		</tr>
		<tr>
			<td class="title">是否接入avc：</td>
			<td colspan="3"><input type="text" id="isInputAvc" class="width100" readonly value=""  ></td>
			<td class="title">是否接入故障信息远传系统：</td>
			<td colspan="3"><input type="text" id="isInputSystem" class="width100" readonly value=""  ></td>
			<td class="title">是否集中监控：</td>
			<td colspan="3"><input type="text" id="isFocus" class="width100" readonly value=""  ></td>
		</tr>
		<tr>
			<td class="title">资产编号：</td>
			<td colspan="3"><input type="text" id="subAssetNo" class="width100" readonly value=""  ></td>
			<td class="title">是否农网：</td>
			<td colspan="3"><input type="text" id="isPowerGrid" class="width100" readonly value=""  ></td>
			<td class="title">退运日期：</td>
			<td colspan="3"><input type="text" id="returnedDate" class="width100" readonly value=""  ></td>
		</tr>
		<tr>
			<td class="title">地区特征：</td>
			<td colspan="3"><input type="text" id="locationType" class="width100" readonly value=""  ></td>
			<td class="title">型号：</td>
			<td colspan="3"><input type="text" id="subModel" class="width100" readonly value=""  ></td>
			<td class="title">生产厂家：</td>
			<td colspan="3"><input type="text" id="subDevProduceCompany" class="width100" readonly value=""  ></td>
		</tr>
		<tr>
			<td class="title">出厂编号：</td>
			<td colspan="3"><input type="text" id="outCompanyNo" class="width100" readonly value=""  ></td>
			<td class="title">出厂日期：</td>
			<td colspan="3"><input type="text" id="outCompanyDate" class="width100" readonly value=""  ></td>
			<td class="title">额定电压：</td>
			<td colspan="3"><input type="text" id="nominalVol" class="width100" readonly value=""  ></td>
		</tr>
	</table>
</div>
<%--终端信息部分--%>
<div id="devDiv" class="disnone ">
	<table id="devTable" class="width100" >
		<tr>
			<td class="title"><label class="focus">*</label>监测终端编号：</td>
			<td colspan="3"><input type="text" id="lineDevNo" class="width100" readonly value=""  ></td>
			<td class="title"><label class="focus">*</label>装置名称：</td>
			<td colspan="3"><input type="text" id="devName" class="width100" readonly value=""  ></td>
			<td class="title"><label class="focus">*</label>装置类别：</td>
			<td colspan="3"><input type="text" id="devType" class="width100" readonly value=""  ></td>
		</tr>
		<tr>
			<td class="title"><label class="focus">*</label>装置型号：</td>
			<td colspan="3"><input type="text" id="devModel" class="width100" readonly value=""  ></td>
			<td class="title"><label class="focus">*</label>所属地市：</td>
			<td colspan="3"><input type="text" id="city" class="width100" readonly value=""  ></td>
			<td class="title"><label class="focus">*</label>装置级别：</td>
			<td colspan="3"><input type="text" id="devLevel" class="width100" readonly value=""  ></td>
		</tr>
		<tr>
			<td class="title"><label class="focus">*</label>生产厂家：</td>
			<td colspan="3"><input type="text" id="produceCompany" class="width100" readonly value=""  ></td>
			<td class="title"><label class="focus">*</label>出厂编号：</td>
			<td colspan="3"><input type="text" id="outNo" class="width100" readonly value=""  ></td>
			<td class="title">出厂日期：</td>
			<td colspan="3"><input type="text" id="outDate" class="width100" readonly value=""  ></td>
		</tr>
		<tr>
			<td class="title"><label class="focus">*</label>投运日期：</td>
			<td colspan="3"><input type="text" id="runDate" class="width100" readonly value=""  ></td>
			<td class="title"><label class="focus">*</label>检测/检定日期：</td>
			<td colspan="3"><input type="text" id="testDate" class="width100" readonly value=""  ></td>
			<td class="title"><label class="focus">*</label>电源电压：</td>
			<td colspan="3"><input type="text" id="powerVol" class="width100" readonly value=""  ></td>
		</tr>
		<tr>
			<td class="title"><label class="focus">*</label>投运状态：</td>
			<td colspan="3"><input type="text" id="runStatus" class="width100" readonly value=""  ></td>
			<td class="title"><label class="focus">*</label>运维单位：</td>
			<td colspan="3"><input type="text" id="runCompany" class="width100" readonly value=""  ></td>
			<td class="title">维护班组：</td>
			<td colspan="3"><input type="text" id="maintain" class="width100" readonly value=""  ></td>
		</tr>
		<tr>
			<td class="title"><label class="focus">*</label>测试信号输入形式：</td>
			<td colspan="3"><input type="text" id="testSignInputWay" class="width100" readonly value=""  ></td>
			<td class="title"><label class="focus">*</label>电压信号输入通道数：</td>
			<td colspan="3"><input type="text" id="volSignInputNum" class="width100" readonly value=""  ></td>
			<td class="title"><label class="focus">*</label>电流信号输入通道数：</td>
			<td colspan="3"><input type="text" id="eleSignInputNum" class="width100" readonly value=""  ></td>
		</tr>
		<tr>
			<td class="title"><label class="focus">*</label>存储卡或硬盘容量：</td>
			<td colspan="3"><input type="text" id="deviceCapacity" class="width100" readonly value=""  ></td>
			<td class="title"><label class="focus">*</label>对时方式：</td>
			<td colspan="3"><input type="text" id="timeWay" class="width100" readonly value=""  ></td>
			<td class="title">设备主人：</td>
			<td colspan="3"><input type="text" id="deviceOwner" class="width100" readonly value=""  ></td>
		</tr>
		<tr>
			<td class="title">屏柜编号：</td>
			<td colspan="3"><input type="text" id="cabinetsNo" class="width100" readonly value=""  ></td>
			<td class="title"><label class="focus">*</label>屏柜名称：</td>
			<td colspan="3"><input type="text" id="cabinetsName" class="width100" readonly value=""  ></td>
			<td class="title"><label class="focus">*</label>屏柜类型：</td>
			<td colspan="3"><input type="text" id="cabinetsType" class="width100" readonly value=""  ></td>
		</tr>
		<tr>
			<td class="title"><label class="focus">*</label>IP地址：</td>
			<td colspan="3"><input type="text" id="ip" class="width100" readonly value=""  ></td>
			<td class="title"><label class="focus">*</label>MAC地址：</td>
			<td colspan="3"><input type="text" id="mac" class="width100" readonly value=""  ></td>
			<td class="title"><label class="focus">*</label>子网掩码：</td>
			<td colspan="3"><input type="text" id="subnet" class="width100" readonly value=""  ></td>
		</tr>
		<tr>
			<td class="title"><label class="focus">*</label>网关：</td>
			<td colspan="3"><input type="text" id="wg" class="width100" readonly value=""  ></td>
			<td class="title"><label class="focus">*</label>端口：</td>
			<td colspan="3"><input type="text" id="dk" class="width100" readonly value=""  ></td>
			<td class="title"><label class="focus">*</label>资产性质：</td>
			<td colspan="3"><input type="text" id="zcxz" class="width100" readonly value=""  ></td>
		</tr>
		<tr>
			<td class="title"><label class="focus">*</label>资产单位：</td>
			<td colspan="3"><input type="text" id="AssetsUnit" class="width100" readonly value=""  ></td>
			<td class="title"><label class="focus">*</label>资产编号：</td>
			<td colspan="3"><input type="text" id="AssetsNo" class="width100" readonly value=""  ></td>
			<td class="title"><label class="focus">*</label>工程编号：</td>
			<td colspan="3"><input type="text" id="projectNo" class="width100" readonly value=""  ></td>
		</tr>
		<tr>
			<td class="title">	工程名称：</td>
			<td colspan="3"><input type="text" id="gcmc" class="width100" readonly value=""  ></td>
			<td class="title">设备添加方式：</td>
			<td colspan="3"><input type="text" id="sbtjfs" class="width100" readonly value=""  ></td>
			<td class="title">交换机端口号：</td>
			<td colspan="3"><input type="text" id="jhjdkh" class="width100" readonly value=""  ></td>
		</tr>
		<tr>
			<td class="title">	所属屏柜：</td>
			<td colspan="3"><input type="text" id="cabinetsOwner" class="width100" readonly value=""  ></td>
			<td class="title">设备主人名称：</td>
			<td colspan="3"><input type="text" id="deviceOwnerName" class="width100" readonly value=""  ></td>
			<td class="title">资产单位名称：</td>
			<td colspan="3"><input type="text" id="assetsUnitName" class="width100" readonly value=""  ></td>
		</tr>
		<tr>
			<td class="title">描述：</td>
			<td colspan="3"><input type="text" id="describe" class="width100" readonly value=""  ></td>
			<td class="title">描述编码：</td>
			<td colspan="3"><input type="text" id="describeNo" class="width100" readonly value=""  ></td>
			<td class="title">设备编码：</td>
			<td colspan="3"><input type="text" id="deviceNo" class="width100" readonly value=""  ></td>
		</tr>
		<tr>
			<td class="title">登记时间：</td>
			<td colspan="3"><input type="text" id="signTime" class="width100" readonly value=""  ></td>
			<td class="title">备注：</td>
			<td colspan="3"><input type="text" id="mark" class="width100" readonly value=""  ></td>
			<td class="title">发布状态：</td>
			<td colspan="3"><input type="text" id="publisStatus" class="width100" readonly value=""  ></td>
		</tr>
		<tr>
			<td class="title">修改后设备名称：</td>
			<td colspan="3"><input type="text" id="modifiedDeviceName" class="width100" readonly value=""  ></td>
			<td class="title">ERPWBS编码：</td>
			<td colspan="3"><input type="text" id="erpwbsNo" class="width100" readonly value=""  ></td>
			<td class="title">所属地市名称：</td>
			<td colspan="3"><input type="text" id="cityOwnerName" class="width100" readonly value=""  ></td>
		</tr>
		<tr>
			<td class="title">运维单位名称：</td>
			<td colspan="3"><input type="text" id="maintenanceName" class="width100" readonly value=""  ></td>
			<td class="title">维护班组名称：</td>
			<td colspan="3"><input type="text" id="maintenanceClassName" class="width100" readonly value=""  ></td>
			<td class="title">生产厂家名称：</td>
			<td colspan="3"><input type="text" id="produceCompanyName" class="width100" readonly value=""  ></td>
		</tr>
		<tr>
			<td class="title">资产性质名称：</td>
			<td colspan="3"><input type="text" id="assetTypeName" class="width100" readonly value=""  ></td>
			<td class="title">变更时间：</td>
			<td colspan="3"><input type="text" id="changeDate" class="width100" readonly value=""  ></td>
			<td class="title">变更类型：</td>
			<td colspan="3"><input type="text" id="changeType" class="width100" readonly value=""  ></td>
		</tr>
		<tr>
			<td class="title">PMS终端UUID：</td>
			<td colspan="5"><input type="text" id="pmsDevUUID" class="width100" readonly value=""  ></td>
		</tr>
	</table>
</div>
<%--监测点信息部分--%>
<div id="lineDiv" class="disnone ">
	<table id="lineTable" class="width100" >
		<tr>
			<td class="title"><label class="focus">*</label>监测点名称：</td>
			<td colspan="11"><input type="text" id="lineName" class="width100" readonly value=""></td>
		</tr>
		<tr>
			<td class="title"><label class="focus">*</label>监测点对象名称：</td>
			<td colspan="3"><input type="text" id="lineObjectName" class="width100" readonly value=""  ></td>
			<td class="title"><label class="focus">*</label>监测点对象类型：</td>
			<td colspan="3"><input type="text" id="lineObjectType" class="width100" readonly value=""  ></td>
			<td class="title">监测点分类：</td>
			<td colspan="3"><input type="text" id="lineType" class="width100" readonly value=""  ></td>
		</tr>
		<tr>
			<td class="title"><label class="focus">*</label>最小短路容量(MVA)：</td>
			<td colspan="3"><input type="text" id="minCapacity" class="width100" readonly value=""  ></td>
			<td class="title"><label class="focus">*</label>供电设备容量(MVA)：</td>
			<td colspan="3"><input type="text" id="powerCapacity" class="width100" readonly value=""  ></td>
			<td class="title"><label class="focus">*</label>用户协议容量(MVA)：</td>
			<td colspan="3"><input type="text" id="userCapacity" class="width100" readonly value=""  ></td>
		</tr>
		<tr>
			<td class="title">PT1：</td>
			<td colspan="2"><input type="text" id="pt1" class="width100" readonly value=""  ></td>
			<td class="title">PT2：</td>
			<td colspan="2"><input type="text" id="pt2" class="width100" readonly value=""  ></td>
			<td class="title">CT1：</td>
			<td colspan="2"><input type="text" id="ct1" class="width100" readonly value=""  ></td>
			<td class="title">CT2：</td>
			<td colspan="2"><input type="text" id="ct2" class="width100" readonly value=""  ></td>
		</tr>
		<tr>
			<td class="title"><label class="focus">*</label>数据来源：</td>
			<td colspan="3"><input type="text" id="dataSource" class="width100" readonly value=""  ></td>
			<td class="title">监测点位置类型：</td>
			<td colspan="3"><input type="text" id="lineLocationType" class="width100" readonly value=""  ></td>
			<td class="title">连接方式：</td>
			<td colspan="3"><input type="text" id="connectWay" class="width100" readonly value=""  ></td>
		</tr>
		<tr>
			<td class="title">基准电压：</td>
			<td colspan="3"><input type="text" id="standardVol" class="width100" readonly value=""  ></td>
			<td class="title">线路电压：</td>
			<td colspan="3"><input type="text" id="lineVol" class="width100" readonly value=""  ></td>
			<td class="title">数据质量：</td>
			<td colspan="3"><input type="text" id="dataQuality" class="width100" readonly value=""  ></td>
		</tr>
		<tr>
			<td class="title">其他系统编码1：</td>
			<td colspan="3"><input type="text" id="otherSystem1" class="width100" readonly value=""  ></td>
			<td class="title">其他系统编码2：</td>
			<td colspan="3"><input type="text" id="otherSystem2" class="width100" readonly value=""  ></td>
			<td class="title">其他系统编码3：</td>
			<td colspan="3"><input type="text" id="otherSystem3" class="width100" readonly value=""  ></td>
		</tr>
		<tr>
			<td class="title">是否虚拟监测点：</td>
			<td colspan="3"><input type="text" id="isVirtual" class="width100" readonly value=""  ></td>
			<td class="title">顺序号：</td>
			<td colspan="3"><input type="text" id="orderNum" class="width100" readonly value=""  ></td>
			<td class="title">当前状态：</td>
			<td colspan="3"><input type="text" id="presentStatus" class="width100" readonly value=""  ></td>
		</tr>
		<tr>
			<td class="title"><label class="focus">*</label>电压下偏差限值：</td>
			<td colspan="5"><input type="text" id="lowLimit" class="width100" readonly value=""  ></td>
			<td class="title">电压上偏差限值：</td>
			<td colspan="5"><input type="text" id="upLimit" class="width100" readonly value=""  ></td>
		</tr>
	</table>
</div>
</div>
<script src="${ctx}/js/plugin/bootstrap/bootstrap.js"></script>
<script src="${ctx}/js/plugin/jquery.contextMenu.js"></script>
<script src="${ctx}/js/plugin/jquery.cleverTabs.js"></script>
<script src="${ctx}/js/plugin/ztree/jquery.ztree.core.js"></script>
<script src="${ctx}/js/plugin/bootstrapSwitch/bootstrap-switch.min.js"></script>
<script src="${ctx}/js/plugin/mulitiCheckbox/fSelect.js"></script>
<script src="${ctx}/js/plugin/bootstrap/bootstrap-datetimepicker.min.js"></script>
<script src="${ctx}/js/plugin/bootstrap/bootstrap-datetimepicker.zh-CN.js"></script>
<script src="${ctx}/js/plugin/layui/layer.js"></script>
<script src="${ctx}/jspJS/utils/loading.js"></script>
<script src="${ctx}/js/basic.js"></script>
<script src="${ctx}/js/plugin/xss/xss.js"></script>
<script src="${ctx}/jspJS/utils/judgeAjaxStatus.js"></script>
<script>

	var treeObj = null;
	var setting = {
		check: {
			enable: true,
			chkDisabledInherit: true
		},
		data: {
			simpleData: {
				enable: true
			}
		},
		view: {
			fontCss: setHighlight // 高亮一定要设置，setHighlight是自定义方法
		},
		callback: {
			onClick: zTreeOnClick
		}
	};
	function zTreeOnClick() {
		var zTree = $.fn.zTree.getZTreeObj("tree");
		if (zTree != null) {
			var nodes = zTree.getSelectedNodes();   //获取树控件选中对象集合
			// 关闭所有节点的高亮
			var allNodes = treeObj.transformToArray(treeObj.getNodes());
			for (var i = 0; i < allNodes.length; i++) {
				allNodes[i].highlight = false;
				treeObj.updateNode(allNodes[i]);
			}
			// 高亮并展开搜索到的节点
			for (var i = 0; i < nodes.length; i++) {
				nodes[i].highlight = true;
				treeObj.updateNode(nodes[i]); // 更新节点，让高亮生效
			}
			if (nodes[0].level === 3) {   //变电站
				showSubDiv(nodes[0].nodeIndex);
			} else if (nodes[0].level === 4) {    //终端
				showDevDiv(nodes[0].nodeIndex);
			} else if (nodes[0].level === 6) {    //线路
				showLineDiv(nodes[0].nodeIndexStr,nodes[0].nodeIndex);
			}else{
				hideAllDiv();
			}
			//清空所有input的值
			$("#subDiv input").val("")
			$("#devDiv input").val("")
			$("#lineDiv input").val("")
		}
	}

	 //隐藏变电站、终端、监测点DIV
	 function hideAllDiv(subIndex) {
		$("#subDiv").css("display","none");
		$("#devDiv").css("display","none");
		$("#lineDiv").css("display","none");
	 }

	/**
	 * 根据点击显示变电站内容
	 */
	function showSubDiv(subIndex) {
		$("#subDiv").css("display","block");
		$("#devDiv").css("display","none");
		$("#lineDiv").css("display","none");
		$("#subDiv").css("margin-top",($(window).height()-$("#subDiv").height())/2);
		loadSub(subIndex);
	}

	/**
	 * 根据点击显示终端内容
	 */
	function showDevDiv(devIndex) {
		$("#devDiv").css("display","block");
		$("#lineDiv").css("display","none");
		$("#subDiv").css("display","none");
		$("#devDiv").css("margin-top",($(window).height()-$("#devDiv").height())/2);
		loadDevice(devIndex);
	}


	/**
	 * 根据点击显示监测点内容
	 */
	function showLineDiv(monitorID,lineIndex) {
		$("#lineDiv").css("display","block");
		$("#devDiv").css("display","none");
		$("#subDiv").css("display","none");
		$("#lineDiv").css("margin-top",($(window).height()-$("#lineDiv").height())/2);
		loadLine(monitorID,lineIndex);
	}



	function setHighlight(treeId, treeNode) {
		return (treeNode.highlight) ? {
			color: "#000000",
			"font-weight": "bold",
			"border-bottom": "dotted 1px #fff"
		} : {color: "#666", "font-weight": "normal"};
	}

	function getTree() {
		jQuery.ajax({
			type: 'POST',
			dataType: "json",
			url: '/pqs9900/device/gwDeviceTree',
			data: {},
			async: false,
			error: function () {},
			success: function (data) {
				var datalist = [];
				for (var i = 0; i < data.length; i++) {
					var str = '';
					str += '{' + "id:" + data[i].id;
					str += ',' + "name:'" + data[i].name + "'";
					str += ',' + "nodeIndex:" + data[i].nodeIndex;
					if(null!==data[i].nodeIndexStr){
						if(""===data[i].nodeIndexStr.trim()){
							str += ',' + "nodeIndexStr:'" + 0+"'";
						}else{

							str += ',' + "nodeIndexStr:'" + data[i].nodeIndexStr+ "'";
						}

					}
					str += ',' + "nodeType:" + data[i].nodeType;
					str += ',' + "ppId:" + data[i].ppId;
					if (data[i].nodeType == "0" || data[i].nodeType == "1" || data[i].nodeType == "2") {
						str += ',' + "open:" + true;
					} else {
						str += ',' + "open:" + false;
					}
					str += ',' + "state:" + data[i].state;
					str += ',' + "pId:" + data[i].pId + '}';
					datalist.push(str);
				}
				datalist = eval('[' + datalist + ']');// string->json数组
				var zNodes = datalist;
				treeObj = $.fn.zTree.init($("#tree"), setting, zNodes);
			}
		});
	}

	$(document).ready(function () {
		getTree();
	});


	/**
	 * 加载变电站信息
	 * @param subIndex
	 */
	function loadSub(subIndex) {
		var subI;
		jQuery.ajax({
			type: 'POST',
			dataType: "json",
			url: '/pqs9900/device/loadgwSubstation',
			data: {
				subIndex: subIndex
			},
			beforeSend: function () {
				subI = ityzl_SHOW_LOAD_LAYER();
			},
			success: function (data) {
				if(data.code===500){
					layer.msg(data.message, {icon:2, time: 2000});
				}else{
					var sub=data.body;
					$("#subID").val(sub.objId);
					$("#subName").val(sub.bdzmc);
					// $("#powerDeviceNo").val(sub.objId);/*电网设备编号*/
					$("#vol").val(sub.dydj);
					$("#subType").val(sub.dzlx);
					$("#subCity").val(sub.ssds);
					$("#subRunCompany").val(sub.ywdw);
					$("#subMaintain").val(sub.whbz);
					$("#isIntelligent").val(sub.sfznbdz);
					$("#isCroe").val(sub.sfsnz);
					$("#importantLevel").val(sub.bdzzyjb);
					$("#exchangeTyoe").val(sub.hlzlx);
					$("#dcOwnerSystem").val(sub.sszlxt);
					$("#dcContent").val(sub.zlssrl);
					// $("#longitude").val(sub.sszlxt);/*经度*/
					// $("#latitude").val(sub.sszlxt)/*纬度*/
					$("#elevation").val(sub.hb);
					$("#areaFeature").val(sub.dqtz);
					// $("#orderNo").val(sub.sszlxt);/*顺序号*/
					$("#currentStatus").val(sub.yxzt);
					$("#runKurkID").val(sub.dxmpyxkid);
					$("#runNo").val(sub.yxbh);
					$("#assetNature").val(sub.zcxz);
					$("#assetCompany").val(sub.zcdw);
					$("#subRunDate").val(sub.tyrq);
					$("#isProxy").val(sub.sfdw);
					$("#dutyWay").val(sub.zbfs);
					$("#layoutWay").val(sub.bzfs);
					$("#filthyLevel").val(sub.whdj);
					$("#location").val(sub.zz);
					$("#floorSpace").val(sub.zdmj);
					$("#buildSpace").val(sub.jzmj);
					$("#telNo").val(sub.lxdh);
					$("#groundResistance").val(sub.jddz);
					$("#subMark").val(sub.bz);
					$("#defenseWay").val(sub.fwfs);
					$("#isSingleBuild").val(sub.sfdljzw);
					$("#isLowerSub").val(sub.sfdxz);
					$("#subImportLevel").val(sub.zycd);
					$("#totalContent").val(sub.pbzrl);
					$("#noWorkCompensationContent").val(sub.wgbcrl);
					$("#boxType").val(sub.xblx);
					$("#hasCircleNet").val(sub.sfjyhw);
					$("#subOwner").val(sub.sbzr);
					$("#assetCompanyName").val(sub.zcdwmc);
					$("#subMaintainName").val(sub.whbzmc);
					$("#subOwnerName").val(sub.sbzrmc);
					$("#subOwnerCity").val(sub.ssdsmc);
					$("#maintenanceUnitName").val(sub.ywdwmc);
					$("#subForShort").val(sub.bdzjc);
					$("#highWeight").val(sub.zgddgxq);
					$("#isNforOne").val(sub.sfmznjy);
					$("#isInputAvc").val(sub.sfjravc);
					$("#isInputSystem").val(sub.sfjrgzxxycxt);
					$("#isFocus").val(sub.sfjzjk);
					$("#subAssetNo").val(sub.zcbh);
					$("#isPowerGrid").val(sub.sfnw);
					$("#returnedDate").val(sub.tuiyrq);
					$("#locationType").val(sub.dqtz);
					$("#subModel").val(sub.xh);
					$("#subDevProduceCompany").val(sub.sccj);
					$("#outCompanyNo").val(sub.ccbh);
					$("#outCompanyDate").val(sub.ccrq);
					$("#nominalVol").val(sub.eddy);
				}
				//***********关闭loading
				ityzl_CLOSE_LOAD_LAYER(subI);
			}
		})
	}


	/**
	 * 加载终端信息
	 * @param devIndex
	 */
	function loadDevice(devIndex) {
		var devI;
		jQuery.ajax({
			type: 'POST',
			dataType: "json",
			url: '/pqs9900/device/loadgwDevice',
			data: {
				devIndex: devIndex
			},
			beforeSend: function () {
				devI = ityzl_SHOW_LOAD_LAYER();
			},
			success: function (data) {
				if(data.code===500){
					layer.msg(data.message, {icon:2, time: 2000});
				}else{
					var dev=data.body;
					$("#lineDevNo").val(dev.zzbh);
					$("#devName").val(dev.zzmc);
					$("#devType").val(dev.zzlb);
					$("#devModel").val(dev.zzxh);
					$("#city").val(dev.ssds);
					$("#devLevel").val(dev.zzjb);
					$("#produceCompany").val(dev.sccj);
					$("#outNo").val(dev.ccbh);
					$("#outDate").val(dev.ccrq);
					$("#runDate").val(dev.tyrq);
					$("#testDate").val(dev.jxjdrq);
					$("#powerVol").val(dev.zzdydy);
					$("#runStatus").val(dev.yxzt);
					$("#runCompany").val(dev.ywdw);
					$("#maintain").val(dev.whbz);
					$("#testSignInputWay").val(dev.clxhsrxs);
					$("#volSignInputNum").val(dev.dyxhsrtds);
					$("#deviceCapacity").val(dev.cckhyprl);
					$("#timeWay").val(dev.dsfs);
					$("#deviceOwner").val(dev.sbzr);
					$("#cabinetsNo").val(dev.pbh);
					$("#cabinetsName").val(dev.pmc);
					$("#cabinetsType").val(dev.pglx);
					$("#ip").val(dev.ip1);
					$("#mac").val(dev.mac1);
					$("#subnet").val(dev.zwym1);
					$("#wg").val(dev.wg1);
					$("#dk").val(dev.dk1);
					$("#zcxz").val(dev.zcxz);
					$("#AssetsUnit").val(dev.zcdw);
					$("#AssetsNo").val(dev.zcbh);
					$("#projectNo").val(dev.gcbh);
					$("#gcmc").val(dev.gcmc);
					$("#sbtjfs").val(dev.sbtjfs);
					// $("#jhjdkh").val(dev.jhjdkh);
					$("#cabinetsOwner").val(dev.sspg);
					$("#deviceOwnerName").val(dev.sbzrmc);
					$("#assetsUnitName").val(dev.zcdwmc);
					$("#describe").val(dev.wbsms);
					$("#describeNo").val(dev.wbsbm);
					$("#deviceNo").val(dev.sbbm);
					$("#signTime").val(dev.djsj);
					$("#mark").val(dev.bz);
					$("#publisStatus").val(dev.fbzt);
					$("#modifiedDeviceName").val(dev.xghsbmc);
					$("#erpwbsNo").val(dev.erpwbsbm);
					$("#cityOwnerName").val(dev.ssdsmc);
					$("#maintenanceName").val(dev.ywdwmc);
					$("#maintenanceClassName").val(dev.whbzmc);
					$("#produceCompanyName").val(dev.sccjmc);
					$("#assetTypeName").val(dev.zcxzmc);
					$("#changeDate").val(dev.recordtimestamp);
					$("#changeType").val(dev.recordstatus);
					$("#pmsDevUUID").val(dev.objId);
					$("#pmsSubUUID").val(dev.subId);

				}
				//***********关闭loading
				ityzl_CLOSE_LOAD_LAYER(devI);
			}
		})
	}


	/**
	 * 加载监测点信息
	 * @param lineIndex
	 */
	function loadLine(monitorID,lineIndex) {
		var lineI;
		jQuery.ajax({
			type: 'POST',
			dataType: "json",
			url: '/pqs9900/device/loadgwLine',
			data: {
				monitorID: monitorID,
				lineIndex: lineIndex
			},
			beforeSend: function () {
				lineI = ityzl_SHOW_LOAD_LAYER();
			},
			success: function (data) {
				if(data.code===500){
					layer.msg(data.message, {icon:2, time: 2000});
				}else{
					var monitor=data.body;
					$("#lineName").val(monitor.name);
					$("#lineObjectName").val(monitor.MONITOR_OBJECT_NAME);
					$("#lineObjectType").val(monitor.monitorObjectModel);
					$("#lineType").val(monitor.name);/*监测点分类*/
					$("#minCapacity").val(monitor.dlrl);
					$("#powerCapacity").val(monitor.sbrl);
					$("#userCapacity").val(monitor.xyrl);
					$("#pt1").val(monitor.line.pt1);
					$("#pt2").val(monitor.line.pt2);
					$("#ct1").val(monitor.line.ct1);
					$("#ct2").val(monitor.line.ct2);
					// $("#dataSource").val(monitor.line.ct2);/*数据来源*/
					// $("#lineLocationType").val(monitor.line.ct2);
					// $("#connectWay").val(monitor.line.ct2);
					// $("#standardVol").val(monitor.line.ct2);
					// $("#lineVol").val(monitor.line.ct2);
					// $("#dataQuality").val(monitor.line.ct2);
					// $("#otherSystem1").val(monitor.line.ct2);
					// $("#otherSystem2").val(monitor.line.ct2);
					// $("#otherSystem3").val(monitor.line.ct2);
					// $("#isVirtual").val(monitor.line.ct2);
					// $("#orderNum").val(monitor.line.ct2);
					// $("#presentStatus").val(monitor.line.ct2);
					$("#lowLimit").val(monitor.voltageDev);
					$("#upLimit").val(monitor.uvoltageDev);
				}
				//***********关闭loading
				ityzl_CLOSE_LOAD_LAYER(lineI);
			}
		})
	}


	//模糊搜索name满足条件的节点
	function searchNode(value) {
		if (value == "")
			return;
		// 获取搜索的节点
		var nodes = treeObj.getNodesByParamFuzzy("name", value);
		// 关闭所有节点的高亮
		var allNodes = treeObj.transformToArray(treeObj.getNodes());
		for (var i = 0; i < allNodes.length; i++) {
			allNodes[i].highlight = false;
			treeObj.updateNode(allNodes[i]);
		}
		// 展开第一层节点
		treeObj.expandAll(false);
		treeObj.expandNode(treeObj.getNodes()[0], true);
		// 高亮并展开搜索到的节点
		for (var i = 0; i < nodes.length; i++) {
			nodes[i].highlight = true;
			treeObj.updateNode(nodes[i]); // 更新节点，让高亮生效
			treeObj.expandNode(nodes[i].getParentNode(), true);
		}
	}
</script>
<script type="text/javascript">
$(document).ready(function() {
	//动态处理div上下margin


})
</script>
</body>


</html>
