|
|
@ -63,7 +63,15 @@ |
|
|
|
|
|
|
|
|
|
|
|
<div class="article-wrap"> |
|
|
|
<div class="article-wrap"> |
|
|
|
<ul class="articles"> |
|
|
|
<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"> |
|
|
|
<div class="texts"> |
|
|
|
<p v-if="(item.listStyleId === 10 || item.listStyleId === 15) && item.classificationName" |
|
|
|
<p v-if="(item.listStyleId === 10 || item.listStyleId === 15) && item.classificationName" |
|
|
|
class="type"> |
|
|
|
class="type"> |
|
|
@ -93,6 +101,7 @@ |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<img class="pic" :src="item.titleImg" alt="" onerror="javascript:this.src='./images/1.png';" /> |
|
|
|
<img class="pic" :src="item.titleImg" alt="" onerror="javascript:this.src='./images/1.png';" /> |
|
|
|
|
|
|
|
</template> |
|
|
|
</li> |
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
</ul> |
|
|
|
<div v-if="articles.length" class="pagination"> |
|
|
|
<div v-if="articles.length" class="pagination"> |
|
|
@ -154,7 +163,7 @@ export default { |
|
|
|
sameStyle: 1, |
|
|
|
sameStyle: 1, |
|
|
|
allColumnId: [], |
|
|
|
allColumnId: [], |
|
|
|
showNav: false, |
|
|
|
showNav: false, |
|
|
|
showNavIds: [10, 11, 12, 16], // 显示侧导航的模板id |
|
|
|
showNavIds: [10, 11, 12, 16, 55], // 显示侧导航的模板id |
|
|
|
isFilter: false, |
|
|
|
isFilter: false, |
|
|
|
page: 1, |
|
|
|
page: 1, |
|
|
|
pageSize: 10, |
|
|
|
pageSize: 10, |
|
|
@ -260,7 +269,7 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 获取标签 |
|
|
|
// 获取标签 |
|
|
|
getLabel() { |
|
|
|
getLabel() { |
|
|
|
this.$post(`${this.api.queryLabel}?siteId=${this.$route.query.siteId || this.site}`) |
|
|
|
this.$post(`${this.api.queryLabel}?siteId=${this.site}`) |
|
|
|
.then(({ data }) => { |
|
|
|
.then(({ data }) => { |
|
|
|
this.labels = data; |
|
|
|
this.labels = data; |
|
|
|
// 修改placeholder |
|
|
|
// 修改placeholder |
|
|
@ -334,7 +343,7 @@ export default { |
|
|
|
// 右边资讯 |
|
|
|
// 右边资讯 |
|
|
|
getColumn() { |
|
|
|
getColumn() { |
|
|
|
this.$post(this.api.listWithTreeMenuVisible, { |
|
|
|
this.$post(this.api.listWithTreeMenuVisible, { |
|
|
|
siteId: this.$route.query.siteId || this.$store.state.content.site, |
|
|
|
siteId: this.site, |
|
|
|
columnName: '', |
|
|
|
columnName: '', |
|
|
|
templateId: '', |
|
|
|
templateId: '', |
|
|
|
typeId: '', |
|
|
|
typeId: '', |
|
|
@ -345,7 +354,7 @@ export default { |
|
|
|
}) |
|
|
|
}) |
|
|
|
.catch((err) => { }); |
|
|
|
.catch((err) => { }); |
|
|
|
|
|
|
|
|
|
|
|
this.$post(`${this.api.hotContent}?siteId=${this.$route.query.siteId || this.$store.state.content.site}`) |
|
|
|
this.$post(`${this.api.hotContent}?siteId=${this.site}`) |
|
|
|
.then(({ data }) => { |
|
|
|
.then(({ data }) => { |
|
|
|
this.hots = Util.removeTag(data); |
|
|
|
this.hots = Util.removeTag(data); |
|
|
|
}) |
|
|
|
}) |
|
|
@ -356,7 +365,7 @@ export default { |
|
|
|
this.$post(this.api.newlyPublishedArticles, { |
|
|
|
this.$post(this.api.newlyPublishedArticles, { |
|
|
|
pageNum: 1, |
|
|
|
pageNum: 1, |
|
|
|
pageSize: 5, |
|
|
|
pageSize: 5, |
|
|
|
siteId: this.$route.query.siteId || this.$store.state.content.site |
|
|
|
siteId: this.site |
|
|
|
}) |
|
|
|
}) |
|
|
|
.then(({ data }) => { |
|
|
|
.then(({ data }) => { |
|
|
|
this.news = Util.removeTag(data.records); |
|
|
|
this.news = Util.removeTag(data.records); |
|
|
@ -375,7 +384,7 @@ export default { |
|
|
|
if (left && to.level === 1 && (typeId === 2 || typeId === 3)) return false; |
|
|
|
if (left && to.level === 1 && (typeId === 2 || typeId === 3)) return false; |
|
|
|
// 出版物则跳转到出版物列表 |
|
|
|
// 出版物则跳转到出版物列表 |
|
|
|
if (to.templateId === 8) { |
|
|
|
if (to.templateId === 8) { |
|
|
|
this.$router.replace(`/publish?id=${this.id}&siteId=${this.$route.query.siteId || this.site}`); |
|
|
|
this.$router.replace(`/publish?id=${this.id}&siteId=${this.site}`); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
// 跳转链接 |
|
|
|
// 跳转链接 |
|
|
@ -427,7 +436,7 @@ export default { |
|
|
|
if (this.lableId.includes(e.id)) labelName.push(e.labelName); |
|
|
|
if (this.lableId.includes(e.id)) labelName.push(e.labelName); |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.$post(this.api.newlyPublishedArticles, { |
|
|
|
this.$post(this.api.newlyPublishedArticles, { |
|
|
|
siteId: this.$route.query.siteId || this.site, |
|
|
|
siteId: this.site, |
|
|
|
columnIds, |
|
|
|
columnIds, |
|
|
|
pageNum: this.page, |
|
|
|
pageNum: this.page, |
|
|
|
pageSize: this.info.pageSize, |
|
|
|
pageSize: this.info.pageSize, |
|
|
@ -435,7 +444,16 @@ export default { |
|
|
|
...this.form |
|
|
|
...this.form |
|
|
|
}) |
|
|
|
}) |
|
|
|
.then(({ data }) => { |
|
|
|
.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 = +data.total; |
|
|
|
// 如果栏目那勾选了“只有一篇文章时,以详情方式展示”,并且只有一篇文章,则跳转到详情页 |
|
|
|
// 如果栏目那勾选了“只有一篇文章时,以详情方式展示”,并且只有一篇文章,则跳转到详情页 |
|
|
|
// this.total == 1 && this.info.showWithDetails && this.$router.push(`/article?articleId=${this.articles[0].id}&id=${this.articles[0].columnId}`) |
|
|
|
// this.total == 1 && this.info.showWithDetails && this.$router.push(`/article?articleId=${this.articles[0].id}&id=${this.articles[0].columnId}`) |
|
|
@ -751,7 +769,34 @@ export default { |
|
|
|
height: 244px; |
|
|
|
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; |
|
|
|
|
|
|
|
@include mul-ellipsis(2); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
.right { |
|
|
|
.right { |
|
|
|
width: 14%; |
|
|
|
width: 14%; |
|
|
|
min-width: 240px; |
|
|
|
min-width: 240px; |
|
|
@ -909,7 +954,7 @@ export default { |
|
|
|
|
|
|
|
|
|
|
|
.contents { |
|
|
|
.contents { |
|
|
|
.articles { |
|
|
|
.articles { |
|
|
|
li { |
|
|
|
li:not(.news-notice) { |
|
|
|
flex-direction: column; |
|
|
|
flex-direction: column; |
|
|
|
|
|
|
|
|
|
|
|
.texts { |
|
|
|
.texts { |
|
|
@ -969,7 +1014,7 @@ export default { |
|
|
|
|
|
|
|
|
|
|
|
.contents { |
|
|
|
.contents { |
|
|
|
.articles { |
|
|
|
.articles { |
|
|
|
li { |
|
|
|
li:not(.news-notice) { |
|
|
|
flex-direction: column; |
|
|
|
flex-direction: column; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|