tijiao
This commit is contained in:
@@ -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 = `<div class="newHtml2" style="margin-left:300px;">${htmlContent}</div>`
|
||||
$('.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');
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
339
js/articleJS/index_v1.js
Normal file
339
js/articleJS/index_v1.js
Normal file
@@ -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' ? '' : `<a href="https://youtu.be/3eDbnHRkFKQ" target="_blank"><img src="img/link_5.png" width="50" height="16" style="margin-left: 10px"></a>`,
|
||||
c_t_a: '',
|
||||
trad_tion: '',
|
||||
lr_top: '',
|
||||
person_img: '',
|
||||
tong_geogle: tong_geogle ? tong_geogle : '',
|
||||
pdf_: !data.file_pdf || data.file_pdf == '' ? '' : `<img src="img/link_3.jpg" width="14" height="16"><a href="${imgFileUrl}articlePDF/${data.file_pdf}" target="_blank" class="txt_pdf" alt="${data.article_id}">PDF</a> ( <span style="color: red">${data.pdf_num}</span> )`,
|
||||
cite_: !data.cite_num || data.cite_num == 0 ? '' :
|
||||
` <span article_id="${data.article_id}" class="cite_box" style="color: #7a2702;">
|
||||
<img src="img/link_6.jpg" width="14" height="16">
|
||||
WOS Citations ( <span style="color: red">${data.cite_num}</span> )
|
||||
<ul class="export_cite "> </ul>
|
||||
</span>`,
|
||||
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_ = '<img src="img/link_2.png" width="14" height="16"><a href="' + imgFileUrl + 'articleHTML/' + data.file_html + '" target="_blank" class="txt_html" alt="' + data.article_id + '">HTML</a> ( <span style="color: red">' + data.html_num + '</span> ) '
|
||||
}
|
||||
} else {
|
||||
baseInfo.html_ = '<img src="img/link_2.png" width="14" height="16"><a href="article.html?J_num=' + Jour_num + '&a_id=' + data.article_id + '&s_htm=1" target="_blank" class="txt_html" alt="' + data.article_id + '">HTML</a> ( <span style="color: red">' + data.html_num + '</span> ) '
|
||||
}
|
||||
|
||||
|
||||
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 = '<span class="otStat">Editorial Expression of Concern</span>'
|
||||
} else if (data.other_state == 2) {
|
||||
baseInfo.otStat = '<span class="otStat">Retracted</span>'
|
||||
}
|
||||
if (data.isShowOtime == 1) {
|
||||
if (data.pub_date && data.pub_date != '') {
|
||||
baseInfo.pub_date = `<div class="url_data">Published Date: ${data.pub_date}</div>`
|
||||
}
|
||||
}
|
||||
|
||||
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 = '<img src="' + img_i + '" alt="" style="width: 120px">'
|
||||
} else {
|
||||
baseInfo.person_img = '<img src="' + img_i + '" alt="">'
|
||||
}
|
||||
if (c_t_a == 'different') {
|
||||
if (data.journal_id == 22) {
|
||||
baseInfo.c_t_a = '<button class="txt_copy cite_txt_button" > <img src="img/link_7.jpg" width="14" height="16">引用这篇文章<ul class="export" style="z-index:10;"><li id="txt_copy_' + i + '" class="Exc_1">>> 复制引用信息</li><li class="Exc_2"><i class="fa fa-download"></i> 下载EndNote格式</li><li class="Exc_3"><i class="fa fa-download"></i> 下载RIS格式</li><li class="Exc_4"><i class="fa fa-download"></i> 下载BibTex格式</li><li class="Exc_5"><i class="fa fa-download"></i> 下载text格式</li><div class="triangle"></div></ul></button>'
|
||||
} else {
|
||||
baseInfo.c_t_a = '<button class="txt_copy cite_txt_button"> <img src="img/link_7.jpg" width="14" height="16">Cite this article<ul class="export" style="z-index:10;"><li id="txt_copy_' + i + '" class="Exc_1">>> Copy citation information</li><li class="Exc_2"><i class="fa fa-download"></i> Export citation to EndNote</li><li class="Exc_3"><i class="fa fa-download"></i> Export citation to RIS</li><li class="Exc_4"><i class="fa fa-download"></i> Export citation to BibTex</li><li class="Exc_5"><i class="fa fa-download"></i> Export citation to txt</li><div class="triangle"></div></ul></button>'
|
||||
}
|
||||
} else {
|
||||
baseInfo.c_t_a = '<button class="txt_copy cite_txt_button"> <img src="img/link_7.jpg" width="14" height="16">Cite this article<ul class="export" style="z-index:10;"><li id="txt_copy_' + i + '" class="Exc_1">>> Copy citation information</li><li class="Exc_2"><i class="fa fa-download"></i> Export citation to EndNote</li><li class="Exc_3"><i class="fa fa-download"></i> Export citation to RIS</li><li class="Exc_4"><i class="fa fa-download"></i> Export citation to BibTex</li><li class="Exc_5"><i class="fa fa-download"></i> Export citation to txt</li><div class="triangle"></div></ul></button>'
|
||||
|
||||
}
|
||||
|
||||
|
||||
baseInfo.link_ = `<img src="img/link_1.png" width="14" height="16"><a class="txt_zhaiyao" alt="${data.article_id}">Abstract</a> ( <span style="color: red">${data.abs_num}</span> ) ${baseInfo.html_}${baseInfo.pdf_}${baseInfo.mp4_}${baseInfo.c_t_a}${baseInfo.cite_}${baseInfo.tong_geogle}
|
||||
<p class="txt_content">${data.cite}</p><div>${data.abstract}</div>`;
|
||||
|
||||
|
||||
|
||||
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 = '<div>' + abstNew + '...</div>'
|
||||
} else {
|
||||
baseInfo.trad_tion = '<div>' + data.abstract?data.abstract:'' + '</div>'
|
||||
}
|
||||
} else {
|
||||
baseInfo.trad_tion = '<div><h3>' + data.tradition_tag + '</h3><p>' + data.tradition + '</p></div>'
|
||||
}
|
||||
|
||||
if (data.topic && data.topic.length > 0) {
|
||||
for (var t = 0; t < data.topic.length; t++) {
|
||||
baseInfo.lr_top += '<a href="topic_list.html?J_num=' + Jour_num + '&t_id=' + data.topic[t].journal_topic_id + '" target="_blank">' + data.topic[t].title + '</a>'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
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('<div class="loader-01"></div>');
|
||||
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 += `
|
||||
<div class='cite_list_item' style="margin-bottom:10px;podding:10px 0;display:flex;border-bottom: ${i != arr.length - 1 ? '1px solid #ccc' : 'none'};}"><p style="margin-right:10px;">${Number(i) + 1}.</p>
|
||||
<div>
|
||||
<p style="display: block; line-height: 20px;
|
||||
font-size: 13px;
|
||||
margin-bottom: 3px;"> <a style="color:#205493 !important;"
|
||||
target="_blank"
|
||||
href="${arr[i].doi ? 'https://doi.org/' + arr[i].doi : ''}">
|
||||
${arr[i].article_name}
|
||||
</a></p>
|
||||
|
||||
<p style="line-height: 14px;margin-bottom: 10px;">
|
||||
<span style="color: #a2b1b6;
|
||||
font-size: 13px;">${arr[i].author ? `${arr[i].author},` : ''} ${arr[i].journal_name}${arr[i].vol ? `${arr[i].vol},` : ''}
|
||||
</span>
|
||||
<span style="margin-left:5px;color:#205493 !important;">
|
||||
</span></p></div>
|
||||
|
||||
</div> `
|
||||
}
|
||||
journalCiteStr += ` <div class="cite_triangle"></div>`
|
||||
|
||||
$('.cite_box .export_cite').html(journalCiteStr);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
3392
js/article_v1.js
Normal file
3392
js/article_v1.js
Normal file
File diff suppressed because it is too large
Load Diff
2951
js/article_v2.js
Normal file
2951
js/article_v2.js
Normal file
File diff suppressed because it is too large
Load Diff
@@ -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() {
|
||||
'<div><span>' + arr[i].abbr + '. | <a style="color: #fff" target="_blank" href="/' + arr[i].usx + '">' + arr[i].journal_short + '</a></span>' +
|
||||
'<a target="_blank" href="article.html?J_num=' + arr[i].journal_id + '&a_id=' + arr[i].article_id + '">' +
|
||||
'<p>' + arr[i].title + '</p></a></div>'
|
||||
} else if (i == 1 || i == 2) {
|
||||
} else if (i <= 6) {
|
||||
str2_num_1 = str2_num_1 + 1
|
||||
str2_1 += '<div><img src="' + imgarticleUrl + arr[i].icon + '" alt="">' +
|
||||
'<span>' + arr[i].abbr + '. | <a style="color: #006699" target="_blank" href="/' + arr[i].usx + '">' + arr[i].journal_short + '</a></span>' +
|
||||
'<a target="_blank" href="article.html?J_num=' + arr[i].journal_id + '&a_id=' + arr[i].article_id + '"><p>'
|
||||
+ arr[i].title + '</p></a></div>'
|
||||
} else if (i <= 5) {
|
||||
str3_num = str3_num + 1
|
||||
str3 += '<div><span>' + arr[i].abbr + ' | <a style="color: #006699" target="_blank" href="/' + arr[i].usx + '">' + arr[i].journal_short + '</a></span><a target="_blank" href="article.html?J_num=' + arr[i].journal_id + '&a_id=' + arr[i].article_id + '"><p>'
|
||||
+ arr[i].title + '</p></a></div>'
|
||||
}
|
||||
}
|
||||
// else if (i <= 5) {
|
||||
// str3_num = str3_num + 1
|
||||
// str3 += '<div><span>' + arr[i].abbr + ' | <a style="color: #006699" target="_blank" href="/' + arr[i].usx + '">' + arr[i].journal_short + '</a></span><a target="_blank" href="article.html?J_num=' + arr[i].journal_id + '&a_id=' + arr[i].article_id + '"><p>'
|
||||
// + arr[i].title + '</p></a></div>'
|
||||
// }
|
||||
}
|
||||
$('.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 + '<br clear="both">');
|
||||
$('.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')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user