<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">/**
 * 定义全局变量
 * local:当前地址栏URL
 * contextPath:项目名称，在服务器上可能没有项目名称，注意发布前修正
 * basePath:项目内容根路径，用于引入图片或者css样式，同contextPath
 * basePath:域名内容，例如: http://localhost:8080/scxb，用于action
 * web_basePath:项目内容路径(服务器发布)
 * web_host:域名内容，例如：http://www.rhhz.net
 * */
var local = window.location;
var contextPath = local.pathname.split("/")[1]; // 未使用
var messageTimer = null;//显示动态消息  未使用

//本地使用
//var basePath = local.protocol+"//"+local.host+"/"+contextPath;
//var local_host = "//" + local.host + "/"; //待跟后端及运维验证是否使用basePath
var local_host = basePath;

//ajax 参数
var ajaxArg = {
    url: "",   //url 路径
    data: {},  //data 传送数据
    extraData: null, //主要用于回调函数使用
    returnFun: "" //回调函数
};
/**
 * ajax 公共方法
 */
function ajaxPost(ajaxArg) {
    $.ajax({
        type: 'post',
        url: ajaxArg.url,
        data: ajaxArg.data,
        dataType: 'json',
        success: function (data) {
            ajaxArg.returnFun(data, ajaxArg.extraData);
        },
        error: function (XMLHttpRequest, textStatus, errorThrown) {
            console.info("----- submit search error ---");
            console.info("----- XMLHttpRequest.responseText ---" + XMLHttpRequest.responseText);
            console.info("----- XMLHttpRequest.status ---" + XMLHttpRequest.status);
            console.info("----- XMLHttpRequest.readyState ---" + XMLHttpRequest.readyState);
            console.info("----- textStatus ---" + textStatus);
        }
    })
};


try {
    //主动给百度推送URL代码
    var bp = document.createElement('script');
    var curProtocol = window.location.protocol.split(':')[0];
    if (curProtocol === 'https') {
        bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
    }
    else {
        bp.src = 'http://push.zhanzhang.baidu.com/push.js';
    }
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(bp, s);
} catch (e) {
    console.log(e);
}

//加载网站访问量
// 本文件内有其他出调用，待清理 TODO:
if($(".todayVisitCount").length || $(".zaixianrenshu").length || $(".totalVisitCount").length){
    getTodayVisitCount();
}
//加载form表单验证token
/**
 * 加载form表单验证token
 * 搜索表单的token，搜索需携带.formToken
 * 考虑移动至其它文件，可按页面加载时加载
 * TODO:
 */
getFormToken();


/**
 * 如果屏幕大于768或者#isShowImg val == 1, 则初始化文章列表文章图片
 * 待移动到文章列表的js中
 */
/*
$(window).on("load",function(){
    if ($(window).width() &gt; 768 || (!isNull($('#isShowImg').val()) &amp;&amp; $('#isShowImg').val() == '1')) {
        pic();
    }
});
$(window).resize(function () {
    if ($(window).width() &gt; 768 || (!isNull($('#isShowImg').val()) &amp;&amp; $('#isShowImg').val() == '1')) {
        pic();
    }
});
*/

///初始化字符串截取
/**
 * base3中的.require_sub已全部注释掉了，未使用，已废弃，待删除
 * TODO:
 */
$(".require_sub").subTextMax({ trim: false });
//截取并添加title  base3、base4中无此调用，未使用，已废弃，待删除 TODO:
$(".require_sub_add_title").subTextMax({ trim: false, add_title: true });
//初始化查询结果页摘要截取效果，设置默认trim，保留长度，不添加title，截取内容类型为html
// Base4附件标题中使用此class, Base3高级检索中使用此class，待补充，待处理，待移动 TODO:
$(".search-article-abstract").subTextMax({ trim: false, keep_len: 300, add_title: false, content_type: 'html' });

//$(".fig-tit").subTextMax({trim:false,keep_len:50,add_title:true});
//除首页外，其他页面左侧菜单下显示二维码
// #pageViewId 已经没有“首页”这个值了,已废弃，待删除  TODO:
var currentPageView = $("#pageViewId").length &gt; 0 ? $("#pageViewId").val() : "";
if (currentPageView != "首页") {
    $(".second-level-code").show();
}
/**
 * 已无advSetting，index.js中新闻详情页去掉空P标签，已废弃，待删除 TODO:
 */
if (typeof (advSetting) != "undefined") {
    getCommonAd(advSetting);
}
//加载栏目数量
//getCategoryArticleNumbers();
//重新渲染js效果
/**
 * 此处的方法有待处理，
 * TODO:
 */
refreshAfterAjaxLoad();
//访问者数量
/**
 * 考虑移动此代码到其他出地方
 * 本文件内的getTodayVisitCount()
 * 
 * TODO:
 */
if ($(".todayVisitCount").length &gt; 0 || $(".totalVisitCount").length &gt; 0 || $(".zaixianrenshu").length &gt; 0) {
    getTodayVisitCount();
}
/**
 * 获取影响因子，base3有此项，base4已无此功能，待优化，待处理，待提出
 * getLatestImpactFactor()
 * TODO:
 */
if ($("#impactFactorCount").length &gt; 0 || $("#impactFactorYear").length &gt; 0) {
    getLatestImpactFactor();
}

/**
 * 检测页面#newsId，添加该id的访问记录，该方法考虑是否移入新闻详情页js中，待优化，待处理
 * 及本文件中addNewsRecords()
 * TODO:
 */
if ($("#newsId").length &gt; 0) {
    addNewsRecords();
}

//加载article-list的citedBy信息
/**
 * 加载article-list的citedBy信息
 * 考虑移动至统一的article-list加载后执行的方法中，待优化，待处理
 * 及本文件中loadArticleCitedByIds()方法
 * 本文件内的outArticleCitedByInfo()
 * TODO:
 */
loadArticleCitedByIds();
//附件点击弹框
/**
   * base3中已无此class, 已废弃，待删除 
   * TODO:
   */
$(".suppbtn").click(function () {
    $(".wcimgcon").removeClass("resetWidth");
    var _htm = $(this).parents("td").siblings(".supp-popwrap").prop('outerHTML');
    if ($(".wcimgcon&gt;img").length &gt; 0) { $(".wcimgcon&gt;img").remove(); }
    if ($(".wcimgcon&gt;.supp-popwrap").length &gt; 0) { $(".wcimgcon&gt;.supp-popwrap").remove(); }
    $(".wcimgcon").addClass("resetWidth").append(_htm);
    $(".wcimgwrap").fadeIn();
    addHtmlPadding()

})
/**
   * 中文文章详情页右侧二维码大图关闭点击事件
   */
$(".wcimgwrap").click(function (e) {
    if (e.target.tagName === "IMG") {
        return;
    }
    $(this).hide();
    clearHtmlPadding()
})
//    栏目列表页面点击显示全部
/**
 * base3中有此category_list， /article/category/{category}
 * 暂不删除，待移动，待处理
 * TODO:
 */
if (!sessionStorage.getItem("catagoryMore")) {
    $(".category-li li").each(function (i, e) {
        if ($(e).index() &gt; 10) $(e).addClass("hide-li");
    })
    if ($("#language").val() != "en") {
        $(".catagory-more").text("展开");
    } else {
        $(".catagory-more").text("More");
    }

}


$(".catagory-more").click(function () {
    $(".noResult").remove();
    if ($(this).text().trim() == "More" || $(this).text().trim() == "展开") {
        $(".category-li li").removeClass("hide-li")
    } else {
        $(".category-li li").each(function (i, e) {
            if ($(e).index() &gt; 10) $(e).addClass("hide-li")
        })
    }

    if ($("#language").val() != "en") {
        $(this).text().trim() == "展开" ? $(this).text("折叠") : $(this).text("展开")
    } else {
        $(this).text().trim() == "More" ? $(this).text("Less") : $(this).text("More")
    }

    sessionStorage.setItem("catagoryMore", "catagoryMore");
})

//栏目列表查询
$("#item-search").bind("input propertychange", function (event) {
    categorySearch();
});
var nums = 0;
$(".row-num").click(function () {
    var arrs = [];
    var lis = $(".category-li li");
    if (isNull(lis.attr("dataid"))) {
        $(".category-li li").each(function (i, e) {
            $(e).attr("dataid", $(e).find(".category-times span").text());
        })
    }

    nums++;
    $(".category-li li").each(function (i, e) {
        // console.log(i);
        var id = $(e).attr("dataid");
        if (nums % 2 == 0) {
            lis[i].style.order = -id;
            $(".row-num span").removeClass("icon-xiangshangshuangjiantou");
            $(".row-num span").addClass("icon-shuangjiantouxia");
        } else {
            $(".row-num span").addClass("icon-xiangshangshuangjiantou");
            $(".row-num span").removeClass("icon-shuangjiantouxia");
            lis[i].style.order = id;
        }

    })
})



