<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ include file="/include/taglib.jsp" %>
<!DOCTYPE html>
<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="stylesheet" type="text/css" href="../compass/app/js/jquery-ui/bootstrap.min.css"/>
    <link rel="shortcut icon" href="../images/favicon.ico">
    <link rel="stylesheet" type="text/css" href="../cssGraph/base.css"/>
    <link rel="stylesheet" type="text/css" href="../cssGraph/indexNew/all.css"/>
    <link rel="stylesheet" type="text/css" href="../cssGraph/indexNew/perfect-scrollbar.css"/>
    <link rel="stylesheet" type="text/css" href="../cssGraph/indexNew/jquery-confirm.css"/>
    <link rel="stylesheet" type="text/css" href="../cssGraph/indexNew/jquery-ui.min.css"/>
    <link rel="stylesheet" type="text/css" href="../cssGraph/indexNew/classic.css">
    <link rel="stylesheet" type="text/css" href="../cssGraph/newCss/top.css">

    <link rel="stylesheet" type="text/css" href="../cssGraph/newCss/TableIndex2.css">
    <title>寿险反欺诈</title>
    <style>
        #footer {
            bottom: 5px;
            left: 50%;
            margin-left: -162.5px;
            opacity: 0.6;
            position: absolute;
            z-index: 3001;
        }

        .searchType li {
            cursor: pointer;
            float: left;
            height: 22px;
            padding: 1px 10px;
            text-align: center;
            /*width: 44px;*/
            line-height: 22px;
        }

        .yincang {
            background-color: #404cb8;
            background-position: 4px -256px;
        }

        .hoverIcon {
            background-image: url("../images/hoverIcon.png");
            background-repeat: no-repeat;
            display: inline-block;
            height: 25px;
            position: absolute;
            right: 50px;
            top: 20px;
            width: 25px;
        }

        .cateCon {
            position: absolute;
            top: 40px;
            left: 255px;
        }

        .dataSource ul li {
            padding-top: 5px;
            color: rgb(221, 221, 221);
            cursor: default;
        }

        .dataSource ul li:nth-child(2n) {
            background-color: rgb(44, 49, 70);
        }

        .dataSource ul li:hover {
            background-color: #444A65;
        }

        /*表头可选*/
        .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;
        }

        /*表中的报案号*/
        .nodesId {
            cursor: pointer;
        }

        #case_type td, #case_type th {
            padding: 5px 10px;
            border: 1px solid #0e635f;
        }

        /*按钮样式,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;
        }

        /*加入打假减损金额后，新加样式,2018-02-05*/
        .backg .optFor textarea {
            height: 160px;
        }

        span.djMoney {
            padding: 10px;
        }

        .djMoney input {
            border: none;
            padding: 5px;
            border-radius: 3px;
            vertical-align: middle;
        }

        span.djMoney input {
            width: 70.9%;
        }
    </style>
</head>
<body class="bg1">
<div id="test" style="position:absolute;top:0;left:0;z-index:10000000;"></div>
 <jsp:include page="../topChart.jsp">
        <jsp:param name="index" value="查询"/>
 </jsp:include>
<%--<div>
	<jsp:include page="../../dataBase/TableIndex2.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}'/>
<div id="promptBox">
    <span>×</span>
    <div></div>
</div>
<%--<div class="searchCon">--%>
<%--    <div class="searchDetail" id="searchDetail">--%>
<%--        <select class="searchType" id="searchType"></select>--%>
<%--        &lt;%&ndash;<ul class="searchType" id="searchType">&ndash;%&gt;--%>
<%--        &lt;%&ndash;<li class="active" data-search="C" ><img src="../images/indexNew/baodanIcon.png" title="查报案号" alt="查报案号"></li>&ndash;%&gt;--%>
<%--        &lt;%&ndash;<li data-search="S"><img src="../images/indexNew/paynumIcon.png" title="查支付账号" alt="查支付账号"></li>&ndash;%&gt;--%>
<%--        &lt;%&ndash;<li data-search="V"><img src="../images/indexNew/carnumIcon2.png" title="查车牌或车架号" alt="查车牌或车架号"></li>&ndash;%&gt;--%>
<%--        &lt;%&ndash;<li data-search="P"><img src="../images/indexNew/manIcon.png" title="查姓名或证件号码" alt="查姓名或证件号码"></li>&ndash;%&gt;--%>
<%--        &lt;%&ndash;<li data-search="T"><img src="../images/indexNew/telnumIcon.png" title="查联系方式" alt="查联系方式"></li>&ndash;%&gt;--%>
<%--        &lt;%&ndash;<!-- <li style="margin-right:0px">查关系<> -->&ndash;%&gt;--%>
<%--        &lt;%&ndash;</ul>&ndash;%&gt;--%>
<%--        <input id="input" type="text" placeholder="请输入" maxlength="50" style="width: 209px;color:#333"/>--%>
<%--        <div id="search-Btn" data-search="1">查询</div>--%>

<%--        <div id="reset" data-enable="1">重置</div>--%>
<%--    </div>--%>
<%--    <div class="history" style="height:150px;position:relative;">--%>
<%--        <ul class="">--%>
<%--        </ul>--%>
<%--    </div>--%>
<%--    &lt;%&ndash;<div class="dataSource">&ndash;%&gt;--%>
<%--    <!-- <p style="color:#FFFFFF">报案号</p> -->--%>
<%--    &lt;%&ndash;<div id="dragDS" style="height:200px;position:relative;margin-right:20px;">&ndash;%&gt;--%>
<%--    &lt;%&ndash;<ul class="">&ndash;%&gt;--%>
<%--    &lt;%&ndash;</ul>&ndash;%&gt;--%>
<%--    &lt;%&ndash;</div>&ndash;%&gt;--%>
<%--    &lt;%&ndash;</div>&ndash;%&gt;--%>


<%--</div>--%>
<div class="itemCon" hidden>
    <img src="../images/indexNew/x.png" class="searchConClose">
    <div class="allResult">
        <p>找到<span>0</span>个相关结果</p>
    </div>
    <div id="allResultContainer">
        <ul class="allResultList" id="allResultList">

        </ul>
    </div>
</div>
</div>
<div id="resultCon1" class="resultCon" style="margin-left:255px;padding-top:0px;">
    <%--<img src="../images/indexNew/elephant3.png" style="margin:7% auto;display:block;padding-right:8px;">--%>
    <!-- <ul>
        <li>
            <div>
                <img src="../images/indexNew/star.png">
                <p style="color:#FFFFFF">流程自动化</p>

            </div>
        </li>
        <li>
            <div>
                <img src="../images/indexNew/star.png">
                <p style="color:#FFFFFF">关系深度探查</p>

            </div>
        </li>
        <li>
            <div>
                <img src="../images/indexNew/star.png">
                <p style="color:#FFFFFF">协同作业</p>

            </div>
        </li>
    </ul> -->
