This commit is contained in:
2024-11-08 14:53:49 +08:00
parent 7a9439e231
commit 8be808a3b4

View File

@@ -102,6 +102,31 @@
<font>Introduction :</font> <font>Introduction :</font>
<p class="rm_huid">{{ userMessage.introduction }}</p> <p class="rm_huid">{{ userMessage.introduction }}</p>
</div> </div>
<div class="rol_mess">
<font>Grade :</font>
<p style="display: inline-block">
<img
src="../../assets/img/star-all.png"
v-for="item in starList"
v-if="starList_mark <= 8 && item.star == 1"
class="starSty"
/>
<img
src="../../assets/img/star-traf.png"
v-for="item in starList"
v-if="starList_mark <= 8 && item.star == 0"
class="starSty"
/>
<img
src="../../assets/img/star-none.png"
v-for="item in starList"
v-if="starList_mark <= 8 && item.star == 2"
class="starSty"
/>
<img src="../../assets/img/star-all.png" v-if="starList_mark > 8" class="starSty" />
<b style="font-size: 15px; color: #b77614" v-if="starList_mark > 8">× {{ starList_mark }}</b>
</p>
</div>
<div class="rol_mess" style="overflow: hidden"> <div class="rol_mess" style="overflow: hidden">
<font>CV : </font> <font>CV : </font>
<!-- <p style="margin: 0 0 25px 28px; font-size: 18px">CV. List</p> --> <!-- <p style="margin: 0 0 25px 28px; font-size: 18px">CV. List</p> -->
@@ -190,7 +215,7 @@
</p> --> </p> -->
</div> </div>
</div> </div>
<div class="s_rol"> <!-- <div class="s_rol">
<h3>Index</h3> <h3>Index</h3>
<div class="rol_mess"> <div class="rol_mess">
<font>Grade :</font> <font>Grade :</font>
@@ -278,7 +303,86 @@
<el-button type="primary" @click="saveIndex(IndexForm)">OK</el-button> <el-button type="primary" @click="saveIndex(IndexForm)">OK</el-button>
</div> </div>
<p v-if="geogleList.length == 0 && bankVisible" style="text-align: center; color: #999">No corresponding data</p> <p v-if="geogleList.length == 0 && bankVisible" style="text-align: center; color: #999">No corresponding data</p>
</div> -->
<div style="display: flex; align-items: center; justify-content: space-between" class="userIndexBox">
<div class="s_rol">
<h3>
WOS Index
<b class="el-icon-edit pencil" @click="handleUserIndex('wos')" style="float: right"></b>
</h3>
<div class="rol_mess">
<font>Index :</font>
<span v-html="colorIndex1(userMessage.wos_index)"></span>
</div> </div>
<div class="rol_mess">
<font>Time :</font>
<span v-html="colorIndex2(userMessage.wos_time)"></span>
</div>
</div>
<div class="s_rol">
<h3>
Scopus Index
<b class="el-icon-edit pencil" @click="handleUserIndex('scopus')" style="float: right"></b>
</h3>
<div class="rol_mess">
<font>Index :</font>
<span v-html="colorIndex1(userMessage.scopus_index)"></span>
</div>
<div class="rol_mess">
<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>
<div class="s_rol">
<h3>
Google Index
<b class="el-icon-edit pencil" @click="handleUserIndex('google')" style="float: right"></b>
</h3>
<div class="rol_mess">
<font>Index :</font>
<span v-html="colorIndex1(userMessage.google_index)"></span>
</div>
<div class="rol_mess">
<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 ID :</font>
<span></span>
</div>
<div class="rol_mess">
<font>Google Author :</font>
<span></span>
</div> -->
</div>
</div>
<!-- <div style="text-align: right" v-if="geogleList.length != 0 && bankVisible">
<el-button @click="bankVisible = false">Cancel</el-button>
<el-button type="primary" @click="saveIndex(IndexForm)">OK</el-button>
</div> -->
<p v-if="geogleList.length == 0 && bankVisible" style="text-align: center; color: #999">No corresponding data</p>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="User role"> <el-tab-pane label="User role">
<p style="text-align: right; margin: 0 0 20px 0"> <p style="text-align: right; margin: 0 0 20px 0">
@@ -312,6 +416,53 @@
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="WOS" prop="title" width="100">
<template slot-scope="scope">
<el-popover ref="popover" placement="right" trigger="click" width="700">
<ul
style="
padding: 0 0px;
box-sizing: border-box;
max-height: 500px;
overflow-y: auto;
white-space: normal;
"
v-loading="wosLoading"
>
<li v-for="(v, i) in authorList" style="overflow: hidden; margin-bottom: 5px">
<div style="color: #7a2702; margin-right: 10px; float: left">{{ i + 1 }} .</div>
<div style="float: left; width: calc(100% - 100px)">
<p class="tab_tie_col">
{{ v.firstname }}&nbsp;{{ v.lastname }}
<span
>( {{ $t('partyListCorr.Email') }}:
<span style="color: #409eff">{{ v.email }}</span
>)</span
>
</p>
</div>
</li>
</ul>
<span
slot="reference"
@click="getWosList(scope.row.article_id)"
style="
color: #006699;
background: #ecf5ff;
border: 1px solid #b3d8ff;
padding: 4px;
border-radius: 4px;
margin-top: 10px;
"
>
<span style="font-size: 10px; font-weight: bold">WOS</span>
</span>
</el-popover>
</template>
</el-table-column>
<el-table-column :label="$t('partyRole.identity')" prop="title" width="200"> <el-table-column :label="$t('partyRole.identity')" prop="title" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<div style="color: "> <div style="color: ">
@@ -365,6 +516,7 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="" prop="title" width="100"> <el-table-column label="" prop="title" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-popover ref="popover" placement="right" trigger="click" width="700"> <el-popover ref="popover" placement="right" trigger="click" width="700">
@@ -620,6 +772,86 @@
<el-button type="primary" @click="saveIndex(IndexForm)">OK</el-button> <el-button type="primary" @click="saveIndex(IndexForm)">OK</el-button>
</span> </span>
</el-dialog> </el-dialog>
<!-- user指数弹出框 -->
<el-dialog :title="`Edit personal index ( ${userIndexForm.typeName} )`" :visible.sync="userIndexVisible" min-width="600px">
<el-form ref="index_Form" :model="userIndexForm" :rules="rules" label-width="170px">
<el-form-item label="Account :" prop="account">
{{ userIndexForm.account }}
</el-form-item>
<el-form-item>
<span slot="label"> Time : </span>
<span v-html="colorIndex2(userIndexForm.date)"></span>
</el-form-item>
<el-form-item>
<span slot="label"> Index : </span>
<el-input v-model="userIndexForm.index"></el-input>
</el-form-item>
<template v-if=" userIndexForm.type == 1">
<el-form-item>
<span slot="label"> Website : </span>
<el-input v-model="userIndexForm.website"></el-input>
</el-form-item>
<template v-if="userIndexForm.type == 2"> </template>
</template>
<template v-if="userIndexForm.type == 2">
<el-form-item>
<span slot="label">
<img src="@/assets/img/browser.png" alt="" style="width: 20px; vertical-align: sub; margin-right: 5px" />
<font>Google account :</font>
</span>
<b
class="el-icon-check"
v-if="userMessage.g_author != ''"
style="font-size: 20px; font-weight: bold; color: #2a9916"
></b>
<a
v-if="userMessage.g_author != ''"
target="_blank"
:href="'https://scholar.google.it/citations?user=' + userMessage.g_author"
class="webLink"
>
Certified
</a>
<el-button
@click="handleIndex(3)"
type="warning"
icon="el-icon-paperclip"
size="mini"
round
style="margin: 0 0 0 5px; padding: 5px 12px"
v-if="userMessage.g_author == ''"
>Certified
</el-button>
</el-form-item>
<p v-if="geogleList.length != 0 && bankVisible" style="margin: 20px 0 20px 0; font-weight: bold">
Please select one and press the OK button.
</p>
<div
v-for="item in geogleList"
:class="IndexForm.g_author == item.author_id ? 'gugeList gu_col' : 'gugeList'"
@click="choseGego(item)"
v-if="bankVisible"
>
<p style="font-weight: bold; letter-spacing: -0.5px">{{ item.name }}</p>
<p><font>Email :</font>{{ item.email }}</p>
<p><font>Affiliations :</font>{{ item.affiliations }}</p>
<p>
<a :href="item.link" target="_blank">{{ item.link }}</a>
</p>
<i class="kuangGeo"></i>
<b class="el-icon-check"></b>
</div>
</template>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="userIndexVisible = false">Cancel</el-button>
<el-button type="primary" @click="saveUserIndex(userIndexForm)">OK</el-button>
</span>
</el-dialog>
<!-- 添加身份 --> <!-- 添加身份 -->
<el-dialog title="Add User Role" :visible.sync="guestVisible" width="700px"> <el-dialog title="Add User Role" :visible.sync="guestVisible" width="700px">
@@ -814,7 +1046,9 @@ export default {
data() { data() {
return { return {
citeLoading: false, citeLoading: false,
wosLoading: false,
authorList: [], authorList: [],
editorList: [],
loading: false, loading: false,
authorArticlesList: [], authorArticlesList: [],
userrole: localStorage.getItem('U_status'), userrole: localStorage.getItem('U_status'),
@@ -827,6 +1061,7 @@ export default {
wos_index: '', wos_index: '',
google_index: '' google_index: ''
}, },
userIndexForm: {},
geogleList: [], geogleList: [],
reviewTable: {}, reviewTable: {},
authorTable: {}, authorTable: {},
@@ -842,6 +1077,7 @@ export default {
pictureUrl: '', pictureUrl: '',
messageVisible: false, messageVisible: false,
indexVisible: false, indexVisible: false,
userIndexVisible: false,
bankVisible: false, bankVisible: false,
cvitaVisible: false, cvitaVisible: false,
fileL_pdf1: [], fileL_pdf1: [],
@@ -1064,8 +1300,36 @@ export default {
created() { created() {
this.getSelectData(); this.getSelectData();
this.getDate(); this.getDate();
this.getAllEditor();
}, },
methods: { methods: {
async getWosList(id) {
var that = this;
this.authorList = [];
this.wosLoading = true;
await this.$api
.post('api/User/getAuthorForArticle', {
article_id: id
})
.then(async (res) => {
if (res.code == 0) {
this.authorList = res.data.list;
this.wosLoading = false;
setTimeout(() => {
that.$nextTick(() => {
that.$refs.popover.updatePopper();
});
}, 100);
} else {
this.$message.error(res.msg);
this.wosLoading = false;
}
})
.catch((err) => {
this.$message.error(err);
this.wosLoading = false;
});
},
async getAuthorList(id) { async getAuthorList(id) {
var that = this; var that = this;
this.authorList = []; this.authorList = [];
@@ -1093,6 +1357,22 @@ export default {
this.citeLoading = false; this.citeLoading = false;
}); });
}, },
async getAllEditor(id) {
var that = this;
this.editorList = [];
await this.$api
.post('api/User/getAllEditor', {})
.then(async (res) => {
if (res.code == 0) {
this.editorList = res.data.editors;
} else {
this.$message.error(res.msg);
}
})
.catch((err) => {
this.$message.error(err);
});
},
// 获取下拉列表 // 获取下拉列表
getSelectData() { getSelectData() {
this.$api this.$api
@@ -1305,8 +1585,8 @@ export default {
console.log('Input string is valid.'); console.log('Input string is valid.');
} else { } else {
console.log('Input string is invalid.'); console.log('Input string is invalid.');
this.$message.error(this.$t('info.realname')) this.$message.error(this.$t('info.realname'));
return false return false;
} }
this.$api this.$api
@@ -1367,6 +1647,61 @@ export default {
this.indexVisible = true; this.indexVisible = true;
} }
}, },
// 个人指数修改
handleUserIndex(e) {
var type = '';
var typeName = '';
var index = '';
var date = '';
var website = '';
var editor_id = '';
var g_author = '';
switch (e) {
case 'wos':
type = 0;
typeName = 'WOS';
index = this.userMessage.wos_index;
date = this.userMessage.wos_time;
break;
case 'scopus':
type = 1;
typeName = 'Scopus';
index = this.userMessage.scopus_index;
date = this.userMessage.scopus_time;
website = this.userMessage.scopus_website;
break;
case 'google':
type = 2;
typeName = 'Google';
index = this.userMessage.google_index;
date = this.userMessage.google_time;
website = this.userMessage.g_website;
g_author = this.userMessage.g_author;
break;
}
this.userIndexForm = {
type: type,
index: index,
date: date,
website: website,
editor_id: localStorage.getItem('U_id'),
g_author: g_author,
user_id: this.userMessage.user_id,
account: this.userMessage.account,
typeName: typeName
};
console.log('this.userIndexForm at line 1641:', this.userIndexForm);
// this.userIndexForm.type = e;
this.userIndexVisible = true;
},
// 保存个人信息 // 保存个人信息
saveIndex() { saveIndex() {
@@ -1396,6 +1731,34 @@ export default {
this.$message.error(err); this.$message.error(err);
}); });
}, },
// 保存个人信息
saveUserIndex() {
let link_geo = '';
if (this.userIndexForm.type == 2) {
if (this.userIndexForm.g_author == '') {
this.$message.error('Please select one!');
return;
}
link_geo = 'api/User/googleBindAuthor';
} else {
link_geo = 'api/User/editUserIndex';
}
this.$api
.post(link_geo, this.userIndexForm)
.then((res) => {
if (res.code == 0) {
this.$message.success('Successfully modified personal index');
this.userIndexVisible = false;
this.bankVisible = false;
this.getDate();
} else {
this.$message.error(res.msg);
}
})
.catch((err) => {
this.$message.error(err);
});
},
// 选择填写方式 // 选择填写方式
checkAddType(e) { checkAddType(e) {
@@ -1407,8 +1770,8 @@ export default {
// 选择谷歌账号 // 选择谷歌账号
choseGego(e) { choseGego(e) {
this.IndexForm.g_author = e.author_id; this.userIndexForm.g_author = e.author_id;
this.IndexForm.g_website = e.link; this.userIndexForm.website = e.link;
}, },
// 指数颜色 // 指数颜色
@@ -1451,6 +1814,40 @@ export default {
} }
return str; return str;
}, },
colorIndex1(num, time) {
let str = '';
if (num < 10) {
str = '<b style="color:#cb160a">' + num + '</b>';
} else if (num < 15) {
str = '<b style="color:#cbb504">' + num + '</b>';
} else {
str = '<b style="color:#0cbc15">' + num + '</b>';
}
if (time == 0) {
str = '<b style="color:#aaa;">0 </b>';
}
return str;
},
colorIndex2(time) {
if (time != 0) {
let date = new Date(parseInt(time * 1000));
let Y = date.getFullYear() + '-';
let M = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) + '-' : date.getMonth() + 1 + '-';
let D = date.getDate() < 10 ? '0' + date.getDate() : date.getDate();
let H = date.getHours() < 10 ? '0' + date.getHours() + ':' : date.getHours() + ':';
let U = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes();
time = Y + M + D;
}
let str = '';
str = '<span style="color:#aaa;font-size:14px;margin-left:5px;"> ' + time + '</span>';
if (time == 0) {
str = '<span style="color:#aaa;font-size:14px;margin-left:5px;">(No time)</span>';
}
return str;
},
// 下拉身份 // 下拉身份
chan_role(e) { chan_role(e) {
@@ -2151,4 +2548,21 @@ export default {
color: #006699 !important; color: #006699 !important;
padding: 3px !important; padding: 3px !important;
} }
.userIndexBox .s_rol {
width: 29%;
height: 300px;
}
.userIndexBox h3 {
color: rgb(0, 102, 153);
letter-spacing: 1px;
}
.userIndexBox .rol_mess {
text-align: left;
padding-top: 10px !important;
padding-bottom: 0 !important;
}
.userIndexBox .s_rol > div.rol_mess > font {
width: auto;
}
</style> </style>