/**
 * 通用广告查询方法
 * @param setting
 * @return
 */
function getCommonAd(setting) {
    if (setting != undefined) {
        var ajaxArg = {
            url: basePath + "common/adv",   										//url 路径
            data: { 'columnName': setting.columnName, 'size': setting.size },  			//data 传送数据
            returnFun: setting.callback 												//回调函数
        };
        ajaxPost(ajaxArg);
    }
}
/**
 * 批量查询文章计量信息
 * @param parentNode  查询文章所在的父级节点
 * @param dayString  查询文章计量信息所处的时间段，不填则为实时，30则为最近一个月（不含本月）
 * @return
 */
function loadArticleMetricByIds(parentNode, dayString) {
    if (!parentNode) {
        var parentNode = $("body");
    }
    var idArray = [];
    parentNode.find(".article-list,.i-article-ranking").each(function (i, e) {
        var articleId = $(e).attr("article_id");
        if (!isNull(articleId) &amp;&amp; idArray.indexOf(articleId) == "-1") {
            idArray.push(articleId);
        }
    })
    if (idArray.length &gt; 0) {
        var ids = idArray.toString();
        var ajaxArg = {
            url: basePath + "article/getArticleMetric",
            data: { 'articleIds': ids },
            returnFun: outArticleMetric,
            extraData: { 'parentNode': parentNode }
        };
        // 根据 dayString 的存在与否添加属性
        if (dayString) {
            ajaxArg.data.dayString = dayString;
            ajaxArg.extraData.dayString = dayString;
        }
        ajaxPost(ajaxArg);
    }
}

/**
 * 输出列表中的文章计量信息
 * @param data
 * @param indexArray
 * @return
 */
function outArticleMetric(result, extraData) {
    var data = result.data;
    if (typeof (data) != "undefined") {
        $.each(data, function (i, e) {
            //$(".article-list[article_id="+e.articleId+"]")
            extraData.parentNode.find(".article-list[article_id=\"" + e.articleId + "\"],.i-article-ranking[article_id=\"" + e.articleId + "\"]").find(".abs-num").text(e.viewCount).removeClass('hidden').show().parent(".hidden").removeClass("hidden").show();
            extraData.parentNode.find(".article-list[article_id=\"" + e.articleId + "\"],.i-article-ranking[article_id=\"" + e.articleId + "\"]").find(".html-num").text(e.htmlViewCount).removeClass('hidden').show().parent(".hidden").removeClass("hidden").show();
            extraData.parentNode.find(".article-list[article_id=\"" + e.articleId + "\"],.i-article-ranking[article_id=\"" + e.articleId + "\"]").find(".pdf-num").text(e.pdfDownCount).removeClass('hidden').show().parent(".hidden").removeClass("hidden").show();
            // extraData.parentNode.find(".article-list[article_id=" + e.articleId + "],.i-article-ranking[article_id=" + e.articleId + "]").find(".pdf-size").text(e.pdfFileSizeInt).removeClass('hidden').show().parent(".hidden").removeClass("hidden").show();
            var abs = e.abstractInfo;//自定义摘要
            if (!isNull(abs)) {
                try {
                    //用于替换列表中显示的摘要
                    //$("#"+e.articleId).find(".search-article-abstract").html(abs);
                    //根据列表输出的样式判断，如果缺样式，请补全
                    $(".article-list[article_id=\"" + e.articleId + "\"]").find(".hidden_line_show").html(abs);
                } catch (e) {
                    console.log(e);
                }
            }
            //自定义图片的显示
            var pic = e.picPaths;
            if (!isNull(pic)) {
                try {
                    //根据实际情况进行复制
                    $(".article-list[article_id=\"" + e.articleId + "\"]").find(".listpic &gt; a &gt; img").src(pic);
                } catch (e) {
                    console.log(e);
                }
            }
        })
    }
    if (window.afterArticleMetric) {
        afterArticleMetric();
    }
}

/**
 * ajax加载页面/数据后需要重新渲染的js效果
 * 如$(function())中执行的代码
 * 如插件调用代码 mathJax.js  rhhz.js
 * 此方法中的代码有待讨论，涉及使用处top_articles.js获取文章列表后
 * TODO:
 * @return
 */
function refreshAfterAjaxLoad() {
    //再次渲染字符串截取
    $(".require_sub").subTextMax({ trim: false });
    /**
     * base3、base4中找不到相关代码，待删除
     * TODO:
     */
    //TOP
    $("#title a").each(function (index) {
        $(this).mouseover(function () {
            $("#title .titsh").removeClass("titsh");
            $("#content .consh").removeClass("consh");
            $(this).addClass("titsh");
            $("#content&gt;div:eq(" + index + ")").addClass("consh");
        })
    })
    //加载文章列表计量信息
    /**
     * 加载文章列表计量信息
     * 此功能考虑移入article-list加载后的统一处理方法内，待移动，待处理
     * 本文件内的loadArticleMetricByIds()
     * 本文件内的outArticleMetric()
     * TODO:
     */
    // loadArticleMetricByIds();
    //加载优先发表状态
    /**
     * 加载优先发表状态
     * 此功能考虑移入article-list加载后的统一处理方法内，待移动，待处理
     * 本文件内的loadArticleReleaseInfoByIds()
     * 本文件内的outArticleReleaseInfo
     * 
     * TODO:
     */
    loadArticleReleaseInfoByIds();
    //加载文章列表被引信息
    /**
     * 加载文章列表被引信息
     * 下方有二次调用
     * 此功能考虑移入article-list加载后的统一处理方法内，待移动，待处理
     * 本文件内的loadArticleCitedByIds()
     * 本文件内的outArticleCitedByInfo()
     */
    // loadArticleCitedByIds();
    //加载文章列表附带图片列表信息
    /**
     * base4初期版本使用，已废弃，待处理，待删除
     * 本文件内的loadArticleFigLists()
     * 本文件内的outArticleFigLists()
     * TODO:
     */
    // loadArticleFigLists();
    //再次渲染字符串截取
    // 待删除，无使用 TODO:
    // $(".require_sub").subTextMax({ trim: false })
    //再次点击回到顶部
    // base3中已无此.bottom-backTop，待删除 TODO:
    // $(".bottom-backTop").click(function () {
    //     $("html,body").animate({ scrollTop: 0 }, 500);
    // })

    // colorbox 弹出框
    // $(".group2").colorbox({rel:'group2',width:'90%',height:"75%",opacity:'0.8'});

    //解决文章详情页图片公式路径问题，以前的只针对全文公式
    replaceArticleGraphicPath();
    if (window.MathJax &amp;&amp; MathJax.Hub || (document.addEventListener('mathjaxLoaded', function () {
        MathJax.Hub.Queue(["Typeset", MathJax.Hub]);
    }))) {
        MathJax.Hub.Queue(["Typeset", MathJax.Hub]);
    }


}

/**
 * 解决文章详情页图片公式路径问题，以前的只针对全文公式
 */
function replaceArticleGraphicPath() {
    // 解决文章详情页图片公式路径问题，以前的只针对全文公式
    var allPath = $("#allSrc").val();
    if (allPath != undefined) {
        if ($(".article-abstract img,.article-info-en img").length &gt; 0) {
            $(".article-abstract img,.article-info-en img").each(function () {
                var src = $(this).attr("src");
                if(src){
                    if (src.indexOf("/file") &lt; 0 &amp;&amp; src.indexOf("http://") == "-1" &amp;&amp; src.indexOf("https://") == "-1") {
                        $(this).attr({ "src": allPath + src });
                    }
                }
            })
        }
    }
}

/**
 * 搜索表单添加token，考虑移动位置
 */
function getFormToken() {
    var ajaxArg = {
        url: basePath + "getToken",
        returnFun: outFormToken
    };
    ajaxPost(ajaxArg);
}

function outFormToken(result) {
    var token = result.token;
    $(".formToken").val(token);
}

/**
 * 批量查询文章发布状态信息
 * @return
 */
function loadArticleReleaseInfoByIds() {
    var idArray = [];
    $(".article-list-latest").each(function (i, e) {
        var articleId = $(e).attr("article_id");
        if (!isNull(articleId)) {
            idArray.push(articleId);
        }
    })

    if (idArray.length &gt; 0) {
        var ids = idArray.toString();
        var ajaxArg = {
            url: basePath + "article/getArticleReleaseProgress",
            data: { 'articleIds': ids },
            returnFun: outArticleReleaseInfo
        };
        ajaxPost(ajaxArg);
    }
}

