You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
172 lines
3.7 KiB
172 lines
3.7 KiB
<template> |
|
<div class="wrap"> |
|
<div class="forms"> |
|
<div class="item"> |
|
<span class="label">发表年度:</span> |
|
<el-date-picker |
|
style="width: 300px" |
|
v-model="form.publicationYear" |
|
type="year" |
|
placeholder="请选择出版时间" |
|
format="yyyy" |
|
value-format="yyyy" |
|
@change="initData"> |
|
</el-date-picker> |
|
</div> |
|
<div class="search"> |
|
<input type="text" placeholder="请输入论文题目/期刊名称/作者名称" v-model="form.paperQueryKeyWord"> |
|
<i class="icon"> |
|
<img src="@/assets/images/search-white.png" alt=""> |
|
</i> |
|
</div> |
|
</div> |
|
|
|
<ul class="list"> |
|
<li v-for="(item, i) in articles" :key="i" @click="$parent.toArtice(item)"> |
|
<h6>{{ item.title }}</h6> |
|
<p class="meta">作者: {{ item.author }}</p> |
|
<p class="meta">期刊名称: {{ item.periodicalName }}</p> |
|
<p class="meta">出版年: {{ item.publicationYear }} 卷: {{ item.reel }} 文献号: {{ item.documentNumber }}</p> |
|
</li> |
|
</ul> |
|
</div> |
|
</template> |
|
|
|
<script> |
|
import Util from '@/libs/util'; |
|
export default { |
|
props: ['id'], |
|
data() { |
|
return { |
|
searchTimer: null, |
|
form: { |
|
paperQueryKeyWord: '', |
|
publicationYear: '' |
|
}, |
|
classifications: [], |
|
articles: [], |
|
page: 1, |
|
pageSize: 10, |
|
total: 0, |
|
} |
|
}, |
|
watch: { |
|
id() { |
|
this.id && this.initData() |
|
}, |
|
'form.paperQueryKeyWord': function (val) { |
|
clearTimeout(this.searchTimer); |
|
this.searchTimer = setTimeout(() => { |
|
this.initData(); |
|
}, 500); |
|
} |
|
}, |
|
mounted() { |
|
this.initData() |
|
}, |
|
methods: { |
|
// 查询文章列表 |
|
getArticle() { |
|
this.id && this.$post(this.api.newlyPublishedArticles, { |
|
siteId: this.$route.query.siteId || this.$store.state.content.site, |
|
columnIds: this.id, |
|
pageNum: this.page, |
|
pageSize: this.pageSize, |
|
...this.form |
|
}) |
|
.then(({ data }) => { |
|
this.articles = Util.removeTag(data.records); |
|
this.total = +data.total; |
|
}) |
|
.catch((res) => { }); |
|
}, |
|
initData() { |
|
this.page = 1 |
|
this.getArticle() |
|
}, |
|
} |
|
}; |
|
</script> |
|
|
|
<style lang="scss" scoped> |
|
.forms { |
|
display: flex; |
|
align-items: center; |
|
padding: 15px; |
|
margin-bottom: 20px; |
|
background-color: #fff; |
|
.item { |
|
display: inline-flex; |
|
align-items: center; |
|
margin-right: 30px; |
|
} |
|
.label { |
|
font-size: 16px; |
|
color: #333; |
|
white-space: nowrap; |
|
} |
|
/deep/.el-input__inner { |
|
width: 100%; |
|
height: 48px; |
|
line-height: 48px; |
|
border: 0; |
|
background: #F7F7F7; |
|
} |
|
.search { |
|
display: inline-flex; |
|
width: 34%; |
|
input { |
|
width: 100%; |
|
height: 48px; |
|
padding: 0 15px; |
|
font-size: 14px; |
|
color: #333; |
|
background: #F7F7F7; |
|
border: 0; |
|
border-top-left-radius: 6px; |
|
border-bottom-left-radius: 6px; |
|
&:focus { |
|
outline: none; |
|
} |
|
} |
|
} |
|
.icon { |
|
display: inline-flex; |
|
justify-content: center; |
|
align-items: center; |
|
width: 62px; |
|
height: 48px; |
|
background: #1583FF; |
|
border-radius: 0px 6px 6px 0px; |
|
cursor: pointer; |
|
} |
|
} |
|
.list { |
|
li { |
|
padding: 30px; |
|
margin-bottom: 15px; |
|
background-color: #fff; |
|
cursor: pointer; |
|
} |
|
h6 { |
|
margin-bottom: 10px; |
|
font-size: 1.2rem; |
|
} |
|
.meta { |
|
font-size: 1rem; |
|
color: #666; |
|
line-height: 30px; |
|
} |
|
} |
|
@media (max-width: 1200px) { |
|
.forms { |
|
padding: 1.25rem; |
|
flex-direction: column; |
|
.item, .search,div { |
|
width: 80%;margin: 0 auto; |
|
justify-content: center; |
|
margin-top: 20px; |
|
} |
|
} |
|
} |
|
</style> |