<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/include/taglib.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="edge" />
<meta http-equiv="Pragma" content="no-cache" />
<link rel="shortcut icon" href="${ctx}/images/favicon.ico">
<link rel="stylesheet"  type="text/css" href="${ctx}/css/indexNew/base.css" />
<link rel="stylesheet"  type="text/css" href="${ctx}/css/indexNew/all.css" />
<link rel="stylesheet"  type="text/css" href="${ctx}/css/indexNew/perfect-scrollbar.css" />
<link rel="stylesheet"  type="text/css" href="${ctx}/css/indexNew/jquery-confirm.css" />
<link rel="stylesheet"  type="text/css" href="${ctx}/css/indexNew/jquery-ui.min.css" />
<link rel="stylesheet"  type="text/css" href="${ctx}/css/indexNew/classic.css"> 
<link rel="stylesheet"  type="text/css" href="${ctx}/css/newCss/top.css">

<title>打假通</title>
<style>
/*.searchType li{
	width:100px;
}*/
#case_type td,#case_type th{
	padding:5px 10px;
	border: 1px solid #0e635f;
}
.searchDetail .infoList{
	height: 200px;
    margin-top: 20px;
    position: relative;
}
.searchDetail .infoList>ul>li{
	border-bottom: 0.1px solid;
    font-size: 12px;
    margin-right: 10px;
    margin-top: 10px;
    padding-bottom: 5px;
    line-height:1.5;
    position: relative;
}
.searchDetail .infoList>ul>li>p{
	cursor:pointer;
}
#jpage{
	background-color: #122854;
	margin: 5px 0 0;
	text-align: center;
}
#jpage a{
	color: #ffffff;
	display: inline-block;
	font-size: 30px;
	height: 25px;
	line-height: 20px;
	padding: 0 5px;
	width: 14px;
}
#jpage a:hover{
	color: #000000;
}
#jpage input{
	border: medium none;
	font-size: 14px;
	height: 25px;
	text-align: center;
	width: 90px;
	border-radius: 3px;
	vertical-align: bottom;
	background-color: #ddd;
}
#selectType{
	width:170px;
	height:20px;
	padding:5px;
	border: none;
	position: absolute;
}
#infoListUl td,#infoListUl th{
	box-sizing:border-box;
	padding: 0 0 0 5px;
}
#infoListUl .markBg:hover {
  color:#F56904;
}
#detailC{
    height: 88px;
	position:relative;
}
.statusV{
	height: 30px;	
	float: left;
	margin-right: 10px;
}
/* .typeDefined{
	color: #eee;
	font-size: 13px;
}
.typeDefined ul li{
	float:left;
	margin:4px;
}
.typeDefined ul li span,#infoListUl .type{
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 4px;
	margin-right: 2px;
}
.t1{
	background-color: #FF0000;
}
.t2{
	background-color: #B8860B;
}
.t3{
	background-color: #32CD32;
}
.t4{
	background-color: #006DA6;
}
.t5{
	background-color: #CD5C5C;
}
.t6{
	background-color: #FFF000;
} 
 #typeSelect li{
	position:relative;
	cursor:help;
} */
.showCon{
	width: 200px;
	padding: 5px;
	border: 1px solid #ddd;
	background-color: #eee;
	border-radius: 3px;
	position: absolute;
	top: 25px;
	color:#666;
	z-index: 99999;
}
/*表头可选*/
.showDiv{
	position: absolute;
	top:40px;
	right: 0px;
    background: #1d485d;
    padding: 10px;
    border-radius: 3px;
    color: #fff;
	z-index:999;
	display: none;
}
#thCanSelect{
	padding: 3px;
    border-radius: 3px;
    position: relative;
    float: right;
    cursor: pointer;
    top: 10px;
    background: #0071ab;
    color: #fff;
}
/*处理，待处理*/
.searchType .active{
	background-color:#0071ab;
    border-radius: 4px;	
}
/*表中的报案号*/
.nodesId{
	cursor: pointer;
}
/*按钮样式,20171011*/
.btnResult{
	position: absolute;
    right: 0px;
    
}
.btnFunction {
    position: relative;
    top: 10px;
    right: 55px;
    z-index: 1000;
    float: right;
    /*overflow: hidden;*/
}
.btnFunction li {
    float: left;

}
.toggle {
    /*margin-bottom: 10px;*/
    margin-right: 8px;
}
.fullScreen-btn {
    right: 20px;
}
/*模型选择的*/
#model_sel select {
    color: #000;
}
span.sel2 input {
    width: 60%;
    padding: 5px;
    border-radius: 3px;
    border: 1px solid #eee;
    white-space: nowrap;
    overflow: hidden;
    text-overflow:ellipsis;
}
/* 弹出框 2017.11.23*/
.dialog_main {
    width: 500px;
    height: 350px;
    background: #fff;
    border-radius: 5px;
    color: #000;
}
.dialog_title {
    height: 30px;
    line-height: 30px;
    background-color: #3399cc;
    text-indent: 1em;
    color: #fff;
    border-radius: 5px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
/*导入数据按钮,2018-01-08*/
/*.exportData_btn{
	color: #fff;
}
.exportData_btn li{
	float: left;
	margin-right: 5px;
}
.exportData_btn li .data_btn{
	cursor: pointer;
    height: 22px;
    padding: 1px 5px;
    text-align: center;
    line-height: 22px;
    background-color: #00bb9c;
    border-radius: 3px;
}*/
/* 模型选择时下拉框，2018-01-15 */
div#clickShow {
    background: #fff;
    color: #000;
    border-radius: 5px;
    position: absolute;
    z-index: 2;
    width: 65%;
    left: 30%;
}
#clickShow li{
	/*padding: 5px 10px;*/
}
ul#dialog_con li span {
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
}
/*#clickShow li:hover{
	background: #ddd;	
}2018-06-11注释的*/
/*加入打假减损金额后，新加样式,2018-02-05*/
.backg .optFor textarea {
    height: 160px;
}
span.djMoney {
    padding: 10px;
}
.djMoney input {
    border: none;
    padding: 5px;
    border-radius: 3px;
    vertical-align: middle; 
    margin-top: 5px; 
}
span.djMoney input{
	width: 70.9%;
}
/*.djMoney {
    margin-top: 5px;
}*/
/*人伤新加样式，2018-06-11*/
#clickShow li p{
	background: #afccf9;
	padding: 5px;
}
#clickShow .sub_menu li{
	padding: 5px 10px;
}
.sub_menu li:hover{
	background: #a0bff1;
	cursor: pointer;
}
</style>
</head>
<body class="bg1" data-ajaxforgraph="false" data-ajaxforlist="false">
<div class="headCon">
	<jsp:include page="../top2.jsp">
	<jsp:param name="index" value="专项模型" />
	</jsp:include>
</div>
<input id="userCode" type="hidden" value="${userCode}"/>
<input id="userName" type="hidden" value="${userName}"/>
<input id="userInfo" type="hidden" value='${userInfo}'/>
<input id="selectedData" type="hidden" value='${datalist}'/>
<!-- 弹出框 2017.11.23-->
<div class="backg" id="dialog_model" style="display: none;">
	<div class="dialog_main">
		<div class="dialog_title">标题</div>
		<ul style="padding: 15px;height: 250px;">
			<li><input type="radio" name="model"><span>roekrkgdfkngf</span></li>
			<li><input type="radio" name="model"><span>roekrkgdfkngf</span></li>
		</ul>
		<div class="confirmBtn">
			<input type="button" class="confirm_btn" value="确定">
			<input type="button" class="btn delete_btn" value="取消">
		</div>
	</div>
</div>
<div class="searchCon">
	<!--input type="button" value="随机你妹" id="suiji"/-->
	<div class="searchDetail" id="searchDetail" style="margin-top:8px;margin-left:8px;">
		<div id="pull-down" hidden><input id="selectType" type="text" value="同地多案" readonly="readonly"></input><i></i></div>
		<div style="overflow:hidden">
			<ul class="searchType statusV" id="isDo">
				<li class="active" data-read="0">待处理</li>
				<li data-read="1">已处理</li> 
			</ul>
		</div>
		
		<div class="clear"></div>
		<div style="position:relative;">
			<div class="model">
				<span>专项模型：</span>
				<span id="model_sel">
	               <!--  <select class="prov" style="width: 88px;"></select> -->
	                <span class="sel2"><input type="text" id="selected2" placeholder="请选择..." readonly="readonly"></span>
	            </span>
			</div>
			<div class="listDiv" id="clickShow">

			</div>		
		</div>
		<div class="clear"></div>
		<div class="infoList" id="infoList" style="position:relative;margin-top:0px;">
			<table id="infoListUl" style="table-layout:fixed;"></table>
			<table id="infoListU2" hidden></table>
		</div>
		<div id="jpageCon">
			
		</div>
	</div>
</div>
<div id="graphToTable" class="resultCon" style="margin-left:255px;position:relative;" hidden>
	<div style="overflow:hidden;">
		<div style="float:left;">
			<span id="backToG">返回图</span>	
			<hna:permission privilege="graph.toTableExport">		
			<span id="downLoadT">导出</span>	
			</hna:permission>		
		</div>
		<div style="float:right;">
			<div class="thSelect">
				<span  id="thCanSelect" data-thshow="false">表头筛选</span>
				<div class="showDiv" id="thShowDiv">
					<input type="checkbox" checked="checked" class="checkAll"><lable>全选</lable>
					<ul id="thShow" class="show">
						<li><input type="checkbox" checked="checked" data-th="0" class="checkBox"><label>报案号</label></li>
						<li><input type="checkbox" checked="checked" data-th="1" class="checkBox"><label>被保险人</label></li>
						<li><input type="checkbox" checked="checked" data-th="2" class="checkBox"><label>标的车架号/车牌</label></li>
						<li><input type="checkbox" checked="checked" data-th="3" class="checkBox"><label>三者车架号/车牌</label></li>
						<li><input type="checkbox" checked="checked" data-th="4" class="checkBox"><label>报案时间</label></li>
						
						<li><input type="checkbox" checked="checked" data-th="5" class="checkBox"><label>出险时间</label></li>					
						<li><input type="checkbox" checked="checked" data-th="6" class="checkBox"><label>出险地</label></li>
						<li><input type="checkbox" checked="checked" data-th="7" class="checkBox"><label>出险情况</label></li>
						<li><input type="checkbox" checked="checked" data-th="8" class="checkBox"><label>承保公司</label></li>
						<li><input type="checkbox" checked="checked" data-th="9" class="checkBox"><label>报案人</label></li>
						
						<li><input type="checkbox" checked="checked" data-th="10" class="checkBox"><label>报案电话</label></li>
						<li><input type="checkbox" checked="checked" data-th="11" class="checkBox"><label>标的车驾驶员</label></li>					
						<li><input type="checkbox" checked="checked" data-th="12" class="checkBox"><label>三者车驾驶员</label></li>
						<li><input type="checkbox" checked="checked" data-th="13" class="checkBox"><label>标的车驾驶员电话</label></li>
						<li><input type="checkbox" checked="checked" data-th="14" class="checkBox"><label>三者车驾驶员电话</label></li>
						
						<li><input type="checkbox" checked="checked" data-th="15" class="checkBox"><label>查勘员</label></li>
						<li><input type="checkbox" checked="checked" data-th="16" class="checkBox"><label>估损员</label></li>
						<li><input type="checkbox" checked="checked" data-th="17" class="checkBox"><label>收款人</label></li>
						<li><input type="checkbox" checked="checked" data-th="18" class="checkBox"><label>收款账号</label></li>
						<li><input type="checkbox" checked="checked" data-th="19" class="checkBox"><label>赔付金额</label></li>
						<li><input type="checkbox" checked="checked" data-th="20" class="checkBox"><label>是否有人伤</label></li>
					</ul>
				</div>
			</div>
		</div>
	</div>
	<div id="tableDiv">		
		<table id="tableCon" class="table" style="width:3780px;position:relative;">
			<thead class="fixedThead" id="tableThead" style="width:100%">
				<tr>
					<th >报案号<span data-thsort="0"><img src="${ctx}/images/indexNew/order.png"></span></th>
					<th>被保险人<span data-thsort="1"><img src="${ctx}/images/indexNew/order.png"></span></th>
					<th>标的车架号/车牌<span data-thsort="2"><img src="${ctx}/images/indexNew/order.png"></span></th>
					<th>三者车架号/车牌<span data-thsort="3"><img src="${ctx}/images/indexNew/order.png"></span></th>
					<th>报案时间<span data-thsort="4"><img src="${ctx}/images/indexNew/order.png"></span></th>
					<th>出险时间<span data-thsort="5"><img src="${ctx}/images/indexNew/order.png"></span></th>
					<th>出险地<span data-thsort="6"><img src="${ctx}/images/indexNew/order.png"></span></th>
					<th>出险情况<span data-thsort="7"><img src="${ctx}/images/indexNew/order.png"></span></th>
					<th>承保公司<span data-thsort="8"><img src="${ctx}/images/indexNew/order.png"></span></th>
					<th>报案人<span data-thsort="9"><img src="${ctx}/images/indexNew/order.png"></span></th>
					<th>报案电话<span data-thsort="10"><img src="${ctx}/images/indexNew/order.png"></span></th>
					<th>标的车驾驶员<span data-thsort="11"><img src="${ctx}/images/indexNew/order.png"></span></th>
					<th>三者车驾驶员<span data-thsort="12"><img src="${ctx}/images/indexNew/order.png"></span></th>
					<th>标的车驾驶员电话<span data-thsort="13"><img src="${ctx}/images/indexNew/order.png"></span></th>
					<th>三者车驾驶员电话<span data-thsort="14"><img src="${ctx}/images/indexNew/order.png"></span></th>
					<th>查勘员<span data-thsort="15"><img src="${ctx}/images/indexNew/order.png"></span></th>
					<th>估损员<span data-thsort="16"><img src="${ctx}/images/indexNew/order.png"></span></th>
					<th>收款人<span data-thsort="17"><img src="${ctx}/images/indexNew/order.png"></span></th>
					<th>收款账号<span data-thsort="18"><img src="${ctx}/images/indexNew/order.png"></span></th>
					<th>赔付金额<span data-thsort="19"><img src="${ctx}/images/indexNew/order.png"></span></th>
					<th>是否有人伤<span data-thsort="20"><img src="${ctx}/images/indexNew/order.png"></span></th>
				</tr>
			</thead>
			<tbody class="scrollTbody" id="tableB" style="position:relative;">
			</tbody>
		</table>	
		<div id="tableBox"></div>
	</div>
</div>

<div class="cateCon" id="cateCon" >
	<ul hidden>
		<li data-for="static">
			<div  class="divc cateConHover" data-target="resultHead3">
				<i></i>
				<p>统计信息</p>
			</div>
		</li>
		<li data-for="entityDetail">
			<div class="divc" data-target="resultHead">
				<i></i>
				<p>实体信息</p>
			</div>
		</li>
		<li data-for="relationDetail">
			<div class="divc" data-target="relation2">
				<i></i>
				<p>实体边关系</p>
			</div>
		</li>
	</ul>
</div>
<div id="resultCon2" class="resultCon" style="margin-left:357px;" >
	<div class="resultContainer">
		<div id="resultHeadPar" style="position: relative;overflow:hidden;">
			<div id="resultHeadPar" style="position: relative;overflow:hidden;">
			<div class="resultHead" id="resultHead" hidden>
			</div>
			<div class="resultHead" id="relation2" style="width:100%;" hidden>
				<div class="relationList">
					<table class="table" id="tableForlink">
						
					</table>
				</div>
			</div>
			<div class="resultHead" id="resultHead3" style="width:100%;" >
				
			</div>
		</div>
		</div>
	</div>
	<div class="result">
		<div class="btnResult">
			<div id="Tip" class="Tip" style="left:320px" hidden><p class="Tiptext">双击取消连线</p></div>
			<ul class="btnFunction">
				<!-- 案件查询先注释掉 2018-05-21 -->
				<!-- <li id="caseSearch" data-status="0" class="toggle" title="案件查询"><i class="tool-search"></i></li> -->
				<li id="extendMode" class="toggle" style="right:428px" title="停止抖动" data-mode="0"><i class="tool-lock"></i></li>						
				<li id="timeFilter" class="toggle" style="right:386px" title="时间过滤" data-enable="0"><i class="tool-toTF"></i>
					<div id="timeFilterCon2" style="display:none;">
						<div id="timeContainer" >
							<div id="preSet" style="padding-bottom: 10px;
													border-bottom: 1px solid;
													margin-bottom: 14px;">
								<span data-day="730">近两年</span>
								<span data-day="365">近一年</span>
								<span data-day="183">近半年</span>
							</div>
							<div id="choSet">
								<p>起始时间：<input id="minY" class='Wdate' type='text' readonly='readonly' placeholder="请输入起始日期"></p>
								<p>结束时间：<input id="maxY" class='Wdate' type='text' readonly='readonly' placeholder="请输入结束日期"></p>
								<span class="btn btn-cancel fr ml8">清除</span><span class="btn btn-confirm fr">确认</span>
							</div>
						</div>
					</div>
				</li>
				<hna:permission privilege="graph.selfDefinition">
				<li id="custom" class="toggle" style="right:344px" title="自定义数据" data-type="origin" data-enable="1"><i class="tool-toCustom"></i></li>
				</hna:permission>
				<hna:permission privilege="graph.tableToGraph">
				<li id="toTable" data-status="0" class="toggle" style="right:302px" title="表格">
				<i class="tool-table"></i>
				</li>
				</hna:permission>
				<hna:permission privilege="graph.download">
				<li id="download" class="toggle" style="right:260px" title="下载"><i class="tool-download"></i></li>
				</hna:permission>
				<hna:permission privilege="graph.save">
				<li id="save" class="toggle" style="right:218px" ><i class="tool-save" title="保存"></i></li>
				</hna:permission>
				<li id="seeCase" class="toggle" style="right:176px"><i class="tool-seeCase" title="报案列表"></i></li>
				<hna:permission privilege="graph.cancel">
				<li id="cancel" class="toggle" style="right:134px"><i class="tool-cancel" title="撤销"></i></li>
				</hna:permission>
				<li id="gb" class="toggle" style="right:92px" title="向后"><i class="tool-gb"></i></li>
			    <li id="toggle" class="toggle" style="right: 46px;"  data-enable="1" title="缩放"><i class="tool-extend"></i></li>
			</ul>
			
			<div class="fullScreen-btn" data-isfull="0" title="全屏"><i class="tool-max"></i></div>
				<div id="filter" class="toggle" style="position:absolute;right:10px;top:52px;width:36px;">
					<ul hidden>
						<li data-show="true" data-type="V">车辆</li>
						<li data-show="true" data-type="P">人物</li>
						<li data-show="true" data-type="C">报案</li>
						<li data-show="true" data-type="I">保单</li>
						<li data-show="true" data-type="T">电话</li>
						<li data-show="true" data-type="S">账户</li>
					</ul>
					<div data-switch="false" style="position: relative;width: 36px;height: 37px;display: inline-block;float:right;">
						<i class="tool-filter" style="position: absolute;right: 8px;top:0px" title="筛选"></i>
					</div>
				</div>
			<div class="detailtextCon" data-see="0">
				<div class="detailtext">
					<ul class="detailmodel"></ul>
				</div>
			</div>
		</div>
		
		<div class="hoverFunc2">
			<div class=detailShow hidden></div>
			<div class="ruleList" id="ruleLevel1">
				
			</div>
			<div class="ruleList" id="ruleLevel2" hidden>
				
			</div>
		</div>
		<div id="draw" style="height:500px;overflow: hidden;position: relative;"></div>
	</div>