/**
 * 输出列表中的文章状态信息
 * @param data
 * @param indexArray
 * @return
 */
function outArticleReleaseInfo(result) {
    var data = result.data;
    if (typeof (data) != "undefined" &amp;&amp; data != null) {
        $.each(data, function (i, e) {
            $(".article-list[article_id=" + e.articleId + "]").find(".current_state").html(e.currentState);
            $(".article-list[article_id=" + e.articleId + "]").find(".current_state_en").html(e.currentStateEn);
            $(".article-list[article_id=" + e.articleId + "]").find(".latest_update").html(e.maxLastReleaseTime);
            $(".article-list[article_id=" + e.articleId + "]").find(".latest_update_span").show();
        })
    }
}
/**
 * base4初期版本，已废弃，待处理，待删除
 * TODO:
 */
/*
function loadArticleFigLists() {
    var picListIdArray = [];
    var firstPicIdArray = [];
    $(".article-list").each(function (i, e) {
        var articleId = $(e).attr("article_id");
        if (!isNull(articleId)) {
            if ($(e).find(".articleFirstPic").length &gt; 0) {
                firstPicIdArray.push(articleId);
            }
            if ($(e).find(".articlePicList").length &gt; 0) {
                picListIdArray.push(articleId);
            }
        }
    })
    if (picListIdArray.length &gt; 0) {
        var picListIds = picListIdArray.toString();
        var ajaxArg = {
            url: local_host + "article/getFigureListHtmlInArticleList",
            data: { 'ids': picListIds, 'language': $("#language").val() },
            returnFun: outArticleFigLists
        };
        ajaxPost(ajaxArg);
    }
    if (firstPicIdArray.length &gt; 0) {
        var firstPicIds = firstPicIdArray.toString();
        var ajaxArg = {
            url: local_host + "article/getFigureListHtmlInArticleList",
            data: { 'ids': firstPicIds, 'language': $("#language").val(), 'tplName': 'first_article_figure_' + $("#language").val() },
            returnFun: outArticleFirstFig
        };
        ajaxPost(ajaxArg);
    }
}

function outArticleFigLists(result) {
    var data = result.data;
    if (typeof (data) != "undefined" &amp;&amp; data != null) {
        $.each(data, function (i, e) {
            $(".article-list[article_id=" + i + "]").find(".articlePicList").html(e);
        })
    }
}

function outArticleFirstFig(result) {
    var data = result.data;
    if (typeof (data) != "undefined" &amp;&amp; data != null) {
        $.each(data, function (i, e) {
            $(".article-list[article_id=" + i + "]").find(".articleFirstPic").html(e);
        })
    }
}
*/

/**
 * 加载访问者数量
 * 未使用
 * @return
 */
function accessCount() {
    $.ajax({
        type: 'post',
        url: basePath + "tongji/getBaiDuTongJi",
        data: "",
        dataType: 'json',
        success: function (res) {
            var jsonObj = jQuery.parseJSON(res);
            var json = jsonObj.body.data[0].result.items;
            if (json != undefined &amp;&amp; json != "") {
                //pv_count 浏览次数 ，visitor_count 访问者数量 ， ip_count ip访问数量（按顺序）
                var resFilds = jsonObj.body.data[0].result.fields;
                var fild = "";
                var ipArea = "";
                var result = "";
                for (var i = 0; i &lt; resFilds.length; i++) {
                    if (resFilds[i] == "visitor_count") {
                        fild = i - 1;
                    }
                }
                for (var i = 0; i &lt; json.length; i++) {
                    var jValue = json[i];
                    if (i == 0) {
                        for (var j = 0; j &lt; jValue.length; j++) {
                            if (basePath.indexOf(jValue[j][0].name) &gt; 0) {
                                ipArea = j;
                            }
                        }
                    } else {
                        for (var j = 0; j &lt; jValue.length; j++) {
                            var jcount = jValue[j];
                            if (ipArea == j) {
                                result = jcount[fild];
                            }
                        }
                        jValue[ipArea];
                    }
                }
                $(".accessCount").html(result);
            }
        }
    })
}
/**
 * 复制引用信息到剪切板
 * @return
 */
function copyArticle(obj) {
    var info = '';
    $('#copyReference .citation').each(function (i, e) {
        info = info + $(e).text().trim() + '\n';
    })
    copyToClipboard(info, obj);
}
function copyArticle2(obj) {
    var info = $(obj).parents("table").siblings(".copyCitationInfo").text().trim();
    copyToClipboard(info, obj);
}
/**
 * 将信息复制到剪切板
 * @param info
 * @return
 */
function copyToClipboard(info, obj) {
    if (!navigator.clipboard) {
        var oInput = document.createElement('input');
        oInput.value = info;
        document.body.appendChild(oInput);
    }
    setTimeout(function () {
        if (!navigator.clipboard) {
            $(oInput).select(); // 选择对象	
            document.execCommand("Copy");
            oInput.className = 'oInput';
            oInput.style.display = 'none';
        } else {
            navigator.clipboard.writeText(info)
        }
        if ($(obj).parents("table").siblings(".copyCitationInfo").hasClass("copyCitationInfo-en") || $("#language").val() == "en") {
            alert("copy citation success");
        } else {
            alert("复制成功");
        }
    }, 500);
}

/**
 * 直接初始化弹出框
 */

// 英文文章详情页Get Citation弹出
// 添加到英文文章详情页js中
$(".download-btn").click(function () {
    $("#exportCitationModal").css({ "opacity": "1" })
});
// colorbox 弹出框
/*  
$(".group2").colorbox({rel:'group2',width:'90%',height:"75%",opacity:'0.8'});
$(".group3").colorbox({rel:'group3',width:'90%',height:"75%",opacity:'0.8',
    onComplete:function(){
        $("#cboxTitle").niceScroll({  
            cursorcolor:"transparent",  
            cursoropacitymax:1,  
            touchbehavior:false,  
            cursorwidth:"5px",  
            cursorborder:"0",  
            cursorborderradius:"5px"  
        });
        //渲染数学公式
        //MathJax.Hub.Queue(["Typeset", MathJax.Hub]);

}
});
$(".group4").colorbox({rel:'group4',width:'90%',height:"75%",opacity:'0.8',inline:true});
 */

/**
 * 关系图
 * @param type
 * @param q
 * @return
 */
function getRelationship() {
    var url = basePath + "article/getRelationship";
    var myChart = "";
    $.ajax({
        type: 'post',
        url: url,
        data: { 'id': $("#articleId").val() },
        async: false,
        dataType: 'json',
        success: function (dataMap) {
            var webkitDep = null;
            for (var key in dataMap) {
                if (key == "keyword") {
                    myChart = echarts.init(document.getElementById('keywordEcharts'));
                } else if (key == "author") {
                    myChart = echarts.init(document.getElementById('authorEcharts'));
                }
                /**
                if(key == "keywordCn"){
                    myChart = echarts.init(document.getElementById('keywordCnEcharts'));
                }else if(key == "keywordEn"){
                    myChart = echarts.init(document.getElementById('keywordEnEcharts'));
                }else if(key == "authorCn"){
                    myChart = echarts.init(document.getElementById('authorCnEcharts'));
                }else if(key == "authorEn"){
                    myChart = echarts.init(document.getElementById('authorEnEcharts'));
                }
                */
                webkitDep = dataMap[key];
                myChart.showLoading({
                    text: "Data loading..."
                });
                myChart.hideLoading();
                var categories = webkitDep.categories;
                var categoryArray = new Array();
                $(categories).each(function (i, val) {
                    categoryArray.push(val.name);
                });
                //alert(sds);
                var option = {
                    legend: {
                        data: categoryArray//此处的数据必须和关系网类别中name相对应
                    },
                    series: [{
                        type: 'graph',
                        layout: 'force',
                        animation: false,
                        label: {
                            normal: {
                                show: true,
                                position: 'right'
                            }
                        },
                        draggable: true,
                        data: webkitDep.nodes.map(function (node, idx) {
                            node.id = idx;
                            return node;
                        }),
                        categories: webkitDep.categories,
                        force: {
                            edgeLength: 105,//连线的长度
                            repulsion: 100  //子节点之间的间距
                        },
                        edges: webkitDep.links
                    }]
                };
                myChart.setOption(option);
                //绑定图表节点的点击事件
                myChart.on('click', function (param) {
                    var option = myChart.getOption();
                    var data = param.data;
                    //判断节点的相关数据是否正确
                    if (data != null &amp;&amp; data != undefined) {
                        if (data.url != null &amp;&amp; data.url != undefined) {
                            //根据节点的扩展属性url打开新页面
                            window.open(basePath + data.url);
                        }
                    }
                });
            }
        }
    })
}

