|
|
|
@ -63,7 +63,15 @@ |
|
|
|
|
|
|
|
|
|
<div class="article-wrap"> |
|
|
|
|
<ul class="articles"> |
|
|
|
|
<li v-for="(item, i) in articles" :key="i" @click="toArtice(item)"> |
|
|
|
|
<li v-for="(item, i) in articles" :key="i" :class="{'news-notice': info.listStyleId === 55}" @click="toArtice(item)"> |
|
|
|
|
<template v-if="info.listStyleId === 55"> |
|
|
|
|
<div class="releaseTime"> |
|
|
|
|
<p class="d">{{ item.date }}</p> |
|
|
|
|
<p class="m">{{ item.month }}</p> |
|
|
|
|
</div> |
|
|
|
|
<div class="news-title">{{ item.title }}</div> |
|
|
|
|
</template> |
|
|
|
|
<template v-else> |
|
|
|
|
<div class="texts"> |
|
|
|
|
<p v-if="(item.listStyleId === 10 || item.listStyleId === 15) && item.classificationName" |
|
|
|
|
class="type"> |
|
|
|
@ -93,6 +101,7 @@ |
|
|
|
|
</template> |
|
|
|
|
</div> |
|
|
|
|
<img class="pic" :src="item.titleImg" alt="" onerror="javascript:this.src='./images/1.png';" /> |
|
|
|
|
</template> |
|
|
|
|
</li> |
|
|
|
|
</ul> |
|
|
|
|
<div v-if="articles.length" class="pagination"> |
|
|
|
@ -154,7 +163,7 @@ export default { |
|
|
|
|
sameStyle: 1, |
|
|
|
|
allColumnId: [], |
|
|
|
|
showNav: false, |
|
|
|
|
showNavIds: [10, 11, 12, 16], // 显示侧导航的模板id |
|
|
|
|
showNavIds: [10, 11, 12, 16, 55], // 显示侧导航的模板id |
|
|
|
|
isFilter: false, |
|
|
|
|
page: 1, |
|
|
|
|
pageSize: 10, |
|
|
|
@ -435,7 +444,16 @@ export default { |
|
|
|
|
...this.form |
|
|
|
|
}) |
|
|
|
|
.then(({ data }) => { |
|
|
|
|
this.articles = Util.removeTag(data.records); |
|
|
|
|
const articles = Util.removeTag(data.records); |
|
|
|
|
articles.forEach(e => { |
|
|
|
|
// 把发布日期分割成年月和日,新闻中心-通知公告要展示 |
|
|
|
|
if (e.releaseTime) { |
|
|
|
|
const date = e.releaseTime.split('-') |
|
|
|
|
e.date = date[2] |
|
|
|
|
e.month = date[0] + '/' + date[1] |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
this.articles = articles |
|
|
|
|
this.total = +data.total; |
|
|
|
|
// 如果栏目那勾选了“只有一篇文章时,以详情方式展示”,并且只有一篇文章,则跳转到详情页 |
|
|
|
|
// this.total == 1 && this.info.showWithDetails && this.$router.push(`/article?articleId=${this.articles[0].id}&id=${this.articles[0].columnId}`) |
|
|
|
@ -751,7 +769,33 @@ export default { |
|
|
|
|
height: 244px; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.news-notice { |
|
|
|
|
.releaseTime { |
|
|
|
|
width: 88px; |
|
|
|
|
height: 88px; |
|
|
|
|
padding: 10px 0 16px; |
|
|
|
|
margin-right: 24px; |
|
|
|
|
color: #fff; |
|
|
|
|
text-align: center; |
|
|
|
|
background: #0B5086; |
|
|
|
|
} |
|
|
|
|
.d { |
|
|
|
|
font-size: 2rem; |
|
|
|
|
font-family: DINCondensed-Bold, DINCondensed; |
|
|
|
|
font-weight: bold; |
|
|
|
|
line-height: 43px; |
|
|
|
|
} |
|
|
|
|
.m { |
|
|
|
|
font-size: .9rem; |
|
|
|
|
line-height: 20px; |
|
|
|
|
} |
|
|
|
|
.news-title { |
|
|
|
|
width: calc(100% - 110px); |
|
|
|
|
font-size: 1.1rem; |
|
|
|
|
color: #333; |
|
|
|
|
line-height: 1.6; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.right { |
|
|
|
|
width: 14%; |
|
|
|
|
min-width: 240px; |
|
|
|
|