</div>
<!--筛选-->
<div class="backg" style="display:none;" id="filterExtend">
	<div class="filterType">
		<p class="filter_title overflowEllipsis"></p>
		<div class="checkAll"><input type="checkbox" class="check_all"><span>全选</span></div>
		<ul id="filterCon" style="position:relative;height:242px">
			
		</ul>
		<div class="confirmBtn">
			<input type="button" class="confirm_btn" value="确定">
			<input type="button" class="btn delete_btn" value="取消">
		</div>
	</div>
</div>
<!--标记-->
<jsp:include page="/include/mark.jsp"></jsp:include>

<!--案件查询，2018-04-11-->
<div class="backg" style="display:none;" id="caseSearchRe">
	<div class="filterType" style="width:550px;">
		<p class="filter_title overflowEllipsis">案件检测</p>
		<div class="searchReDiv" id="searchRe" style="position:relative;width:550px;height:300px;margin-top:5px;">
			<div id="radarGraph"></div>
		</div>
		<div class="confirmBtn">
			<!-- <input type="button" class="confirm_btn" value="确定"> -->
			<input type="button" class="btn delete_btn" value="取消">
		</div>
	</div>
</div>

<!--个案、串案-->
<div class="backg" id="gaTable" style="display:none">
		<div class="tanchuxuanze" style="padding:15px;background: #16305f;border-radius:5px;">
			<div style="position:relative;" id="caseTypeTab">
				<table id="case_type">
					<thead>
						<tr>
							<th>欺诈舞弊类型</th>
							<th>欺诈舞弊类型细分</th>
							<th>欺诈特征</th>
						</tr>
					</thead>
					<tbody id="case_type_con">
					</tbody>
					
				</table>
			</div>
			<div class="confirmBtn">
				<input type="button" class="confirm_btn" value="确定">
				<input type="button" class="btn delete_btn" value="取消">
			</div>
		</div>
</div>
<div id="extendLoad" style="width:100%;position: absolute;top: 0;bottom: 0;z-index: 999999999;background-color: rgba(0,0,0,0.5);font-size: 32px;display: none;align-items: center;justify-content: center;"><img src="${ctx}/images/nloding.gif"></div>

<!--框选标注的模板引擎-->
<script type="text/html" id="selectLabel2_template">
	<!for(var i=0;i<data1.length;i++){!>
		<tr data-id="<!=data1[i].id!>" data-type="<!=data1[i].type!>">
			<!if(data1[i].type=="C"){!>
				<td class="overflowEllipsis"><!=data1[i].name!></td>
				<td><span class="djMoney" hidden><label>打假检出金额：</label><input type="number" style="width: 100px;"></span></td>
			<!}else{!>
				<td class="overflowEllipsis"><!=data1[i].name!></td><td></td>
			<!}!>
		</tr>
	<!}!>
</script>

<script>
	$(function(){
		$("#suiji").bind("click",function(){
			$.post("${ctx}/graph/randomNextTask.do",{},function(data){});
		});
	});
</script>

<!--列表内容-->
<!--点击复制串案 <span class="cocyCon" data-clipboard-text="<!=data[i].groupId!>"><!=data[i].groupId!></span> -->
<!-- <!if(data[i].model=="3"){!>
			<tr style="background: #0e4269;font-size: 10px;" data-groupid="<!=data[i].groupId!>"><td colspan="4" title="<!=data[i].groupId!>"><!=data[i].groupId!></td></tr>
		<!}else{!>
			<tr style="background: #0e4269;font-size: 10px;height:1px;" data-groupid="<!=data[i].groupId!>"><td colspan="4" title="<!=data[i].groupId!>"></td></tr>
		<!}!> -->
<script type="text/html" id="List22_template">
	<tr style="height:0px;"><td style="width:13%"></td><td style="width:50%"></td><td style="width:28%"></td><td style="width:20%"></td></tr>
	<!for(var i=0;i<data.length;i++){!>
		<tr style="background: #0e4269;font-size: 10px;height:1px;" data-groupid="<!=data[i].groupId!>"><td colspan="4" title="<!=data[i].groupId!>"></td></tr>
		<!for(var k=0;k<data[i].cases.length;k++){!>
			<tr data-groupid="<!=data[i].groupId!>" class="click" data-index="<!=i!>" data-model="<!=data[i].model!>">
				<td data-num="<!=k+1!>" colspan="2" class="infoListCon" style="width:35%;" title="<!=data[i].cases[k].desc!>"><!=data[i].cases[k].desc!></td>	
				<td class="mytype" style="width:30%;" >
									
				</td>		
				<td class="markBg" style="width:20%;"  data-caseid="<!=data[i].cases[k].desc!>" data-index="<!=i!>" data-listname="<!=data[i].cases[k].desc!>" data-id="<!=data[i].groupId!>" data-ruleid="<!=data[i].cases[k].rule!>"  data-modelid="<!=data[i].cases[k].model!>">
					<span class="markIcon" data-status="<!=data[i].cases[k].status!>"><!=data[i].cases[k].status=="0"?"待处理":"已处理"!></span> 
				</td>
			</tr>
		<!}!>
    <!}!>
</script>

<!--实体详情模板--><!-- #e9e9e9 -->
<script type="text/html" id="infoDetail_template"> 
		     <!
				var imageURL;
				if(data.type=="P"){
					imageURL="renDetail.png";
				}else if(data.type=="C"){
					imageURL="case.png";
				}else if(data.type=="V"){
					imageURL="car.png";
				}else if(data.type=="T"){
					imageURL="phone.png";
				}else if(data.type=="S"){
					imageURL="account.png";
				}else if(data.type=="W"){
					imageURL="4S.png";
				}else if(data.type=="I"){
					imageURL="baodanNew.png";
				}else{
					imageURL="null.png";
				}		
			!> 
		    <img src="${ctx}/images/graph/<!=imageURL!>">
			<div class="infoDetail" style="margin-left:95px">
				<p class="infoName" title="<!=data.name!>"><span class="cocyCon" data-clipboard-text="<!=(data.name==""?"无记录":data.name)!>"><!=(data.name==""?"无记录":data.name)!></span></p>
				<div id="detailC" style="position:relative;">
					<ul>
						<!if(data.attrs != undefined){!>
						<!for(var i=0;i<data.attrs.length;){!>
							<li style="width:30%;">
							<!for(var j=0;j<Math.ceil(data.attrs.length/3);j++){
								if(i>=data.attrs.length){
								break;
								}!>
								<!if((data.attrs[i].cnname)=='是否有人伤'){!>
							       <p title="<!=(data.attrs[i].value=="Y"?"是":"否")!>"><!=data.attrs[i].cnname!>：<span  class="cocyCon" data-clipboard-text="<!=(data.attrs[i].value=="Y"?"是":"否")!>"><!=(data.attrs[i].value=="Y"?"是":"否")!></span></p>
							    <!}else{!>
									<p title="<!=(data.attrs[i].value==""?"无记录":data.attrs[i].value)!>"><!=data.attrs[i].cnname!>：<span class="cocyCon" data-clipboard-text="<!=(data.attrs[i].value==""?"无记录":(data.attrs[i].value))!>"><!=(data.attrs[i].value==""?"无记录":(data.attrs[i].value))!></span></p>
								<! } !>
								<!i++;
							}!>
							</li>
						<!}!>	
						<!}!>	
					</ul>
				</div>
			</div>
</script>

<!--点击详情出现内容-->
<script type="text/html" id="List33_template">
	
		<ul class="detailmodel">
<!for(var i=0;i<data.length;i++){!>
	<li>		
			<p>姓名:<span><!=(data[i].name==""?"无记录":data[i].name)!></span></p>
	</li>
<!}!>
		</ul>

</script>
	
<script type="text/html" id="hoverRule1_template"> 
<p><!=name!><span id="detailShow" data-detail ="0" data-name="<!=rule!>">详情</span><span data-id="close">关闭</span></p>
<ul>
	<!for(var i=0;i<list.length;i++){!>
		<li class="overflowEllipsis" data-rule="<!=rule!>" data-name="<!=name!>" data-id="<!=list[i].Vin!>" title="<!=list[i].Vin!>">车架号：<!=list[i].Vin==""?"无记录":list[i].Vin!></li>
	<!}!>
</ul>
</script>

<script type="text/html" id="hoverRule1_2_template"> 
<p><!=name!><span data-id="back">返回</span></p>
<ul>
	<!for(var i=0;i<list.length;i++){!>
		<!var cases = list[i].cases.join(";");
		  var edges = list[i].Edges.join(";");
		!>
		<li class="overflowEllipsis" data-hover="0" data-id="<!=list[i].Key!>" data-fid="<!=id!>" data-cases="<!=cases!>" data-links="<!=edges!>" title="<!=list[i].Key!>">保单号：<!=list[i].Key==""?"无记录":list[i].Key!></li>
	<!}!>
</ul>
</script>

<script type="text/html" id="hoverRule2_template"> 
<p><!=name!><span id="detailShow" data-detail ="0" data-name="<!=rule!>" >详情</span><span data-id="close">关闭</span></p>
<ul>
	<!for(var prop in data.list){!>
		<!for(var i=0;i<data.list[prop].length;i++){!>
			<li class="overflowEllipsis" data-rule="<!=rule!>" data-name="<!=name!>" data-id="<!=prop!>" data-index="<!=i!>" title="<!=data.list[prop][i].Location!>"><!=data.list[prop][i].Location || "不详"!></li>
		<!}!>
	<!}!>
</ul>
</script>

<script type="text/html" id="hoverRule2_2_template"> 
<p><!=name!><span data-id="back">返回</span></p>
<!if(id=="Situation1"){!>
	<ul data-isrun="0" data-type="extend">
<!}else{!>
	<ul data-isrun="0">
<!}!>
	<! 
		var lyh = new Array();
		if(id=="Situation1"){
			var tmp = list.Situation1.Data;
			for(var j=0;j<tmp.length;j++){
				var titleArr = tmp[j].key.split(" ");
				var title = "修理厂："+titleArr[0]+" 驾驶员："+titleArr[1]+" 车牌号："+titleArr[2]+" 报案人或电话："+titleArr[3];
				lyh.push({title:title,id:tmp[j].key,cases:tmp[j].cases.join(";"),edges:tmp[j].Edges==undefined?new Array():tmp[j].Edges.join(";")});
			}
		}else{
			var data = new Array();
			for(var prop in list){
				if(prop == "Location"){
					continue;
				}else{
					var tmp = list[prop];
					var tmpForMark;
					  switch(prop){
						case "CommonPlate":
							tmpForMark = "牌照号码";
							break;
						case "CommonDriver":
							tmpForMark = "出险驾驶员";
							break;
						case "CommonLocation":
							tmpForMark = "出险地点";
							break;
						case "CommonTelReporter":
							tmpForMark = "报案电话";
							break;
						case "CommonReporter":
							tmpForMark = "报案人";
							break;
						default :
							tmpForMark = "不祥";
					  }
					for(var j=0;j<tmp.length;j++){
						lyh.push({
							id:tmp[j].key,
							title:tmpForMark+"："+tmp[j].key,
							cases:tmp[j].cases.join(";"),
							edges:tmp[j].Edges==undefined?new Array():tmp[j].Edges.join(";")
						});
					}
				}
		   }
		}
	!>
	<!
	for(var i=0;i<lyh.length;i++){ !>
		<li class="overflowEllipsis" data-rule="<!=rule!>" data-hover="0" data-id="<!=lyh[i].id!>" data-fid="<!=id!>" data-cases="<!=lyh[i].cases!>" data-links="<!=lyh[i].edges!>" title="<!=lyh[i].title!>"><!=lyh[i].title!></li>
	<!}!>
</ul>
</script>

<script type="text/html" id="hoverRule3_template"> 
<p><!=name!><span id=detailShow data-detail ="0" data-name="<!=rule!>" >详情</span><span data-id="close">关闭</span></p>
<ul>
	<!for(var i=0;i<list.length;i++){!>
		<li class="overflowEllipsis" data-rule="<!=rule!>" data-name="<!=name!>" data-id="<!=list[i].Key!>" title="<!=list[i].Key!>">维修厂：<!=list[i].Key || "无记录"!></li>
	<!}!>
</ul>
</script>

<script type="text/html" id="hoverRule4_template"> 
<p><!=name!><span id=detailShow data-detail ="0" data-name="<!=rule!>">详情</span><span data-id="close">关闭</span></p>
<ul>
	<!for(var prop in list){!>
		<!var title = prop=="endDays"?"保单到期前7天内出险的案件":"保单起期后15天内出险的案件"!>
		<li class="overflowEllipsis" data-rule="<!=rule!>" data-name="<!=name!>" data-id="<!=prop!>" title="<!=title!>"><!=title!></li>
	<!}!>
</ul>
</script>

<script type="text/html" id="hoverRule3_2_template"> 
<p><!=name!><span data-id="back">返回</span></p>
<ul>
	<! 
		var data = new Array();
		for(var prop in list){
			var oneList = list[prop];
			for(var i=0;i<oneList.length;i++){
				oneList[i].type = prop;
				data.push(oneList[i]);
			}
	   }
	!>
	<!for(var i=0;i<data.length;i++){!>
		<!var cases = data[i].cases.join(";");
		  var edges = data[i].Edges.join(";");
		  var tmpForMark;
		  switch(data[i].type){
			case "CommonPlate":
				tmpForMark = "牌照号码";
				break;
			case "CommonDriver":
				tmpForMark = "出险驾驶员";
				break;
			case "CommonLocation":
				tmpForMark = "出险地点";
				break;
			case "CommonTelReporter":
				tmpForMark = "报案电话";
				break;
			case "CommonReporter":
				tmpForMark = "报案人";
				break;
			default :
				tmpForMark = "不祥";
		  }
		!>
		<li class="overflowEllipsis" data-rule="<!=rule!>" data-hover="0" data-type="<!=data[i].type!>" data-id="<!=data[i].key!>" data-fid="<!=id!>" data-cases="<!=cases!>" data-links="<!=edges!>" title="<!=tmpForMark!>：<!=data[i].key!>"><!=tmpForMark!>：<!=data[i].key || "无记录"!></li>
	<!}!>
</ul>
</script>

<script type="text/html" id="hoverRule4_2_template"> 
<p><!=name!><span data-id="back">返回</span></p>
<ul>
	<!for(var i=0;i<list.length;i++){!>
		<!var cases = list[i].cases.join(";");
			var edges = list[i].edges.join(";");
		!>
		<li class="overflowEllipsis" data-hover="0" title="<!=list[i].policy!>" data-id="<!=list[i].policy!>" data-fid="<!=list[i].policy!>" data-cases="<!=cases!>" data-links="<!=edges!>">保单号：<!=list[i].policy || "无记录"!></li>
	<!}!>
</ul>
</script>

<script type="text/html" id="hoverRule5_template"> 
<p><!=name!><span id=detailShow data-detail ="0" data-name="<!=rule!>" >详情</span><span data-id="close">关闭</span></p>
<ul>
	<!for(var i=0;i<list.length;i++){!>
		<! var cases = list[i].cases.join(";");
		   var edges = list[i].Edges.join(";")
		!>
		<li class="overflowEllipsis" data-hover="0" title="<!=list[i].Vin!>" data-rule="<!=rule!>" data-name="<!=name!>" data-id="<!=list[i].Vin!>" data-fid="<!=list[i].Vin!>" data-links="<!=edges!>" data-cases="<!=cases!>">车牌号：<!=(list[i].Vin || "无记录")!></li>
	<!}!>
</ul>
</script>																																																												