/**
 * 新闻访问量动态记录
 */

var newsId = $("#newsId").val();
/*
if (!isNull(newsId)) {
    var ajaxArg = {
        url: basePath + "common/newsBrowseNum",
        data: {
            'newsId': newsId
        },
        returnFun: refreshBrowserNum,
    };
    ajaxPost(ajaxArg);
}
*/

/**
 * 刷新输出新闻访问次数
 * @param data
 * @return
 */
function refreshBrowserNum(data) {
    $(".browseNumCon").text(data.browseNum);
}

/**
 * article_base.js
 *
 */

/**
 * 文章导出引用信息到文件
 * e：object，当前对象
 * */
function toExportCitation(e, pageType) {
    var ids = $(e).attr("article_id");
    if (typeof (ids) == "undefined" || ids == null || ids == "") {
        ids = window.articleId;
    }
    var pageType = "";
    if ($("#language").val() == "en") {
        pageType = "en";
    } else {
        pageType = "cn";
    }
    if (ids != "") {
        //alert(ids);
        var type = $("input[name='format']:checked").val();
        //1 包含摘要   0不包含摘要
        var content = $("input[name='content']:checked").val();
        filePath = basePath + "article/exportCitation?ids=" + ids + "&amp;fileType=" + type + "&amp;isAbs=" + content + "&amp;language=" + pageType;
        window.location.href = filePath;
        $(".li_excel_box").hide();
        $(".modal-bg").hide();
    } else {
        if ($("#language").val() == "cn") {
            alert("文章信息有误，请核对！");
        } else {
            alert("Article information is wrong, please check!");
        }
    }
}



//下载xml
/*
function toExportXML(articleId) {
    //window.location.href=local_host+"article/exportXML?ids="+articleId+"&amp;downType=XML";
    var url = basePath + "article/exportXML?ids=" + articleId + "&amp;downType=XML";
    var down = document.createElement('a');
    down.href = url;
    down.download = '';
    document.body.appendChild(down);
    down.click();
    down.remove();
}
*/
//下载xml
function toExportXML(articleId, language) {
    if (language) {
        language = "en";
        //window.location.href=basePath+"article/exportXML?ids="+articleId+"&amp;downType=XML"+"&amp;language="+language;
        var url = basePath + "article/exportXML?ids=" + articleId + "&amp;downType=XML" + "&amp;language=" + language;
        var down = document.createElement('a');
        down.href = url;
        down.download = '';
        document.body.appendChild(down);
        down.click();
        down.remove();
    } else {
        //window.location.href=basePath+"article/exportXML?ids="+articleId+"&amp;downType=XML";
        var url = basePath + "article/exportXML?ids=" + articleId + "&amp;downType=XML";
        var down = document.createElement('a');
        down.href = url;
        down.download = '';
        document.body.appendChild(down);
        down.click();
        down.remove();
    }
}

/**
 * 将表格导出csv文件
 * @param tableId
 * @param type para : table 文章详情页中的图表示
 * @return
 */
function downloadCsv(id, type) {
    //window.location.href=local_host+"article/exportCsv?id="+id+"&amp;type="+type;
    var url = basePath + "article/exportCsv?id=" + id + "&amp;type=" + type;
    var down = document.createElement('a');
    down.href = url;
    down.download = '';
    document.body.appendChild(down);
    down.click();
    down.remove();
}

//table缩略图svg不显示,识别不了&amp;nbsp和&lt;hr&gt;,替换掉它们
function nbsp(el) {
    var tableSon = $(el);
    for (var i = 0; i &lt; tableSon.length; i++) {
        var test = tableSon[i].innerHTML;
        test = test.replace(/&amp;nbsp;/ig, "");
        test = test.replace(/&lt;hr&gt;/ig, "");
        tableSon[i].innerHTML = test;
    }
}
/**
 * 显示全文sub表格图片
 */
function createTableSub() {
    $('.table-body').find('br').remove();
    $('td').find('br').remove();
    $(".table_content table").each(function (i, e) {
        var subImg = $(e).parents(".figure").find(".article_table_fullText img");
        //html2Img($(e),subImg);
    })
}
//window.onload = function(){
//	alert(123)
//	 //文章页右侧没有图时，走svg表
//    if($(".table_fig_div").attr("isShow") == 0){
//    	var temp_table = nbsp($(".table_fig_div table"));
//    	html2Img(temp_table,$(".table_fig_right"));
//    }
//}

function html2Img1(Obj, imgObj, widthW, heightH) {
    //var htmlContent = $(Obj).prop("outerHTML");
    var reg = new RegExp('&lt;br&gt;', "g")
    var htmlContent = $(Obj).prop("outerHTML").replace(reg, '&lt;br /&gt;');

    var data = "data:image/svg+xml," +
        "&lt;svg xmlns='http://www.w3.org/2000/svg' width='" + widthW + "' height='" + heightH + "'&gt;" +
        "&lt;foreignObject width='2000' height='100%'&gt;" +
        "&lt;div xmlns='http://www.w3.org/1999/xhtml' style='font-size:16px;font-family:Helvetica'&gt;" +
        htmlContent +
        "&lt;/div&gt;" +
        "&lt;/foreignObject&gt;" +
        "&lt;/svg&gt;";
    $(imgObj).attr("src", data);
}

function html2Img(Obj, imgObj) {
    html2Img1(Obj, imgObj, "210", "179")
}

/**
 * 下载大图
 * @param id figureId : paragraphElementId
 * @param type para : figure 文章详情页中的图表示
 * @return
 */
function downloadImg(id, type) {
    //window.location.href=local_host+"article/exportImg?id="+id+"&amp;type="+type;	
    var url = basePath + "article/exportImg?id=" + id + "&amp;type=" + type;
    var down = document.createElement('a');
    down.href = url;
    down.download = '';
    document.body.appendChild(down);
    down.click();
    down.remove();
}

/**
 * 导出ppt
 * @param figName
 * @param articleId
 * @param title
 * @param titleEn
 * @return
 */
function downloadPPT(id, type) {
    //window.location.href=local_host+"article/exportPPT?id="+id+"&amp;type="+type;
    var url = basePath + "article/exportPPT?id=" + id + "&amp;type=" + type;
    var down = document.createElement('a');
    down.href = url;
    down.download = '';
    document.body.appendChild(down);
    down.click();
    down.remove();
}

//ajax异步加载文章的下载量、访问量
// 疑似已废弃，无调用
function ajaxDownVisitArticleCount() {
    if ($("#articleId").length &gt; 0) {
        $.ajax({
            type: 'post',
            url: basePath + 'article/getDownLookCount',
            data: { 'articleId': $("#articleId").val() },
            success: function (_resultdata) {
                if (_resultdata != "null") {
                    //下载量
                    var _downCount = _resultdata['pdfDownCount'];
                    if (null == _downCount || "" == _downCount) {
                        _downCount = 0;
                    }
                    //访问量
                    var _viewCount = _resultdata['viewCount'];
                    if (null == _viewCount || "" == _viewCount) {
                        _viewCount = 0;
                    }
                    //html浏览
                    var _htmlViewCount = _resultdata['htmlViewCount'];
                    if (null == _htmlViewCount || "" == _htmlViewCount) {
                        _htmlViewCount = 0;
                    }
                    //PDF大小
                    var _pdfSize = _resultdata['pdfFileSize'];
                    if (null == _pdfSize || "" == _pdfSize) {
                        _pdfSize = 0;
                    }
                    $("#downloadArticleCount").text(_downCount);
                    $("#visitArticleCount").text(_viewCount);
                    $("#htmlViewCount").text(_htmlViewCount);
                    $("#pdfSize").text(_pdfSize &gt; 0 ? "(" + _pdfSize + "KB)" : "0KB");
                }
            }
        })
    }
}

/**
 * 判断设备
 */
function browserRedirect() {
    var sUserAgent = navigator.userAgent.toLowerCase();
    var bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
    var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
    var bIsMidp = sUserAgent.match(/midp/i) == "midp";
    var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";
    var bIsUc = sUserAgent.match(/ucweb/i) == "ucweb";
    var bIsAndroid = sUserAgent.match(/android/i) == "android";
    var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
    var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
    //document.writeln("您的浏览设备为：");  
    if (bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM) {

    } else {
        var val = $('.article-nav li:contains(Full Text(HTML))').attr('articleId'); //获取
    }
}
browserRedirect();
/**
 * 缓存对象
 * 移动到allData
 */
/*
var cacheObj = {
    cache: {},
    set: function (content, id, val) {
        this.cache[content + id] = val
    },
    get: function (content, id, ajaxF) {
        return this.cache[content + id]
    },
    clearCache: function () {
        this.cache = {}
    }
};
*/

