|
|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <section class="index-content">
|
|
|
+ <section v-if="this.role_id==1" class="index-content">
|
|
|
<div class="index_header">
|
|
|
<div class="header-item">
|
|
|
<div class="item-img">
|
|
|
@@ -41,16 +41,21 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="header-item" style="position:relative;">
|
|
|
- <span style="position:absolute;top:0;left:5px;color:#666;">搜索热词</span>
|
|
|
- <wordcloud v-if='form.search_hot_word'
|
|
|
- style="width:80%;height:100px;margin-left:20%;"
|
|
|
- :data="form.search_hot_word"
|
|
|
- nameKey="name" :fontSize='[10,24]'
|
|
|
- valueKey="value"
|
|
|
+ <div class="header-item" style="position: relative">
|
|
|
+ <span style="position: absolute; top: 0; left: 5px; color: #666"
|
|
|
+ >搜索热词</span
|
|
|
+ >
|
|
|
+ <wordcloud
|
|
|
+ v-if="form.search_hot_word"
|
|
|
+ style="width: 80%; height: 100px; margin-left: 20%"
|
|
|
+ :data="form.search_hot_word"
|
|
|
+ nameKey="name"
|
|
|
+ :fontSize="[10, 24]"
|
|
|
+ valueKey="value"
|
|
|
:color="myColors"
|
|
|
- :showTooltip="false">
|
|
|
- </wordcloud>
|
|
|
+ :showTooltip="false"
|
|
|
+ >
|
|
|
+ </wordcloud>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="index-main">
|
|
|
@@ -95,7 +100,11 @@
|
|
|
<span>文章标题</span>
|
|
|
<span>阅读次数</span>
|
|
|
</div>
|
|
|
- <div class="con2" v-for="(item, index) in form.article_readnum_top5" :key="index">
|
|
|
+ <div
|
|
|
+ class="con2"
|
|
|
+ v-for="(item, index) in form.article_readnum_top5"
|
|
|
+ :key="index"
|
|
|
+ >
|
|
|
<span>{{ index + 1 }}</span>
|
|
|
<span class="a_title">{{ item.name }}</span>
|
|
|
<span>{{ item.read_num }}</span>
|
|
|
@@ -122,10 +131,15 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</section>
|
|
|
+ <!-- 期刊管理员首页 -->
|
|
|
+ <section v-else>
|
|
|
+ <CASCI></CASCI>
|
|
|
+ </section>
|
|
|
</template>
|
|
|
<script>
|
|
|
import echarts from "echarts";
|
|
|
-import wordcloud from 'vue-wordcloud'
|
|
|
+import wordcloud from "vue-wordcloud";
|
|
|
+import CASCI from '../components/CASCI'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -138,14 +152,15 @@ export default {
|
|
|
{ article_header: "中国生态效率时空演化研究", count: "132" },
|
|
|
{ article_header: "中国生态效率时空演化研究", count: "132" },
|
|
|
],
|
|
|
- myColors: ['#1f77b4', '#629fc9', '#94bedb', '#c9e0ef'],
|
|
|
+ myColors: ["#1f77b4", "#629fc9", "#94bedb", "#c9e0ef"],
|
|
|
+ role_id:1
|
|
|
};
|
|
|
},
|
|
|
components: {
|
|
|
- wordcloud
|
|
|
- },
|
|
|
- computed: {
|
|
|
+ wordcloud,
|
|
|
+ CASCI
|
|
|
},
|
|
|
+ computed: {},
|
|
|
methods: {
|
|
|
getEcharts() {
|
|
|
var myChart = this.$echarts.init(this.$refs.subject);
|
|
|
@@ -197,7 +212,9 @@ export default {
|
|
|
// ].sort(function (a, b) {
|
|
|
// return a.value - b.value;
|
|
|
// }),
|
|
|
- data: this.form.subject_journal.sort(function(a,b){return a.value-b.value}),
|
|
|
+ data: this.form.subject_journal.sort(function (a, b) {
|
|
|
+ return a.value - b.value;
|
|
|
+ }),
|
|
|
roseType: "radius",
|
|
|
label: {
|
|
|
color: "rgba(102, 102, 102,1)",
|
|
|
@@ -353,7 +370,7 @@ export default {
|
|
|
axisLine: {
|
|
|
show: false,
|
|
|
},
|
|
|
- // data: ["应用物理", "应用物理", "应用物理", "应用物理", "应用物理"],
|
|
|
+ // data: ["应用物理", "应用物理", "应用物理", "应用物理", "应用物理"],
|
|
|
data: this.form.journal_article_x,
|
|
|
},
|
|
|
series: [
|
|
|
@@ -439,7 +456,7 @@ export default {
|
|
|
// return a.value - b.value;
|
|
|
// }),
|
|
|
// data:this.form.journal_article.sort(function(a,b){return a.value-b.value}),
|
|
|
- data:this.form.journal_article,
|
|
|
+ data: this.form.journal_article,
|
|
|
roseType: "radius",
|
|
|
label: {
|
|
|
color: "rgba(102, 102, 102,1)",
|
|
|
@@ -487,12 +504,12 @@ export default {
|
|
|
// type:'dotted',
|
|
|
},
|
|
|
},
|
|
|
- // data: ["1", "2", "3", "", "", "", ""],
|
|
|
+ // data: ["1", "2", "3", "", "", "", ""],
|
|
|
data: this.form.pubtime_article_x,
|
|
|
axisLabel: {
|
|
|
formatter: function (val) {
|
|
|
- // return "中国科学院成都生物研究所 中国科学院成都生物研究所"; //对每个标签处理后的结果(通过js字符串方法处理)
|
|
|
- return val
|
|
|
+ // return "中国科学院成都生物研究所 中国科学院成都生物研究所"; //对每个标签处理后的结果(通过js字符串方法处理)
|
|
|
+ return val;
|
|
|
},
|
|
|
// x轴字体颜色
|
|
|
textStyle: {
|
|
|
@@ -663,7 +680,7 @@ export default {
|
|
|
// type:'dotted',
|
|
|
},
|
|
|
},
|
|
|
- // data: ["1", "1", "1", "1", "1", "1", "1"],
|
|
|
+ // data: ["1", "1", "1", "1", "1", "1", "1"],
|
|
|
data: this.form.pubtime_conference_x,
|
|
|
axisLabel: {
|
|
|
formatter: function (val) {
|
|
|
@@ -737,7 +754,9 @@ export default {
|
|
|
getData() {
|
|
|
this.$api.getIndexData({}).then((res) => {
|
|
|
this.form = res.data.data;
|
|
|
- this.form.search_hot_word=this.form.search_hot_word.concat(this.form.search_hot_word)
|
|
|
+ this.form.search_hot_word = this.form.search_hot_word.concat(
|
|
|
+ this.form.search_hot_word
|
|
|
+ );
|
|
|
let organizer_journal_x = [];
|
|
|
let organizer_journal_y = [];
|
|
|
let journal_article_x = [];
|
|
|
@@ -748,54 +767,78 @@ export default {
|
|
|
let organizer_conference_y = [];
|
|
|
let pubtime_conference_x = [];
|
|
|
let pubtime_conference_y = [];
|
|
|
- this.form.organizer_journal.forEach((item,index)=>{
|
|
|
- organizer_journal_x.push(item.name)
|
|
|
- organizer_journal_y.push(item.value)
|
|
|
- })
|
|
|
- this.form.journal_article_top5.forEach((item,index)=>{
|
|
|
- journal_article_x.push(item.journal_name)
|
|
|
- journal_article_y.push(item.count)
|
|
|
- })
|
|
|
- this.form.pubtime_article.forEach((item,index)=>{
|
|
|
- pubtime_article_x.push(item.publish_time)
|
|
|
- pubtime_article_y.push(item.count)
|
|
|
- })
|
|
|
- this.form.organizer_conference.forEach((item,index)=>{
|
|
|
- organizer_conference_x.push(item.organizer_name)
|
|
|
- organizer_conference_y.push(item.count)
|
|
|
- })
|
|
|
- this.form.pubtime_conference.forEach((item,index)=>{
|
|
|
- pubtime_conference_x.push(item.publish_time)
|
|
|
- pubtime_conference_y.push(item.count)
|
|
|
- })
|
|
|
- this.form.organizer_journal_x = organizer_journal_x
|
|
|
- this.form.organizer_journal_y = organizer_journal_y
|
|
|
- this.form.journal_article_x = journal_article_x.reverse()
|
|
|
- this.form.journal_article_y = journal_article_y.reverse()
|
|
|
- this.form.pubtime_article_x = pubtime_article_x
|
|
|
- this.form.pubtime_article_y = pubtime_article_y
|
|
|
- this.form.organizer_conference_x = organizer_journal_x
|
|
|
- this.form.organizer_conference_y = organizer_journal_y
|
|
|
- this.form.pubtime_conference_x = pubtime_conference_x
|
|
|
- this.form.pubtime_conference_y = pubtime_conference_y
|
|
|
+ this.form.organizer_journal.forEach((item, index) => {
|
|
|
+ organizer_journal_x.push(item.name);
|
|
|
+ organizer_journal_y.push(item.value);
|
|
|
+ });
|
|
|
+ this.form.journal_article_top5.forEach((item, index) => {
|
|
|
+ journal_article_x.push(item.journal_name);
|
|
|
+ journal_article_y.push(item.count);
|
|
|
+ });
|
|
|
+ this.form.pubtime_article.forEach((item, index) => {
|
|
|
+ pubtime_article_x.push(item.publish_time);
|
|
|
+ pubtime_article_y.push(item.count);
|
|
|
+ });
|
|
|
+ this.form.organizer_conference.forEach((item, index) => {
|
|
|
+ organizer_conference_x.push(item.organizer_name);
|
|
|
+ organizer_conference_y.push(item.count);
|
|
|
+ });
|
|
|
+ this.form.pubtime_conference.forEach((item, index) => {
|
|
|
+ pubtime_conference_x.push(item.publish_time);
|
|
|
+ pubtime_conference_y.push(item.count);
|
|
|
+ });
|
|
|
+ this.form.organizer_journal_x = organizer_journal_x;
|
|
|
+ this.form.organizer_journal_y = organizer_journal_y;
|
|
|
+ this.form.journal_article_x = journal_article_x.reverse();
|
|
|
+ this.form.journal_article_y = journal_article_y.reverse();
|
|
|
+ this.form.pubtime_article_x = pubtime_article_x;
|
|
|
+ this.form.pubtime_article_y = pubtime_article_y;
|
|
|
+ this.form.organizer_conference_x = organizer_journal_x;
|
|
|
+ this.form.organizer_conference_y = organizer_journal_y;
|
|
|
+ this.form.pubtime_conference_x = pubtime_conference_x;
|
|
|
+ this.form.pubtime_conference_y = pubtime_conference_y;
|
|
|
this.getEcharts();
|
|
|
});
|
|
|
},
|
|
|
},
|
|
|
- mounted() {
|
|
|
+ mounted() {},
|
|
|
+ beforeCreate(){
|
|
|
+ this.$api.getAccountInfo().then((res) => {
|
|
|
+ this.role_id = res.data.data.role_id;
|
|
|
+ // this.getData();
|
|
|
+ // var color = [];
|
|
|
+ // for (let i = 0; i < 5; i++) {
|
|
|
+ // let c =
|
|
|
+ // "rgb(" +
|
|
|
+ // [
|
|
|
+ // Math.round(Math.random() * 160),
|
|
|
+ // Math.round(Math.random() * 160),
|
|
|
+ // Math.round(Math.random() * 160),
|
|
|
+ // ].join(",") +
|
|
|
+ // ")";
|
|
|
+ // color.push(c);
|
|
|
+ // }
|
|
|
+ // this.myColors = color;
|
|
|
+ });
|
|
|
},
|
|
|
- created(){
|
|
|
- this.getData();
|
|
|
- var color=[]
|
|
|
- for(let i=0;i<5;i++){
|
|
|
- let c='rgb(' + [
|
|
|
- Math.round(Math.random() * 160),
|
|
|
- Math.round(Math.random() * 160),
|
|
|
- Math.round(Math.random() * 160)
|
|
|
- ].join(',') + ')';
|
|
|
- color.push(c)
|
|
|
- }
|
|
|
- this.myColors=color
|
|
|
+ created() {
|
|
|
+ this.$api.getAccountInfo().then((res) => {
|
|
|
+ this.role_id = res.data.data.role_id;
|
|
|
+ this.getData();
|
|
|
+ var color = [];
|
|
|
+ for (let i = 0; i < 5; i++) {
|
|
|
+ let c =
|
|
|
+ "rgb(" +
|
|
|
+ [
|
|
|
+ Math.round(Math.random() * 160),
|
|
|
+ Math.round(Math.random() * 160),
|
|
|
+ Math.round(Math.random() * 160),
|
|
|
+ ].join(",") +
|
|
|
+ ")";
|
|
|
+ color.push(c);
|
|
|
+ }
|
|
|
+ this.myColors = color;
|
|
|
+ });
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
@@ -920,7 +963,7 @@ section {
|
|
|
span:last-child {
|
|
|
float: right;
|
|
|
}
|
|
|
- .a_title{
|
|
|
+ .a_title {
|
|
|
white-space: nowrap;
|
|
|
text-overflow: ellipsis;
|
|
|
overflow: hidden;
|