<script type="text/html" id="hoverRule6_template"> 
<p><!=name!><span id=detailShow data-detail ="0" data-name="<!=rule!>" >详情</span><span data-id="close">关闭</span></p>
<ul>
	<!for(var i=0;i<list.length;i++){
		for(var j=0;j<list[i].length;j++){!>
			<! 	
				var cases;
				if(i==0){
					cases = list[i][j].carIds==undefined?[]:list[i][j].carIds.join(";");
				}else{
					cases = list[i][j].comIds==undefined?[]:list[i][j].comIds.join(";");
				}
		   		var edges = list[i][j].Edges.join(";");
			!>
			<li class="overflowEllipsis" data-hover="0" data-rule="<!=rule!>" title="<!=list[i][j].Tel!>" data-name="<!=name!>" data-id="<!=list[i][j].Tel!>" data-fid="<!=list[i][j].Tel!>" data-links="<!=edges!>" data-cases="<!=cases!>">报案电话：<!=list[i][j].Tel || "无记录"!></li>
		<!}!>
	<!}!>
</ul>
</script>

<script type="text/html" id="hoverLoop_template"> 
<p><!=name!><span data-id="close">关闭</span></p>
<ul>
	<!for(var i=0;i<list.length;i++){!>
		<! var cases = list[i].join(";");!>
		<li class="overflowEllipsis" data-hover="0" data-rule="<!=rule!>" data-name="<!=name!>" data-cases="<!=cases!>">环<!=(i+1)!></li>
	<!}!>
</ul>
</script>	

<script type="text/html" id="hoverRule7_template"> 
<p><!=name!><span id=detailShow data-detail ="0" data-name="<!=rule!>" >详情</span><span data-id="close">关闭</span></p>
<ul>
	<!for(var i=0;i<list.length;i++){!>
		<! var cases = list[i].cases.join(";");!>
		<li class="overflowEllipsis" data-hover="0" data-rule="<!=rule!>" data-name="<!=name!>" data-cases="<!=cases!>"><!=list[i].name!></li>
	<!}!>
</ul>
</script>	
	
<script type="text/html" id="page_template">
		<div id="jpage" class="gigantic pagination">
			<a href="#" class="first" data-action="first">&laquo;</a>
			<a href="#" class="previous" data-action="previous">&lsaquo;</a>
			<input type="text" readonly />
			<a href="#" class="next" data-action="next">&rsaquo;</a>
			<a href="#" class="last" data-action="last">&raquo;</a>
		</div>
</script>
	
<script type="text/html" id="toTable_template">
<! 
 for(prop in data){!>
	<tr>
				<! var name = data[prop].name[0],
				   INSURANT = data[prop]['daja#CASE_INSURANT_NAME']!=undefined?data[prop]['daja#CASE_INSURANT_NAME'].join(","):"无记录",
				   Accident_Vehicle_of_Case = data[prop]['daja#CASE_TARGET_CAR_PLATENO']!=undefined?data[prop]['daja#CASE_TARGET_CAR_PLATENO'].join(","):"无记录",
				   Third_Party_Vehicle = data[prop]['daja#CASE_THIRD_PARTY_CAR_PLATENO']!=undefined?data[prop]['daja#CASE_THIRD_PARTY_CAR_PLATENO'].join(","):"无记录",
				   CASE_NOTIFICATIONDATE = data[prop]["daja#CASE_NOTIFICATIONDATE"]!=undefined?data[prop]["daja#CASE_NOTIFICATIONDATE"].join(","):"无记录",
					CASE_ACCIDENTDATE = data[prop]["daja#CASE_ACCIDENTDATE"]!=undefined?data[prop]["daja#CASE_ACCIDENTDATE"].join(","):"无记录",
					CASE_ACCIDENTLOCATION = data[prop]["daja#CASE_ACCIDENTLOCATION"]!=undefined?data[prop]["daja#CASE_ACCIDENTLOCATION"].join(","):"无记录",
					CASE_ACCIDENTSTATEMENT = data[prop]["daja#CASE_ACCIDENTSTATEMENT"]!=undefined?data[prop]["daja#CASE_ACCIDENTSTATEMENT"].join(","):"无记录",
					CASE_UNDERWIRTING_BRANCH_NAME = data[prop]["daja#CASE_UNDERWIRTING_BRANCH_NAME"]!=undefined?data[prop]["daja#CASE_UNDERWIRTING_BRANCH_NAME"].join(","):"无记录",
					CASE_NOTIFICATIONNAME = data[prop]["daja#CASE_NOTIFICATIONNAME"]!=undefined?data[prop]["daja#CASE_NOTIFICATIONNAME"].join(","):"无记录",
					CASE_NOTIFICATIONTEL = data[prop]["daja#CASE_NOTIFICATIONTEL"]!=undefined?data[prop]["daja#CASE_NOTIFICATIONTEL"].join(","):"无记录",
					ACCIDENTDRIVER = data[prop]['daja#CASE_ACCIDENTDRIVER_NAME']!=undefined?data[prop]['daja#CASE_ACCIDENTDRIVER_NAME'].join(","):"无记录",
					THIRD_PARTY_ACCIDENTDRIVER = data[prop]["daja#CASE_THIRD_PARTY_ACCIDENTDRIVER_NAME"]!=undefined?data[prop]["daja#CASE_THIRD_PARTY_ACCIDENTDRIVER_NAME"].join(","):"无记录",
					ACCIDENTDRIVER_Person_TEL = data[prop]['daja#CASE_ACCIDENTDRIVER_TEL']!=undefined?data[prop]['daja#CASE_ACCIDENTDRIVER_TEL'].join(","):"无记录",
					THIRD_PARTY_ACCIDENTDRIVER_Person_TEL = data[prop]["daja#CASE_THIRD_PARTY_ACCIDENTDRIVER_TEL"]!=undefined?data[prop]["daja#CASE_THIRD_PARTY_ACCIDENTDRIVER_TEL"].join(","):"无记录",
					CASE_SURVEYOR_NAME = data[prop]["daja#CASE_SURVEYOR_NAME"]!=undefined?data[prop]["daja#CASE_SURVEYOR_NAME"].join(","):"无记录",
					CASE_ASSESSMENTSTAFF_NAME = data[prop]["daja#CASE_ASSESSMENTSTAFF_NAME"]!=undefined?data[prop]["daja#CASE_ASSESSMENTSTAFF_NAME"].join(","):"无记录",
					SettlementAccount_of_Case_SettlementAccount_PAYEEACCOUNTNAME = data[prop]["daja#SettlementAccount_of_Case-daja#SettlementAccount_PAYEEACCOUNTNAME"]!=undefined?data[prop]["daja#SettlementAccount_of_Case-daja#SettlementAccount_PAYEEACCOUNTNAME"].join(","):"无记录",
					SettlementAccount_of_Case = data[prop]["daja#SettlementAccount_of_Case"]!=undefined?data[prop]["daja#SettlementAccount_of_Case"].join(","):"无记录",
					CASE_CLAIMAMOUNT = data[prop]["daja#CASE_CLAIMAMOUNT"]!=undefined?data[prop]["daja#CASE_CLAIMAMOUNT"].join(","):"无记录",
					CASE_ISINJURYINVOLVED=data[prop]["daja#CASE_ISINJURYINVOLVED"]!=undefined?data[prop]["daja#CASE_ISINJURYINVOLVED"].join(","):"无记录";
				   
				!>
				<td data-id="CASE_NOTIFICATIONNO" title="<!=name!>" data-val="<!=name!>">
					<span class="nodesId cocyCon" data-clipboard-text="<!=data[prop].name[0]!>" style="cursor:pointer;" data-node="<!=data[prop].name[0]!>"><!=data[prop].name[0]!></span>
				</td>
				<td data-id="daja#CASE_INSURANT_NAME" title="<!=INSURANT!>" data-val="<!=INSURANT!>">
					<!	var item = data[prop]['daja#CASE_INSURANT_NAME'];
						if(item!=undefined){
							for(var i=0;i<item.length;i++){!>
								<span data-node="<!=item[i]!>"><!=item[i]!></span>
							<!}!>
							<!}!>
				</td>
				<td data-id="daja#CASE_TARGET_CAR_PLATENO" title="<!=Accident_Vehicle_of_Case!>" data-val="<!=Accident_Vehicle_of_Case!>">
					<!	
						var item = data[prop]['daja#CASE_TARGET_CAR_PLATENO'];
						if(item!=undefined){
							for(var i=0;i<item.length;i++){!>
								<span data-node="<!=item[i]!>"><!=item[i]!></span>
							<!}!>
							<!}!>
				</td>
				<td data-id="daja#CASE_THIRD_PARTY_CAR_PLATENO" title="<!=Third_Party_Vehicle!>" data-val="<!=Third_Party_Vehicle!>">
					<!	var item = data[prop]['daja#CASE_THIRD_PARTY_CAR_PLATENO'];
						if(item!=undefined){
							for(var i=0;i<item.length;i++){!>
								<span data-node="<!=item[i]!>"><!=item[i]!></span>
							<!}!>
							<!}!>
				</td>
				<td data-id="daja#CASE_NOTIFICATIONDATE" title="<!=CASE_NOTIFICATIONDATE!>" data-val="<!=CASE_NOTIFICATIONDATE!>">
					<!	
						var item = data[prop]["daja#CASE_NOTIFICATIONDATE"];
						if(item!=undefined){
							for(var i=0;i<item.length;i++){!>
								<span data-node="<!=item[i]!>"><!=item[i]!></span>
							<!}!>
							<!}!>
				</td>
				<td data-id="daja#CASE_ACCIDENTDATE" title="<!=CASE_ACCIDENTDATE!>" data-val="<!=CASE_ACCIDENTDATE!>">
					<!	
						var item = data[prop]["daja#CASE_ACCIDENTDATE"];
						if(item!=undefined){
							for(var i=0;i<item.length;i++){!>
								<span  data-node="<!=item[i]!>"><!=item[i]!></span>
							<!}!>
							<!}!>
				</td>
				<td data-id="daja#CASE_ACCIDENTLOCATION" title="<!=CASE_ACCIDENTLOCATION!>" data-val="<!=CASE_ACCIDENTLOCATION!>">
					<!	
						var item = data[prop]["daja#CASE_ACCIDENTLOCATION"];
						if(item!=undefined){
							for(var i=0;i<item.length;i++){!>
								<span  data-node="<!=item[i]!>"><!=item[i]!></span>
							<!}!>
							<!}!>
				</td>
				<td data-id="daja#CASE_ACCIDENTSTATEMENT" title="<!=CASE_ACCIDENTSTATEMENT!>" data-val="<!=CASE_ACCIDENTSTATEMENT!>">
					<!	
						var item = data[prop]["daja#CASE_ACCIDENTSTATEMENT"];
						if(item!=undefined){
							for(var i=0;i<item.length;i++){!>
								<span  data-node="<!=item[i]!>"><!=item[i]!></span>
							<!}!>
							<!}!>
				</td>
				<td data-id="daja#CASE_UNDERWIRTING_BRANCH_NAME" title="CASE_UNDERWIRTING_BRANCH_NAME" data-val="<!=CASE_UNDERWIRTING_BRANCH_NAME!>">
					<!	
						var item = data[prop]["daja#CASE_UNDERWIRTING_BRANCH_NAME"];
						if(item!=undefined){
							for(var i=0;i<item.length;i++){!>
								<span data-node="<!=item[i]!>"><!=item[i]!></span>
							<!}!>
							<!}!>
				</td>
				<td data-id="daja#CASE_NOTIFICATIONNAME" title="<!=CASE_NOTIFICATIONNAME!>" data-val="<!=CASE_NOTIFICATIONNAME!>">
					<!	var item = data[prop]["daja#CASE_NOTIFICATIONNAME"];
					if(item!=undefined){
							for(var i=0;i<item.length;i++){!>
								<span data-node="<!=item[i]!>"><!=item[i]!></span>
							<!}!>
					<!}!>
				</td>
				<td data-id="daja#CASE_NOTIFICATIONTEL" title="<!=CASE_NOTIFICATIONTEL!>" data-val="<!=CASE_NOTIFICATIONTEL!>">
					<!	
						var item = data[prop]["daja#CASE_NOTIFICATIONTEL"];
						if(item!=undefined){
							for(var i=0;i<item.length;i++){!>
								<span data-node="<!=item[i]!>"><!=item[i]!></span>
							<!}!>
							<!}!>
				</td>
				<td data-id="daja#CASE_ACCIDENTDRIVER_NAME" title="<!=ACCIDENTDRIVER!>" data-val="<!=ACCIDENTDRIVER!>">
					<!	var item = data[prop]['daja#CASE_ACCIDENTDRIVER_NAME'];
						if(item!=undefined){
							for(var i=0;i<item.length;i++){!>
								<span data-node="<!=item[i]!>"><!=item[i]!></span>
							<!}!>
							<!}!>
				</td>
				<td data-id="daja#CASE_THIRD_PARTY_ACCIDENTDRIVER_NAME" title="<!=THIRD_PARTY_ACCIDENTDRIVER!>" data-val="<!=THIRD_PARTY_ACCIDENTDRIVER!>">
					<!	
						var item = data[prop]["daja#CASE_THIRD_PARTY_ACCIDENTDRIVER_NAME"];
						if(item!=undefined){
							for(var i=0;i<item.length;i++){!>
								<span data-node="<!=item[i]!>"><!=item[i]!></span>
							<!}!>
							<!}!>
				</td>
				<td data-id="daja#CASE_ACCIDENTDRIVER_TEL" title="<!=ACCIDENTDRIVER_Person_TEL!>" data-val="<!=ACCIDENTDRIVER_Person_TEL!>">
					<!	var item = data[prop]['daja#CASE_ACCIDENTDRIVER_TEL'];
						if(item!=undefined){
							for(var i=0;i<item.length;i++){!>
								<span data-node="<!=item[i]!>"><!=item[i]!></span>
							<!}!>
							<!}!>
				</td>
				<td data-id="daja#CASE_THIRD_PARTY_ACCIDENTDRIVER_TEL" title="<!=THIRD_PARTY_ACCIDENTDRIVER_Person_TEL!>" data-val="<!=THIRD_PARTY_ACCIDENTDRIVER_Person_TEL!>">
					<!	
						var item = data[prop]["daja#CASE_THIRD_PARTY_ACCIDENTDRIVER_TEL"];
						if(item!=undefined){
							for(var i=0;i<item.length;i++){!>
								<span data-node="<!=item[i]!>"><!=item[i]!></span>
							<!}!>
							<!}!>
				</td>
				<td data-id="daja#CASE_SURVEYOR_NAME" title="<!=CASE_SURVEYOR_NAME!>" data-val="<!=CASE_SURVEYOR_NAME!>">
					<!	
						var item = data[prop]["daja#CASE_SURVEYOR_NAME"];
						if(item!=undefined){
							for(var i=0;i<item.length;i++){!>
								<span data-node="<!=item[i]!>"><!=item[i]!></span>
							<!}!>
							<!}!>
				</td>
				<td data-id="daja#CASE_ASSESSMENTSTAFF_NAME" title="<!=CASE_ASSESSMENTSTAFF_NAME!>" data-val="<!=CASE_ASSESSMENTSTAFF_NAME!>">
					<!	
						var item = data[prop]["daja#CASE_ASSESSMENTSTAFF_NAME"];
						if(item!=undefined){
							for(var i=0;i<item.length;i++){!>
								<span data-node="<!=item[i]!>"><!=item[i]!></span>
							<!}!>
							<!}!>
				</td>
				<td data-id="daja#SettlementAccount_of_Case-daja#SettlementAccount_PAYEEACCOUNTNAME" title="<!=SettlementAccount_of_Case_SettlementAccount_PAYEEACCOUNTNAME!>" data-val="<!=SettlementAccount_of_Case_SettlementAccount_PAYEEACCOUNTNAME!>">
					<!	
						var item = data[prop]["daja#SettlementAccount_of_Case-daja#SettlementAccount_PAYEEACCOUNTNAME"];
						if(item!=undefined){
							for(var i=0;i<item.length;i++){!>
								<span data-node="<!=item[i]!>"><!=item[i]!></span>
							<!}!>
							<!}!>
				</td>
				<td data-id="daja#SettlementAccount_of_Case" title="<!=SettlementAccount_of_Case!>" data-val="<!=SettlementAccount_of_Case!>">
					<!	
						var item = data[prop]["daja#SettlementAccount_of_Case"];
						if(item!=undefined){
							for(var i=0;i<item.length;i++){!>
								<span data-node="<!=item[i]!>"><!=item[i]!></span>
							<!}!>
							<!}!>
				</td>
				<td data-id="daja#CASE_CLAIMAMOUNT" title="<!=CASE_CLAIMAMOUNT!>" data-val="<!=CASE_CLAIMAMOUNT!>">
					<!	
						var item = data[prop]["daja#CASE_CLAIMAMOUNT"];
						if(item!=undefined){
							for(var i=0;i<item.length;i++){!>
								<span data-node="<!=item[i]!>"><!=item[i]!></span>
							<!}!>
							<!}!>
				</td>
				<td data-id="daja#CASE_ISINJURYINVOLVED" title="<!=(CASE_ISINJURYINVOLVED=='Y'?'是':'否')!>" data-val="<!=CASE_ISINJURYINVOLVED!>">
					<!	
						var item = data[prop]["daja#CASE_ISINJURYINVOLVED"];
						if(item!=undefined){
							for(var i=0;i<item.length;i++){!>
								<span data-node="<!=item[i]!>"><!=(item[i]=='Y'?'是':'否')!></span>
							<!}!>
							<!}!>
				</td>
			</tr>
<!}!>
</script>
	
<script type="text/html" id="static_template"> 
<div class="options">
	<span class="active1" data-tar="opt1">数量统计</span>
