This commit is contained in:
xulu
2021-08-31 09:19:27 +08:00
parent 95f5b46be8
commit 0e0fb27136
28 changed files with 4969 additions and 2585 deletions

View File

@@ -1,258 +1,325 @@
<template>
<div class="header">
<!-- 折叠按钮 -->
<div class="collapse-btn" @click="collapseChage">
<i v-if="!collapse" class="el-icon-s-fold"></i>
<i v-else class="el-icon-s-unfold"></i>
</div>
<div class="logo">
<img src="../../assets/img/logo.png" />
{{ $t('system.title') }}
</div>
<div class="header-right">
<div class="header-user-con">
<div class="changelang">
<el-dropdown trigger="click" @command="chengelang">
<span class="el-dropdown-link">
language
<i class="el-icon-arrow-down el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="en">english</el-dropdown-item>
<el-dropdown-item command="zh">中文简体</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
<!-- 全屏显示 -->
<div class="btn-fullscreen" @click="handleFullScreen">
<el-tooltip effect="dark" :content="fullscreen ? $t('system.noscreen') : $t('system.screen')" placement="bottom">
<i class="el-icon-rank"></i>
</el-tooltip>
</div>
<!-- 消息中心 -->
<div class="header">
<!-- 折叠按钮 -->
<div class="collapse-btn" @click="collapseChage">
<i v-if="!collapse" class="el-icon-s-fold"></i>
<i v-else class="el-icon-s-unfold"></i>
</div>
<div class="logo">
<img src="../../assets/img/logo.png" />
{{ $t('system.title') }}
</div>
<div class="header-right">
<div class="header-user-con">
<div class="changelang">
<el-dropdown trigger="click" @command="chengelang">
<span class="el-dropdown-link">
language
<i class="el-icon-arrow-down el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="en">english</el-dropdown-item>
<el-dropdown-item command="zh">中文简体</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
<!-- 全屏显示 -->
<div class="btn-fullscreen" @click="handleFullScreen">
<el-tooltip effect="dark" :content="fullscreen ? $t('system.noscreen') : $t('system.screen')" placement="bottom">
<i class="el-icon-rank"></i>
</el-tooltip>
</div>
<!-- 消息中心 -->
<!-- 身份切换 -->
<span style="font-size: 14px;margin-right: 8px;" v-if="this.user_cap.includes('author')">View as :</span>
<el-dropdown class="link_role" trigger="click" v-if="this.user_cap.includes('author')">
<span style="color: #fff;cursor: pointer;">
Author<i class="el-icon-arrow-down el-icon--right"></i>
</span>
<el-dropdown-menu :default-active="onRoutes" router slot="dropdown" style="cursor: pointer;">
<router-link :to="{path:'/dashboard'}">
<el-dropdown-item>Author</el-dropdown-item>
</router-link>
<router-link :to="{path:'/managing'}" v-if="this.user_cap.includes('chief')">
<el-dropdown-item>Editor-in-Chief</el-dropdown-item>
</router-link>
<router-link :to="{path:'/editorial'}" v-if="this.user_cap.includes('board')">
<el-dropdown-item>Editorial board member</el-dropdown-item>
</router-link>
<router-link :to="{path:'/peerewer'}" v-if="this.user_cap.includes('reviewer')">
<el-dropdown-item>Reviewer</el-dropdown-item>
</router-link>
<!-- <router-link :to="{path:'/youthed'}" v-if="this.user_cap.includes('yboard')">
<el-dropdown-item>Young scientist member</el-dropdown-item>
</router-link> -->
</el-dropdown-menu>
</el-dropdown>
<!-- 用户头像 -->
<div class="user-avator" @click="skip_link()" v-if="hasorcie">
<el-tooltip class="item" effect="light" content="Link to Orcid" placement="bottom-end">
<img src="../../assets/img/orcid.png" />
</el-tooltip>
</div>
<div class="user-avator" @click="skip_check()" v-else>
<el-tooltip class="item" effect="light" content="Connect to ORCID" placement="bottom-end">
<img src="../../assets/img/orcno.png" />
</el-tooltip>
</div>
<!-- 用户名下拉菜单 -->
<el-dropdown class="user-name" trigger="click" @command="handleCommand">
<span class="el-dropdown-link">
{{ username }}
<i class="el-icon-caret-bottom"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item divided command="loginout">{{ $t('system.loyout') }}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</div>
</div>
<!-- 用户头像 -->
<div class="user-avator" @click="skip_link()" v-if="hasorcie">
<el-tooltip class="item" effect="light" content="Link to Orcid" placement="bottom-end">
<img src="../../assets/img/orcid.png" />
</el-tooltip>
</div>
<div class="user-avator" @click="skip_check()" v-else>
<el-tooltip class="item" effect="light" content="Connect to ORCID" placement="bottom-end">
<img src="../../assets/img/orcno.png" />
</el-tooltip>
</div>
<!-- 用户名下拉菜单 -->
<el-dropdown class="user-name" trigger="click" @command="handleCommand">
<span class="el-dropdown-link">
{{ username }}
<i class="el-icon-caret-bottom"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item divided command="loginout">{{ $t('system.loyout') }}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</div>
</div>
</template>
<script>
import bus from '../common/bus';
export default {
data() {
return {
collapse: false,
fullscreen: false,
name: 'unknown user',
message: 2,
hasorcie: false,
orcid: '',
orcidLink:
'https://orcid.org/oauth/authorize?client_id=APP-PKF0BGRP6DWM6FUB&response_type=code&scope=/authenticate&redirect_uri=https://submission.tmrjournals.com/orcidBind',
langArr: [
{ value: 'zh', label: '中文' },
{ value: 'en', label: 'English' }
]
};
},
created() {
this.initORCID();
},
computed: {
username() {
let username = localStorage.getItem('U_name');
return username ? username : this.name;
},
userrole() {
let userrole = localStorage.getItem('U_status');
if (userrole == 1) {
return this.$t('total.author');
} else if (userrole == 2) {
return this.$t('total.editor');
} else if (userrole == 'admin') {
return this.$t('total.admin');
} else {
return this.$t('total.reviewers');
}
}
},
methods: {
// 用户名下拉菜单选择事件
handleCommand(command) {
if (command == 'loginout') {
localStorage.removeItem('U_name');
localStorage.removeItem('U_status');
this.$router.push('/login');
}
},
// 侧边栏折叠
collapseChage() {
this.collapse = !this.collapse;
bus.$emit('collapse', this.collapse);
},
//判断orcid
initORCID() {
this.$api
.post('api/user/checkOrcid', { account: localStorage.getItem('U_name') })
.then((res) => {
this.hasorcie = res.userinfo.orcid == '' ? false : true;
this.orcid = res.userinfo.orcid;
})
.catch((err) => {
console.log(err);
});
},
// 全屏事件
handleFullScreen() {
let element = document.documentElement;
if (this.fullscreen) {
if (document.exitFullscreen) {
document.exitFullscreen();
} else if (document.webkitCancelFullScreen) {
document.webkitCancelFullScreen();
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if (document.msExitFullscreen) {
document.msExitFullscreen();
}
} else {
if (element.requestFullscreen) {
element.requestFullscreen();
} else if (element.webkitRequestFullScreen) {
element.webkitRequestFullScreen();
} else if (element.mozRequestFullScreen) {
element.mozRequestFullScreen();
} else if (element.msRequestFullscreen) {
// IE11
element.msRequestFullscreen();
}
}
this.fullscreen = !this.fullscreen;
},
//切换语言
chengelang(commond) {
localStorage.setItem('langs', commond);
this.$router.go(0);
},
skip_link() {
location.href = 'https://orcid.org/'+this.orcid;
},
skip_check(){
location.href = this.orcidLink;
}
},
mounted() {
if (document.body.clientWidth < 1000) {
this.collapseChage();
}
}
};
import bus from '../common/bus';
export default {
data() {
return {
collapse: false,
fullscreen: false,
name: 'unknown user',
message: 2,
hasorcie: false,
link_path: '',
user_cap: localStorage.getItem('U_role'),
orcid: '',
orcidLink: 'https://orcid.org/oauth/authorize?client_id=APP-PKF0BGRP6DWM6FUB&response_type=code&scope=/authenticate&redirect_uri=https://submission.tmrjournals.com/orcidBind',
langArr: [{
value: 'zh',
label: '中文'
},
{
value: 'en',
label: 'English'
}
]
};
},
created() {
this.initORCID();
},
computed: {
username() {
let username = localStorage.getItem('U_name');
return username ? username : this.name;
},
onRoutes() {
0
return this.$route.path.replace('/', '');
},
userrole() {
let userrole = localStorage.getItem('U_status');
if (userrole == 1) {
return this.$t('total.author');
} else if (userrole == 2) {
return this.$t('total.editor');
} else if (userrole == 'admin') {
return this.$t('total.admin');
} else {
return this.$t('total.reviewers');
}
}
},
methods: {
// 用户名下拉菜单选择事件
handleCommand(command) {
if (command == 'loginout') {
localStorage.removeItem('U_role');
localStorage.removeItem('U_id');
localStorage.removeItem('U_name');
localStorage.removeItem('U_status');
localStorage.removeItem('journal_id');
localStorage.removeItem('journal_title');
this.$router.push('/login');
}
},
// 侧边栏折叠
collapseChage() {
this.collapse = !this.collapse;
bus.$emit('collapse', this.collapse);
},
//判断orcid
initORCID() {
this.$api
.post('api/user/checkOrcid', {
account: localStorage.getItem('U_name')
})
.then((res) => {
this.hasorcie = res.userinfo.orcid == '' ? false : true;
this.orcid = res.userinfo.orcid;
})
.catch((err) => {
console.log(err);
});
},
// 全屏事件
handleFullScreen() {
let element = document.documentElement;
if (this.fullscreen) {
if (document.exitFullscreen) {
document.exitFullscreen();
} else if (document.webkitCancelFullScreen) {
document.webkitCancelFullScreen();
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if (document.msExitFullscreen) {
document.msExitFullscreen();
}
} else {
if (element.requestFullscreen) {
element.requestFullscreen();
} else if (element.webkitRequestFullScreen) {
element.webkitRequestFullScreen();
} else if (element.mozRequestFullScreen) {
element.mozRequestFullScreen();
} else if (element.msRequestFullscreen) {
// IE11
element.msRequestFullscreen();
}
}
this.fullscreen = !this.fullscreen;
},
//切换语言
chengelang(commond) {
localStorage.setItem('langs', commond);
this.$router.go(0);
},
skip_link() {
location.href = 'https://orcid.org/' + this.orcid;
},
skip_check() {
location.href = this.orcidLink;
}
},
mounted() {
if (document.body.clientWidth < 1000) {
this.collapseChage();
}
},
watch: {
$route: {
handler: function(route) {
this.link_path = route.path
},
immediate: true
}
}
};
</script>
<style scoped>
.header {
position: relative;
box-sizing: border-box;
width: 100%;
height: 70px;
font-size: 22px;
color: #fff;
}
.collapse-btn {
float: left;
padding: 0 21px;
cursor: pointer;
line-height: 70px;
}
.header .logo {
float: left;
width: 350px;
vertical-align: middle;
line-height: 70px;
}
.header .logo img {
width: 90px;
height: 25px;
vertical-align: middle;
}
.header-right {
float: right;
padding-right: 50px;
}
.header-user-con {
display: flex;
height: 70px;
align-items: center;
}
.btn-fullscreen {
transform: rotate(45deg);
margin-right: 5px;
font-size: 24px;
}
.changelang {
position: relative;
width: 90px;
height: 30px;
}
.btn-fullscreen {
position: relative;
width: 30px;
height: 30px;
text-align: center;
border-radius: 15px;
cursor: pointer;
}
.btn-bell-badge {
position: absolute;
right: 0;
top: -2px;
width: 8px;
height: 8px;
border-radius: 4px;
background: #f56c6c;
color: #fff;
}
.btn-bell .el-icon-bell {
color: #fff;
}
.user-name {
margin-left: 10px;
}
.user-avator {
margin-left: 20px;
}
.user-avator img {
display: block;
width: 20px;
height: 20px;
}
.el-dropdown-link {
color: #fff;
cursor: pointer;
}
.el-dropdown-menu__item {
text-align: center;
}
#colgreen {
color: rgb(142, 150, 74);
}
.header {
position: relative;
box-sizing: border-box;
width: 100%;
height: 70px;
font-size: 22px;
color: #fff;
}
.collapse-btn {
float: left;
padding: 0 21px;
cursor: pointer;
line-height: 70px;
}
.header .logo {
float: left;
width: 350px;
vertical-align: middle;
line-height: 70px;
}
.header .logo img {
width: 90px;
height: 25px;
vertical-align: middle;
}
.header-right {
float: right;
padding-right: 50px;
}
.header-user-con {
display: flex;
height: 70px;
align-items: center;
}
.btn-fullscreen {
transform: rotate(45deg);
margin-right: 5px;
font-size: 24px;
}
.changelang {
position: relative;
width: 90px;
height: 30px;
}
.btn-fullscreen {
position: relative;
width: 30px;
height: 30px;
text-align: center;
border-radius: 15px;
cursor: pointer;
}
.btn-bell-badge {
position: absolute;
right: 0;
top: -2px;
width: 8px;
height: 8px;
border-radius: 4px;
background: #f56c6c;
color: #fff;
}
.btn-bell .el-icon-bell {
color: #fff;
}
.user-name {
margin-left: 10px;
}
.user-avator {
margin-left: 20px;
}
.user-avator img {
display: block;
width: 20px;
height: 20px;
}
.el-dropdown-link {
color: #fff;
cursor: pointer;
}
.el-dropdown-menu__item {
text-align: center;
}
#colgreen {
color: rgb(142, 150, 74);
}
</style>

