508 lines
12 KiB
JavaScript
508 lines
12 KiB
JavaScript
|
||
var Journals_color = '#006699'
|
||
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 = `
|
||
.home_logo img{
|
||
position: absolute;
|
||
top: 20px;
|
||
}
|
||
.specials_container{
|
||
min-height: calc(48vh + 6px);
|
||
}
|
||
.oae_header_tit{
|
||
line-height: 22px;
|
||
margin-bottom: 0px;
|
||
|
||
padding-top: 12px;
|
||
font-family: "Helvetica Neue", Helvetica, Georgia, sans-serif;
|
||
font-size: 20px;
|
||
color: #006699;
|
||
font-weight: bold;
|
||
padding-bottom: 10px;
|
||
border-bottom: 1px solid #ddd;
|
||
margin-bottom: 20px;
|
||
}
|
||
|
||
.special-topic-item {
|
||
width:49%;
|
||
margin-bottom: 30px;
|
||
display: inline-flex;
|
||
vertical-align: top;
|
||
// margin-right: 2%;
|
||
box-sizing: border-box;
|
||
background: #fff;
|
||
padding: 10px;
|
||
align-items: flex-start;
|
||
}
|
||
|
||
|
||
.special-topic-item:nth-child(2n) {
|
||
margin-right: 0;
|
||
}
|
||
|
||
/* 左侧图片盒子 */
|
||
.special-img-box {
|
||
width: 160px;
|
||
height: 210px;
|
||
flex-shrink: 0;
|
||
margin-right: 15px;
|
||
overflow: hidden;
|
||
}
|
||
|
||
.topic-poster {
|
||
width: 100%;
|
||
height: 100%;
|
||
object-fit: cover;
|
||
border-radius: 4px;
|
||
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
|
||
display: block;
|
||
}
|
||
|
||
|
||
.special-info-box {
|
||
flex: 1;
|
||
text-align: left;
|
||
}
|
||
|
||
|
||
|
||
.topic-title:hover {
|
||
text-decoration: underline !important;
|
||
|
||
}
|
||
.topic-title {
|
||
font-size: 16px;
|
||
font-weight: bold;
|
||
color: #333;
|
||
line-height: 1.4;
|
||
margin-bottom: 4px;
|
||
text-decoration: none;
|
||
|
||
display: -webkit-box;
|
||
// -webkit-line-clamp: 3;
|
||
-webkit-box-orient: vertical;
|
||
// overflow: hidden;
|
||
}
|
||
|
||
.special-topic-item .special-info-box .topic-editors {
|
||
font-style: italic;
|
||
color: #888;
|
||
font-family: OpenSans;
|
||
font-size: 14px;
|
||
line-height: 20px;
|
||
margin-bottom: 8px !important;
|
||
padding-left: 0px !important;
|
||
}
|
||
|
||
.info-row {
|
||
font-size: 13px;
|
||
margin-bottom: 5px;
|
||
line-height: 1.4;
|
||
}
|
||
|
||
.info-label {
|
||
color: #7a2702;
|
||
font-weight: bold;
|
||
}
|
||
|
||
.info-value {
|
||
color: #444;
|
||
}
|
||
|
||
/* 链接与按钮 */
|
||
.upload-link {
|
||
margin-left: 5px;
|
||
}
|
||
|
||
.action-row {
|
||
margin-top: 10px;
|
||
}
|
||
|
||
.submit-btn {
|
||
font-size: 13px;
|
||
text-decoration: none;
|
||
transition: opacity 0.2s;
|
||
}
|
||
|
||
.submit-btn:hover {
|
||
opacity: 0.8;
|
||
text-decoration: underline;
|
||
}
|
||
|
||
|
||
.article{
|
||
padding-top:0 !important;
|
||
}
|
||
.whitebg>div p{
|
||
margin-bottom:0px !important;
|
||
}
|
||
.article .art_main{
|
||
width: 100%;
|
||
}
|
||
.guest_content{
|
||
padding:0;
|
||
}
|
||
.gue_content{
|
||
width: 100%;
|
||
margin-left:0;
|
||
}
|
||
.jour_base_info{
|
||
padding:10px !important;
|
||
border:none !important;
|
||
background-color: #f4fafd;
|
||
padding-bottom: 0px !important;
|
||
|
||
}
|
||
.gue_title{
|
||
color: #222;
|
||
font-weight: bold;
|
||
font-family: "Helvetica Neue", Helvetica, Georgia, sans-serif;
|
||
font-size: 20px;
|
||
}
|
||
.short-content-1 {
|
||
max-height: 120px;
|
||
display: -webkit-box;
|
||
-webkit-line-clamp: 5; /* 设置显示的行数 */
|
||
-webkit-box-orient: vertical;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
|
||
}
|
||
.short-content-2 {
|
||
max-height: 174px;
|
||
display: -webkit-box;
|
||
-webkit-line-clamp: 7; /* 设置显示的行数 */
|
||
-webkit-box-orient: vertical;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
|
||
}
|
||
.guest_content h3{
|
||
margin-top: 0 !important;
|
||
}
|
||
.jour_base_info .guest_content{
|
||
width: calc(100% - 230px);
|
||
padding-left: 20px !important;
|
||
|
||
}
|
||
.jour_base_info .gue_content{
|
||
|
||
margin-bottom:0px !important;
|
||
}
|
||
.back_fff .guest_content{
|
||
padding:15px 10px !important;
|
||
padding-top:0 !important;
|
||
}
|
||
.Submission_information span:hover{
|
||
text-decoration: underline;
|
||
cursor: pointer;
|
||
}
|
||
.jour_base_info_center{
|
||
margin: 0 !important;
|
||
padding: 10px !important;
|
||
background-color: #fff;
|
||
align-items: flex-start;
|
||
display: block;
|
||
|
||
}
|
||
.whitebg .qk_img{
|
||
width:230px !important;
|
||
height:290px !important;
|
||
margin-bottom: 0px !important;
|
||
}
|
||
|
||
|
||
.mb_aform{
|
||
display:none;
|
||
}
|
||
.pos_ter{
|
||
padding:10px;
|
||
}
|
||
.pos_ter>div:nth-child(1) {
|
||
width: 25%;
|
||
}
|
||
.pos_ter>a {
|
||
width: 23%;
|
||
}
|
||
.pos_ter>div:nth-child(3) {
|
||
width: 23%;
|
||
}
|
||
|
||
.pos_ter>div:nth-child(4) {
|
||
width: 23%;
|
||
|
||
}
|
||
.whitebg #abstract-content p{
|
||
padding-left:0 !important;
|
||
}
|
||
.footer .daohang ul{
|
||
width: 26% !important;
|
||
|
||
}
|
||
|
||
`
|
||
|
||
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 guest_title() {
|
||
var special_id = '';
|
||
|
||
// 获取地址栏信息
|
||
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 Gu_Num = getQueryString('Gu_num'); //客座信息
|
||
var Jour_num = getQueryString('J_num'); //
|
||
|
||
|
||
// 相关期刊,过往分期
|
||
$.ajax({
|
||
type: 'post', url: apiUrl + 'api/Journal/getJournal',
|
||
data: {
|
||
"journal_id": Jour_num
|
||
},
|
||
success: function (result) {
|
||
|
||
|
||
|
||
if (result.code == 0) {
|
||
|
||
Journals_color = result.data.journal.system_color
|
||
$('.border_title').css({
|
||
'border-bottom': `1px solid ${Journals_color}`,
|
||
})
|
||
$('.border_title_top').css({
|
||
'border-top': `3px solid ${Journals_color}`,
|
||
})
|
||
$('.article_info_box .tradition-box .tradition-text .article_info_Highlights').css({
|
||
'color': `${Journals_color} !important`,
|
||
|
||
})
|
||
//
|
||
|
||
// initJournalBaseInfo(result)
|
||
}
|
||
}
|
||
})
|
||
|
||
$.ajax({
|
||
type: 'post', url: apiUrl + 'api/Supplementary/getSpecialIssue',
|
||
data: {
|
||
'journal_id': Jour_num,
|
||
|
||
},
|
||
success: function (result) {
|
||
console.log('result at line 194:', result)
|
||
|
||
if (result.status !== 1) return ShowDanger("请求失败!");
|
||
|
||
var specialsList = result.data;
|
||
var str = `
|
||
<h1 class="oae_header_tit" style="
|
||
|
||
">Ongoing Special Topics</h1>
|
||
`;
|
||
const monthNames = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
|
||
|
||
specialsList.forEach(function(spe) {
|
||
// 1. 处理日期
|
||
var day = spe.deadline.substring(8, 10);
|
||
var monthIdx = parseInt(spe.deadline.substring(5, 7)) - 1;
|
||
var year = spe.deadline.substring(0, 4);
|
||
var formattedDate = `${day} ${monthNames[monthIdx]} ${year}`;
|
||
|
||
// 2. 处理编辑信息
|
||
var editorsStr = spe.editor?spe.editor: '';
|
||
|
||
// 3. 判断是否需要隐藏投稿图标 (2022年以前)
|
||
var isExpired = parseInt(year) < 2022;
|
||
var displayStyle = isExpired ? 'display:none;' : '';
|
||
var targetPage = ($.cookie("username") && $.cookie("user_id")) ? 'contribu_list.html' : 'contribu_login.html';
|
||
// 4. 拼接字符串
|
||
str += `
|
||
<div class="special-topic-item">
|
||
<div class="special-img-box">
|
||
<a href="gue_cont.html?J_num=${Jour_num}&Gu_num=${spe.journal_special_id}" target="_blank">
|
||
<img src="${imgjourUrl + spe.icon}" alt="${spe.title}" class="topic-poster">
|
||
</a>
|
||
</div>
|
||
|
||
<div class="special-info-box">
|
||
<h3 class="topic-title" style="margin:0;"> <a class="topic-title" href="gue_cont.html?J_num=${Jour_num}&Gu_num=${spe.journal_special_id}" target="_blank">
|
||
${spe.title}
|
||
</a></h3>
|
||
<p class="topic-editors">${editorsStr}</p>
|
||
|
||
<div class="info-row">
|
||
<span class="info-label">Submission deadline:</span>
|
||
<span class="info-value">${formattedDate}</span>
|
||
</div>
|
||
|
||
<div class="info-row" style="${displayStyle}">
|
||
<span class="info-label">Submission information:</span>
|
||
<div class="upload-link Submission_information" data-id="${spe.journal_special_id}" style="cursor:pointer; display:inline-block; margin-left:5px; color:${Journals_color}">
|
||
<a style="color:${Journals_color}" href="${targetPage}?J_num=${Jour_num}&Gu_num=${spe.journal_special_id}" target="_blank"> <i class="fa fa-upload"></i></a>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>`;
|
||
});
|
||
|
||
|
||
$('.specials_container').html(str);
|
||
|
||
|
||
// $('.specials_container').off('click', '.Submission_information').on('click', '.Submission_information', function () {
|
||
// var sId = $(this).data('id');
|
||
// var targetPage = ($.cookie("username") && $.cookie("user_id")) ? 'contribu_list.html' : 'contribu_login.html';
|
||
// window.open(`${targetPage}?J_num=${Jour_num}&special_id=${sId}`);
|
||
// });
|
||
|
||
|
||
|
||
|
||
|
||
},
|
||
error: function () {
|
||
ShowDanger("error!");
|
||
}
|
||
})
|
||
|
||
|
||
|
||
|
||
}
|
||
|
||
function initJournalBaseInfo(result) {
|
||
//头部左侧期刊信息(issn+img)
|
||
var arr_jour = result.data.journal;
|
||
console.log('arr_jour at line 1409:', arr_jour)
|
||
|
||
|
||
|
||
}
|
||
// 列表
|
||
|
||
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 picPreview(src) {
|
||
console.log(src)
|
||
$('.PicPreview img').attr('src', src)
|
||
$('.PicPreview').show()
|
||
}
|
||
$('.PicPreview').on('click', function () {
|
||
$('.PicPreview').hide()
|
||
})
|
||
|
||
|
||
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);
|
||
} |