添加新闻公告

master
yujialong 2 years ago
parent ca6c5d6426
commit ea09b5f0bf
  1. 52
      src/pages/column/index.vue
  2. 2
      src/pages/newsPress/index.vue
  3. 2
      src/pages/newsProcurement/index.vue

@ -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,
@ -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,33 @@ 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;
}
}
.right { .right {
width: 14%; width: 14%;
min-width: 240px; min-width: 240px;

@ -89,7 +89,7 @@ export default {
}, },
// //
getColumn() { getColumn() {
this.$post(`${this.api.oneLevelChecksThemAll}?id=${this.id}&isSort=1`).then(({ data }) => { this.$post(`${this.api.oneLevelChecksThemAll}?id=${this.id}&isSort=1&siteId=${this.site}`).then(({ data }) => {
this.getParent(data, this.id) this.getParent(data, this.id)
}).catch(err => {}) }).catch(err => {})
}, },

@ -89,7 +89,7 @@ export default {
}, },
// //
getColumn() { getColumn() {
this.$post(`${this.api.oneLevelChecksThemAll}?id=${this.id}&isSort=1`).then(({ data }) => { this.$post(`${this.api.oneLevelChecksThemAll}?id=${this.id}&isSort=1&siteId=${this.site}`).then(({ data }) => {
this.getParent(data, this.id) this.getParent(data, this.id)
}).catch(err => {}) }).catch(err => {})
}, },

Loading…
Cancel
Save