|
|
@ -82,105 +82,9 @@ |
|
|
|
<div class="d-flex align-center" style="height: 100%;cursor: pointer;" @click="openPage('news', '0204', '')">更多></div> |
|
|
|
</div> |
|
|
|
<!-- 轮播图 --> |
|
|
|
<banner class="banner" :ImgNews="ImgNews1" /> |
|
|
|
|
|
|
|
<el-carousel :interval="4000" type="card" class="banner" indicator-position="none"> |
|
|
|
<el-carousel-item v-for="newContent in ImgNews1" :key="newContent.introId"> |
|
|
|
<div class="rotation-box"> |
|
|
|
<img :src="newContent.titleUrl" style="height: 340px;width: 100%" alt="" /> |
|
|
|
<div class="rotation-div one-text"> |
|
|
|
{{ newContent.title }} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-carousel-item> |
|
|
|
</el-carousel> |
|
|
|
|
|
|
|
<el-carousel :interval="4000" type="card" class="banner mt-4" indicator-position="none"> |
|
|
|
<el-carousel-item v-for="newContent in ImgNews2" :key="newContent.introId"> |
|
|
|
<div class="rotation-box"> |
|
|
|
<img :src="newContent.titleUrl" style="height: 340px;width: 100%" alt="" /> |
|
|
|
<div class="rotation-div one-text"> |
|
|
|
{{ newContent.title }} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-carousel-item> |
|
|
|
</el-carousel> |
|
|
|
|
|
|
|
<el-carousel :interval="4000" type="card" class="banner mt-4" indicator-position="none"> |
|
|
|
<el-carousel-item v-for="newContent in ImgNews3" :key="newContent.introId"> |
|
|
|
<div class="rotation-box"> |
|
|
|
<img :src="newContent.titleUrl" style="height: 340px;width: 100%" alt="" /> |
|
|
|
<div class="rotation-div one-text"> |
|
|
|
{{ newContent.title }} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-carousel-item> |
|
|
|
</el-carousel> |
|
|
|
<!-- <div class="flex-1 flex-column justify-space-between mt-4"> |
|
|
|
<div class="flex-1"> |
|
|
|
<div class="flex-1 mr-4"> |
|
|
|
<a-carousel style="width: 650px" autoplay> |
|
|
|
<div class="rotation-box" v-for="newContent in ImgNews1" :key="newContent.introId"> |
|
|
|
<img :src="newContent.titleUrl" style="height: 369.5px;width: 100%" alt="" /> |
|
|
|
<div class="rotation-div one-text"> |
|
|
|
{{ newContent.title }} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</a-carousel> |
|
|
|
</div> |
|
|
|
<div class="news-img-content d-flex flex-column justify-space-between p-4"> |
|
|
|
<div class="d-flex" v-for="newContent in ImgNews1" :key="newContent.introId"> |
|
|
|
<div class="content-date"> |
|
|
|
<div class="content-date-day">{{ $moment(+newContent.publishTime).format('DD') }}</div> |
|
|
|
<div class="content-date-year">{{ $moment(+newContent.publishTime).format('YYYY-MM') }}</div> |
|
|
|
</div> |
|
|
|
<div class="flex-1 new-box-content-jj" @click="openPage('news', '0201', newContent.introId)">{{ newContent.title }}</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="flex-1 mt-4"> |
|
|
|
<div class="news-img-content d-flex flex-column justify-space-between p-4"> |
|
|
|
<div class="d-flex" v-for="newContent in ImgNews2" :key="newContent.introId"> |
|
|
|
<div class="content-date"> |
|
|
|
<div class="content-date-day">{{ $moment(+newContent.publishTime).format('DD') }}</div> |
|
|
|
<div class="content-date-year">{{ $moment(+newContent.publishTime).format('YYYY-MM') }}</div> |
|
|
|
</div> |
|
|
|
<div class="flex-1 new-box-content-jj" @click="openPage('news', '0202', newContent.introId)">{{ newContent.title }}</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="flex-1 ml-4"> |
|
|
|
<a-carousel style="width: 650px" autoplay> |
|
|
|
<div class="rotation-box" v-for="newContent in ImgNews2" :key="newContent.introId"> |
|
|
|
<img :src="newContent.titleUrl" style="height: 369.5px;width: 100%" alt="" /> |
|
|
|
<div class="rotation-div one-text"> |
|
|
|
{{ newContent.title }} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</a-carousel> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="flex-1 mt-4"> |
|
|
|
<div class="flex-1 mr-4"> |
|
|
|
<a-carousel style="width: 650px" autoplay> |
|
|
|
<div class="rotation-box" v-for="newContent in ImgNews3" :key="newContent.introId"> |
|
|
|
<img :src="newContent.titleUrl" style="height: 369.5px;width: 100%" alt="" /> |
|
|
|
<div class="rotation-div one-text"> |
|
|
|
{{ newContent.title }} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</a-carousel> |
|
|
|
</div> |
|
|
|
<div class="news-img-content d-flex flex-column justify-space-between p-4"> |
|
|
|
<div class="d-flex" v-for="newContent in ImgNews3" :key="newContent.introId"> |
|
|
|
<div class="content-date"> |
|
|
|
<div class="content-date-day">{{ $moment(+newContent.publishTime).format('DD') }}</div> |
|
|
|
<div class="content-date-year">{{ $moment(+newContent.publishTime).format('YYYY-MM') }}</div> |
|
|
|
</div> |
|
|
|
<div class="flex-1 new-box-content-jj" @click="openPage('news', '0203', newContent.introId)">{{ newContent.title }}</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> --> |
|
|
|
<banner class="banner" key="ImgNews1" v-if="ImgNews1.length" :img-news="ImgNews1" /> |
|
|
|
<banner class="banner" key="ImgNews2" v-if="ImgNews2.length" :img-news="ImgNews2" /> |
|
|
|
<banner class="banner" key="ImgNews3" v-if="ImgNews3.length" :img-news="ImgNews3" /> |
|
|
|
</div> |
|
|
|
<!-- 专题报道 光荣榜 今天我出镜 --> |
|
|
|
<div class="honor-box mt-4 d-flex justify-space-between"> |
|
|
@ -249,8 +153,8 @@ |
|
|
|
<div class="demeanor-content-box"> |
|
|
|
<div |
|
|
|
class="demeanor-content mr-4" |
|
|
|
v-for="item in sceneStyle" |
|
|
|
:key="item.introId" |
|
|
|
v-for="(item, index) in sceneStyle" |
|
|
|
:key="index" |
|
|
|
@click="openPage('news', '0210', item.introId)" |
|
|
|
> |
|
|
|
<img :src="item.titleUrl" style="height:260px;width:100%;cursor: pointer;" :title="item.title" /> |
|
|
@ -260,8 +164,8 @@ |
|
|
|
</div> |
|
|
|
<div |
|
|
|
class="demeanor-content mr-4" |
|
|
|
v-for="item in sceneStyle" |
|
|
|
:key="item.introId + '1'" |
|
|
|
v-for="(item, index) in sceneStyle" |
|
|
|
:key="index + '1'" |
|
|
|
@click="openPage('news', '0210', item.introId)" |
|
|
|
> |
|
|
|
<img :src="item.titleUrl" style="height:260px;width:100%;cursor: pointer;" :title="item.title" /> |
|
|
@ -316,6 +220,21 @@ export default { |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
...mapActions('home', ['getContent']), |
|
|
|
// 设置职工风采为5张图片 |
|
|
|
getFiveImg() { |
|
|
|
console.log('sceneStyle: '); |
|
|
|
let imgArr = [...this.sceneStyle]; |
|
|
|
if (imgArr.length < 5) { |
|
|
|
for (let i = 0; i < imgArr.length; i++) { |
|
|
|
this.sceneStyle.push(imgArr[i]); |
|
|
|
if (this.sceneStyle[i].length > 5) { |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
this.getFiveImg(); |
|
|
|
} |
|
|
|
console.log('this.sceneStyle: ', this.sceneStyle); |
|
|
|
}, |
|
|
|
async getData(showPage, list, showType) { |
|
|
|
try { |
|
|
|
const param = { |
|
|
@ -327,6 +246,10 @@ export default { |
|
|
|
}; |
|
|
|
const res = await this.getContent(param); |
|
|
|
this[list] = res.list; |
|
|
|
if (showPage === '0210') { |
|
|
|
console.log('showPage: ', showPage); |
|
|
|
this.getFiveImg(); |
|
|
|
} |
|
|
|
} catch (error) { |
|
|
|
console.log('error: ', error); |
|
|
|
} |
|
|
|