1var pageTypeDefault = "zh" ; 2$(function () { 3 if($("#articleId").length > 0){ 4 var articleId = $("#articleId").val(); 5 6 //citationæ¾ç¤º 7 showCitation(); 8 //å ³ç³»å¾ 9 //getRelationship(); 10 loadCitedByInfo(); 11 //æç« 详æ 页跳转 12 13 isZhJournalEnArticle(); 14 15 16 var viewType = getUrlParam("viewType"); 17 if(viewType && "HTML" == viewType){ 18 getVisitInfo(articleId,1); 19 }else{ 20 //æè¦è®¿é®è®°å½ 21 getVisitInfo(articleId,0); 22 } 23 } 24}) 25//䏿æå è±ææç« æ¶ ä¸è±æä½ç½®å¯¹è° 26function isZhJournalEnArticle(){ 27 var articleL=$("#articleL").val(); 28 var journalL=$("#journalL").val(); 29 if(journalL=="zh"&&articleL=="en"){ 30 //PC 31 var citationEn=$("div.citationEn").html(); 32 var citationCn=$("div.citationCn").html(); 33 var articleEn=$("div.articleEn").html(); 34 var articleCn=$("div.articleCn").html(); 35 var abstractcn=$("div.abstract-cn").html(); 36 var abstracten=$("div.abstract-en").html(); 37 38 $("div.citationEn").html(citationCn); 39 $("div.citationCn").html(citationEn); 40 $("div.articleEn").html(articleCn); 41 $("div.articleCn").html(articleEn); 42 $("div.abstract-cn").html(abstracten); 43 $("div.abstract-en").html(abstractcn); 44 //APP 45 var articleCn=$("section.articleCn").html(); 46 var articleEn=$("section.articleEn").html(); 47 48 $("section.articleEn").html(articleCn); 49 $("section.articleCn").html(articleEn); 50 $(".open-articleEn").html("<h3 class='mainColor'><span class='iconfont icon-jia'></span>䏿æè¦</h3>"); 51 } 52} 53function showCitation(){ 54 var articleId = $("#articleId").val(); 55 if($("#language").val()=="en"){ 56 pageType = "en"; 57 }else{ 58 pageType = "cn"; 59 } 60 if(!isNull(articleId)){ 61 $.ajax({
62 async:false, 63 type:'post', 64 url:local_host +"article/getCitationStr", 65 data:{'ids':articleId, 66 'fileType':2, 67 'pageType':pageType}, 68 success:function(dataMap){ 69 if(!isNull(dataMap.citationCn)){ 70 $(".copyCitationInfo-cn").html(dataMap.citationCn); 71 } 72 if(!isNull(dataMap.citationEn)){ 73 $(".copyCitationInfo-en").html(dataMap.citationEn); 74 } 75 } 76 }) 77 } 78} 79 80//ä¸è½½pdf ----䏿ç 81function downloadpdf(articleId) { 82 var url = local_host + "article/checkArticlePdf?id=" + articleId; 83 $.ajax({ 84 type: "post", 85 url: url, 86 dataType: "json", 87 success: function (data) { 88 if (data.access == false) { 89 window.location.href = local_host + 'member/login'; 90 //alert(data.message); 91 } else if (data.result == 'true') { 92 93 var url = local_host + "article/exportPdf"; 94 var form = $("<form>"); //å®ä¹ä¸ä¸ªform表å 95 form.attr('style', 'display:none'); //å¨form表å䏿·»å æ¥è¯¢åæ° 96 form.attr('target', ''); 97 //form.attr('method', 'post'); 98 form.attr('action', url); 99 100 var input1 = $('<input>'); 101 input1.attr('type', 'hidden'); 102 input1.attr('name', 'id'); 103 input1.attr('value', articleId); 104 $('body').append(form); //å°è¡¨åæ¾ç½®å¨webä¸ 105 form.append(input1); //å°æ¥è¯¢åæ°æ§ä»¶æäº¤å°è¡¨åä¸ 106 form.submit(); 107 108 //æ·»å æç« PDF访é®è®°å½ 109 getVisitInfo(articleId,2); 110 } else if (data.result == 'false') { 111 var url = window.location.href; 112 var pageType = getUrlParam("pageType") || pageTypeDefault; 113 if (url.indexOf("_en.htm") > 0 || pageType == "en") { 114 alert("PDF not found!") 115 } else { 116 alert("该æç« 没æPDF"); 117 } 118 //$(".icon-user").click(); 119 } 120 }, 121 error: function () { 122 alert("ä¸è½½å¤±è´¥ï¼è¯·è系管çåï¼"); 123 } 124 }); 125} 126 127/** 128 * ajaxå¢å æç« HTMLæµè§æ¬¡æ° ----䏿ç 129 * @return 130 */ 131function ajaxCountHtmlView(articleId) { 132 getVisitInfo(articleId,1); 133} 134 135function articleVisitMonth(articleId) { 136 //æç §æä»½åç»ç»è®¡ 137 $.ajax({
138 type: 'post', 139 url: local_host + 'metric/visitMonth', 140 data: {'articleId': articleId}, 141 cache: false, 142 dataType: "json", 143 success: function (data) { 144 var abstractCount = $.map(data, function (n, i) { 145 return n.abstractCount; 146 }); 147 var fullTextCount = $.map(data, function (n, i) { 148 return n.fullTextCount; 149 }); 150 var pdfCount = $.map(data, function (n, i) { 151 return n.pdfCount; 152 }); 153 var createDate = $.map(data, function (n, i) { 154 return n.createDate; 155 }); 156 var monthChart = new Highcharts.chart('article_visit_count_column', { 157 credits:{enabled: false}, 158 chart: { 159 type: 'column', 160 backgroundColor: 'transparent' 161 162 }, 163 title: { 164 text: 'è¿ä¸å¹´å æç« æè¦æµè§éãå ¨ææµè§éãPDFä¸è½½éç»è®¡ä¿¡æ¯' 165 }, 166 subtitle: { 167 text: '' 168 }, 169 xAxis: { 170 categories: createDate, 171 crosshair: true 172 }, 173 yAxis: { 174 min: 0, 175 title: { 176 text: '访é®é' 177 } 178 }, 179 tooltip: { 180 valueDecimals: 0, 181 shared: true, 182 useHTML: true 183 }, 184 plotOptions: { 185 column: { 186 pointPadding: 0.2, 187 borderWidth: 0 188 } 189 }, 190 series: [{ 191 name: 'æè¦æµè§é', 192 data: abstractCount 193 }, { 194 name: 'å ¨ææµè§é', 195 data: fullTextCount 196 197 }, { 198 name: 'PDFä¸è½½é', 199 data: pdfCount 200 }] 201 }); 202 } 203 }) 204} 205 206function articleVisitType(articleId) { 207 //æç §è®¿é®ç±»å«åç»ç»è®¡ 208 $.ajax({
209 type: 'post', 210 url: local_host + 'metric/visitType', 211 data: {'articleId': articleId}, 212 cache: false, 213 dataType: "json", 214 success: function (data) { 215 var data = $.map(data, function (n, i) { 216 return n; 217 }); 218 var dataStr = JSON.stringify(data); 219 var articlelanguage = $("#articlelanguage").val(); 220 if('zh' == articlelanguage){ 221 dataStr = dataStr.replace("FULLTEXT", "HTMLå ¨æ"); 222 dataStr = dataStr.replace("META", "æè¦"); 223 } 224 data=JSON.parse(dataStr); 225 var data = $.map(data, function (n, i) { 226 return n; 227 }); 228 var typeChart = new Highcharts.chart('article_visit_type_pie', { 229 credits:{enabled: false}, 230 chart: { 231 plotBackgroundColor: null, 232 plotBorderWidth: null, 233 plotShadow: false, 234 type: 'pie', 235 backgroundColor: 'transparent' 236 }, 237 title: { 238 text: '访é®ç±»å«åå¸' 239 }, 240 tooltip: { 241 pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>' 242 }, 243 plotOptions: { 244 pie: { 245 allowPointSelect: true, 246 cursor: 'pointer', 247 dataLabels: { 248 enabled: true, 249 format: '<b>{point.name}</b>: {point.percentage:.1f} %', 250 style: { 251 color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black' 252 }, 253 connectorColor: 'silver' 254 }, 255 showInLegend: true 256 } 257 }, 258 series: [{ 259 name: '访é®é', 260 colorByPoint: true, 261 data: data 262 }] 263 }); 264 265 } 266 }); 267} 268 269function articleVisitArea(articleId) { 270 //æç §è®¿é®å°åºåç»ç»è®¡ 271 $.ajax({
272 type: 'post', 273 url: local_host + 'metric/visitArea', 274 data: {'articleId': articleId}, 275 cache: false, 276 dataType: "json", 277 success: function (data) { 278 var data = $.map(data, function (n, i) { 279 return n; 280 }); 281 console.log(data); 282 var areaChart = new Highcharts.chart('article_visit_area_pie', { 283 credits:{enabled: false}, 284 chart: { 285 plotBackgroundColor: null, 286 plotBorderWidth: null, 287 plotShadow: false, 288 type: 'pie', 289 backgroundColor: 'transparent' 290 }, 291 title: { 292 text: '访é®å°åºåå¸' 293 }, 294 tooltip: { 295 pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>' 296 }, 297 plotOptions: { 298 pie: { 299 allowPointSelect: true, 300 cursor: 'pointer', 301 dataLabels: { 302 enabled: true, 303 format: '<b>{point.name}</b>: {point.percentage:.1f} %', 304 style: { 305 color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black' 306 }, 307 connectorColor: 'silver' 308 }, 309 showInLegend: true 310 } 311 }, 312 series: [{ 313 name: '访é®é', 314 colorByPoint: true, 315 data: data 316 }] 317 }); 318 } 319 }); 320} 321 322/** 323 * ajaxå¢å æç« HTMLæµè§æ¬¡æ° 324 * @return 325 */ 326var currentState = 0; //å½å页é¢ä¸å·æ°åªè®°å½ä¸æ¬¡ 327function ajaxCountHtmlView(articleId,callback) { 328 //è·åå ¨ææ°æ® 329 var contentHtml = cacheObj.get('htmlContent', articleId) || $.ajax({
330 url: local_host + 'article/htmlContent?v', 331 type: 'post', 332 async: false, 333 dataType: 'json', 334 data: {'id': articleId}, 335 success: function (data) { 336 if (data.access == false) { 337 window.location.href = local_host + 'member/login'; 338 //alert(data.message); 339 } else { 340 var html='<h3 class="navTitle"><span class="sec-title">åèæç®</span></h3>'+ $("#References").html(); 341 if($(".footnotesBox").length > 0){ 342 var fotnotes = $(".footnotesBox").html() 343 $(".footnotesBox").hide(); 344 $(".footnotes").hide(); 345 }else{ 346 var fotnotes = '' 347 } 348 349 if($('#reference:checked').length>0){ 350 data.htmlContent && $('#htmlContent').html(data.htmlContent+fotnotes+html); 351 }else{ 352 data.htmlContent && $('#htmlContent').html(data.htmlContent+fotnotes); 353 } 354 cacheObj.set('htmlContent', articleId, true) 355 } 356 callback(); 357 } 358 }); 359 $(".group4").colorbox({rel:'group4',width:'90%',height:"75%",opacity:'0.8',inline:true, 360 onComplete:function(){ 361 removeTableBorder(); 362 $("#cboxTitle").niceScroll({ 363 cursorcolor:"transparent", 364 cursoropacitymax:1, 365 touchbehavior:false, 366 cursorwidth:"5px", 367 cursorborder:"0", 368 cursorborderradius:"5px" 369 }); 370 //æ¸²ææ°å¦å ¬å¼ 371 MathJax.Hub.Queue(["Typeset", MathJax.Hub]); 372 } 373 }); 374 //ç°å¨å·²æ¾ç¤ºçå®è¡¨æ ¼ï¼ä¸éè¦çæSVGå¾ 375 // createTableSub(); 376 //éç½®å¾è¡¨ä¸tableæ¯å¾ççè·¯å¾ 377 setTableImg(); 378 //éç½®å ¨æä¸çå ¬å¼æ¯å¾ççè·¯å¾ 379 resetFormulaSrc(); 380} 381 382/** 383 * åç¯è®ºææ¥è¯¢cnki被å¼ä¿¡æ¯ 384 * @return 385 */ 386function loadCitedByInfo(){ 387 var id = $("#articleId").val(); 388 var ajaxArg={ 389 url: local_host +"article/getArticleCitedBy", 390 data: {'articleIds':id}, 391 returnFun:outCitedByInfo 392 }; 393 ajaxPost(ajaxArg); 394} 395 396/** 397 * è¾åºå表ä¸çæç« citedByå¼è¯æç®ä¿¡æ¯ 398 * @param data 399 * @param indexArray 400 * @return 401 */ 402function outCitedByInfo(data){ 403 if(typeof(data) != "undefined"){ 404 //console.log("aaa"); 405 data = jQuery.parseJSON(data); 406 //console.log(data); 407 $.each(data,function(i,e){ 408 if(e.citedCount > 0){ 409 var journalTitleCn = $("#journalTitleCn").val(); 410 var journalTitleEn = $("#journalTitleEn").val(); 411 var journalAbbr = $("#journalAbbr").val(); 412 $("#citedby-num").html("("+e.citedCount+")"); 413 $(".citedByCount").html(e.citedCount); 414 //var htmltitle = "<h2 style=\"text-align: center;line-height: 30px;font-size: 130%;}\"><b>Cited By</b></h2>"; 415 var jnum = 0; 416 var html = "<table class='cited-content' style='line-height:24px;text-align:left;'>"; 417 var _tempIndex = 1; 418 $.each(e.citedByArticles,function(i,v){ 419 if(v.articleType == "journal"){ 420 var _citiationInfo = v.citiation.replace(/\[\d+\]/,""); 421 var _aHtml = ''; 422 if(/.*[\u4e00-\u9fa5]+.*$/.test(_citiationInfo)){ //å å«ä¸æ 423 if(v.journal == journalTitleCn || v.journal == journalTitleEn){ //æ¬åæ¥ç 424 try{ 425 var _hrefVal = local_host+"/article/"+journalAbbr+"/" + v.year + "/" + v.issue + "/" + v.fpage; 426 _aHtml = " <a class='cited-location' target='_blank' href='"+_hrefVal+"'><img src='/style/web/images/public/search-cited.png' class='cited-search'/> æ¬ç«æ¥ç</a>"; 427 }catch(e){ 428 _aHtml = " <a class='cited-location' target='_blank' href='http://xueshu.baidu.com/s?wd="+encodeURI(_citiationInfo)+"'><img src='/style/web/images/public/search-cited.png' class='cited-search'/> ç¾åº¦å¦æ¯</a>"; 429 } 430 }else{ 431 _aHtml = " <a class='cited-location' target='_blank' href='http://xueshu.baidu.com/s?wd="+encodeURI(_citiationInfo)+"'><img src='/style/web/images/public/search-cited.png' class='cited-search'/> ç¾åº¦å¦æ¯</a>"; 432 } 433 }else{ 434 _aHtml = " <a class='cited-location' target='_blank' href='https://cn.bing.com/academic/search?q="+encodeURI(_citiationInfo)+"'><img src='/style/web/images/public/search-cited.png' class='cited-search'/> å¿ åºå¦æ¯</a>"; 435 } 436 var _viewCitiation = _citiationInfo.replace(/\, /g,",").replace(/\,/g,", ").replace("[J].",".").replace(" :",": "); 437 html = html + "<tr class=\"citedby-p\"><td class=\"cited-order-num\" valign=\"top\" width=\"20\">" + _tempIndex + ". </td><td class=\"cited-info\" style=\"padding-left:5px;\">"+ _viewCitiation + _aHtml +"<td></tr>"; 438 jnum ++; 439 _tempIndex++; 440 } 441 }) 442 html += '</table>'; 443 var jhtmltitle = "<h3 style=\"line-height:30px;font-size: 110%;\"><b>æåç±»åå¼ç¨("+jnum+")</b></h3>"; 444 var qtnum = e.citedCount-jnum; 445 var qthtmltitle = "<h3 style=\"line-height:30px;font-size: 110%;\"><b>å ¶ä»ç±»åå¼ç¨("+qtnum+")</b></h3>"; 446 $("#citedby-info").html(jhtmltitle+html+qthtmltitle); 447 } 448 449 }) 450 } 451} 452 453/** 454 * è¾åºç¸å ³æç« 455 */ 456function loadRelativeArticles(){ 457 var id = $("#articleId").val(); 458 var ajaxArg={ 459 url: local_host +"article/getRelativeArticles", 460 data: {'id':id, 461 'language':'cn'}, 462 returnFun:outRelativeArticles 463 }; 464 ajaxPost(ajaxArg); 465} 466 467 468function outRelativeArticles(data){ 469 if(typeof(data) != "undefined"){ 470// console.log("aaa"); 471// var type=$("#journalreferenceCodeType").val(); 472// var html=''; 473// $.each(data,function(x,y){ 474// $.each(y,function(i,e){ 475// html+='<table class="reference-tab">'; 476// html+='<tr class="document-box">'; 477// html+='<td valign="top" class="td1">['+(i+1)+']</td>'; 478// html+='<td class="td2">'; 479// if(type=='2'){ 480// var size=e.authorCnList.length; 481// $.each(e.authorCnList,function(a,b){ 482// if(a<size-1){ 483// html+=b+', '; 484// }else{ 485// html+=b+', '; 486// } 487// }) 488// html+=e.year+': '; 489// if(!isNull(e.doi)){ 490// html+='<a class="relative-title" target="_blank" href="'+local_host+'/cn/article/doi/'+e.doi+'" class="mainColor">'+e.titleCn+',</a> '+e.journalTitleCn; 491// }else{ 492// html+='<a class="relative-title" target="_blank" href="'+local_host+'/cn/article/id/'+e.id+'" class="mainColor">'+e.titleCn+',</a> '+e.journalTitleCn; 493// } 494// if(!isNull(e.articleState)){ 495// html+='.'; 496// }else{ 497// html+=', '+e.volume+', '+e.fpage+'-'+e.lpage+'.'; 498// } 499// }else{ 500// var size=e.authorCnList.length; 501// $.each(e.authorCnList,function(a,b){ 502// if(a<size-1){ 503// html+=b+', '; 504// }else{ 505// html+=b+'. '; 506// } 507// }) 508// if(!isNull(e.doi)){ 509// html+='<a class="relative-title" target="_blank" href="'+local_host+'/cn/article/doi/'+e.doi+'" class="mainColor">'+e.titleCn+',</a> '+e.journalTitleCn+'. '; 510// }else{ 511// html+='<a class="relative-title" target="_blank" href="'+local_host+'/cn/article/id/'+e.id+'" class="mainColor">'+e.titleCn+',</a> '+e.journalTitleCn+'. '; 512// } 513// if(isNull(e.articleState)){ 514// html+=e.year+', '+e.volume+', '+e.fpage+'-'+e.lpage+'.'; 515// } 516// 517// 518// } 519// if(!isNull(e.doi)){ 520// html+='<b style="display:inline-block; font-weight:normal;">'; 521// html+='doi: <a class="mainColor doi" target="_blank" href="'+local_host+'/cn/article/doi/'+e.doi+'">'+e.doi+'</a></b>'; 522// } 523// html+='</td></tr></table>'; 524// }) 525// }) 526 $("#relative-article").html(data.list); 527 MathJax.Hub.Queue(["Typeset", MathJax.Hub]); 528 } 529}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.