/**
 * ajax获取图表数据
 * 未使用
 * @param articleId
 */
var ajaxFigTabNum = 0;
function ajaxFigTab(articleId) {
    if (ajaxFigTabNum != 0) {
        return;
    }
    ajaxFigTabNum++;
    $.ajax({
        url: basePath + 'article/figTab',
        async: false,
        type: 'get',
        data: { 'id': articleId },
        success: function (data) {
            if (!data.access == false) {
                window.location.href = basePath + 'member/login';
                //alert(data.message);
            } else {
                $('#figTab').html(data)
                $(".group2").colorbox({ rel: 'group2', width: '90%', height: "75%", opacity: '0.8' });

                //重置表格是图片的方法
                setTableImg();
                //重置图表中的href链接
                resetHref();
                //去除表格是图片的border
                removeTableBorder();
                //添加弹出框标题的滚动
                $("#cboxTitle").niceScroll({
                    cursorcolor: "transparent",
                    cursoropacitymax: 1,
                    touchbehavior: false,
                    cursorwidth: "5px",
                    cursorborder: "0",
                    cursorborderradius: "5px"
                });
            }
        }
    });
    //渲染数学公式
    if (window.MathJax &amp;&amp; MathJax.Hub || (document.addEventListener('mathjaxLoaded', function () {
        MathJax.Hub.Queue(["Typeset", MathJax.Hub]);
    }))) {
        MathJax.Hub.Queue(["Typeset", MathJax.Hub]);
    }
}
/**
 * 加载文章发布历程信息
 */
function loadArticleReleaseProgressAjax(articleId) {
    $.ajax({
        type: 'post',
        url: basePath + 'article/loadArticleReleaseProgressAjax',
        data: { 'articleId': $("#articleId").val() },
        success: function (_resultdata) {
        }
    })
}

/**
 * 统计图表数目
 * @return
 */
function loadTableAndFigureCount() {
    var figureCount = $(".article-box.article-box3 ._figclass").length;
    var tableCount = $(".article-box.article-box3 .article_table_fullText").length;
    var figTableNum = "";
    if (figureCount &gt; 0) figTableNum += "figure(" + figureCount + ")";
    if (tableCount &gt; 0) figTableNum += "table(" + tableCount + ")";
    $("#fig_table_num").text(figTableNum);
}

//判断com-author-wrap内容如果为空，下拉三角不显示
function hideComDrop() {
    var comAuthorWrap = $(".com-author-wrap").text().trim();
    //alert(comAuthorWrap);
    if (comAuthorWrap == "") {
        $(".com-drop").hide();
    }
}
var currentTab = "abs";     // abs(摘要) || html（全文） || fig（图表） || ref （参考文献）|| sup（附件） || rel（相关文章）
//文章详情页调用统计功能
//ajaxDownVisitArticleCount();
//页面加载缩略图显示真实数据调用
//createTableSub();
//去除表格是图片的border
removeTableBorder();
//重置搜索结果页图片路径
setTableImg();
//调整全文中公式是图片的路径
resetFormulaSrc();
//隐藏通讯作者下拉箭头
if ($(".com-author-wrap").length &gt; 0) {
    hideComDrop();
}
currentTab = $('.article-nav ul li.current').attr("rel");
//处理作者标签，如果以,结尾 去除最后一个,
$("sup.authorTag,.article-author,.article-keyword").each(function (i, e) {
    var tagText = $(e).text().trim();
    if (tagText.endWith(",")) {
        var tagHtml = $(e).html().trim();
        $(e).html(tagHtml.substring(0, tagHtml.length - 1));
    }
})

//重置图表中的href链接
function resetHref() {
    $(".article-box3 a[ref-type='fig']").each(function (i, e) {
        var resetFigHref = $(e).attr("href");
        var resetFigureNum = Number(resetFigHref.substring(7)); //提取图的数字
        //alert(resetfigureNum);
        resetFigHref = $(e).attr({ "href": "#Fig-Figure" + resetFigureNum + "" });
    })
    $(".article-box3 a[ref-type='table']").each(function (i, e) {
        var resetTableHref = $(e).attr("href");
        var resetTableNum = Number(resetTableHref.substring(6)); //提取表的数字
        //alert(resetfigureNum);
        resetTableHref = $(e).attr({ "href": "#Fig-Table" + resetTableNum + "" });
    })
}
/**
 * 调整图表内容中的图片路径
 * @return
 */
function setTableImg() {
    var path = $("#allSrc").val();
    $(".table_content .graphic").each(function (i, e) {
        if ($(e).attr("src").indexOf(path) === -1) {
            $(e).attr("src", path + $(e).attr("src"));
        }
    })
}

