| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733 |
- <template>
- <!-- 样式1 -->
- <div class="scrollTextSectorBox" v-if="componentStyle == 1">
- <div class="scrollTextSectorLeft">
- <div class="bannerSwiperStyle5">
- <el-carousel :interval="3333" height="480px" arrow="always" @change="change_fun"
- indicator-position="bottom">
- <el-carousel-item v-for="item in component_style1_News1Array" :key="item.id">
- <NuxtLink :href="getLinkPathDetail(item)" :title="item.title"
- :target="item.islink == 1 ? '_blank' : '_self'">
- <img :src="item.imgurl" />
- <span class="swiper_dot1 dot1">
- {{ item.title }}
- </span>
- </NuxtLink>
- </el-carousel-item>
- </el-carousel>
- </div>
- </div>
- <div class="scrollTextSectorRight">
- <div class="BannerListBox BannerListBoxStyle4">
- <div class="listNewsTitle">
- <span>{{ titleLink.alias }}</span>
- </div>
- <p class="listNewsText_img_li" v-for="item in component_style1_News1Array">
- <NuxtLink :href="getLinkPathDetail(item)" :title="item.title"
- :target="item.islink == 1 ? '_blank' : '_self'">
- <span class="listNewsText_li_img_box">
- <img :src="item.imgurl">
- </span>
- <span class="listNewsText_li_img_dot4">{{ item.title }}</span>
- </NuxtLink>
- </p>
- <div class="listNewsText" v-for="item in component_style1_News2Array">
- <NuxtLink :href="getLinkPathDetail(item)" :title="item.title"
- :target="item.islink == 1 ? '_blank' : '_self'">
- <span class="text">{{ item.title }}</span>
- <span class="time">{{ item.update_time }}</span>
- </NuxtLink>
- </div>
- </div>
- </div>
- </div>
- <!-- 样式2 -->
- <div class="scrollTextSectorBox" v-if="componentStyle == 2">
- <div class="scrollTextSectorRight">
- <div class="BannerListBox BannerListBoxStyle2">
- <div class="listNewsTitle">
- <span>{{ titleLink.alias }}</span>
- </div>
- <p class="listNewsText_img_li" v-for="item in component_style1_News1Array">
- <NuxtLink :href="getLinkPathDetail(item)" :title="item.title"
- :target="item.islink == 1 ? '_blank' : '_self'">
- <span class="listNewsText_li_img_box">
- <img :src="item.imgurl">
- </span>
- <span class="listNewsText_li_img_dot4">{{ item.title }}</span>
- </NuxtLink>
- </p>
- <div class="listNewsText" v-for="item in component_style1_News2Array">
- <NuxtLink :href="getLinkPathDetail(item)" :title="item.title"
- :target="item.islink == 1 ? '_blank' : '_self'">
- <span class="text">{{ item.title }}</span>
- <span class="time">{{ item.update_time }}</span>
- </NuxtLink>
- </div>
- </div>
- </div>
- <div class="scrollTextSectorLeft">
- <div class="bannerSwiperStyle5">
- <el-carousel :interval="3333" height="480px" arrow="always" @change="change_fun"
- indicator-position="bottom">
- <el-carousel-item v-for="item in component_style1_News1Array" :key="item.id">
- <NuxtLink :href="getLinkPathDetail(item)" :title="item.title"
- :target="item.islink == 1 ? '_blank' : '_self'">
- <img :src="item.imgurl" />
- <span class="swiper_dot1 dot1">
- {{ item.title }}
- </span>
- </NuxtLink>
- </el-carousel-item>
- </el-carousel>
- </div>
- </div>
- </div>
- <!-- 样式3 -->
- <div class="scrollTextSectorBox" v-if="componentStyle == 3">
- <div class="scrollTextSectorLeft">
- <div class="bannerSwiperStyle5">
- <el-carousel :interval="3333" height="480px" arrow="always" @change="change_fun"
- indicator-position="bottom">
- <el-carousel-item v-for="item in component_style1_News1Array" :key="item.id">
- <NuxtLink :href="getLinkPathDetail(item)" :title="item.title"
- :target="item.islink == 1 ? '_blank' : '_self'">
- <img :src="item.imgurl" />
- <span class="swiper_dot1 dot1">
- {{ item.title }}
- </span>
- </NuxtLink>
- </el-carousel-item>
- </el-carousel>
- </div>
- </div>
- <div class="scrollTextSectorRight">
- <div class="BannerListBox BannerListBoxStyle1">
- <div class="listNewsTitle">
- <span>{{ titleLink.alias }}</span>
- </div>
- <div class="listNewsText" v-for="item in component_style1_News3Array">
- <NuxtLink :href="getLinkPathDetail(item)" :title="item.title"
- :target="item.islink == 1 ? '_blank' : '_self'">
- <span class="text">{{ item.title }}</span>
- <span class="time">{{ item.update_time }}</span>
- </NuxtLink>
- </div>
- </div>
- </div>
- </div>
- <!-- 样式4 -->
- <div class="scrollTextSectorBox" v-if="componentStyle == 4">
- <div class="scrollTextSectorRight">
- <div class="BannerListBox BannerListBoxStyle1">
- <div class="listNewsTitle">
- <span>{{ titleLink.alias }}</span>
- </div>
- <div class="listNewsText" v-for="item in component_style1_News3Array">
- <NuxtLink :href="getLinkPathDetail(item)" :title="item.title"
- :target="item.islink == 1 ? '_blank' : '_self'">
- <span class="text">{{ item.title }}</span>
- <span class="time">{{ item.update_time }}</span>
- </NuxtLink>
- </div>
- </div>
- </div>
- <div class="scrollTextSectorLeft">
- <div class="bannerSwiperStyle5">
- <el-carousel :interval="3333" height="480px" arrow="always" @change="change_fun"
- indicator-position="bottom">
- <el-carousel-item v-for="item in component_style1_News1Array" :key="item.id">
- <NuxtLink :href="getLinkPathDetail(item)" :title="item.title"
- :target="item.islink == 1 ? '_blank' : '_self'">
- <img :src="item.imgurl" />
- <span class="swiper_dot1 dot1">
- {{ item.title }}
- </span>
- </NuxtLink>
- </el-carousel-item>
- </el-carousel>
- </div>
- </div>
- </div>
- </template>
- <script setup>
- //引入vue
- import { ref } from 'vue';
- import { ElCarousel, ElCarouselItem } from 'element-plus'
- //获得新闻数据
- const props = defineProps({
- titleLink: Object,//板块名称
- templateData: Array,//新闻数据
- componentStyle: Number,//样式编号
- templateAdData: Object,//广告
- });
- //轮播图
- const roll_num_this = ref(0)
- const roll_num_lang = ref(props.templateData.imgnum.length - 1);
- const change_fun = (the_1) => {
- roll_num_this.value = the_1
- }
- //样式1与样式2共用 start ---------------------------------------->
- const component_style1_News1Array = ref([]);
- component_style1_News1Array.value = props.templateData.imgnum.slice(0, 1);
- const component_style1_News2Array = ref([]);
- component_style1_News2Array.value = props.templateData.textnum.slice(1, 7);
- const component_style1_News3Array = ref([]);
- component_style1_News3Array.value = props.templateData.textnum.slice(0, 9);
- //样式1与样式2共用 end ---------------------------------------->
- </script>
- <style lang="less" scoped>
- //基本样式 start ---------------------------------------->
- .scrollTextSectorBox {
- width: 1200px;
- height: 480px;
- position: relative;
- display: flex;
- align-items: center;
- justify-content: space-between;
- img {
- width: 720px;
- height: 480px;
- display: block;
- }
- .scrollTextSectorLeft {
- width: 720px;
- height: 480px;
- .bannerSwiperStyle5 {
- position: relative;
- img {
- width: 100%;
- height: 100%;
- display: block;
- }
- .roll_num_box {
- position: absolute;
- z-index: 2;
- right: 35px;
- bottom: 5px;
- height: 60px;
- line-height: 60px;
- color: #fff;
- font-size: 20px;
- .roll_num_box_new {
- font-size: 20px;
- }
- }
- .dot1 {
- display: block;
- word-break: keep-all;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .swiper_dot1 {
- display: block;
- width: 100%;
- line-height: 60px;
- height: 60px;
- color: #fff;
- font-size: 18px;
- font-weight: bold;
- text-indent: 20px;
- position: absolute;
- bottom: 0;
- left: 0;
- z-index: 10;
- box-sizing: border-box;
- background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, .5));
- box-sizing: border-box;
- padding-right: 40%;
- }
- .el-carousel {
- /deep/.el-carousel__arrow i {
- font-size: 33px !important;
- }
- .roll_1_box {
- position: relative;
- }
- /deep/.el-carousel__arrow--left {
- display: none;
- left: 20px;
- width: 34px;
- height: 80px;
- color: #eee;
- background: rgba(0, 0, 0, 0.5);
- border-radius: 50%;
- position: absolute;
- border: none;
- border-radius: 0px;
- }
- /deep/.el-icon-arrow-left:before {
- font-size: 24px;
- line-height: 56px;
- }
- /deep/.el-carousel__arrow--right {
- display: none;
- right: 20px;
- width: 34px;
- height: 80px;
- color: #eee;
- background: #00000080;
- position: absolute;
- border: none;
- border-radius: 0px;
- }
- /deep/.el-icon-arrow-right:before {
- font-size: 24px;
- line-height: 56px;
- }
- /deep/ .el-carousel__indicators {
- // 指示器
- left: unset;
- transform: unset;
- right: 10px;
- bottom: 11px;
- }
- /deep/ .el-carousel__button {
- // 指示器按钮
- width: 12px;
- height: 12px;
- border: none;
- background: #ccc;
- opacity: 1;
- }
- /deep/ .is-active .el-carousel__button {
- // 指示器激活按钮
- background: #fff;
- width: 12px;
- height: 12px;
- opacity: 1;
- border-radius: 0px;
- }
- /deep/ .el-carousel__container {
- height: 100%;
- }
- }
- .custom-indicator button {
- background-color: #fff;
- opacity: 1;
- width: 8px;
- height: 8px;
- }
- .custom-indicator button.is-active {
- background-color: #c82200;
- width: 58px;
- opacity: 1;
- }
- /deep/ .el-carousel__indicator--horizontal {
- padding: 12px 5px;
- }
- }
- }
- .scrollTextSectorRight {
- width: 450px;
- height: 480px;
- .listNewsTitle {
- font-size: 22px;
- font-weight: bold;
- color: #004564;
- margin-bottom: 20px;
- box-sizing: border-box;
- a {
- color: #004564;
- display: block;
- height: 25px;
- line-height: 25px;
- }
- }
- .scrollTextSectorList {
- div {
- font-size: 18px;
- height: 24px;
- line-height: 24px;
- margin-bottom: 16px;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- span {
- margin-right: 5px;
- color: #004564;
- }
- a {
- color: #333333;
- }
- &:last-child {
- margin-bottom: 0;
- }
- }
- }
- }
- }
- //基本样式 end ---------------------------------------->
- //右侧新闻列表 end ---------------------------------------->
- //基本样式
- .BannerListBox {
- div {
- cursor: pointer;
- font-size: 18px;
- color: #333;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- height: 24px;
- line-height: 24px;
- margin-bottom: 24px;
- &:last-child {
- margin-bottom: 0;
- }
- }
- .listNewsTitle {
- font-size: 22px;
- font-weight: bold;
- height: 47px;
- line-height: 47px;
- border-top: 2px solid #A72213;
- border-bottom: 1px solid #DCDDDF;
- color: #A72213;
- margin-bottom: 20px;
- box-sizing: border-box;
- span {
- display: inline-block;
- color: #A72213;
- height: 47px;
- line-height: 47px;
- // border-bottom: 6px solid #3848a0;
- font-weight: bold;
- /* 可选:为了避免内容紧贴边框,添加内边距 */
- }
- }
- .listNewsText {
- position: relative;
- a {
- color: #333;
- }
- .text {
- display: block;
- width: 100%;
- padding-right: 13px;
- overflow: hidden;
- box-sizing: border-box;
- text-overflow: ellipsis;
- white-space: nowrap;
- height: 24px;
- text-indent: 16px;
- line-height: 24px;
- }
- .time {
- position: absolute;
- top: 0;
- right: 0;
- display: inline-block;
- width: 51px;
- color: #999999;
- display: none;
- }
- }
- }
- //样式1
- .BannerListBoxStyle1 {
- .listNewsText::before {
- content: '';
- display: block;
- position: absolute;
- top: 9px;
- left: 0px;
- width: 6px;
- height: 6px;
- background-color: #d7daec;
- margin-right: 10px;
- vertical-align: 10px;
- }
- }
- //样式2
- .BannerListBoxStyle2 {
- .listNewsText::before {
- content: '';
- display: block;
- position: absolute;
- top: 9px;
- left: 0px;
- width: 6px;
- height: 6px;
- background-color: #d7daec;
- margin-right: 10px;
- vertical-align: 10px;
- }
- .listNewsText_img_li {
- width: 100%;
- display: flex;
- height: 130px;
- margin: 0px 0px 21px 0px;
- a {
- display: flex;
- align-items: center;
- img {
- width: 185px;
- height: 130px;
- }
- }
- }
- .listNewsText_li_img_box {
- margin-right: 20px;
- height: 100%;
- width: 185px;
- height: 130px;
- }
- .listNewsText_li_img_box img {
- display: block;
- width: 100%;
- height: 100%;
- }
- .listNewsText_li_img_dot4 {
- display: block;
- flex: 1;
- width: 100%;
- color: #333;
- font-size: 18px;
- overflow: hidden;
- margin-top: 17px;
- height: 96px;
- box-sizing: border-box;
- padding-right: 13px;
- line-height: 24px;
- overflow: hidden;
- display: -webkit-box !important;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 4;
- word-wrap: break-word;
- overflow-wrap: break-word;
- white-space: pre-wrap;
- word-break: break-all;
- }
- }
- //样式2
- .BannerListBoxStyle3 {
- .listNewsText::before {
- content: '';
- display: block;
- position: absolute;
- top: 9px;
- left: 0px;
- width: 6px;
- height: 6px;
- background-color: #d7daec;
- margin-right: 10px;
- vertical-align: 10px;
- }
- }
- //样式2
- .BannerListBoxStyle4 {
- .listNewsText::before {
- content: '';
- display: block;
- position: absolute;
- top: 9px;
- left: 0px;
- width: 6px;
- height: 6px;
- background-color: #d7daec;
- margin-right: 10px;
- vertical-align: 10px;
- }
- .listNewsText_img_li {
- width: 100%;
- display: flex;
- height: 130px;
- margin: 0px 0px 21px 0px;
- a {
- display: flex;
- align-items: center;
- justify-content: space-between;
- }
- }
- .listNewsText_li_img_box {
- margin-right: 20px;
- height: 100%;
- width: 185px;
- height: 130px;
- }
- .listNewsText_li_img_box img {
- display: block;
- width: 100%;
- height: 100%;
- }
- .listNewsText_li_img_dot4 {
- display: block;
- flex: 1;
- width: 100%;
- color: #333;
- font-size: 18px;
- overflow: hidden;
- margin-top: 17px;
- height: 96px;
- box-sizing: border-box;
- padding-right: 13px;
- line-height: 24px;
- overflow: hidden;
- display: -webkit-box !important;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 4;
- word-wrap: break-word;
- overflow-wrap: break-word;
- white-space: pre-wrap;
- word-break: break-all;
- }
- }
- //样式5
- .BannerListBoxStyle5 {
- .listNewsText::before {
- content: '';
- display: inline-block;
- width: 6px;
- height: 6px;
- background-color: #3848a0;
- margin-right: 10px;
- vertical-align: 10px;
- }
- }
- //样式6
- .BannerListBoxStyle6 {
- .listNewsText::before {
- content: '';
- display: inline-block;
- width: 6px;
- height: 6px;
- background-color: #3848a0;
- margin-right: 10px;
- vertical-align: 10px;
- }
- }
- //样式7
- .BannerListBoxStyle7 {
- .listNewsTitle {
- border-bottom: 1px dashed #999999;
- }
- .listNewsText::before {
- content: '';
- display: inline-block;
- width: 6px;
- height: 6px;
- background-color: #d7daec;
- margin-right: 10px;
- vertical-align: 10px;
- }
- }
- //样式8
- .BannerListBoxStyle8 {
- .listNewsTitle {
- border-bottom: 1px dashed #999999;
- }
- .listNewsText::before {
- content: '';
- display: inline-block;
- width: 6px;
- height: 6px;
- background-color: #d7daec;
- margin-right: 10px;
- vertical-align: 10px;
- }
- }
- //样式9
- .BannerListBoxStyle9 {
- .listNewsTitle {
- border-bottom: 1px dashed #999999;
- }
- }
- //样式10
- .BannerListBoxStyle10 {
- .listNewsTitle {
- border-bottom: 1px dashed #999999;
- }
- }
- //样式11
- .BannerListBoxStyle11 {
- .listNewsText::before {
- content: '';
- display: inline-block;
- width: 6px;
- height: 6px;
- background-color: #3848a0;
- margin-right: 10px;
- vertical-align: 10px;
- }
- }
- //样式12
- .BannerListBoxStyle12 {
- .listNewsText::before {
- content: '';
- display: inline-block;
- width: 6px;
- height: 6px;
- background-color: #3848a0;
- margin-right: 10px;
- vertical-align: 10px;
- }
- }
- </style>
|