提交
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -21,3 +21,4 @@ yarn-error.log*
|
||||
*.sln
|
||||
*.sw*
|
||||
node_modules
|
||||
src/api/index.js
|
||||
|
||||
@@ -37,8 +37,43 @@
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.cite.month_num }}
|
||||
|
||||
<span @click="openDrawer(scope.row)" style="margin-left: 10px;cursor: pointer;color: #006699 !important;font-weight: bold">
|
||||
<i class="el-icon-edit"></i> {{ $t('JournalCitationAnalysis.edit') }}
|
||||
<span
|
||||
@click="openDrawer(scope.row, 'currentMonth')"
|
||||
style="margin-left: 10px; cursor: pointer; color: #006699 !important; font-weight: bold"
|
||||
>
|
||||
<i class="el-icon-edit"></i> {{ $t('JournalCitationAnalysis.edit') }}
|
||||
</span>
|
||||
<!-- <el-button type="primary" size="mini" @click="openDrawer(scope.row)" style="">
|
||||
|
||||
</el-button> -->
|
||||
<!-- <p
|
||||
style="padding: 0px 6px;display: inline-block;cursor: pointer; color: #409eff; background: #ecf5ff; border: 1px solid #b3d8ff"
|
||||
|
||||
>
|
||||
{{ scope.row.cite.month_num }}
|
||||
</p> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
:label="
|
||||
lang == 'en'
|
||||
? `${$t('JournalCitationAnalysis.cite')} ${getMonthName(lastMonth)}${
|
||||
lastMonth == 12 ? ' ' + lastMonthYear : ''
|
||||
}`
|
||||
: `${lastMonth == 12 ? lastMonthYear + '年' : ''}${lastMonth} 月${$t('JournalCitationAnalysis.cite')}`
|
||||
"
|
||||
width="200"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.cite.p_month_num }}
|
||||
|
||||
<span
|
||||
@click="openDrawer(scope.row, 'lastMonth')"
|
||||
style="margin-left: 10px; cursor: pointer; color: #006699 !important; font-weight: bold"
|
||||
>
|
||||
<i class="el-icon-edit"></i> {{ $t('JournalCitationAnalysis.edit') }}
|
||||
</span>
|
||||
<!-- <el-button type="primary" size="mini" @click="openDrawer(scope.row)" style="">
|
||||
|
||||
@@ -195,13 +230,20 @@
|
||||
</el-table>
|
||||
</div>
|
||||
</el-drawer>
|
||||
<common-cite-list ref="commonCiteList" :doiInfo="this.doiInfo" :journal="currentData" @refresh="getJournalList"></common-cite-list>
|
||||
<common-cite-list
|
||||
ref="commonCiteList"
|
||||
:doiInfo="this.doiInfo"
|
||||
:monthType="monthType"
|
||||
:journal="currentData"
|
||||
@refresh="getJournalList"
|
||||
></common-cite-list>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
const jAtableY = () => import('@/components/common/journalArticleTable');
|
||||
const commonCiteList = () => import('@/components/page/components/JournalCitationAnalysis/citeList.vue');
|
||||
// 获取当前日期
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -217,7 +259,9 @@ export default {
|
||||
doiInfo: {},
|
||||
p_year: new Date().getFullYear() - 1,
|
||||
year: new Date().getFullYear(),
|
||||
month: new Date().getMonth() + 1
|
||||
month: new Date().getMonth() + 1,
|
||||
lastMonth: '',
|
||||
lastMonthYear: ''
|
||||
};
|
||||
},
|
||||
components: {
|
||||
@@ -225,6 +269,22 @@ export default {
|
||||
commonCiteList
|
||||
},
|
||||
async created() {
|
||||
const currentDate = new Date();
|
||||
// 获取上个月的年份
|
||||
|
||||
// 获取上个月的月份(注意:月份是从0开始计数的,所以需要加1)
|
||||
const lastMonth = currentDate.getMonth();
|
||||
|
||||
if (lastMonth === 0) {
|
||||
console.log('lastMonth at line 270:', lastMonth);
|
||||
|
||||
this.lastMonth = 12;
|
||||
this.lastMonthYear = currentDate.getFullYear() - 1;
|
||||
} else {
|
||||
this.lastMonth = lastMonth;
|
||||
this.lastMonthYear = currentDate.getFullYear();
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
|
||||
await this.getTableData();
|
||||
@@ -257,11 +317,13 @@ export default {
|
||||
// }
|
||||
// });
|
||||
},
|
||||
getJournalList() {
|
||||
getJournalList(month) {
|
||||
console.log('month at line 314:', month);
|
||||
this.JournalListLoad = true;
|
||||
this.JournalList = [];
|
||||
|
||||
this.$api
|
||||
.post('api/Monitor/getCiteListForEditorMonth', {
|
||||
.post(month == 'currentMonth' ? 'api/Monitor/getCiteListForEditorMonth' : 'api/Monitor/getCiteListForEditorPMonth', {
|
||||
issn: this.currentData.issn
|
||||
})
|
||||
.then(async (res) => {
|
||||
@@ -278,23 +340,38 @@ export default {
|
||||
this.$message.error(err);
|
||||
});
|
||||
},
|
||||
openDrawer(data) {
|
||||
openDrawer(data, month) {
|
||||
console.log('month at line 335:', month);
|
||||
this.monthType = month;
|
||||
this.currentData = data;
|
||||
if (this.currentData) {
|
||||
this.drawerTitle = `${this.currentData.title} ${
|
||||
this.lang == 'en'
|
||||
? this.$t('JournalCitationAnalysis.cite') + this.getMonthName(this.month)
|
||||
: this.month + '月' + this.$t('JournalCitationAnalysis.cite')
|
||||
} ( ${this.currentData.cite.month_num} )`;
|
||||
if (month == 'currentMonth') {
|
||||
this.drawerTitle = `${this.currentData.title} ${
|
||||
this.lang == 'en'
|
||||
? this.$t('JournalCitationAnalysis.cite') + this.getMonthName(this.month)
|
||||
: this.month + '月' + this.$t('JournalCitationAnalysis.cite')
|
||||
} ( ${this.currentData.cite.month_num} )`;
|
||||
} else {
|
||||
this.drawerTitle = `${this.currentData.title} ${
|
||||
this.lang == 'en'
|
||||
? `${this.$t('JournalCitationAnalysis.cite')} ${this.getMonthName(this.lastMonth)}${
|
||||
this.lastMonth == 12 ? ' ' + this.lastMonthYear : ''
|
||||
}`
|
||||
: `${this.lastMonth == 12 ? this.lastMonthYear + '年' : ''}${this.lastMonth} 月${this.$t(
|
||||
'JournalCitationAnalysis.cite'
|
||||
)}`
|
||||
} ( ${this.currentData.cite.p_month_num} )`;
|
||||
}
|
||||
}
|
||||
|
||||
this.drawer = true;
|
||||
this.getJournalList();
|
||||
this.getJournalList(month);
|
||||
},
|
||||
handleClose() {
|
||||
this.drawer = false;
|
||||
},
|
||||
getMonthName(month) {
|
||||
console.log('month at line 344:', month);
|
||||
const months = [
|
||||
'January',
|
||||
'February',
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
<script>
|
||||
import VueUeditorWrap from 'vue-ueditor-wrap'; // ES6 Module
|
||||
export default {
|
||||
props: ['journal', 'doiInfo'],
|
||||
props: ['journal', 'doiInfo','monthType'],
|
||||
data() {
|
||||
return {
|
||||
tableWidth: !localStorage.getItem('langs') || localStorage.getItem('langs') == 'en' ? 100 : 70,
|
||||
@@ -372,7 +372,7 @@ export default {
|
||||
this.$message.success('successed!');
|
||||
|
||||
this.cancelSave();
|
||||
this.$emit('refresh')
|
||||
this.$emit('refresh',this.monthType)
|
||||
} else if (res.code == 1) {
|
||||
// doi 错误
|
||||
this.addLoading = false;
|
||||
|
||||
Reference in New Issue
Block a user