View File

@@ -3,33 +3,31 @@
<div>
<div class="logo">
<img src="../../assets/img/bit_bug.png" alt="" style="width: 80px;margin-right: 10px;">
<!-- <span style="color:#1c66c0" v-if="this.link_path == '/managing'">Chief editor</span>
<span style="color:#e26a2d" v-if="this.link_path == '/editorial'">Editorial board</span>
<span style="color:#4640c4" v-if="this.link_path == '/peerewer'">Reviewer</span>
<span style="color:#cc3646" v-if="this.link_path == '/youthed'">Youth editorial board</span> -->
<span v-if="this.link_path == '/managing' || this.link_path == '/man_text'">Chief editor :</span>
<span v-if="this.link_path == '/editorial'">Editorial board :</span>
<span v-if="this.link_path == '/peerewer'">Reviewer :</span>
<span v-if="this.link_path == '/youthed'">Youth editorial board :</span>
<!-- <span v-if="this.link_path == '/managing'">主编 :</span>
<span v-if="this.link_path == '/editorial'">编委 :</span>
<span v-if="this.link_path == '/peerewer'">审稿人 :</span>
<span v-if="this.link_path == '/youthed'">青年编委 :</span> -->
{{user_name}}
</div>
<div class="group">
Window for manucripts <br/>of Traditional Medicine Research
</div>
<div class="header-right">
<div style="font-size: 18px;text-align: right;">
<!-- <span style="color:#1c66c0" v-if="this.link_path == '/managing'">Chief editor</span>
<span style="color:#e26a2d" v-if="this.link_path == '/editorial'">Editorial board</span>
<span style="color:#4640c4" v-if="this.link_path == '/peerewer'">Reviewer</span>
<span style="color:#cc3646" v-if="this.link_path == '/youthed'">Youth editorial board</span> -->
<span v-if="this.link_path == '/managing' || this.link_path == '/man_text'">Editor-in-Chief :</span>
<span v-if="this.link_path == '/editorial' || this.link_path == '/edit_text'">Editorial board member :</span>
<span v-if="this.link_path == '/peerewer' || this.link_path == '/per_text'">Reviewer :</span>
<!-- <span v-if="this.link_path == '/youthed'">Young scientist member :</span> -->
<b style="margin-left: 5px;">{{user_name}}</b>
</div>
<div class="header-user-con">
<!-- 身份切换 -->
<el-dropdown class="link_role" trigger="click">
<span>
View as :
<span v-if="this.link_path == '/managing' || this.link_path == '/man_text'">Chief editor</span>
<span v-if="this.link_path == '/editorial'">Editorial board</span>
<span v-if="this.link_path == '/peerewer'">Reviewer</span>
<span v-if="this.link_path == '/youthed'">Youth editorial board</span>
<span v-if="this.link_path == '/managing' || this.link_path == '/man_text'">Editor-in-Chief</span>
<span v-if="this.link_path == '/editorial' || this.link_path == '/edit_text'">Editorial board member</span>
<span v-if="this.link_path == '/peerewer' || this.link_path == '/per_text'">Reviewer</span>
<!-- <span v-if="this.link_path == '/youthed'">Young scientist member</span> -->
<i class="el-icon-arrow-down el-icon--right"></i>
</span>
<el-dropdown-menu :default-active="onRoutes" router slot="dropdown">
@@ -37,17 +35,17 @@
<el-dropdown-item>Author</el-dropdown-item>
</router-link>
<router-link :to="{path:'/managing'}" v-if="this.user_cap.includes('chief')">
<el-dropdown-item>Chief editor</el-dropdown-item>
<el-dropdown-item>Editor-in-Chief</el-dropdown-item>
</router-link>
<router-link :to="{path:'/editorial'}" v-if="this.user_cap.includes('board')">
<el-dropdown-item>Editorial board</el-dropdown-item>
<el-dropdown-item>Editorial board member</el-dropdown-item>
</router-link>
<router-link :to="{path:'/peerewer'}" v-if="this.user_cap.includes('reviewer')">
<el-dropdown-item>Reviewer</el-dropdown-item>
</router-link>
<router-link :to="{path:'/youthed'}" v-if="this.user_cap.includes('yboard')">
<el-dropdown-item>Youth editorial board</el-dropdown-item>
</router-link>
<!-- <router-link :to="{path:'/youthed'}" v-if="this.user_cap.includes('yboard')">
<el-dropdown-item>Young scientist member</el-dropdown-item>
</router-link> -->
</el-dropdown-menu>
</el-dropdown>
@@ -73,7 +71,7 @@
user_id: localStorage.getItem('U_id')
},
link_path: '',
user_name: localStorage.getItem('U_name'),
user_name: localStorage.getItem('U_relname'),
user_cap: localStorage.getItem('U_role'),
cate_role: []
@@ -161,7 +159,9 @@
margin-top: 20px;
}
.header-user-con {}
.header-user-con {
text-align: right;
}
.link_role {
font-weight: bold;

View File

@@ -1,299 +1,274 @@
<template>
<div class="sidebar">
<el-menu
class="sidebar-el-menu"
:default-active="onRoutes"
:collapse="collapse"
background-color="#324157"
text-color="#bfcbd9"
active-text-color="#20a0ff"
unique-opened
router
>
<template v-for="item in items">
<template v-if="item.subs">
<el-submenu :index="item.index" :key="item.index">
<template slot="title">
<i :class="item.icon"></i>
<span slot="title">{{ item.title }}</span>
</template>
<template v-for="subItem in item.subs">
<el-submenu
v-if="subItem.subs"
:index="subItem.index"
:key="subItem.index"
>
<template slot="title">{{ subItem.title }}</template>
<el-menu-item
v-for="(threeItem,i) in subItem.subs"
:key="i"
:index="threeItem.index"
>{{ threeItem.title }}</el-menu-item>
</el-submenu>
<el-menu-item
v-else
:index="subItem.index"
:key="subItem.index"
>{{ subItem.title }}</el-menu-item>
</template>
</el-submenu>
</template>
<template v-else>
<el-menu-item :index="item.index" :key="item.index">
<i :class="item.icon"></i>
<span slot="title">{{ item.title }}</span>
</el-menu-item>
</template>
</template>
</el-menu>
</div>
<div class="sidebar">
<el-menu class="sidebar-el-menu" :default-active="onRoutes" :collapse="collapse" background-color="#324157"
text-color="#bfcbd9" active-text-color="#20a0ff" unique-opened router>
<template v-for="item in items">
<template v-if="item.subs">
<el-submenu :index="item.index" :key="item.index">
<template slot="title">
<i :class="item.icon"></i>
<span slot="title">{{ item.title }}</span>
</template>
<template v-for="subItem in item.subs">
<el-submenu v-if="subItem.subs" :index="subItem.index" :key="subItem.index">
<template slot="title">{{ subItem.title }}</template>
<el-menu-item v-for="(threeItem,i) in subItem.subs" :key="i" :index="threeItem.index">{{ threeItem.title }}</el-menu-item>
</el-submenu>
<el-menu-item v-else :index="subItem.index" :key="subItem.index">{{ subItem.title }}</el-menu-item>
</template>
</el-submenu>
</template>
<template v-else>
<el-menu-item :index="item.index" :key="item.index">
<i :class="item.icon"></i>
<span slot="title">{{ item.title }}</span>
</el-menu-item>
</template>
</template>
</el-menu>
</div>
</template>
<script>
import bus from '../common/bus';
export default {
data() {
return {
collapse: false,
userrole:localStorage.getItem('U_status'),
items:[],
author_items: [
{
icon: 'el-icon-lx-home',
index: 'dashboard',
title: this.$t('sidebar.main')
},
{
icon: 'el-icon-lx-cascades',
index: '1',
title: this.$t('sidebar.author'),
subs:[
{
index:'articleList',
title:this.$t('sidebar.author1')
},
{
index:'articleAdd',
title:this.$t('sidebar.author2')
}
]
}
// {
// icon: 'el-icon-user',
// index: '2',
// title: this.$t('sidebar.reviewerArticle'),
// subs:[
// {
// index:'authorApplyReviewer',
// title:this.$t('sidebar.authorApplyReviewer')
// }
// ]
// }
],
editor_items:[
{
icon: 'el-icon-lx-home',
index: 'dashboard',
title: this.$t('sidebar.main')
},
{
icon: 'el-icon-lx-copy',
index: '2',
title: this.$t('sidebar.editor'),
subs:[
{
index:'articleListEditor',
title:this.$t('sidebar.editor1')
}
]
},
{
icon:'el-icon-paperclip',
index:'4',
title:this.$t('sidebar.editmber'),
subs:[
{
index:'editmbereditor',
title:this.$t('sidebar.editmber1')
}
]
},
{
icon:'el-icon-s-custom',
index:'3',
title:this.$t('sidebar.reviewer'),
subs:[
{
index:'reviewerApplyList',
title:this.$t('sidebar.reviewer1')
},
{
index:'reviewerList',
title:this.$t('sidebar.reviewer2')
},
{
index:'reviewerImport',
title:this.$t('sidebar.reviewer3')
}
]
}
],
admin_items:[
{
icon: 'el-icon-lx-home',
index: 'dashboard',
title: this.$t('sidebar.main')
},
{
icon: 'el-icon-user',
index: '2',
title: this.$t('sidebar.editormanage'),
subs:[
{
index:'editorList',
title:this.$t('sidebar.editormanage1')
},
{
index:'editorAdd',
title:this.$t('sidebar.editormanage2')
}
]
},
{
icon:'el-icon-notebook-1',
index:'3',
title:this.$t('sidebar.journal'),
subs:[
{
index:'journalList',
title:this.$t('sidebar.journal1')
},
{
index:'journalAdd',
title:this.$t('sidebar.journal2')
}
]
},
{
icon:'el-icon-search',
index:'4',
title:this.$t('sidebar.monitor'),
subs:[
{
index:'monitorManuscript',
title:this.$t('sidebar.monitor1')
},
]
import bus from '../common/bus';
export default {
data() {
return {
collapse: false,
userrole: localStorage.getItem('U_status'),
user_cap: localStorage.getItem('U_role'),
items: [],
author_items: [{
icon: 'el-icon-lx-home',
index: 'dashboard',
title: this.$t('sidebar.main')
},
{
icon: 'el-icon-lx-cascades',
index: '1',
title: this.$t('sidebar.author'),
subs: [{
index: 'articleList',
title: this.$t('sidebar.author1')
},
{
index: 'articleAdd',
title: this.$t('sidebar.author2')
},
{
index: 'authorApplyReviewer',
title: this.$t('sidebar.authorApplyReviewer')
}
]
}
// {
// icon: 'el-icon-user',
// index: '2',
// title: this.$t('sidebar.reviewerArticle'),
// subs:[
// {
// index:'authorApplyReviewer',
// title:this.$t('sidebar.authorApplyReviewer')
// }
// ]
// }
],
editor_items: [{
icon: 'el-icon-lx-home',
index: 'dashboard',
title: this.$t('sidebar.main')
},
{
icon: 'el-icon-lx-copy',
index: '2',
title: this.$t('sidebar.editor'),
subs: [{
index: 'articleListEditor',
title: this.$t('sidebar.editor1')
}]
},
{
icon: 'el-icon-paperclip',
index: '4',
title: this.$t('sidebar.editmber'),
subs: [{
index: 'editmbereditor',
title: this.$t('sidebar.editmber1')
}, {
index: 'editmbereditormoshi',
title: this.$t('sidebar.editmber2')
}, ]
},
{
icon: 'el-icon-s-custom',
index: '3',
title: this.$t('sidebar.reviewer'),
subs: [{
index: 'reviewerApplyList',
title: this.$t('sidebar.reviewer1')
},
{
index: 'reviewerList',
title: this.$t('sidebar.reviewer2')
},
{
index: 'reviewerImport',
title: this.$t('sidebar.reviewer3')
}
]
}
],
admin_items: [{
icon: 'el-icon-lx-home',
index: 'dashboard',
title: this.$t('sidebar.main')
},
{
icon: 'el-icon-connection',
index: '5',
title: this.$t('sidebar.chief'),
subs: [{
index: 'chiefeditor',
title: this.$t('sidebar.chief1')
}
// {
// index: 'chiefperiod',
// title: this.$t('sidebar.chief2')
// }
]
},
{
icon: 'el-icon-user',
index: '2',
title: this.$t('sidebar.editormanage'),
subs: [{
index: 'editorList',
title: this.$t('sidebar.editormanage1')
},
{
index: 'editorAdd',
title: this.$t('sidebar.editormanage2')
}
]
},
{
icon: 'el-icon-notebook-1',
index: '3',
title: this.$t('sidebar.journal'),
subs: [{
index: 'journalList',
title: this.$t('sidebar.journal1')
},
{
index: 'journalAdd',
title: this.$t('sidebar.journal2')
}
]
},
{
icon: 'el-icon-search',
index: '4',
title: this.$t('sidebar.monitor'),
subs: [{
index: 'monitorManuscript',
title: this.$t('sidebar.monitor1')
}, ]
},
{
icon:'el-icon-connection',
index:'5',
title:this.$t('sidebar.chief'),
subs:[
{
index:'chiefeditor',
title:this.$t('sidebar.chief1')
},
{
index:'chiefperiod',
title:this.$t('sidebar.chief2')
}
]
}
// {
// icon:'el-icon-user-solid',
// index:'4',
// title:this.$t('sidebar.reviewer'),
// subs:[
// {
// index:'adminImportReviewer',
// title:this.$t('sidebar.reviewerimport')
// },
// {
// index:'adminImportreviewerError',
// title:this.$t('sidebar.reviewerimporterror')
// }
// ]
// }
],
reviewer_items:[
{
icon: 'el-icon-lx-home',
index: 'dashboard',
title: this.$t('sidebar.main')
},
{
icon: 'el-icon-lx-cascades',
index: '1',
title: this.$t('sidebar.author'),
subs:[
{
index:'articleList',
title:this.$t('sidebar.author1')
},
{
index:'articleAdd',
title:this.$t('sidebar.author2')
}
]
},
{
icon: 'el-icon-user',
index: '2',
title: this.$t('sidebar.reviewerArticle'),
subs:[
{
index:'reviewerArticleList',
title:this.$t('sidebar.reviewerArticle1')
}
]
}
}
// {
// icon:'el-icon-user-solid',
// index:'4',
// title:this.$t('sidebar.reviewer'),
// subs:[
// {
// index:'adminImportReviewer',
// title:this.$t('sidebar.reviewerimport')
// },
// {
// index:'adminImportreviewerError',
// title:this.$t('sidebar.reviewerimporterror')
// }
// ]
// }
],
reviewer_items: [{
icon: 'el-icon-lx-home',
index: 'dashboard',
title: this.$t('sidebar.main')
},
{
icon: 'el-icon-lx-cascades',
index: '1',
title: this.$t('sidebar.author'),
subs: [{
index: 'articleList',
title: this.$t('sidebar.author1')
},
{
index: 'articleAdd',
title: this.$t('sidebar.author2')
}
]
},
{
icon: 'el-icon-user',
index: '2',
title: this.$t('sidebar.reviewerArticle'),
subs: [{
index: 'reviewerArticleList',
title: this.$t('sidebar.reviewerArticle1')
}]
}
]
};
},
computed: {
onRoutes() {
return this.$route.path.replace('/', '');
}
},
created() {
if(this.userrole==2){ //其余的身份(显示作者)
this.items = this.author_items;
}else if(this.userrole ==1){ //编辑
this.items = this.editor_items;
}else if(this.userrole==0){ //超级管理员
this.items = this.admin_items;
}
// else if(this.userrole=='reviewer'){
// this.items = this.reviewer_items;
// }
// 通过 Event Bus 进行组件间通信,来折叠侧边栏
bus.$on('collapse', msg => {
this.collapse = msg;
bus.$emit('collapse-content', msg);
});
}
};
]
};
},
computed: {
onRoutes() {
return this.$route.path.replace('/', '');
}
},
created() {
if (this.userrole == 2 && this.user_cap.includes('reviewer')) { //审稿人
this.items = this.reviewer_items;
} else if (this.userrole == 2) { //其余的身份(显示作者)
this.items = this.author_items;
} else if (this.userrole == 1) { //编辑
this.items = this.editor_items;
} else if (this.userrole == 0) { //超级管理员
this.items = this.admin_items;
}
// else if(this.userrole=='reviewer'){
// this.items = this.reviewer_items;
// }
// 通过 Event Bus 进行组件间通信,来折叠侧边栏
bus.$on('collapse', msg => {
this.collapse = msg;
bus.$emit('collapse-content', msg);
});
}
};
</script>
<style scoped>
.sidebar {
display: block;
position: absolute;
left: 0;
top: 70px;
bottom: 0;
overflow-y: scroll;
}
.sidebar::-webkit-scrollbar {
width: 0;
}
.sidebar-el-menu:not(.el-menu--collapse) {
width: 250px;
}
.sidebar > ul {
height: 100%;
}
.sidebar {
display: block;
position: absolute;
left: 0;
top: 70px;
bottom: 0;
overflow-y: scroll;
}
.sidebar::-webkit-scrollbar {
width: 0;
}
.sidebar-el-menu:not(.el-menu--collapse) {
width: 250px;
}
.sidebar>ul {
height: 100%;
}
</style>

View File

@@ -3,7 +3,7 @@ const en = {
system: {
title: 'Submission System',
repassword: 'Forgot your password?',
register: 'Not registered yet? Register now.',
register: 'Register',
orcidlogin: 'Login with your ORCID iD',
login: 'Log in',
forgetpwd: 'Find Your Password',
@@ -51,7 +51,7 @@ const en = {
chief2: 'Journal list',
editmber: 'Editorial management',
editmber1: 'Editorial board list',
editmber2: 'Journal List'
editmber2: 'Matching pattern'
},
home: {
authortop: 'Author guide',

View File

@@ -51,7 +51,7 @@ const zh = {
chief2: '期刊列表',
editmber: '编委管理',
editmber1: '编委列表',
editmber2: '期刊列表'
editmber2: '编委匹配'
},
home: {
authortop: '用户指南',