diff --git a/article.html b/article.html index d95be59..72d0ab8 100644 --- a/article.html +++ b/article.html @@ -8,392 +8,15 @@ + + - + @@ -403,7 +26,7 @@ -
+
@@ -412,7 +35,7 @@

-
+
@@ -420,277 +43,101 @@
+ Show Author Information ▼
-
-
Cite this article:
-

- -

- -
- - - - -
-
    -
  • Export citation to EndNote
  • -
  • Export citation to RIS
  • -
  • Export citation to BibTex
  • -
  • Export citation to txt
  • -
-
-
+
-
    -
  • Abstract
  • -
  • Medical history of objective
  • -
  • HTML
  • -
    PDF
    -
    HTML
    -
  • Supplementary material
  • -
  • Manuscript processing
  • -
  • Original data
  • -
+
-
-
-
-
- Keywords: -
- - - - - - - - - - - - - - - -
- DOI URL: -
-
- Original DOI URL: -
-
-
-
    - -
-
-
+
+ +
- - - - - - - - - - - - - - - -
-
    - -
-
-
-
+ + + +
-
+ -
-
-

Article Citations -

-
- -
-
-
-
-
-
+ -
-
- - - - - - - -
-
- -
-

Latest Research and News

- - -
- - -
-
-
+ -
- - -
-
-
    - -
-
-

Related articles

-
    - -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-
-
- - - -

This work is licensed under a Creative Commons Attribution 4.0 International License.

-
-
- - - -
-
-
- - - -
- - - - - - -
-
-
- -
-
-
+ +
+ +
+
+
+
+ + + +
+
+ +
+

Latest Research and News

+ + +
+ + +
+
+
+
+
+
+ + + +

This work is licensed under a Creative Commons Attribution 4.0 International License.

+
+
+ + + +
+
+
+ + + +
+ + + + + + +
+
+
+ +
+ +
+
@@ -709,8 +156,9 @@ - - + + + diff --git a/article_old.html b/article_old.html new file mode 100644 index 0000000..72718ef --- /dev/null +++ b/article_old.html @@ -0,0 +1,796 @@ + + + + + + + + + + + + + + + + + +
+
+
+ +
+ +
+
+
+ + + + + +

+
+
+ + + + + +
+
+
+
Cite this article:
+

+ +

+ +
+ +
+
    +
  • Export citation to EndNote
  • +
  • Export citation to RIS
  • +
  • Export citation to BibTex
  • +
  • Export citation to txt
  • +
+
+
+
+
+
+
+
+
+
    +
  • Abstract
  • +
  • Medical history of objective
  • +
  • HTML
  • +
    PDF
    +
    HTML
    +
  • Supplementary material
  • +
  • Manuscript processing
  • +
  • Original data
  • +
+
+
+
+
+
+ Keywords: +
+ + + + + + + + + + + + + + + +
+ DOI URL: +
+
+ Original DOI URL: +
+
+
+
    + +
+
+
+ + +
+ + + + + + + + + + + + + + + +
+
    + +
+
+
+
+
+
+
+ +
+
+

Article Citations +

+ +
+ +
+
+
+
+
+
+ +
+
+ + + + + + + +
+
+ +
+

Latest Research and News

+ + +
+ + +
+
+
+ +
+ + +
+
+
    + +
+
+

Related articles

+
    + +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+ + + +

This work is licensed under a Creative Commons Attribution 4.0 International License.

+
+
+ + + +
+
+
+ + + +
+ + + + + + +
+
+
+ +
+
+
+
+
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/article_v15.html b/article_v15.html new file mode 100644 index 0000000..6fdf93c --- /dev/null +++ b/article_v15.html @@ -0,0 +1,240 @@ + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+ +
+
+
+ + + + +

+
+
+ Show Author Information ▼ + +
+ +
+
+
+
+
+
+ +
+
+ + + + +
+ + + + +
+
+ + + + + + + + + +
+ + +
+ + +
+
+
+
+ + + +
+
+ +
+

Latest Research and News

+ + +
+ + +
+
+
+
+
+
+ + + +

This work is licensed under a Creative Commons Attribution 4.0 International License.