</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" data-sort="0"><label>报案号</label>
                        </li>
                        <li><input type="checkbox" checked="checked" data-th="1" class="checkBox" data-sort="0"><label>被保险人</label>
                        </li>
                        <li><input type="checkbox" checked="checked" data-th="2" class="checkBox" data-sort="0"><label>标的车架号/车牌</label>
                        </li>
                        <li><input type="checkbox" checked="checked" data-th="3" class="checkBox" data-sort="0"><label>三者车架号/车牌</label>
                        </li>
                        <li><input type="checkbox" checked="checked" data-th="4" class="checkBox" data-sort="0"><label>报案时间</label>
                        </li>

                        <li><input type="checkbox" checked="checked" data-th="5" class="checkBox" data-sort="0"><label>出险时间</label>
                        </li>
                        <li><input type="checkbox" checked="checked" data-th="6" class="checkBox" data-sort="0"><label>出险地</label>
                        </li>
                        <li><input type="checkbox" checked="checked" data-th="7" class="checkBox" data-sort="0"><label>出险情况</label>
                        </li>
                        <li><input type="checkbox" checked="checked" data-th="8" class="checkBox" data-sort="0"><label>承保公司</label>
                        </li>
                        <li><input type="checkbox" checked="checked" data-th="9" class="checkBox" data-sort="0"><label>报案人</label>
                        </li>

                        <li><input type="checkbox" checked="checked" data-th="10" class="checkBox" data-sort="0"><label>报案电话</label>
                        </li>
                        <li><input type="checkbox" checked="checked" data-th="11" class="checkBox" data-sort="0"><label>标的车驾驶员</label>
                        </li>
                        <li><input type="checkbox" checked="checked" data-th="12" class="checkBox" data-sort="0"><label>三者车驾驶员</label>
                        </li>
                        <li><input type="checkbox" checked="checked" data-th="13" class="checkBox" data-sort="0"><label>标的车驾驶员电话</label>
                        </li>
                        <li><input type="checkbox" checked="checked" data-th="14" class="checkBox" data-sort="0"><label>三者车驾驶员电话</label>
                        </li>

                        <li><input type="checkbox" checked="checked" data-th="15" class="checkBox" data-sort="0"><label>查勘员</label>
                        </li>
                        <li><input type="checkbox" checked="checked" data-th="16" class="checkBox" data-sort="0"><label>估损员</label>
                        </li>
                        <li><input type="checkbox" checked="checked" data-th="17" class="checkBox" data-sort="0"><label>收款人</label>
                        </li>
                        <li><input type="checkbox" checked="checked" data-th="18" class="checkBox" data-sort="0"><label>收款账号</label>
                        </li>
                        <li><input type="checkbox" checked="checked" data-th="19" class="checkBox" data-sort="0"><label>赔付金额</label>
                        </li>
                        <li><input type="checkbox" checked="checked" data-th="20" class="checkBox" data-sort="0"><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">
            <tr>
                <th>报案号<span data-thsort="0"><img src="../images/indexNew/order.png"></span></th>
                <th>被保险人<span data-thsort="1"><img src="../images/indexNew/order.png"></span></th>
                <th>标的车架号/车牌<span data-thsort="2"><img src="../images/indexNew/order.png"></span></th>
                <th>三者车架号/车牌<span data-thsort="3"><img src="../images/indexNew/order.png"></span></th>
                <th>报案时间<span data-thsort="4"><img src="../images/indexNew/order.png"></span></th>
                <th>出险时间<span data-thsort="5"><img src="../images/indexNew/order.png"></span></th>
                <th>出险地<span data-thsort="6"><img src="../images/indexNew/order.png"></span></th>
                <th>出险情况<span data-thsort="7"><img src="../images/indexNew/order.png"></span></th>
                <th>承保公司<span data-thsort="8"><img src="../images/indexNew/order.png"></span></th>
                <th>报案人<span data-thsort="9"><img src="../images/indexNew/order.png"></span></th>
                <th>报案电话<span data-thsort="10"><img src="../images/indexNew/order.png"></span></th>
                <th>标的车驾驶员<span data-thsort="11"><img src="../images/indexNew/order.png"></span></th>
                <th>三者车驾驶员<span data-thsort="12"><img src="../images/indexNew/order.png"></span></th>
                <th>标的车驾驶员电话<span data-thsort="13"><img src="../images/indexNew/order.png"></span></th>
                <th>三者车驾驶员电话<span data-thsort="14"><img src="../images/indexNew/order.png"></span></th>
                <th>查勘员<span data-thsort="15"><img src="../images/indexNew/order.png"></span></th>
                <th>估损员<span data-thsort="16"><img src="../images/indexNew/order.png"></span></th>
                <th>收款人<span data-thsort="17"><img src="../images/indexNew/order.png"></span></th>
                <th>收款账号<span data-thsort="18"><img src="../images/indexNew/order.png"></span></th>
                <th>赔付金额<span data-thsort="19"><img src="../images/indexNew/order.png"></span></th>
                <th>是否有人伤<span data-thsort="20"><img src="../images/indexNew/order.png"></span></th>
                <!-- <th onclick="$.sortTable.sort('tableCon',0)">报案号</th>
                <th onclick="$.sortTable.sort('tableCon',1)">被保险人</th>
                <th onclick="$.sortTable.sort('tableCon',2)">标的车架号/车牌</th>
                <th onclick="$.sortTable.sort('tableCon',3)">三者车架号/车牌</th>
                <th onclick="$.sortTable.sort('tableCon',4)">报案时间</th>
                <th onclick="$.sortTable.sort('tableCon',5)">出险时间</th>
                <th onclick="$.sortTable.sort('tableCon',6)">出险地</th>
                <th onclick="$.sortTable.sort('tableCon',7)">出险情况</th>
                <th onclick="$.sortTable.sort('tableCon',8)">承保公司</th>
                <th onclick="$.sortTable.sort('tableCon',9)">报案人</th>
                <th onclick="$.sortTable.sort('tableCon',10)">报案电话</th>
                <th onclick="$.sortTable.sort('tableCon',11)">标的车驾驶员</th>
                <th onclick="$.sortTable.sort('tableCon',12)">三者车驾驶员</th>
                <th onclick="$.sortTable.sort('tableCon',13)">标的车驾驶员电话</th>
                <th onclick="$.sortTable.sort('tableCon',14)">三者车驾驶员电话</th>
                <th onclick="$.sortTable.sort('tableCon',15)">查勘员</th>
                <th onclick="$.sortTable.sort('tableCon',16)">估损员</th>
                <th onclick="$.sortTable.sort('tableCon',17)">收款人</th>
                <th onclick="$.sortTable.sort('tableCon',18)">收款账号</th>
                <th onclick="$.sortTable.sort('tableCon',19)">赔付金额</th> -->
            </tr>
            </thead>
            <tbody class="scrollTbody" id="tableB" style="position:relative;">
            </tbody>
        </table>
        <div id="tableBox"></div>
    </div>
</div>
<%--<div class="cateCon" id="cateCon" hidden style="left:0px">--%>
<%--<ul>--%>
<%--<li>--%>
<%--<div class="divc">--%>
<%--<i></i>--%>
<%--<p>查询</p>--%>
<%--</div>--%>
<%--</li>--%>
<%--<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:0px;" hidden>
    <div class="zhankai_arrow" id="zhankai_arrow"><img width="100%" src="../images/indexNew/zhankai_arrow.png"></div>
    <div class="resultHead" id="relation2" style="width:100%;" hidden>
        <div class="relationList">
            <table class="table" id="tableForlink" style="table-layout: fixed;">

            </table>
            <%--<div></div>--%>
        </div>
    </div>
    <div class="resultContainer" style=" border-bottom: 1px solid #666999;">
        <div id="resultHeadPar" style="position: relative;overflow:hidden;height:100%">
            <div class="resultHead" id="resultHead3">

            </div>
            <div class="resultHead" id="resultHead">
            </div>
        </div>
    </div>
    <div class="result">
        <!--  <div id="import" class="toggle" style="right:134px"><i class="tool-import"></i></div>-->
        <div class="btnResult">
            <div id="Tip" class="Tip" style="left:-320px" hidden><p class="Tiptext">双击取消连线</p></div>
            <%--画布中时间过滤，缩放等--%>
            <ul class="btnFunction">
