|
|
|
@ -63,36 +63,45 @@ |
|
|
|
|
|
|
|
|
|
<div class="article-wrap"> |
|
|
|
|
<ul class="articles"> |
|
|
|
|
<li v-for="(item, i) in articles" :key="i" @click="toArtice(item)"> |
|
|
|
|
<div class="texts"> |
|
|
|
|
<p v-if="(item.listStyleId === 10 || item.listStyleId === 15) && item.classificationName" |
|
|
|
|
class="type"> |
|
|
|
|
{{ item.classificationName }} |
|
|
|
|
</p> |
|
|
|
|
<h6>{{ item.title }}</h6> |
|
|
|
|
<template v-if="item.listStyleId === 11"> |
|
|
|
|
<span class="meta">{{ item.releaseTime }}</span> |
|
|
|
|
<div class="des" v-html="item.mainBody"></div> |
|
|
|
|
</template> |
|
|
|
|
<span v-if="item.listStyleId === 10" class="meta">{{ item.releaseTime }} {{ item.labelName && ' | ' + |
|
|
|
|
item.labelName }}</span> |
|
|
|
|
<template v-if="item.listStyleId === 15 || item.listStyleId === 16"> |
|
|
|
|
<div v-if="item.keynoteSpeaker" class="meta m-b-10"> |
|
|
|
|
<img class="icon" src="@/assets/images/mine.png" alt="" /> {{ item.keynoteSpeaker }} |
|
|
|
|
</div> |
|
|
|
|
<div v-if="item.activityStartTime" class="meta m-b-10"> |
|
|
|
|
<img class="icon" src="@/assets/images/time.png" alt="" /> |
|
|
|
|
{{ item.activityStartTime + ' ~ ' + item.activityEndTime }} |
|
|
|
|
</div> |
|
|
|
|
<div v-if="item.offlineLocation" class="meta m-b-10"> |
|
|
|
|
<img class="icon" src="@/assets/images/location.png" alt="" /> {{ item.offlineLocation }} |
|
|
|
|
</div> |
|
|
|
|
<div v-if="item.onlineLocation" class="meta"> |
|
|
|
|
<img class="icon" src="@/assets/images/online.png" alt="" /> {{ item.onlineLocation }} |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</div> |
|
|
|
|
<img class="pic" :src="item.titleImg" alt="" onerror="javascript:this.src='./images/1.png';" /> |
|
|
|
|
<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"> |
|
|
|
|
{{ item.classificationName }} |
|
|
|
|
</p> |
|
|
|
|
<h6>{{ item.title }}</h6> |
|
|
|
|
<template v-if="item.listStyleId === 11"> |
|
|
|
|
<span class="meta">{{ item.releaseTime }}</span> |
|
|
|
|
<div class="des" v-html="item.mainBody"></div> |
|
|
|
|
</template> |
|
|
|
|
<span v-if="item.listStyleId === 10" class="meta">{{ item.releaseTime }} {{ item.labelName && ' | ' + |
|
|
|
|
item.labelName }}</span> |
|
|
|
|
<template v-if="item.listStyleId === 15 || item.listStyleId === 16"> |
|
|
|
|
<div v-if="item.keynoteSpeaker" class="meta m-b-10"> |
|
|
|
|
<img class="icon" src="@/assets/images/mine.png" alt="" /> {{ item.keynoteSpeaker }} |
|
|
|
|
</div> |
|
|
|
|
<div v-if="item.activityStartTime" class="meta m-b-10"> |
|
|
|
|
<img class="icon" src="@/assets/images/time.png" alt="" /> |
|
|
|
|
{{ item.activityStartTime + ' ~ ' + item.activityEndTime }} |
|
|
|
|
</div> |
|
|
|
|
<div v-if="item.offlineLocation" class="meta m-b-10"> |
|
|
|
|
<img class="icon" src="@/assets/images/location.png" alt="" /> {{ item.offlineLocation }} |
|
|
|
|
</div> |
|
|
|
|
<div v-if="item.onlineLocation" class="meta"> |
|
|
|
|
<img class="icon" src="@/assets/images/online.png" alt="" /> {{ item.onlineLocation }} |
|
|
|
|
</div> |
|
|
|
|
</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, |
|
|
|
@ -260,7 +269,7 @@ export default { |
|
|
|
|
}, |
|
|
|
|
// 获取标签 |
|
|
|
|
getLabel() { |
|
|
|
|
this.$post(`${this.api.queryLabel}?siteId=${this.$route.query.siteId || this.site}`) |
|
|
|
|
this.$post(`${this.api.queryLabel}?siteId=${this.site}`) |
|
|
|
|
.then(({ data }) => { |
|
|
|
|
this.labels = data; |
|
|
|
|
// 修改placeholder |
|
|
|
@ -334,7 +343,7 @@ export default { |
|
|
|
|
// 右边资讯 |
|
|
|
|
getColumn() { |
|
|
|
|
this.$post(this.api.listWithTreeMenuVisible, { |
|
|
|
|
siteId: this.$route.query.siteId || this.$store.state.content.site, |
|
|
|
|
siteId: this.site, |
|
|
|
|
columnName: '', |
|
|
|
|
templateId: '', |
|
|
|
|
typeId: '', |
|
|
|
@ -345,7 +354,7 @@ export default { |
|
|
|
|
}) |
|
|
|
|
.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 }) => { |
|
|
|
|
this.hots = Util.removeTag(data); |
|
|
|
|
}) |
|
|
|
@ -356,7 +365,7 @@ export default { |
|
|
|
|
this.$post(this.api.newlyPublishedArticles, { |
|
|
|
|
pageNum: 1, |
|
|
|
|
pageSize: 5, |
|
|
|
|
siteId: this.$route.query.siteId || this.$store.state.content.site |
|
|
|
|
siteId: this.site |
|
|
|
|
}) |
|
|
|
|
.then(({ data }) => { |
|
|
|
|
this.news = Util.removeTag(data.records); |
|
|
|
@ -375,7 +384,7 @@ export default { |
|
|
|
|
if (left && to.level === 1 && (typeId === 2 || typeId === 3)) return false; |
|
|
|
|
// 出版物则跳转到出版物列表 |
|
|
|
|
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; |
|
|
|
|
} |
|
|
|
|
// 跳转链接 |
|
|
|
@ -427,7 +436,7 @@ export default { |
|
|
|
|
if (this.lableId.includes(e.id)) labelName.push(e.labelName); |
|
|
|
|
}); |
|
|
|
|
this.$post(this.api.newlyPublishedArticles, { |
|
|
|
|
siteId: this.$route.query.siteId || this.site, |
|
|
|
|
siteId: this.site, |
|
|
|
|
columnIds, |
|
|
|
|
pageNum: this.page, |
|
|
|
|
pageSize: this.info.pageSize, |
|
|
|
@ -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,34 @@ 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; |
|
|
|
|
@include mul-ellipsis(2); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.right { |
|
|
|
|
width: 14%; |
|
|
|
|
min-width: 240px; |
|
|
|
@ -909,7 +954,7 @@ export default { |
|
|
|
|
|
|
|
|
|
.contents { |
|
|
|
|
.articles { |
|
|
|
|
li { |
|
|
|
|
li:not(.news-notice) { |
|
|
|
|
flex-direction: column; |
|
|
|
|
|
|
|
|
|
.texts { |
|
|
|
@ -969,7 +1014,7 @@ export default { |
|
|
|
|
|
|
|
|
|
.contents { |
|
|
|
|
.articles { |
|
|
|
|
li { |
|
|
|
|
li:not(.news-notice) { |
|
|
|
|
flex-direction: column; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|