</div>
<div id="opt1" class="optFor" style="position:relative;height:92px;overflow:hidden;">
	<ul>
		<li><img src="${ctx}/images/indexNew/warrantyNum.png">保单数量：<span data-id="I"><!=I!></span></li>
		<li><img src="${ctx}/images/indexNew/carNum.png">车辆数量：<span data-id="V"><!=V!></span></li>
		<li><img src="${ctx}/images/indexNew/payNum.png">账号数量：<span data-id="S"><!=S!></span></li>
		<li><img src="${ctx}/images/indexNew/manNum.png">人物数量：<span data-id="P"><!=P!></span></li>
		<li><img src="${ctx}/images/indexNew/caseNum1.png">报案数量：<span data-id="C"><!=C!></span></li>
		<li><img src="${ctx}/images/indexNew/telNum.png">电话数量：<span data-id="T"><!=T!></span></li>
	</ul>
</div>
</script>

<script type="text/html" id="filterCon_template"> 
<!
	var imgUrl = {
		"S":"payNum.png",
		"V":"carNum.png",
		"I":"warrantyNum.png",
		"P":"manNum.png",
		"C":"caseNum1.png",
		"T":"telNum.png"
	}
!>
<!for(var i=0;i<link.length;i++){!>
<li data-linkid="<!=link[i].id!>">
	<span><input type="checkbox" class="check_box" data-linkid="<!=link[i].id!>"></span>
	<span><img src="${ctx}/images/indexNew/<!=imgUrl[link[i].otherType]!>" title="" alt=""><!=link[i].thisNode.id==link[i].source?link[i].tarName:link[i].srcName!></span>
	<span><!=link[i].rel.join(",")||"无记录"!></span>
</li>
<!}!>
</script>
<!--弹出框 2017.11.23-->
<script type="text/html" id="dialog_template">
	<div class="dialog_main">
		<div class="dialog_title">模型</div>
		<ul id="dialog_con" style="padding: 15px;height: 250px;overflow: auto;">
			<!for(var i=0;i<subList.subList.length;i++){
				if(subList.subList[i].ruleName==subList.subSel_val){!>
					<li><input type="radio" checked="checked" name="model" data-modelid="<!=subList.subList[i].modelId!>" data-ruleid="<!=subList.subList[i].ruleId!>">
						<span><!=subList.subList[i].ruleName!></span>
					</li>
				<!}else{!>
					<li><input type="radio" name="model" data-modelid="<!=subList.subList[i].modelId!>" data-ruleid="<!=subList.subList[i].ruleId!>">
						<span><!=subList.subList[i].ruleName!></span>
					</li>
				<!}!>	
			<!}!>
		</ul>
		<div class="confirmBtn">
			<input type="button" class="confirm_btn" value="确定">
			<input type="button" class="btn delete_btn" value="取消">
		</div>
	</div>
</script>
<!-- 下拉框 -->
<!-- <ul id="dialog_con" style="max-height: 250px;overflow: auto;">
		<!for(var i=0;i<subList.subList.length;i++){!>
			<li data-modelid="<!=subList.subList[i].modelId!>" data-ruleid="<!=subList.subList[i].ruleId!>">
				<span title="<!=subList.subList[i].ruleName!>"><!=subList.subList[i].ruleName!></span>
			</li>	
		<!}!>
	</ul> -->
<script type="text/html" id="select_template">
	<p style="padding:5px;"><input type="text" placeholder="请输入..." id="ruleSearch" style="width:140px;padding: 5px 0 5px 5px;border-radius: 3px;    border: 1px solid #ddd;"></p>
	<ul id="dialog_con" style="height: 250px;overflow: auto;position:relative;">
		<!for(var i=0;i<subList.menu_sub.length;i++){!>
			<li data-modelid="<!=subList.menu_sub[i].modelId!>">
				<p title="<!=subList.menu_sub[i].modelName!>"><!=subList.menu_sub[i].modelName!></p>
				<ul class="sub_menu">
					<!for(var o=0;o<subList.menu_sub[i].rule.length;o++){!>
						<li data-modelid="<!=subList.menu_sub[i].rule[o].modelId!>" data-ruleid="<!=subList.menu_sub[i].rule[o].ruleId!>">
							<span title="<!=subList.menu_sub[i].rule[o].ruleName!>"><!=subList.menu_sub[i].rule[o].ruleName!></span>
						</li>
					<!}!>
				</ul>
			</li>	
		<!}!>
	</ul>
</script>
<!--搜索时调用的模板引擎-->
<script type="text/html" id="keyup_template">
	<!for(var i=0;i<subList.length;i++){
		var item=subList[i];!>
		<li data-modelid="<!=item.modelId!>">
			<p title="<!=item.modelId!>"><!=item.modelName!></p>
			<ul class="sub_menu">
				<!for(var o=0;o<item.data.length;o++){
					var subItem=item.data[o];!>
					<li data-modelid="<!=subItem.modelId!>" data-ruleid="<!=subItem.ruleId!>">
						<span title="<!=subItem.ruleName!>"><!=subItem.ruleName!></span>
					</li>
				<!}!>
			</ul>
		</li>	
	<!}!>
</script>
<!-- <div class="dialog_main">
		<div class="dialog_title"><!=subList.title!></div>
		<ul id="dialog_con" style="padding: 15px;height: 200px;overflow: auto;">
			<!for(var i=0;i<subList.subList.length;i++){
				if(subList.subList[i].name==subList.subSel_val){!>
					<li><input type="radio" checked="checked" name="model" data-ruleid="<!=subList.subList[i].id!>">
						<span><!=subList.subList[i].name!></span>
					</li>
				<!}else{!>
					<li><input type="radio" name="model" data-ruleid="<!=subList.subList[i].id!>">
						<span><!=subList.subList[i].name!></span>
					</li>
				<!}!>	
			<!}!>
		</ul>
		<div class="confirmBtn">
			<input type="button" class="confirm_btn" value="确定">
			<input type="button" class="btn delete_btn" value="取消">
		</div>
	</div> -->
<script src="${ctx}/js/page/exportFile.js"></script>
<script src="${ctx}/js/page/nameMap.js"></script>
<script src="${ctx}/js/lib/d3.js"></script>
<script src="${ctx}/js/page/RadarChart.js"></script>
<script src="${ctx}/js/page/searchPic.js"></script>
<script src="${ctx}/js/lib/jquery-1.11.1.min.js"></script>
<script src="${ctx}/js/lib/perfect-scrollbar.jquery.js"></script>
<script src="${ctx}/js/lib/core.js"></script>
<script src="${ctx}/js/lib/baiduTemplate.js"></script>
<script src="${ctx}/js/lib/Tween.js"></script>
<script src="${ctx}/js/lib/RequestAnimationFrame.js"></script>
<script src="${ctx}/js/lib/jquery.jqpagination.min.js"></script>
<script src="${ctx}/js/lib/jquery-confirm.js"></script>
<script src="${ctx}/js/lib/jquery-ui.min.js"></script>
<script type="text/javascript" src="${ctx}/js/lib/jquery-ui-slide.min.js"></script>
<script type="text/javascript" src="${ctx}/js/lib/jquery-ui-timepicker-addon.js"></script>
<script type="text/javascript" src="${ctx}/js/lib/datepicker-zh-TW.js"></script>
<script type="text/javascript" src="${ctx}/js/lib/clipboard.min.js"></script>
<script src="${ctx}/js/page/tableDrag.js"></script>
<script src="${ctx}/js/page/sortTable.js"></script> 
<script type="text/javascript" src="${ctx}/js/page/copy.js"></script>
<script src="${ctx}/js/component/newGraph3.js" type="text/javascript"></script>
<script>
jQuery.browser={};
(function(){
	jQuery.browser.msie=false;
	jQuery.browser.version=0;
	if(navigator.userAgent.match(/MSIE([0-9]+)./)){
		jQuery.browser.msie=true;
		jQuery.browser.version=RegExp.$1;
	}
})();