<%--                <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>--%>
<%--                &lt;%&ndash;<hna:permission privilege="graph.save">&ndash;%&gt;--%>
<%--                <li id="save" class="toggle" style="right:218px"><i class="tool-save" title="保存"></i></li>--%>
<%--                &lt;%&ndash;</hna:permission>&ndash;%&gt;--%>
<%--                <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:150px;padding: 10px 0;">
                <ul>
                    <li id="A_type" data-show="true" data-type="A"><img class="filter_icon" src="../images/graph/sxlpclaim.png">案件</li>
                    <li id="B_type" data-show="true" data-type="B"><img class="filter_icon" src="../images/graph/sxlppolicy.png">保单</li>
                    <li id="T_type" data-show="true" data-type="T"><img class="filter_icon" src="../images/graph/sxlppeople.png">投保人</li>
                    <li id="P_type" data-show="true" data-type="P"><img class="filter_icon" src="../images/graph/sxlppeople.png">被保人</li>
                    <li id="L_type" data-show="true" data-type="L"><img class="filter_icon" src="../images/graph/sxlppeople.png">领款人</li>
                    <li id="BUSI_type" data-show="true" data-type="BUSI"><img class="filter_icon" src="../images/graph/sxlpsalesman.png">业务员</li>
                    <li id="AGE_type" data-show="true" data-type="AGE"><img class="filter_icon" src="../images/graph/sxlpage.png">被保人年龄</li>
                    <li id="career_type" data-show="true" data-type="career"><img class="filter_icon" src="../images/graph/sxlpcareer.png">被保人职业</li>
                    <li id="D_type" data-show="true" data-type="D"><img class="filter_icon" src="../images/graph/sxlpphone.png">电话</li>
                    <li id="C_type" data-show="true" data-type="C"><img class="filter_icon" src="../images/graph/sxlpaccount.png">账户</li>
                    <li id="H_type" data-show="true" data-type="H"><img class="filter_icon" src="../images/graph/sxlphospital.png">医院</li>
                    <li id="HL_type" data-show="true" data-type="HL"><img class="filter_icon" src="../images/graph/sxlphospitalLvl.png">医院等级</li>
                    <li id="ILL_type" data-show="true" data-type="ILL"><img class="filter_icon" src="../images/graph/sxlpillness.png">重疾类型</li>
                </ul>
                <div data-switch="true"
                     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 id="Tip" class="Tip" style="left:320px" hidden><p class="Tiptext">双击空白处取消</p></div>
		<div id="extendMode" class="toggle" style="right:386px" title="停止抖动" data-mode="0"><i class="tool-lock"></i></div>
		<div id="timeFilter" class="toggle" style="right:344px" 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>
		</div>
		<hna:permission privilege="graph.selfDefinition">
		<div id="custom" class="toggle" style="right:302px" title="自定义数据" data-type="origin" data-enable="1"><i class="tool-toCustom"></i></div>
		</hna:permission>
		<hna:permission privilege="graph.tableToGraph">
		<div id="toTable" data-status="0" class="toggle" style="right:260px" title="表格"><i class="tool-table"></i></div>
		</hna:permission>
		<hna:permission privilege="graph.download">
		<div id="download" class="toggle" style="right:218px" title="下载"><i class="tool-download"></i></div>
		</hna:permission>
		<hna:permission privilege="graph.save">
		<div id="save" class="toggle" style="right:176px" title="保存" ><i class="tool-save"></i></div>
		</hna:permission>
		<hna:permission privilege="graph.cancel">
		<div id="cancel" class="toggle" style="right:134px" title="撤销"><i class="tool-cancel"></i></div>
		</hna:permission>
		<div id="gb" class="toggle" style="right:92px" title="向后"><i class="tool-gb"></i></div>
		<div id="toggle" class="toggle" data-enable="1" title="缩放"><i class="tool-extend"></i></div>
		<div class="fullScreen-btn" data-isfull="0" title="全屏"><i class="tool-max"></i></div>
		<div id="filter" class="toggle" style="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 id="timeFilter" class="toggle" style="right:10px;top:95px;width:36px;">
            <div style="margin:0 36px 0 10px;display:none;" id="rangeSelectCon">
                <h4 style="color: #fff;margin: 7px;font-size: 12px;">请选择时间范围</h4>
                <div id="rangeSelect" style="position:relative;top:21px;">
                </div>
            </div>
            <i class="tool-toTF" style="position: absolute;right: 8px;top:0px" title="时间过滤"></i>
        </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>
<!-- <div class="backg" style="display:none;" id="markStatus">
	<div class="filterType">
		<p class="filter_title overflowEllipsis"><span class="filter_titleCon"></span><span class="filter_people"></span></p>
		<div class="options markCon" data-choose="0">
		    <span data-type="10">正常</span>
			<span class="suspicious" data-type="11">可疑</span>
			<span data-type="12">欺诈</span>
		</div>
		<div style="display:none;">
			<label class="label1"></label><label class="label2"></label>
		</div>
		<div style="overflow:hidden">
			<div class="optFor">
				<span class="star" style="position:absolute;top:0px;display:none;"></span>
				<textarea id="markReason" placeholder="请输入需要标记的内容,最多不超过2000字" maxlength="2000"></textarea>
				<span class="djMoney" hidden><label>打假检出金额：</label><input type="number"></span>
			</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 class="backg" id="selectLabel2" style="display:none">
	<div class="filterType" style="width: 750px;">
		<p class="filter_title overflowEllipsis">框选标注</p>
		<div style="overflow:hidden">
			<div style="float: left;">
				<div class="options markCon" data-choose="0">
				    <span class="" data-type="10">正常</span>
					<span data-type="11" class="suspicious">可疑</span>
					<span data-type="12">欺诈</span>
				</div>
				<div style="display:none;">
					<label class="label1"></label><label class="label2"></label>
				</div>
				<div class="optFor">
					<span class="star" style="position:absolute;top:0px;display:none;"></span>
					<textarea id="markReason2" placeholder="请输入需要标注的内容,最多不超过2000字" maxlength="2000"></textarea>
				</div>
			</div>
			<div class="selectedTab2" style="width:404px;float: right;margin: 20px 20px 0px 20px;">
				<table id="selectedTabCon2" style="position: relative;height: 265px;display: block;">
					<tr data-id="12">
						<td>12</td>
					</tr>
				</table>
			</div>
		</div>
		<div class="confirmBtn" style="margin-top: 10px;">
			<input type="button" class="confirm_btn" value="确定">
			<input type="button" class="btn delete_btn" value="取消">
		</div>
	</div>