//调整全文中公式是图片的路径
function resetFormulaSrc() {
    var path = $("#allSrc").val();
    //	$(".formula").each(function(i,e){
    //		var obj = $(e).find("img");
    //		if(obj.length==0)return true;
    //		var src = obj.attr("src");
    //		if(src.indexOf(path)==-1){
    //			src = path+src;
    //		}
    //		var onerror = src.replace(/.jpg/,".png");
    //		obj.attr("onerror","this.onerror=null;this.src='"+onerror+"'").attr("src",src);
    //	})
    //	$(".inline-graphic").each(function(i,e){
    //		if($(".inline-graphic").length==0) return true;
    //		var src = $(this).attr("src");
    //		if(src.indexOf(path)==-1){
    //			src = path+src;
    //		}
    //		var onerror = src.replace(/.jpg/,".png");
    //		$(this).attr("onerror","this.onerror=null;this.src='"+onerror+"'").attr("src",src);
    //	})
    //	
    //	$("inline-formula").each(function(i,e){
    //		var obj = $(e).find("img");
    //		if(obj.length==0)return true;
    //		var src = obj.attr("src");
    //		if(src.indexOf(path)==-1){
    //			src = path+src.replace(/PIC\//,'');
    //		}
    //		var onerror = src.replace(/.jpg/,".png");
    //		obj.attr("onerror","this.onerror=null;this.src='"+onerror+"'").attr("src",src);
    //	});

    $("#htmlContent img,#FullText img,#figTab img").each(function () {
        //		var obj = $(e).find("img");
        if ($(this).length == 0) return true;
        var src = $(this).attr("src");
        //此行会导致只有图片名的路径return if(src &amp;&amp; src.indexOf('http') == -1) return true;

        if (src &amp;&amp; src.indexOf('/style/images/') == -1) {
            if (src.replace(/\//g, '').replace(/\\/g, '').indexOf(path.replace(/\//g, '').replace(/\\/g, '')) == -1) {
                src = path + src.replace(/PIC\//, '');
            }
            var onerror = src.replace(/.jpg/, ".png");
            $(this).attr("onerror", "this.onerror=null;this.src='" + onerror + "'").attr("src", src);
        }
    })

    $("inline-formula").each(function () {
        var num = $(this).find("alternatives .graphic");
        if (num.length &gt; 1) {
            $(this).find("alternatives .graphic:first").show().siblings().hide();
        }
    });
}

//判断图表中是否含有图片
function removeTableBorder() {
    var tableImg = $(".table_content table").find("img");
    tableImg.parents(".table_content table").css({ "border-bottom": "0" });
}

/**
 *article.js
 * 
 */
$(document).ready(function () {
    createContents();
    if (currentTab == "html" || currentTab == "fig") {
        $(".article_ceil_wrap").find(".article_catalog span").show();
        //目录数据
        catalogTree();
    } else {
        $(".article_ceil_wrap").find(".article_catalog span").hide();
    }
    //去掉栏目空格
    var str = $('.article-info-title').html();
    if (str == '&amp;nbsp;') {
        $(".article-info-title").remove();
    }

    $(".article-author span:last,.article-keyword span:last").each(function (i, e) {
        var tagText = $(e).text().trim();
        if (tagText.endWith(",")) {
            var tagHtml = $(e).html().trim();
            $(e).html(tagHtml.substring(0, tagHtml.length - 1));
        }
    })
    //文章详情页tab栏切换
    $('.article-nav ul li').click(function () {
        currentTab = $(this).attr("rel");
        // $(this).addClass('current').siblings().removeClass('current');
        // index = $(this).index();
        // $('.article-box').eq(index).addClass('current').siblings().removeClass('current');
        createContents();
        if (currentTab == "html") {
            //图表链接点击跳转大图
            //showBigFigTable();
            //渲染数学公式
            if (window.MathJax &amp;&amp; MathJax.Hub || (document.addEventListener('mathjaxLoaded', function () {
                MathJax.Hub.Queue(["Typeset", MathJax.Hub]);
            }))) {
                MathJax.Hub.Queue(["Typeset", MathJax.Hub]);
            }
            // colorbox 弹出框
            $(".group2").colorbox({
                rel: 'group2', width: '90%', height: "75%", opacity: '0.8',
                onComplete: function () {
                    $("#cboxTitle").niceScroll({
                        cursorcolor: "transparent",
                        cursoropacitymax: 1,
                        touchbehavior: false,
                        cursorwidth: "5px",
                        cursorborder: "0",
                        cursorborderradius: "5px"
                    });
                    //渲染数学公式
                    if (window.MathJax &amp;&amp; MathJax.Hub || (document.addEventListener('mathjaxLoaded', function () {
                        MathJax.Hub.Queue(["Typeset", MathJax.Hub]);
                    }))) {
                        MathJax.Hub.Queue(["Typeset", MathJax.Hub]);
                    }
                }
            });
            $(".group3").colorbox({
                rel: 'group3', width: '90%', height: "75%", opacity: '0.8',
                onComplete: function () {
                    $("#cboxTitle").niceScroll({
                        cursorcolor: "transparent",
                        cursoropacitymax: 1,
                        touchbehavior: false,
                        cursorwidth: "5px",
                        cursorborder: "0",
                        cursorborderradius: "5px"
                    });
                    //渲染数学公式
                    if (window.MathJax &amp;&amp; MathJax.Hub || (document.addEventListener('mathjaxLoaded', function () {
                        MathJax.Hub.Queue(["Typeset", MathJax.Hub]);
                    }))) {
                        MathJax.Hub.Queue(["Typeset", MathJax.Hub]);
                    }
                }
            });
            $(".group4").colorbox({
                rel: 'group4', width: '90%', height: "75%", opacity: '0.8', inline: true,
                onComplete: function () {
                    removeTableBorder();
                    $("#cboxTitle").niceScroll({
                        cursorcolor: "transparent",
                        cursoropacitymax: 1,
                        touchbehavior: false,
                        cursorwidth: "5px",
                        cursorborder: "0",
                        cursorborderradius: "5px"
                    });
                    //渲染数学公式
                    if (window.MathJax &amp;&amp; MathJax.Hub || (document.addEventListener('mathjaxLoaded', function () {
                        MathJax.Hub.Queue(["Typeset", MathJax.Hub]);
                    }))) {
                        MathJax.Hub.Queue(["Typeset", MathJax.Hub]);
                    }
                }
            });
        }
        if (currentTab == "html" || currentTab == "fig") {
            catalogTree();
            $(".article_ceil_wrap").find(".article_catalog span").show();
        } else {
            $(".article_ceil_wrap").find(".article_catalog span").hide();
        }
    })
    //目录导航超出显示滚动条
    head.ready('jquery.nicescroll.js', function(){
        $(".addScroll").niceScroll({
            cursorcolor: "transparent",
            cursoropacitymax: 1,
            touchbehavior: false,
            cursorwidth: "5px",
            cursorborder: "0",
            cursorborderradius: "5px"
        });
    })

    //作者展开功能
    $(".article-authors ul li span").click(function () {
        $(this).parent().toggleClass('current').siblings().removeClass('current');
    });
    /**目录导航**/
    $('.article_catalog').mouseover(function () {
        //$('.article_ceil_list').css({"height":"310px"});
        $('.article_ceil_list').stop().show();
    }).mouseout(function () {
        $('.article_ceil_list').stop().hide();
    })

    /**目录点击事件**/
    $(document).on("click", ".article_ceil_list li a", function () {
        var articleceilaid = $(this).attr('ref');
        $('.ceilfirst li').removeClass('active');
        $(this).parent().addClass('active');
        $("html,body").animate({
            scrollTop: $(articleceilaid).offset().top - 72 + "px"
        }, {
            duration: 500,
            easing: "swing"
        });
        $('.article_ceil_list').stop().hide();
    })
    //全文中的参考文献悬浮
    var refBoxHidetimer;
    var divShowHeight = $(".div_show").height();
    //     $(document).delegate(".articleBody sup","mouseenter",function(event){
    //    	 if($(this).find("span.xref").length&gt;0){
    //    		 $('.div_show').remove(); 
    //        	 var supText = $(this).text(); //输出格式为[2,10,13-15]
    //             var refIndexs = getRefSupIndex(supText); //输出数组2,10,13,14,15
    //             var refIndexsLength=refIndexs.length; //获取数组个数
    //             var greenBoxW = $(this).offset().left+8;
    //             var greenBoxY = $(this).offset().top+8;
    //             var supRightDis=$(window).width()-greenBoxW+8;
    //             
    //             var html='&lt;div class="div_show"&gt;';
    //    	         html+='&lt;table&gt;';
    //    	     for(var i = 0;i&lt;refIndexsLength;i++){
    //    	     	supLiterNum=refIndexs[i]-1;  //获取参考文献中的编号 
    //    	        	var supLiter=$($('.article-box5 .article-refer tbody tr').eq(supLiterNum).children('td')[1]).text(); //获取参考文献中的内容
    //    		     html +='&lt;tr&gt;';
    //    		     html +='&lt;td class="refer-td-first"&gt;'+refIndexs[i]+'.&lt;/td&gt;';
    //    		     html +='&lt;td&gt;'+supLiter+'&lt;/td&gt;';
    //    		     html +='&lt;/tr&gt;';
    //    	     }
    //    	     html += '&lt;/table&gt;';
    //    	     html += '&lt;em class="triangle-bg"&gt;&lt;/em&gt;';
    //    	     html += '&lt;em class="triangle-border"&gt;&lt;/em&gt;';
    //    	     html += '&lt;/div&gt;';
    //    	     $('body').append(html);
    //    	     if(supRightDis&lt;600){
    //            	$(".div_show").css({"width":supRightDis});
    //            }
    //    	    divShowHeight = $(".div_show").height();
    //            greenBoxW = $(this).offset().left-10;
    //            greenBoxY = $(this).offset().top-divShowHeight-10;
    //            $('.div_show').css({left:greenBoxW,top:greenBoxY}).show();	
    //            $("body").on("mouseenter",".div_show",function(){
    //            	 clearTimeout(refBoxHidetimer);
    //            });
    //            $("body").on("mouseleave",".div_show",function(){
    //                $('.div_show').remove();
    //            });
    //    	 }
    //     })
    //     $(document).delegate("sup","mouseleave",function(event){ 
    //    	 refBoxHidetimer = setTimeout(function () {  
    //    		 $('.div_show').remove(); 
    //        }, 100);
    //     })
    //全文中的图表点击显示大图 
    //	    $(document).delegate("a[ref-type='fig']","click",function(event){
    //	    	var href = $(this).attr("href");
    //	    	//阻止a链接默认行为
    //	    	event.preventDefault();
    //	    	$("img" + href).parent("a").click();
    //	    })
    //	    $(document).delegate("a[ref-type='table']","click",function(event){
    //	    	var href = $(this).attr("href");
    //	    	//阻止a链接默认行为
    //	    	event.preventDefault();
    //	    	$(".article_table_fullText&gt;a" + href).click();
    //	    })
    //全文显示图选项、表选项下拉菜单
    $(document).on("click", ".figure .div_btn", function () {
        $(this).parents(".figure").toggleClass('showBtn').siblings(".figure").removeClass('showBtn');
    });
});

//下拉显示通讯作者信息
function showAuthor(obj) {
    var openStatus = $(obj).hasClass("current");
    //alert(openStatus);
    if (openStatus) {
        $(obj).removeClass("current");
        $(obj).parent(".article-author").siblings(".com-author-wrap").stop().slideUp();
    } else {
        $(obj).addClass("current");
        $(obj).parent(".article-author").siblings(".com-author-wrap").stop().slideDown();
    }
}

//滚动显示目录导航
function createContents() {
    //alert(currentTab);
    $(window).scroll(function () {
        var articlescrolltop = $(document).scrollTop();
        if (articlescrolltop &gt;= 600) {
            $(".article_ceil_wrap").show();
            //$(".article-bomb-box-wrap").show();
            //$(".article-box-wrap").hide();
        } else {
            $(".article_ceil_wrap").hide();
            //$(".article-bomb-box-wrap").hide();
            //$(".article-box-wrap").show();
        }
        $('.article_ceil_list').stop().hide();
    })
}

/**
 * 创建文档结构树
 * @return
 */
function catalogTree() {
    $(".ceilfirst").empty();
    $(".figureCeilUl").empty();
    $(".tableCeilUl").empty();
    if (currentTab == "html") {
        var html = "";
        $(".article-box span.sec-title").each(function (i, e) {
            var level = $(e).attr("level");
            var href = $(e).attr("id");
            var title = $(e).text();
            html += '&lt;li class="sec_' + level + '"&gt;&lt;a ref="#' + href + '" href="#' + href + '"&gt;' + title + '&lt;/a&gt;&lt;/li&gt;';
        })
        $(".ceilfirst").empty().append(html);
        var figureHtml = "";
        var tableHtml = "";
        $(".ceilfirst").css({ "border-bottom": "1px solid #ccc" });
        $(".article-box2 .figure .figure_title a img").each(function (i, e) {
            var figureHref = $(e).attr("id");
            //alert(figureHref);
            var figureNum = Number(figureHref.substring(6)); //提取图的数字
            //alert(figureNum);
            //var figureTitle=$(e).find(".figure_caption p").eq(0).text();
            figureHtml += '&lt;li class="figureShow"&gt;&lt;i&gt;&lt;/i&gt;&lt;a href="#Figure' + figureNum + '" ref="#Figure' + figureNum + '"&gt;图' + figureNum + '&amp;nbsp;(Figure' + figureNum + ')&lt;/a&gt;&lt;/li&gt;';
        })
        $(".figureCeilUl").empty().append(figureHtml);

        $(".article-box2 .figure .article_table_fullText&gt;a").each(function (i, e) {
            var tableHref = $(e).attr("id");
            //alert(tableHref);
            var tableNum = Number(tableHref.substring(5)); //提取表的数字
            //var tableTitle=$(e).find(".table_caption p").eq(0).text();
            tableHtml += '&lt;li class="tableShow"&gt;&lt;i&gt;&lt;/i&gt;&lt;a href="#Table' + tableNum + '" ref="#Table' + tableNum + '"&gt;表' + tableNum + '&amp;nbsp;(Table' + tableNum + ')&lt;/a&gt;&lt;/li&gt;';
        })
        $(".tableCeilUl").empty().append(tableHtml);

    } else {
        var figureHtml = "";
        var tableHtml = "";
        $(".ceilfirst").css({ "border-bottom": "none" });
        $(".article-box3 .figure .figureTextBox a img").each(function (i, e) {
            var figureHref = $(e).attr("id");
            var figureNum = Number(figureHref.substring(10)); //提取图的数字
            //alert(figureNum);
            //var figureTitle=$(e).find(".figure_caption p").eq(0).text();
            figureHtml += '&lt;li class="figureShow"&gt;&lt;i&gt;&lt;/i&gt;&lt;a href="#Fig-Figure' + figureNum + '" ref="#Fig-Figure' + figureNum + '"&gt;Figure' + figureNum + '&lt;/a&gt;&lt;/li&gt;';
        })
        $(".figureCeilUl").empty().append(figureHtml);

        $(".article-box3 .figure .article_table_fullText").each(function (i, e) {
            var tableHref = $(e).attr("id");
            var tableNum = Number(tableHref.substring(9)); //提取表的数字
            //var tableTitle=$(e).find(".table_caption p").eq(0).text();
            tableHtml += '&lt;li class="tableShow"&gt;&lt;i&gt;&lt;/i&gt;&lt;a href="#Fig-Table' + tableNum + '" ref="#Fig-Table' + tableNum + '"&gt;Table' + tableNum + '&lt;/a&gt;&lt;/li&gt;';
        })
        $(".tableCeilUl").empty().append(tableHtml);

    }
    if (figureHtml == "" &amp;&amp; tableHtml == "") {
        $(".figureCeil h4").css({ "display": "none" });
    }
}

//调整全文中内容中图表点击显示大图old，已弃用，部分单刊网站有使用
function showBigFigTable() {
    $(".article-box2 .xref a[ref-type='fig']").each(function (i, e) {
        var figHref = $(e).attr("href");
        $(e).addClass("group3 cboxElement");
        //alert(figHref);
        var resetFigHref = $(figHref).parent("a").attr("href");
        var resetFigTitle = $(figHref).parent("a").attr("title");
        //alert(resetFigHref);
        $(e).attr("href", resetFigHref);
        $(e).attr("title", resetFigTitle);
    })
    $(".article-box2 .xref a[ref-type='table']").each(function (i, e) {
        var tableHref = $(e).attr("href");
        $(e).addClass("group4 cboxElement");
        //alert(tableHref);
        var resetTableHref = $(tableHref).attr("href");
        var resetTableTitle = $(tableHref).attr("title");
        //alert(resetFigHref);
        $(e).attr("href", resetTableHref);
        $(e).attr("title", resetTableTitle);
    })
}

/**
 * 批量查询Cited by
 * @param parentNode  查询文章所在的父级节点
 * @param dayString  查询文章计量信息所处的时间段，不填则为实时，30则为最近一个月（不含本月）
 * @return
 */
function loadArticleCitedByIds(parentNode, dayString) {
    if (!parentNode) {
        var parentNode = $("body");
    }
    var idArray = [];
    parentNode.find(".article-list, .i-article-ranking").each(function (i, e) {
        var articleId = $(e).attr("article_id");
        if (!isNull(articleId)) {
            idArray.push(articleId);
        }
    })

    if (idArray.length &gt; 0) {
        var ids = idArray.toString();
        var ajaxArg = {
            url: basePath + "article/getArticleCitedBy",
            data: { 'articleIds': ids },
            returnFun: outArticleCitedByInfo,
            extraData: { 'parentNode': parentNode }
        };
        // 根据 dayString 的存在与否添加属性
        if (dayString) {
            ajaxArg.data.dayString = dayString;
            ajaxArg.extraData.dayString = dayString;
        }
        ajaxPost(ajaxArg);
    }
}

/**
 * 输出列表中的文章citedBy信息
 * @param data
 * @param indexArray
 * @return
 */
function outArticleCitedByInfo(data, extraData) {
    if (typeof (data) != "undefined" &amp;&amp; data) {
        data = jQuery.parseJSON(data);
        $.each(data, function (i, e) {
            if (e.citedCount &gt; 0) {
                extraData.parentNode.find(".article-list[article_id=\"" + e.articleId + "\"]").find(".citedby-font").show();
                extraData.parentNode.find(".i-article-ranking[article_id=\"" + e.articleId + "\"]").find(".citedBy-num").show();
                extraData.parentNode.find(".article-list[article_id=\"" + e.articleId + "\"],.i-article-ranking[article_id=\"" + e.articleId + "\"]").find(".citedBy-num").html(e.citedCount);
            }
        })
    }
}

/**
 * 添加文章访问记录
 */
function getVisitInfo(id, viewType) {
    var pageType = $("#language").val();
    if (!isNull(pageType)) {
        $.ajax({
            type: 'post',
            url: basePath + "article/getVisitRecord",
            data: {
                'id': id,
                'viewType': viewType,
                'pageType': pageType
            },
            success: function (dataMap) {
            }
        })
    }
}

function searchLike(_searchFieldArr, _searchValArr, _searchConditionArr) {
    var tempform = document.createElement("form");
    var pageType = $('#language').val();
    if (pageType == "en") {
        tempform.action = basePath + "en/search";
    } else {
        tempform.action = basePath + "cn/search";
    }
    if ($("#sortField").length &gt; 0) tempform.action = tempform.action + "?sortField=" + $("#sortField").val()
    tempform.method = "post";
    tempform.style.display = "none";
    tempform.id = "rhQuickSearchForm";
    tempform.target = "_blank";
    var searchFieldOpt = document.createElement("input");
    searchFieldOpt.name = "searchField";
    searchFieldOpt.value = _searchFieldArr;
    tempform.appendChild(searchFieldOpt);
    var searchWordOpt = document.createElement("input");
    searchWordOpt.name = "searchWord";
    searchWordOpt.value = encodeURI(_searchValArr);
    tempform.appendChild(searchWordOpt);
    var searchTokenOpt = document.createElement("input");
    searchTokenOpt.name = "token";
    searchTokenOpt.value = "searchLike";
    tempform.appendChild(searchTokenOpt);
    var opt = document.createElement("input");
    opt.type = "submit";
    tempform.appendChild(opt);
    document.body.appendChild(tempform);
    tempform.submit();
}

/**
 * 以作者名搜索
 */
function searchLikeAuthorName(_searchFieldArr, _searchConditionArr) {
    var _searchValArr = $(event.currentTarget).attr("data-author")
    console.log(_searchValArr);
    searchLike(_searchFieldArr, _searchValArr, _searchConditionArr);
}

/**
 * 公式和图片切换
 */
$(function () {
    if (window.location.href.indexOf("viewType=HTML") &gt; -1) setTimeout(function () { resetImgHeight() }, 500)
    $(".html-text").click(function () { resetImgHeight() })
})
function switchFormula() {
    $(".formula-normalimg").hide();
    var formulatext = $(".switchFormula").text();
    //off是显示公式图片
    if (formulatext.indexOf('off') &gt; 1) {
        $(".switchFormula").text(formulatext.replace('off', 'on'));
        //处理段落公式
        $(".formula tbody tr td p").hide();
        $(".formula-labelText").hide();
        $(".formula tbody tr td.formulaTag").hide();
        // $(".formula tbody tr td p.img-formula").show();
        //处理行内公式
        $(".inline-formula-span").hide();
        $(".inline-formula-span").next().show();
        //布局外层不带p时
        $(".MathJax").hide();
        $("alternatives img").show();
        $(".formula tbody tr td p alternatives img").parents("p").show();
    } else {
        $(".switchFormula").text(formulatext.replace('on', 'off'));
        //处理段落公式
        $(".formula tbody tr td p").show();
        $(".formula-labelText").show();
        $(".formula tbody tr td.formulaTag").show();
        $(".formula tbody tr td p.img-formula").hide();
        //处理行内公式
        $(".inline-formula-span").show();
        $(".inline-formula-span").next().hide();
        //布局外层不带p时
        $(".MathJax").show();
        $(".formula tbody tr td p img").hide();
        // $("alternatives").hide();

    }

    resetImgHeight();

    $(".formula-img").click(function (event) {
        event.stopPropagation();
        var _src = $(this).attr("src");
        var _position = $(this).position();
        $(".formula-normalimg").show();
        $(".formula-normalimg img").attr("src", _src);
        $(".formula-normalimg").css({ "top": _position.top, "left": _position.left });
    })
    $(document).click(function (event) {
        $(".formula-normalimg").hide();
    })
}
function resetImgHeight() {
    setTimeout(function () {
        //中文
        //重置行内公式图片高度
        $("#htmlContent p inline-formula").each(function (i, e) {
            var _h = $(e).find(".inline-formula-span").height();
            $(e).find(".inline-formula-span").next(".formula-img").css("height", _h);
        })
        //重置段落公式图片高度(段落公式比较大的时候，采用下边的循环手动处理)
        /* $("#htmlContent table.formula").each(function(i,e){
            var _h = $(e).siblings("p").css("line-height").slice(0,-2) ,
               eImg =$(e).find("p.img-formula img").height();
            if(eImg &gt; (_h)*2)  $(e).find("p.img-formula img").css("height",eImg/2);
        })*/

        // 英文
        //重置行内公式图片高度
        $("#FullText p inline-formula").each(function (i, e) {
            var _h = $(e).find(".inline-formula-span").height();
            $(e).find(".inline-formula-span").next(".formula-img").css("height", _h);
        })
        //重置段落公式图片高度
        $("#FullText table.formula").each(function (i, e) {
            var _h = $(e).siblings("p").height();
            $(e).find("p.img-formula img").css("height", _h);
        })
    }, 300)
}


//下载新闻文件
function downloadFile(articleId, abbreviation) {
    var url = basePath + "news/checkNewsFile?id=" + articleId;
    if (isNull(articleId)) {
        url = basePath + "news/checkNewsFile?abbreviation=" + abbreviation;
    }
    $.ajax({
        type: "post",
        url: url,
        dataType: "json",
        success: function (data) {
            if (data.result == 'true') {
                var url = basePath + "news/exportNewFile";
                var form = $("&lt;form&gt;");   //定义一个form表单
                form.attr('style', 'display:none');   //在form表单中添加查询参数
                form.attr('target', '');
                form.attr('method', 'post');
                form.attr('action', url);

                var input1 = $('&lt;input&gt;');
                input1.attr('type', 'hidden');
                if (isNull(articleId)) {
                    input1.attr('name', 'abbreviation');
                    input1.attr('value', abbreviation);
                } else {
                    input1.attr('name', 'id');
                    input1.attr('value', articleId);
                }
                $('body').append(form);  //将表单放置在web中
                form.append(input1);   //将查询参数控件提交到表单上
                form.submit();
            } else {
                alert("文件不存在！");
            }
        },
        error: function () {
            alert("下载失败，请联系管理员！");
        }
    });
}

/**
 * 添加新闻访问记录
 */
function addNewsRecords() {
    var newsId = $("#newsId").val();
    if (!isNull(newsId)) {
        $.ajax({
            type: 'post',
            url: basePath + "getVisitNewsRecord",
            data: { 'id': newsId },
            success: function (dataMap) {
            }
        })
    }

}

/**
 * 加载栏目文章数量
 * @return
 */
function getCategoryArticleNumbers() {
    $.ajax({
        type: 'post',
        url: basePath + "article/getCategoryArticleNumbers",
        data: "",
        dataType: 'json',
        success: function (data) {
            $.each(data.list, function (i, e) {
                $('#' + e.id).html(e.categoryRemark);
            })

        }
    })
}
//栏目列表左侧页内搜索
function categorySearch() {
    $(".category-li li").removeClass("hide-li").removeClass("show-li");
    if ($("#language").val() == "en") {
        $(".catagory-more").text("Less");
    } else {
        $(".catagory-more").text("折叠")
    }

    var tempKey = $("#item-search").val();
    var reg = new RegExp(tempKey, "ig");
    $(".category-li li").each(function (i, e) {
        if (isNull($(e).find("a").text().trim().match(reg))) $(e).addClass("hide-li");
    })

}


function getTodayVisitCount() {
    $.ajax({
        type: 'post',
        url: basePath + "sowiseplugins/getTodayCount",
        data: "",
        dataType: 'json',
        success: function (data) {
            $(".todayVisitCount").html(data.totalvisit);
            $(".zaixianrenshu").html(data.keepusers);
            $(".totalVisitCount").html(data.allvisit);
        }
    })
}
function getLatestImpactFactor() {
    $.ajax({
        type: 'post',
        url: basePath + "journal/getLatestImpactFactor",
        data: "",
        dataType: 'json',
        success: function (data) {
            var impactFactor = data.impactFactor;
            $(".impactFactorCount").html(impactFactor.paperRejectionRate);
            $(".impactFactorYear").html(impactFactor.paperYear);

        }
    })
}


function exportSupplementary(id) {
    var url = basePath + "article/checkSupplement?id=" + id;
    $.ajax({
        type: "post",
        url: url,
        dataType: "json",
        success: function (data) {
            if (data.access != "true") {
                if (_language == "cn") {
                    alert(message[data.access].cn);
                } else {
                    alert(message[data.access].en);
                }
                // if (data.access != 'access denied') {
                //     $.ajax({
                //         type: "post",
                //         async: false,
                //         url: basePath + "user/nowUser",
                //         dataType: "text",
                //         success: function (data) {
                //             data = $.parseJSON(data);
                //             if(_language == "cn"){
                //             window.location.href = local_host + 'login.htm';
                //             }else{
                //             window.location.href = local_host + 'login_en.htm';
                //             }
                //         }
                //     })
                // }
            } else if (data.result == 'true') {
                var url = basePath + "article/exportSupplementary";
                var form = $("&lt;form&gt;");   //定义一个form表单
                form.attr('style', 'display:none');   //在form表单中添加查询参数
                form.attr('target', '');
                //form.attr('method', 'post');
                form.attr('action', url);

                var input1 = $('&lt;input&gt;');
                input1.attr('type', 'hidden');
                input1.attr('name', 'id');
                input1.attr('value', id);

                var input2 = $('&lt;input&gt;');
                input2.attr('type', 'hidden');
                input2.attr('name', 'pageType');
                input2.attr('value', $('#language').val());

                $('body').append(form);  //将表单放置在web中
                form.append(input1);   //将查询参数控件提交到表单上
                form.append(input2);
                form.submit();
            } else if (data.result == 'false') {
                var url = window.location.href;
                var pageType = getUrlParam("pageType") || pageTypeDefault;
                if (url.indexOf("_en.htm") &gt; 0 || pageType == "en") {
                    alert("File not found!")
                } else {
                    alert("文件不存在");
                }
                //$(".icon-user").click();
            }
        },
        error: function () {
            alert("下载失败，请联系管理员！");
        }
    });
    return false;
}

/*
 * 外链类型新闻计数
*/
function addLinkNewsRecords(newsId) {
    if (!isNull(newsId)) {
        $.ajax({
            type: 'post',
            url: basePath + "getVisitNewsRecord",
            data: { 'id': newsId },
            success: function (dataMap) {
            }
        })
    }
}

/**
 * 检测sowise-plugin.js是否加载
 */
function checkSowisePluginLoaded() {
    // 如果有sowiseTranslate，则加载完成，清除定时器
    if (window.sowiseTranslate) {
        setTableImg();
        // 清除定时器，停止轮询
        clearInterval(loadingSowisePlugin);
    }
}
// 每500毫秒检查一次脚本是否加载完成
var loadingSowisePlugin = setInterval(checkSowisePluginLoaded, 500);
</pre></body></html>