修改期刊计数总量

This commit is contained in:
2024-03-14 15:28:23 +08:00
parent e0ad4c4c96
commit ed2874252a
9 changed files with 1977 additions and 1926 deletions

2258
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -32,6 +32,7 @@
"devDependencies": {
"@vue/cli-plugin-babel": "^3.9.0",
"@vue/cli-service": "^3.9.0",
"sass-loader": "^7.3.1",
"vue-template-compiler": "^2.6.10"
}
}

View File

@@ -16,8 +16,8 @@ axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded
//
const service = axios.create({
// baseURL: 'http://testtougao.tmrjournals.com/public/index.php/',
baseURL: 'http://www.tougao.com/',
// baseURL: '/',
// baseURL: 'http://www.tougao.com/', //测试本地 记得切换
baseURL: '/', //正式
});
const service_new = axios.create({

View File

@@ -1,7 +1,16 @@
<template>
<div class="sidebar">
<el-menu class="sidebar-el-menu" :default-active="onRoutes" :collapse="collapse" background-color="#006699"
text-color="#fff" active-text-color="#fff" unique-opened router>
<el-menu
class="sidebar-el-menu"
:default-active="onRoutes"
:collapse="collapse"
background-color="#006699"
text-color="#fff"
active-text-color="#fff"
unique-opened
router
>
<template v-for="item in items">
<template v-if="item.subs">
<el-submenu :index="item.index" :key="item.index">
@@ -19,8 +28,7 @@
{{ threeItem.title }}
</el-menu-item>
</el-submenu>
<el-menu-item v-else :index="subItem.index" :key="subItem.index">{{ subItem.title }}
</el-menu-item>
<el-menu-item v-else :index="subItem.index" :key="subItem.index">{{ subItem.title }} </el-menu-item>
</template>
</el-submenu>
</template>
@@ -34,9 +42,7 @@
<!-- 审稿人 -->
<template v-if="this.user_cap.includes('reviewer')">
<el-submenu index="8">
<template slot="title">
<i class="el-icon-collection"></i> {{$t('sidebar.rev_ewer')}}
</template>
<template slot="title"> <i class="el-icon-collection"></i> {{ $t('sidebar.rev_ewer') }} </template>
<el-menu-item index="peerewer">
{{ $t('sidebar.rev_ewer1') }}
</el-menu-item>
@@ -48,9 +54,7 @@
<!-- 编委 -->
<template v-if="this.user_cap.includes(',board')">
<el-submenu index="7">
<template slot="title">
<i class="el-icon-notebook-1"></i> {{$t('sidebar.edit_oria')}}
</template>
<template slot="title"> <i class="el-icon-notebook-1"></i> {{ $t('sidebar.edit_oria') }} </template>
<el-menu-item index="editorial">
{{ $t('sidebar.edit_oria1') }}
</el-menu-item>
@@ -62,9 +66,7 @@
<!-- 主编 -->
<template v-if="this.user_cap.includes('chief')">
<el-submenu index="6">
<template slot="title">
<i class="el-icon-document-copy"></i> {{$t('sidebar.man_ing')}}
</template>
<template slot="title"> <i class="el-icon-document-copy"></i> {{ $t('sidebar.man_ing') }} </template>
<el-menu-item index="managing">
{{ $t('sidebar.man_ing1') }}
</el-menu-item>
@@ -77,9 +79,7 @@
<span slot="title"> {{$t('sidebar.document')}}</span>
</el-menu-item> -->
<el-submenu index="10">
<template slot="title">
<i class="el-icon-data-analysis"></i> {{$t('sidebar.analyp')}}
</template>
<template slot="title"> <i class="el-icon-data-analysis"></i> {{ $t('sidebar.analyp') }} </template>
<el-menu-item index="citationanalysis">
{{ $t('sidebar.analysis') }}
</el-menu-item>
@@ -88,9 +88,7 @@
<!-- 青年编委 -->
<template v-if="this.user_cap.includes('yboard')">
<el-submenu index="9">
<template slot="title">
<i class="el-icon-copy-document"></i> {{$t('sidebar.you_thed')}}
</template>
<template slot="title"> <i class="el-icon-copy-document"></i> {{ $t('sidebar.you_thed') }} </template>
<el-menu-item index="youthed">
{{ $t('sidebar.you_thed1') }}
</el-menu-item>
@@ -99,9 +97,7 @@
<!-- 客座编辑 -->
<template v-if="this.user_cap.includes('special')">
<el-submenu index="11">
<template slot="title">
<i class="el-icon-box"></i> {{$t('sidebar.guest')}}
</template>
<template slot="title"> <i class="el-icon-box"></i> {{ $t('sidebar.guest') }} </template>
<el-menu-item index="guestArticleL">
{{ $t('sidebar.guest1') }}
</el-menu-item>
@@ -113,17 +109,13 @@
<!-- 超管总经理+总监 -->
<template v-if="this.user_cap.includes('superadmin')">
<el-submenu index="12">
<template slot="title">
<i class="el-icon-s-operation"></i> {{$t('sidebar.managingDirector')}}
</template>
<template slot="title"> <i class="el-icon-s-operation"></i> {{ $t('sidebar.managingDirector') }} </template>
<!-- <el-menu-item index="youthed">
{{$t('sidebar.you_thed1')}}
</el-menu-item> -->
</el-submenu>
<el-submenu index="13">
<template slot="title">
<i class="el-icon-s-platform"></i> {{$t('sidebar.chiefInspector')}}
</template>
<template slot="title"> <i class="el-icon-s-platform"></i> {{ $t('sidebar.chiefInspector') }} </template>
<el-menu-item index="editorialBoard">
{{ $t('sidebar.editorialBoard1') }}
</el-menu-item>
@@ -133,14 +125,15 @@
<el-menu-item index="superJournalsManagement">
{{ $t('sidebar.editorialBoard3') }}
</el-menu-item>
<el-menu-item index="journalArticleCount">
{{ $t('sidebar.journalArticleCount') }}
</el-menu-item>
</el-submenu>
</template>
<!-- 主编/总监统计图 -->
<template v-if="this.userrole == 0">
<el-submenu index="8">
<template slot="title">
<i class="el-icon-data-analysis"></i> {{$t('sidebar.analyp')}}
</template>
<template slot="title"> <i class="el-icon-data-analysis"></i> {{ $t('sidebar.analyp') }} </template>
<el-menu-item index="citationanalysis">
{{ $t('sidebar.analysis') }}
</el-menu-item>
@@ -149,7 +142,7 @@
<!-- 分角色链接 -->
<template v-if="this.userrole == 0">
<el-menu-item>
<a href="http://boss.tmrjournals.com/#/publition?Act=123" target="_blank" style="color: #bfcbd9;">
<a href="http://boss.tmrjournals.com/#/publition?Act=123" target="_blank" style="color: #bfcbd9">
<i class="el-icon-d-arrow-right"></i> Boss System
</a>
</el-menu-item>
@@ -157,31 +150,21 @@
<!-- 编辑 -->
<template v-if="this.userrole == 1">
<el-submenu index="5">
<template slot="title">
<i class="el-icon-paperclip"></i> {{$t('sidebar.tools')}}
</template>
<template slot="title"> <i class="el-icon-paperclip"></i> {{ $t('sidebar.tools') }} </template>
<el-menu-item index="RejectedArticles">
{{ $t('sidebar.ReArticles') }}
</el-menu-item>
<!-- <el-menu-item index="1" key="1"> -->
<a href="http://master.tmrjournals.com" target="_blank" class="linkBar">
Management System
</a>
<a href="http://master.tmrjournals.com" target="_blank" class="linkBar"> Management System </a>
<!-- </el-menu-item> -->
<!-- <el-menu-item index="2" key="2"> -->
<a href="https://mail.mxhichina.com/alimail" target="_blank" class="linkBar">
Official mailbox
</a>
<a href="https://mail.mxhichina.com/alimail" target="_blank" class="linkBar"> Official mailbox </a>
<!-- </el-menu-item> -->
<!-- <el-menu-item index="3" key="3"> -->
<a href="https://www.grammarly.com" target="_blank" class="linkBar">
www.grammarly.com
</a>
<a href="https://www.grammarly.com" target="_blank" class="linkBar"> www.grammarly.com </a>
<!-- </el-menu-item> -->
<!-- <el-menu-item index="4" key="4"> -->
<a href="https://quillbot.com" target="_blank" class="linkBar">
quillbot.com
</a>
<a href="https://quillbot.com" target="_blank" class="linkBar"> quillbot.com </a>
<!-- </el-menu-item> -->
</el-submenu>
</template>
@@ -199,7 +182,8 @@
user_cap: localStorage.getItem('U_role'),
items: [],
// 作者
author_items: [{
author_items: [
{
icon: 'el-icon-lx-home',
index: 'dashboard',
title: this.$t('sidebar.main')
@@ -208,7 +192,8 @@
icon: 'el-icon-lx-cascades',
index: '1',
title: this.$t('sidebar.author'),
subs: [{
subs: [
{
index: 'articleList',
title: this.$t('sidebar.author1')
},
@@ -219,7 +204,7 @@
{
index: 'articleAdd',
title: this.$t('sidebar.author2')
},
}
]
}
// ,{
@@ -229,7 +214,8 @@
// }
],
// 编辑
editor_items: [{
editor_items: [
{
icon: 'el-icon-lx-home',
index: 'dashboard',
title: this.$t('sidebar.main')
@@ -237,7 +223,7 @@
{
icon: 'el-icon-lx-copy',
index: 'articleListEditor',
title: this.$t('sidebar.editor1'),
title: this.$t('sidebar.editor1')
},
// {
// icon: 'el-icon-user',
@@ -275,7 +261,8 @@
icon: 'el-icon-user',
index: '4',
title: this.$t('sidebar.userManSys'),
subs: [{
subs: [
{
title: this.$t('sidebar.userManSys1'),
index: '41',
subs: [
@@ -307,30 +294,40 @@
{
title: this.$t('sidebar.userManSys3'),
index: '43',
subs: [{
subs: [
{
index: 'reviewerList',
title: this.$t('sidebar.userManSys31')
}, {
},
{
index: 'reviewerApplyList',
title: this.$t('sidebar.userManSys32')
}, {
},
{
index: 'reviewerAuthorList',
title: this.$t('sidebar.userManSys33')
}]
}, {
}
]
},
{
title: this.$t('sidebar.userManSys4'),
index: '44',
subs: [{
subs: [
{
index: 'editorBorder',
title: this.$t('sidebar.userManSys41')
}, {
},
{
index: 'editApplyList',
title: this.$t('sidebar.userManSys42')
}]
}, {
}
]
},
{
title: this.$t('sidebar.userManSys5'),
index: '45',
subs: [{
subs: [
{
index: 'youthList',
title: this.$t('sidebar.userManSys51')
},
@@ -350,11 +347,11 @@
// },
{
index: 'Academic_Integrity_Committee_list',
title: this.$t('sidebar.userManSys8'),
title: this.$t('sidebar.userManSys8')
},
{
index: 'Editors_Staff',
title: this.$t('sidebar.userManSys9'),
title: this.$t('sidebar.userManSys9')
},
{
index: 'partyDelete',
@@ -365,16 +362,17 @@
{
icon: 'el-icon-data-analysis',
index: 'citationanalysis',
title: this.$t('sidebar.analysis'),
title: this.$t('sidebar.analysis')
},
{
icon: 'el-icon-chat-line-square',
index: 'TMRGPT',
title: 'TMRGPT',
},
title: 'TMRGPT'
}
],
//超级管理员
admin_items: [{
admin_items: [
{
icon: 'el-icon-lx-home',
index: 'dashboard',
title: this.$t('sidebar.main')
@@ -383,7 +381,8 @@
icon: 'el-icon-connection',
index: '5',
title: this.$t('sidebar.chief'),
subs: [{
subs: [
{
index: 'chiefeditor',
title: this.$t('sidebar.chief1')
}
@@ -397,7 +396,8 @@
icon: 'el-icon-user',
index: '2',
title: this.$t('sidebar.editormanage'),
subs: [{
subs: [
{
index: 'editorList',
title: this.$t('sidebar.editormanage1')
},
@@ -411,7 +411,8 @@
icon: 'el-icon-notebook-1',
index: '3',
title: this.$t('sidebar.journal'),
subs: [{
subs: [
{
index: 'journalList',
title: this.$t('sidebar.journal1')
},
@@ -425,29 +426,33 @@
icon: 'el-icon-search',
index: '4',
title: this.$t('sidebar.monitor'),
subs: [{
subs: [
{
index: 'monitorManuscript',
title: this.$t('sidebar.monitor1')
}]
}
]
},
{
icon: 'el-icon-message',
index: '9',
title: this.$t('sidebar.email'),
subs: [{
subs: [
{
index: 'mailtemplate',
title: this.$t('sidebar.email1')
}, ]
}
]
},
{
icon: 'el-icon-discount',
index: '6',
title: this.$t('sidebar.suggest'),
subs: [{
subs: [
{
index: 'suggestList',
title: this.$t('sidebar.suggest1')
},
}
// {
// index: 'suggestSelect',
// title: this.$t('sidebar.suggest2')
@@ -458,25 +463,31 @@
icon: 'el-icon-coordinate',
index: '7',
title: this.$t('sidebar.party'),
subs: [{
subs: [
{
index: 'partyEditor',
title: this.$t('sidebar.party1')
}, {
},
{
index: 'partyList',
title: this.$t('sidebar.party2')
}, {
},
{
index: 'partyDelete',
title: this.$t('sidebar.party3')
}]
}
]
},
{ // 总监编委系统
{
// 总监编委系统
icon: 'el-icon-s-opportunity',
index: '10',
title: this.$t('sidebar.editorialBoard'),
subs: [{
subs: [
{
index: 'editorialBoard',
title: this.$t('sidebar.editorialBoard1')
},
}
// {
// index: 'partyList',
// title: this.$t('sidebar.party2')
@@ -485,7 +496,7 @@
// title: this.$t('sidebar.party3')
// }
]
},
}
// ,{
// icon: 'el-icon-data-analysis',
// index: 'citationanalysis',
@@ -515,7 +526,8 @@
}
},
created() {
if (this.userrole == 2) { //其余的身份(显示作者)
if (this.userrole == 2) {
//其余的身份(显示作者)
// if (this.user_cap.includes('chief')) { //主编
// this.items = this.chief_items;
// } else if (this.user_cap.includes('reviewer')) { //审稿人
@@ -526,25 +538,25 @@
// this.items = this.board_items;
// }
this.items = this.author_items;
} else if (this.userrole == 1) { //编辑
} else if (this.userrole == 1) {
//编辑
this.items = this.editor_items;
this.getDate()
} else if (this.userrole == 0) { //超级管理员
this.getDate();
} else if (this.userrole == 0) {
//超级管理员
this.items = this.admin_items;
}
// 通过 Event Bus 进行组件间通信,来折叠侧边栏
bus.$on('collapse', msg => {
bus.$on('collapse', (msg) => {
this.collapse = msg;
bus.$emit('collapse-content', msg);
});
},
methods: {
// 获取数据
getDate() {
},
},
getDate() {}
}
};
</script>
@@ -585,7 +597,7 @@
} */
.sidebar ul li.el-menu-item.is-active {
background-color: rgba(0, 0, 0, .3) !important;
background-color: rgba(0, 0, 0, 0.3) !important;
}
.el-menu {

View File

@@ -0,0 +1,156 @@
<template>
<!-- 关于表格的操作 -->
<div v-if="tableData.length > 0">
<!-- 行的合并 列的合并 表头添加斜线 -->
<el-table :data="tableData" style="width: 100%" :header-cell-style="{ height: '22px !important' }" class="tableBox">
<el-table-column :label="this.$t(`journalArticleTable.time`)" align="right" width="130" fixed>
<el-table-column prop="name" :label="this.$t(`journalArticleTable.title`)" width="120">
<template slot-scope="scope">
<el-tooltip class="item" effect="dark" :content="scope.row.jabbr" placement="top-start">
<div>
{{ scope.row.abbr }}
</div>
</el-tooltip>
</template>
</el-table-column>
</el-table-column>
<el-table-column prop="fenopda" v-for="(v, i) in timeData" :label="v" align="center" :prop="v" min-width="70"></el-table-column>
</el-table>
</div>
</template>
<script>
export default {
data() {
return {
tableInfo: {},
timeData: [],
tableData: []
};
},
created() {
// 调用计算需要合并的行
this.getSpanArr(this.content);
},
methods: {
getTableInfo(type, data) {
this.tableData = data.tableData;
this.timeData = data.timeData;
},
getSpanArr(data) {
this.spanObj.oneArray = [];
let concatOne = 0;
data.forEach((item, index) => {
if (index === 0) {
this.spanObj.oneArray.push(1);
} else {
// 判断依据
// 前一个的code和后一个的code相同则进行 行的合并
if (item.code === data[index - 1].code) {
this.spanObj.oneArray[concatOne] += 1;
this.spanObj.oneArray.push(0);
} else {
this.spanObj.oneArray.push(1);
concatOne = index;
}
}
});
},
// 注意:横向合并列 纵向合并行
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0) {
if (row.code === 'wlgzcd' || row.code === 'nlgzcd') {
return {
rowspan: 1,
colspan: 6
};
} else {
const _row = this.spanObj.oneArray[rowIndex];
const _col = _row ? 1 : 0;
return {
rowspan: _row,
colspan: _col
};
}
}
// 要将其余的列给清除,否则其还会占用空间
if (
(row.code === 'wlgzcd' || row.code === 'nlgzcd') &&
(columnIndex === 1 || columnIndex === 2 || columnIndex === 3 || columnIndex === 4 || columnIndex === 5)
) {
// 1和2列被合并,不清除的话,则后面的单元格都会错位
return {
rowspan: 0,
colspan: 0
};
}
},
// 第二行表头的隐藏
headMerge({ row, column, rowIndex, columnIndex }) {
if (rowIndex === 2) {
return {
display: 'none'
};
}
}
}
};
</script>
<style scoped>
::v-deep .el-table thead.is-group th {
/* background: none !important; */
}
::v-deep .el-table thead.is-group tr:first-of-type th:first-of-type {
border-bottom: none !important;
}
::v-deep .el-table thead.is-group tr:first-of-type th:first-of-type:before {
content: '' !important;
position: absolute !important;
width: 1px !important;
height: 85px !important; /*这里需要自己调整根据td的宽度和高度*/
top: 0 !important;
left: 0 !important;
background-color: #fff !important;
opacity: 0.8 !important;
display: block !important;
transform: rotate(-56deg) !important; /*这里需要自己调整,根据线的位置*/
transform-origin: top !important;
}
::v-deep .el-table thead.is-group tr:last-of-type th:first-of-type:before {
content: '' !important;
position: absolute !important;
width: 1px !important;
height: 105px !important; /*这里需要自己调整根据td的宽度和高度*/
bottom: 0 !important;
right: 0 !important;
background-color: #fff !important;
opacity: 0.8 !important;
display: block !important;
transform: rotate(-57deg) !important; /*这里需要自己调整,根据线的位置*/
transform-origin: bottom !important;
}
::v-deep .el-table tr:nth-child(2n) {
background: #dcf3ff !important;
}
::v-deep .el-table .el-table__body-wrapper::-webkit-scrollbar {
width: 10px; /*滚动条宽度*/
height: 10px; /*滚动条高度*/
}
/*定义滚动条轨道 内阴影+圆角*/
::v-deep .el-table .el-table__body-wrapper::-webkit-scrollbar-track {
/* box-shadow: 0px 1px 3px #071e4a inset; */
border-radius: 10px; /*滚动条的背景区域的圆角*/
background-color: #f0f0f0; /*滚动条的背景颜色*/
}
/*定义滑块 内阴影+圆角*/
::v-deep .el-table .el-table__body-wrapper::-webkit-scrollbar-thumb {
box-shadow: 0px 1px 3px #bababa inset; /*滚动条的内阴影*/
border-radius: 10px; /*滚动条的圆角*/
background-color: #bababa; /*滚动条的背景颜色*/
}
</style>

View File

@@ -127,6 +127,7 @@ const en = {
editorialBoard2:'Young Scientist Management',
editorialBoard3:'Journal Management',
chiefInspector:'Chief Inspector',
journalArticleCount:'Journal Article Count',
managingDirector:'Managing Director'
},
home: {
@@ -150,6 +151,16 @@ const en = {
role2: 'Editorial board',
role3: 'Reviewer',
role4: 'Youth editorial board',
},
journalArticleCount:{
yearTitle:'Total annual submission volume',
monthTitle:'Monthly submission volume',
dataTitle:'Submission volume',
},
journalArticleTable:{
title:'journal',
time:'time',
}
}

View File

@@ -126,6 +126,7 @@ const zh = {
editorialBoard2: '青年科学家列表',
editorialBoard3: '期刊列表',
chiefInspector: '总监',
journalArticleCount: '期刊文章计数总结',
managingDirector: '总经理'
},
home: {
@@ -149,6 +150,14 @@ const zh = {
role2: '编委',
role3: '审稿人',
role4: '青年编委',
}, journalArticleCount: {
yearTitle: '年度总投稿量',
monthTitle: '月度投稿量', dataTitle: '投稿量',
},
journalArticleTable:{
title:'期刊',
time:'时间',
}
}

View File

@@ -0,0 +1,262 @@
<template>
<div class="container" style="padding-bottom: 50px; width: 100%; height: auto">
<div style="width: 100%; height: 38vh; margin-bottom: 2vh; position: relative">
<i class="el-icon-refresh refresh" @click="getCharts('year')"></i>
<div id="yearchart" style="width: 100%; height: 100%"></div>
</div>
<div style="width: 100%; height: 44vh; position: relative; margin-bottom: 80px">
<i class="el-icon-refresh refresh" @click="getCharts('month')"></i>
<div id="monthchart" style="width: 100%; height: 100%"></div>
</div>
<div style="width: 100%; height: auto; margin-bottom: 50px">
<jAtableY type="year" ref="yearTableData"></jAtableY>
</div>
<div style="width: 100%; height: auto; margin-bottom: 50px !important">
<jAtableM type="month" ref="monthTableData"></jAtableM>
</div>
</div>
</template>
<script>
const jAtableY = () => import('@/components/common/journalArticleTable');
const jAtableM = () => import('@/components/common/journalArticleTable');
export default {
data() {
return {
loading: null
};
},
components: {
jAtableY,
jAtableM
},
async created() {
this.loading = this.$loading({
lock: true,
text: 'Loading...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
await this.getCharts('year');
await this.getCharts('month');
await this.getTableData();
this.$forceUpdate();
},
methods: {
handleRefresh() {},
async getEchartsData() {
await this.getCharts('year');
await this.getCharts('month');
this.$forceUpdate();
},
async getCharts(type) {
var optionsData = await this.getdata(type);
console.log('🚀 ~ getCharts ~ optionsData:', optionsData);
const chartBox = await this.$echarts.init(document.getElementById(`${type}chart`));
var option = {};
option = {
title: {
text: this.$t(`journalArticleCount.${type}Title`)
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
label: {
backgroundColor: '#6a7985'
}
}
},
// legend: {
// data: ['Email', 'Union Ads', 'Video Ads', 'Direct', 'Search Engine']
// },
toolbox: {
// feature: {
// // dataZoom: {
// // yAxisIndex: 'none'
// // },
// restore: {},
// }
},
dataZoom:
type == 'month'
? [
{
show: true,
realtime: true,
start: 1,
end: 100,
xAxisIndex: [0, 1]
},
{
type: 'inside',
realtime: true,
start: 1,
end: 100,
xAxisIndex: [0, 1]
}
]
: [],
grid: {
left: '3%',
right: '4%',
bottom: type == 'month' ? '20%' : '4%',
containLabel: true
},
xAxis: [
{
type: 'category',
axisLabel: {},
// axisLabel:
// type == 'year'
// ? {}
// : {
// interval: 0,
// rotate: 30
// },
boundaryGap: false,
data: optionsData.xAxisData
}
],
yAxis: [
{
type: 'value'
}
],
series: [
{
name: this.$t(`journalArticleCount.dataTitle`),
type: 'line',
stack: 'Total',
areaStyle: {
opacity: 0.8,
color: this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: type == 'year' ? 'rgb(0, 221, 255)' : 'rgb(0, 102, 153)'
},
{
offset: 1,
color: type == 'month' ? 'rgb(77, 119, 255)' : 'rgb(1, 191, 236)'
}
])
},
smooth: true,
emphasis: {
focus: 'series'
},
data: optionsData.seriesData
}
]
};
chartBox.clear();
chartBox.setOption(option, true);
// 根据页面大小自动响应图表大小
window.addEventListener('resize', function () {
chartBox.resize();
});
this.$forceUpdate();
},
// 获取文章列表数据
async getdata(type) {
var data = {};
var url = '';
if (type == 'month') {
url = '/api/Monitor/getArticleNumByMonth';
} else if (type == 'year') {
url = '/api/Monitor/getArticleNumByYear';
}
await this.$api
.post(url)
.then((res) => {
var that = this;
if (res.code == 0) {
console.log('🚀 ~ .then ~ res1998:' + type, res.data.articles);
var xAxisData = [];
var seriesData = [];
Object.entries(res.data.articles).forEach(([key, value]) => {
xAxisData.push(key);
seriesData.push(value);
data = { type: type, xAxisData: xAxisData, seriesData: seriesData };
});
}
})
.catch((err) => {
console.log(err);
});
return data;
},
// 获取文章列表数据
async getTableData() {
this.$nextTick(async () => {
await this.getTableDataInfo('year');
await this.getTableDataInfo('month');
});
},
async getTableDataInfo(type) {
var that = this;
var data = {};
var timeData = [];
var tableData = [];
var url = '';
if (type == 'month') {
url = '/api/Monitor/getArticleNumByMonthForJournal';
} else if (type == 'year') {
url = '/api/Monitor/getArticleNumByYearForJournal';
}
await this.$api
.post(url)
.then(async (res) => {
var that = this;
if (res.code == 0) {
for (let i in res.data.data) {
tableData.push({ ...res.data.data[i].journal, ...res.data.data[i].articles });
}
for (let i in res.data.data[0].articles) {
timeData.push(i);
}
data = { tableData: tableData, timeData: timeData };
}
})
.catch((err) => {
console.log(err);
this.loading = false;
});
console.log(data, type, '98999');
if (type == 'year') {
this.$refs.yearTableData.getTableInfo(type, data);
} else if (type == 'month') {
this.$refs.monthTableData.getTableInfo(type, data);
setTimeout(() => {
that.loading.close();
}, 100);
}
return data;
}
}
};
</script>
<style scoped>
.container {
padding: 20px;
box-sizing: border-box;
width: 100%;
height: 100%;
position: relative;
}
.refresh {
position: absolute;
top: 20px;
right: 0px;
z-index: 10;
}
</style>

View File

@@ -982,6 +982,14 @@ export default new Router({
title: 'Journals Management'
}
},
{
name:'journal-Article-Count',
path: '/journalArticleCount', // 超管单期刊列表
component: () => import('../components/page/journalArticleCount'),
meta: {
title: 'Journal Article Count'
}
},
{
path: '/404',
component: () => import( /* webpackChunkName: "404" */