</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 type="text/html" id="allResultList_template">
    <!for(var i=0;i
    <data.length;i++){!>
    <li data-id="<!=data[i].id!>" data-name="<!=data[i].name!>">
        <div class="allResultItem">
            <div style="width:90%;display:inline-block;float:left;margin-top:10px">
                <p id="itemName<!=i!>" class="itemName" title="<!=data[i].name!>"><!=data[i].name!></p>
                <p class="itemDetail">
                    <%--<!for(var prop in data[i].singleProperties{!>--%>
                    <%--<span title="<!=prop.cnname!>：<!=prop.value!>"><!=prop.cnname!>： <span><!=prop.value!></span></span>--%>
                    <%--<!}!>--%>
                    <!for(var j=0;j
                    <data
                            [i].singleProperties.length;j++){!>
                    <span style="font-size:14px"
                          title="<!=data[i].singleProperties[j].cname!>：<!=data[i].singleProperties[j].value!>"><!=data[i].singleProperties[j].cname!>：<!=data[i].singleProperties[j].value!></span></br>
                        <!}!>
                </p>
            </div>
            <div class="addShow" title="添加到当前图"
                 style="width: 40px;line-height: 84px;height: 84px;position: absolute;right: -15px;text-align: center;">
                <span></span>
            </div>
        </div>
    </li>
    <!}!>
</script>

<!--实体详情模板--><!-- #e9e9e9 -->
<script type="text/html" id="infoDetail_template">
    <!var imageURL;!>
    <!var nodes=graph.para.data.nodes;!>
    <!for(var i=0;i
    <nodes.length;i++){!>
    <!if(nodes[i].id==data.id){!>
    <!imageURL=nodes[i].imageName;!>
    <div class="info_img_wrapper">
        <img src="../images/graph/<!=imageURL!>">
         <p class="infoName" title="<!=data.name!>" style="margin-left:10px"><span class="cocyCon" data-clipboard-text="<!=(data.name==""?"无记录":data.name)!>"><!=(data.name==""?"无记录":data.name)!></span>
        </p>
    </div>
    <!}!>
    <!}!>
    <div class="infoDetail">
        <div id="detailC" style="position:relative;">
            <ul>
                <%--展示人得属性--%>
<%--                <!for(var key in graph.roleProperty){!>--%>
<%--                <!if(data.id==key){!>--%>
<%--                <!var properties= graph.roleProperty[key];!>--%>
<%--                <!for(var j=0;j--%>
<%--                <properties.length--%>
<%--                        ;j++){!>--%>
<%--                    <li style="width:30%;margin-left:1%;margin-right: 0;border:0px;">--%>
<%--                        <p>--%>
<%--                            <span style="font-weight:bold"><!=properties[j].cname!>:&nbsp;</span>--%>
<%--                            <span><!=properties[j].value!></span>--%>
<%--                        </p>--%>
<%--                    </li>--%>
<%--                    <!}!>--%>
<%--                    <!}!>--%>
<%--                    <!}!>--%>
                    <%--展示非人得属性--%>
                    <!for(var i=0;i
                    <nodes.length
                            ;i++){!>
                        <!graph.entityType=nodes[i].entityType;!>
<%--                        <!if(nodes[i].type!="L" && nodes[i].type!="T" && nodes[i].type!="P"){!>--%>
                        <!if(nodes[i].id==data.id){!>
                        <!var manyP=nodes[i].attrs!>
                        <!for(var j=0;j
                        <manyP.length
                                ;j++){!>
                            <li style="margin-left:1%;margin-right: 0;border:0px;">
                                <p>
                                    <span style="font-weight:bold"><!=manyP[j].cname!>:&nbsp;</span>
                                    <span><!=manyP[j].value!></span>
                                </p>
                            </li>
                            <!}!>
                            <!}!>
<%--                            <!}!>--%>
                            <!}!>
            </ul>
        </div>
    </div>
</script>

<script type="text/html" id="PeoInfoDetail_template">
    <!for(var i=0;i
    <ToName.length;i++){!>
    <li>任职公司：<span class="peoComp"><!=ToName[i]!></span>职位：<span><!=ToRel[i]!></span></li>
    <!}!>
</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="static_template">

    <div class="options">
        <span class="active1" data-tar="opt1">数量统计</span>
    </div>
    <div id="opt1" class="optFor" style="position:relative;overflow:hidden;">
        <ul>
            <!for(var i=0;i
            <graph.weaverData.length
                    ;i++){!>
                <!var image=graph.weaverData[i].Imagepath!>
                <!var cname=graph.weaverData[i].cname;!>
                <!var value=graph.weaverData[i].value;!>
                <li><img src="../images/indexNew/<!=image!>" alt=""><!=cname!>:<!=value!></li>
                <!}!>
        </ul>
    </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="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="../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>

<script src="../js/page/exportFile.js"></script>
<script src="../js/page/nameMap.js"></script>
<script src="../js/lib/d3.v4.js"></script>
<script src="../js/lib/jquery-1.11.1.min.js"></script>
<script src="../js/lib/perfect-scrollbar.jquery.js"></script>
<script src="../js/lib/Tween.js"></script>
<script src="../js/lib/RequestAnimationFrame.js"></script>
<script src="../js/lib/core.js"></script>
<script src="../js/lib/baiduTemplate.js"></script>
<script src="../js/lib/jquery-confirm.js"></script>
<script src="../js/lib/jquery-ui.min.js"></script>
<script type="text/javascript" src="../js/lib/jquery-ui-slide.min.js"></script>
<script type="text/javascript" src="../js/lib/jquery-ui-timepicker-addon.js"></script>
<script type="text/javascript" src="../js/lib/datepicker-zh-TW.js"></script>
<script type="text/javascript" src="../js/lib/clipboard.min.js"></script>
<script src="../js/page/tableDrag.js"></script>
<script src="../js/page/sortTable.js"></script>
<script type="text/javascript" src="../js/page/copy.js"></script>
<script src="../js/component/newGraph4.js"></script>
<script src="../js/lib/jQAllRangeSliders-min.js"></script>
<script>
    $("#LOGIN_CONTENT .myNav li").click(function () {
        alert("test");
    })


</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 = ".."; //项目名路径
    var opt = {
        con: "draw",
        width: $("#draw").width(),
        height: $("#draw").height(),
        url: urlPath,
        nameMap: nodeParaNameMap,
        linkMap: linkNameMap,
        linkRel: linkType
    };
    var graph = new NewGraph(opt); //新建关系图实例
    var tagList = null;
</script>
<script src="../js/page/commonPart2.js"></script>

<script>
    (function () {
        /*初始化参数*/
        var searching = false; //搜索动画是否结束
        var reset = 1; //用来判断是否出现简介
        var searchIds = new Array(); //搜索实体Id集合
        var searchNames = new Array(); //搜索实体Name集合
        var lugela = getQueryString("lugela");
        if (lugela != null) {
            $('#input')[0].value = lugela;
        }
        graph.init(); //初始化关系图
        /*页面上各个区域滚动条初始化*/
        $('#allResultContainer').perfectScrollbar();
        $('#resultInfoList1').perfectScrollbar();
        $('#resultInfoList2').perfectScrollbar();
        $('#peoDetail').perfectScrollbar();
        $("#dsList").perfectScrollbar();
        $(".history").perfectScrollbar();
        $("#dragDS").perfectScrollbar();
        $("#relLinkBody").perfectScrollbar();
        $("#graphToTable").perfectScrollbar();
        $("#tableDiv").perfectScrollbar();
        $("#tableB").perfectScrollbar();
        $("#filterCon").perfectScrollbar();
        //个案、串案
        $("#caseTypeTab").perfectScrollbar();

        /* Erimons searchType 下拉框数据请求 2018-7-17 star*/
        var searchTypevalue = '';
        // $.get("/claim-risk/graph/graphFilter.do", function (result) {
        //     if (result.status != undefined) {
        //         alert(result.mess);
        //     } else {
        //         var dataList = JSON.parse(result);
        //         var domList = '';
        //         for (var i = 0; i < dataList.filter.length; i++) {
        //             if (dataList.filter[i].SEARCH_CODE == "sxlp#claiminfo") {
        //                 domList += '<option selected=selected value=' + dataList.filter[i].SEARCH_CODE + '>' + dataList.filter[i].SEARCH_NAME + '</option>'

        //             } else {
        //                 domList += '<option value=' + dataList.filter[i].SEARCH_CODE + '>' + dataList.filter[i].SEARCH_NAME + '</option>'
        //             }
        //         }
        //         $('#searchType').append(domList);

        //         var sortArr = dataList.sort;
        //         graph.option.typeData = sortArr;
        //     }
        // });

        $("#promptBox>span:nth-child(1)").click(function () {
            $("#promptBox").hide();
        });

        $('#searchType').change(function () {
            var val = $("#searchType").val();
//        var uri = "/claim-risk/graph/getGraphSort.do?searchCode=" + val;
//        $.get(uri, function (result) {
//            graph.option.typeData = result;
//
//        })

            $.ajax({
                url: "getGraphSort.do",
                async: false,
                dataType: "json",
                type: "post",
                data: {
                    searchCode: val
                },
                success: function (data) {
                    if (data.result == "success") {
                        graph.option.typeData = data.data;
                    }

                }
            });


        })


//    $('#searchType').change(function(){
//        var val = $("#searchType").val();
//        $.ajax({
//            url : "getGraphSort.do",
//            async : false,
//            dataType:"json",
//            type : "post",
//            data : {
//                search_code:val
//            },
//            success:function(result){
//                graph.option.typeData = result;
//            },
//            error:function(){
//            }
//        });
//	})
        /* Erimons searchType 下拉框数据请求 2018-7-17 end*/


        function closeMenuAndFunc() {
            $(".hoverFunc2 #ruleLevel1 [data-id='close']").click();
            graph.clearMenu();
        }

        $(".cateCon").css("left", 0);
        $("#filter ul li").click(function () {
            var src = graph.weaverData;
            var tar = graph.weaverData;
            for (var i = 0; i < tar.length; i++) {
                tar[i].value = 0;
            }
            $("#opt1 ul").empty();
            var li;
            if ($("A_type").css("color") == "rgb(255,255,255)") {
                li = $('<li><img src="../images/indexNew/' + src[1].Imagepath + '" alt="">' + src[1].cname + ':' + src[1].value + '</li>');
            } else {
                li = $('<li><img src="../images/indexNew/' + tar[1].Imagepath + '" alt="">' + tar[1].cname + ':' + tar[1].value + '</li>');
            }

        });

        /*统计信息*/
        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();
        }

        _.MessageManager.on("getStatic", function () {
            getStatic();
            refreshCaseList();
        });

        /*保存*/
        $("#save").click(function () {
            closeMenuAndFunc();
            graph.save();
        });


        /*获取自定义数据*/
        $("#custom").click(function () {
            graph.para.firstRender = true;
            graph.mouseoutNode();
            // if ($(this).data("type") == "origin") {
            //     var that = this;
            //     $.ajax({
            //         type: "POST",
            //         url: urlPath + "/graph/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 () {

            //         }
            //     });
            //     closeMenuAndFunc();
            // } 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");
            //     closeMenuAndFunc();
            // }
        });

        /*下载*/
        $("#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);
            /*
            $.alert({
                   title:"请输入文件名",
                   content:"<p><label>名称：</label><input type='text' name='name'></p>",
                theme: 'blue',
                closeIcon: true,
                confirm: function(){
                    var name=$(".row .content input[name='name']").val();
                    downloadFile(name+".csv",csvContent);
                }
            });
            */
        });

        //模型功能点击一级菜单事件
        $("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 li", "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);
            }
        });
        //模型详情显示功能
        $("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();
        });

        /*返回*/
        $("#cancel").click(function () {
            closeMenuAndFunc();
            _.MessageManager.fire("cancel");
        });

        /*回退*/
        $("#gb").click(function () {
            closeMenuAndFunc();
            _.MessageManager.fire("goback");
        });

        /*全屏*/
        $(".fullScreen-btn").click(function () {
            arrow_animate();
            closeMenuAndFunc();
            if ($("#search-Btn").data("search") == 0) {
                return;
            }
            if ($(this).data("isfull") == 0) {
                //全屏
                // $('.resultContainer').hide();
                // $('.result').css('marginLeft', 0);
                // $('.result').css('width', '100%');
                // $('#draw').css('width', '100%');
                $(".headCon").hide();
                $("#resultHeadPar").hide();
                $(".searchCon").hide();
                $(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/bgImg.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($(window).width(), $(window).height());
                $("#toggle").css({"background-color": "#2B3751"});
            } else {
                // var w = window.innerWidth || document.body.clientWidth;
                // $('.resultContainer').show();
                // $('.result').css('marginLeft', $('.resultContainer').width());
                // $('.result').css('width', w-$('.resultContainer').width());
                // $('#draw').css('width', '100%');
                $(".headCon").show();
                $("#resultHeadPar").show();
                $(".searchCon").show();
                ////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"});
            }
        });

        /*功能按钮*/
        $(".control-btn").click(function () {
            var func = $(this).data("func");
            console.log(111);
            if (func == "recover") {
                graph.clearFunc();
            } else if (func == "delete") {
                graph.preDeleteNodes();
            } else if (func == "extend") {
                graph.extendNodes();
            }
        })

        /*信息切换*/
        $("#cateCon .divc").click(function () {
            $("#cateCon").find(".divc").removeClass("cateConHover");
            $(this).addClass("cateConHover");
            var targetHead = $(this).data("target");
            $(".resultHead").hide();
            $("#" + targetHead).show();
        });

        /*重置*/
        $("#reset").click(function () {
            if (searching == true) {
                return;
            }
            $("#input").val(""); //清空输入框
            //页面布局调整
            $("#resultCon2").css("margin-left", "355px").hide();
            $("#resultCon1").css("margin-left", "255px").show();
            $("#cateCon").css("left", "255px").hide();
            $(".itemCon").css({"left": "-82px", "z-index": -1});
            $("#graphToTable").css("margin-left", "255px").hide();
            $("#resultHeadPar").css({"margin-top": "0px", "z-index": 0}).show();

            $("#draw").css("height", $(window).height() - 40 - 150);
            $("#search-Btn").data("search", 1);
            $("#toTable").data("status", 0); //恢复图转表标识符

            $("#toggle").data("enable", 1);
            reset = 1;
            toReset();
        });

        function toReset() {
            searchIds.splice(0, searchIds.length);
            searchNames.splice(0, searchNames.length);
            $("#allResultList").html("");
            $(".allResult span").html("0");
            $(".history ul").html("");
            $(".dataSource ul").html("");
            $(".dsList ul").html("");
            graph.clear();

            closeMenuAndFunc();

            _.MessageManager.fire("toCustomStatus", true);

            //恢复自定义按钮
            $("#custom").data("type", "origin").attr("title", "自定义数据");
            $("#custom i").removeClass("tool-toOrigin").addClass("tool-toCustom");
            graph.para.isCustom = false;

            resetFilter();

            if ($("#timeFilter").data("enable") == 1) {
                $("#timeFilter").click();
            }
            resetTimeFilter();
            if ($("#extendMode").data("mode") == 1) {
                $("#extendMode").click();
            }
        }

        /*根据窗口大小调整页面*/
        resize();
        $(window).resize(function () {
            resize();
        });

        function resize() {
            //获取窗口高度
            var windowheight = $(window).height();
            var windowwidth = $(window).width();//页面的宽
            var searchCon = windowheight - 40 - 146;
            var svgWidth = windowwidth-$('.resultContainer').width();
            $(".searchCon").css("height", windowheight - 40);
            $(".itemCon").css("height", windowheight - 40);
            $(".resultCon").css("height", windowheight - 40);
            $("#allResultContainer").css("height", windowheight - 153 + 64);
            $('.result').css('margin-left', $('.resultContainer').width())
            $("#draw").css({
              "height": windowheight,
              "width": svgWidth
            })
            var pt = (windowheight - 40) / 2 - 90;
            $("#resultCon1").css("padding-top", 0);
            $(".cateCon").css("height", windowheight - 40);
            //保存画图区域的高度
            $(".fullScreen-btn").data("drawh", $("#draw").height());
            console.log($("#draw").width(),$("#draw").height())
            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');
            //筛选
            $("#filterCon").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');
        }

        /*切换查询类型*/
//	$("#searchType li").click(function(){
//        $("#searchType").children().removeClass("active");
//        $(this).addClass("active");
//        var searchTypeVal=$(".active img").attr("title").substr(1,$(".active img").attr("title").length);
//        $("#input").attr("placeholder","请输入"+searchTypeVal+"");
//    });

        /*搜索实体,模糊匹配*/
        $("#search-Btn").click(function () {
            $("#resultHead").hide();
            $("#relation2").hide();
            $("#resultHead3").show();
            $(".myNav li:nth-child(2)").attr("style", "background-color:RGB(84,117,172);cursor: default;");
            $(".myNav li:nth-child(3)").removeAttr("style");
            $(".myNav li:nth-child(4)").removeAttr("style");
            $(".myNav li:nth-child(5)").removeAttr("style");
            $("#toggle").css({"background-color": "#2B3751"});
            $(".fullScreen-btn").css({"background-color": "#2B3751"});
            var inputValue = $("#input").val().trim();
            if (inputValue == null || inputValue == "") {
                alert("请输入实体名字！");
                $("#input").focus();
            } else {
                searching = true;
                var searchType2 = $("#searchType").val();
//			var searchType = $("#searchType").data("search"),searchType2;
//			$("#searchType").data("type",searchType);

//			switch(searchType){
//				case "C":
//					searchType2 = "daja#Case";
//					break;
//				case "P":
//					searchType2 = "daja#Person";
//					break;
//				case "S":
//					searchType2 = "daja#SettlementAccount";
//					break;
//				case "V":
//					searchType2 = "daja#Accident_Vehicle";
//					break;
//				case "T":
//					searchType2 = "daja#Telephone";
//					break;
//				default:
//					searchType2 = "daja#Case";
//			}

                if ("sxlp#claiminfo" != searchType2) {
                    return;
                }


                //$.ajax({type:"POST",url:urlPath+"/graph/stringMatch.do",data:{id:inputValue},dataType:"json",success:function(result2){
                $.ajax({
                    type: "POST",
                    url: "/claim-risk/graph/searchEntity.do",
                    data: {entityName: inputValue, searchType: searchType2, limit: 1000},
                    dataType: "json",
                    success: function (result2) {
                        if (result2.status != undefined) {
                            alert(result2.mess);
                            searching = false;
                        } else {
                            tagList = result2;
                            result2 = result2.dataList;
                            var ht = "";
                            //不同类型的搜索使用不同的模板
//						switch(searchType.toLocaleLowerCase()){
//						    case "c":
//						    	var showKey = ["daja#CASE_NOTIFICATIONDATE","daja#CASE_BRANCH_CODE"];
//								//,"daja#CASE_ACCIDENTLOCATION"   //出险地址隐藏
//
//						    	for(var i=0;i<result2.length;i++){
//						    		result2[i]["showKey"] = {
//								    		"daja#CASE_NOTIFICATIONDATE":{cnname:"报案日期",value:"无记录"},
//								    		"daja#CASE_BRANCH_CODE":{cnname:"分公司",value:"无记录"} //,
//								    		//"daja#CASE_ACCIDENTLOCATION":{cnname:"出险地址",value:"无记录"}
//						    		};
//						    		result2[i].attributes = result2[i].attrs;
//						    		for(var j=0;j<result2[i].attributes.length;j++){
//						    			if(showKey.indexOf(result2[i].attributes[j].name)>=0){
//						    				result2[i]["showKey"][result2[i].attributes[j].name].value = result2[i].attributes[j].value;
//						    			}
//						    		}
//								}
//								break;
//							case "s":
//								var showKey = ["daja#SettlementAccount_PAYEEACCOUNTNAME"];
//
//						    	for(var i=0;i<result2.length;i++){
//						    		result2[i]["showKey"] = {
//								    		"daja#SettlementAccount_PAYEEACCOUNTNAME":{cnname:"收款人户名",value:"无记录"}
//						    		};
//						    		result2[i].attributes = result2[i].attrs;
//						    		for(var j=0;j<result2[i].attributes.length;j++){
//						    			if(showKey.indexOf(result2[i].attributes[j].name)>=0){
//						    				result2[i]["showKey"][result2[i].attributes[j].name].value = result2[i].attributes[j].value;
//						    			}
//						    		}
//								}
//								break;
//							case "v":
//								var showKey = ["daja#Accident_Vehicle_MOLDNAME","daja#Accident_Vehicle_ENGINENO"];
//
//						    	for(var i=0;i<result2.length;i++){
//						    		result2[i]["showKey"] = {
//								    		"daja#Accident_Vehicle_MOLDNAME":{cnname:"车型名称",value:"无记录"},
//								    		"daja#Accident_Vehicle_ENGINENO":{cnname:"发动机号",value:"无记录"}
//						    		};
//						    		result2[i].attributes = result2[i].attrs;
//						    		for(var j=0;j<result2[i].attributes.length;j++){
//						    			if(showKey.indexOf(result2[i].attributes[j].name)>=0){
//						    				result2[i]["showKey"][result2[i].attributes[j].name].value = result2[i].attributes[j].value;
//						    			}
//						    		}
//								}
//								break;
//							case "p":
//								var showKey = ["daja#Person_CERTIFICATENO","daja#Person_TEL"];//,"daja#Person_CERTIFICATETYPE"
//
//						    	for(var i=0;i<result2.length;i++){
//						    		result2[i]["showKey"] = {
//								    		"daja#Person_CERTIFICATENO":{cnname:"证件号码",value:"无记录"},
//								    		//"daja#Person_CERTIFICATETYPE":{cnname:"证件类型",value:"无记录"},
//								    		"daja#Person_TEL":{cnname:"电话",value:"无记录"}
//						    		};
//									//console.log(JSON.parse(result2[i].attributes));
//						    		result2[i].attributes = result2[i].attrs;
//
//						    		for(var j=0;j<result2[i].attributes.length;j++){
//						    			if(showKey.indexOf(result2[i].attributes[j].name)>=0){
//											if(result2[i].attributes[j].name=="daja#Person_CERTIFICATETYPE"){
//												result2[i].attributes[j].value = result2[i].attributes[j].value==1?"身份证":result2[i].attributes[j].value;
//											}
//						    				result2[i]["showKey"][result2[i].attributes[j].name].value = result2[i].attributes[j].value;
//						    			}
//						    		}
//								}
//								break;
//							case "t":
//								var showKey = ["daja#Telephone_TEL"];
//
//						    	for(var i=0;i<result2.length;i++){
//						    		result2[i]["showKey"] = {
//								    		"daja#Telephone_TEL":{cnname:"电话",value:"无记录"}
//						    		};
//						    		result2[i].attributes = result2[i].attrs;
//						    		for(var j=0;j<result2[i].attributes.length;j++){
//						    			if(showKey.indexOf(result2[i].attributes[j].name)>=0){
//						    				result2[i]["showKey"][result2[i].attributes[j].name].value = result2[i].attributes[j].value;
//						    			}
//						    		}
//								}
//								break;
//							//case "":
//								//ht=baidu.template("payResultList_template",{data:result});
//								//$("#allResultList").html(ht);
//								//$(".allResult p span").html(result.length);
//								//break;
//						}//end of switch

                            ht = baidu.template("allResultList_template", {data: result2});
                            $("#allResultList").html(ht);
                            $(".allResult p span").html(result2.length);
                            //动态出现
                            if ($("#search-Btn").data("search") == 1) {
                                //$("#reset").data("enable",0);
                                $(".itemCon").css("z-index", -1);
                                change({num: 0}, function (data) {
                                    resize();
                                }, 750);
                                setTimeout(function () {
                                    $(".itemCon").css("z-index", 1);
                                    searching = false;
                                }, 500);
                                if (reset == 1) {
                                    change({num: 0}, function (data) {
                                        $("#resultCon1").css("margin-left", 255 + 337 * data);
                                        $("#resultCon2").css("margin-left", 357 + 337 * data);
                                        $("#graphToTable").css("margin-left", 255 + 337 * data);
                                        $(".itemCon").show().css("left", 337 * data - 82)
                                        $("#cateCon").css("left", 592);
                                    }, 750)
                                } else {
                                    if ($("#toggle").data("enable") == 1) {
                                        change({num: 0}, function (data) {
                                            if ($("#toTable").data("status") == 0) {
                                                $("#cateCon").show().css("left", 255 + 337 * data);
//                                            $("#cateCon").show().css("left",0);
                                            } else {
                                                $("#cateCon").hide().css("left", 255 + 337 * data);
                                            }
                                            $("#resultCon2").css("margin-left", 357 + 337 * data);
                                            $("#graphToTable").css("margin-left", 255 + 337 * data);
                                            $(".itemCon").show().css("left", 337 * data - 82)
                                        }, 750)
                                    } else {
                                        change({num: 0}, function (data) {
                                            $("#resultCon2").css("margin-left", 255 + 337 * data);
                                            $(".itemCon").show().css("left", 337 * data - 82);
                                            $("#graphToTable").css("margin-left", 255 + 337 * data);
                                        }, 750);
                                    }
                                }
                            } else {
                                searching = false;
                            }
                            $("#search-Btn").data("search", 0);
                            //高亮文字
                            /*
                            for(var i=0;i<result.length;i++){
                                SearchHighlight("itemName"+i,inputValue);
                            }
                            */
                            //更新滚动条
                            $('#allResultContainer').perfectScrollbar("update");
                            /* Erimons  存下拉框entryType  start*/
                            searchTypevalue = $("#searchType").val();
                            /* Erimons  存下拉框entryType  end*/
                        }
                    },
                    error: function () {
                        alert("查询失败！");
                        searching = false;
                    }
                });
            }
        });

        /*回车触发搜索实体*/
        $("#input").keydown(function (e) {
            if (e.keyCode == 13) {
                $("#search-Btn").click();
            }
        });

        /*收缩页面*/
        $("#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);
//                    $("#cateCon").css({"z-index":"-1"}).css("left",0);
                        $("#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().css("left", 153 + data * 102);
//                $("#cateCon").css({"z-index":"-1"}).css("left",0);
                    $("#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);
            }
        });

        /*收起搜索结果*/
        $(".searchConClose").click(function () {
            $("#toggle").css({"background-color": "#4059b4"});
            $(".fullScreen-btn").css({"background-color": "#4059b4"});
            $("#search-Btn").data("search", 1)

            //动画结束后再次进行画布大小的调整x
            setTimeout(function () {
                graph.resize($("#draw").width(), $("#draw").height());
            }, 800);

            if (reset == 1) {
                change({num: 0}, function (data) {
                    graph.resize($("#draw").width(), $("#draw").height());
                    $("#resultCon1").css("margin-left", 556 - data * 255);
                    $(".itemCon").css("z-index", -1).css("left", 255 - 337 * data);
                    if (data == 1) {
                        $(".itemCon").hide();
                    }
                }, 750);
            } else {
                if ($("#toggle").data("enable") == 1) {
                    change({num: 0}, function (data) {
                        graph.resize($("#draw").width(), $("#draw").height());
                        if ($("#toTable").data("status") == 1) {
                            $("#cateCon").hide().css({"z-index": "-1"}).css("left", 592 - 337 * data);
//                        $("#cateCon").hide().css({"z-index":"-1"}).css("left"0);
                        } else {
//						$("#cateCon").show().css("left",592-337*data);
                            setTimeout(function () {
                                $("#cateCon").show().css("left", 0);
                            }, 500);
                        }
                        $("#resultCon2").css("margin-left", 694 - 612 * data);
                        $("#graphToTable").css("margin-left", 592 - 337 * data);
                        $(".itemCon").css("z-index", -1).css("left", 255 - 337 * data);
                        if (data == 1) {
                            $(".itemCon").hide();
                        }
                    }, 750);
                } else {
                    change({num: 0}, function (data) {
                        graph.resize($("#draw").width(), $("#draw").height());
                        $("#resultCon2").css("margin-left", 592 - 337 * data);
                        $("#graphToTable").css("margin-left", 592 - 337 * data);
                        $(".itemCon").css("z-index", -1).css("left", 255 - 337 * data);
                        if (data == 1) {
                            $(".itemCon").hide();
                        }
                    }, 750);
                }
            }
        });

        /*点击结果列表查询实体*/
        $("#allResultList").delegate(".addShow", "click", function (e) {
            e.stopPropagation();
            var thisId = $(this).parent().parent().data("id") + "";
            var thisName = $(this).parent().parent().data("name") + "";
            getGraph(thisId, thisName, false);
        });
        $("#allResultList").delegate("li", "click", function () {
            toReset();
            $(".myNav li:nth-child(2)").attr("style", "background-color:RGB(84,117,172)");
            var thisId = $(this).data("id") + "";
            var thisName = $(this).data("name") + "";
            getGraph(thisId, thisName, true);
        });
        var thisId = 'A000CHD1830000303355', thisName = 'CHD1830000303355', searchTypevalue = 'sxlp#claiminfo';
        graphInit(thisId, thisName, false)

        function graphInit(thisId, thisName, goback) {
            var data = {
                id: thisId, //当前查询id
                searchType: '',    //当前查询类型
                name: thisName
            };
            var graphNameList = {graphNameList: [getQueryString('caseNow'), getQueryString('caseSame')]};
            $.ajax(
                {
                    type: "POST",
                    url: "/dgt/graph/nodeAndRep.do",
                    data: JSON.stringify(graphNameList),
                    dataType: "json",
                    contentType: "application/json",
                    success: function (result) {
                        //$.ajax({type:"POST",url:urlPath+"/graph/getGraphForTB.do",data:{id:data.id,level:1,type:data.searchType},dataType:"json",success:function(result){
                        graph.weaverData = result.data.graphlist;
                        console.log("eeeeeeeeeeeeeeeeeeeeeeeee", graph.weaverData);
                        graph.graphweaverIds = result.data.weaverIdList;
                        graph.result = result.data;
                        // graph.roleProperty = result.data.rolePropertiesMap;
                        // graph.weaverNode = result.data.weaverNodeMap;
                        // graph.weaverEdge = result.data.nodeLinkRelmap;
                        if (result.resultCode != '0000') {
                            alert(result.message);
                        } else {
                            //graph.para.authority = result.authority;//判断是否有权限
                            graph.para.website = result.data.website;  //判断是欺诈检测还是查询
                            // graph.para.menuShow = result.data.limitShow;   //右击节点时判断菜单是否显示
                            graph.loadData(graph.filterLinks(result.data), data, 3);
                            finshDraw(result);
                        }
                    },
                    error: function () {
                        alert("查询失败！");
                    }
                });

            $("#resultCon1").hide();
            $("#resultCon2").show();
            $("#graphToTable").hide();
            if (goback) {
                $(".searchConClose").click();
                $(".itemCon").css("z-index", -1);
            } else {
                //动画结束后再次进行画布大小的调整x
                graph.resize($("#draw").width(), $("#draw").height());
                var ff = $("#toggle").data("enable")
                if (reset == 0 && ff == 1) {
                    $("#resultCon1").hide();
                    $("#resultCon2").show();
                    $("#cateCon").css("left", "0px").show();
                }
            }
            closeMenuAndFunc();
            $("#toTable").data("status", 0); //恢复图转表标识符
        }

        function getGraph(thisId, thisName, goback) {
            reset = 0;
            if (searchIds.indexOf(thisId) < 0) {
                var searchType = $("#searchType .active").data("search");
                var data = {
                    id: thisId, //当前查询id
                    searchType: searchType,    //当前查询类型
                    name: thisName
                };
                $.ajax(
                    {
                        type: "POST",
                        url: "expandGraph.do",
                        data: {
                            roleProperty: null,
                            tagList: JSON.stringify(tagList.tagList),
                            entityId: data.id,
                            level: 1,
                            entityType: searchTypevalue,
                            isCustom: $("#custom").data("type") == "custom",
                            weaverNode: JSON.stringify(null),
                            weaverEgde: JSON.stringify(null)
                        },
                        dataType: "json",
                        success: function (result) {
                            //$.ajax({type:"POST",url:urlPath+"/graph/getGraphForTB.do",data:{id:data.id,level:1,type:data.searchType},dataType:"json",success:function(result){
                            graph.result = result;
                            graph.weaverData = result.graphlist;
                            console.log("eeeeeeeeeeeeeeeeeeeeeeeee", graph.weaverData);
                            graph.graphweaverIds = result.weaverIdList;
                            graph.roleProperty = result.rolePropertiesMap;
                            graph.weaverNode = result.weaverNodeMap;
                            graph.weaverEdge = result.nodeLinkRelmap;
                            if (result.status != undefined) {
                                alert(result.mess);
                            } else {
                                //graph.para.authority = result.authority;//判断是否有权限
                                graph.para.website = result.website;  //判断是欺诈检测还是查询
                                graph.para.menuShow = result.limitShow;   //右击节点时判断菜单是否显示
                                graph.loadData(graph.filterLinks(result), data, 3);
                                finshDraw(result);
                            }
                        },
                        error: function () {
                            alert("查询失败！");
                        }
                    });

                $("#resultCon1").hide();
                $("#resultCon2").show();
                $("#graphToTable").hide();
                if (goback) {
                    $(".searchConClose").click();
                    $(".itemCon").css("z-index", -1);
                } else {
                    //动画结束后再次进行画布大小的调整x
                    graph.resize($("#draw").width(), $("#draw").height());
                    var ff = $("#toggle").data("enable")
                    if (reset == 0 && ff == 1) {
                        $("#resultCon1").hide();
                        $("#resultCon2").show();
                        $("#cateCon").css("left", "0px").show();
                    }
                }
                closeMenuAndFunc();
                $("#toTable").data("status", 0); //恢复图转表标识符
            } else {
                alert("已添加！");
            }
        }

        //过滤类型'而加'20170731
        function finshDraw(data) {
            graph.timeFilter();
            defaultF();//默认隐藏
            $(".toggle").show();

        }

        //添加查询列表
        _.MessageManager.on("addSearchItem", function ($ev, data) {
            var thisId = data.id;
            var thisName = data.name;
            if ($("#custom").data("type") != "custom") {
                //添加到已查询列表
                $(".history ul").append("<li data-id='" + thisId + "' title='" + thisName + "'>" + thisName + "<img class='close' style='display:none' src=" + urlPath + "'/images/indexNew/close2.png'></li>");
                $(".history").perfectScrollbar("update");
                //添加搜索实体到全局变量
                searchNames.push(thisName);
                searchIds.push(thisId);
            }
        });

        //案件号列表
        $(".dataSource").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();
        });

        /*
        $(".dataSource").delegate("ul li","mouseenter",function(){
            graph.hoverNodes([$(this).data("id")+""]);
        }).delegate("ul li","mouseleave",function(){
            graph.clearSelect();
        });
            */

        function refreshCaseList() {
            var data = graph.getNodeArr();
            $(".dataSource 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;
                    $(".dataSource ul").append("<li data-id='" + data[i].id + "' title='" + caseNo + "'>" + stringLimit(caseNo, 25, 24) + "</li>");
                }
            }
            $("#dragDS").perfectScrollbar("update");
        }

        _.MessageManager.on("refreshCaseList", function ($ev, data) {
            refreshCaseList();
        });

        /*删除搜索项*/
        $(".history").delegate(".close", "click", function () {
            var item = $(this).parent();
            item.remove();
            var itemId = item.data("id");
            var itemIndex = searchIds.indexOf(itemId + "");
            searchIds.splice(itemIndex, 1);
            searchNames.splice(itemIndex, 1);
            $(".dsList ul").html(""); //清空数据源列表
            if (searchIds.length == 0) {
                graph.clear();
            } else {
                ////console.log(itemId);
                graph.delOne(itemId + "");
            }
        });

        //改变滑块长度
        _.MessageManager.on("changeHeight", function ($ev, data) {
            ////console.log(data);
            $("#" + data).perfectScrollbar("update");
        });

        _.MessageManager.on("clearInfoDetail", function ($ev, data) {
            $("#resultHead").html("").data("nodeId", "");
            $("#relation2 .table").html("").data("nodeId", "");
        });
        //图中单击查询详情
        _.MessageManager.on("infoDetail", function ($ev, data) {
            if (data.nodeInfo.showOff == false) {
                alert("你没有操作权限！");
                return false;
            }
            var attr = data.links;
            var linkStr = "";
            var index = 1;
            //	var width = $("body").width()-380;
            if ($("#search-Btn").data("search") == 1) {
                var width = $("body").width() - 380 - 20;
            } else {
                var width = $("#relation2").width() - 20;
            }
//		var ratio = [0.05,0.2,0.15,0.15,0.1,0.1,0.25];
            var th = ["序号", "关系", "起点", "终点", "时间", "权重", "描述"];
            var ratio = ["5", "95"];
            var th = ["序号", "描述"];
            linkStr += '<thead class="fixedThead"><tr style="width:95%;">'
            for (var i = 0; i < ratio.length; i++) {
                linkStr += '<th style="width:' + ratio[i] + '%;text-align: center;display: inline-block;border-bottom: 0;">' + th[i] + '</th>';
            }
            linkStr += '</tr></thead><tbody id="relLinkBody" class="scrollTbody" style="position:relative;height:100px;width:97%;">';
//        console.log("data.link",attr);
//		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>";
//        var span="<span></span>";
            $("#tableForlink").html(linkStr);
//        $("#relation2 .relationList div").html(span).data("nodeId",data.nodeInfo.id);
            $("#relLinkBody").perfectScrollbar();
            graph.list.resultHead = $("#resultHead");
            graph.list.resultHead3 = $("#resultHead3");
            graph.list.relation2 = $("#relation2");
//		graph.list.relation=$("#relation2 .relationList div span");
            graph.list.cateCon = $("#cateCon>ul");

            //实体信息
            if (data.nodeInfo.attrs == undefined) {
                data.nodeInfo.attrs = new Array();
            }

//		var nameMap = nodeParaNameMap[data.nodeInfo.type];
//		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;
//				}
//			}
//		}
                console.log(data, '>>>>>>>>>>>>>>>>>>>>>>>>>>')
            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 stringLimit(item, maxLength, limitLength) {
            if (item.length < maxLength) {
                return item;
            } else {
                return item.substring(0, limitLength) + "...";
            }
        }

        /*高亮关键字*/
        function SearchHighlight(idVal, keyword) {
            var $pucl = $("#" + idVal);
            if ("" == keyword) return;
            var temp = $pucl.html();
            var htmlReg = new RegExp("\<.*?\>", "i");
            var arrA = new Array();
            //替换HTML标签
            for (var i = 0; true; i++) {
                var m = htmlReg.exec(temp);
                if (m) {
                    arrA[i] = m;
                } else {
                    break;
                }
                temp = temp.replace(m, "{[(" + i + ")]}");
            }
            words = unescape(keyword.replace(/\+/g, ' ')).split(/\s+/);
            //替换关键字
            for (w = 0; w < words.length; w++) {
                var r = new RegExp("(" + words[w].replace(/[(){}.+*?^$|\\\[\]]/g, "\\$&") + ")", "ig");
                temp = temp.replace(r, "<span>$1</span>");
            }
            //恢复HTML标签
            for (var i = 0; i < arrA.length; i++) {
                temp = temp.replace("{[(" + i + ")]}", arrA[i]);
            }
            $pucl.html(temp);
        }

        //使用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) {
                    //$("#reset").data("enable",1);
                    return;
                }
                requestAnimationFrame(animate);
                TWEEN.update(time);
            }
        };
        //风险详情表格高亮
        $("#tableForlink").delegate("tbody tr", "mouseenter", function () {
            var index = $("#tableForlink tbody tr").index(this);
            for (var i = 0; i < graph.riskMessage.nodeArr.length; i++) {
                if (index == i) {
                    var node = graph.riskMessage.nodeArr[i];
                    var edge = graph.riskMessage.edgeArr[i];
                    graph.hightLightNL(node, edge);
                }
            }
        }).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();
        });


        /*$("#downLoadT").click(function(){
            var csvContent = "";
            var csvArr = new Array();
            var csvBodyArr = new Array();
            var csvHeadArr = new Array();
            $("#graphToTable table th").each(function(){
                csvHeadArr.push('"'+$(this).html()+'"');
            });

            csvArr.push(csvHeadArr.join(","));
            $("#graphToTable table tbody tr").each(function(){
                var tmpArr = new Array();
                $(this).find("td").each(function(){
                    tmpArr.push('"'+($(this).data("val")||"无记录") +'"');
                });
                csvArr.push(tmpArr.join(","));
            });
            var csvContent = csvArr.join("\r\n");
            downloadFile("table.csv",csvContent);
        });*/

        /*转为表格*/
        function initTable() {
            _.MessageManager.on("initTable2");
            /*var thead = ["报案号","被保险人","标的车架号/车牌","三者车架号/车牌","报案时间",
                        "出险时间","出险地","出险情况","承保公司","报案人","报案电话","标的车驾驶员","三者车驾驶员","标的车驾驶员电话","三者车驾驶员电话","查勘员","估损员",
                        "收款人","收款账号","赔付金额"];
            $("#tableCon thead th").each(function(i){
                if(i<=thead.length){
                    $(this).html(thead[i]);
                }
            });*/
        }

        //表头可筛选
        $(".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");
            }
        });

        //点击列表中，表头选中后重组字符串
        _.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="../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="../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){
                initTable();
                //图转表限制200行，20171016
                var allData = graph.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 = graph.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).css("background-color", nodeCol[attr]);
                }
            });

            $("#graphToTable").show();
            $("#cateCon").hide();
            $('.result').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);

            $("#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 = graph.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;
            }
            //var csvArr = {csvBodyArr:[],csvHeadArr:[],colors:[]};
            /*$("#graphToTable table th").each(function(){
                csvArr.csvHeadArr.push($(this).html());
            });*/
            /*$("#thShow li .checkBox").each(function(){
                if(this.checked){
                    csvArr.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")!="无记录"){
                        csvArr.colors.push({name:$(this).data("node") + '',color:$(this)[0].style.backgroundColor});
                    }
                });
                csvArr.csvBodyArr.push(tmpArr);
            });*/
            download(JSON.stringify(downLoadTdata));//把csvArr改为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();
            $('.result').show();
            resize();
        });
        _.MessageManager.on("fastTable", function () {
            if ($("#toTable").data("status") == 0) {
                $("#toTable").click();
            } else {
                $("#backToG").click();
            }
        });

        //表格拖动
        //tableDrag("graphToTable","tableCon","tableDiv","tableBox","tableThead");
    })();

    function getQueryString(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
        var r = window.location.search.substr(1).match(reg);

        if (r != null) return unescape(r[2]);
        return null;
    }

</script>
</body>
</html>