var urlPath = "${ctx}"; //项目名路径
var opt ={con:"draw",width:$("#draw").width(),height:$("#draw").height(),url:urlPath,nameMap:nodeParaNameMap,linkMap:linkNameMap,linkRel:linkType};
var graph = new NewGraph(opt); //新建关系图实例
</script>
<script src="${ctx}/js/page/commonPart2.js"></script>
<script>
(function(){	
	var modelId = $("#model_sel select option:selected").data("modelid");
	var ruleId=null;
	var curPage = 1;
	var pageNum = 30;
	var graphData = null;//保存列表中的图数据
	var request = [];
	graph.init(); //初始化关系图
	$(".toggle").hide();//隐藏按钮
	
	$('.detailtext').perfectScrollbar();
	$("#relLinkBody").perfectScrollbar();
	$("#infoList").perfectScrollbar();
	//$("#graphToTable").perfectScrollbar();
	$("#tableDiv").perfectScrollbar();
	$("#tableB").perfectScrollbar();
	$("#filterCon").perfectScrollbar();
	$("#detailC").perfectScrollbar();
	$("#caseTypeTab").perfectScrollbar();
	$(".searchReDiv").perfectScrollbar();
	
	//初始化
	function init(){
		getList(curPage,modelId,ruleId);
	}
	init();
	
	function closeMenuAndFunc(){
		$(".hoverFunc2 #ruleLevel1 [data-id='close']").click();
		graph.clearMenu();
	}
	
	/*统计信息*/
	function getStatic(){
		var nodes = graph.getNodeArr();
		var typeNum = {I:0,P:0,V:0,C:0,S:0,T:0};
		for(var i=0;i<nodes.length;i++){
			typeNum[nodes[i].type]++;
		}
		var ht = baidu.template("static_template",typeNum);	
		$("#resultHead3").html(ht);
		$("#cateCon [data-for='static'] .divc").click();
		//$("#opt1").perfectScrollbar();
	}
	
	_.MessageManager.on("getStatic",function(){
		getStatic();
		refreshCaseList();
	});
	
	/*获取自定义数据*/
	$("#custom").click(function(){
		closeMenuAndFunc();
		if($(this).data("type")=="origin"){
			var that = this;
			$.ajax({
				type:"POST",
				url:urlPath+"/baseInfo/customEntity.do",
				data:{graph:JSON.stringify(graph.getOriginFormatData())},
				dataType:"json",
				success:function(result){
					if(result=="fail"){
						alert("请先登录！");
					}else if(result.status=="err"){
						alert(result.mess);
					}else{
						graph.switchCustomData(result,"toCustom");
						$(that).data("type","custom").attr("title","原始数据");;
						$("#custom i").removeClass("tool-toCustom").addClass("tool-toOrigin");
					}
				},
				error:function(){
					
				}
			});	
		}else{
			if(graph.isModify()){
				if(confirm("是否忽略已有的修改！")){
					graph.para.operateIndex=-1;
					graph.para.operateList.splice(0,graph.para.operateList.length);
					graph.para.cancelList.splice(0,graph.para.cancelList.length);
					graph.para.addIndex=0;
				}else{
					return;
				}
			}
			graph.switchCustomData(null,"toOrigin")
			$(this).data("type","origin").attr("title","自定义数据");
			$("#custom i").removeClass("tool-toOrigin").addClass("tool-toCustom");
		}
	});
	
	/*保存*/
	$("#save").click(function(){
		closeMenuAndFunc();
		graph.save();
	});

	//初始化分页
	function initPageWidget(data){  
		var ht =baidu.template("page_template");
		$("#jpageCon").html(ht);
		
	    var totalCounts = data.totalNum;  //总条数
	    var max = Math.ceil(totalCounts/pageNum);  //一共多少页 

	    $('#jpage').jqPagination({  
	          link_string : '/?={page_number}',  
	          current_page: data.currentPage, //设置当前页 默认为1  
	          max_page : max, //设置最大页 默认为1  
	          page_string : '{current_page}/{max_page}',  
	          paged : function(page) {  
	               // getList(page,curType); //更新页码同时读取下一页的数据
	              	getList(page,modelId,ruleId);
	          }  
	    }); 
		if(data.currentPage==1 && max==1){
           $(".first").css("color","rgb(73, 71, 71)");	
           $(".previous").css("color","rgb(73, 71, 71)");	
		   $(".next").css("color","rgb(73, 71, 71)");	
           $(".last").css("color","rgb(73, 71, 71)");
        }		
       else if(data.currentPage==1){
           $(".first").css("color","rgb(73, 71, 71)");	
           $(".previous").css("color","rgb(73, 71, 71)");	
        }	
        else if(data.currentPage==max){
           $(".next").css("color","rgb(73, 71, 71)");	
           $(".last").css("color","rgb(73, 71, 71)");	
        }
	}  
	
	/*返回*/
	$("#cancel").click(function(){
		closeMenuAndFunc();
		_.MessageManager.fire("cancel");
	});
	
	/*回退*/
	$("#gb").click(function(){
		closeMenuAndFunc();
		_.MessageManager.fire("goback");
	});
	
	/*转为表格*/
	function initTable(){
		var thead = ["报案号","被保险人","标的车架号/车牌","三者车架号/车牌","报案时间",
					"出险时间","出险地","出险情况","承保公司","报案人","报案电话","标的车驾驶员","三者车驾驶员","标的车驾驶员电话","三者车驾驶员电话","查勘员","估损员","收款人","收款账号","赔付金额","是否有人伤"];
		$("#tableCon thead th").each(function(i){
			if(i<=thead.length){
				$(this).html(thead[i]);
			}
		});
		//console.log(allth);
	}

	//点击列表中，表头选中后重组字符串
	_.MessageManager.on("initTable2",function(){
		var thead = ["报案号","被保险人","标的车架号/车牌","三者车架号/车牌","报案时间",
					"出险时间","出险地","出险情况","承保公司","报案人","报案电话","标的车驾驶员","三者车驾驶员","标的车驾驶员电话","三者车驾驶员电话","查勘员","估损员","收款人","收款账号","赔付金额","是否有人伤"];
		var theadTh = thead;
		var str='<tr>';
		for(var i=0;i<thead.length;i++){
			str+='<th>'+thead[i]+'<span data-thsort="'+i+'"><img src="${ctx}/images/indexNew/order.png"></span></th>';		
		}
		str+='</tr>';
		$("#tableThead").html(str);
		$(".checkBox").prop("checked",true);
		$("#thShowDiv .checkAll").prop("checked",true);
		$("#thShowDiv").css("display","none");
		_.MessageManager.fire("showTable",{data:theadTh});
	});
	
	//表头选中后重组字符串
	_.MessageManager.on("initTable",function($ev,data){
		var thead = data.theadTh;
		var theadTh = data.theadTh;
		var str='<tr>';
		for(var i=0;i<thead.length;i++){
			str+='<th>'+thead[i]+'<span data-thsort="'+i+'" ><img src="${ctx}/images/indexNew/order.png"></span></th>';		
		}
		str+='</tr>';
		$("#tableThead").html(str);
		_.MessageManager.fire("showTable",{data:theadTh});
	});

	_.MessageManager.on("showTable",function($ev,data2){
		if(data2==undefined){
			//图转表限制200行，20171016
			var allData = clone(graph.getSubGraph());
			var  nodeCase=[];
			for(var i=0;i<allData.nodes.length;i++){
				if(allData.nodes[i].type=="C"){
					nodeCase.push(allData.nodes[i]);
				}
			}   
			if(nodeCase.length>500){
				alert("报案号数量不能大于500个！");
				return;
			}
			//否时继续，20171016
		}		
		closeMenuAndFunc();
		var allData = clone(graph.getSubGraph());
		//图转表限制200行，20171016
		var  nodeCase=[];
		for(var i=0;i<allData.nodes.length;i++){
			if(allData.nodes[i].type=="C"){
				nodeCase.push(allData.nodes[i]);
			}
		}   
		if(nodeCase.length>500){
			//alert("报案号数量不能大于500个！");
			return;
		}
		//否时继续，20171016
		var allCase = [];
		var tableAllObj = new Object();
		var tableObj = new Object();
		for(var i=0;i<allData.nodes.length;i++ ){
			if((allData.nodes[i].type == "C") && allCase.indexOf(allData.nodes[i].id)<0 ){
				allCase.push(allData.nodes[i].id);
				tableObj[allData.nodes[i].id] = new Object();
				tableObj[allData.nodes[i].id].name = (allData.nodes[i].name||"无记录");
				for(var k=0;k<allData.nodes[i].attrs.length;k++){
					var key = allData.nodes[i].attrs[k].name;
					tableObj[allData.nodes[i].id][key] = allData.nodes[i].attrs[k].value;
				}
			}
			tableAllObj[allData.nodes[i].id] = allData.nodes[i];
		}
		//console.log(allCase);
		for(var i=0;i<allData.links.length;i++){
			var srcId = graph.getLinkSourceId(allData.links[i]);
			var tarId = graph.getLinkTargetId(allData.links[i])
			if(allCase.indexOf(srcId)>=0){
				for(var k=0;k<allData.links[i].rel.length;k++){
					var rel = allData.links[i].rel[k];
					var tarNode = graph.getNodeNameByLink(allData.links[i].target);
					if(tableObj[srcId][rel]==undefined){
						tableObj[srcId][rel] = tarNode;
						
						if((tableAllObj[srcId] instanceof Object) && (tableAllObj[srcId].attrs instanceof Array)){
							for(var g=0;g<tableAllObj[srcId].attrs.length;g++ ){
								var key = tableAllObj[srcId].attrs[g].name;
								tableObj[srcId][key] = tableAllObj[srcId].attrs[g].value;
							}
						}
						if((tableAllObj[tarId] instanceof Object) && (tableAllObj[tarId].attrs instanceof Array)){
							for(var g=0;g<tableAllObj[tarId].attrs.length;g++ ){
								var key = tableAllObj[tarId].attrs[g].name;
								key = rel+"-"+key;
								tableObj[srcId][key] = tableAllObj[tarId].attrs[g].value;
							}
						}
					}
					else{
						tableObj[srcId][rel] = tableObj[srcId][rel].trim();
						if(tableObj[srcId][rel]==""){
							tableObj[srcId][rel] = tarNode
						}else{
							tableObj[srcId][rel] = tableObj[srcId][rel]+","+tarNode;
						}
						if((tableAllObj[tarId] instanceof Object) && (tableAllObj[tarId].attrs instanceof Array)){
							for(var g=0;g<tableAllObj[tarId].attrs.length;g++ ){
								var key = tableAllObj[tarId].attrs[g].name;
								key = rel+"-"+key;
								if(tableObj[srcId][key]==""){
									tableObj[srcId][key] = tableAllObj[tarId].attrs[g].value;
								}else{
									tableObj[srcId][key] = tableObj[srcId][key] +","+ tableAllObj[tarId].attrs[g].value;
								}
							}
						}
					}
					//nodeNum[tarNode] = nodeNum[tarNode]==undefined?1:nodeNum[tarNode]+1;
				}
			}
			if(allCase.indexOf(tarId)>=0){
				for(var k=0;k<allData.links[i].rel.length;k++){
					var rel = allData.links[i].rel[k];
					var srcNode = graph.getNodeNameByLink(allData.links[i].source);
					if(tableObj[tarId][rel]==undefined){
						tableObj[tarId][rel] = srcNode;
						
						if((tableAllObj[tarId] instanceof Object) && (tableAllObj[tarId].attrs instanceof Array)){
							for(var g=0;g<tableAllObj[tarId].attrs.length;g++ ){
								var key = tableAllObj[tarId].attrs[g].name;
								tableObj[tarId][key] = tableAllObj[tarId].attrs[g].value;
							}
						}
						if((tableAllObj[srcId] instanceof Object) && (tableAllObj[srcId].attrs instanceof Array)){
							for(var g=0;g<tableAllObj[srcId].attrs.length;g++ ){
								var key = tableAllObj[srcId].attrs[g].name;
								key = rel+"-"+key;
								tableObj[tarId][key] = tableAllObj[srcId].attrs[g].value;
							}
						}
					}
					else{
						tableObj[tarId][rel] = tableObj[tarId][rel].trim();
						if(tableObj[tarId][rel]==""){
							tableObj[tarId][rel] = srcNode;
						}else{
							tableObj[tarId][rel] = tableObj[tarId][rel]+","+srcNode;
						}
						if((tableAllObj[srcId] instanceof Object) && (tableAllObj[srcId].attrs instanceof Array)){
							for(var g=0;g<tableAllObj[srcId].attrs.length;g++ ){
								var key = tableAllObj[srcId].attrs[g].name;
								key = rel+"-"+key;
								if(tableObj[tarId][key]==""){
									tableObj[tarId][key] = tableAllObj[srcId].attrs[g].value;
								}else{
									tableObj[tarId][key] = tableObj[tarId][key] +","+ tableAllObj[srcId].attrs[g].value;
								}
							}
						}
					}
					//nodeNum[srcNode] = nodeNum[srcNode]==undefined?1:nodeNum[srcNode]+1;
				}
			}
		}
		//console.log("table")
		
		for(var prop in tableObj){
			for(attr in tableObj[prop]){
				tableObj[prop][attr] = tableObj[prop][attr].split(",");
			}
		}
		
		//去除重复内容
		for(var prop in tableObj){
			for(var para in tableObj[prop]){
				var tmp = tableObj[prop][para];
				var newPara = new Array();
				for(var i=0;i<tmp.length;i++){
					if(newPara.indexOf(tmp[i])<0){
						newPara.push(tmp[i]);
					}
				}
				tableObj[prop][para] = newPara;
			}
		}

		//判断表头所选数据进行排序
		if(data2!=undefined){
			var str='';
			var data=tableObj;
			for(prop in data){
				str+='<tr>';
				var name = data[prop].name[0],
					   INSURANT = data[prop]['daja#CASE_INSURANT_NAME']!=undefined?data[prop]['daja#CASE_INSURANT_NAME'].join(","):"无记录",
					   Accident_Vehicle_of_Case = data[prop]['daja#CASE_TARGET_CAR_PLATENO']!=undefined?data[prop]['daja#CASE_TARGET_CAR_PLATENO'].join(","):"无记录",
					   Third_Party_Vehicle = data[prop]['daja#CASE_THIRD_PARTY_CAR_PLATENO']!=undefined?data[prop]['daja#CASE_THIRD_PARTY_CAR_PLATENO'].join(","):"无记录",
					   CASE_NOTIFICATIONDATE = data[prop]["daja#CASE_NOTIFICATIONDATE"]!=undefined?data[prop]["daja#CASE_NOTIFICATIONDATE"].join(","):"无记录",
						CASE_ACCIDENTDATE = data[prop]["daja#CASE_ACCIDENTDATE"]!=undefined?data[prop]["daja#CASE_ACCIDENTDATE"].join(","):"无记录",
						CASE_ACCIDENTLOCATION = data[prop]["daja#CASE_ACCIDENTLOCATION"]!=undefined?data[prop]["daja#CASE_ACCIDENTLOCATION"].join(","):"无记录",
						CASE_ACCIDENTSTATEMENT = data[prop]["daja#CASE_ACCIDENTSTATEMENT"]!=undefined?data[prop]["daja#CASE_ACCIDENTSTATEMENT"].join(","):"无记录",
						CASE_UNDERWIRTING_BRANCH_NAME = data[prop]["daja#CASE_UNDERWIRTING_BRANCH_NAME"]!=undefined?data[prop]["daja#CASE_UNDERWIRTING_BRANCH_NAME"].join(","):"无记录",
						CASE_NOTIFICATIONNAME = data[prop]["daja#CASE_NOTIFICATIONNAME"]!=undefined?data[prop]["daja#CASE_NOTIFICATIONNAME"].join(","):"无记录",
						CASE_NOTIFICATIONTEL = data[prop]["daja#CASE_NOTIFICATIONTEL"]!=undefined?data[prop]["daja#CASE_NOTIFICATIONTEL"].join(","):"无记录",
						ACCIDENTDRIVER = data[prop]['daja#CASE_ACCIDENTDRIVER_NAME']!=undefined?data[prop]['daja#CASE_ACCIDENTDRIVER_NAME'].join(","):"无记录",
						THIRD_PARTY_ACCIDENTDRIVER = data[prop]["daja#CASE_THIRD_PARTY_ACCIDENTDRIVER_NAME"]!=undefined?data[prop]["daja#CASE_THIRD_PARTY_ACCIDENTDRIVER_NAME"].join(","):"无记录",
						ACCIDENTDRIVER_Person_TEL = data[prop]['daja#CASE_ACCIDENTDRIVER_TEL']!=undefined?data[prop]['daja#CASE_ACCIDENTDRIVER_TEL'].join(","):"无记录",
						THIRD_PARTY_ACCIDENTDRIVER_Person_TEL = data[prop]["daja#CASE_THIRD_PARTY_ACCIDENTDRIVER_TEL"]!=undefined?data[prop]["daja#CASE_THIRD_PARTY_ACCIDENTDRIVER_TEL"].join(","):"无记录",
						CASE_SURVEYOR_NAME = data[prop]["daja#CASE_SURVEYOR_NAME"]!=undefined?data[prop]["daja#CASE_SURVEYOR_NAME"].join(","):"无记录",
						CASE_ASSESSMENTSTAFF_NAME = data[prop]["daja#CASE_ASSESSMENTSTAFF_NAME"]!=undefined?data[prop]["daja#CASE_ASSESSMENTSTAFF_NAME"].join(","):"无记录",
						SettlementAccount_of_Case_SettlementAccount_PAYEEACCOUNTNAME = data[prop]["daja#SettlementAccount_of_Case-daja#SettlementAccount_PAYEEACCOUNTNAME"]!=undefined?data[prop]["daja#SettlementAccount_of_Case-daja#SettlementAccount_PAYEEACCOUNTNAME"].join(","):"无记录",
						SettlementAccount_of_Case = data[prop]["daja#SettlementAccount_of_Case"]!=undefined?data[prop]["daja#SettlementAccount_of_Case"].join(","):"无记录",
						CASE_CLAIMAMOUNT = data[prop]["daja#CASE_CLAIMAMOUNT"]!=undefined?data[prop]["daja#CASE_CLAIMAMOUNT"].join(","):"无记录",
						CASE_ISINJURYINVOLVED=data[prop]["daja#CASE_ISINJURYINVOLVED"]!=undefined?data[prop]["daja#CASE_ISINJURYINVOLVED"].join(","):"无记录";
				   
				for(var k=0;k<data2.data.length;k++){
					switch(data2.data[k]){
						case "报案号":
							str+='<td data-id="CASE_NOTIFICATIONNO" title="'+name+'" data-val="'+name+'">'
								+'<span class="nodesId" style="cursor:pointer;" data-node="'+data[prop].name[0]+'">'+data[prop].name[0]+'</span>'
								+'</td>';
							break;
						case "被保险人":
							str+='<td data-id="daja#CASE_INSURANT_NAME" title="'+INSURANT+'" data-val="'+INSURANT+'">';
									var item = data[prop]['daja#CASE_INSURANT_NAME'];
									if(item!=undefined){
										for(var i=0;i<item.length;i++){
											str+='<span data-node="'+item[i]+'">'+item[i]+'</span>';
										}
									}
							str+='</td>';
							break;
						case "标的车架号/车牌":
							str+='<td data-id="daja#CASE_TARGET_CAR_PLATENO" title="'+Accident_Vehicle_of_Case+'" data-val="'+Accident_Vehicle_of_Case+'">';
									var item = data[prop]['daja#CASE_TARGET_CAR_PLATENO'];
									if(item!=undefined){
										for(var i=0;i<item.length;i++){
											str+='<span data-node="'+item[i]+'">'+item[i]+'</span>';
										}
									}
							str+='</td>';
							break;
						case "三者车架号/车牌":
							str+='<td data-id="daja#CASE_THIRD_PARTY_CAR_PLATENO" title="'+Third_Party_Vehicle+'" data-val="'+Third_Party_Vehicle+'">';
								var item = data[prop]['daja#CASE_THIRD_PARTY_CAR_PLATENO'];
									if(item!=undefined){
										for(var i=0;i<item.length;i++){
											str+='<span data-node="'+item[i]+'">'+item[i]+'</span>';
										}
									}
							str+='</td>';
							break;
						case "报案时间":
							str+='<td data-id="daja#CASE_NOTIFICATIONDATE" title="'+CASE_NOTIFICATIONDATE+'" data-val="'+CASE_NOTIFICATIONDATE+'">';	
								var item = data[prop]["daja#CASE_NOTIFICATIONDATE"];
								if(item!=undefined){
									for(var i=0;i<item.length;i++){
										str+='<span data-node="'+item[i]+'">'+item[i]+'</span>';
									}
								}
							str+='</td>';
							break;
						case "出险时间":
							str+='<td data-id="daja#CASE_ACCIDENTDATE" title="'+CASE_ACCIDENTDATE+'" data-val="'+CASE_ACCIDENTDATE+'">';
									var item = data[prop]["daja#CASE_ACCIDENTDATE"];
									if(item!=undefined){
									for(var i=0;i<item.length;i++){
										str+='<span data-node="'+item[i]+'">'+item[i]+'</span>';
									}
								}
							str+='</td>';
							break;
						case "出险地":
							str+='<td data-id="daja#CASE_ACCIDENTLOCATION" title="'+CASE_ACCIDENTLOCATION+'" data-val="'+CASE_ACCIDENTLOCATION+'">';
							var item = data[prop]["daja#CASE_ACCIDENTLOCATION"];
							if(item!=undefined){
								for(var i=0;i<item.length;i++){
									str+='<span data-node="'+item[i]+'">'+item[i]+'</span>';
								}
							}
							str+='</td>';
							break;
						case "出险情况":
							str+='<td data-id="daja#CASE_ACCIDENTSTATEMENT" title="'+CASE_ACCIDENTSTATEMENT+'" data-val="'+CASE_ACCIDENTSTATEMENT+'">';	
								var item = data[prop]["daja#CASE_ACCIDENTSTATEMENT"];
								if(item!=undefined){
									for(var i=0;i<item.length;i++){
										str+='<span data-node="'+item[i]+'">'+item[i]+'</span>';
									}
								}
							str+='</td>';
							break;
						case "承保公司":
							str+='<td data-id="daja#CASE_UNDERWIRTING_BRANCH_NAME" title="'+CASE_UNDERWIRTING_BRANCH_NAME+'" data-val="'+CASE_UNDERWIRTING_BRANCH_NAME+'">';
								var item = data[prop]["daja#CASE_UNDERWIRTING_BRANCH_NAME"];
								if(item!=undefined){
									for(var i=0;i<item.length;i++){
										str+='<span data-node="'+item[i]+'">'+item[i]+'</span>';
									}
								}
							str+='</td>';
							break;
						case "报案人":
							str+='<td data-id="daja#CASE_NOTIFICATIONNAME" title="'+CASE_NOTIFICATIONNAME+'" data-val="'+CASE_NOTIFICATIONNAME+'">';
								var item = data[prop]["daja#CASE_NOTIFICATIONNAME"];
								if(item!=undefined){
									for(var i=0;i<item.length;i++){
										str+='<span data-node="'+item[i]+'">'+item[i]+'</span>';
									}
								}
							str+='</td>';
							break;
						case "报案电话":
							str+='<td data-id="daja#CASE_NOTIFICATIONTEL" title="'+CASE_NOTIFICATIONTEL+'" data-val="'+CASE_NOTIFICATIONTEL+'">';
								var item = data[prop]["daja#CASE_NOTIFICATIONTEL"];
								if(item!=undefined){
									for(var i=0;i<item.length;i++){
										str+='<span data-node="'+item[i]+'">'+item[i]+'</span>';
									}
								}
							str+='</td>';
							break;
						case "标的车驾驶员":
							str+='<td data-id="daja#CASE_ACCIDENTDRIVER_NAME" title="'+ACCIDENTDRIVER+'" data-val="'+ACCIDENTDRIVER+'">';
								var item = data[prop]['daja#CASE_ACCIDENTDRIVER_NAME'];
								if(item!=undefined){
									for(var i=0;i<item.length;i++){
										str+='<span data-node="'+item[i]+'">'+item[i]+'</span>';
									}
								}
							str+='</td>';
							break;
						case "三者车驾驶员":
							str+='<td data-id="daja#CASE_THIRD_PARTY_ACCIDENTDRIVER_NAME" title="'+THIRD_PARTY_ACCIDENTDRIVER+'" data-val="'+THIRD_PARTY_ACCIDENTDRIVER+'">';	
								var item = data[prop]["daja#CASE_THIRD_PARTY_ACCIDENTDRIVER_NAME"];
								if(item!=undefined){
									for(var i=0;i<item.length;i++){
										str+='<span data-node="'+item[i]+'">'+item[i]+'</span>';
									}
								}
							str+='</td>';
							break;
						case "标的车驾驶员电话":
							str+='<td data-id="daja#CASE_ACCIDENTDRIVER_TEL" title="'+ACCIDENTDRIVER_Person_TEL+'" data-val="'+ACCIDENTDRIVER_Person_TEL+'">';
								var item = data[prop]['daja#CASE_ACCIDENTDRIVER_TEL'];
								if(item!=undefined){
									for(var i=0;i<item.length;i++){
										str+='<span data-node="'+item[i]+'">'+item[i]+'</span>';
									}
								}
							str+='</td>';
							break;
						case "三者车驾驶员电话":
							str+='<td data-id="daja#CASE_THIRD_PARTY_ACCIDENTDRIVER_TEL" title="'+THIRD_PARTY_ACCIDENTDRIVER_Person_TEL+'" data-val="'+THIRD_PARTY_ACCIDENTDRIVER_Person_TEL+'">';
								var item = data[prop]["daja#CASE_THIRD_PARTY_ACCIDENTDRIVER_TEL"];
								if(item!=undefined){
									for(var i=0;i<item.length;i++){
										str+='<span data-node="'+item[i]+'">'+item[i]+'</span>';
									}
								}
							str+='</td>';
							break;
						case "查勘员":
							str+='<td data-id="daja#CASE_SURVEYOR_NAME" title="'+CASE_SURVEYOR_NAME+'" data-val="'+CASE_SURVEYOR_NAME+'">';	
								var item = data[prop]["daja#CASE_SURVEYOR_NAME"];
								if(item!=undefined){
									for(var i=0;i<item.length;i++){
										str+='<span data-node="'+item[i]+'">'+item[i]+'</span>';
									}
								}
							str+='</td>';
							break;
						case "估损员":
							str+='<td data-id="daja#CASE_ASSESSMENTSTAFF_NAME" title="'+CASE_ASSESSMENTSTAFF_NAME+'" data-val="'+CASE_ASSESSMENTSTAFF_NAME+'">';	
								var item = data[prop]["daja#CASE_ASSESSMENTSTAFF_NAME"];
								if(item!=undefined){
									for(var i=0;i<item.length;i++){
										str+='<span data-node="'+item[i]+'">'+item[i]+'</span>';
									}
								}
							str+='</td>';
							break;
						case "收款人":
							str+='<td data-id="daja#SettlementAccount_of_Case-daja#SettlementAccount_PAYEEACCOUNTNAME" title="'+SettlementAccount_of_Case_SettlementAccount_PAYEEACCOUNTNAME+'" data-val="'+SettlementAccount_of_Case_SettlementAccount_PAYEEACCOUNTNAME+'">';
								var item = data[prop]["daja#SettlementAccount_of_Case-daja#SettlementAccount_PAYEEACCOUNTNAME"];
								if(item!=undefined){
									for(var i=0;i<item.length;i++){
										str+='<span data-node="'+item[i]+'">'+item[i]+'</span>';
									}
								}
							str+='</td>';
							break;
						case "收款账号":
							str+='<td data-id="daja#SettlementAccount_of_Case" title="'+SettlementAccount_of_Case+'" data-val="'+SettlementAccount_of_Case+'">';
								var item = data[prop]["daja#SettlementAccount_of_Case"];
								if(item!=undefined){
									for(var i=0;i<item.length;i++){
										str+='<span data-node="'+item[i]+'">'+item[i]+'</span>';
									}
								}
							str+='</td>';
							break;
						case "赔付金额":
							str+='<td data-id="daja#CASE_CLAIMAMOUNT" title="'+CASE_CLAIMAMOUNT+'" data-val="'+CASE_CLAIMAMOUNT+'">';	
								var item = data[prop]["daja#CASE_CLAIMAMOUNT"];
								if(item!=undefined){
									for(var i=0;i<item.length;i++){
										str+='<span data-node="'+item[i]+'">'+item[i]+'</span>';
									}
								}
							str+='</td>';
							break;
						case "是否有人伤":
							str+='<td data-id="daja#CASE_ISINJURYINVOLVED" title="'+(CASE_ISINJURYINVOLVED=='Y'?'是':'否')+'" data-val="'+CASE_ISINJURYINVOLVED+'">';
								var item = data[prop]["daja#CASE_ISINJURYINVOLVED"];
								if(item!=undefined){
									for(var i=0;i<item.length;i++){
										str+='<span data-node="'+item[i]+'">'+(item[i]=='Y'?'是':'否')+'</span>';
									}
								}
							str+='</td>';
							break;
						default :
							break;
					}
				}
				str+='</tr>';
			}
			$("#graphToTable table tbody").html(str);
		}else{
			var ht = baidu.template("toTable_template",{data:tableObj});
		
			$("#graphToTable table tbody").html(ht);
		}

		/*//表格拖动
	    	tableDrag("graphToTable","tableCon","tableDiv","tableBox","tableThead");*/
				
		//通过实际的表格计算重复的实体
		var nodeNum = new Object();
		$("#graphToTable table tbody span").each(function(){
			var attr = $(this).data("node");
			nodeNum[attr] = nodeNum[attr]==undefined?1:nodeNum[attr]+1;
		});
		//给重复的实体分配颜色
		var nodeCol = new Object();
		for(var prop in nodeNum){
			if(nodeNum[prop]>1 && prop!="unknow" && prop!=""){
				nodeCol[prop] = "#"+(function(color){
				     var r=Math.floor(Math.random()*(200-60)+60);
					 var g=Math.floor(Math.random()*(200-60)+60);
					 var b=Math.floor(Math.random()*(200-60)+60);
					 return "rgb("+r+','+g+','+b+")";
					//return (color += '0123456789abcdef'[Math.floor(Math.random()*16)]) && (color.length == 6) ? color : arguments.callee(color);
				})("");
			}
		}
		//给对应的span填充颜色
		$("#graphToTable table tbody span").each(function(){
			var attr = $(this).data("node");
			//console.log(attr);
			if(nodeCol[attr]!=undefined && attr!="未知"){
				$(this).data("col",nodeCol[attr]);
				$(this).css("background-color",nodeCol[attr]);
			}
		});
		
		$("#graphToTable").show();
		$("#cateCon").hide();
		$("#resultCon2").hide();
		
		$("#graphToTable").perfectScrollbar("update");
		$("#graphToTable").scrollTop(0);
		$("#graphToTable").scrollLeft(0);
		$("#tableDiv").perfectScrollbar('update');
		$("#tableB").perfectScrollbar('update');
		$("#tableDiv").scrollLeft(0);
		$("#tableDiv").scrollTop(0);
		$("#tableB").scrollLeft(0);
		$("#tableB").scrollTop(0);
		
		$("#filterCon").perfectScrollbar("update");
		
		$("#toTable").data("status",1);
		$("#tableThead th span").eq(0).click();
		//表格拖动
	     tableDrag("graphToTable","tableCon","tableDiv","tableBox","tableThead");
	});

	//点击表里的报案号,去影像系统
	$("#graphToTable table tbody").delegate(".nodesId","contextmenu",function(e){
		 //阻止显示浏览器默认的右键事件
		e.preventDefault();
		var allData = clone(graph.getSubGraph());
		var name=$(this).data("node");
		for(var i=0;i<allData.nodes.length;i++){
			if(allData.nodes[i].name==name){
				var nodeData=allData.nodes[i];
				_.MessageManager.fire("getCaseImg",{data:nodeData});
			}
		}
	});

	//点击表头排序
	$("#tableThead").delegate("th span","click",function(){
		//var idx=$(this).data("thsort");
		var idx=this.parentNode.cellIndex; //获取tabled的cell		
		sortTable("tableCon",idx);
	});
	//复制粘贴
	$("#tableCon").delegate("td","click",function(e){
		var text=$(this).text();
		copyToClipboard(text,e);
	});

	var downLoadTdata = {csvBodyArr:[],csvHeadArr:[],colors:[]};//永远导出所有，所有加了一个全局变量
	//导出
	$("#downLoadT").click(function(){
		if(downLoadTdata.csvBodyArr.length>500){
			alert("导出数量不能多于500条!");
			return false;
		}
		download(JSON.stringify(downLoadTdata)); 	
	});
	//下载函数
	function download(exportCase){
		var $form = $("<form style='display:none' target='downloadframe' action='${ctx}/sysTask/exchangeWithColor.do' method='post'>");
		var $exportCase = $("<input name='exportCase' value='"+exportCase+"'>");
		$form.append($exportCase);
		$("body").append($form);
		$form.submit();
		$form.remove();
	}
	//点击图转表
	$("#toTable").click(function(){
		graph.extendCase();
		_.MessageManager.fire("initTable2");//重组表头并清除
		//获取导出的数据（所有数据）
		downLoadTdata = {csvBodyArr:[],csvHeadArr:[],colors:[]};
		$("#thShow li .checkBox").each(function(){
			if(this.checked){
				downLoadTdata.csvHeadArr.push($(this).parent().text());
			}
		});
		$("#tableB tr").each(function(){
			var tmpArr = new Array();
			$(this).find("td").each(function(){
				if($(this).data("val")=="无记录"){
					tmpArr.push('');
				}else{
					tmpArr.push($(this).data("val") + '');
				}
				
			});
			$(this).find("span").each(function(){
				if($(this).data("val")!="无记录"){
					downLoadTdata.colors.push({name:$(this).data("node") + '',color:$(this)[0].style.backgroundColor});
				}
			});
			downLoadTdata.csvBodyArr.push(tmpArr);
		});
	});
	//返回图
	$("#backToG").click(function(){
		$("#toTable").data("status",0);
		$("#graphToTable").hide();
		$("#cateCon").show();
		$("#resultCon2").show();
		resize();
	});
	
	/*下载*/
	$("#download").click(function(){
		closeMenuAndFunc();
		if(isIE() || (navigator.userAgent.toLowerCase().indexOf("safari") > -1 && navigator.userAgent.toLowerCase().indexOf("chrome")<0)){
			  alert("该功能不兼容IE10以下和Safari浏览器");
			  return;
		}
		
		var data = graph.getNodeArr();
		var csvContent = "";
		var csvArr = new Array();
		for(var i=0;i<data.length;i++){
			if(data[i].type=="C"){
				csvArr.push('"'+data[i].name +'"');	
			}
		}
		csvContent = csvArr.join("\r\n");
		downloadFile("报案号.csv",csvContent); 
	});
	
	/*信息切换*/
	$("#cateCon .divc").click(function(){
		$("#cateCon").find(".divc").removeClass("cateConHover");
		$(this).addClass("cateConHover");
		var targetHead = $(this).data("target");
		$(".resultHead").hide();
		$("#"+targetHead).show();
	});
	
	/*根据窗口大小调整页面*/
	resize();
	$(window).resize(function(){
		resize();
	});
	function resize(){
		//获取窗口高度
		var windowheight=$(window).height();
		var windowwidth=$(window).width();
		var searchCon = windowheight-40-146;
		$(".searchCon").css("height",windowheight-40);
		$(".resultCon").css("height",windowheight-40);
		if($(".fullScreen-btn").data("isfull")==1){
			$("#draw").css("height",windowheight);
		}else if($("#toggle").data("enable")==1){
			$("#draw").css("height",windowheight-40-150);	
		}else{
			$("#draw").css("height",windowheight-40);
		}
		$(".infoList").css("height",windowheight-40-87-9);
		$('#infoList').perfectScrollbar("update");
		$(".cateCon").css("height",windowheight-40);
		graph.resize($("#draw").width(),$("#draw").height());
		//图转表表格
		$("#tableDiv").css("height",windowheight-82+"px");
		$("#tableCon").css("height",windowheight-92+"px");
		$("#tableB").css("height",windowheight-132+"px");
		$("#tableDiv").perfectScrollbar('update');
		$("#tableB").perfectScrollbar('update');
		$("#detailC").perfectScrollbar("update");
		//串案、个案
		$(".tanchuxuanze").css("height",windowheight*0.5);
		$(".tanchuxuanze").css("width",windowwidth*0.5);
		$(".tanchuxuanze").css("margin",windowheight*0.275+" auto");
		$("#caseTypeTab").css("height",windowheight*0.45);
		$("#caseTypeTab").css("width",windowwidth*0.5);
		$("#caseTypeTab").perfectScrollbar('update');
	}
	//清除之前的请求
	function delRequest(){
		for(var i=0;i<request.length;i++){
			request[i].abort();
		}
		graph.clearXHRPool();
	}
	
	//获取列表数据
	var typeAjax = null;
	function getList(page,model,rule){
		if(model==undefined || model==null ||rule==undefined || rule==null){
			return;
		}
		delRequest();
		request.push($.ajax({
			type:"POST",
			url:urlPath+"/sysTaskPlus/ajaxPagePlus.do",
			data:{currentPage:page,limit:pageNum,status:$("#isDo .active").data("read"),model:model,rule:rule},
			success:function(result){
				if(result.status!=undefined){
					alert(result.mess);
				}else{
					graphData = result.dataList;
					graph.para.specialModelData=result.dataList;
					var json = {data:[]};
					for(var i=0;i<result.dataList.length;i++){
						json.data.push({groupId:result.dataList[i].groupId,model:result.dataList[i].model,rule:result.dataList[i].rule,cases:[]});	
						for(var j=0;j<result.dataList[i].cases.length;j++){
							json.data[i].cases.push({index:((page-1)*pageNum+(1+i)),name:"C"+((page-1)*pageNum+(1+i)),desc:result.dataList[i].cases[j].caseId,status:result.dataList[i].cases[j].status,model:result.dataList[i].cases[j].model,rule:result.dataList[i].cases[j].rule});
						}
					}
					//console.log(json);
					var ht =baidu.template("List22_template",json);
					$("#infoListUl").html(ht);
					$('#infoList').perfectScrollbar("update");
					var data = {
						totalNum:result.rowCount,
						currentPage:result.currentPage
					}
					curPage = result.currentPage;
					initPageWidget(data);// 更新分页	
				}
			},
			error:function(XMLHttpRequest, textStatus, errorThrown){
				//console.log([XMLHttpRequest, textStatus, errorThrown]);
				var status = ["abort","error"];
				if(status.indexOf(textStatus)<0){
					alert("查询失败！");
				}
			}
		}));
	}
	
	$("#infoListUl").delegate("tr.click","click",function(){
		//判断是否忽略图中已有的修改
		if(graph.isModify()){
			if(confirm("是否忽略已有的修改！")){
				graph.para.operateIndex=-1;
				graph.para.operateList.splice(0,graph.para.operateList.length);
				graph.para.cancelList.splice(0,graph.para.cancelList.length);
				graph.para.addIndex=0;
			}else{
				return;
			}
		}
		//恢复自定义按钮
		$("#custom").data("type","origin").attr("title","自定义数据");
		$("#custom i").removeClass("tool-toOrigin").addClass("tool-toCustom");
		graph.para.isCustom = false;
		
		//恢复时间过滤和抖动
		if($("#timeFilter").data("enable")==1){
			$("#timeFilter").click();
		}
		resetTimeFilter();
		if($("#extendMode").data("mode")==1){
			$("#extendMode").click();
		}
		
		//初始化筛选框
		resetFilter();
		
		graph.clearXHRPool();//清除连接
		//拼案件
		var casesForGraph = [];
		//var caseName = $(this).find(".markBg").data("caseid");
		var groupId = $(this).data("groupid");
		for(var i=0;i<graphData.length;i++){
			if(graphData[i].groupId==groupId){
				for(var j=0;j<graphData[i].cases.length;j++){
					casesForGraph.push(graphData[i].cases[j].caseId);
				}
			}
		}
		var caseName = casesForGraph.join(",");
		//console.log(caseName);
		
		var data = clone(graphData[$(this).data("index")]);
		var that =this;
		if(data.links == undefined){
			delRequest();
			request.push($.ajax({
				type:"POST",
				//url:urlPath+"/graph/checkedGraph.do",
				url:urlPath+"/graph/showGraph.do",
				data:{entityName:caseName,level:1},
				success:function(result){
					if(typeof(result)=="string"){
						result=JSON.parse(result);
					}
					if(result.status!=undefined){
						alert(result.mess);
						data.nodes = [];
						data.links = [];
					}else{
						graph.para.authority = result.authority;//判断是否有权限
						graph.para.website = null;  //判断是欺诈检测、专项模型还是查询
						//graph.para.menuShow = result.limitShow;   //右击节点时判断菜单是否显示
						graph.para.renInjured = true;   //人伤时，一次展开不画图,2018-03-19

						for(var k=0;k<result.nodes.length;k++){
							if(casesForGraph.indexOf(result.nodes[k].name)>=0){
								result.nodes[k].searchCase = true;
							}
						}
					
						graphData[$(that).data("index")].nodes = result.nodes;
						graphData[$(that).data("index")].links = result.links;
						data = clone(graphData[$(that).data("index")]);
													
						function mergeDate(oldData,newData){
							var oldNodeIds = graph.getAllNodeIds(oldData.nodes);
							var oldLinkIds = graph.getAllLinkIds(oldData.links);
							var newNodesId = [], newLinksId = [];
							for(var i=0;i<newData.nodes.length;i++){
								if(oldNodeIds.indexOf(newData.nodes[i].id)<0 && newNodesId.indexOf(newData.nodes[i].id)<0){
									oldData.nodes.push(newData.nodes[i]);
									newNodesId.push(newData.nodes[i].id);
								}
							}
							for(var i=0;i<newData.links.length;i++){
								if(oldLinkIds.indexOf(newData.links[i].id)<0 && newLinksId.indexOf(newData.links[i].id)<0){
									oldData.links.push(newData.links[i]);
									newLinksId.push(newData.links[i].id);
								}
							}
							return oldData;
						}
					}
					finshDraw(data);
				},
				error:function(XMLHttpRequest, textStatus, errorThrown){
					//console.log([XMLHttpRequest, textStatus, errorThrown]);
					var status = ["abort","error"];
					if(status.indexOf(textStatus)<0){
						alert("查询失败！");
						finshDraw(data);
					}
				}
			}));
		}else{
			finshDraw(data);			
		}

		function finshDraw(data){
			graph.clearFunc();
			graph.clear();
			data = graph.filterLinks(data);
			graph.preProcess(data,"1");
			graph.timeFilter();
			defaultF();//默认隐藏
			
			/*//页面中存在的节点,2018-03-19
			graph.clearSelect();
			for(var i=0;i<data.nodes.length;i++){
				if(data.nodes[i].type=="P" || data.nodes[i].type=="T" || data.nodes[i].type=="V"){
					graph.para.nodeSelect.ids.push(data.nodes[i].id);
				}
			}
			graph.updateData(data);
			graph.extendNodes();//二次扩展*/

 			graph.updateData(data);
			$(".toggle").show();
			$("#cateCon ul").show();
			$(".hoverFunc2 #ruleLevel1 [data-id='close']").click();
			
			$("#infoListUl tr").removeClass("h");
			$(that).addClass("h");
			
			$("#resultHead").html("");
			$("#tableForlink").html("");
			$("#backToG").click();
		}
	});
	//二次展开显示加载标志，2018-03-20
	_.MessageManager.on("extendLoading",function(){
		$("#extendLoad").css("display","flex");
	});
	_.MessageManager.on("extendfinish",function(){//隐藏
		$("#extendLoad").css("display","none");
	});

	/**/
	$(".control-btn").click(function(){
		var func = $(this).data("func");
		if(func == "recover"){
			graph.clearFunc();
		}else if(func == "delete"){
			graph.preDeleteNodes();
		}else if(func == "extend"){
			graph.extendNodes();
		}
	})
	
	/*限制字符串长度*/
	function stringLimit(item,maxLength,limitLength){
		if(item.length<maxLength){
			return item;
		}else{
			return item.substring(0,limitLength)+"...";
		}
	}
	
	function clone(obj){
		var o,i,j,k;
		if(typeof(obj)!="object" || obj===null)return obj;
		if(obj instanceof(Array))
		{
			o=[];
			i=0;j=obj.length;
			for(;i<j;i++)
			{
				if(typeof(obj[i])=="object" && obj[i]!=null)
				{
					o[i]=arguments.callee(obj[i]);
				}
				else
				{
					o[i]=obj[i];
				}
			}
		}
		else
		{
			o={};
			for(i in obj)
			{
				if(typeof(obj[i])=="object" && obj[i]!=null)
				{
					o[i]=arguments.callee(obj[i]);
				}
				else
				{
					o[i]=obj[i];
				}
			}
		}
		return o;
	};
	
	/*收缩页面*/
	$("#toggle").click(function(){
		closeMenuAndFunc();
		if($("#search-Btn").data("search")==0 || $(".fullScreen-btn").data("isfull")==1){
			return;
		} 
		if($(this).data("enable")==1){	
			change({num:0},function(data){
				var height=$(window).height();	
				$("#resultHeadPar").css({"z-index":"-1"}).css("margin-top",-1*data*150);
				$("#draw").height(height-40-150+data*150);
				graph.resize($("#draw").width(),$("#draw").height());
				
				if(data==1){
					$("#resultHeadPar").hide();
					return;
				}
			},375);
			setTimeout(function(){
				change({num:0},function(data){
					$("#cateCon").css({"z-index":"-1"}).css("left",255-data*102);
					$("#resultCon2").css("margin-left",255+102-data*102);
					graph.resize($("#draw").width(),$("#draw").height());
				},375);
			},375)
			$("#cateCon").hide(375);//2018-02-05写
			$(this).data("enable",0);
		}else{
			change({num:0},function(data){
				$("#cateCon").show(); //2018-02-05写
				$("#cateCon").css("left",153+data*102);
				$("#resultCon2").css("margin-left",255+data*102);
				graph.resize($("#draw").width(),$("#draw").height());
				if(data==1){
					$("#cateCon").css({"z-index":"1"})
					return;
				}
			},375);
			setTimeout(function(){
				change({num:0},function(data){
					var height=$(window).height();
					$("#resultHeadPar").show().css("margin-top",data*150-150).css("opacity","0");
					$("#draw").height(height-40-data*150);
					graph.resize($("#draw").width(),$("#draw").height());
					if(data==1){
						$("#resultHeadPar").css({"z-index":"1"});
						$("#resultHeadPar").css("opacity","1");
						return;
					}
				},375);
			},375)
			$(this).data("enable",1);
		}		
	});	
	
	//使用tween.js产生0到1连续变化的小数，用来实现动画效果
	function change(data,callBack,time){
		init();
		animate();
		function init() {
			var tween = new TWEEN.Tween( data )
				.to( { num : 1}, time )
				.onUpdate( function () {
					
				} )
				.start();
		}
		function animate( time ) {				
			callBack(data.num)
			if(data.num==1){
				return;
			}
			requestAnimationFrame( animate );
			TWEEN.update( time );
		}
	}
	
	/*全屏*/
	$(".fullScreen-btn").click(function(){
		closeMenuAndFunc();
		if($("#search-Btn").data("search")==0){
			return;
		}
		if($(this).data("isfull")==0){
			//全屏
			$(this).data("height",$("#draw").height());
			$("#draw").css("height",$(window).height());
			$("#cateCon").css("z-index","0");
			$("#resultHeadPar").css("z-index","0");
			$(".result").css("background-image","url('"+urlPath+"/images/indexNew/bg.jpg')");
			$(".result").css("background-repeat","no-repeat");
			$(".result").css("background-size","100% 100%");
			$(".result").css({  
				 position:"absolute",
			     top:"0px",
			     left:"0px",
				 height: function () {           
			         return $(window).height();       
			     },          
			     width:"100%"        
			 });  
			$(this).data("isfull",1);
			$(this).find("i").removeClass("tool-max").addClass("tool-min");
			graph.resize($("#draw").width(),$("#draw").height());
			$("#toggle").css({"background-color":"#2B3751"});
		}else{
			//console.log($(".fullScreen-btn").data("height"));
			$("#draw").css("height",$(".fullScreen-btn").data("height"));
			$("#cateCon").css("z-index",$("#toggle").data("enable")==1?1:-1);
			$("resultHeadPar").css("z-index","1")
			$(".result").css("background-image","");
			$(".result").css({  
				 position:"relative",
			     top:"",
			     left:"",
				 height:"",           
			     width:""        
			 }); 
			$(this).data("isfull",0);
			$(this).find("i").removeClass("tool-min").addClass("tool-max");
			graph.resize($("#draw").width(),$("#draw").height());
			$("#toggle").css({"background-color":"#4059b4"});
		}
	});
	
	_.MessageManager.on("clearInfoDetail",function($ev,data){
		$("#resultHead").html("").data("nodeId","");
		$("#relation2 .table").html("").data("nodeId","");
	});
	
	//图中单击查询详情
	var linkInfoAjax = null;
	_.MessageManager.on("infoDetail",function($ev,data){
		//console.log(data);
		if(data.authority==false){
			alert("你没有操作权限！");
			return false;
		}
		var attr = data.links; 
		var linkStr = "";
		var index = 1;
	//	var width = $("body").width()-380;
		
		var width=$("body").width()-380-20;
		//var ratio = [0.05,0.2,0.15,0.15,0.1,0.1,0.25];
		//var th = ["序号","关系","起点","终点","时间","权重","描述"];
		var ratio = [0.05,0.95];
		var th = ["序号","描述"];
		linkStr += '<thead class="fixedThead"><tr>'
		for(var i=0;i<ratio.length;i++){
			linkStr += '<th style="width:'+width*ratio[i]+'px">'+th[i]+'</th>';
		}
		linkStr += '</tr></thead><tbody id="relLinkBody" class="scrollTbody" style="position:relative;height:100px;width:97%;">';
				
		for(var k=0;k<attr.length;k++){
			var oneLink = attr[k];
			for(var i=0;i<oneLink.rel.length;i++){
				var rel = linkNameMap[oneLink.rel[i]] == undefined?oneLink.rel[i]:linkNameMap[oneLink.rel[i]].cnName;
				linkStr += "<tr data-src='"+oneLink.source.id+"' data-tar='"+oneLink.target.id+"' data-linkid='"+oneLink.id+"'><td style='width:"+width*ratio[0]+"px'>"+index+"</td>"
						+  "<td style='width:"+width*ratio[1]+"px;text-align:left;'>"+linkRelToDesc(oneLink.rel[i],oneLink,oneLink.attr[i])+"</td>"
						+"</tr>";
				index++;
			}	
		}
		linkStr += "</tbody>";
		$("#relation2 .table").html(linkStr).data("nodeId",data.nodeInfo.id);
		$("#relLinkBody").perfectScrollbar();
		//实体信息
		var nameMap = nodeParaNameMap[data.nodeInfo.type];
		if(data.nodeInfo.attrs == undefined){
			data.nodeInfo.attrs = new Array();
		}
		if(data.nodeInfo.attrs.length==0){
			delRequest();
			request.push($.ajax({
				type:"POST",
				url:urlPath+"/graph/getNode.do",
				data:{dajaid:(data.nodeInfo.dajaId==undefined?data.nodeInfo.id:data.nodeInfo.dajaId)},
				dataType:"json",
				success:function(node){
					if(node=="fail"){
						node = data.nodeInfo;
					}
					var ht = baidu.template("infoDetail_template",node);
					$("#resultHead").html(ht).data("nodeId",data.nodeInfo.id);
					if(node!="fail"){
						graph.syncNodeAttrs(node);
					}
				},
				error:function(XMLHttpRequest, textStatus, errorThrown){
					//console.log([XMLHttpRequest, textStatus, errorThrown]);
					alert(textStatus);
				}
			}));
		}else{
			for(var i=0;i<data.nodeInfo.attrs.length;i++){
				for(var j=0;j<nameMap.attrs.length;j++){
					if(data.nodeInfo.attrs[i].name==nameMap.attrs[j].name){					
						data.nodeInfo.attrs[i].cnname = nameMap.attrs[j].cnname;
						break;
					}
				}
			}
			var ht = baidu.template("infoDetail_template",data.nodeInfo);
			$("#resultHead").html(ht).data("nodeId",data.nodeInfo.id);
		}
		$("#detailC").perfectScrollbar();
		if(data.isClick){
			$("#cateCon [data-for='entityDetail'] .divc").click();
		}
	});
       
   function refreshCaseList(){
		var data = graph.getNodeArr();
		$(".detailtext ul").html("");
		for(var i=0;i<data.length;i++){
			if(data[i].type=="C"){
				var caseNo = (data[i].name==undefined || data[i].name=="")?"无记录":data[i].name;
				$(".detailtext ul").append("<li data-id='"+data[i].id+"' title='"+data[i].name+"'>"+stringLimit(caseNo,20,18)+"</li>");
			}
		}
		$(".detailtext").perfectScrollbar("update");
	}
	
	_.MessageManager.on("refreshCaseList",function($ev,data){
		//console.log(data);
		refreshCaseList();
	});
	
    /*点击详情按钮*/
    $(".tool-seeCase").click(function(){
		closeMenuAndFunc();
    	if($(".detailtextCon").data("see")==0){
    		$(".detailtextCon").animate({right:"0px"},750);
        	$(".detailtextCon").data("see",1);
        }
    	else{
    		$(".detailtextCon").animate({right:"-186px"},750);
    		$(".detailtextCon").data("see",0);
   		}	
    });
    
	
    $(".detailtext").delegate("ul li","mouseenter",function(){  
		graph.para.graph.select(".nodes").selectAll("image[data-id='mainImg']") //将图片换成普通状态的图片
			 .attr("xlink:href",function(d){  
				return graph.getImage(d.type,0);
			 });
    	graph.hoverNodes([$(this).data("id")+""]);
	}).delegate("ul li","mouseleave",function(){
		graph.para.graph.select(".nodes").selectAll("image[data-id='mainImg']") //将图片换成普通状态的图片
			 .attr("xlink:href",function(d){  
				if( graph.para.nodeSelect.ids.indexOf(d.id)<0){
					return graph.getImage(d.type,0);
				}else{
					return graph.getImage(d.type,1);
				}
			 });
		graph.mouseoutNode();
	}).delegate("ul li","click",function(){  
		var nodeId = $(this).data("id")+"";
		graph.clearSelect();
    	graph.hoverNodes([nodeId]);
		graph.para.nodeSelect.ids.push(nodeId);
		var nodeData;
		graph.para.graph.selectAll(".node").filter(function(d){
			return nodeId == d.id;
		}).each(function(d){
			nodeData = d;
		});
		graph.moveGraph(nodeData,0.5);
		_.MessageManager.fire("getStatic");
		graph.mouseoutNode();
	});
	
	//模型功能点击一级菜单事件
	$("body").delegate("#ruleLevel1 li","click",function(){
		var dataList = $(this).data("data");
		if($(this).data("rule")=="rule1"){
			var ht = baidu.template("hoverRule1_2_template",{list:dataList,id:$(this).data("id"),name:$(this).data("name")});
			$("#detailShow").data("detail",0);
			$(".detailShow").hide();
		}else if($(this).data("rule")=="rule2"){		
			//console.log([dataList]);
			var ht = baidu.template("hoverRule2_2_template",{list:dataList,id:$(this).data("id"),name:$(this).data("name"),rule:$(this).data("rule")});
			$("#detailShow").data("detail",0);
			$(".detailShow").hide();
		}else if($(this).data("rule")=="rule3"){
			var ht = baidu.template("hoverRule3_2_template",{list:dataList,id:$(this).data("id"),name:$(this).data("name"),rule:$(this).data("rule")});
			$("#detailShow").data("detail",0);
			$(".detailShow").hide();
		}else if($(this).data("rule")=="rule4"){
			var ht = baidu.template("hoverRule4_2_template",{list:dataList,id:$(this).data("id"),name:$(this).data("name")});
			$("#detailShow").data("detail",0);
			$(".detailShow").hide();
		}else if($(this).data("rule")=="rule5"){
			hoverLinkNode($(this));
			return;
		}else if($(this).data("rule")=="rule6"){
			hoverLinkNode($(this));			
			return;
		}else if($(this).data("rule")=="loop"){

			if($(this).data("hover")==0){
				graph.cancelHoverFunc();
			
				var nodes = $(this).data("cases").split(";");
				var links = new Array();
				for(var i=0;i<nodes.length;i++){
					for(var j=0;j<nodes.length;j++){
						links.push(nodes[i]+","+nodes[j]);
					}
				}
				//console.log([nodes,links]);
				//graph.hoverLoop(nodes,links);
				graph.hoverFunc(nodes,links);
				
				$("#ruleLevel1 li").data("hover",0).removeClass("ruleSel");
				$("#ruleLevel2 li").data("hover",0).removeClass("ruleSel");
				$(this).data("hover",1).addClass("ruleSel");
			}else{
				graph.cancelHoverFunc();
				$(this).data("hover",0).removeClass("ruleSel");
			}
			
			return;
		}else if($(this).data("rule")=="kyrw"){
			if($(this).data("hover")==0){
				graph.cancelHoverFunc();
			
				var nodes = $(this).data("cases").split(";");
				var links = new Array();
				for(var i=0;i<nodes.length;i++){
					for(var j=0;j<nodes.length;j++){
						links.push(nodes[i]+","+nodes[j]);
					}
				}
				graph.hoverFunc(nodes,links);
				
				$("#ruleLevel1 li").data("hover",0).removeClass("ruleSel");
				$("#ruleLevel2 li").data("hover",0).removeClass("ruleSel");
				$(this).data("hover",1).addClass("ruleSel");
			}else{
				graph.cancelHoverFunc();
				$(this).data("hover",0).removeClass("ruleSel");
			}
			
			return;
		}
		$("#ruleLevel1").hide();
		$("#ruleLevel2").html(ht).show();
		$("#ruleLevel2 ul").perfectScrollbar();
	});

	function hoverLinkNode($pp){
		if($pp.data("hover")==0){			
			graph.cancelHoverFunc();
			var nodes = new Array;
			var links = $pp.data("links").split(";");
			var ids = graph.getAllNodeIds(graph.para.data.nodes);//图中所有的node的id
			for(var i=0;i<links.length;i++){
				var tmp = links[i].split(",");
				for(var j=0;j<tmp.length;j++){
					if(nodes.indexOf(tmp[j])<0 && ids.indexOf(tmp[j])>=0){
						nodes.push(tmp[j]);
					}
				}
			}
			//console.log([nodes,links]);
			//graph.hoverLoop(nodes,links);
			graph.hoverFunc(nodes,links);
			
			$("#ruleLevel1 li").data("hover",0).removeClass("ruleSel");
			$("#ruleLevel2 li").data("hover",0).removeClass("ruleSel");
			$pp.data("hover",1).addClass("ruleSel");
		}else{
			graph.cancelHoverFunc();
			$pp.data("hover",0).removeClass("ruleSel");
		}
	}

	//返回一级功能列表
	$("body").delegate("#ruleLevel2 [data-id='back']","click",function(){
		$("#ruleLevel1").show();
		$("#ruleLevel2").hide();
	});

	//关闭模型功能列表
	$("body").delegate("#ruleLevel1 [data-id='close']","click",function(){
		$(".hoverFunc2").hide();
		graph.cancelHoverFunc();
		$("#detailShow").data("detail",0);
		$(".detailShow").hide();
	});

	$("body").delegate("#ruleLevel2 li","click",function(){
		hoverLinkNode($(this));
	});

	$("body").delegate("#ruleLevel2","mouseenter",function(){
		var $that = $(this).find("ul");
		if($that.data("type")=="extend"){
			var isRun = $that.data("isrun");
			if(isRun == 0){
				$that.data("isrun",1);
				$("body #ruleLevel2 p").animate({width:"550px"},1000);	
				$("body #ruleLevel2 li").animate({width:"550px"},1000,function(){
					$that.data("isrun",0);
				});
			}
		}
	}).delegate("#ruleLevel2","mouseleave",function(){
		var $that = $(this).find("ul");
		if($that.data("type")=="extend"){
			$("body #ruleLevel2 P").animate({width:"200px"},500);
			$("body #ruleLevel2 li").animate({width:"200px"},500);
		}
	});
	//模型详情显示功能
	//var infoInterval = null;
	$("body").delegate("#ruleLevel1 [data-detail]","mouseleave",function(){
		$(".detailShow").hide();
	});
	$("body").delegate("#ruleLevel1 [data-detail]","mouseenter",function(){
		var name = $(this).data("name");
		if(name=="rule1"){
			$(".detailShow").html('同一“车架号”号码车辆一个“出险年度”内有*次以上的报案且报案人或驾驶员不是同一个人的案件'
			);
		}else if(name=="rule2"){
			$(".detailShow").html(			'同一“出险地点”多次报案，“出险时驾驶员”、“报案人”或“报案电话”、“牌照号码”、“估损单维修厂名称”均相同*次以上的案件清单；或“牌照号码”不同，但“出险时驾驶员”、“报案人”或“报案电话有一相同*次以上的案件'
			);
		}else if(name=="rule3"){
			$(".detailShow").html('同一“估损单维修厂名称”，“出险时驾驶员”、“报案人”、“报案电话”、“出险地点”或“牌照号码”有一相同*次以上的案件'
			);
		}else if(name=="rule4"){
			$(".detailShow").html(
			'保单起期后*天内出险的案件及保单到期前*天内出险的案件'
			);
		}else if(name=="rule5"){
			$(".detailShow").html(
			'同一车辆作为三者出险*次以上'
			);
		}else if(name=="kyrw"){
			$(".detailShow").html(
			'同一个人在不同的案件中以不同的身份出现'
			);
		}else{
			$(".detailShow").html(
			'同一报案电话不同车辆报案*次以上或在不同承保公司案件中报案*次以上'
			);
		}
		$(".detailShow").show();
	});
	
	//模型功能一级列表
	_.MessageManager.on("hoverList2",function($ev,data){
		if(data.rule=="rule1"){
			var ht = baidu.template("hoverRule1_template",data);
			$("#ruleLevel1").html(ht);
			$("#ruleLevel1 li").each(function(i){
				$(this).data("data",data.list[i].Data);
			});
		}else if(data.rule=="rule2"){
			var ht = baidu.template("hoverRule2_template",data);
			$("#ruleLevel1").html(ht);
			$("#ruleLevel1 li").each(function(i){
				var prop = $(this).data("id");
				var index = $(this).data("index");
				//console.log(data.list[prop][index])
				$(this).data("data",data.list[prop][index]);
			});
		}else if(data.rule=="rule3"){
			var ht = baidu.template("hoverRule3_template",data);
			$("#ruleLevel1").html(ht);
			$("#ruleLevel1 li").each(function(i){
				$(this).data("data",data.list[i].data);
			});
		}else if(data.rule=="rule4"){
			var ht = baidu.template("hoverRule4_template",data);	
			$("#ruleLevel1").html(ht);
			$("#ruleLevel1 li").each(function(){
				$(this).data("data",data.list[$(this).data("id")]);
			});
		}else if(data.rule=="rule5"){
			var ht = baidu.template("hoverRule5_template",data);
			$("#ruleLevel1").html(ht);
			$("#ruleLevel1 li").each(function(i){
				$(this).data("data",data.list[i]);
			});
			
		}else if(data.rule=="loop"){
			//console.log(data);
			var ht = baidu.template("hoverLoop_template",data);
			$("#ruleLevel1").html(ht);
		}else if(data.rule=="rule6"){
			var ht = baidu.template("hoverRule6_template",data);
			$("#ruleLevel1").html(ht);
		}else if(data.rule=="kyrw"){
			var ht = baidu.template("hoverRule7_template",data);
			$("#ruleLevel1").html(ht);
		}
		$(".hoverFunc2").show();
		$("#ruleLevel1").show();
		$("#ruleLevel2").hide();
		$("#ruleLevel1 ul").perfectScrollbar();
	});
	
	$("#tableForlink").delegate("tbody tr","mouseenter",function(){
		var src = $(this).data("src")+"";
		var tar = $(this).data("tar")+"";
		var linkId = $(this).data("linkid");
		graph.hightLightNL([src,tar],[linkId]);
	}).delegate("tbody tr","mouseleave",function(){
		graph.mouseoutNode();
	});
	
	//选项卡
	$("#resultHead3").delegate(".options span","click",function(){
        $(this).addClass("active1").siblings().removeClass("active1");
        $(".optFor").hide();
		$("#"+$(this).data("tar")).show();
	});	

	_.MessageManager.on("fastTable",function(){
		if($("#toTable").data("status")==0){
			$("#toTable").click();
		}else{
			$("#backToG").click();
		}
	});
	
	//标记点事件	
	$("#infoListUl").delegate(".markBg","click",function(e){
	    e.stopPropagation();
	    var groupId=$(this).data("id");
	    var ruleId=$(this).data("ruleid");
	    var modelId=$(this).data("modelid");
	    var thisGroupCase=markDealgroup(groupId);//该组中的报案号
	    var picMarkorGroupCase=picMarkDealCase(thisGroupCase);//图中与该组中相同报案号
	    if(picMarkorGroupCase.length<1){
	    	alert("该数据在图中未被标注！");
	    	return;
	    }
		if($(this).find("span").data("status")+""=="0"){
			if(confirm("确定标注为已处理？")){
				$.ajax({
					type:"POST",
					url:urlPath+"/sysTaskPlus/dealTaskPlus.do",
					data:{groupId:groupId,modelId:modelId,ruleId:ruleId},  //以前是caseid，现在是groupId
					dataType:"json",
					success:function(result){
						if(result=="succ"){
							//$(this).find("span").data("status","1").html("已处理");
							//getList(curPage,curType);
							var ruleId2=null,modelId2=null;
							if($("#selected2").val()!=""){
								ruleId2=ruleId;
	    						modelId2=modelId;
	    	 			    }
							getList(curPage,modelId2,ruleId2);
							alert("处理成功！");
						}else{
							alert("处理失败！");
						}
					},
					error:function(){
						alert("处理失败！");
					}
				});
			}	
		}
	});
	/*
	*函数
	*功能：点击待处理时，根据组号找到该组所有报案号
	*时间：2018-03-19
	*/
	function markDealgroup(groupId){
		//获取该组的报案号
		var thisGroupCase=[];
		for(var i=0;i<graph.para.specialModelData.length;i++){
			var item=graph.para.specialModelData[i];
			if(item.groupId==groupId){
				for(var k=0;k<item.cases.length;k++){
					thisGroupCase.push(item.cases[k].caseId);
				}
			}
		}
		return thisGroupCase;
	}
	/*
	*函数
	*功能：点击待处理时，找出图中标注案件号并判断在该组报案号中存在的案件
	*时间：2018-03-19
	*/
	function picMarkDealCase(thisGroupCase){
		//找出图中被标注的报案号
		var picCases=[];
		graph.para.graph.selectAll(".node").each(function(d){
			if(d.type=="C"){
				if(d.markStatus=="10" || d.markStatus=="11" || d.markStatus=="12"){
					if(thisGroupCase.indexOf(d.name)>=0){
						picCases.push(d.name);
					}
				}
								
			}			
		});
		return picCases;
	}
	/*已读和未读的信息切换*/
	$("#isDo li").click(function(){
		if(!$(this).hasClass("active")){
			curPage = 1;
			$("#isDo").children().removeClass("active");
			$(this).addClass("active");
			getList(curPage,modelId,ruleId);
			//getList(curPage,curType);
		}
/*		//判断已读或未读，并让导入按钮是否显示
		if($(this).data("read")==1){
			$(".exportData_btn").hide();
		}else{
			$(".exportData_btn").show();
		}*/
	});
	
	/*var arr=[
		{"name":"同地多案","type":"t1"}, //1
		{"name":"同号多案","type":"t2"}, //2
		{"name":"同车多案","type":"t5"}, //4
		{"name":"可疑时间","type":"t3"}, //8
		{"name":"可疑三者","type":"t4"}, //16
		{"name":"复杂串联案件","type":"t6"} //32
	];
	function isType(val,n){
		var re='',num='',result='',len='',jsonClass={typeClass:[]};
		num = val.toString(2);
		len = num.length;
		if(len!=n){
			switch(len){
				case len: 
				for(var i=0;i<n-len;i++){
					re+='0';
				}
			}
		}
		result=re+num;
		for(var i=0;i<result.length;i++){
			if(result[i]==1){
				jsonClass.typeClass.push({"name":arr[n-i-1].name,"type":arr[n-i-1].type});
			}
		}
		return jsonClass.typeClass;
	}*/
	
	/*//鼠标移上显示
	$("#typeSelect li").mouseover(function(){
		var js=[
			{
			"name":"同车多案","explain":"同一“车架号”号码车辆一个“出险年度”内有*次以上的报案且报案人或驾驶员不是同一个人的案件"},
			{"name":"同地多案","explain":"同一“出险地点”多次报案，“出险时驾驶员”、“报案人”或“报案电话”、“牌照号码”、“估损单维修厂名称”均相同*次以上的案件清单；或“牌照号码”不同，但“出险时驾驶员”、“报案人”或“报案电话有一相同*次以上的案件"},
			{"name":"同号多案","explain":"同一报案电话不同车辆报案*次以上或在不同承保公司案件中报案*次以上"},
			{"name":"可疑时间","explain":"保单起期后*天内出险的案件及保单到期前*天内出险的案件"},
			{"name":"可疑三者","explain":"同一车辆作为三者出险*次以上"}
		];
		for(var i=0;i<js.length;i++){
			if($(this).text() == js[i].name){
				var str='<div class="showCon" id="typeExplain">'+js[i].explain+'</div>'
				$(this).append(str);
			}
		}		
	}).mouseout(function(){
		$("#typeExplain").remove();
	});	
	//列表中鼠标移上显示
	$("body").delegate("#infoListUl tr td.mytype .type","mouseenter",function(){
		var type = $(this).data("type");
		var js=[
			{
			"name":"同车多案","type":"t5","explain":"同一“车架号”号码车辆一个“出险年度”内有*次以上的报案且报案人或驾驶员不是同一个人的案件"},
			{"name":"同地多案","type":"t1","explain":"同一“出险地点”多次报案，“出险时驾驶员”、“报案人”或“报案电话”、“牌照号码”、“估损单维修厂名称”均相同*次以上的案件清单；或“牌照号码”不同，但“出险时驾驶员”、“报案人”或“报案电话有一相同*次以上的案件"},
			{"name":"同号多案","type":"t2","explain":"同一报案电话不同车辆报案*次以上或在不同承保公司案件中报案*次以上"},
			{"name":"可疑时间","type":"t3","explain":"保单起期后*天内出险的案件及保单到期前*天内出险的案件"},
			{"name":"可疑三者","type":"t4","explain":"同一车辆作为三者出险*次以上"}
		];
		for(var i=0;i<js.length;i++){
			if(type == js[i].type){
				$(this).attr("title",js[i].explain);
			}
		}		
	}).delegate("#infoListUl tr td.mytype .type","mouseleave",function(){
		$(this).attr("title","");
	});		
*/
   //框选标注
	_.MessageManager.on("SymMarkStatus",function($ev,data){
		var index = $("#infoListUl tr.h").data("index");
		var nodes = graphData[index].nodes;
		for(var i=0;i<nodes.length;i++){
			if(nodes[i].id==data.id){
				nodes[i].markStatus = data.type;
				nodes[i].markMess = data.content;
				break;
			}
		}
	});	

	//表头可筛选
	$(".thSelect").delegate("#thCanSelect","click",function(){
		var isShowTh=$(this).data("thshow");
		$(this).data("thshow",!isShowTh);
		if(!isShowTh){
			$(".showDiv").css("display","block");
		}else{
			$(".showDiv").css("display","none");
		}		
	});

	//专项模型
	/*var result={"datalist": [
                {"p": "人伤","id":"1","c": [{"n": "同一电话报案2次及以上人伤案件"}, {"n": "同一伤者在不同案件中出现"}, {"n": "同一车辆出险次数3次以上的人伤案件"},{"n": "三者2同一车辆出险次数3次以上的人伤案件"}]},
                {"p": "人伤2","id":"2", "c": [{"n": "三者2"}, {"n": "电话2"}, {"n": "保单2"}]},
                {"p": "人伤3","id":"3", "c": [{"n": "三者3"}, {"n": "电话3"}, {"n": "保单3"}]}
            ]};*/

   /* var result={"datalist":${datalist}};//获取专项模型数据
    var _ht='';
    for(var i=0;i<result.datalist.length;i++){
    	_ht += '<option data-modelid="'+result.datalist[i].id+'">'+result.datalist[i].p+'</option>';
    }	
 	$("#model_sel .prov").html(_ht);
 	$("#model_sel .prov").bind("change",function(){
		$("#selected2").val('');
 		$("#selected2").attr("title",'');
 		modelId=$(this).find("option:selected").data("modelid");
 		ruleId='';
 		curPage=1;
 		//模型改变时请求数据
 		getList(curPage,modelId,ruleId);
	})
 	//二级弹框选择
 	$("#selected2").click(function(){
 		var this_val=$(this).val();
 		var select_val = $("#model_sel .prov").find("option:selected").val();
 		for(var i=0;i<result.datalist.length;i++){
 			if(result.datalist[i].p==select_val){
 				var data={"title":select_val,"subList":result.datalist[i].c,"subSel_val":this_val};
 				var ht=baidu.template("dialog_template",{subList:data});
 				$("#dialog_model").html(ht);
 				$("#dialog_model").css("display","");
 			}	
 		}	
 	});*/
	/*var result={"dataList":[{"id":1,"name":"同一电话报案2次及以上人伤案件"},
		{"id":2,"name":"同一伤者在不同案件中出现"},
		{"id":3,"name": "同一车辆出险次数3次以上的人伤案件"},
		{"id":4,"name": "三者2同一车辆出险次数3次以上的人伤案件"}]};*/
	var datalist={"datalist":${datalist}};//获取专项模型数据
	//datalist.datalist.push({"data":[{"modelName":"机器学习","modelId":3,"ruleName":"机器学习","ruleId":1,"desc":"机器学习"}]});
	var data_list=[];
	for(var i=0;i<datalist.datalist.length;i++){
		var sub=datalist.datalist[i].data;
		for(var k=0;k<sub.length;k++){
			data_list.push(sub[k]);
		}		
	}
	var isHide=true;
	$("#selected2").click(function(e){
		e.stopPropagation();
		if(isHide){
			var this_val=$(this).val();
			//处理数据的过程
			var menu_sub=[];
			var modl=[];
			for(var i=0;i<data_list.length;i++){
				var item=data_list[i];

				if(item.modelId=="1" ){
					if(modl.indexOf(item.modelId)<0){
						menu_sub.push({modelId:1,modelName:"人伤模型",rule:[]});
					}
					menu_sub[0].rule.push(item);
				}else if(item.modelId=="2"){
					if(modl.indexOf(item.modelId)<0){
						menu_sub.push({modelId:2,modelName:"天眼",rule:[]});
					}
					menu_sub[1].rule.push(item);
				}else if(item.modelId=="3"){
					if(modl.indexOf(item.modelId)<0){
						menu_sub.push({modelId:3,modelName:"机器学习",rule:[]});
					}
					menu_sub[2].rule.push(item);
				}else{
					if(modl.indexOf(item.modelId)<0){
						menu_sub.push({modelId:4,modelName:"其他",rule:[]});
					}
					menu_sub[3].rule.push(item);
				}
				if(modl.indexOf(item.modelId)<0){
					modl.push(item.modelId);
				}
			}
	 		var data={"subList":data_list,"menu_sub":menu_sub,"subSel_val":this_val};
			//var ht=baidu.template("dialog_template",{subList:data});
			//$("#dialog_model").html(ht);
			var ht=baidu.template("select_template",{subList:data});
			$("#clickShow").html(ht);
			$("#dialog_con").perfectScrollbar();
			$("#dialog_con").perfectScrollbar('update');
			$("#clickShow").css("display","");
			//$("#dialog_model").css("display","");
			isHide=false;		
		}else{
			$("#clickShow").css("display","none");
			isHide=true;
		}
 		
 	});	
 	//$("#dialog_model").delegate(".confirm_btn","click",function(){
 	$("#clickShow").delegate("#dialog_con .sub_menu li","click",function(){
 		var val=null;
 		/*$("#dialog_con li input").each(function(){
 			if(this.checked){
 				val=this.nextSibling.innerHTML;
 				modelId=$(this).data("modelid");
 				ruleId=$(this).data("ruleid");
 				curPage=1;
 			}
 		})*/
 		val=$(this).text();
		modelId=$(this).data("modelid");
		ruleId=$(this).data("ruleid");
		//判断是否是同一电话规则，2018-04-23
		if(modelId=="1" && ruleId=="1"){
			graph.para.ruleTel=true;
		}else{
			graph.para.ruleTel=false;
		}

		curPage=1;
 		$("#selected2").val(val);
 		$("#selected2").attr("title",val);
 		$("#clickShow").css("display","none");
 		isHide=true;
 		//模型中规则改变时请求数据
 		getList(curPage,modelId,ruleId);
 	})	
 	$("#dialog_model").delegate(".delete_btn","click",function(){
 		$("#dialog_model").css("display","none");
 	});
 	//规则搜索
 	$("#clickShow").delegate("#ruleSearch","click",function(e){
 		e.stopPropagation();//阻止其他事件冒泡

 	});
 	$("#clickShow").delegate("#ruleSearch","keyup",function(){
 		var obj=$(this).val();
 		if(obj.trim()!=""){
			//请求数据
			$.ajax({
				type:"POST",
				url:urlPath+"/sysTaskPlus/searchRule.do",
				data:{keywords:obj},
				success:function(result){
					$(".newUl").html("");
					if(typeof(result)=="string"){
						var result=JSON.parse(result); //字符串转json
					}
					var ht=baidu.template("keyup_template",{subList:result.datalist});
					$("#dialog_con").html(ht);
					$("#dialog_con").perfectScrollbar();
					$("#dialog_con").perfectScrollbar('update');
					$("#clickShow").css("display","");
				},
				error:function(){

				}
			});	
		}else{
			//$("#clickShow").css("display","none");
		}

 	});
 	//鼠标点击其他地方可隐藏
 	$("body").bind("click",function(){
 		$("#clickShow").hide();
 		isHide=true;
 	});

})();
</script>
<script src="${ctx}/js/lib/jquery.ajaxfileupload.js"></script>
<script>
//导入数据
/*$(function(){
	//导入数据模板下载
	$("#importModelBtn").click(function(){
		window.location.href="${ctx}/sysTaskPlus/downloadForSpecial.do";
	});
	//导入数据
	$("#importBtn").click(function(){
		$("#importBtnCon").click();
	})
	$("#importBtnCon").ajaxfileupload({
	    action: 'url',
	    valid_extensions : ['xls','xlsx'],
	    params: {
			extra: 'markFile'
	    },				
	    onComplete: function(data,a,b,c) {
			if(data.status=="err"){
				alert(data.mess);
				$("#importBtn").text("导入");
				return;
			}else{
				alert(data.mess);
				$("#importBtn").text("导入");
			}
			var result=data;

			console.log(data);
			//alert(JSON.stringify(data));
	    },
	    onStart: function() {
			$("#importBtn").text("正在导入...");
			$("#importBtn").attr("title","正在导入...");
			//if(weWantedTo) return false; // cancels upload
	    },
	    onCancel: function() {
			console.log('no file selected');
	    },
		errow:function(data){
			alert("上传失败");
		}
	});

});*/
</script>
</body>
</html>
