H指数修改
This commit is contained in:
@@ -309,7 +309,12 @@
|
||||
<div class="s_rol">
|
||||
<h3>
|
||||
WOS Index
|
||||
<b class="el-icon-edit pencil" @click="handleUserIndex('wos')" style="float: right"></b>
|
||||
<b
|
||||
class="el-icon-edit pencil"
|
||||
v-if="isEditIndex('wos')"
|
||||
@click="handleUserIndex('wos')"
|
||||
style="float: right"
|
||||
></b>
|
||||
</h3>
|
||||
|
||||
<div class="rol_mess">
|
||||
@@ -324,7 +329,12 @@
|
||||
<div class="s_rol">
|
||||
<h3>
|
||||
Scopus Index
|
||||
<b class="el-icon-edit pencil" @click="handleUserIndex('scopus')" style="float: right"></b>
|
||||
<b
|
||||
class="el-icon-edit pencil"
|
||||
v-if="isEditIndex('scopus')"
|
||||
@click="handleUserIndex('scopus')"
|
||||
style="float: right"
|
||||
></b>
|
||||
</h3>
|
||||
|
||||
<div class="rol_mess">
|
||||
@@ -335,19 +345,39 @@
|
||||
<font>Time :</font>
|
||||
<span v-html="colorIndex2(userMessage.scopus_time)"></span>
|
||||
</div>
|
||||
<div class="rol_mess">
|
||||
<font>Website :</font>
|
||||
<span v-html="userMessage.scopus_website"></span>
|
||||
</div>
|
||||
|
||||
<div class="rol_mess">
|
||||
<font>Editor :</font>
|
||||
<span v-html="userMessage.scopus_editor"></span>
|
||||
</div>
|
||||
<div class="rol_mess">
|
||||
<font>Website :</font>
|
||||
|
||||
<span
|
||||
style="
|
||||
display: inline-block;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
width: calc(100% - 80px);
|
||||
line-height: 17px;
|
||||
"
|
||||
>
|
||||
<a :href="userMessage.scopus_website" target="_blank" style="color: rgb(0, 102, 153) !important">{{
|
||||
userMessage.scopus_website
|
||||
}}</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="s_rol">
|
||||
<h3>
|
||||
Google Index
|
||||
<b class="el-icon-edit pencil" @click="handleUserIndex('google')" style="float: right"></b>
|
||||
<b
|
||||
class="el-icon-edit pencil"
|
||||
v-if="isEditIndex('google')"
|
||||
@click="handleUserIndex('google')"
|
||||
style="float: right"
|
||||
></b>
|
||||
</h3>
|
||||
|
||||
<div class="rol_mess">
|
||||
@@ -358,15 +388,32 @@
|
||||
<font>Time :</font>
|
||||
<span v-html="colorIndex2(userMessage.google_time)"></span>
|
||||
</div>
|
||||
<div class="rol_mess">
|
||||
<font>Website :</font>
|
||||
<span v-html="userMessage.google_website"></span>
|
||||
</div>
|
||||
|
||||
<div class="rol_mess">
|
||||
<font>Editor :</font>
|
||||
<span v-html="userMessage.google_editor"></span>
|
||||
</div>
|
||||
<div class="rol_mess">
|
||||
<font>Google Author :</font>
|
||||
<span style="line-height: 20px">{{ userMessage.g_author }}</span>
|
||||
</div>
|
||||
<div class="rol_mess">
|
||||
<font>Website :</font>
|
||||
<span
|
||||
style="
|
||||
display: inline-block;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
width: calc(100% - 80px);
|
||||
line-height: 20px;
|
||||
"
|
||||
>
|
||||
<a :href="this.userMessage.g_author?`https://scholar.google.com/citations?hl=en&user=${this.userMessage.g_author}`:''" target="_blank" style="color: rgb(0, 102, 153) !important">{{
|
||||
this.userMessage.g_author?`https://scholar.google.com/citations?hl=en&user=${this.userMessage.g_author}`:''
|
||||
}}</a>
|
||||
</span>
|
||||
</div>
|
||||
<!-- <div class="rol_mess">
|
||||
<font>Google ID :</font>
|
||||
<span></span>
|
||||
@@ -793,7 +840,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<span slot="label"> Index : </span>
|
||||
<el-input v-model="userIndexForm.index"></el-input>
|
||||
<el-input v-model="userIndexForm.index" :disabled="userIndexForm.type == 2"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<template v-if="userIndexForm.type == 1">
|
||||
@@ -834,6 +881,9 @@
|
||||
v-if="userMessage.g_author == ''"
|
||||
>Certified
|
||||
</el-button>
|
||||
<span style="margin: 0 0 0 5px; padding: 5px 12px; color: #999" v-if="googleSearchInfo != ''">
|
||||
( {{ googleSearchInfo }} )</span
|
||||
>
|
||||
</el-form-item>
|
||||
|
||||
<p v-if="geogleList.length != 0 && bankVisible" style="margin: 20px 0 20px 0; font-weight: bold">
|
||||
@@ -1203,6 +1253,7 @@ export default {
|
||||
}
|
||||
],
|
||||
role_author: 0,
|
||||
googleSearchInfo:'',
|
||||
role_editor: 0,
|
||||
role_chief: 0,
|
||||
role_reviewer: 0,
|
||||
@@ -1657,6 +1708,47 @@ export default {
|
||||
this.indexVisible = true;
|
||||
}
|
||||
},
|
||||
|
||||
isEditIndex(data) {
|
||||
console.log('data at line 1543:', this.userMessage);
|
||||
var status;
|
||||
var date = '';
|
||||
switch (data) {
|
||||
case 'wos':
|
||||
date = this.userMessage.wos_time;
|
||||
console.log('date at line 1714:', date)
|
||||
break;
|
||||
case 'scopus':
|
||||
date = this.userMessage.scopus_time;
|
||||
break;
|
||||
case 'google':
|
||||
date = this.userMessage.google_time;
|
||||
break;
|
||||
}
|
||||
console.log('date at line 1714:', date);
|
||||
if (date == 0) {
|
||||
status = true;
|
||||
} else {
|
||||
var date1 = new Date(parseInt(date * 1000));
|
||||
var date2 = new Date().getTime();
|
||||
console.log('date2 at line 1564:', date2);
|
||||
|
||||
// 计算时间差(以毫秒为单位)
|
||||
var timeDiff = Number(date2 - date1);
|
||||
console.log('timeDiff at line 1569:', timeDiff);
|
||||
|
||||
// 将半年转换为毫秒
|
||||
var halfYearInMilliseconds = 1000 * 60 * 60 * 24 * 182.5; // 假设一年有 365 天
|
||||
|
||||
// 判断时间差是否大于半年
|
||||
status = timeDiff > halfYearInMilliseconds;
|
||||
if (data == 'google' && this.userMessage.g_author == '') {
|
||||
status = true;
|
||||
}
|
||||
}
|
||||
console.log('status at line 1578:', status);
|
||||
return status;
|
||||
},
|
||||
// 个人指数修改
|
||||
handleUserIndex(e) {
|
||||
var type = '';
|
||||
@@ -1678,8 +1770,15 @@ export default {
|
||||
this.bankVisible = true;
|
||||
this.userloading = false;
|
||||
} else {
|
||||
this.$message.error(res.msg);
|
||||
this.userloading = false;
|
||||
if (res.msg == 'no date') {
|
||||
this.googleSearchInfo = 'No information has been found for this account yet.';
|
||||
this.geogleList = [];
|
||||
this.userloading = false;
|
||||
} else {
|
||||
this.$message.error(res.msg);
|
||||
this.geogleList = [];
|
||||
this.userloading = false;
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
@@ -1771,10 +1870,22 @@ export default {
|
||||
let link_geo = '';
|
||||
if (this.userIndexForm.type == 2) {
|
||||
if (this.userIndexForm.g_author == '') {
|
||||
this.$message.error('Please select one!');
|
||||
return;
|
||||
if (this.bankVisible) {
|
||||
console.log('this.bankVisible at line 1294:', this.bankVisible);
|
||||
this.$message.error('Please select one!');
|
||||
return;
|
||||
} else {
|
||||
if (this.googleSearchInfo != '') {
|
||||
this.$message.error(this.googleSearchInfo);
|
||||
return;
|
||||
} else {
|
||||
this.$message.error('Please click Certified!');
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
link_geo = 'api/User/googleBindAuthor';
|
||||
link_geo = 'api/User/editUserIndex';
|
||||
// link_geo = 'api/User/googleBindAuthor';
|
||||
} else {
|
||||
link_geo = 'api/User/editUserIndex';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user