+
+
+ + + +
+
+
+ + + +
+ + + + + + +
+
+
+ +
+ +
+
+
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/img/article_cite.png b/img/article_cite.png new file mode 100644 index 0000000..427065e Binary files /dev/null and b/img/article_cite.png differ diff --git a/img/article_share2.png b/img/article_share2.png new file mode 100644 index 0000000..cfe3f71 Binary files /dev/null and b/img/article_share2.png differ diff --git a/img/articlehtml.png b/img/articlehtml.png new file mode 100644 index 0000000..1c24ae9 Binary files /dev/null and b/img/articlehtml.png differ diff --git a/img/articlepdf.png b/img/articlepdf.png new file mode 100644 index 0000000..22e9dc5 Binary files /dev/null and b/img/articlepdf.png differ diff --git a/js/article.js b/js/article.js index efc3669..6485f7c 100644 --- a/js/article.js +++ b/js/article.js @@ -8697,6 +8697,11 @@ function addRowIdToData(content) { function initArticleHtmlFun(arr, result, html_type) { + + // .wordTableHtml table tr.table-header-row td { + // border-bottom: 1px solid #000 !important; + // } + var str = ''; var htmlContent = '' htmlContent += arr.map((item, index) => { @@ -8823,7 +8828,8 @@ text-align:left;color:#333;" >${item.table.note ? item.table.note : '' }).join(''); htmlContent = `
${htmlContent}
` $('.wen_rong .content-box .conthtmn').html(htmlContent); - + + if (result.data.refers.length > 0) { // 如果有引用数据 var refs = ''; var xuhao = 0; @@ -9231,6 +9237,10 @@ function initArticleHtml(htmlData, refs, type) { } }); }); + $('.wordTableHtml table tr.table-header-row td').each(function () { + this.style.setProperty('border-bottom', '1px solid #000', 'important'); + + }); }); diff --git a/js/articleJS/index_v1.js b/js/articleJS/index_v1.js new file mode 100644 index 0000000..ffd36df --- /dev/null +++ b/js/articleJS/index_v1.js @@ -0,0 +1,339 @@ + +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; +} + + + +function commonGetAxiosData(url, type, data) { + var resultData; + $.ajax({ + type: type, + url: apiUrl + url, + data: data, + }).then((result) => { + if (result.code == 0) { + resultData = result.data + } else { + ShowDanger("请求失败!"); + resultData = null + } + }) + return resultData; +} +function commonInit() { + $('.art_side').css('display', 'none'); + $('.art_main_con').css('width', '1070px'); + $('.new_art > h4').css('padding', ' 0 4px 16px 6px'); + + +} +function commonGetItemHtml(doc) { + + var data = doc.data; + var i = doc.i; + var img_i = doc.img_i; + var c_t_a = doc.c_t_a; + var tong_geogle = doc.tong_geogle; + console.log('img_i at line 31:', img_i) + var baseInfo = { + doi_: !data.doi ? '' : `https://doi.org/${data.doi}`, + npp_: data.npp == '' || data.npp == ' ' ? '' : `: ${data.npp}.  `, + html_: '', + otStat: '', + pub_date: '', + mp4_: data.article_id != '172' ? '' : ``, + c_t_a: '', + trad_tion: '', + lr_top: '', + person_img: '', + tong_geogle: tong_geogle ? tong_geogle : '', + pdf_: !data.file_pdf || data.file_pdf == '' ? '' : `PDF ( ${data.pdf_num} )`, + cite_: !data.cite_num || data.cite_num == 0 ? '' : + `  + + WOS Citations ( ${data.cite_num} ) + + `, + abstract: data.abstract?data.abstract.replace(new RegExp("0, 102, 204", "g"), "0,102,153"):'', + link_: '', + stage_: '', + } + if (data.has_html == 0) { + if (data.file_html == '') { + baseInfo.html_ = '' + } else { + baseInfo.html_ = 'HTML ( ' + data.html_num + ' )  ' + } + } else { + baseInfo.html_ = 'HTML ( ' + data.html_num + ' )  ' + } + + + if (data.stage_no == '0') { + baseInfo.stage_ = '' + } else { + baseInfo.stage_ = ' (' + data.stage_no + ')' + } + if (data.other_state == 0) { + baseInfo.otStat = '' + } else if (data.other_state == 1) { + baseInfo.otStat = 'Editorial Expression of Concern' + } else if (data.other_state == 2) { + baseInfo.otStat = 'Retracted' + } + if (data.isShowOtime == 1) { + if (data.pub_date && data.pub_date != '') { + baseInfo.pub_date = `
Published Date: ${data.pub_date}
` + } + } + + if (data.article_id == '86' || data.article_id == '176' || data.article_id == '455' || data.article_id == '400' || data.article_id == '145' || data.article_id == '116' || data.article_id == '717' || data.article_id == '632' || data.article_id == '24') { + baseInfo.person_img = '' + } else { + baseInfo.person_img = '' + } + if (c_t_a == 'different') { + if (data.journal_id == 22) { + baseInfo.c_t_a = '' + } else { + baseInfo.c_t_a = '' + } + } else { + baseInfo.c_t_a = '' + + } + + + baseInfo.link_ = `Abstract ( ${data.abs_num} )   ${baseInfo.html_}${baseInfo.pdf_}${baseInfo.mp4_}${baseInfo.c_t_a}${baseInfo.cite_}${baseInfo.tong_geogle} +

${data.cite}

${data.abstract}
`; + + + + if (data.tradition_tag == '' || data.tradition_tag == null) { + var maxwidth = 500;//显示多少字符 + if (data.abstract&&data.abstract.length > maxwidth) { + var abstNew = data.abstract.replace(/<.*?>/ig, "") + abstNew = abstNew.substring(0, maxwidth) + abstNew = abstNew.substring(0, maxwidth - abstNew.split(" ").pop().length) + baseInfo.trad_tion = '
' + abstNew + '...
' + } else { + baseInfo.trad_tion = '
' + data.abstract?data.abstract:'' + '
' + } + } else { + baseInfo.trad_tion = '

' + data.tradition_tag + '

' + data.tradition + '

' + } + + if (data.topic && data.topic.length > 0) { + for (var t = 0; t < data.topic.length; t++) { + baseInfo.lr_top += '' + data.topic[t].title + '' + } + } + + + + return baseInfo +} + +function commonHandleClickHtml() { + + // 点击Abstract显示隐藏 + $('.txt_zhaiyao').click(function () { + $(this).nextAll('div').toggle(); + if ($(this).nextAll('div').css("display") == 'block') { + var num = $(this).next().html(); + $.ajax({ + type: 'post', url: apiUrl + 'yuan/Article/addArticleNum', async: false, + data: { "article_id": $(this).attr('alt'), "type": 'abs' }, + success: function (result) { + if (result.code == 0) { + num = num * 1 + 1 * 1 + } + } + }) + $.ajax({ + type: 'post', url: apiUrl + 'super/Publish/addVisitNum', + data: { 'type': Jour_num, 'is_detail': '1' }, + success: function (result) { + } + }); + $(this).next().html(num); + } + }) + $('.txt_html').click(function () { + var num = $(this).next().html(); + $.ajax({ + type: 'post', url: apiUrl + 'yuan/Article/addArticleNum', async: false, + data: { "article_id": $(this).attr('alt'), "type": 'html' }, + success: function (result) { + if (result.code == 0) { + num = num * 1 + 1 * 1 + } + } + }) + $.ajax({ + type: 'post', url: apiUrl + 'super/Publish/addVisitNum', + data: { 'type': Jour_num, 'is_detail': '1' }, + success: function (result) { + } + }); + $(this).next().html(num); + }) + $('.txt_pdf').click(function () { + var num = $(this).next().html(); + $.ajax({ + type: 'post', url: apiUrl + 'yuan/Article/addArticleNum', async: false, + data: { "article_id": $(this).attr('alt'), "type": 'pdf' }, + success: function (result) { + if (result.code == 0) { + num = num * 1 + 1 * 1 + } + } + }) + $.ajax({ + type: 'post', url: apiUrl + 'super/Publish/addVisitNum', + data: { 'type': Jour_num, 'is_detail': '1' }, + success: function (result) { + } + }); + $(this).next().html(num); + }) + + $('.export_cite').css('display', 'none'); + $(document).click(function (e) { + if (!$(e.target).is('.export_cite') && !$(e.target).is('.cite_box')) { + $('.export_cite').hide(); + } + }) + $('.cite_box').click(function () { + $('.export_cite').css('display', 'none'); + commonGetCiteList($(this).attr('article_id')) + $(this).find('.export_cite').fadeIn(200); + }) + $('.export_cite').click(function (e) { e.stopPropagation() }) + + // 点击弹窗出现 复制和下载 + $('.txt_content').css('display', 'none'); + $('.export').css('display', 'none'); + $(document).click(function (e) { + if (!$(e.target).is('.export') && !$(e.target).is('.txt_copy')) { + $('.export').hide(); + } + }) + $('.txt_copy').click(function () { + $('.export').css('display', 'none'); + $(this).find('.export').fadeIn(200); + }) + $('.Exc_1').click(function () { + var content_ = $(this).parents('.txt_copy').nextAll('.txt_content').text(); + var clipboard = new Clipboard('#' + $(this).attr('id'), { + text: function () { + return content_; + } + }) + clipboard.on('success', function (e) { + ShowSuccess("Citation information has been copied!"); + }); + }) + $('.Exc_2').click(function () { + var ecx_id = $(this).parents('.links_').siblings('.txt_biaoti').attr('id') + $.ajax({ + type: 'post', url: apiUrl + 'api/Article/getArticleenw', async: false, + data: { "article_id": ecx_id }, + success: function (result) { + var a = document.createElement('a'); + a.href = result.data.url; + a.download = '' + a.click(); + } + }) + }) + $('.Exc_3').click(function () { + var ecx_id = $(this).parents('.links_').siblings('.txt_biaoti').attr('id') + $.ajax({ + type: 'post', url: apiUrl + 'api/Article/getArticleRis', async: false, + data: { "article_id": ecx_id }, + success: function (result) { + var a = document.createElement('a'); + a.href = result.data.url; + a.download = '' + a.click(); + } + }) + }) + $('.Exc_4').click(function () { + var ecx_id = $(this).parents('.links_').siblings('.txt_biaoti').attr('id') + $.ajax({ + type: 'post', url: apiUrl + 'api/Article/getArticlebib', async: false, + data: { "article_id": ecx_id }, + success: function (result) { + var a = document.createElement('a'); + a.href = result.data.url; + a.download = '' + a.click(); + } + }) + }) + $('.Exc_5').click(function () { + var ecx_id = $(this).parents('.links_').siblings('.txt_biaoti').attr('id') + $.ajax({ + type: 'post', url: apiUrl + 'api/Article/getArticletext', async: false, + data: { "article_id": ecx_id }, + success: function (result) { + var a = document.createElement('a'); + a.href = result.data.url; + a.download = '' + a.click(); + } + }) + }) +} +//获取 cite 并添加 html +function commonGetCiteList(a_ID) { + $('.cite_box .export_cite').html('
'); + var journalCiteStr = '' + $.ajax({ + type: 'post', url: apiUrl + 'api/Article/getArticleCites', + data: { + "article_id": a_ID + }, + success: function (result) { + if (result.code == 0) { + + var arr = result.data.list + for (let i in arr) { + journalCiteStr += ` +

${Number(i) + 1}.

+
+

+ ${arr[i].article_name} +

+ +

+ ${arr[i].author ? `${arr[i].author},` : ''} ${arr[i].journal_name}${arr[i].vol ? `${arr[i].vol},` : ''} + + +

+ +
` + } + journalCiteStr += `
` + + $('.cite_box .export_cite').html(journalCiteStr); + + + + + + } + } + }) +} \ No newline at end of file diff --git a/js/article_v1.js b/js/article_v1.js new file mode 100644 index 0000000..26b6584 --- /dev/null +++ b/js/article_v1.js @@ -0,0 +1,3392 @@ + + +var commonSupColor = 'rgb(0,112,192)'//上角标颜色 +var commonTableTitleColor = 'rgb(210,90,90)'//上角标颜色 +var commonSupFontColor = 'color:rgb(0,112,192);'//上角标字体颜色 +const style = document.createElement('style'); +style.innerHTML = ` +body{ + background: #fff; +} +.width_auto{ + width:auto !important; +} +.top{ + padding: 0px 50px; + min-width: 1200px; + width: 90%; + max-width: 100%; + margin: 0 auto; +} +.top>div{ + + width: 100%; + +} +.top .top_logo{ + margin-top:0px; + +}.outline-container { + width: 200px; + transition: all 0.3s ease; + background-color: #f8f8f8; + + height: 100%; + position: relative; + } + + .outline-container .outline-toggle { + display: flex; + align-items: center; + padding: 0px; + cursor: pointer; + + font-weight: bold; + font-size: 14px; + } + + .outline-container .outline-toggle i { + margin-right: 8px; + transition: transform 0.3s; + } + + /* 折叠后的样式 */ + .outline-container.is-closed { + width: 24px; + } + .outline-content{ + padding-left:16px; + box-sizing:border-box; + padding-right: 10px; + } + + .outline-container.is-closed .outline-content { + display: none; + } + .outline-container.is-closed .outline-toggle { + flex-wrap: wrap; + padding: 4px; + margin-top: 0px; + } + + + + + .outline-container.is-closed .outline-toggle i { + transform: rotate(180deg); + margin-left: -2px; + } + .outline-container .toggle-text { + + + + } + .outline-container .toggle-text1 { + display:none; + transform: rotate(178deg) translateX(-0%) !important; + display: block !important; + text-transform: unset !important; + writing-mode: vertical-rl !important; + /* text-orientation: upright !important; */ + font-size: 15px !important; + /* font-weight: bold !important; */ + color: #333 !important; + cursor: pointer !important; + margin-top: 6px !important; + letter-spacing: 2px !important; + + } + .is-open .toggle-text1{ + display: none !important; + } + .is-open .toggle-text{ + display: block !important; + font-size: 16px !important; + } + .is-closed .toggle-text1{ + display: block !important; + } + .is-closed .toggle-text{ + display: none !important; + } +#common-overlay{ + z-index:1000; +} +#col-content{ + width: 100%; z-index:1001; +} +.nav_ban{ + display:none !important; + padding: 0px 50px; +} +.daohang{ + min-width: 1200px; + width: 80%; + max-width: 100%; + margin: 0 auto; + +} +.inner_nav_ban_wrapper{ + min-width: 1200px; + width: 80%; + max-width: 100%; + margin: 0 auto; + height:100%; + +} +.wenzhang{ + +} +.wenzhang .wen_jian .left .zuo_zhe_info{ + margin-top:0px; +} +.article_navbar-container{ + + width:100%; +background-color: #f5f7fa; + +box-shadow:27px 9px 32px rgba(255, 255, 255, 1); + + border-top: 1px solid #eef; +padding: 0px !important; +} +.mb_aform{ + min-width: 1200px; + width: 80%; + max-width: 100%; + margin: 0 auto; + +padding: 20px 0px; +border-bottom:1px solid #e5e5e5; + +} +.mb_aform #combox4{ +width:48%; +} +.mb_aform #emaplm{ +width:48%; +} +.pos_ter{ + min-width: 1200px; + width: 80%; + max-width: 100%; + margin: 0 auto; +padding: 20px 0px; + +display: flex; +align-items: center; +justify-content: space-between; + + +} + + +.pos_ter>div:nth-child(1) { + width: 305px; + margin-right:0; + +} + +.pos_ter>div:nth-child(3) { + width: 265px; + margin-right:0; +} + +.pos_ter>div:nth-child(4) { + width: 272px; + margin-right:0; +} +.pos_ter>a { + + width: 270px; + margin-right:0; +} +.mb_aform input[type="submit"] { + top:40px; +} +.mb_aform .search_for input[type='text']{ + width: calc(100% - 140px); + margin-left: 0; + margin-right: 0; +} + +.mb_aform>div{ + width:calc(100% - 220px); +} +.zuo_zhe_info { + max-height: 0; + overflow: hidden; + opacity: 0; + transition: all 0.3s ease; + } +.zuo_zhe_name { + color:#00549e!important; + } + + .zuo_zhe_info.show { + max-height: 300px; /* 根据实际内容调整 */ + opacity: 1; + margin-top:10px; + + } + + .toggle-btn { + color: #006699; + cursor: pointer; + display: inline-block; + margin-top: 8px; + user-select: none; + font-weight: bold; + text-decoration: none; + } + .toggle-btn:focus { + + text-decoration: none !important; + } +.article_navbar-container .article_dropbtn{ +padding-left:0px; +padding-right:0px; +} +.article,.article__{ + + background-color: #fff; + min-width: 1200px; + width: 80%; + max-width: 100%; + margin: 0 auto; + padding:0 50px; +} +.article{ + padding: 0px; +} + +.v4-art { + width: 100%; + } + + .v4-view-pdf-tooltip { + padding: 7px 12px !important; + line-height: 1 !important; + } + + .v4-view-pdf-content { + font-size: 13px; + line-height: 15px; + } + + .v4-art-main-box { + width: 100%; + min-width: 1200px; + width: 80%; + max-width: 100%; + margin: 0 auto; + + padding: 0px 50px; + padding-bottom: 15px; + position: relative; + } + + .v4-art-top { + + min-width: 1200px; + width: 80%; + max-width: 100%; + margin: 0 auto; + padding: 0px 50px; + + background-color: transparent; + transition: transform 0.3s ease, opacity 0.3s ease; + } + .v4-art-top .v4-art-top-main { + width: 100%; + + top: 0; + // z-index: 1000; + } + + + + + + .v4-art-top.fixed { + position: fixed; + top: 0; + left: -10px; + right: 0; + z-index: 999; + background-color: #fff; + transform: translateY(-100%); + opacity: 0; + pointer-events: none; + } + + .v4-art-top.fixed.show { + transform: translateY(0); + opacity: 1; + pointer-events: auto; + + } + .v4-art-top.fixed.show .v4-art-top-main{ + background-color: rgba(254, 254, 254, 0.8); border-bottom: 1px solid #006699; + } + + + .v4-art-top .v4-art-top-main .v4-art-top-main-m { + height: 38px; + padding: 0px 0px 0px; + display: flex; + flex-wrap: wrap; + background-color: #fcfcfd; + border-top-left-radius: 10px; + border-top-right-radius: 10px; + align-items: center; + justify-content: start; + + + border-bottom: 1px solid #eef; + border-top: 1px solid #eef; + }.outline-container::-webkit-scrollbar { + width: 6px; /* 设置滚动条宽度为6px */ + } + + .outline-container::-webkit-scrollbar-thumb { + background-color: #ccc; /* 滚动条颜色 */ + border-radius: 3px; /* 圆角 */ + } + + .outline-container::-webkit-scrollbar-track { + background-color: #f5f5f5; /* 滚动条轨道颜色 */ + } + + .v4-art-top-main-m .v4-art-top-item{ + height: 28px; + display: flex; + margin: -2px 3px; + cursor: pointer; + font-family: 'Inter-SemiBold'; + font-size: 14px; + color: #2e2e2e; + text-decoration: none; + line-height: 22px; + } + .v4-art-top-main-m .view-pdf{ + // background-color: #dff1ffaa; + // border-radius: 12px; + // padding:0 16px 0 4px; + + } + .v4-art-top .v4-art-top-item svg, .v4-art-top .v4-art-top-item .icon{ + margin: auto 6px; + width:auto; + height: 19px; + } + .v4-art-top #st-2 .st-btn > img{ + + width:19px !important; + height: 19px !important; + } + .v4-art-top #st-2 .st-btn{ + + + padding: 0 6px !important; + } + .v4-art-top #st-2{ + z-index:10 !important; + margin-left: -10px !important; + } + + .v4-art-top-main-m .v4-art-top-item span{ + display: flex; + align-items: center; + font-weight: 400; + } + .v4-art-top-main-m .v4-art-top-item span:hover{ + color: #3158fa; + } + .wenzhang .wen_jian{ + background-color: #fff; + padding: 0px; + margin-bottom: 20px; + border-bottom: none; + margin-top:1.25rem; + + } + .wenzhang .wen_jian .left{ + float: unset; + width: 100%; + padding-right: 0px; + } + .wen_jian_span{ + margin-bottom: 1px !important; + } + .wenzhang .wen_jian h4{ + font-size: 26px; + line-height: 1.25; + margin-bottom: 0px; + font-weight: 500; + + + margin-top: 0px; + color: #222; + } + .wenzhang .wen_jian h4 i{ + + font-weight: 500; + + + + } + .wen_jian_span{ + display: inline-block; + + } + .wen_jian_span,.wen_jian_span a{ + font-size: 14px; + color: #666; + line-height: 30px; + } + .wenzhang .wen_rong .left{ + float: unset; + width: 100%; + padding-right: 0px; + margin-right:0; + margin-bottom:0; + + } + .wenzhang .wen_rong .left .rong_box{ + + padding-left: 0px; + padding-right: 0px; + padding-top:0px !important; + margin-top:0px !important; + border-bottom:none; + } + .anchor-nav{ + // box-shadow: rgba(0, 0, 0, 0.1) 2px 0px 5px; + position: sticky; top: 40px; left: 0px; width: 285px; background:#f5f5f5; z-index: 10; overflow-y: auto; height: calc(100vh - 50px); float: left; + padding-top:10px; + + } + .pdf_item{ + display: flex; + align-items: center; + // justify-content: space-between; + font-family: 'Charis SIL'; + min-height: 12px; + } + .pdf_item > div{ +margin-right:10px; + } + .pdf_item .download{ + color: #006699; + margin-left:5px; + } + .pdf_item img{ + margin-top: -4px; + } + .pdf_item .download .fa{ + + margin-right:5px; + } + .pdf_item .pdf_file_type{ + + margin-left:5px; + } + + + + .trackItem { + display: flex +; +align-items: flex-start; + } + .trackItem .time:after{ + top:2px; + } + .conterecord:after{ + top:80px; + left:178px; + } + .trackItem .time{ + width: 140px; + margin-bottom:15px; + margin-top: 15px + } + .trackItem .type{ + width: calc(100% - 226px); + } + .trackItem .type:hover { + box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15); /* 淡蓝色阴影 */ +} +.corr_late ul{ + padding: 0 10px; + border-bottom: none; +} +.corr_late ul li a{ +font-size: 14px; +line-height: 22px; +} +.corr_late ul li p{ +font-size: 14px; +line-height: 22px; +} + +.extra-table{ + + box-sizing: border-box; + font-weight: 500 !important; + padding: 2px 0 0 16px !important; + width:100%; + margin-bottom:4px; + color: #333; + cursor: pointer; + color:#006699; + font-family: 'Charis SIL'; + line-height:18px;min-height: 12px; +} +.outiline-item h2{ +font-size:16px; +} +.outiline-other{ +margin-top:15px !important; +margin-bottom:0 !important; +} +.core-xlink-crossref .title{ + font-weight: 700; +} +.article_bottom{ + width:100%; + background-color: #f5f7fa; + +} +#common-popup{ + z-index :1001 !important; +} +.article-quote-box{ + background-color: #f5f5f5; +} +.article-quote-box .quote-source{ + padding:0; + font-size:14px; + +} +.quoteNumber{ + font-size:13px; +} +` + +document.head.appendChild(style); +function loadMathJax(callback) { + const script = document.createElement('script'); + + // 可选:配置 MathJax(必须在加载 script 前设置) + window.MathJax = { + tex: { + inlineMath: [['$', '$'], ['\\(', '\\)']], + displayMath: [['$$', '$$'], ['\\[', '\\]']] + }, + startup: { + typeset: false // 不自动 typeset,手动触发更灵活 + } + }; + + script.src = 'https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js'; + script.onload = callback; + document.head.appendChild(script); +} +loadMathJax() +var script = document.createElement('script'); +script.src = '/js/not_map.js'; +var script1 = document.createElement('script'); +script1.src = '/echarts-master/echarts.min.js'; +var script2 = document.createElement('script'); +script2.src = '/echarts-master/world.js'; + +document.head.appendChild(script1); +document.head.appendChild(script2); +document.head.appendChild(script); + +function initStyle() { + // 找到目标元素 + const navBan = document.querySelector('.nav_ban.rgb_color_background'); + + if (navBan) { + // 创建一个新的 inner-wrapper div + const innerWrapper = document.createElement('div'); + innerWrapper.className = 'inner_nav_ban_wrapper'; + + // 把 navBan 中所有子节点移动到 innerWrapper 中 + while (navBan.firstChild) { + innerWrapper.appendChild(navBan.firstChild); + } + + // 再把 innerWrapper 加回 navBan 中 + navBan.appendChild(innerWrapper); + } + + +} +// 列表 +function at_list() { + + + function adjustNavHeight() { + var windowHeight = window.innerHeight; // 获取页面高度 + $(".anchor-nav").css("height", windowHeight + "px"); // 设置导航栏高度为页面高度 + } + + // 页面加载时调整导航栏高度 + adjustNavHeight(); + + // 窗口大小变化时调整导航栏高度 + $(window).resize(function () { + adjustNavHeight(); // 重新调整导航栏高度 + }); + + // 获取地址栏信息 + 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; + } +} + +let citationCache = null; // 你可以存在全局变量、Vue data 或其他位置 + + +// 时间戳格式化 + +function timestampToTime(str) { + //str = str * 1000 + var oDate = new Date(str * 1000), + oYear = oDate.getFullYear(), + oMonth = oDate.getMonth() + 1, + oDay = oDate.getDate(), + oHour = oDate.getHours(), + oMin = oDate.getMinutes(), + oSen = oDate.getSeconds(), + oTime = oYear + '-' + getzf(oMonth) + '-' + getzf(oDay) + ' ' + getzf(oHour) + ':' + + getzf(oMin) + ':' + getzf(oSen);//最后拼接时间 + return oTime; +}; +//补0操作 +function getzf(num) { + if (parseInt(num) < 10) { + num = '0' + num; + } + return num; +} +function fetchCitationsData(doi, a_ID, callback) { + doi = '10.53388/TMR20200222165' + a_ID = 471 + let citations = { + wos: [], + dimensions: 0, + scite: 0, + crossref: [] + }; + + let list = [doi]; + let completedRequests = 0; + + function checkAllDone() { + completedRequests++; + if (completedRequests === 4) { + callback(citations); // 当所有数据加载完成后触发回调 + } + } + + // WOS 数据 + $.post(apiUrl + 'api/Article/getArticleCites', { article_id: a_ID }, function (res) { + citations.wos = res.code === 0 ? res.data.list : []; + checkAllDone(); + }); + + // Dimensions + $.get('https://metrics-api.dimensions.ai/doi/' + doi, function (res) { + citations.dimensions = res.times_cited || 0; + checkAllDone(); + }).fail(function () { + citations.dimensions = 0; + checkAllDone(); + }); + + // Scite + $.ajax({ + type: 'post', + url: 'https://api.scite.ai/tallies', + contentType: "application/json", + dataType: "json", + data: JSON.stringify(list), + success: function (res) { + for (let key in res.tallies) { + citations.scite = res.tallies[key]?.citingPublications || 0; + } + checkAllDone(); + }, + error: function () { + citations.scite = 0; + checkAllDone(); + } + }); + + // CrossRef + $.post(apiUrl + 'api/Article/getArticleDetailCites', { article_id: a_ID }, function (res) { + citations.crossref = res.code === 0 ? res.data : []; + checkAllDone(); + }); +} +function renderCitations(citations, doi) { + console.log('doi at line 479:', citations) + + + + let wosHtml = ''; + citations.wos.forEach((item, i) => { + wosHtml += ` +
+

${i + 1}.

+
+

${item.article_name}

+

+ + ${item.journal_name}, ${item.author || ''}, ${item.vol || ''} + + + https://doi.org/${item.doi} + +

+
+
`; + }); + + let crossrefHtml = ''; + if (citations.crossref && citations.crossref.length > 0) { + + } + citations.crossref.forEach((item, i) => { + crossrefHtml += ` +
+

${i + 1}.

+
+

${item.article_title}

+

+ + ${item.journal_title}, ${item.year} + + + https://doi.org/${item.doi} + +

+
+
`; + }); +{/* + + + + */} + const str = ` +

+ Article Citations +

+ + +
+ +
+
+
+
+
+ + + `; + + + + + + $('.article-quote').css('display', 'block'); // 设置显示样式 + $('#ArticleCitations').css('display', 'block'); // 设置显示样式 + $('.article-quote').html(str); // 设置 HTML 内容 + +} + +/* 相关引用次数 */ +// function getCitations(doi, a_ID) { + + +// // var doi = '10.53388/IMD202408001'; +// $('.article-quote-box').css({ +// width: '25%', +// 'margin-right': '0px', +// 'border-right': '1px solid ' + localStorage.Journals_color, +// }) +// $('.DimensionsBadge .quote-source').html('Dimensions Badge') +// $('.SciteBadge .quote-source').html('Scite Badge (Wiley)') +// $('.Crossref .quote-source').html('Crossref') +// $('.Crossref').css({ 'border-right': 'none' }) +// $('.Wos .quote-source').html('Wos') +// var list = [doi]; +// $.ajax({ +// type: 'post', url: apiUrl + 'api/Article/getArticleCites', +// data: { +// "article_id": a_ID +// }, +// success: function (result) { +// if (result.code == 0) { +// var str1 = `
${result.data.list && result.data.list.length > 0 ? result.data.list.length : 0}
` +// var journalCiteStr = "" +// $('.Wos .quote-content1').html(str1) +// var arr = result.data.list +// for (let i in arr) { +// journalCiteStr += `

${Number(i) + 1}.

+//
+//

${arr[i].article_name}

+ +//

+// ${arr[i].journal_name}, +// ${arr[i].author ? `${arr[i].author},` : ''} ${arr[i].journal_name}${arr[i].vol ? `${arr[i].vol},` : ''} +// + +// +// https://doi.org/${arr[i].doi}

+ +//
` +// } + +// if (result.data.list && result.data.list.length > 0) { +// $('.WosNumber').click(function () { +// var infoStr = `Citations registered in Wos` +// $('#framed_div .info-box').html(infoStr); +// $('#framed_div .quote-content').html(journalCiteStr); +// $('#framed_div').addClass('isWos'); + +// if ($('#framed_div').hasClass('openCrossref')) { + +// if ($('#framed_div').hasClass('isCrossref')) { + +// $('#framed_div').removeClass('isCrossref'); +// $('#framed_div').removeClass('openCrossref'); +// setTimeout(() => { +// $('#framed_div').addClass('openCrossref'); +// }, 100) + +// } else { +// $('#framed_div').removeClass('openCrossref'); +// $('#framed_div').removeClass('isWos'); +// } + +// } else { +// $('#framed_div').addClass('isWos'); +// $('#framed_div').addClass('openCrossref'); +// } + + +// }) +// } + + +// } +// } +// }) +// //Dimensions Badge +// $.ajax({ +// type: 'get', +// url: 'https://metrics-api.dimensions.ai/doi/' + doi,//正式环境 +// success: function (result) { +// console.log('result at line 212:', result) +// // var str = `` +// $('.DimensionsBadge a').attr('href', 'https://badge.dimensions.ai/details/doi/' + doi) +// var str = `
${result.times_cited}
` +// $('.DimensionsBadge .quote-content').html(str) +// }, +// error: function (result) { +// console.log('result at line 212:', result) +// // var str = `` + +// var str = `
0
` +// $('.DimensionsBadge .quote-content').html(str) +// } +// }) +// //Scite Badge (Wiley) +// $.ajax({ +// type: 'post', +// url: 'https://api.scite.ai/tallies',//正式环境 +// contentType: "application/json", +// dataType: "json", +// data: JSON.stringify(list), +// success: function (result) { +// console.log('result at line 212:', result) +// for (let i in result.tallies) { +// $('.SciteBadge a').attr('href', 'https://scite.ai/reports/' + i) +// var str1 = `
${result.tallies[i]['citingPublications']}
` +// } +// $('.SciteBadge .quote-content1').html(str1) +// }, +// error: function (result) { +// console.log('result at line 212:', result) +// var str1 = `
0
` + +// $('.SciteBadge .quote-content1').html(str1) +// } +// }) +// $.ajax({ +// type: 'post', url: apiUrl + 'api/Article/getArticleDetailCites', +// data: { +// "article_id": a_ID +// }, +// success: function (result) { +// if (result.code == 0) { +// var str1 = `
${result.data && result.data.length > 0 ? result.data.length : 0}
` +// var journalCiteStr = "" +// $('.Crossref .quote-content1').html(str1) +// var arr = result.data +// for (let i in arr) { +// journalCiteStr += `

${Number(i) + 1}.

+//
+//

${arr[i].article_title}

+ +//

+// ${arr[i].journal_title}, +// +// ${arr[i].year} + +// +// https://doi.org/${arr[i].doi}

+ +//
` +// } + +// if (result.data && result.data.length > 0) { + +// $('.crossrefNumber').click(function () { +// var infoStr = `Citations registered in CrossRef` +// $('#framed_div .info-box').html(infoStr); +// $('#framed_div .quote-content').html(journalCiteStr); $('#framed_div').addClass('isCrossref'); +// if ($('#framed_div').hasClass('openCrossref')) { + +// if ($('#framed_div').hasClass('isWos')) { + +// $('#framed_div').removeClass('isWos'); +// $('#framed_div').removeClass('openCrossref'); +// $('#framed_div').addClass('isCrossref'); +// setTimeout(() => { +// $('#framed_div').addClass('openCrossref'); +// }, 100) +// } else { +// $('#framed_div').removeClass('openCrossref'); +// $('#framed_div').removeClass('isCrossref'); +// } + +// } else { +// $('#framed_div').addClass('isCrossref'); +// $('#framed_div').addClass('openCrossref'); +// } +// }) +// } + + +// } +// } +// }) + + +// } + + +// 文章内容 +function article_con() { + + + var newBox = document.querySelector('.newBox'); + var commonPopupStr = ` +
+
+ × +
+

+
+ +
+
+
+`; + + // 将弹窗插入到页面中 + newBox.insertAdjacentHTML('beforeend', commonPopupStr); + + console.log('js at line 7241:', '是否走了详情js') + console.log('详情js', localStorage.Journals_title); + // 获取地址栏信息 + 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; + } + + var a_ID = getQueryString('a_id'); //文章 + var htm_ID = getQueryString('s_htm'); //目前显示html + const isPre = getQueryString('preview'); + + if (!isPre) { + initArticleNavList(a_ID) + } + + // 增加访问次数 + + + if (isPre) { + $('#top_bar .top').css('display', 'none') + + $('.wen_rong .content-box .conthtmn').html(` +
接收到来自父页面的数据: +
` + ); + $.ajax({ + type: 'post', url: apiUrl + 'api/Article/getHtmlByPAID', + data: { + "p_article_id": a_ID + }, + success: function (res) { + if (res.code == 0) { + var arr = res.data.list; + initArticleHtmlFun(arr, res, 2) + + + } + }, + error: function () { + // ShowDanger("error!"); + } + + }) + + } else { + this.initStyle() + + try { + console.log('开始详情接口请求') + $(document).ready(function () { + + + $.ajax({ + type: 'post', url: apiUrl + 'api/Article/getArticleDetail', + data: { + "article_id": a_ID + }, + timeout: 30000, // 设置超时时间为5秒 + + + success: function (result) { + // initArticleNavList(a_ID) + console.log('result at line 7575:', result) + + + + $('.wenzhang .wen_rong .left').css({ + 'background-color': '#f4fafd', + + }) + $('.wenzhang .wen_rong .left .rong_box').css({ + 'background-color': '#fff', + 'margin-top': '0px' + }) + $('.wenzhang .wen_rong .left .mb_aform').css({ + 'background-color': '#fff' + }) + if (result.code == 0) { + + + var html_type = result.data.articleInfo.html_type + var has_html = result.data.articleInfo.has_html + initMoreButtonTopList(result.data, a_ID) + if (has_html == 0) { + $('.wen_rong #tablist .tarhtmn').css('display', 'none'); + $('.wen_rong #tablist .tarfihml').css('display', 'none'); + $('.wen_rong .content-box .conthtmn').css('display', 'none'); + } + + // 文章Cite this article + var j_artc = result.data.articleInfo + if (Jour_num != 13) { + //获取文章引用 + + + // 点击增加数字 + $('.txt_html').click(function () { + var num = $(this).next().html(); + $.ajax({ + type: 'post', url: apiUrl + 'yuan/Article/addArticleNum', async: false, + data: { "article_id": a_ID, "type": 'html' }, + success: function (result) { + } + }) + $.ajax({ + type: 'post', url: apiUrl + 'super/Publish/addVisitNum', + data: { 'type': Jour_num, 'is_detail': '1' }, + success: function (result) { + } + }); + $(this).next().html(num); + }) + + } else { + $('.article-quote').css('display', 'none'); + $('.mb_aform').css('display', 'none'); + $('.pos_ter').css('display', 'none'); + $('.footer').css('display', 'none'); + $('.wen_rong .right').css('display', 'none'); + $('.wenzhang .wen_rong .left').css('width', '100%'); + } + + + // 文章路径基本信息 + var j_our = result.data.journalInfo; + var j_info = result.data.stageInfo; + $('.wen_jian .left>span a').html(j_our.title); + $('.wen_jian .left>span a').attr('href', '/' + j_our.usx); + localStorage.setItem("Journals_num", j_our.journal_id); + if (j_artc.doi == '') { + var doi_ = '' + } else { + var doi_ = 'DOI:' + j_artc.doi + } + if (j_info.stage_no == '0') { + var stage_ = '' + } else { + var stage_ = 'Issue (' + j_info.stage_no + '): ' + } + if (j_artc.npp == '' || j_artc.npp == ' ') { + var npp_ = '' + } else { + if (j_info.stage_pagename == 'pp.') { + var npp_ = j_artc.npp + '     ' + } else { + var npp_ = j_info.stage_pagename + j_artc.npp + '     ' + } + } + + if (localStorage.Journals_title == '经典中医研究') { + if (j_info.stage_vol == '1') { + j_info.stage_vol = '一' + } + if (j_info.stage_vol == '2') { + j_info.stage_vol = '二' + } + if (j_info.stage_vol == '3') { + j_info.stage_vol = '三' + } + if (j_info.stage_vol == '4') { + j_info.stage_vol = '四' + } + if (j_info.stage_vol == '5') { + j_info.stage_vol = '五' + } + if (j_info.stage_vol == '6') { + j_info.stage_vol = '六' + } + var our_time = '  |   ' + j_info.stage_year + '年第' + j_info.stage_vol + '卷  |   第' + j_info.stage_no + '期:' + npp_ + doi_; + } else { + var our_time = '  |   ' + j_info.stage_year + ', Vol. ' + j_info.stage_vol + '  |   ' + stage_ + npp_ + doi_; + } + + $('.wen_jian .left>span').append(our_time); + + if (j_artc.other_state == 0) { + var otStat = '' + } else if (j_artc.other_state == 1) { + var otStat = 'Editorial Expression of Concern' + } else if (j_artc.other_state == 2) { + var otStat = 'Retracted' + } + + $('.wen_jian .left>h4').html(otStat + j_artc.title); + + + // 文章基本作者机构 + var str = ''; + var j_authior = result.data.author.authors; + var stra = ''; + var Corr_Auth = ''; + var Corr_Emai = ''; + var rep = ''; + var rep_pd = ''; + var ORC_ID = ''; + var report_num = 0; + + for (var i = 0; i < j_authior.length; i++) { + rep = ''; + var mes = ''; + if (j_authior[i].is_first == '1') { + rep = '#' + rep_pd += '#' + } + if (j_authior[i].is_report == '1') { + rep += '*' + mes = ' () ' + Corr_Auth += ' ' + j_authior[i].author_name + ','; + Corr_Emai += ' ' + j_authior[i].email + ','; + report_num += 1; + } + if (j_authior[i].orcid == '') { + ORC_ID = '' + } else { + ORC_ID = '' + } + if (i == j_authior.length - 1) { + stra += j_authior[i].author_name + '' + j_authior[i].ors + rep + '' + ORC_ID + mes + } else { + stra += j_authior[i].author_name + '' + j_authior[i].ors + rep + '' + ORC_ID + mes + ', ' + } + } + + str += `
${stra}
` ; + + var j_organ = result.data.author.organs; + var strg = '
'; + for (var i = 0; i < j_organ.length; i++) { + strg += '' + j_organ[i].alias + ' ' + j_organ[i].organ_name + '
' + } + str += strg+"
"; + + $('.wen_jian .left>div.zuo_zhe').html(str); + $('.wen_jian .left>div.zuo_zhe>sup').css({ + color: commonSupColor, + }); + document.querySelector('.toggle-btn').addEventListener('click', function () { + const detail = document.querySelector('.zuo_zhe_info'); + const btn = this; + const isShown = detail.classList.toggle('show'); + + btn.innerText = isShown + ? 'Hide Affiliations & Notes ▲' + : 'Show Affiliations & Notes ▼'; + }); + if (rep_pd == "#") { + $('.wen_jian .left>div').each(function () { + $(this).html($(this).html().split("#").join("")); + }); + } + + if (report_num != 1) { + $('.coau b').html('Corresponding authors:'); + } + + if (Jour_num == 1) { + j_artc.abstract = j_artc.abstract.replace(new RegExp("0, 102, 204", "g"), "0,102,153") + } + + // 文章内容 + Corr_Auth = Corr_Auth.replace(/,$/, "") + Corr_Emai = Corr_Emai.replace(/,$/, "") + + $('.wen_rong .content-box .contercon .abst').html(j_artc.abstract); + let strongElements = document.querySelectorAll('.wen_rong .content-box .contercon .abst strong'); + + // 遍历每个 标签 + strongElements.forEach(function (element) { + // 检查 标签内的文本内容是否为 "Background:", "Methods:", "Results:", "Conclusion:" + + if (element.textContent.includes("Background:") || + element.textContent.includes("Methods:") || + element.textContent.includes("Method:") || + element.textContent.includes("Results:") || + element.textContent.includes("Result:") || + element.textContent.includes("Conclusion:") || + element.textContent.includes("Conclusions:") || + element.textContent.includes("Background") || + element.textContent.includes("Methods") || + element.textContent.includes("Method") || + element.textContent.includes("Results") || + element.textContent.includes("Result") || + element.textContent.includes("Conclusion") || + element.textContent.includes("Conclusions") + + + + ) { + // 修改该 标签的样式,改变颜色 + element.style.color = commonSupColor; // 设置颜色为黑色(你可以修改为其他颜色) + } + }); + $('.wen_rong .content-box .contercon .keyw span').html(j_artc.keywords); + $('.wen_rong .content-box .contercon .fund span').html(j_artc.fund); + $('.wen_rong .content-box .contercon .coau span').html(Corr_Auth); + $('.wen_rong .content-box .contercon .emai span').html(Corr_Emai); + $('.wen_rong .content-box .contercon .cite span').html(result.data.cite); + $('.wen_rong .content-box .contercon .time span').html(j_artc.pub_date); + $('.wen_rong .content-box .contercon .url span').html('https://doi.org/' + j_artc.doi + ''); + + if (j_artc.ordoi == '') { + $('.wen_rong .content-box .contercon .udr').css('display', 'none') + } else { + $('.wen_rong .content-box .contercon .udr span').html('https://doi.org/' + j_artc.ordoi + ''); + } + + if (j_artc.abstract == '') { + $('.wen_rong .content-box .contercon .abst').css('display', 'none') + } + if (j_artc.keywords == '') { + $('.wen_rong .content-box .contercon .keyw').css('display', 'none') + } + if (j_artc.fund == '') { + $('.wen_rong .content-box .contercon .fund').css('display', 'none') + } + if (Corr_Auth == '') { + $('.wen_rong .content-box .contercon .coau').css('display', 'none') + } + if (Corr_Emai == '') { + $('.wen_rong .content-box .contercon .emai').css('display', 'none') + } + if (j_artc.pub_date == '') { + $('.wen_rong .content-box .contercon .time').css('display', 'none') + } + if (result.data.cite == '') { + $('.wen_rong .content-box .contercon .cite').css('display', 'none') + } + + + $('.wen_rong .content-box .contemho').html(j_artc.mhoo); + + // 新的HTML + + if (html_type == 0) { + // 原 HTML + $('.wen_rong .content-box .conthtmn').html(` +
+
` + ); + $.ajax({ + type: 'post', url: apiUrl + 'api/Article/getArticleDetailHtml', + data: { + "article_id": a_ID + }, + success: function (result) { + if (result.code == 0) { + + var arr = result.data.mains; + var str = ''; + for (var i = 0; i < arr.length; i++) { + let sectionId = 'section-' + i; // 生成唯一的 ID + if (arr[i].width == 0) { + if (arr[i].is_title == 1) { + if (arr[i].content.indexOf("

") >= 0) { + str += `

${arr[i].content}
` + } else { + str += `

${arr[i].content}

` + } + } else { + if (arr[i].content.indexOf("

") >= 0) { + str += arr[i].content.replace("

", `

`); + } else { + str += `

${arr[i].content}

` + } + } + } else { + var picsrc = 'https://submission.tmrjournals.com/public/mainimg/' + arr[i].content; + var fun = "picPreview('" + picsrc + "');" + // console.log(fun) + str += `
` + "

` + arr[i].note + "

" + } + } + str = `
${str}
` + $('.wen_rong .content-box .conthtmn').html(str); + + + // 引用 + if (result.data.refers.length > 0) { // 如果有引用数据 + var refs = ''; + var xuhao = 0; + for (var rr = 0; rr < result.data.refers.length; rr++) { + // 如果格式不正确,或者信息不全 + let item = ''; + if (result.data.refers[rr].refer_type == 'journal' && result.data.refers[rr].doilink != '') { + // journal 类型 + xuhao++; + item = "

" + xuhao + '. ' + result.data.refers[rr].author + ' ' + result.data.refers[rr].title + ". " + result.data.refers[rr].joura + ". " + result.data.refers[rr].dateno + "."; + // 在 "Available at:" 之前插入
标签 + item += "
Available at: " + result.data.refers[rr].doilink + "

"; + refs += item; + } else if (result.data.refers[rr].refer_type == 'book' && result.data.refers[rr].isbn != '') { + // book 类型 + xuhao++; + item = "

" + xuhao + '. ' + result.data.refers[rr].author + ' ' + result.data.refers[rr].title + ". " + result.data.refers[rr].dateno + "."; + // 在 "Available at:" 之前插入
标签 + item += "
ISBN: " + result.data.refers[rr].isbn + "

"; + refs += item; + } else if (result.data.refers[rr].refer_type == 'other' && result.data.refers[rr].refer_frag != '' && result.data.refers[rr].refer_frag.length > 15) { + // other 类型,检查 refer_frag 中是否有 "Available at:" + xuhao++; + item = "

" + xuhao + '. '; + // 如果 refer_frag 包含 "Available at:",在其前面插入
标签 + if (result.data.refers[rr].refer_frag.indexOf('Available at:') !== -1) { + item += result.data.refers[rr].refer_frag.replace('Available at:', '
Available at:'); + } else { + item += result.data.refers[rr].refer_frag; + } + item += ". 

"; + refs += item; + } else { + continue; + } + } + // 将生成的所有引用内容插入到页面中 + $('.wen_rong .content-box .conthtmn').append('

References

' + refs + '
'); + } + + initArticleHtml(arr, result.data.refers, html_type) + } + }, + error: function () { + // ShowDanger("error!"); + } + + }) + } else if (html_type == 1) { + //外链 + $('.wen_rong #tablist .tarhtmn').css('display', 'none'); + $('.wen_rong .content-box .conthtmn').css('display', 'none'); + + } else if (html_type == 2) { + // 新 HTML + $('.wen_rong .content-box .conthtmn').html(` +
+
` + ); + $.ajax({ + type: 'post', url: apiUrl + 'api/Article/getArticleDetailHtmlFor2', + data: { + "article_id": a_ID + }, + success: function (htmlResult) { + if (htmlResult.code == 0) { + + var arr = htmlResult.data.mains; + initArticleHtmlFun(arr, htmlResult, html_type, { ...result, a_ID: a_ID }) + + } + }, + error: function () { + // ShowDanger("error!"); + } + + }) + } + + + // 稿件跟踪 + // 图标------------ + + // console.log(j_artc) + // Original data 附加文件 + + + // if (j_artc.file_pdf == '') { + // $('.wen_rong #tablist .tarfipdf').css('display', 'none'); + // // $('.wen_rong .rong_box .contfdf').css('display','none'); + // } else { + // $('.wen_rong #tablist .tarfipdf').html('PDF'); + // // $('.wen_rong .rong_box .contfdf ul').html(' PDF'); + // } + if (j_artc.file_html == '') { + $('.wen_rong #tablist .tarfihml').css('display', 'none'); + // $('.wen_rong .rong_box .contfhml').css('display','none'); + } else { + $('.wen_rong #tablist .tarfihml').html('HTML'); + $('.wen_rong .rong_box .contfhml ul').html(' HTML'); + } + //if (j_artc.tradition_tag == '' || j_artc.tradition == '') { + // $('.wen_rong #tablist .tarad').css('display', 'none'); + // $('.wen_rong .content-box .conterad').css('display', 'none'); + //} + if (j_artc.mhoo == '' || j_artc.mhoo == null) { + $('.wen_rong #tablist .tarmho').css('display', 'none'); + $('.wen_rong .content-box .contemho').css('display', 'none'); + } + + // $('#tablist .tarfipdf a').click(function () { + // $.ajax({ + // type: 'post', url: apiUrl + 'yuan/Article/addArticleNum', async: false, + // data: { "article_id": j_artc.article_id, "type": 'pdf' }, + // success: function (result) { + // } + // }) + // $.ajax({ + // type: 'post', url: apiUrl + 'super/Publish/addVisitNum', + // data: { 'type': Jour_num, 'is_detail': '1' }, + // success: function (result) { + // } + // }); + // }) + + + + // 首先显示html + if (htm_ID != null) { + $("#tablist li.tarhtmn").click() + } + + // meta添加 + // j_artc = result.data.articleInfo + // j_authior = result.data.author.authors; + // j_our = result.data.journalInfo; + // j_info = result.data.stageInfo; + + + $('title').before('' + + '' + + '' + + '' + + '' + + '') + for (var i = 0; i < j_authior.length; i++) { + $('title').before('') + } + if (j_artc.first_page != undefined) { + $('title').before('') + } + if (j_artc.last_page != undefined) { + $('title').before('') + } + + + // 右侧引入插件 + // if(result.data.journalInfo.title=='Food Therapy and Health Care'){ + // document.getElementsByTagName('script')[1].setAttribute("data-trendmdconfig","{'website_id':'79603', 'element':'#trendmd-suggestions'}") + // } + // if(result.data.journalInfo.title=='Medical Theory and Hypothesis'){ + // document.getElementsByTagName('script')[1].setAttribute("data-trendmdconfig","{'website_id':'79601', 'element':'#trendmd-suggestions'}") + // } + // if(result.data.journalInfo.title=='TMR Non-Drug Therapy'){ + // document.getElementsByTagName('script')[1].setAttribute("data-trendmdconfig","{'website_id':'79600', 'element':'#trendmd-suggestions'}") + // } + // if(result.data.journalInfo.title=='TMR Modern Herbal Medicine'){ + // document.getElementsByTagName('script')[1].setAttribute("data-trendmdconfig","{'website_id':'79599', 'element':'#trendmd-suggestions'}") + // } + // if(result.data.journalInfo.title=='Nursing Communications'){ + // document.getElementsByTagName('script')[1].setAttribute("data-trendmdconfig","{'website_id':'79598', 'element':'#trendmd-suggestions'}") + // } + // if(result.data.journalInfo.title=='Integrative Medicine Discovery'){ + // document.getElementsByTagName('script')[1].setAttribute("data-trendmdconfig","{'website_id':'79597', 'element':'#trendmd-suggestions'}") + // } + // if(result.data.journalInfo.title=='Clinical Research Communications'){ + // document.getElementsByTagName('script')[1].setAttribute("data-trendmdconfig","{'website_id':'79596', 'element':'#trendmd-suggestions'}") + // } + // if(result.data.journalInfo.title=='Psychosomatic Medicine Research'){ + // document.getElementsByTagName('script')[1].setAttribute("data-trendmdconfig","{'website_id':'79595', 'element':'#trendmd-suggestions'}") + // } + // if(result.data.journalInfo.title=='Life Research'){ + // document.getElementsByTagName('script')[1].setAttribute("data-trendmdconfig","{'website_id':'79594', 'element':'#trendmd-suggestions'}") + // } + // if(result.data.journalInfo.title=='Gastroenterology & Hepatology Research'){ + // document.getElementsByTagName('script')[1].setAttribute("data-trendmdconfig","{'website_id':'79593', 'element':'#trendmd-suggestions'}") + // } + // if(result.data.journalInfo.title=='Medical Data Mining'){ + // document.getElementsByTagName('script')[1].setAttribute("data-trendmdconfig","{'website_id':'79592', 'element':'#trendmd-suggestions'}") + // } + // if(result.data.journalInfo.title=='Toxicology Communications'){ + // document.getElementsByTagName('script')[1].setAttribute("data-trendmdconfig","{'website_id':'79591', 'element':'#trendmd-suggestions'}") + // } + // if(result.data.journalInfo.title=='Tumor Microenvironment Research'){ + // document.getElementsByTagName('script')[1].setAttribute("data-trendmdconfig","{'website_id':'79590', 'element':'#trendmd-suggestions'}") + // } + // if(result.data.journalInfo.title=='History and Philosophy of Medicine'){ + // document.getElementsByTagName('script')[1].setAttribute("data-trendmdconfig","{'website_id':'79589', 'element':'#trendmd-suggestions'}") + // } + // if(result.data.journalInfo.title=='Precision Medicine Research'){ + // document.getElementsByTagName('script')[1].setAttribute("data-trendmdconfig","{'website_id':'79588', 'element':'#trendmd-suggestions'}") + // } + // if(result.data.journalInfo.title=='Drug Combination Therapy'){ + // document.getElementsByTagName('script')[1].setAttribute("data-trendmdconfig","{'website_id':'79587', 'element':'#trendmd-suggestions'}") + // } + // if(result.data.journalInfo.title=='tmRxiv'){ + // document.getElementsByTagName('script')[1].setAttribute("data-trendmdconfig","{'website_id':'79586', 'element':'#trendmd-suggestions'}") + // } + // if(result.data.journalInfo.title=='Infectious Diseases Research'){ + // document.getElementsByTagName('script')[1].setAttribute("data-trendmdconfig","{'website_id':'79585', 'element':'#trendmd-suggestions'}") + // } + // if(result.data.journalInfo.title=='Aging Communications'){ + // document.getElementsByTagName('script')[1].setAttribute("data-trendmdconfig","{'website_id':'79584', 'element':'#trendmd-suggestions'}") + // } + // if(result.data.journalInfo.title=='Cancer Advances'){ + // document.getElementsByTagName('script')[1].setAttribute("data-trendmdconfig","{'website_id':'79583', 'element':'#trendmd-suggestions'}") + // } + // if(result.data.journalInfo.title=='Traditional Medicine Research'){ + // document.getElementsByTagName('script')[1].setAttribute("data-trendmdconfig","{'journal_id':'79582', 'element':'#trendmd-suggestions'}") + // } + + if (Jour_num != '1') { + $('.wen_rong .right .tmr_doaj').css('display', 'none') + } else { + $('.wen_rong .right .tmr_doaj').css('display', 'none') + } + + if (Jour_num == '22') { + $('.wen_jian .right h5').html('引用:'); + $('.wen_jian .right .export .Exc_2').html(' 下载EndNote格式'); + $('.wen_jian .right .export .Exc_3').html(' 下载RIS格式'); + $('.wen_jian .right .export .Exc_4').html(' 下载BibTex格式'); + $('.wen_jian .right .export .Exc_5').html(' 下载text格式'); + $('.wenzhang .wen_rong .right>p').html('本作品根据“知识共享”国际许可协议4.0进行授权。'); + $('.keyw b').html('关键字:') + $('.fund b').html('基金项目:') + $('.coau b').html('通讯作者:') + $('.emai b').html('邮箱:') + $('.cite b').html('引用:') + $('.time b').html('出版时间:') + $('.url b').html('链接:') + $('#tablist li').html('') + $('#tablist .tabin').html('摘要') + $('.links_').css('font-size', '20px') + $('.links_ img').css({ 'width': '20px', 'height': '22px' }) + $('.right p').css('font-family', 'Times New Roman') + $('.cite span').css('font-family', 'Times New Roman') + } + + + } else { + ShowDanger("请求失败!"); + } + }, + error: function (jqXHR, textStatus, errorThrown) { + ShowDanger("error!"); + console.log('文章详情error!') + console.log('AJAX error:', jqXHR, textStatus, errorThrown); // 输出详细的错误信息 + } + + }) + }); + } catch (error) { + console.error('JavaScript error:', error); + } + + } + $.ajax({ + type: 'post', url: apiUrl + 'super/Publish/addVisitNum', + data: { 'type': Jour_num, 'is_detail': '1' }, + success: function (result) { + if (result.code == 0) { + + } else { + // ShowDanger("请求失败!"); + } + }, + error: function () { + // ShowDanger("error!"); + } + }); + $.ajax({ + type: 'post', url: apiUrl + 'yuan/Article/addArticleNum', async: false, + data: { "article_id": a_ID, "type": 'abs' }, + success: function (result) { + } + }) + + + + + // 期刊内搜索 + $('.sfor_btnw').click(function () { + // console.log($('select[name="cut"] option:selected').val()); + window.open("jour_search.html?J_num=" + Jour_num + "&se_ch=" + $(".sfor_inpw").val()); + }) + // 期刊内订阅 + $('.top .jour_ts input.tishi_author').css('background-color', localStorage.Journals_color); + $.ajax({ + type: 'post', url: apiUrl + 'api/Journal/getTopicForSubscribe', + data: { + "journal_id": Jour_num + }, + success: function (result) { + if (result.code == 0) { + var arr = result.data.topics; + var data_4 = []; + for (var i = 0; i < arr.length; i++) { + data_4.push({ + id: arr[i].journal_topic_id, + text: arr[i].title + }); + } + $("#combox4").combox({ + id: "id", + name: "text", + data: data_4, + valueChange: function (data) { + // debugger + //返回data,filterData,selectData + } + }) + var cb4 = $("#combox4").data('combox'); + + + // 订阅提交 + $(".yue_addm").click(function () { + $(".spa").text(''); + + var add_mess = {}; + add_mess.email = $('#emaplm').val(); + add_mess.topic_ids = []; + var ar_mes = cb4.options.selectData + for (var i = 0; i < ar_mes.length; i++) { + add_mess.topic_ids.push(ar_mes[i]['id']); + } + + var S_Dan = '0'; + var reg = /^[-.-_A-Za-z0-9]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/ + if (cb4.options.selectData == "") { + $(".spa111").text('Please choose topic'); + S_Dan = '1'; + } else if ($("#emaplm").val() == "") { + $(".spa111").text('Please fill in E-mail'); + S_Dan = '1'; + } else if (!(reg.test($("#emaplm").val()))) { + $(".spa111").text('Please fill in properly formatted E-mail'); + S_Dan = '1'; + } + + + if (S_Dan == '1') { + ShowDanger("Incomplete information!"); + } else { + $(".yue_addm").addClass("disable"); + $.ajax({ + type: 'post', url: apiUrl + 'api/Journal/addSubscribeTopics', + data: add_mess, + success: function (result) { + if (result.code == 0) { + $(".mb_aform input[type='text']").val(''); + $(".yue_addm").removeClass("disable"); + $(".jour_ts").fadeIn(); + + $(".jour_ts input.tishi_author").click(function () { + $(".jour_ts").fadeOut(); + }); + + } else { + ShowDanger(result.msg); + $(".yue_addm").removeClass("disable"); + } + }, + error: function () { + ShowDanger("error!"); + $(".yue_addm").removeClass("disable"); + } + }) + } + }) + + } else { + ShowDanger("请求失败!"); + } + }, + error: function () { + ShowDanger("error!"); + } + }); + + + // 相关文章 + +} + +function shouldColor(rowIndex, cellIndex, row) { + // 判断是否是最左侧的单元格 + if (cellIndex === 0 && row[0].rowspan) { + const rowspan = row[0].rowspan; // 获取最左侧单元格的 `rowspan` + const startRow = rowIndex; // 当前单元格所在的行 + const endRow = startRow + rowspan - 1; // 跨越的最后一行 + + // 判断当前行是否在 `rowspan` 范围内,并且是奇数行 + return rowIndex >= startRow && rowIndex <= endRow && (rowIndex + 1) % 2 !== 0; // 判断是否为奇数行 + } + return false; +} +function addRowIdToData(content) { + console.log('每行data数据1', content) + var data = JSON.parse(JSON.stringify(content)) + const rowIdMap = {}; + const usedRows = new Set(); + let idCounter = 0; + + for (let i = 0; i < data.length; i++) { + if (usedRows.has(i)) continue; + + const rowId = `row-${idCounter++}`; + rowIdMap[i] = rowId; + usedRows.add(i); + + const row = data[i]; + for (let j = 0; j < row.length; j++) { + const cell = row[j]; + if (cell?.rowspan && cell.rowspan > 1) { + for (let k = 1; k < cell.rowspan; k++) { + const nextRowIndex = i + k; + if (nextRowIndex < data.length && !rowIdMap[nextRowIndex]) { + rowIdMap[nextRowIndex] = rowId; + usedRows.add(nextRowIndex); + } + } + } + } + } + + // 把 rowId 实际写进每个单元格 + for (let i = 0; i < data.length; i++) { + const rowId = rowIdMap[i]; + for (let j = 0; j < data[i].length; j++) { + if (!data[i][j]) data[i][j] = {}; + data[i][j].rowId = rowId; + } + } + console.log('每行data数据111:', JSON.parse(JSON.stringify(data))) + const seenIds = []; + + + data.map((row, rowIndex) => { + // row= row.filter(cell => cell.cellId) + + row.map((cell, cellIndex) => { + if (cell.rowId) { + row.rowId = cell.rowId + } + }) + }) + data.forEach(row => { + if (row.rowId && !seenIds.includes(row.rowId)) { + seenIds.push(row.rowId); // Mark this rowId as seen + } + }); + const rowIds = seenIds.filter((_, index) => index % 2 === 0); + const rowData = data + return { rowData, rowIds } + +} + +function initRelatedArticles(a_ID,) { + $.ajax({ + type: 'post', + url: apiUrl + 'api/Article/getArticleByKeywords', + data: { article_id: a_ID }, + success: function (result) { + if (result.code === 0) { + var relatedarticlesStr = '' + //Related articles + if (result.data && result.data.length > 0) { + arr = result.data + relatedarticlesStr += `
+

Related Articles

    `; + + // 使用 map 来遍历并返回 HTML 字符串 + relatedarticlesStr += arr.map((item, linkIndex) => { + return `
  • + ${linkIndex + 1}. ${item.title} +

    ${item.abbr}, ${item.journal.title}, ${item.stage.stage_year}

  • `; + }).join(''); // 使用 join 来拼接所有的 HTML 字符串 + + relatedarticlesStr += `
`; + $('.corr_late').css('display', 'block'); // 设置显示样式 + $('#ArticleCorrLateNav').css('display', 'block'); // 设置显示样式 + $('.corr_late').html(relatedarticlesStr); // 设置 HTML 内容 + + } + + //Related articles + } + }, + error: function () { + + } + }); +} +function initTopics(a_ID) { + + // 右侧话题 + $.ajax({ + type: 'post', url: apiUrl + 'api/Article/getTopicsForArticle', + data: { + "article_id": a_ID + }, + success: function (result) { + if (result.code == 0) { + var arr = result.data.topics; + + var TopicsStr = '' + + if (result.data && arr.length > 0) { + + TopicsStr += `
+

Topics

+
    `; + + // 使用 map 来遍历并返回 HTML 字符串 + TopicsStr += arr.map((item, linkIndex) => { + return `
  • + +
    + ${item.title}
  • `; + }).join(''); // 使用 join 来拼接所有的 HTML 字符串 + + TopicsStr += `
`; + $('.contnet_Topics').css('display', 'block'); // 设置显示样式 + $('#ArticleTopics').css('display', 'block'); // 设置显示样式 + $('.contnet_Topics').html(TopicsStr); // 设置 HTML 内容 + + } + + + + } else { + ShowDanger("请求失败!"); + } + }, + error: function () { + ShowDanger("error!"); + } + }); + + +} + + + +function initArticleHtmlFun(arr, result, html_type, ArticleData) { + + console.log('ArticleData at line 1519:', ArticleData) + var refersContent = ''; + var htmlContent = '' + htmlContent += arr.map((item, index) => { + //批注 + let contentHtml = ''; + let sectionId = 'section-' + index; // 生成唯一的 ID + // 判断是否是图片 + if (item.type == 1) { + + var picsrc = 'https://submission.tmrjournals.com/public/articleImage/' + item.image.url; + var fun = "picPreview('" + picsrc + "');" + + contentHtml = ` +

+ + +

${item.image.title ? item.image.title : '' + }

+

${item.image.note ? item.image.note : '' + }

+

+ `; + } else if (item.type == 2) { + var tableList = JSON.parse(item.table.table_data); + + + const { header, content } = splitTable(tableList); + console.log('content at line 8641:', content); // 打印深拷贝的内容 + var { rowData, rowIds } = addRowIdToData(JSON.parse(JSON.stringify(content))) + console.log('content at line 8542:', rowIds, rowData) + // console.log('contentList at line 8571:', contentList) + + contentHtml = ` +
+ +${item.table.title ? item.table.title : ''} + +${header + .map((row, i) => { + return ` + + ${row + .map((cell, cellIndex) => { + return ` + + `; + }) + .join('')} + + `; + }) + .join('')} + ${rowData + .map((row, i) => { + return ` + + ${row + .map((cell) => { + if (!cell || !cell.cellId) return ''; + + const content = cell.text || ''; + const isBase64Image = /^]*src=["']data:image\//i.test(content); + + const finalContent = isBase64Image + ? content.replace( + /]*?)src=["'](data:image\/[^"']+)["']([^>]*)>/gi, + (match, preAttrs, src, postAttrs) => { + const safeSrc = src.replace(/'/g, "\\'"); + return ``; + } + ) + : content; + + + return ` + `; + }) + .join('')} + + `; + }) + .join('')} +
+ ${cell.text || ''} +
+ ${finalContent} +
+

${item.table.note ? item.table.note : '' + }

+
+`; + } else { + + contentHtml = `

${item.content}

`; + + + + } + + // 判断是否是表格类型 + + return contentHtml; + }).join(''); + //文章html内容部分 + htmlContent = `
${htmlContent}
` + + + + if (result.data.refers.length > 0) { // 如果有引用数据 + var refs = ''; + var xuhao = 0; + for (var rr = 0; rr < result.data.refers.length; rr++) { + // 如果格式不正确,或者信息不全 + let item = ''; + if (result.data.refers[rr].refer_type == 'journal' && result.data.refers[rr].doilink != '') { + // journal 类型 + xuhao++; + item = "

" + `${xuhao}. ` + result.data.refers[rr].author + ' ' + result.data.refers[rr].title + ". " + result.data.refers[rr].joura + ". " + result.data.refers[rr].dateno + "."; + // 在 "Available at:" 之前插入
标签 + item += "
Available at: " + result.data.refers[rr].doilink + " 

"; + refs += item; + } else if (result.data.refers[rr].refer_type == 'book' && result.data.refers[rr].isbn != '') { + // book 类型 + xuhao++; + item = "

" + `${xuhao}. ` + result.data.refers[rr].author + ' ' + result.data.refers[rr].title + ". " + result.data.refers[rr].dateno + "."; + // 在 "Available at:" 之前插入
标签 + item += "
ISBN: " + result.data.refers[rr].isbn + "

"; + refs += item; + } else if (result.data.refers[rr].refer_type == 'other' && result.data.refers[rr].refer_frag != '' && result.data.refers[rr].refer_frag.length > 15) { + // other 类型,检查 refer_frag 中是否有 "Available at:" 链接 + xuhao++; + item = "

" + `${xuhao}. ` + // 检查 refer_frag 中是否包含 "Available at:" + if (result.data.refers[rr].refer_frag.indexOf('Available at:') !== -1) { + // 如果包含 "Available at:",则在其前面插入
标签 + item += result.data.refers[rr].refer_frag.replace('Available at:', '
Available at:'); + } else { + item += result.data.refers[rr].refer_frag; + } + item += ". 

"; + refs += item; + } else { + continue; + } + } + + refersContent = `

References

${refs}
` + + } + + initContentHtml({ html: htmlContent, refers: refersContent }, arr, result.data.refers, html_type, { ...ArticleData }) + + + + +} + +async function initContentHtml(content, arr, refers, html_type, ArticleData) { + var j_artc = ArticleData.data.articleInfo + var pdf_list = '' + var pdfStr = '' + if (j_artc.file_sub != '') { + var fileType = '' + var imgLink = '' + var fileTypeArr = j_artc.file_sub.split('.') + fileType = fileTypeArr[fileTypeArr.length - 1] + + switch (fileType) { + case 'xlsx': + fileTypeName = 'XLSX' + imgLink = 'img/xlsx.png' + break; + case 'zip': + fileTypeName = 'ZIP' + imgLink = 'img/zip.png' + break; + case 'rar': fileTypeName = 'RAR' + imgLink = 'img/zip.png' + break; + case 'docx': + fileTypeName = 'DOCX' + imgLink = 'img/link_1.png' + break; + case 'pdf': + fileTypeName = 'PDF' + imgLink = 'img/articlepdf.png' + break; + default: + fileTypeName = 'OTHER' + imgLink = 'img/otherfile.png' + break; + } + + + pdf_list += '
  • ' + fileTypeName + '
    ' + + '
    Supplementary Material for doi: ' + j_artc.doi + 'Download
  • '; + } + if (j_artc.file_sub2 != '') { + pdf_list += '
  • ' + + + '
    Supplementary Material for doi: ' + j_artc.doi + 'Download
  • '; + } + if (pdf_list != '') { + pdfStr = `

    Supplementary Material

    ${pdf_list}
    ` + + } + + //OriginalDataStr + var OriginalDataStr = '' + var OriginalData = '' + if (j_artc.file_original != '') { + OriginalData = '
    Original data:Download
    '; + OriginalDataStr = `

    Original Data

    ${OriginalData}
    `; + } + //ManuscriptProcessing + var detailIcon = '' + var lis = '' + var trackStr = '' + if (ArticleData.data.track && ArticleData.data.track.length > 0) { + for (var tt = 0; tt < ArticleData.data.track.length; tt++) { + var ttypeName = '' + var li = "" + var ttime = '' + var typeClass = '' + switch (ArticleData.data.track[tt].type) { + case (0): + ttypeName = 'Received' + break; + case (1): + ttypeName = 'With editor' + break; + case (2): + ttypeName = 'Under review' + break; + case (3): + ttypeName = 'Reject' + break; + case (4): + ttypeName = 'Revision' + break; + case (5): + ttypeName = 'Accept' + break; + case (6): + ttypeName = 'Pre-accept' + break; + case (7): + ttypeName = 'Proof' + break; + case (8): + ttypeName = 'Online' + break; + } + // 二级的时间 + var reviewers = "" + if (ArticleData.data.track[tt].reviewers && ArticleData.data.track[tt].reviewers.length > 0) { + shenCode = [] + for (var er = 0; er < ArticleData.data.track[tt].reviewers.length; er++) { + var neiTag = '' + var reviewerState = '' + var reviewerItem = '' + var time1 = '' // 创建时间 + var time2 = '' // 回应时间 + + // 初审和复审的审核意见 + // var fushenContent = '' + var chushenContent = '' + var timess = '' + // 进入页面前清空 + if (ArticleData.data.track[tt].type == 2 && ArticleData.data.track[tt].reviewers[er].question != null) { + chushenContent = '' + timess = '' + chushenContent = ArticleData.data.track[tt].reviewers[er].question.comments + timess = timestampToTime(ArticleData.data.track[tt].reviewers[er].question.ctime) + + shenCode.push("

    Comments:
    " + chushenContent + "

    Review comments received: " + timess + "

    ") + + // detailIcon = '' + detailIcon = '(Detail)' + } + switch (ArticleData.data.track[tt].reviewers[er].state) { + case (1): + reviewerState = 'Accept with major revision' + break; + case (2): + reviewerState = 'Reject' + break; + case (3): + reviewerState = 'Accept with minor revision' + break; + } + time1 = timestampToTime(ArticleData.data.track[tt].reviewers[er].ctime) + time2 = timestampToTime(ArticleData.data.track[tt].reviewers[er].qtime) + reviewerItem = "
    Invitation time:
    " + time1 + "
    " + reviewerState + detailIcon + "Score: " + ArticleData.data.track[tt].reviewers[er].rated + "reviewer: " + ArticleData.data.track[tt].reviewers[er].reviewer_name + "Review comments received: " + time2 + "
    " + reviewers += reviewerItem + } + } + // 获得时间 + ttime = timestampToTime(ArticleData.data.track[tt].time) + + var Revitag = '' + if (ArticleData.data.track[tt].type == 4 && ArticleData.data.track[tt].response) { + var title = '

    Response to reviewers:  

    ' + var lisss = '' + for (var s = 0; s < ArticleData.data.track[tt].response.length; s++) { + var xuhao = s + 1 + var Revfile_url = '' + + Revfile_url = '' + xuhao + '. Download' + + lisss += Revfile_url + } + Revitag = '
    ' + title + lisss + '
    ' + } + li = "
    " + ttime + "
    " + ttypeName + "" + reviewers + Revitag + "
    " + lis += li + } + + trackStr = `

    Manuscript Processing

    ${lis}
    ` + } + + //ManuscriptProcessing + + + + + + + + + var str = ` +
    +
    ${content.html}
    + ${content.refers ? `
    ${content.refers}
    ` : ''} + ${pdfStr ? `
    ${pdfStr}
    ` : ''} + ${OriginalDataStr ? `
    ${OriginalDataStr}
    ` : ''} + ${trackStr ? `
    ${trackStr}
    ` : ''} + + + +
    +
      + +
    +
    + + + + + +
    +
    +
    +
    ` + $('.wen_rong .content-box .conthtmn').html(str); + + + await initArticleHtml(arr, refers, html_type, { OriginalDataStr: OriginalDataStr, pdfStr: pdfStr, trackStr: trackStr }) + await initRelatedArticles(ArticleData.a_ID) + await initTopics(ArticleData.a_ID) + console.log('citationCache at line 2137:', citationCache) + await fetchCitationsData(j_artc.doi, ArticleData.a_ID, async function (data) { + console.log('data at line 893:', data) + citationCache = data; // 存好结果,稍后再使用 + await renderCitations(citationCache, j_artc.doi); // 传入上一步保存的数据 + }); + +} + +function initArticleHtml(htmlData, refs, type, otherList) { + document.querySelectorAll('wmath').forEach(el => { + const latex = el.getAttribute('data-latex'); + if (latex) { + el.innerHTML = latex; + MathJax.typesetPromise([el]); + } + }); + $('.wen_rong .content-box .conthtmn .Ptitle').css({ + background: 'rgb(222, 235, 247)', + 'color': commonTableTitleColor, // No !important here + 'text-align': 'center', // No !important here + 'border': '1px solid rgba(222, 234, 247, 0.1)', + 'border-radius': '10px', + 'font-size': '16px', + 'box-shadow': '0 4px 4px rgba(222, 234, 247, 0.6)', + }); + $('.wen_rong .content-box .conthtmn .oddColor > td').css({ + background: 'rgb(250, 231, 232)', + + }); + // Apply styles to inside .Ptitle using setProperty with !important + $('.wen_rong .content-box .conthtmn .Ptitle > b').each(function () { + this.style.setProperty('font-weight', 'bold', 'important'); + + }); + $('.wen_rong .content-box .conthtmn .Ptitle > i').each(function () { + this.style.setProperty('font-style', 'normal', 'important'); + this.style.setProperty('color', commonTableTitleColor, 'important'); + }); + $('.wen_rong .content-box .conthtmn .Ptitle p > strong').each(function () { + this.style.setProperty('font-weight', 'bold', 'important'); + + }); + $('.wen_rong .content-box .conthtmn .Ptitle p').each(function () { + this.style.setProperty('text-align', 'center', 'important'); + + }); + $('.wen_rong .content-box .conthtmn .Ptitle em').each(function () { + this.style.setProperty('font-style', 'normal', 'important'); + this.style.setProperty('color', commonTableTitleColor, 'important'); + }); + $('.wen_rong .content-box .conthtmn .commonTableTitleColor').each(function () { + + this.style.setProperty('color', commonTableTitleColor, 'important'); + }); + + + // 获取所有段落 + const allParagraphs = document.querySelectorAll('.pMain'); + let abstractEndIndex = -1; + let citationEndIndex = -1; + + // 查找包含“Abstract”文本的段落(无论被标签包裹多少层) + allParagraphs.forEach((p, index) => { + const text = p.innerText.trim().toLowerCase(); + if (text === 'abstract') { + abstractEndIndex = index; + } + if (text === 'citation') { + citationEndIndex = index; + console.log('CitationEndIndex at line 8765:', citationEndIndex) + } + }); + + // 从 Abstract 段落之后开始查找并高亮标题词 + if (abstractEndIndex !== -1 && abstractEndIndex + 1 < allParagraphs.length) { + const nextParagraph = allParagraphs[abstractEndIndex + 1]; + const elements = nextParagraph.querySelectorAll('strong, b'); + elements.forEach((element) => { + const text = element.textContent.trim(); + if (["Background:", "Methods:", "Method:", "Results:", "Result:", "Conclusion:", "Conclusions:"].includes(text) || + ["Background", "Methods", "Method", "Results", "Result", "Conclusion", "Conclusions"].includes(text)) { + element.style.color = commonSupColor; + } + }); + } + if (citationEndIndex !== -1 && citationEndIndex + 1 < allParagraphs.length) { + const nextParagraph = allParagraphs[citationEndIndex + 1]; + nextParagraph.style.color = commonSupColor; + } + $('.wen_rong .content-box .conthtmn sup').each(function () { + var textContent = $(this).text().trim(); // 获取并清理文本内容 + + // 判断文本是否是纯数字 + if (/^\d+$/.test(textContent)) { + this.style.setProperty('color', commonSupColor, 'important'); + } + // 判断文本是否包含 "&" + else if (/&/.test(textContent)) { + this.style.setProperty('color', commonSupColor, 'important'); + } + else if (/ỻ/.test(textContent)) { + this.style.setProperty('color', commonSupColor, 'important'); + } + // 判断文本是否包含 "*" + else if (/\*/.test(textContent)) { + this.style.setProperty('color', commonSupColor, 'important'); + } + // 判断文本是否包含 "#" + else if (/#/.test(textContent)) { + this.style.setProperty('color', commonSupColor, 'important'); + } + // 判断文本是否为由数字和逗号组成的字符串(例如 "1,2,3") + // 判断文本是否为由数字和逗号组成,且逗号两边允许有空格(例如 "1, 2, 3") + else if (/^\d+(\s*,\s*\d+)*$/.test(textContent)) { + this.style.setProperty('color', commonSupColor, 'important'); + } + }); + + + $('.wen_rong .content-box .conthtmn b i').each(function () { + + this.style.setProperty('font-weight', 'bold', 'important'); + }); + // $('.wen_rong .content-box .conthtmn .thumbnailTableBox td sup').each(function () { + + // this.style.setProperty('color', commonSupColor, 'important'); + // }); + + + $('.wen_rong .content-box .conthtmn .Ptitle').each(function () { + this.style.setProperty('color', commonTableTitleColor, 'important'); + this.style.setProperty('text-align', 'center', 'important'); + }); + $('.wen_rong .content-box .conthtmn .Ptitle b i').each(function () { + this.style.setProperty('font-style', 'normal', 'important'); + }); + $('.wen_rong .content-box .conthtmn .Ptitle i b').each(function () { + this.style.setProperty('font-style', 'normal', 'important'); + }); + + + var navLinks = { + content: [], // 存放 content 类型的链接 + image: [], // 存放 image 类型的链接 + table: [] // 存放 table 类型的链接 + }; + + htmlData.forEach((item, index) => { + + + let sectionId = 'section-' + index; // 生成唯一的 ID + + if (type == 0) { + if (item.width == 0) { + if (item.is_title == 1) { + var textContent = $('
    ').html(item.content).text(); // 提取纯文本 + navLinks.content.push({ sectionId: sectionId, type: 'content', text: textContent, href: '#' + sectionId, is_h1: item.is_title, }); + + } + } else { + var picsrc = 'https://submission.tmrjournals.com/public/mainimg/' + item.content; + var textContentimg = $('
    ').html(item.note).text(); // 提取纯文本 + navLinks.image.push({ sectionId: sectionId, type: 'image', text: textContentimg || 'Image ' + (index + 1), href: '#' + sectionId, url: picsrc }); + + } + } else { + // 判断是否是图片 + if (item.type == 1) { + var picsrc = 'https://submission.tmrjournals.com/public/articleImage/' + item.image.url; + var textContentimg = $('
    ').html(item.note).text(); // 提取纯文本 + + navLinks.image.push({ sectionId: sectionId, type: 'image', text: textContentimg || 'Image ' + (index + 1), href: '#' + sectionId, url: picsrc }); + } else if (item.type == 2) { + var textContentTable = $('
    ').html(item.table.title).text(); // 提取纯文本 + navLinks.table.push({ sectionId: sectionId, type: 'table', text: textContentTable || 'Table ' + (index + 1), href: '#' + sectionId }); + + } else { + var textContent = $('
    ').html(item.content).text(); // 提取纯文本 + + if (item.is_h1) { + + navLinks.content.push({ sectionId: sectionId, type: 'content', text: textContent, href: '#' + sectionId, is_h1: item.is_h1, }); + } + + } + } + + }) + console.log('navLinks.forEach at line 7752:', navLinks) + // 引用 + var navHtml = `
    + + Outline + Show Outline +
      `; + + // 先添加 content 类型 + navLinks.content.forEach(link => { + navHtml += `
    • ${link.text}
    • `; + + }); + if (navLinks.image.length > 0) { + navHtml += `
    • +

      Figures (${navLinks.image.length})

      +
    • `; + + $(document).on('click', '.v4-show-hide-icon', function () { + const $this = $(this); + const isCollapsed = $this.hasClass('is-not-active'); + const hiddenCount = navLinks.image.length - 3; + + $('.navLinksFigures .extra-figure').slideToggle(200); + $this.toggleClass('is-not-active'); + + if (isCollapsed) { + $this.find('.toggle-text').text(`Hide ${hiddenCount} figures`); + $this.find('.toggle-icon').removeClass('fa-angle-right').addClass('fa-angle-up'); + } else { + $this.find('.toggle-text').text(`Show ${hiddenCount} more figures`); + $this.find('.toggle-icon').removeClass('fa-angle-up').addClass('fa-angle-right'); + } + }); + + + } + + if (navLinks.table.length > 0) { + navHtml += `
    • +

      Tables (${navLinks.table.length})

      +
    • `; + } + if (refs.length > 0) { + navHtml += `
    • +

      References

      +
    • `; + } + if (otherList.pdfStr && otherList.pdfStr != '') { + navHtml += `
    • +

      Supplementary Material

      +
    • `; + } + if (otherList.OriginalDataStr && otherList.OriginalDataStr != '') { + navHtml += `
    • +

      Original Data

      +
    • `; + } + if (otherList.trackStr && otherList.trackStr != '') { + navHtml += `
    • +

      Manuscript Processing

      +
    • `; + } + + navHtml += ``; + navHtml += ``; + navHtml += ``; + + + + navHtml += '
    '; + $('.wen_rong .content-box .conthtmn').prepend(navHtml); + // 给导航栏添加固定定位样式 + // 给导航栏添加固定定位样式 + + $('.jo-catalog-title').css({ + 'line-height': '40px', + 'font-size': '18px', + 'color': '#333', + 'border-bottom': '1px solid #f0f0f0', + + }); + $('.outiline-item').css({ + + 'box-sizing': 'border-box', + 'font-size': '14px', + 'color': '#454545', + 'cursor': 'pointer', + }); + $('.outiline-content').css({ + 'padding': '4px 0', + 'margin-left': '16px', + 'color': '#333', + 'cursor': 'pointer', + 'font-family': 'Charis SIL', + + + }); + + $('.outiline-img').css({ + + 'margin-top': '20px', + 'margin-bottom': '20px', + + + }); + $('.outiline-table').css({ + + 'margin-top': '20px', + 'margin-bottom': '20px', + + // 'border-left': '3px solid #efefef', + + }); + $('.navLinksFigures').css({ + 'display': 'flex', + 'flex-wrap': 'wrap', + 'gap': '10px', + + // 'margin-bottom': '10px', + 'margin-top': '10px', + + }); + $('.navLinksTables').css({ + 'display': 'flex', + 'flex-wrap': 'wrap', + 'gap': '4px', + + // 'margin-bottom': '10px', + // 'margin-top': '10px', + + }); + + // 在滚动时保持导航栏在视口内 + + $(document).ready(function () { + // 监听右侧滚动区域 + $('.newBox').scroll(function () { + + + var scrollTop = $(this).scrollTop(); // 获取当前右侧滚动的位置 + + + + + + var scrollHeight = $(this)[0].scrollHeight; // 获取右侧滚动区域的总高度 + var containerHeight = $(this).height(); // 获取右侧容器的高度 + // 获取所有右侧的 .pMain + var sections = $('.newBox').find('.pMain'); + var navLinks = $('.anchor-nav').find('a'); // 获取所有左侧的导航链接 + + // 初始化清除所有导航链接的高亮 + navLinks.css({ + 'color': '', // 恢复默认颜色 + 'font-weight': '' // 恢复默认字体粗细 + }); + + // 遍历所有的 section + sections.each(function (index, section) { + var sectionTop = $(section).offset().top - $('.newBox').offset().top + scrollTop; // 计算每个 .pMain 相对于 .newBox 的位置 + var sectionBottom = sectionTop + $(section).outerHeight(); // 获取每个 section 的底部位置 + // 判断该 section 是否在可视区域内 + if (scrollTop + containerHeight >= sectionTop && scrollTop <= sectionBottom) { + // 高亮对应的导航链接 + $(navLinks[index]).css({ + 'color': 'rgb(0, 102, 153)', // 激活时颜色变为蓝色 + 'font-weight': 'bold' // 激活时加粗 + }); + // 只高亮一个链接,找到第一个符合条件的并停止遍历 + return false; // 结束 .each() 遍历 + } + }); + }); + $('.wordTableHtml table tr.table-header-row td').each(function () { + this.style.setProperty('border-bottom', '1px solid #000', 'important'); + + }); + const waitForTop = setInterval(() => { + const bar = document.querySelector('.v4-art-top'); + if (bar) { + clearInterval(waitForTop); + + let lastStatus = false; + const offsetTop = bar.getBoundingClientRect().top + $('.newBox')[0].scrollTop; + + $('.newBox').on('scroll', function () { + const scrollTop = $(this).scrollTop(); + + if (scrollTop >= offsetTop) { + if (!lastStatus) { + bar.classList.add('fixed'); + // 加动画类,显示动画 + setTimeout(() => { + bar.classList.add('show'); + }, 10); + lastStatus = true; + } + } else { + if (lastStatus) { + // 先移除动画类,立即移除位置固定 + bar.classList.remove('show'); + + // 直接移除 fixed,不等待动画 + bar.classList.remove('fixed'); + + lastStatus = false; + } + } + }); + } + }, 100); + + $(document).on('click', '.outline-toggle', function () { + const $container = $(this).closest('.outline-container'); + const $icon = $(this).find('i'); + const $text = $(this).find('.toggle-text'); + const $panel = $('.conthtmn_right'); + const isClosed = $container.hasClass('is-closed'); + + if (isClosed) { + $container.removeClass('is-closed').addClass('is-open'); + $panel.get(0).style.setProperty('margin-left', '300px', 'important'); + + + } else { + $container.removeClass('is-open').addClass('is-closed'); + + + + $panel.get(0).style.setProperty('margin-left', '40px', 'important'); + } + }); + + + + + + + }); + + +} +function isHeaderRow(rowIndex, table) { + + + + var head = table[0] + + + return rowIndex < head[0].rowspan; // 假设前两行是表头 +} +function splitTable(tableList) { + // 获取头部行数 + const headerRowCount = tableList[0][0].rowspan || 1; // 默认第一行是头部行,获取该行的 rowspan + // 用 isHeaderRow 判断头部行 + const header = []; + const content = []; + let cellIdCounter = 0; // 初始化计数器,用于为每个单元格生成唯一的 cellId + tableList.forEach((row, rowIndex) => { + row.forEach((cell, cellIndex) => { + cell.cellId = `cell-${cellIdCounter}`; + cellIdCounter++; + }); + if (isHeaderRow(rowIndex, tableList)) { + header.push(row); // 将头部行添加到 header 数组 + } else { + content.push(row); // 将内容行添加到 table 数组 + } + }); + // + console.log('header:', header); // 打印头部行数据 + console.log('table打印内容行数据:', content); // 打印内容行数据 + + return { header, content }; +} +// 图片预览 +function picPreview(src) { + console.log(src) + $('.PicPreview img').attr('src', src) + $('.PicPreview').show() +} +$('.PicPreview').on('click', function () { + $('.PicPreview').hide() +}) + +// 显示审核内容 +function showComments(num) { + // console.log('显示初审内容',shenCode) + layer.open({ + type: 1 + , title: false //不显示标题栏 + , closeBtn: true + , area: '600px;' + , shade: 0.8 + , id: 'LAY_layuipro' //设定一个id,防止重复弹出 + /// ,btn: ['close'] + , btnAlign: 'c' + , moveType: 1 //拖拽模式,0或者1 + , content: shenCode[num] + }); +} +function getCiteList(a_ID) { + $('.cite_box .export_cite').html('
    '); + var journalCiteStr = '' + $.ajax({ + type: 'post', url: apiUrl + 'api/Article/getArticleCites', + data: { + "article_id": a_ID + }, + success: function (result) { + if (result.code == 0) { + + var arr = result.data.list + for (let i in arr) { + journalCiteStr += ` +

    ${Number(i) + 1}.

    +
    +

    + ${arr[i].article_name} +

    + +

    + ${arr[i].author ? `${arr[i].author},` : ''} ${arr[i].journal_name}${arr[i].vol ? `${arr[i].vol},` : ''} + + +

    + +
    ` + } + journalCiteStr += `
    ` + + $('.cite_box .export_cite').html(journalCiteStr); + + + + + + } + } + }) +} + +function initArticleNavList(a_ID) { + var Journals_color = localStorage.getItem('Journals_color') + var journalStageID = localStorage.getItem('journalStageID') + //是否显示地图 + var isShowAuthorship = 0; + if ([1, 14, 8].includes(Number(Jour_num))) { + isShowAuthorship = 1 + } + // if (a_ID == 4477) { + const style = document.createElement('style'); + style.innerHTML = `/* 遮罩层 */ + .article_dropbtn:hover { + color: ${Journals_color}; + + } + .article_dropdown-list a:hover { + + border-bottom:2px solid ${Journals_color}; + font-weight:bold; + color:#333; + } + .toggle-btn{ + color: ${Journals_color}; + } + `; + document.head.appendChild(style); + + + // 获取 id 为 top_bar 的元素 + var topBar = document.getElementById("top_bar"); + + var otherStr1 = ` + +

    Current Issue

    +

    Online First

    +

    Archiving

    +

    Special Issues

    + +

    Highlights

    + + ` + var otherStr2 = `

    Journal Information

    + +

    Guide for Authors

    +

    Abstracting & Indexing

    + + + ` + // Abstracting & Indexing + var otherStr3 = ` +

    Peer-review process

    +

    Submission System

    +

    Ethics and Malpractice Statement

    + +
    + +

    Authorship

    + + ` + var str = `
    +
    +
    +
    Articles & Issues
    +
    + ${otherStr1} +
    +
    +
    +
    About Journal
    +
    + ${otherStr2} +
    +
    +
    +
    Publish
    +
    + ${otherStr3} +
    +
    +
    +
    ` + + + + // 使用 insertAdjacentHTML 在 top_bar 后插入新元素 + if (topBar) { + topBar.insertAdjacentHTML('afterend', str); + + + + } + + + // JavaScript to handle dropdown toggle on button click + + + + // } + + + +} +function openPdf(url, j_artc, Jour_num) { + $.ajax({ + type: 'post', url: apiUrl + 'yuan/Article/addArticleNum', async: false, + data: { "article_id": j_artc.article_id, "type": 'pdf' }, + success: function (result) { + } + }) + $.ajax({ + type: 'post', url: apiUrl + 'super/Publish/addVisitNum', + data: { 'type': Jour_num, 'is_detail': '1' }, + success: function (result) { + } + }); + window.open(url); +} +function initMoreButtonTopList(articleInfo, a_ID) { + console.log('articleInfo at line 2590:', articleInfo) + + var j_artc = articleInfo.articleInfo + var Journals_color = localStorage.getItem('Journals_color') + var journalStageID = localStorage.getItem('journalStageID') + + + const style = document.createElement('style'); + style.innerHTML = ` + + .v4-art-top-main-m .v4-art-top-item span:hover{ + color: ${Journals_color}; + } + + ` + + document.head.appendChild(style); + + // 获取 id 为 top_bar 的元素 + var topBar = document.getElementById("article_base_info_box"); + + var str = ` +
    +
    +
    + ${j_artc.file_pdf !== '' ? ` +
    + + Preview PDF +
    + ` : ''} +
    + + Cite +
    + + +
    +
    + `; + + // 使用 insertAdjacentHTML 在 top_bar 后插入新元素 + if (topBar) { + + topBar.insertAdjacentHTML('afterend', str); + + const citeEl = document.querySelector('.v4-art-top-item.cite'); + if (citeEl) { + citeEl.onclick = () => { + openCite(Jour_num, Journals_color, a_ID, j_artc, articleInfo); + }; + } + const pdfEl = document.querySelector('.v4-art-top-item.view-pdf'); + if (pdfEl) { + pdfEl.onclick = () => { + openPdf(`${imgFileUrl}articlePDF/${j_artc.file_pdf}`, j_artc, Jour_num); + }; + } + setTimeout(() => { + if (window.__sharethis__) { + __sharethis__.initialize(); + } + + }, 50) + + } +} +function openAbstracting(Jour_num, Journals_color) { + var list = localStorage.getItem('journalAbs') + var arr_Abc = JSON.parse(list).filter(e => e.is_show == 1); + var Abstractingcontent = `
      + ${arr_Abc.map((item, i) => { + return `
    • » ${item.title}
    • `; + }).join('')} +
    ` + document.querySelector('#common-popup .common-popup-content').classList.add('whitebg'); + showPopup(`Abstracting & Indexing`, Abstractingcontent) + + + + + // 5秒后自动关闭 + // setTimeout(closePopup, 5000); +} +function openCite(Jour_num, Journals_color, a_ID, j_artc, data) { + console.log('data at line 2593:', j_artc, data) + var GoogleScholar = '' + if ((Math.round(Date.parse(new Date()) / 1000) - j_artc.ctime) / 86400 >= 21) { + GoogleScholar = + `Google Scholar` + } + // var lnk_ = ''; + // if (j_artc.file_pdf != '') { + // lnk_ += ' PDF    ' + // } + + // if (j_artc.file_html != '') { + // lnk_ += '     HTML' + // } + + // if (j_artc.article_id == '172') { + // lnk_ += '    ' + // } + var NotTeX_ = '' + if (j_artc.bibtex != '') { + NotTeX_ += 'BibTeX' + } + var Abstractingcontent = `

    ${data.cite}

    +
    ${GoogleScholar}
    +
    + ${NotTeX_} +
    + +
      +
    • Export citation to EndNote
    • +
    • Export citation to RIS
    • +
    • Export citation to BibTex
    • +
    • Export citation to txt
    • +
    +
    + ` + document.querySelector('#common-popup .common-popup-content').classList.add('whitebg'); + showPopup(`Cite this article`, Abstractingcontent) + document.getElementById('common-popup').style.width = 'auto'; + document.getElementById('common-popup').style.setProperty('min-height', 'auto', 'important'); + // 点击复制和下载 + $('.Exc_2').click(function () { + $.ajax({ + type: 'post', url: apiUrl + 'api/Article/getArticleenw', async: false, + data: { "article_id": a_ID }, + success: function (result) { + var a = document.createElement('a'); + a.href = result.data.url; + a.download = '' + a.click(); + } + }) + }) + $('.Exc_3').click(function () { + $.ajax({ + type: 'post', url: apiUrl + 'api/Article/getArticleRis', async: false, + data: { "article_id": a_ID }, + success: function (result) { + var a = document.createElement('a'); + a.href = result.data.url; + a.download = '' + a.click(); + } + }) + }) + $('.Exc_4').click(function () { + var ecx_id = $(this).parents('.links_').siblings('.txt_biaoti').attr('id') + $.ajax({ + type: 'post', url: apiUrl + 'api/Article/getArticlebib', async: false, + data: { "article_id": a_ID }, + success: function (result) { + var a = document.createElement('a'); + a.href = result.data.url; + a.download = '' + a.click(); + } + }) + }) + $('.Exc_5').click(function () { + $.ajax({ + type: 'post', url: apiUrl + 'api/Article/getArticletext', async: false, + data: { "article_id": a_ID }, + success: function (result) { + var a = document.createElement('a'); + a.href = result.data.url; + a.download = '' + a.click(); + } + }) + }) + + + + + + // 5秒后自动关闭 + // setTimeout(closePopup, 5000); +} +function openAuthorship(Jour_num, Journals_color) { + + var Abstractingcontent = ` +
    +
    +
      +
      +
      + ` + document.querySelector('#common-popup .common-popup-content').classList.add('whitebg'); + showPopup(`Abstracting & Indexing`, Abstractingcontent, 'Authorship') + + + + + // 5秒后自动关闭 + // setTimeout(closePopup, 5000); +} +function showPopup(title, content, type) { + $('#common-popup .common-popup-title').html(title) + $('#common-popup .common-popup-content').html(content) + + document.getElementById('common-overlay').style.display = 'block'; + if (type == 'Authorship') { + document.getElementById('common-popup').style.width = 'auto'; + renderMap(190) + } + + document.getElementById('common-popup').style.opacity = '1'; + document.getElementById('common-popup').style.zIndex = '101'; + + // 5秒后自动关闭 + // setTimeout(closePopup, 5000); +} + +function closePopup() { + document.getElementById('common-popup').style.opacity = '0'; + document.getElementById('common-popup').style.zIndex = '-1'; + setTimeout(function () { + document.getElementById('common-overlay').style.display = 'none'; + $('#common-popup .common-popup-title').html('') + $('#common-popup .common-popup-content').html('') + }, 50); +} \ No newline at end of file diff --git a/js/article_v2.js b/js/article_v2.js new file mode 100644 index 0000000..c070377 --- /dev/null +++ b/js/article_v2.js @@ -0,0 +1,2951 @@ + + +var commonSupColor = 'rgb(0,112,192)'//上角标颜色 +var commonTableTitleColor = 'rgb(210,90,90)'//上角标颜色 +var commonSupFontColor = 'color:rgb(0,112,192);'//上角标字体颜色 +const style = document.createElement('style'); +style.innerHTML = ` + +` + +document.head.appendChild(style); +function loadMathJax(callback) { + const script = document.createElement('script'); + + // 可选:配置 MathJax(必须在加载 script 前设置) + window.MathJax = { + tex: { + inlineMath: [['$', '$'], ['\\(', '\\)']], + displayMath: [['$$', '$$'], ['\\[', '\\]']] + }, + startup: { + typeset: false // 不自动 typeset,手动触发更灵活 + } + }; + + script.src = 'https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js'; + script.onload = callback; + document.head.appendChild(script); +} +loadMathJax() +var script = document.createElement('script'); +script.src = '/js/not_map.js'; +var script1 = document.createElement('script'); +script1.src = '/echarts-master/echarts.min.js'; +var script2 = document.createElement('script'); +script2.src = '/echarts-master/world.js'; + +document.head.appendChild(script1); +document.head.appendChild(script2); +document.head.appendChild(script); + +function initStyle() { + // 找到目标元素 + const navBan = document.querySelector('.nav_ban.rgb_color_background'); + + if (navBan) { + // 创建一个新的 inner-wrapper div + const innerWrapper = document.createElement('div'); + innerWrapper.className = 'inner_nav_ban_wrapper'; + + // 把 navBan 中所有子节点移动到 innerWrapper 中 + while (navBan.firstChild) { + innerWrapper.appendChild(navBan.firstChild); + } + + // 再把 innerWrapper 加回 navBan 中 + navBan.appendChild(innerWrapper); + } + + +} +// 列表 +function at_list() { + + + function adjustNavHeight() { + var windowHeight = window.innerHeight; // 获取页面高度 + $(".anchor-nav").css("height", windowHeight + "px"); // 设置导航栏高度为页面高度 + } + + // 页面加载时调整导航栏高度 + adjustNavHeight(); + + // 窗口大小变化时调整导航栏高度 + $(window).resize(function () { + adjustNavHeight(); // 重新调整导航栏高度 + }); + + // 获取地址栏信息 + 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; + } +} + +let citationCache = null; // 你可以存在全局变量、Vue data 或其他位置 + + +// 时间戳格式化 + +function timestampToTime(str) { + //str = str * 1000 + var oDate = new Date(str * 1000), + oYear = oDate.getFullYear(), + oMonth = oDate.getMonth() + 1, + oDay = oDate.getDate(), + oHour = oDate.getHours(), + oMin = oDate.getMinutes(), + oSen = oDate.getSeconds(), + oTime = oYear + '-' + getzf(oMonth) + '-' + getzf(oDay) + ' ' + getzf(oHour) + ':' + + getzf(oMin) + ':' + getzf(oSen);//最后拼接时间 + return oTime; +}; +//补0操作 +function getzf(num) { + if (parseInt(num) < 10) { + num = '0' + num; + } + return num; +} +function fetchCitationsData(doi, a_ID, callback) { + // doi = '10.53388/TMR20200222165' + // a_ID = 471 + let citations = { + wos: [], + dimensions: 0, + scite: 0, + crossref: [] + }; + + let list = [doi]; + let completedRequests = 0; + + function checkAllDone() { + completedRequests++; + if (completedRequests === 4) { + callback(citations); // 当所有数据加载完成后触发回调 + } + } + + // WOS 数据 + $.post(apiUrl + 'api/Article/getArticleCites', { article_id: a_ID }, function (res) { + citations.wos = res.code === 0 ? res.data.list : []; + checkAllDone(); + }); + + // Dimensions + $.get('https://metrics-api.dimensions.ai/doi/' + doi, function (res) { + citations.dimensions = res.times_cited || 0; + checkAllDone(); + }).fail(function () { + citations.dimensions = 0; + checkAllDone(); + }); + + // Scite + $.ajax({ + type: 'post', + url: 'https://api.scite.ai/tallies', + contentType: "application/json", + dataType: "json", + data: JSON.stringify(list), + success: function (res) { + for (let key in res.tallies) { + citations.scite = res.tallies[key]?.citingPublications || 0; + } + checkAllDone(); + }, + error: function () { + citations.scite = 0; + checkAllDone(); + } + }); + + // CrossRef + $.post(apiUrl + 'api/Article/getArticleDetailCites', { article_id: a_ID }, function (res) { + citations.crossref = res.code === 0 ? res.data : []; + checkAllDone(); + }); +} +function renderCitations(citations, doi) { + console.log('doi at line 479:', citations) + + + + let wosHtml = ''; + citations.wos.forEach((item, i) => { + wosHtml += ` +
      +

      ${i + 1}.

      +
      +

      ${item.article_name}

      +

      + + ${item.journal_name}, ${item.author || ''}, ${item.vol || ''} + + + https://doi.org/${item.doi} + +

      +
      +
      `; + }); + + let crossrefHtml = ''; + if (citations.crossref && citations.crossref.length > 0) { + citations.crossref.forEach((item, i) => { + crossrefHtml += ` +
      +

      ${i + 1}.

      +
      +

      ${item.article_title}

      +

      + + ${item.journal_title}, ${item.year} + + + https://doi.org/${item.doi} + +

      +
      +
      `; + }); + } + + {/* + + + + */} + const str = ` +

      + Article Citations +

      + + +
      + +
      +
      +
      +
      +
      + + + `; + + + + + + $('.article-quote').css('display', 'block'); // 设置显示样式 + $('#ArticleCitations').css('display', 'block'); // 设置显示样式 + $('.article-quote').html(str); // 设置 HTML 内容 + +} + +/* 相关引用次数 */ +// function getCitations(doi, a_ID) { + + +// // var doi = '10.53388/IMD202408001'; +// $('.article-quote-box').css({ +// width: '25%', +// 'margin-right': '0px', +// 'border-right': '1px solid ' + localStorage.Journals_color, +// }) +// $('.DimensionsBadge .quote-source').html('Dimensions Badge') +// $('.SciteBadge .quote-source').html('Scite Badge (Wiley)') +// $('.Crossref .quote-source').html('Crossref') +// $('.Crossref').css({ 'border-right': 'none' }) +// $('.Wos .quote-source').html('Wos') +// var list = [doi]; +// $.ajax({ +// type: 'post', url: apiUrl + 'api/Article/getArticleCites', +// data: { +// "article_id": a_ID +// }, +// success: function (result) { +// if (result.code == 0) { +// var str1 = `
      ${result.data.list && result.data.list.length > 0 ? result.data.list.length : 0}
      ` +// var journalCiteStr = "" +// $('.Wos .quote-content1').html(str1) +// var arr = result.data.list +// for (let i in arr) { +// journalCiteStr += `

      ${Number(i) + 1}.

      +//
      +//

      ${arr[i].article_name}

      + +//

      +// ${arr[i].journal_name}, +// ${arr[i].author ? `${arr[i].author},` : ''} ${arr[i].journal_name}${arr[i].vol ? `${arr[i].vol},` : ''} +// + +// +// https://doi.org/${arr[i].doi}

      + +//
      ` +// } + +// if (result.data.list && result.data.list.length > 0) { +// $('.WosNumber').click(function () { +// var infoStr = `Citations registered in Wos` +// $('#framed_div .info-box').html(infoStr); +// $('#framed_div .quote-content').html(journalCiteStr); +// $('#framed_div').addClass('isWos'); + +// if ($('#framed_div').hasClass('openCrossref')) { + +// if ($('#framed_div').hasClass('isCrossref')) { + +// $('#framed_div').removeClass('isCrossref'); +// $('#framed_div').removeClass('openCrossref'); +// setTimeout(() => { +// $('#framed_div').addClass('openCrossref'); +// }, 100) + +// } else { +// $('#framed_div').removeClass('openCrossref'); +// $('#framed_div').removeClass('isWos'); +// } + +// } else { +// $('#framed_div').addClass('isWos'); +// $('#framed_div').addClass('openCrossref'); +// } + + +// }) +// } + + +// } +// } +// }) +// //Dimensions Badge +// $.ajax({ +// type: 'get', +// url: 'https://metrics-api.dimensions.ai/doi/' + doi,//正式环境 +// success: function (result) { +// console.log('result at line 212:', result) +// // var str = `` +// $('.DimensionsBadge a').attr('href', 'https://badge.dimensions.ai/details/doi/' + doi) +// var str = `
      ${result.times_cited}
      ` +// $('.DimensionsBadge .quote-content').html(str) +// }, +// error: function (result) { +// console.log('result at line 212:', result) +// // var str = `` + +// var str = `
      0
      ` +// $('.DimensionsBadge .quote-content').html(str) +// } +// }) +// //Scite Badge (Wiley) +// $.ajax({ +// type: 'post', +// url: 'https://api.scite.ai/tallies',//正式环境 +// contentType: "application/json", +// dataType: "json", +// data: JSON.stringify(list), +// success: function (result) { +// console.log('result at line 212:', result) +// for (let i in result.tallies) { +// $('.SciteBadge a').attr('href', 'https://scite.ai/reports/' + i) +// var str1 = `
      ${result.tallies[i]['citingPublications']}
      ` +// } +// $('.SciteBadge .quote-content1').html(str1) +// }, +// error: function (result) { +// console.log('result at line 212:', result) +// var str1 = `
      0
      ` + +// $('.SciteBadge .quote-content1').html(str1) +// } +// }) +// $.ajax({ +// type: 'post', url: apiUrl + 'api/Article/getArticleDetailCites', +// data: { +// "article_id": a_ID +// }, +// success: function (result) { +// if (result.code == 0) { +// var str1 = `
      ${result.data && result.data.length > 0 ? result.data.length : 0}
      ` +// var journalCiteStr = "" +// $('.Crossref .quote-content1').html(str1) +// var arr = result.data +// for (let i in arr) { +// journalCiteStr += `

      ${Number(i) + 1}.

      +//
      +//

      ${arr[i].article_title}

      + +//

      +// ${arr[i].journal_title}, +// +// ${arr[i].year} + +// +// https://doi.org/${arr[i].doi}

      + +//
      ` +// } + +// if (result.data && result.data.length > 0) { + +// $('.crossrefNumber').click(function () { +// var infoStr = `Citations registered in CrossRef` +// $('#framed_div .info-box').html(infoStr); +// $('#framed_div .quote-content').html(journalCiteStr); $('#framed_div').addClass('isCrossref'); +// if ($('#framed_div').hasClass('openCrossref')) { + +// if ($('#framed_div').hasClass('isWos')) { + +// $('#framed_div').removeClass('isWos'); +// $('#framed_div').removeClass('openCrossref'); +// $('#framed_div').addClass('isCrossref'); +// setTimeout(() => { +// $('#framed_div').addClass('openCrossref'); +// }, 100) +// } else { +// $('#framed_div').removeClass('openCrossref'); +// $('#framed_div').removeClass('isCrossref'); +// } + +// } else { +// $('#framed_div').addClass('isCrossref'); +// $('#framed_div').addClass('openCrossref'); +// } +// }) +// } + + +// } +// } +// }) + + +// } + + +// 文章内容 +function article_con() { + $('.wen_jian .left .toggle-btn').html('Author Information ▼') + + var newBox = document.querySelector('.newBox'); + var commonPopupStr = ` +
      +
      + × +
      +

      +
      + +
      +
      +
      +`; + + // 将弹窗插入到页面中 + newBox.insertAdjacentHTML('beforeend', commonPopupStr); + + console.log('js at line 7241:', '是否走了详情js') + console.log('详情js', localStorage.Journals_title); + // 获取地址栏信息 + 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; + } + + var a_ID = getQueryString('a_id'); //文章 + var htm_ID = getQueryString('s_htm'); //目前显示html + const isPre = getQueryString('preview'); + + if (!isPre) { + initArticleNavList(a_ID) + } + + // 增加访问次数 + + + if (isPre) { + $('#top_bar .top').css('display', 'none') + + $('.wen_rong .content-box .conthtmn').html(` +
      接收到来自父页面的数据: +
      ` + ); + $.ajax({ + type: 'post', url: apiUrl + 'api/Article/getHtmlByPAID', + data: { + "p_article_id": a_ID + }, + success: function (res) { + if (res.code == 0) { + var arr = res.data.list; + initArticleHtmlFun(arr, res, 2) + + + } + }, + error: function () { + // ShowDanger("error!"); + } + + }) + + } else { + this.initStyle() + + try { + console.log('开始详情接口请求') + $(document).ready(function () { + + + $.ajax({ + type: 'post', url: apiUrl + 'api/Article/getArticleDetail', + data: { + "article_id": a_ID + }, + timeout: 30000, // 设置超时时间为5秒 + + + success: function (result) { + // initArticleNavList(a_ID) + console.log('result at line 7575:', result) + + + + $('.wenzhang .wen_rong .left').css({ + 'background-color': '#f4fafd', + + }) + $('.wenzhang .wen_rong .left .rong_box').css({ + 'background-color': '#fff', + 'margin-top': '0px' + }) + $('.wenzhang .wen_rong .left .mb_aform').css({ + 'background-color': '#fff' + }) + if (result.code == 0) { + + + var html_type = result.data.articleInfo.html_type + var has_html = result.data.articleInfo.has_html + initMoreButtonTopList(result.data, a_ID) + + + // 文章Cite this article + var j_artc = result.data.articleInfo + if (Jour_num != 13) { + //获取文章引用 + + + // 点击增加数字 + $('.txt_html').click(function () { + var num = $(this).next().html(); + $.ajax({ + type: 'post', url: apiUrl + 'yuan/Article/addArticleNum', async: false, + data: { "article_id": a_ID, "type": 'html' }, + success: function (result) { + } + }) + $.ajax({ + type: 'post', url: apiUrl + 'super/Publish/addVisitNum', + data: { 'type': Jour_num, 'is_detail': '1' }, + success: function (result) { + } + }); + $(this).next().html(num); + }) + + } else { + $('.article-quote').css('display', 'none'); + $('.mb_aform').css('display', 'none'); + $('.pos_ter').css('display', 'none'); + $('.footer').css('display', 'none'); + $('.wen_rong .right').css('display', 'none'); + $('.wenzhang .wen_rong .left').css('width', '100%'); + } + + + // 文章路径基本信息 + var j_our = result.data.journalInfo; + var j_info = result.data.stageInfo; + // $('.wen_jian .left>span a').html(j_our.title); + // $('.wen_jian .left>span a').attr('href', '/' + j_our.usx); + localStorage.setItem("Journals_num", j_our.journal_id); + if (j_artc.doi == '') { + var doi_ = '' + } else { + var doi_ = 'DOI:' + j_artc.doi + } + if (j_info.stage_no == '0') { + var stage_ = '' + } else { + var stage_ = 'Issue (' + j_info.stage_no + '): ' + } + if (j_artc.npp == '' || j_artc.npp == ' ') { + var npp_ = '' + } else { + if (j_info.stage_pagename == 'pp.') { + var npp_ = j_artc.npp + '     ' + } else { + var npp_ = j_info.stage_pagename + j_artc.npp + '     ' + } + } + + if (localStorage.Journals_title == '经典中医研究') { + if (j_info.stage_vol == '1') { + j_info.stage_vol = '一' + } + if (j_info.stage_vol == '2') { + j_info.stage_vol = '二' + } + if (j_info.stage_vol == '3') { + j_info.stage_vol = '三' + } + if (j_info.stage_vol == '4') { + j_info.stage_vol = '四' + } + if (j_info.stage_vol == '5') { + j_info.stage_vol = '五' + } + if (j_info.stage_vol == '6') { + j_info.stage_vol = '六' + } + var our_time = '' + j_info.stage_year + '年第' + j_info.stage_vol + '卷  |   第' + j_info.stage_no + '期:' + npp_ + doi_; + } else { + var our_time = '' + j_info.stage_year + ', Vol. ' + j_info.stage_vol + '  |   ' + stage_ + npp_ + doi_; + } + + $('.wen_jian .left>span').append(our_time); + + if (j_artc.other_state == 0) { + var otStat = '' + } else if (j_artc.other_state == 1) { + var otStat = 'Editorial Expression of Concern' + } else if (j_artc.other_state == 2) { + var otStat = 'Retracted' + } + + $('.wen_jian .left>h4').html(otStat + j_artc.title); + + + // 文章基本作者机构 + var str = ''; + var j_authior = result.data.author.authors; + var stra = ''; + var Corr_Auth = ''; + var Corr_Emai = ''; + var rep = ''; + var rep_pd = ''; + var ORC_ID = ''; + var report_num = 0; + + for (var i = 0; i < j_authior.length; i++) { + rep = ''; + var mes = ''; + if (j_authior[i].is_first == '1') { + rep = '#' + rep_pd += '#' + } + if (j_authior[i].is_report == '1') { + rep += '*' + mes = ' () ' + Corr_Auth += ' ' + j_authior[i].author_name + ','; + Corr_Emai += ' ' + j_authior[i].email + ','; + report_num += 1; + } + if (j_authior[i].orcid == '') { + ORC_ID = '' + } else { + ORC_ID = '' + } + if (i == j_authior.length - 1) { + stra += j_authior[i].author_name + '' + j_authior[i].ors + rep + '' + ORC_ID + mes + } else { + stra += j_authior[i].author_name + '' + j_authior[i].ors + rep + '' + ORC_ID + mes + ', ' + } + } + + str += `
      ${stra}
      `; + + var j_organ = result.data.author.organs; + var strg = '
      '; + for (var i = 0; i < j_organ.length; i++) { + strg += '' + j_organ[i].alias + ' ' + j_organ[i].organ_name + '
      ' + } + str += strg + "
      "; + + $('.wen_jian .left>div.zuo_zhe').html(str); + $('.wen_jian .left>div.zuo_zhe>sup').css({ + color: commonSupColor, + }); + document.querySelector('.toggle-btn').addEventListener('click', function () { + const detail = document.querySelector('.zuo_zhe_info'); + const btn = this; + const isShown = detail.classList.toggle('show'); + + btn.innerText = isShown + ? 'Affiliations & Notes ▲' + : 'Affiliations & Notes ▼'; + }); + if (rep_pd == "#") { + $('.wen_jian .left>div').each(function () { + $(this).html($(this).html().split("#").join("")); + }); + } + + if (report_num != 1) { + $('.coau b').html('Corresponding authors:'); + } + + if (Jour_num == 1) { + j_artc.abstract = j_artc.abstract.replace(new RegExp("0, 102, 204", "g"), "0,102,153") + } + + // 文章内容 + Corr_Auth = Corr_Auth.replace(/,$/, "") + Corr_Emai = Corr_Emai.replace(/,$/, "") + + $('.wen_rong .content-box .contercon .abst').html(j_artc.abstract); + let strongElements = document.querySelectorAll('.wen_rong .content-box .contercon .abst strong'); + + // 遍历每个 标签 + strongElements.forEach(function (element) { + // 检查 标签内的文本内容是否为 "Background:", "Methods:", "Results:", "Conclusion:" + + if (element.textContent.includes("Background:") || + element.textContent.includes("Methods:") || + element.textContent.includes("Method:") || + element.textContent.includes("Results:") || + element.textContent.includes("Result:") || + element.textContent.includes("Conclusion:") || + element.textContent.includes("Conclusions:") || + element.textContent.includes("Background") || + element.textContent.includes("Methods") || + element.textContent.includes("Method") || + element.textContent.includes("Results") || + element.textContent.includes("Result") || + element.textContent.includes("Conclusion") || + element.textContent.includes("Conclusions") + + + + ) { + // 修改该 标签的样式,改变颜色 + element.style.color = commonSupColor; // 设置颜色为黑色(你可以修改为其他颜色) + } + }); + $('.wen_rong .content-box .contercon .keyw span').html(j_artc.keywords); + $('.wen_rong .content-box .contercon .fund span').html(j_artc.fund); + $('.wen_rong .content-box .contercon .coau span').html(Corr_Auth); + $('.wen_rong .content-box .contercon .emai span').html(Corr_Emai); + $('.wen_rong .content-box .contercon .cite span').html(result.data.cite); + $('.wen_rong .content-box .contercon .time span').html(j_artc.pub_date); + $('.wen_rong .content-box .contercon .url span').html('https://doi.org/' + j_artc.doi + ''); + + if (j_artc.ordoi == '') { + $('.wen_rong .content-box .contercon .udr').css('display', 'none') + } else { + $('.wen_rong .content-box .contercon .udr span').html('https://doi.org/' + j_artc.ordoi + ''); + } + + if (j_artc.abstract == '') { + $('.wen_rong .content-box .contercon .abst').css('display', 'none') + } + if (j_artc.keywords == '') { + $('.wen_rong .content-box .contercon .keyw').css('display', 'none') + } + if (j_artc.fund == '') { + $('.wen_rong .content-box .contercon .fund').css('display', 'none') + } + if (Corr_Auth == '') { + $('.wen_rong .content-box .contercon .coau').css('display', 'none') + } + if (Corr_Emai == '') { + $('.wen_rong .content-box .contercon .emai').css('display', 'none') + } + if (j_artc.pub_date == '') { + $('.wen_rong .content-box .contercon .time').css('display', 'none') + } + if (result.data.cite == '') { + $('.wen_rong .content-box .contercon .cite').css('display', 'none') + } + + + $('.wen_rong .content-box .contemho').html(j_artc.mhoo); + + // 新的HTML + + if (html_type == 0) { + // 原 HTML + $('.wen_rong .content-box .conthtmn').html(` +
      +
      ` + ); + $.ajax({ + type: 'post', url: apiUrl + 'api/Article/getArticleDetailHtml', + data: { + "article_id": a_ID + }, + success: function (htmlResult) { + if (htmlResult.code == 0) { + + var arr = htmlResult.data.mains; + var str = ''; + for (var i = 0; i < arr.length; i++) { + let sectionId = 'section-' + i; // 生成唯一的 ID + if (arr[i].width == 0) { + if (arr[i].is_title == 1) { + if (arr[i].content.indexOf("

      ") >= 0) { + str += `

      ${arr[i].content}
      ` + } else { + str += `

      ${arr[i].content}

      ` + } + } else { + if (arr[i].content.indexOf("

      ") >= 0) { + str += arr[i].content.replace("

      ", `

      `); + } else { + str += `

      ${arr[i].content}

      ` + } + } + } else { + var picsrc = 'https://submission.tmrjournals.com/public/mainimg/' + arr[i].content; + var fun = "picPreview('" + picsrc + "');" + // console.log(fun) + str += `
      ` + "

      ` + arr[i].note + "

      " + } + } + // str = `
      ${str}
      ` + // $('.wen_rong .content-box .conthtmn').html(str); + + + var refersContent = '' + // 引用 + if (htmlResult.data.refers.length > 0) { // 如果有引用数据 + var refs = ''; + var xuhao = 0; + for (var rr = 0; rr < htmlResult.data.refers.length; rr++) { + // 如果格式不正确,或者信息不全 + let item = ''; + if (htmlResult.data.refers[rr].refer_type == 'journal' && htmlResult.data.refers[rr].doilink != '') { + // journal 类型 + xuhao++; + item = "

      " + xuhao + '. ' + htmlResult.data.refers[rr].author + ' ' + htmlResult.data.refers[rr].title + ". " + htmlResult.data.refers[rr].joura + ". " + htmlResult.data.refers[rr].dateno + "."; + // 在 "Available at:" 之前插入
      标签 + item += "
      Available at: " + htmlResult.data.refers[rr].doilink + "

      "; + refs += item; + } else if (htmlResult.data.refers[rr].refer_type == 'book' && htmlResult.data.refers[rr].isbn != '') { + // book 类型 + xuhao++; + item = "

      " + xuhao + '. ' + htmlResult.data.refers[rr].author + ' ' + htmlResult.data.refers[rr].title + ". " + htmlResult.data.refers[rr].dateno + "."; + // 在 "Available at:" 之前插入
      标签 + item += "
      ISBN: " + htmlResult.data.refers[rr].isbn + "

      "; + refs += item; + } else if (htmlResult.data.refers[rr].refer_type == 'other' && htmlResult.data.refers[rr].refer_frag != '' && htmlResult.data.refers[rr].refer_frag.length > 15) { + // other 类型,检查 refer_frag 中是否有 "Available at:" + xuhao++; + item = "

      " + xuhao + '. '; + // 如果 refer_frag 包含 "Available at:",在其前面插入
      标签 + if (htmlResult.data.refers[rr].refer_frag.indexOf('Available at:') !== -1) { + item += htmlResult.data.refers[rr].refer_frag.replace('Available at:', '
      Available at:'); + } else { + item += htmlResult.data.refers[rr].refer_frag; + } + item += ". 

      "; + refs += item; + } else { + continue; + } + } + // 将生成的所有引用内容插入到页面中 + refersContent = '

      References

      ' + refs + '
      '; + } + initContentHtml({ html: str, refers: refersContent }, arr, htmlResult.data.refers, html_type, { ...result, a_ID: a_ID }) + + // initArticleHtml(arr, result.data.refers, html_type) + } + }, + error: function () { + // ShowDanger("error!"); + } + + }) + } else if (html_type == 1) { + // //外链 + // $('.wen_rong #tablist .tarhtmn').css('display', 'none'); + // $('.wen_rong .content-box .conthtmn').css('display', 'none'); + var str = '' + if (Jour_num == 1) { + j_artc.abstract = j_artc.abstract.replace(new RegExp("0, 102, 204", "g"), "0,102,153") + } + var arr = [ + { + + + + + content: "Abstract", + + is_title: 0, + }, + { + + + + content: j_artc.abstract, + + is_title: 0, + }, + { + + + + content: ' ', + + is_title: 0, + }, + { + + + + content: `Keywords: ${j_artc.keywords}`, + + is_title: 0, + }, + + ] + // $('.wen_rong .content-box .contercon .abst').html(j_artc.abstract); + // let strongElements = document.querySelectorAll('.wen_rong .content-box .contercon .abst strong'); + + // // 遍历每个 标签 + // strongElements.forEach(function (element) { + // // 检查 标签内的文本内容是否为 "Background:", "Methods:", "Results:", "Conclusion:" + + // if (element.textContent.includes("Background:") || + // element.textContent.includes("Methods:") || + // element.textContent.includes("Method:") || + // element.textContent.includes("Results:") || + // element.textContent.includes("Result:") || + // element.textContent.includes("Conclusion:") || + // element.textContent.includes("Conclusions:") || + // element.textContent.includes("Background") || + // element.textContent.includes("Methods") || + // element.textContent.includes("Method") || + // element.textContent.includes("Results") || + // element.textContent.includes("Result") || + // element.textContent.includes("Conclusion") || + // element.textContent.includes("Conclusions") + + + + // ) { + // // 修改该 标签的样式,改变颜色 + // element.style.color = commonSupColor; // 设置颜色为黑色(你可以修改为其他颜色) + // } + // }); + for (var i = 0; i < arr.length; i++) { + let sectionId = 'section-' + i; // 生成唯一的 ID + + if (arr[i].is_title == 1) { + if (arr[i].content.indexOf("

      ") >= 0) { + str += `

      ${arr[i].content}
      ` + } else { + str += `

      ${arr[i].content}

      ` + } + } else { + if (arr[i].content.indexOf("

      ") >= 0) { + str += arr[i].content.replace("

      ", `

      `); + } else { + str += `

      ${arr[i].content}

      ` + } + } + + } + initContentHtml({ html: str, refers: '' }, arr, [], html_type, { ...result, a_ID: a_ID }) + + } else if (html_type == 2) { + // 新 HTML + $('.wen_rong .content-box .conthtmn').html(` +
      +
      ` + ); + $.ajax({ + type: 'post', url: apiUrl + 'api/Article/getArticleDetailHtmlFor2', + data: { + "article_id": a_ID + }, + success: function (htmlResult) { + if (htmlResult.code == 0) { + + var arr = htmlResult.data.mains; + initArticleHtmlFun(arr, htmlResult, html_type, { ...result, a_ID: a_ID }) + + } + }, + error: function () { + // ShowDanger("error!"); + } + + }) + } + + + // 稿件跟踪 + // 图标------------ + + // console.log(j_artc) + // Original data 附加文件 + + + // if (j_artc.file_pdf == '') { + // $('.wen_rong #tablist .tarfipdf').css('display', 'none'); + // // $('.wen_rong .rong_box .contfdf').css('display','none'); + // } else { + // $('.wen_rong #tablist .tarfipdf').html('PDF'); + // // $('.wen_rong .rong_box .contfdf ul').html(' PDF'); + // } + if (j_artc.file_html == '') { + $('.wen_rong #tablist .tarfihml').css('display', 'none'); + // $('.wen_rong .rong_box .contfhml').css('display','none'); + } else { + $('.wen_rong #tablist .tarfihml').html('HTML'); + $('.wen_rong .rong_box .contfhml ul').html(' HTML'); + } + //if (j_artc.tradition_tag == '' || j_artc.tradition == '') { + // $('.wen_rong #tablist .tarad').css('display', 'none'); + // $('.wen_rong .content-box .conterad').css('display', 'none'); + //} + if (j_artc.mhoo == '' || j_artc.mhoo == null) { + $('.wen_rong #tablist .tarmho').css('display', 'none'); + $('.wen_rong .content-box .contemho').css('display', 'none'); + } + + // $('#tablist .tarfipdf a').click(function () { + // $.ajax({ + // type: 'post', url: apiUrl + 'yuan/Article/addArticleNum', async: false, + // data: { "article_id": j_artc.article_id, "type": 'pdf' }, + // success: function (result) { + // } + // }) + // $.ajax({ + // type: 'post', url: apiUrl + 'super/Publish/addVisitNum', + // data: { 'type': Jour_num, 'is_detail': '1' }, + // success: function (result) { + // } + // }); + // }) + + + + // 首先显示html + if (htm_ID != null) { + $("#tablist li.tarhtmn").click() + } + + // meta添加 + // j_artc = result.data.articleInfo + // j_authior = result.data.author.authors; + // j_our = result.data.journalInfo; + // j_info = result.data.stageInfo; + + + $('title').before('' + + '' + + '' + + '' + + '' + + '') + for (var i = 0; i < j_authior.length; i++) { + $('title').before('') + } + if (j_artc.first_page != undefined) { + $('title').before('') + } + if (j_artc.last_page != undefined) { + $('title').before('') + } + + + // 右侧引入插件 + // if(result.data.journalInfo.title=='Food Therapy and Health Care'){ + // document.getElementsByTagName('script')[1].setAttribute("data-trendmdconfig","{'website_id':'79603', 'element':'#trendmd-suggestions'}") + // } + // if(result.data.journalInfo.title=='Medical Theory and Hypothesis'){ + // document.getElementsByTagName('script')[1].setAttribute("data-trendmdconfig","{'website_id':'79601', 'element':'#trendmd-suggestions'}") + // } + // if(result.data.journalInfo.title=='TMR Non-Drug Therapy'){ + // document.getElementsByTagName('script')[1].setAttribute("data-trendmdconfig","{'website_id':'79600', 'element':'#trendmd-suggestions'}") + // } + // if(result.data.journalInfo.title=='TMR Modern Herbal Medicine'){ + // document.getElementsByTagName('script')[1].setAttribute("data-trendmdconfig","{'website_id':'79599', 'element':'#trendmd-suggestions'}") + // } + // if(result.data.journalInfo.title=='Nursing Communications'){ + // document.getElementsByTagName('script')[1].setAttribute("data-trendmdconfig","{'website_id':'79598', 'element':'#trendmd-suggestions'}") + // } + // if(result.data.journalInfo.title=='Integrative Medicine Discovery'){ + // document.getElementsByTagName('script')[1].setAttribute("data-trendmdconfig","{'website_id':'79597', 'element':'#trendmd-suggestions'}") + // } + // if(result.data.journalInfo.title=='Clinical Research Communications'){ + // document.getElementsByTagName('script')[1].setAttribute("data-trendmdconfig","{'website_id':'79596', 'element':'#trendmd-suggestions'}") + // } + // if(result.data.journalInfo.title=='Psychosomatic Medicine Research'){ + // document.getElementsByTagName('script')[1].setAttribute("data-trendmdconfig","{'website_id':'79595', 'element':'#trendmd-suggestions'}") + // } + // if(result.data.journalInfo.title=='Life Research'){ + // document.getElementsByTagName('script')[1].setAttribute("data-trendmdconfig","{'website_id':'79594', 'element':'#trendmd-suggestions'}") + // } + // if(result.data.journalInfo.title=='Gastroenterology & Hepatology Research'){ + // document.getElementsByTagName('script')[1].setAttribute("data-trendmdconfig","{'website_id':'79593', 'element':'#trendmd-suggestions'}") + // } + // if(result.data.journalInfo.title=='Medical Data Mining'){ + // document.getElementsByTagName('script')[1].setAttribute("data-trendmdconfig","{'website_id':'79592', 'element':'#trendmd-suggestions'}") + // } + // if(result.data.journalInfo.title=='Toxicology Communications'){ + // document.getElementsByTagName('script')[1].setAttribute("data-trendmdconfig","{'website_id':'79591', 'element':'#trendmd-suggestions'}") + // } + // if(result.data.journalInfo.title=='Tumor Microenvironment Research'){ + // document.getElementsByTagName('script')[1].setAttribute("data-trendmdconfig","{'website_id':'79590', 'element':'#trendmd-suggestions'}") + // } + // if(result.data.journalInfo.title=='History and Philosophy of Medicine'){ + // document.getElementsByTagName('script')[1].setAttribute("data-trendmdconfig","{'website_id':'79589', 'element':'#trendmd-suggestions'}") + // } + // if(result.data.journalInfo.title=='Precision Medicine Research'){ + // document.getElementsByTagName('script')[1].setAttribute("data-trendmdconfig","{'website_id':'79588', 'element':'#trendmd-suggestions'}") + // } + // if(result.data.journalInfo.title=='Drug Combination Therapy'){ + // document.getElementsByTagName('script')[1].setAttribute("data-trendmdconfig","{'website_id':'79587', 'element':'#trendmd-suggestions'}") + // } + // if(result.data.journalInfo.title=='tmRxiv'){ + // document.getElementsByTagName('script')[1].setAttribute("data-trendmdconfig","{'website_id':'79586', 'element':'#trendmd-suggestions'}") + // } + // if(result.data.journalInfo.title=='Infectious Diseases Research'){ + // document.getElementsByTagName('script')[1].setAttribute("data-trendmdconfig","{'website_id':'79585', 'element':'#trendmd-suggestions'}") + // } + // if(result.data.journalInfo.title=='Aging Communications'){ + // document.getElementsByTagName('script')[1].setAttribute("data-trendmdconfig","{'website_id':'79584', 'element':'#trendmd-suggestions'}") + // } + // if(result.data.journalInfo.title=='Cancer Advances'){ + // document.getElementsByTagName('script')[1].setAttribute("data-trendmdconfig","{'website_id':'79583', 'element':'#trendmd-suggestions'}") + // } + // if(result.data.journalInfo.title=='Traditional Medicine Research'){ + // document.getElementsByTagName('script')[1].setAttribute("data-trendmdconfig","{'journal_id':'79582', 'element':'#trendmd-suggestions'}") + // } + + if (Jour_num != '1') { + $('.wen_rong .right .tmr_doaj').css('display', 'none') + } else { + $('.wen_rong .right .tmr_doaj').css('display', 'none') + } + + if (Jour_num == '22') { + $('.wen_jian .right h5').html('引用:'); + $('.wen_jian .right .export .Exc_2').html(' 下载EndNote格式'); + $('.wen_jian .right .export .Exc_3').html(' 下载RIS格式'); + $('.wen_jian .right .export .Exc_4').html(' 下载BibTex格式'); + $('.wen_jian .right .export .Exc_5').html(' 下载text格式'); + $('.wenzhang .wen_rong .right>p').html('本作品根据“知识共享”国际许可协议4.0进行授权。'); + $('.keyw b').html('关键字:') + $('.fund b').html('基金项目:') + $('.coau b').html('通讯作者:') + $('.emai b').html('邮箱:') + $('.cite b').html('引用:') + $('.time b').html('出版时间:') + $('.url b').html('链接:') + $('#tablist li').html('') + $('#tablist .tabin').html('摘要') + $('.links_').css('font-size', '20px') + $('.links_ img').css({ 'width': '20px', 'height': '22px' }) + $('.right p').css('font-family', 'Times New Roman') + $('.cite span').css('font-family', 'Times New Roman') + } + + + } else { + ShowDanger("请求失败!"); + } + }, + error: function (jqXHR, textStatus, errorThrown) { + ShowDanger("error!"); + console.log('文章详情error!') + console.log('AJAX error:', jqXHR, textStatus, errorThrown); // 输出详细的错误信息 + } + + }) + }); + } catch (error) { + console.error('JavaScript error:', error); + } + + } + $.ajax({ + type: 'post', url: apiUrl + 'super/Publish/addVisitNum', + data: { 'type': Jour_num, 'is_detail': '1' }, + success: function (result) { + if (result.code == 0) { + + } else { + // ShowDanger("请求失败!"); + } + }, + error: function () { + // ShowDanger("error!"); + } + }); + $.ajax({ + type: 'post', url: apiUrl + 'yuan/Article/addArticleNum', async: false, + data: { "article_id": a_ID, "type": 'abs' }, + success: function (result) { + } + }) + + + + + // 期刊内搜索 + $('.sfor_btnw').click(function () { + // console.log($('select[name="cut"] option:selected').val()); + window.open("jour_search.html?J_num=" + Jour_num + "&se_ch=" + $(".sfor_inpw").val()); + }) + // 期刊内订阅 + $('.top .jour_ts input.tishi_author').css('background-color', localStorage.Journals_color); + $.ajax({ + type: 'post', url: apiUrl + 'api/Journal/getTopicForSubscribe', + data: { + "journal_id": Jour_num + }, + success: function (result) { + if (result.code == 0) { + var arr = result.data.topics; + var data_4 = []; + for (var i = 0; i < arr.length; i++) { + data_4.push({ + id: arr[i].journal_topic_id, + text: arr[i].title + }); + } + $("#combox4").combox({ + id: "id", + name: "text", + data: data_4, + valueChange: function (data) { + // debugger + //返回data,filterData,selectData + } + }) + var cb4 = $("#combox4").data('combox'); + + + // 订阅提交 + $(".yue_addm").click(function () { + $(".spa").text(''); + + var add_mess = {}; + add_mess.email = $('#emaplm').val(); + add_mess.topic_ids = []; + var ar_mes = cb4.options.selectData + for (var i = 0; i < ar_mes.length; i++) { + add_mess.topic_ids.push(ar_mes[i]['id']); + } + + var S_Dan = '0'; + var reg = /^[-.-_A-Za-z0-9]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/ + if (cb4.options.selectData == "") { + $(".spa111").text('Please choose topic'); + S_Dan = '1'; + } else if ($("#emaplm").val() == "") { + $(".spa111").text('Please fill in E-mail'); + S_Dan = '1'; + } else if (!(reg.test($("#emaplm").val()))) { + $(".spa111").text('Please fill in properly formatted E-mail'); + S_Dan = '1'; + } + + + if (S_Dan == '1') { + ShowDanger("Incomplete information!"); + } else { + $(".yue_addm").addClass("disable"); + $.ajax({ + type: 'post', url: apiUrl + 'api/Journal/addSubscribeTopics', + data: add_mess, + success: function (result) { + if (result.code == 0) { + $(".mb_aform input[type='text']").val(''); + $(".yue_addm").removeClass("disable"); + $(".jour_ts").fadeIn(); + + $(".jour_ts input.tishi_author").click(function () { + $(".jour_ts").fadeOut(); + }); + + } else { + ShowDanger(result.msg); + $(".yue_addm").removeClass("disable"); + } + }, + error: function () { + ShowDanger("error!"); + $(".yue_addm").removeClass("disable"); + } + }) + } + }) + + } else { + ShowDanger("请求失败!"); + } + }, + error: function () { + ShowDanger("error!"); + } + }); + + + // 相关文章 + +} + +function shouldColor(rowIndex, cellIndex, row) { + // 判断是否是最左侧的单元格 + if (cellIndex === 0 && row[0].rowspan) { + const rowspan = row[0].rowspan; // 获取最左侧单元格的 `rowspan` + const startRow = rowIndex; // 当前单元格所在的行 + const endRow = startRow + rowspan - 1; // 跨越的最后一行 + + // 判断当前行是否在 `rowspan` 范围内,并且是奇数行 + return rowIndex >= startRow && rowIndex <= endRow && (rowIndex + 1) % 2 !== 0; // 判断是否为奇数行 + } + return false; +} +function addRowIdToData(content) { + console.log('每行data数据1', content) + var data = JSON.parse(JSON.stringify(content)) + const rowIdMap = {}; + const usedRows = new Set(); + let idCounter = 0; + + for (let i = 0; i < data.length; i++) { + if (usedRows.has(i)) continue; + + const rowId = `row-${idCounter++}`; + rowIdMap[i] = rowId; + usedRows.add(i); + + const row = data[i]; + for (let j = 0; j < row.length; j++) { + const cell = row[j]; + if (cell?.rowspan && cell.rowspan > 1) { + for (let k = 1; k < cell.rowspan; k++) { + const nextRowIndex = i + k; + if (nextRowIndex < data.length && !rowIdMap[nextRowIndex]) { + rowIdMap[nextRowIndex] = rowId; + usedRows.add(nextRowIndex); + } + } + } + } + } + + // 把 rowId 实际写进每个单元格 + for (let i = 0; i < data.length; i++) { + const rowId = rowIdMap[i]; + for (let j = 0; j < data[i].length; j++) { + if (!data[i][j]) data[i][j] = {}; + data[i][j].rowId = rowId; + } + } + console.log('每行data数据111:', JSON.parse(JSON.stringify(data))) + const seenIds = []; + + + data.map((row, rowIndex) => { + // row= row.filter(cell => cell.cellId) + + row.map((cell, cellIndex) => { + if (cell.rowId) { + row.rowId = cell.rowId + } + }) + }) + data.forEach(row => { + if (row.rowId && !seenIds.includes(row.rowId)) { + seenIds.push(row.rowId); // Mark this rowId as seen + } + }); + const rowIds = seenIds.filter((_, index) => index % 2 === 0); + const rowData = data + return { rowData, rowIds } + +} + +function initRelatedArticles(a_ID,) { + $.ajax({ + type: 'post', + url: apiUrl + 'api/Article/getArticleByKeywords', + data: { article_id: a_ID }, + success: function (result) { + if (result.code === 0) { + var relatedarticlesStr = '' + //Related articles + if (result.data && result.data.length > 0) { + arr = result.data + relatedarticlesStr += `
      +

      Related Articles

        `; + + // 使用 map 来遍历并返回 HTML 字符串 + relatedarticlesStr += arr.map((item, linkIndex) => { + return `
      • + ${linkIndex + 1}. ${item.title} +

        ${item.abbr}, ${item.journal.title}, ${item.stage.stage_year}

      • `; + }).join(''); // 使用 join 来拼接所有的 HTML 字符串 + + relatedarticlesStr += `
      `; + $('.corr_late').css('display', 'block'); // 设置显示样式 + $('#ArticleCorrLateNav').css('display', 'block'); // 设置显示样式 + $('.corr_late').html(relatedarticlesStr); // 设置 HTML 内容 + + } + + //Related articles + } + }, + error: function () { + + } + }); +} +function initTopics(a_ID) { + + // 右侧话题 + $.ajax({ + type: 'post', url: apiUrl + 'api/Article/getTopicsForArticle', + data: { + "article_id": a_ID + }, + success: function (result) { + if (result.code == 0) { + var arr = result.data.topics; + + var TopicsStr = '' + + if (result.data && arr.length > 0) { + + TopicsStr += `
      +

      Topics

      +
        `; + + // 使用 map 来遍历并返回 HTML 字符串 + TopicsStr += arr.map((item, linkIndex) => { + return `
      • + +
        + ${item.title}
      • `; + }).join(''); // 使用 join 来拼接所有的 HTML 字符串 + + TopicsStr += `
      `; + $('.contnet_Topics').css('display', 'block'); // 设置显示样式 + $('#ArticleTopics').css('display', 'block'); // 设置显示样式 + $('.contnet_Topics').html(TopicsStr); // 设置 HTML 内容 + + } + + + + } else { + ShowDanger("请求失败!"); + } + }, + error: function () { + ShowDanger("error!"); + } + }); + + +} + + + +function initArticleHtmlFun(arr, result, html_type, ArticleData) { + + console.log('ArticleData at line 1519:', ArticleData) + var refersContent = ''; + var htmlContent = '' + htmlContent += arr.map((item, index) => { + //批注 + let contentHtml = ''; + let sectionId = 'section-' + index; // 生成唯一的 ID + // 判断是否是图片 + if (item.type == 1) { + + var picsrc = 'https://submission.tmrjournals.com/public/articleImage/' + item.image.url; + var fun = "picPreview('" + picsrc + "');" + + contentHtml = ` +

      + + +

      ${item.image.title ? item.image.title : '' + }

      +

      ${item.image.note ? item.image.note : '' + }

      +

      + `; + } else if (item.type == 2) { + var tableList = JSON.parse(item.table.table_data); + + + const { header, content } = splitTable(tableList); + console.log('content at line 8641:', content); // 打印深拷贝的内容 + var { rowData, rowIds } = addRowIdToData(JSON.parse(JSON.stringify(content))) + console.log('content at line 8542:', rowIds, rowData) + // console.log('contentList at line 8571:', contentList) + + contentHtml = ` +
      + +${item.table.title ? item.table.title : ''} + +${header + .map((row, i) => { + return ` + + ${row + .map((cell, cellIndex) => { + return ` + + `; + }) + .join('')} + + `; + }) + .join('')} + ${rowData + .map((row, i) => { + return ` + + ${row + .map((cell) => { + if (!cell || !cell.cellId) return ''; + + const content = cell.text || ''; + const isBase64Image = /^]*src=["']data:image\//i.test(content); + + const finalContent = isBase64Image + ? content.replace( + /]*?)src=["'](data:image\/[^"']+)["']([^>]*)>/gi, + (match, preAttrs, src, postAttrs) => { + const safeSrc = src.replace(/'/g, "\\'"); + return ``; + } + ) + : content; + + + return ` + `; + }) + .join('')} + + `; + }) + .join('')} +
      + ${cell.text || ''} +
      + ${finalContent} +
      +

      ${item.table.note ? item.table.note : '' + }

      +
      +`; + } else { + + contentHtml = `

      ${item.content}

      `; + + + + } + + // 判断是否是表格类型 + + return contentHtml; + }).join(''); + //文章html内容部分 + htmlContent = `
      ${htmlContent}
      ` + + + + if (result.data.refers.length > 0) { // 如果有引用数据 + var refs = ''; + var xuhao = 0; + for (var rr = 0; rr < result.data.refers.length; rr++) { + // 如果格式不正确,或者信息不全 + let item = ''; + if (result.data.refers[rr].refer_type == 'journal' && result.data.refers[rr].doilink != '') { + // journal 类型 + xuhao++; + item = "

      " + `${xuhao}. ` + result.data.refers[rr].author + ' ' + result.data.refers[rr].title + ". " + result.data.refers[rr].joura + ". " + result.data.refers[rr].dateno + "."; + // 在 "Available at:" 之前插入
      标签 + item += "
      Available at: " + result.data.refers[rr].doilink + " 

      "; + refs += item; + } else if (result.data.refers[rr].refer_type == 'book' && result.data.refers[rr].isbn != '') { + // book 类型 + xuhao++; + item = "

      " + `${xuhao}. ` + result.data.refers[rr].author + ' ' + result.data.refers[rr].title + ". " + result.data.refers[rr].dateno + "."; + // 在 "Available at:" 之前插入
      标签 + item += "
      ISBN: " + result.data.refers[rr].isbn + "

      "; + refs += item; + } else if (result.data.refers[rr].refer_type == 'other' && result.data.refers[rr].refer_frag != '' && result.data.refers[rr].refer_frag.length > 15) { + // other 类型,检查 refer_frag 中是否有 "Available at:" 链接 + xuhao++; + item = "

      " + `${xuhao}. ` + // 检查 refer_frag 中是否包含 "Available at:" + if (result.data.refers[rr].refer_frag.indexOf('Available at:') !== -1) { + // 如果包含 "Available at:",则在其前面插入
      标签 + item += result.data.refers[rr].refer_frag.replace('Available at:', '
      Available at:'); + } else { + item += result.data.refers[rr].refer_frag; + } + item += ". 

      "; + refs += item; + } else { + continue; + } + } + + refersContent = `

      References

      ${refs}
      ` + + } + + initContentHtml({ html: htmlContent, refers: refersContent }, arr, result.data.refers, html_type, { ...ArticleData }) + + + + +} + +async function initContentHtml(content, arr, refers, html_type, ArticleData) { + console.log('ArticleData at line 2231:', ArticleData) + var j_artc = ArticleData.data.articleInfo + console.log('j_artc at line 2233:', j_artc) + var pdf_list = '' + var pdfStr = '' + if (j_artc.file_sub && j_artc.file_sub != '') { + var fileType = '' + var imgLink = '' + var fileTypeArr = j_artc.file_sub.split('.') + fileType = fileTypeArr[fileTypeArr.length - 1] + + switch (fileType) { + case 'xlsx': + fileTypeName = 'XLSX' + imgLink = 'img/xlsx.png' + break; + case 'zip': + fileTypeName = 'ZIP' + imgLink = 'img/zip.png' + break; + case 'rar': fileTypeName = 'RAR' + imgLink = 'img/zip.png' + break; + case 'docx': + fileTypeName = 'DOCX' + imgLink = 'img/link_1.png' + break; + case 'pdf': + fileTypeName = 'PDF' + imgLink = 'img/articlepdf.png' + break; + default: + fileTypeName = 'OTHER' + imgLink = 'img/otherfile.png' + break; + } + + + pdf_list += '
    • ' + fileTypeName + '
      ' + + '
      Supplementary Material for doi: ' + j_artc.doi + 'Download
    • '; + } + if (j_artc.file_sub2 && j_artc.file_sub2 != '') { + pdf_list += '
    • ' + + + '
      Supplementary Material for doi: ' + j_artc.doi + 'Download
    • '; + } + if (pdf_list != '') { + pdfStr = `

      Supplementary Material

      ${pdf_list}
      ` + + } + + //OriginalDataStr + var OriginalDataStr = '' + var OriginalData = '' + if (j_artc.file_original != '') { + OriginalData = '
      Original data:Download
      '; + OriginalDataStr = `

      Original Data

      ${OriginalData}
      `; + } + //ManuscriptProcessing + var detailIcon = '' + var lis = '' + var trackStr = '' + if (ArticleData.data.track && ArticleData.data.track.length > 0) { + for (var tt = 0; tt < ArticleData.data.track.length; tt++) { + var ttypeName = '' + var li = "" + var ttime = '' + var typeClass = '' + switch (ArticleData.data.track[tt].type) { + case (0): + ttypeName = 'Received' + break; + case (1): + ttypeName = 'With editor' + break; + case (2): + ttypeName = 'Under review' + break; + case (3): + ttypeName = 'Reject' + break; + case (4): + ttypeName = 'Revision' + break; + case (5): + ttypeName = 'Accept' + break; + case (6): + ttypeName = 'Pre-accept' + break; + case (7): + ttypeName = 'Proof' + break; + case (8): + ttypeName = 'Online' + break; + } + // 二级的时间 + var reviewers = "" + if (ArticleData.data.track[tt].reviewers && ArticleData.data.track[tt].reviewers.length > 0) { + shenCode = [] + for (var er = 0; er < ArticleData.data.track[tt].reviewers.length; er++) { + var neiTag = '' + var reviewerState = '' + var reviewerItem = '' + var time1 = '' // 创建时间 + var time2 = '' // 回应时间 + + // 初审和复审的审核意见 + // var fushenContent = '' + var chushenContent = '' + var timess = '' + // 进入页面前清空 + if (ArticleData.data.track[tt].type == 2 && ArticleData.data.track[tt].reviewers[er].question != null) { + chushenContent = '' + timess = '' + chushenContent = ArticleData.data.track[tt].reviewers[er].question.comments + timess = timestampToTime(ArticleData.data.track[tt].reviewers[er].question.ctime) + + shenCode.push("

      Comments:
      " + chushenContent + "

      Review comments received: " + timess + "

      ") + + // detailIcon = '' + detailIcon = '(Detail)' + } + switch (ArticleData.data.track[tt].reviewers[er].state) { + case (1): + reviewerState = 'Accept with major revision' + break; + case (2): + reviewerState = 'Reject' + break; + case (3): + reviewerState = 'Accept with minor revision' + break; + } + time1 = timestampToTime(ArticleData.data.track[tt].reviewers[er].ctime) + time2 = timestampToTime(ArticleData.data.track[tt].reviewers[er].qtime) + reviewerItem = "
      Invitation time:
      " + time1 + "
      " + reviewerState + detailIcon + "Score: " + ArticleData.data.track[tt].reviewers[er].rated + "reviewer: " + ArticleData.data.track[tt].reviewers[er].reviewer_name + "Review comments received: " + time2 + "
      " + reviewers += reviewerItem + } + } + // 获得时间 + ttime = timestampToTime(ArticleData.data.track[tt].time) + + var Revitag = '' + if (ArticleData.data.track[tt].type == 4 && ArticleData.data.track[tt].response) { + var title = '

      Response to reviewers:  

      ' + var lisss = '' + for (var s = 0; s < ArticleData.data.track[tt].response.length; s++) { + var xuhao = s + 1 + var Revfile_url = '' + + Revfile_url = '' + xuhao + '. Download' + + lisss += Revfile_url + } + Revitag = '
      ' + title + lisss + '
      ' + } + li = "
      " + ttime + "
      " + ttypeName + "" + reviewers + Revitag + "
      " + lis += li + } + + trackStr = `

      Manuscript Processing

      ${lis}
      ` + } + var mhooStr = '' + if (ArticleData.data.articleInfo.mhoo && ArticleData.data.articleInfo.mhoo != '') { + + + mhooStr = `

      Medical history of objective

      ${ArticleData.data.articleInfo.mhoo}
      ` + } + + //ManuscriptProcessing + + + + + + + + + var str = ` +
      + + ${content.html ? `
      ${content.html}
      ` : ''} + ${content.refers ? `
      ${content.refers}
      ` : ''} + ${pdfStr ? `
      ${pdfStr}
      ` : ''} + ${OriginalDataStr ? `
      ${OriginalDataStr}
      ` : ''} + ${trackStr ? `
      ${trackStr}
      ` : ''} + ${mhooStr ? `
      ${mhooStr}
      ` : ''} + + + + +
      ` + $('.wen_rong .content-box .conthtmn').html(str); + + + await initArticleHtml(arr, refers, html_type, { OriginalDataStr: OriginalDataStr, pdfStr: pdfStr, trackStr: trackStr, mhooStr: mhooStr }) + await initRelatedArticles(ArticleData.a_ID) + await initTopics(ArticleData.a_ID) + console.log('citationCache at line 2137:', citationCache) + await fetchCitationsData(j_artc.doi, ArticleData.a_ID, async function (data) { + console.log('data at line 893:', data) + citationCache = data; // 存好结果,稍后再使用 + await renderCitations(citationCache, j_artc.doi); // 传入上一步保存的数据 + }); + +} + +function initArticleHtml(htmlData, refs, type, otherList) { + console.log('otherList at line 2446:', otherList) + document.querySelectorAll('wmath').forEach(el => { + const latex = el.getAttribute('data-latex'); + if (latex) { + el.innerHTML = latex; + MathJax.typesetPromise([el]); + } + }); + $('.wen_rong .content-box .conthtmn .Ptitle').css({ + background: 'rgb(222, 235, 247)', + 'color': commonTableTitleColor, // No !important here + 'text-align': 'center', // No !important here + 'border': '1px solid rgba(222, 234, 247, 0.1)', + 'border-radius': '10px', + 'font-size': '16px', + 'box-shadow': '0 4px 4px rgba(222, 234, 247, 0.6)', + }); + $('.wen_rong .content-box .conthtmn .oddColor > td').css({ + background: 'rgb(250, 231, 232)', + + }); + // Apply styles to inside .Ptitle using setProperty with !important + $('.wen_rong .content-box .conthtmn .Ptitle > b').each(function () { + this.style.setProperty('font-weight', 'bold', 'important'); + + }); + $('.wen_rong .content-box .conthtmn .Ptitle > i').each(function () { + this.style.setProperty('font-style', 'normal', 'important'); + this.style.setProperty('color', commonTableTitleColor, 'important'); + }); + $('.wen_rong .content-box .conthtmn .Ptitle p > strong').each(function () { + this.style.setProperty('font-weight', 'bold', 'important'); + + }); + $('.wen_rong .content-box .conthtmn .Ptitle p').each(function () { + this.style.setProperty('text-align', 'center', 'important'); + + }); + $('.wen_rong .content-box .conthtmn .Ptitle em').each(function () { + this.style.setProperty('font-style', 'normal', 'important'); + this.style.setProperty('color', commonTableTitleColor, 'important'); + }); + $('.wen_rong .content-box .conthtmn .commonTableTitleColor').each(function () { + + this.style.setProperty('color', commonTableTitleColor, 'important'); + }); + + + // 获取所有段落 + const allParagraphs = document.querySelectorAll('.pMain'); + let abstractEndIndex = -1; + let citationEndIndex = -1; + + // 查找包含“Abstract”文本的段落(无论被标签包裹多少层) + allParagraphs.forEach((p, index) => { + const text = p.innerText.trim().toLowerCase(); + if (text === 'abstract') { + abstractEndIndex = index; + } + if (text === 'citation') { + citationEndIndex = index; + console.log('CitationEndIndex at line 8765:', citationEndIndex) + } + }); + + // 从 Abstract 段落之后开始查找并高亮标题词 + if (abstractEndIndex !== -1 && abstractEndIndex + 1 < allParagraphs.length) { + const nextParagraph = allParagraphs[abstractEndIndex + 1]; + const elements = nextParagraph.querySelectorAll('strong, b'); + elements.forEach((element) => { + const text = element.textContent.trim(); + if (["Background:", "Methods:", "Method:", "Results:", "Result:", "Conclusion:", "Conclusions:"].includes(text) || + ["Background", "Methods", "Method", "Results", "Result", "Conclusion", "Conclusions"].includes(text)) { + element.style.color = commonSupColor; + } + }); + } + if (citationEndIndex !== -1 && citationEndIndex + 1 < allParagraphs.length) { + const nextParagraph = allParagraphs[citationEndIndex + 1]; + nextParagraph.style.color = commonSupColor; + } + $('.wen_rong .content-box .conthtmn sup').each(function () { + var textContent = $(this).text().trim(); // 获取并清理文本内容 + + // 判断文本是否是纯数字 + if (/^\d+$/.test(textContent)) { + this.style.setProperty('color', commonSupColor, 'important'); + } + // 判断文本是否包含 "&" + else if (/&/.test(textContent)) { + this.style.setProperty('color', commonSupColor, 'important'); + } + else if (/ỻ/.test(textContent)) { + this.style.setProperty('color', commonSupColor, 'important'); + } + // 判断文本是否包含 "*" + else if (/\*/.test(textContent)) { + this.style.setProperty('color', commonSupColor, 'important'); + } + // 判断文本是否包含 "#" + else if (/#/.test(textContent)) { + this.style.setProperty('color', commonSupColor, 'important'); + } + // 判断文本是否为由数字和逗号组成的字符串(例如 "1,2,3") + // 判断文本是否为由数字和逗号组成,且逗号两边允许有空格(例如 "1, 2, 3") + else if (/^\d+(\s*,\s*\d+)*$/.test(textContent)) { + this.style.setProperty('color', commonSupColor, 'important'); + } + }); + + + $('.wen_rong .content-box .conthtmn b i').each(function () { + + this.style.setProperty('font-weight', 'bold', 'important'); + }); + // $('.wen_rong .content-box .conthtmn .thumbnailTableBox td sup').each(function () { + + // this.style.setProperty('color', commonSupColor, 'important'); + // }); + + + $('.wen_rong .content-box .conthtmn .Ptitle').each(function () { + this.style.setProperty('color', commonTableTitleColor, 'important'); + this.style.setProperty('text-align', 'center', 'important'); + }); + $('.wen_rong .content-box .conthtmn .Ptitle b i').each(function () { + this.style.setProperty('font-style', 'normal', 'important'); + }); + $('.wen_rong .content-box .conthtmn .Ptitle i b').each(function () { + this.style.setProperty('font-style', 'normal', 'important'); + }); + + + var navLinks = { + content: [], // 存放 content 类型的链接 + image: [], // 存放 image 类型的链接 + table: [] // 存放 table 类型的链接 + }; + if (htmlData && htmlData.length > 0) { + htmlData.forEach((item, index) => { + + + let sectionId = 'section-' + index; // 生成唯一的 ID + + if (type == 0) { + if (item.width == 0) { + if (item.is_title == 1) { + var textContent = $('
      ').html(item.content).text(); // 提取纯文本 + navLinks.content.push({ sectionId: sectionId, type: 'content', text: textContent, href: '#' + sectionId, is_h1: item.is_title, }); + + } + } else { + var picsrc = 'https://submission.tmrjournals.com/public/mainimg/' + item.content; + var textContentimg = $('
      ').html(item.note).text(); // 提取纯文本 + navLinks.image.push({ sectionId: sectionId, type: 'image', text: textContentimg || 'Image ' + (index + 1), href: '#' + sectionId, url: picsrc }); + + } + } else { + // 判断是否是图片 + if (item.type == 1) { + var picsrc = 'https://submission.tmrjournals.com/public/articleImage/' + item.image.url; + var textContentimg = $('
      ').html(item.note).text(); // 提取纯文本 + + navLinks.image.push({ sectionId: sectionId, type: 'image', text: textContentimg || 'Image ' + (index + 1), href: '#' + sectionId, url: picsrc }); + } else if (item.type == 2) { + var textContentTable = $('
      ').html(item.table.title).text(); // 提取纯文本 + navLinks.table.push({ sectionId: sectionId, type: 'table', text: textContentTable || 'Table ' + (index + 1), href: '#' + sectionId }); + + } else { + var textContent = $('
      ').html(item.content).text(); // 提取纯文本 + + if (item.is_h1) { + + navLinks.content.push({ sectionId: sectionId, type: 'content', text: textContent, href: '#' + sectionId, is_h1: item.is_h1, }); + } + + } + } + + }) + } + + console.log('navLinks.forEach at line 7752:', navLinks) + // 引用 + var navHtml = `
      + + Outline + Show Outline +
        `; + + // 先添加 content 类型 + if (navLinks.content.length > 0) { + navLinks.content.forEach(link => { + navHtml += `
      • ${link.text}
      • `; + + }); + } + + if (navLinks.image.length > 0) { + navHtml += `
      • +

        Figures (${navLinks.image.length})

        +
      • `; + + $(document).on('click', '.v4-show-hide-icon', function () { + const $this = $(this); + const isCollapsed = $this.hasClass('is-not-active'); + const hiddenCount = navLinks.image.length - 3; + + $('.navLinksFigures .extra-figure').slideToggle(200); + $this.toggleClass('is-not-active'); + + if (isCollapsed) { + $this.find('.toggle-text').text(`Hide figures`); + $this.find('.toggle-icon').removeClass('fa-angle-right').addClass('fa-angle-up'); + } else { + $this.find('.toggle-text').text(`Show all figures`); + $this.find('.toggle-icon').removeClass('fa-angle-up').addClass('fa-angle-right'); + } + }); + + + } + + if (navLinks.table.length > 0) { + navHtml += `
      • +

        Tables (${navLinks.table.length})

        +
      • `; + } + if (refs.length > 0) { + navHtml += `
      • +

        References

        +
      • `; + } + + + if (otherList.pdfStr && otherList.pdfStr != '') { + navHtml += `
      • +

        Supplementary Material

        +
      • `; + } + if (otherList.OriginalDataStr && otherList.OriginalDataStr != '') { + navHtml += `
      • +

        Original Data

        +
      • `; + } + if (otherList.trackStr && otherList.trackStr != '') { + navHtml += `
      • +

        Manuscript Processing

        +
      • `; + } + if (otherList.mhoo && otherList.mhoo != '') { + navHtml += `
      • +

        Medical history of objective

        +
      • `; + } + + navHtml += ``; + navHtml += ``; + navHtml += ``; + + + + navHtml += '
      '; + $('.wen_rong .content-box .conthtmn').prepend(navHtml); + // 给导航栏添加固定定位样式 + // 给导航栏添加固定定位样式 + + $('.jo-catalog-title').css({ + 'line-height': '40px', + 'font-size': '18px', + 'color': '#333', + 'border-bottom': '1px solid #f0f0f0', + + }); + $('.outiline-item').css({ + + 'box-sizing': 'border-box', + 'font-size': '14px', + 'color': '#454545', + 'cursor': 'pointer', + }); + $('.outiline-content').css({ + 'padding': '4px 0', + 'margin-left': '16px', + 'color': '#333', + 'cursor': 'pointer', + 'font-family': 'Charis SIL', + + + }); + + $('.outiline-img').css({ + + 'margin-top': '20px', + 'margin-bottom': '20px', + + + }); + $('.outiline-table').css({ + + 'margin-top': '20px', + 'margin-bottom': '20px', + + // 'border-left': '3px solid #efefef', + + }); + $('.navLinksFigures').css({ + 'display': 'flex', + 'flex-wrap': 'wrap', + 'gap': '10px', + + // 'margin-bottom': '10px', + 'margin-top': '10px', + + }); + $('.navLinksTables').css({ + 'display': 'flex', + 'flex-wrap': 'wrap', + 'gap': '4px', + + // 'margin-bottom': '10px', + // 'margin-top': '10px', + + }); + + // 在滚动时保持导航栏在视口内 + + $(document).ready(function () { + // 监听右侧滚动区域 + $('.newBox').scroll(function () { + + + var scrollTop = $(this).scrollTop(); // 获取当前右侧滚动的位置 + + + + + + var scrollHeight = $(this)[0].scrollHeight; // 获取右侧滚动区域的总高度 + var containerHeight = $(this).height(); // 获取右侧容器的高度 + // 获取所有右侧的 .pMain + var sections = $('.newBox').find('.pMain'); + var navLinks = $('.anchor-nav').find('a'); // 获取所有左侧的导航链接 + + // 初始化清除所有导航链接的高亮 + navLinks.css({ + 'color': '', // 恢复默认颜色 + 'font-weight': '' // 恢复默认字体粗细 + }); + + // 遍历所有的 section + sections.each(function (index, section) { + var sectionTop = $(section).offset().top - $('.newBox').offset().top + scrollTop; // 计算每个 .pMain 相对于 .newBox 的位置 + var sectionBottom = sectionTop + $(section).outerHeight(); // 获取每个 section 的底部位置 + // 判断该 section 是否在可视区域内 + if (scrollTop + containerHeight >= sectionTop && scrollTop <= sectionBottom) { + // 高亮对应的导航链接 + $(navLinks[index]).css({ + 'color': 'rgb(0, 102, 153)', // 激活时颜色变为蓝色 + 'font-weight': 'bold' // 激活时加粗 + }); + // 只高亮一个链接,找到第一个符合条件的并停止遍历 + return false; // 结束 .each() 遍历 + } + }); + }); + $('.wordTableHtml table tr.table-header-row td').each(function () { + this.style.setProperty('border-bottom', '1px solid #000', 'important'); + + }); + // document.querySelectorAll('.anchor-nav a[href^="#"]').forEach(anchor => { + // anchor.addEventListener('click', function (e) { + // const href = this.getAttribute('href'); + // const target = document.querySelector(href); + + // if (target) { + // e.preventDefault(); + // const offset = 100; // 调整这里的偏移距离 + + // window.scrollTo({ + // top: target.offsetTop - offset, + // behavior: 'smooth' + // }); + // } + // }); + // }); + + const waitForTop = setInterval(() => { + const bar = document.querySelector('.v4-art-top'); + if (bar) { + clearInterval(waitForTop); + + let lastStatus = false; + const offsetTop = bar.getBoundingClientRect().top + $('.newBox')[0].scrollTop; + + $('.newBox').on('scroll', function () { + const scrollTop = $(this).scrollTop(); + + if (scrollTop >= offsetTop) { + if (!lastStatus) { + bar.classList.add('fixed'); + // 加动画类,显示动画 + setTimeout(() => { + bar.classList.add('show'); + }, 10); + lastStatus = true; + } + } else { + if (lastStatus) { + // 先移除动画类,立即移除位置固定 + bar.classList.remove('show'); + + // 直接移除 fixed,不等待动画 + bar.classList.remove('fixed'); + + lastStatus = false; + } + } + }); + } + }, 100); + + // $(document).on('click', '.outline-toggle', function () { + // const $container = $(this).closest('.outline-container'); + // const $icon = $(this).find('i'); + // const $text = $(this).find('.toggle-text'); + // const $panel = $('.conthtmn_right'); + // const isClosed = $container.hasClass('is-closed'); + + // if (isClosed) { + // $container.removeClass('is-closed').addClass('is-open'); + // $panel.get(0).style.setProperty('margin-left', '300px', 'important'); + + + // } else { + // $container.removeClass('is-open').addClass('is-closed'); + + + + // $panel.get(0).style.setProperty('margin-left', '40px', 'important'); + // } + // }); + + + + + + + }); + + +} +function isHeaderRow(rowIndex, table) { + + + + var head = table[0] + + + return rowIndex < head[0].rowspan; // 假设前两行是表头 +} +function splitTable(tableList) { + // 获取头部行数 + const headerRowCount = tableList[0][0].rowspan || 1; // 默认第一行是头部行,获取该行的 rowspan + // 用 isHeaderRow 判断头部行 + const header = []; + const content = []; + let cellIdCounter = 0; // 初始化计数器,用于为每个单元格生成唯一的 cellId + tableList.forEach((row, rowIndex) => { + row.forEach((cell, cellIndex) => { + cell.cellId = `cell-${cellIdCounter}`; + cellIdCounter++; + }); + if (isHeaderRow(rowIndex, tableList)) { + header.push(row); // 将头部行添加到 header 数组 + } else { + content.push(row); // 将内容行添加到 table 数组 + } + }); + // + console.log('header:', header); // 打印头部行数据 + console.log('table打印内容行数据:', content); // 打印内容行数据 + + return { header, content }; +} +// 图片预览 +function picPreview(src) { + console.log(src) + $('.PicPreview img').attr('src', src) + $('.PicPreview').show() +} +$('.PicPreview').on('click', function () { + $('.PicPreview').hide() +}) + +// 显示审核内容 +function showComments(num) { + // console.log('显示初审内容',shenCode) + layer.open({ + type: 1 + , title: false //不显示标题栏 + , closeBtn: true + , area: '600px;' + , shade: 0.8 + , id: 'LAY_layuipro' //设定一个id,防止重复弹出 + /// ,btn: ['close'] + , btnAlign: 'c' + , moveType: 1 //拖拽模式,0或者1 + , content: shenCode[num] + }); +} +function getCiteList(a_ID) { + $('.cite_box .export_cite').html('
      '); + var journalCiteStr = '' + $.ajax({ + type: 'post', url: apiUrl + 'api/Article/getArticleCites', + data: { + "article_id": a_ID + }, + success: function (result) { + if (result.code == 0) { + + var arr = result.data.list + for (let i in arr) { + journalCiteStr += ` +

      ${Number(i) + 1}.

      +
      +

      + ${arr[i].article_name} +

      + +

      + ${arr[i].author ? `${arr[i].author},` : ''} ${arr[i].journal_name}${arr[i].vol ? `${arr[i].vol},` : ''} + + +

      + +
      ` + } + journalCiteStr += `
      ` + + $('.cite_box .export_cite').html(journalCiteStr); + + + + + + } + } + }) +} + +function initArticleNavList(a_ID) { + var Journals_color = localStorage.getItem('Journals_color') + var journalStageID = localStorage.getItem('journalStageID') + //是否显示地图 + var isShowAuthorship = 0; + if ([1, 14, 8].includes(Number(Jour_num))) { + isShowAuthorship = 1 + } + // if (a_ID == 4477) { + const style = document.createElement('style'); + style.innerHTML = `/* 遮罩层 */ + .article_dropbtn:hover { + color: ${Journals_color}; + + } + .article_dropdown-list a:hover { + + border-bottom:2px solid ${Journals_color}; + font-weight:bold; + color:#333; + } + .toggle-btn{ + color: ${Journals_color}; + } + `; + document.head.appendChild(style); + + + // 获取 id 为 top_bar 的元素 + var topBar = document.getElementById("top_bar"); + + var otherStr1 = ` + +

      Current Issue

      +

      Online First

      +

      Archiving

      +

      Special Issues

      + +

      Highlights

      + + ` + var otherStr2 = `

      Journal Information

      + +

      Guide for Authors

      +

      Abstracting & Indexing

      + + + ` + // Abstracting & Indexing + var otherStr3 = ` +

      Peer-review process

      +

      Submission System

      +

      Ethics and Malpractice Statement

      + +
      + +

      Authorship

      + + ` + var str = `
      +
      +
      +
      Articles & Issues
      +
      + ${otherStr1} +
      +
      +
      +
      About Journal
      +
      + ${otherStr2} +
      +
      +
      +
      Publish
      +
      + ${otherStr3} +
      +
      +
      +
      ` + + + + // 使用 insertAdjacentHTML 在 top_bar 后插入新元素 + if (topBar) { + topBar.insertAdjacentHTML('afterend', str); + + + + } + + + // JavaScript to handle dropdown toggle on button click + + + + // } + + + +} +function openPdf(url, j_artc, Jour_num) { + $.ajax({ + type: 'post', url: apiUrl + 'yuan/Article/addArticleNum', async: false, + data: { "article_id": j_artc.article_id, "type": 'pdf' }, + success: function (result) { + } + }) + $.ajax({ + type: 'post', url: apiUrl + 'super/Publish/addVisitNum', + data: { 'type': Jour_num, 'is_detail': '1' }, + success: function (result) { + } + }); + window.open(url); +} +function initMoreButtonTopList(articleInfo, a_ID) { + console.log('articleInfo at line 2590:', articleInfo) + + var j_artc = articleInfo.articleInfo + var Journals_color = localStorage.getItem('Journals_color') + var journalStageID = localStorage.getItem('journalStageID') + + + const style = document.createElement('style'); + style.innerHTML = ` + + .v4-art-top-main-m .v4-art-top-item span:hover{ + color: ${Journals_color}; + } + + ` + + document.head.appendChild(style); + + // 获取 id 为 top_bar 的元素 + var topBar = document.getElementById("article_base_info_box"); + + var str = ` +
      +
      +
      + ${j_artc.file_pdf !== '' ? ` +
      + + Download PDF +
      + ` : ''} + ${j_artc.html_type == 1 ? ` +
      + + HTML +
      + ` : ''} +
      + + Cite +
      + + +
      +
      + `; + + // 使用 insertAdjacentHTML 在 top_bar 后插入新元素 + if (topBar) { + + topBar.insertAdjacentHTML('afterend', str); + + const citeEl = document.querySelector('.v4-art-top-item.cite'); + if (citeEl) { + citeEl.onclick = () => { + openCite(Jour_num, Journals_color, a_ID, j_artc, articleInfo); + }; + } + const pdfEl = document.querySelector('.v4-art-top-item.view-pdf'); + if (pdfEl) { + pdfEl.onclick = () => { + openPdf(`${imgFileUrl}articlePDF/${j_artc.file_pdf}`, j_artc, Jour_num); + }; + } + const htmlEl = document.querySelector('.v4-art-top-item.view-html'); + if (htmlEl) { + htmlEl.onclick = () => { + + + window.open(`${imgFileUrl}articleHTML/${j_artc.file_html}`) + }; + } + setTimeout(() => { + if (window.__sharethis__) { + __sharethis__.initialize(); + } + + }, 200) + + } +} +function openAbstracting(Jour_num, Journals_color) { + var list = localStorage.getItem('journalAbs') + var arr_Abc = JSON.parse(list).filter(e => e.is_show == 1); + var Abstractingcontent = `
        + ${arr_Abc.map((item, i) => { + return `
      • » ${item.title}
      • `; + }).join('')} +
      ` + document.querySelector('#common-popup .common-popup-content').classList.add('whitebg'); + showPopup(`Abstracting & Indexing`, Abstractingcontent) + + + + + // 5秒后自动关闭 + // setTimeout(closePopup, 5000); +} +function openCite(Jour_num, Journals_color, a_ID, j_artc, data) { + console.log('data at line 2593:', j_artc, data) + var GoogleScholar = '' + if ((Math.round(Date.parse(new Date()) / 1000) - j_artc.ctime) / 86400 >= 21) { + GoogleScholar = + `Google Scholar` + } + // var lnk_ = ''; + // if (j_artc.file_pdf != '') { + // lnk_ += ' PDF    ' + // } + + // if (j_artc.file_html != '') { + // lnk_ += '     HTML' + // } + + // if (j_artc.article_id == '172') { + // lnk_ += '    ' + // } + var NotTeX_ = '' + if (j_artc.bibtex != '') { + NotTeX_ += 'BibTeX' + } + var Abstractingcontent = `

      ${data.cite}

      +
      ${GoogleScholar}
      +
      + ${NotTeX_} +
      + +
        +
      • Export citation to EndNote
      • +
      • Export citation to RIS
      • +
      • Export citation to BibTex
      • +
      • Export citation to txt
      • +
      +
      + ` + document.querySelector('#common-popup .common-popup-content').classList.add('whitebg'); + showPopup(`Cite this article`, Abstractingcontent) + document.getElementById('common-popup').style.width = 'auto'; + document.getElementById('common-popup').style.setProperty('min-height', 'auto', 'important'); + // 点击复制和下载 + $('.Exc_2').click(function () { + $.ajax({ + type: 'post', url: apiUrl + 'api/Article/getArticleenw', async: false, + data: { "article_id": a_ID }, + success: function (result) { + var a = document.createElement('a'); + a.href = result.data.url; + a.download = '' + a.click(); + } + }) + }) + $('.Exc_3').click(function () { + $.ajax({ + type: 'post', url: apiUrl + 'api/Article/getArticleRis', async: false, + data: { "article_id": a_ID }, + success: function (result) { + var a = document.createElement('a'); + a.href = result.data.url; + a.download = '' + a.click(); + } + }) + }) + $('.Exc_4').click(function () { + var ecx_id = $(this).parents('.links_').siblings('.txt_biaoti').attr('id') + $.ajax({ + type: 'post', url: apiUrl + 'api/Article/getArticlebib', async: false, + data: { "article_id": a_ID }, + success: function (result) { + var a = document.createElement('a'); + a.href = result.data.url; + a.download = '' + a.click(); + } + }) + }) + $('.Exc_5').click(function () { + $.ajax({ + type: 'post', url: apiUrl + 'api/Article/getArticletext', async: false, + data: { "article_id": a_ID }, + success: function (result) { + var a = document.createElement('a'); + a.href = result.data.url; + a.download = '' + a.click(); + } + }) + }) + + + + + + // 5秒后自动关闭 + // setTimeout(closePopup, 5000); +} +function openAuthorship(Jour_num, Journals_color) { + + var Abstractingcontent = ` +
      +
      +
        +
        +
        + ` + document.querySelector('#common-popup .common-popup-content').classList.add('whitebg'); + showPopup(`Abstracting & Indexing`, Abstractingcontent, 'Authorship') + + + + + // 5秒后自动关闭 + // setTimeout(closePopup, 5000); +} +function showPopup(title, content, type) { + $('#common-popup .common-popup-title').html(title) + $('#common-popup .common-popup-content').html(content) + + document.getElementById('common-overlay').style.display = 'block'; + if (type == 'Authorship') { + document.getElementById('common-popup').style.width = 'auto'; + renderMap(190) + } + + document.getElementById('common-popup').style.opacity = '1'; + document.getElementById('common-overlay').style.zIndex = '1000'; + document.getElementById('common-popup').style.zIndex = '1001'; + + // 5秒后自动关闭 + // setTimeout(closePopup, 5000); +} + +function closePopup() { + document.getElementById('common-popup').style.opacity = '0'; + document.getElementById('common-popup').style.zIndex = '-1'; + setTimeout(function () { + document.getElementById('common-overlay').style.display = 'none'; + $('#common-popup .common-popup-title').html('') + $('#common-popup .common-popup-content').html('') + }, 50); +} \ No newline at end of file diff --git a/js/scientist.js b/js/scientist.js index 5cd7157..5df7989 100644 --- a/js/scientist.js +++ b/js/scientist.js @@ -133,7 +133,14 @@ function sy_index() { data: {}, success: function (result) { if (result.code == 0) { + // .sy_npar div.tpoce_con2 > div img + const style = document.createElement('style'); + style.innerHTML = `{ + + + }` + document.head.appendChild(style); var arr = result.data.articles; var str1 = ""; var str2_1 = ""; @@ -149,23 +156,42 @@ function sy_index() { '' - } else if (i == 1 || i == 2) { + } else if (i <= 6) { str2_num_1 = str2_num_1 + 1 str2_1 += '
        ' + '' + arr[i].abbr + '. | ' + arr[i].journal_short + '' + '

        ' + arr[i].title + '

        ' - } else if (i <= 5) { - str3_num = str3_num + 1 - str3 += '' - } + } + // else if (i <= 5) { + // str3_num = str3_num + 1 + // str3 += '' + // } } +$('.sy_npar div.tpoce_con3').css({ + 'margin-top':'10px' +}) +$('.npar_one .tpoce_con2').css({ + 'margin':'30px 0px 0 15px', + 'width':'755px', + 'height':'580px', + 'display':'grid', + 'grid-template-columns':'repeat(3, 1fr)', + 'gap':'15px', +}) + $('.sy_npar>div>a').attr('href', 'artihom_list_pid.html?J_num=' + Jour_num + '&p_id=' + Jour_num); $('.sy_npar .tpoce_con1').html(str1); $('.sy_npar .tpoce_con2').html(str2_1 + str2_2 + '
        '); - $('.sy_npar .tpoce_con3').html(str3); + $('.sy_npar div.tpoce_con2 > div').css({ + 'width':'100%' + }) + $('.sy_npar div.tpoce_con2 > div img').css({ + 'height':'140px' + }) + // $('.sy_npar .tpoce_con3').html(str3); if (arr == '') { $('.sy_npar').css('display', 'none') } diff --git a/style/commonArticle_v3.css b/style/commonArticle_v3.css new file mode 100644 index 0000000..5bdbada --- /dev/null +++ b/style/commonArticle_v3.css @@ -0,0 +1,1001 @@ +.article__ { + background-color: #f4fafd; + padding: 0 15px; + margin-top: -15px; +} + +.act_chajian { + padding: 10px 15px; +} + +.pos_ter { + padding: 0 0 20px 0 +} + +.pos_ter>div:nth-child(1) { + width: 275px; + height: 105px; +} + +.pos_ter>div:nth-child(3) { + width: 235px; + height: 68px; + padding: 25px 12px 12px 12px; +} + +.pos_ter>div:nth-child(4) { + width: 242px; + height: 90px; + padding: 15px 0 0 0; + margin-right: 0; +} + +.pos_ter>div:nth-child(4) img { + width: 100%; +} + +.pos_ter>div { + float: left; + margin-right: 10px; + background-color: #fff; +} + +.pos_ter>a { + float: left; + width: 240px; + text-align: center; + display: block; + padding: 25px 12px 12px 12px; + margin-right: 10px; + background-color: #fff; + height: 68px; +} + +.conthtmn p { + line-height: 22px; + margin-bottom: 10px; + color: #333; + text-align: justify; +} + +.conthtmn>p { + min-height: 20px; +} + +.conthtmn .imgHnkl { + text-align: center; + margin-top: 20px; +} + +.conthtmn .imgHnkl p { + color: #006699; + font-weight: bold; +} + +/* 相关引用次数 */ +.article-quote-box { + width: 24%; + padding: 20px 20px; + box-sizing: border-box; + margin-right: 1%; + + box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.02); + float: left; +} + +.SciteBadge {} + +.article-quote-box { + background-color: #fff; + margin-bottom: 0 !important; +} + +.article-quote-box a { + width: 100%; +} + +.article-quote-box .quote-source { + width: 100%; + font-size: 13px; + padding: 0px 10px 20px; + box-sizing: border-box; + + text-align: center; + color: #333; + +} + +.article-quote-box .quote-content { + font-size: 12px; + padding: 10px; + box-sizing: border-box; + + color: #444; +} + +.article-quote-box .quote-content .quote-item { + display: flex; + align-items: center; +} + +.article-quote-box .quote-content .quote-item img { + width: 20px; + height: 20px; + margin-right: 10px; +} + +.article-quote-box .quote-content .quote-item .count { + min-width: 50px; + text-align: center; + font-weight: bold; +} + +.article-quote-box a { + display: inline-block; + text-decoration: none !important; +} + +.article-quote-box a .link { + text-decoration: underline !important; + +} + + +.quoteNumber { + color: #006699; + font-weight: 700; +} + +.quoteNumber:hover { + text-decoration: underline !important; +} + +#framed_div .quote-content a { + color: #006699; +} + +#framed_div .quote-content a:hover { + text-decoration: underline !important; +} + +.info-box { + padding: 10px; + background-color: #f5f5f5; + position: relative; + color: #333 !important +} + +.info-box:before { + position: absolute; + left: 10px; + top: 5px; + font-size: 18px; + + color: #333 +} + +.info-box__copyright:before { + content: "copyright"; +} + +.info-box__highlight { + background-color: #ffb800 +} + +.info-box a { + font-weight: 700; + color: #006699 !important; +} + +.info-box__container { + margin-top: 16px; + margin-left: 8px; + margin-right: 8px; +} + +.in-tab { + display: none; + opacity: 0; +} + +.openCrossref { + display: block; + opacity: 1; + transform: scale(0); + animation: fadeInAndGrow 0.5s forwards; + +} + +.font { + display: block; + margin: 0 auto; + font-size: 14px; + /* color: #006699; */ + font-weight: bold; + line-height: 22px; + text-align: center; +} + +@keyframes fadeInAndGrow { + 0% { + opacity: 0; + transform: scale(0); + } + + 50% { + opacity: 1; + transform: scale(1.1); + } + + 100% { + opacity: 1; + transform: scale(1); + } +} + + + +.wordTableHtml b span { + font-weight: bold !important; +} + +.wordTableHtml i span { + font-style: italic !important; +} + +.wordTableHtml sub span { + vertical-align: sub; +} + +.wordTableHtml sup span { + vertical-align: super; +} + +.wordTableHtml sub { + vertical-align: sub !important; +} + +.wordTableHtml sup { + vertical-align: super !important; +} + +.wordTableHtml span[style*='vertical-align: super'] { + vertical-align: super !important; +} + +.wordTableHtml span[style*='vertical-align: sub'] { + vertical-align: sub !important; +} + +.wordTableHtml table { + border: 0px !important; + border-bottom: 1px solid #000!important; + border-collapse: collapse; + /* 去除单元格间隙 */ + width: 100%; + margin: 0 auto !important; + table-layout: auto; + /* 自动调整列宽 */ + text-align: left; + font-family: 'Charis SIL' !important; + font-size: 7.5pt !important; + mso-font-kerning: 1pt !important; + line-height: 10pt !important; + mos-line-height: 10pt !important; +} + +.wordTableHtml table td, +.wordTableHtml table th { + padding: 5px; + text-align: left !important; + + word-wrap: break-word; + /* 长单词自动换行 */ + word-break: break-word; + font-family: 'Charis SIL' !important; + font-size: 7.5pt !important; + mso-font-kerning: 1pt !important; + line-height: 10pt !important; + mos-line-height: 10pt !important; +} + +.wordTableHtml table tbody tr td { + text-align: center !important; + border-left: none !important; + mso-border-left-alt: none !important; + border-right: none !important; + mso-border-right-alt: none !important; + border-top: none; + mso-border-top-alt: none !important; + border-bottom: none !important; + mso-border-bottom-alt: none !important; + /* border: 1px dashed #dcdfe6 !important; + border-left: 1px dashed #dcdfe6 !important; + border-right: 1px dashed #dcdfe6 !important; */ + word-break: keep-all !important; + /* text-align: justify !important; */ +} + +.wordTableHtml table tr td p { + display: flex; + text-align: left !important; + align-items: center; + margin: 0; + font-family: 'Charis SIL' !important; + font-size: 7.5pt !important; + mso-font-kerning: 1pt !important; + line-height: 10pt !important; + mos-line-height: 10pt !important; +} + +.wordTableHtml table span { + color: #000000; + text-align: left !important; + font-family: 'Charis SIL' !important; + font-size: 7.5pt !important; + mso-font-kerning: 1pt !important; + line-height: 10pt !important; + mos-line-height: 10pt !important; + white-space: pre-wrap !important; +} + +.wordTableHtml table .color-highlight { + color: rgb(0, 130, 170) !important; + font-family: 'Charis SIL' !important; + font-size: 7.5pt !important; + mso-font-kerning: 1pt !important; + line-height: 10pt !important; + mos-line-height: 10pt !important; +} + +.wordTableHtml table blue { + color: rgb(0, 130, 170) !important; + font-family: 'Charis SIL' !important; + font-size: 7.5pt !important; + mso-font-kerning: 1pt !important; + line-height: 10pt !important; + mos-line-height: 10pt !important; +} + +.wordTableHtml table tr:first-child td { + border-top: 1px solid #000 !important; + + border-bottom: 1px solid #000 !important; + +} + +.wordTableHtml table tr:last-of-type td { + border-bottom: 1px solid #000 !important; + +} +.wordTableHtml table tr.table-header-row:nth-of-type(2) td { +border-bottom: 1px solid #000 !important; +} +.pMain blue { + color: rgb(0, 130, 170) !important; + +} +body{ + // background: #fff; +} +.width_auto{ + width:auto !important; +} +.top{ + + width: 100%;box-sizing: border-box + +} +.top>div{ + + width: 100%; + +} +.top .top_logo{ + margin-top:0px; + +}.outline-container { + width: 200px; + transition: all 0.3s ease; + background-color: #f8f8f8; + + height: 100%; + position: relative; + } + + .outline-container .outline-toggle { + + display: flex; + align-items: center; + padding: 0px; + cursor: pointer; + + font-weight: bold; + font-size: 14px; + padding-top:10px !important; + padding-left:16px !important; + } + + .outline-container .outline-toggle i { + margin-right: 8px; + transition: transform 0.3s; + } + + /* 折叠后的样式 */ + .outline-container.is-closed { + width: 24px; + } + .outline-content{ + padding-left:16px; + box-sizing:border-box; + padding-right: 10px; + } + + .outline-container.is-closed .outline-content { + display: none; + } + .outline-container.is-closed .outline-toggle { + flex-wrap: wrap; + padding: 4px; + margin-top: 0px; + } + + + + + .outline-container.is-closed .outline-toggle i { + transform: rotate(180deg); + margin-left: -2px; + } + .outline-container .toggle-text { + + + + } + .outline-container .toggle-text1 { + display:none; + transform: rotate(178deg) translateX(-0%) !important; + display: block !important; + text-transform: unset !important; + writing-mode: vertical-rl !important; + /* text-orientation: upright !important; */ + font-size: 15px !important; + /* font-weight: bold !important; */ + color: #333 !important; + cursor: pointer !important; + margin-top: 6px !important; + letter-spacing: 2px !important; + + } + .is-open .toggle-text1{ + display: none !important; + } + .is-open .toggle-text{ + display: block !important; + // font-size: 16px !important; + } + .is-closed .toggle-text1{ + display: block !important; + } + .is-closed .toggle-text{ + display: none !important; + } +#common-overlay{ + // z-index:1000; +} +#col-content{ + background: #fff; + min-width: 1102px; + margin: 0 auto; + width: 80%; + z-index:1001; +} +.nav_ban{ + // display:none !important; + // padding: 0px 50px; +} +.daohang{ + // min-width: 1200px; + // width: 80%; + // max-width: 100%; + margin: 0 auto; + +} +.inner_nav_ban_wrapper{ +// min-width: 1200px; +// width: 80%; +// max-width: 100%; +// margin: 0 auto; +// height:100%; + +} +.wenzhang{ + +} +.wenzhang .wen_jian .left .zuo_zhe_info{ + margin-top:0px; +} +.article_navbar-container{ + + width:100%; +background-color: #fff; + +box-shadow:27px 9px 32px rgba(255, 255, 255, 1); + + border-top: 1px solid #eef; +padding:0 20px !important; +box-sizing: border-box; +} +.mb_aform{ +// min-width: 1200px; +// width: 80%; +// max-width: 100%; +// margin: 0 auto; + +// padding: 20px 0px; +// border-bottom:1px solid #e5e5e5; + +} +.mb_aform #combox4{ +width:48.5% !important; +} +.mb_aform #emaplm{ +width:48.5% !important; +} +.pos_ter{ + + margin: 0 auto; +padding: 20px 15px; + +display: flex; +align-items: center; +justify-content: space-between; + + +} + + +.pos_ter>div:nth-child(1) { + width: 24%; + min-width: 265px; + margin-right:0; + +} + +.pos_ter>div:nth-child(3) { + width: 22%; + margin-right:0; +} + +.pos_ter>div:nth-child(4) { + width: 22%; + margin-right:0; +} +.pos_ter>a { + + width: 22%; + margin-right:0; +} +.mb_aform input{ + height:30px !important; +} +.mb_aform input[type="submit"] { + top:40px; + width:110px; +} +.mb_aform .search_for input[type='text']{ + width: calc(100% - 244px); + margin-left: 100px; + margin-right: 0; +} + +.mb_aform>div{ + width:calc(100% - 220px); +} +.zuo_zhe_info { + max-height: 0; + overflow: hidden; + opacity: 0; + transition: all 0.3s ease; + } +.zuo_zhe_name { + color:#00549e!important; + } + + .zuo_zhe_info.show { + max-height: 300px; /* 根据实际内容调整 */ + opacity: 1; + margin-top:10px; + + } + + .toggle-btn { + color: #006699; + cursor: pointer; + display: inline-block; + margin-top: 8px; + user-select: none; + font-weight: bold; + text-decoration: none; + } + .toggle-btn:focus { + + text-decoration: none !important; + } +.article_navbar-container .article_dropbtn{ +padding-left:0px; +padding-right:0px; +} +.article,.article__{ + + // background-color: #fff; + // min-width: 1200px; + // width: 80%; + // max-width: 100%; + // margin: 0 auto; + // padding:0 50px; +} +.article{ + padding: 10px; +} +.article__{ +margin-top:0; +padding: 0 10px; +} +.v4-art { + width: 100%; + } + + .v4-view-pdf-tooltip { + padding: 7px 12px !important; + line-height: 1 !important; + } + + .v4-view-pdf-content { + font-size: 13px; + line-height: 15px; + } + + .v4-art-main-box { + width: 100%; + min-width: 1200px; + width: 80%; + max-width: 100%; + margin: 0 auto; + + padding: 0px 50px; + padding-bottom: 15px; + position: relative; + } + + .v4-art-top { + + // min-width: 1200px; + // width: 80%; + // max-width: 100%; + // margin: 0 auto; + // padding: 0px 50px; + padding: 0 10px; + background-color: #f4fafd !important; + + background-color: transparent; + transition: transform 0.3s ease, opacity 0.3s ease; + } + .v4-art-top .v4-art-top-main { + width: 100%; + + top: 0; + // z-index: 1000; + } + + + + + + .v4-art-top.fixed { + position: fixed; + top: 0; + left: -10px; + right: 0; + z-index: 999; + background-color: #fff !important; + transform: translateY(-100%); + opacity: 0; + pointer-events: none; + } + + .v4-art-top.fixed.show { + transform: translateY(0); + opacity: 1; + pointer-events: auto; + padding:0; + + } + .v4-art-top.fixed.show .v4-art-top-main{ + background-color: rgba(254, 254, 254, 0.8)!important; border-bottom: 1px solid #006699; + } + + + + .v4-art-top .v4-art-top-main .v4-art-top-main-m { + height: 38px; + padding: 0px 0px 0px; + display: flex; + flex-wrap: wrap; + background-color: #fcfcfd; + // border-top-left-radius: 10px; + // border-top-right-radius: 10px; + align-items: center; + justify-content: start; + + + border-bottom: 1px solid #eef; + border-top: 1px solid #eef; + } + + + .v4-art-top.fixed.show .v4-art-top-main-m{ + padding: 0px 20px; + } + .outline-container::-webkit-scrollbar { + width: 6px; /* 设置滚动条宽度为6px */ + } + + .outline-container::-webkit-scrollbar-thumb { + background-color: #ccc; /* 滚动条颜色 */ + border-radius: 3px; /* 圆角 */ + } + + .outline-container::-webkit-scrollbar-track { + background-color: #f5f5f5; /* 滚动条轨道颜色 */ + } + + .v4-art-top-main-m .v4-art-top-item{ + height: 28px; + display: flex; + margin: -2px 3px; + cursor: pointer; + font-family: 'Inter-SemiBold'; + font-size: 14px; + color: #2e2e2e; + text-decoration: none; + line-height: 22px; + } + .v4-art-top-main-m .view-pdf{ + // background-color: #dff1ffaa; + // border-radius: 12px; + // padding:0 16px 0 4px; + + } + #st-1{ + margin-top:-1px !important; + } + .v4-art-top .v4-art-top-item svg, .v4-art-top .v4-art-top-item .icon{ + margin: auto 6px; + width:auto; + height: 19px; + } + .v4-art-top #st-2 .st-btn > img{ + + width:19px !important; + height: 19px !important; + } + .v4-art-top #st-2 .st-btn{ + + + padding: 0 6px !important; + } + .v4-art-top #st-2{ + z-index:10 !important; + margin-left: -10px !important; + } + + .v4-art-top-main-m .v4-art-top-item span{ + display: flex; + align-items: center; + font-weight: 400; + } + .v4-art-top-main-m .v4-art-top-item span:hover{ + color: #3158fa; + } + .wenzhang .wen_jian{ + // background-color: #fff; + padding: 10px; + margin-bottom: 0px; + border-bottom: none; + // margin-top:1.25rem; + + } + .wenzhang .wen_jian .left{ + float: unset; + width: 100%; + padding-right: 0px; + } + .wen_jian_span{ + // margin-bottom: 1px !important; + } + .wenzhang .wen_jian h4{ + font-size: 26px; + // line-height: 1.25; + margin-top: 6px !important; + margin-bottom: 0px; + // font-weight: 500; + + + margin-top: 0px; + color: #222; + } + .wenzhang .wen_jian h4 i{ + + font-weight: 500; + + + + } + .wen_jian_span{ + display: inline-block; + + } + .wen_jian_span,.wen_jian_span a{ + font-size: 14px; + color: #666; + line-height: 30px; + } + .wenzhang .wen_rong{ + margin-bottom:0; + } + .wenzhang .wen_rong .left{ + float: unset; + width: 100%; + padding-right: 0px; + margin-right:0; + margin-bottom:0; + + } + .wenzhang .wen_rong .left .rong_box{ + + padding-left: 0px; + padding-right: 0px; + padding-top:0px !important; + margin-top:0px !important; + border-bottom:none; + } + .anchor-nav{ + // box-shadow: rgba(0, 0, 0, 0.1) 2px 0px 5px; + position: sticky; top: 40px; left: 0px; width: 285px; background:#f5f5f5; z-index: 10; overflow-y: auto; height: calc(100vh - 50px); float: left; + padding-top:10px; + + } + .pdf_item{ + display: flex; + align-items: center; + // justify-content: space-between; + font-family: 'Charis SIL'; + min-height: 12px; + } + .pdf_item > div{ +margin-right:10px; + } + .pdf_item .download{ + color: #006699; + margin-left:5px; + } + .pdf_item img{ + margin-top: -4px; + } + .pdf_item .download .fa{ + + margin-right:5px; + } + .pdf_item .pdf_file_type{ + + margin-left:5px; + } + + + + .trackItem { + display: flex +; +align-items: flex-start; + } + .trackItem .time:after{ + top:2px; + } + .conterecord:after{ + top:80px; + left:178px; + } + .trackItem .time{ + width: 140px; + margin-bottom:15px; + margin-top: 15px + } + .trackItem .type{ + width: calc(100% - 226px); + } + .trackItem .type:hover { + box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15); /* 淡蓝色阴影 */ +} +.corr_late ul{ + padding: 0 10px; + border-bottom: none; +} +.corr_late ul li a{ +font-size: 14px; +line-height: 22px; +} +.corr_late ul li p{ +font-size: 14px; +line-height: 22px; +} + +.extra-table{ + + box-sizing: border-box; + font-weight: 500 !important; + padding: 2px 0 0 16px !important; + width:100%; + margin-bottom:4px; + color: #333; + cursor: pointer; + color:#006699; + font-family: 'Charis SIL'; + line-height:18px;min-height: 12px; +} +.outiline-item h2{ +font-size:16px; +} +.outiline-other{ +margin-top:15px !important; +margin-bottom:0 !important; +} +.core-xlink-crossref .title{ + font-weight: 700; +} +.article_bottom{ + width:100%; + background-color: #f5f7fa; + +} +#common-popup{ + // z-index :1001 !important; +} +.article-quote-box{ + background-color: #f5f5f5; +} +.article-quote-box .quote-source{ + padding:0; + font-size:14px; + margin-bottom:0 !important; + +} +.quoteNumber{ + font-size:13px; +} +.mb_aform .search_for input[type='button']{ + right:10px; + width:110px; +} +.nav_item_title{ + font-weight: 700; + font-size: 14px !important; +} +.Ptitle{ + scroll-margin-top: 100px; +} +#conterecord{ + scroll-margin-top: 100px; +} +#conTopics{ + scroll-margin-top: 100px; +} +.daohang_bottom_line{ + width:auto !important; +} +.footer .daohang ul{ + width:27% !important; +} +.footer .daohang ul:nth-child(4){ + width:12% !important; +} \ No newline at end of file diff --git a/style/style.css b/style/style.css index 3c4aca1..ba07cc6 100644 --- a/style/style.css +++ b/style/style.css @@ -5042,6 +5042,7 @@ ul li .ab_tad { box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.4); } + .reviewerBox { font-size: 14px; position: relative;