全馆预约到馆通知
  • 全馆图书催还通知 rIFrame_" + bookrecno).attr("src"); if(!url) { url = "/opac/series/currentissue/"+bookrecno+";jsessionid=5FEB7757B700C49065D12409738B7516?view=simple&libcodes="+curLibcodes+""; $("#seriesOrderIFrame_" + bookrecno).attr("src", url); } } else if(ui.panel.id == "bookSimpleDetailDiv_" + bookrecno) { var url = $("#bookSimpleDetailIFrame_" + bookrecno).attr("src"); if(!url) { url = "/opac/book/"+bookrecno+";jsessionid=5FEB7757B700C49065D12409738B7516"+"?view=simple"; $("#bookSimpleDetailIFrame_" + bookrecno).attr("src", url); } } else if(ui.panel.id == "bookCatalog_" + bookrecno) { showBookAllMetaInfo(bookrecno); } else if(ui.panel.id == "bookPreview_" + bookrecno) { showBookAllMetaInfo(bookrecno); } else if(ui.panel.id == "bookContentSummary_" + bookrecno) { showBookAllMetaInfo(bookrecno); } else if(ui.panel.id == "bookAuthorIntroduction_" + bookrecno) { showBookAllMetaInfo(bookrecno); } } }); //因为进行了tabs操作后,会默认打开第一个tab,所以全部调用一次select动作事件用程序再把打开的第一个tab //给收回去(折叠回去) $(".expressServiceTab").tabs('select', 0); }); var GLOBAL_BASE_API_URL = "http://api.interlib.com.cn:6699/interes"; function showAllBookMetaInfoTab(data) { $.each(data, function(i) { var isbn = data[i].isbn; var isCatalogEmpty = data[i].isCatalogEmpty; var isPreviewEmpty = data[i].isPreviewEmpty; var isSummaryEmpty = data[i].isSummaryEmpty; var isAuthorIntroduction = data[i].isAuthorIntroductionEmpty; if(!isCatalogEmpty) { $("#book_catalog_" + isbn).show(); } if(!isPreviewEmpty) { $("#book_preview_" + isbn).show(); } if(!isSummaryEmpty) { $("#book_summary_" + isbn).show(); } if(!isAuthorIntroduction) { $("#book_authorIntroduction_" + isbn).show(); } }); } //图书目录信息,图书试读信息,图书内容简介,图书著者简介 function showBookAllMetaInfo(bookrecno) { if($.cookie("configouternet")!="false"){ getBookAllMetaInfo(bookrecno); } } function getBookAllMetaInfo(bookrecno) { var loaded = $("#express_tab_" + bookrecno).attr("express_bookmeta_loaded"); if(trimToEmpty(loaded) == "1") { return; } $("#express_tab_" + bookrecno).attr("express_bookmeta_loaded", "1"); var isbn = $("#express_tab_" + bookrecno).attr("express_isbn"); //isbn = "9787308090957"; if($.trim(isbn) == "") { return; } var globalLibraryCode = "P2LN0415007"; var strURL = GLOBAL_BASE_API_URL + "/api/book/isbn/"+isbn+"/?glc="+globalLibraryCode+"&returnType=json" + "&callback=insertAllBookMetaInfo&jsoncallback=?"; $.getJSON(strURL, {}); } function insertAllBookMetaInfo(json) { if(json.isbn == undefined || json.isbn == null || json.result == undefined || json.result == null || json.result.length == 0) { //TODO 取豆瓣数据 //showDoubanSubject(); return; } var isbn = json.isbn; var bookCatalog = json.result.catalog; var previewUrl = trimToEmpty(json.result.previewUrl); var previewContent = json.result.previewContent; var summary = trimToEmpty(json.result.summary); var authorIntroduction = trimToEmpty(json.result.authorIntroduction); var bookrecno = $("div[express_isbn='" + isbn + "']").attr("express_bookrecno"); if(trimToEmpty(bookrecno) == "") { return; } var goTopTitleBlock = "

    回到顶部

    "; //$("#bookCatalog_" + bookrecno).html(bookCatalog); if(bookCatalog != "") { $("#bookCatalog_" + bookrecno).html(bookCatalog + goTopTitleBlock); } if(previewUrl != "") { var previewBlock = "

    " + "" + "查看全部试读信息" + "

    " + "
    " + previewContent; $("#bookPreview_" + bookrecno).html(previewBlock + goTopTitleBlock); } else { if(previewContent != "") { $("#bookPreview_" + bookrecno).html(previewContent + goTopTitleBlock); } } if(summary != "") { $("#bookContentSummary_" + bookrecno).html(summary); } if(authorIntroduction != null) { $("#bookAuthorIntroduction_" + bookrecno).html(authorIntroduction); } if(summary == "" || authorIntroduction == "") { //showDoubanSubject(); } } function showHoldingPreview(bookrecno) { //这里需要这么做是因为$(".expressServiceTab").tabs('select', 0);这个动作会在tabs初始化后全部打开 //一次第一个tab,造成所有第一个tab数据同时请求服务器然后加载,所以这里用个标识,在第二次点击选择tab才 //真正请求加载数据然后显示 var initTimes = $("#holdingPreviewDiv_" + bookrecno).attr("inittimes"); if(initTimes == "0") { $("#holdingPreviewDiv_" + bookrecno).attr("inittimes", "1"); return; } else if(initTimes == "1") { var isDone = $.trim($("#holdingPreviewDiv_" + bookrecno).html()); if(isDone == "") { var curLibcodes = getCurlibcodes(); $.ajax({ type: "GET", url: "/opac/book/holdingpreview/"+bookrecno+";jsessionid=5FEB7757B700C49065D12409738B7516", data: { "curLibcodes":curLibcodes }, dataType: "xml",//这里要用xml,如果用html,则在IE下无法解析这个数据 success: function(xml){ insertHoldingPreview(bookrecno, xml); } }); } } } function getCurlibcodes(){ return "019"; } function insertHoldingPreview(bookrecno, data) { var glc="P2LN0415007"; var tableHeader = new Array("索书号", "所在馆", "所在馆藏地点", "在馆复本数"); if(glc=="P3JS0519059"){ tableHeader = new Array("架位号", "所在馆藏地点", "索书号", "所在馆", "在馆复本数"); } var tableContent = new Array(); var records = $(data).find("record"); records.each(function(i) { var callno = $(this).find("callno").text(); var curlib = $(this).find("curlib").text(); var curlibName = $(this).find("curlibName").text(); var curlocal = $(this).find("curlocal").text(); var curlocalName = $(this).find("curlocalName").text(); var copycount = $(this).find("copycount").text(); var shelfno = $(this).find("shelfno").text(); var dataArray = new Array(callno, curlibName, curlocalName, copycount); if(glc=="P3JS0519059"){ dataArray = new Array(shelfno, curlocalName, callno, curlibName, copycount); } tableContent.push(dataArray); }); var tableStr = ""; if(records.length == 0) { tableStr = "没有在馆复本记录."; } else { tableStr = createTable("expressTable", tableHeader, tableContent); //是否多于10条 if(records.length>10){ tableStr += "查看更多"; } } $("#holdingPreviewDiv_" + bookrecno).html(tableStr); } function createTable(className, tableHeader, tableContent) { var s = ""; if(className != undefined && className != "") { s = '
    '; } for(index in tableHeader) { s += ""; } s += ""; for(index in tableContent) { s += ""; var recordData = tableContent[index]; var glc="P2LN0415007"; for(j in recordData) { var style = ""; if(glc=="P3JS0519059"&&j==0){ style = " style='color:red;'"; } s += "" + recordData[j] + ""; } s += ""; } s += "
    " + tableHeader[index] + "
    "; return s; } function trimToEmpty(str) { if(str == undefined || str == null) { return ""; } return $.trim(str); } $(function() { var facetFields = new Array("curlibcodeFacet", "subjectFacet", "authorFacet", "pubdateFacet", "booktypeFacet