<template>
    <div class="listNewsBox">
        <div class="listNewsTitle_skin2">
            <span>
                <NuxtLink
                    v-if="titleLink.cid"
                    :href="getLinkPath(titleLink)"
                    :title="titleLink.alias"
                >
                    {{titleLink.alias}}
                </NuxtLink>
            </span>
        </div>
        <!--样式1-->
        <div class="listNewsContent" v-if="componentStyle==1">
            <div class="listNewsContentItem" v-for="(item,index) in component_style1_News1Array">
                <NuxtLink 
                    :href="getLinkPathDetail(item)" 
                    :title="item.title"
                    :target="item.islink == 1 ? '_blank' : '_self'"
                >
                    <div class="listNewsContentItemLeft">
                        <img :src="item.imgurl" />
                        <span class="icon1" v-if="index==0"></span>
                        <span class="icon2" v-if="index==1"></span>
                        <span class="icon3" v-if="index==2"></span>
                    </div>
                    <div class="listNewsContentItemRight">
                        {{ item.title }}
                    </div>
                </NuxtLink>
            </div>
        </div>
        <!--样式2-->
        <div class="listNewsContent listNewsStyle2" v-if="componentStyle==2">
            <div class="listNewsContentItem" v-for="(item,index) in component_style1_News1Array">
                <NuxtLink 
                    :href="getLinkPathDetail(item)" 
                    :title="item.title"
                    :target="item.islink == 1 ? '_blank' : '_self'"
                >
                    <div class="listNewsContentItemLeft">
                        <img :src="item.imgurl" />
                        <span class="icon1" v-if="index==0"></span>
                        <span class="icon2" v-if="index==1"></span>
                        <span class="icon3" v-if="index==2"></span>
                    </div>
                    <div class="listNewsContentItemRight">
                        {{ item.title }}
                    </div>
                </NuxtLink>
            </div>
        </div>
        <!--样式3-->
        <div class="listNewsContent listNewsStyle3" v-if="componentStyle == 3">
            <div class="listNewsContentItem" v-for="(item,index) in component_style1_News1Array" :key="index">
                <NuxtLink 
                    :href="getLinkPathDetail(item)" 
                    :title="item.title"
                    :target="item.islink == 1 ? '_blank' : '_self'"
                >
                    <div class="listNewsContentItemLeft">
                        <img :src="item.imgurl" />
                        <span class="icon1" v-if="index==0"></span>
                        <span class="icon2" v-if="index==1"></span>
                        <span class="icon3" v-if="index==2"></span>
                    </div>
                    <div class="listNewsContentItemRight">
                        {{ item.title }}
                    </div>
                </NuxtLink>
            </div>
        </div>
        <!--样式4-->
        <div class="listNewsContent listNewsStyle4" v-if="componentStyle == 4">
            <div class="listNewsContentItem" v-for="(item,index) in component_style1_News1Array" :key="index">
                <NuxtLink 
                    :href="getLinkPathDetail(item)" 
                    :title="item.title"
                    :target="item.islink == 1 ? '_blank' : '_self'"
                >
                    <div class="listNewsContentItemLeft">
                        <img :src="item.imgurl" />
                        <span class="icon1" v-if="index==0"></span>
                        <span class="icon2" v-if="index==1"></span>
                        <span class="icon3" v-if="index==2"></span>
                    </div>
                    <div class="listNewsContentItemRight">
                        {{ item.title }}
                    </div>
                </NuxtLink>
            </div>
        </div>
        <!--样式5-->
        <div class="listNewsContent listNewsStyle5" v-if="componentStyle == 5">
            <div class="listNewsContentItem" v-for="(item,index) in component_style1_News1Array" :key="index">
                <NuxtLink 
                    :href="getLinkPathDetail(item)" 
                    :title="item.title"
                    :target="item.islink == 1 ? '_blank' : '_self'"
                >
                    <div class="listNewsContentItemLeft">
                        <img :src="item.imgurl" />
                        <span class="icon1" v-if="index==0"></span>
                        <span class="icon2" v-if="index==1"></span>
                        <span class="icon3" v-if="index==2"></span>
                    </div>
                    <div class="listNewsContentItemRight">
                        {{ item.title }}
                    </div>
                </NuxtLink>
            </div>
        </div>
        <!--样式6-->
        <div class="listNewsContent listNewsStyle6" v-if="componentStyle == 6">
            <div class="listNewsContentItem" v-for="(item,index) in component_style1_News1Array" :key="index">
                <NuxtLink 
                    :href="getLinkPathDetail(item)" 
                    :title="item.title"
                    :target="item.islink == 1 ? '_blank' : '_self'"
                >
                    <div class="listNewsContentItemLeft">
                        <img :src="item.imgurl" />
                        <span class="icon1" v-if="index==0"></span>
                        <span class="icon2" v-if="index==1"></span>
                        <span class="icon3" v-if="index==2"></span>
                    </div>
                    <div class="listNewsContentItemRight">
                        {{ item.title }}
                    </div>
                </NuxtLink>
            </div>
        </div>
        <!-- 样式7 -->
        <div class="listNewsContent listNewsStyle7" v-if="componentStyle == 7">
            <div class="listNewsContentItem" v-for="(item,index) in component_style1_News1Array_1" :key="index">
                <NuxtLink 
                    :href="getLinkPathDetail(item)" 
                    :title="item.title"
                    :target="item.islink == 1 ? '_blank' : '_self'"
                >
                    <div class="listNewsContentItemRight">
                        {{ item.title }}
                    </div>
                    <div class="listNewsContentItemLeft">
                        <img :src="item.imgurl" />
                        <span class="icon1" v-if="index==0"></span>
                        <span class="icon2" v-if="index==1"></span>
                        <span class="icon3" v-if="index==2"></span>
                    </div>
                </NuxtLink>
            </div>
            <div class="listNewsContentItem" v-for="(item,index) in component_style1_News1Array_2" :key="index">
                <NuxtLink 
                    :href="getLinkPathDetail(item)" 
                    :title="item.title"
                    :target="item.islink == 1 ? '_blank' : '_self'"
                >
                    <div class="listNewsContentItemLeft">
                        <img :src="item.imgurl" />
                    </div>
                    <div class="listNewsContentItemRight">
                        {{ item.title }}
                    </div>
                </NuxtLink>
            </div>
        </div>
        <!-- 样式8 -->
        <div class="listNewsContent listNewsStyle8" v-if="componentStyle == 8">
            <div class="listNewsContentItem" v-for="(item,index) in component_style1_News1Array_1" :key="index">
                <NuxtLink 
                    :href="getLinkPathDetail(item)" 
                    :title="item.title"
                    :target="item.islink == 1 ? '_blank' : '_self'"
                >
                    <div class="listNewsContentItemRight">
                        {{ item.title }}
                    </div>
                    <div class="listNewsContentItemLeft">
                        <img :src="item.imgurl" />
                        <span class="icon1" v-if="index==0"></span>
                        <span class="icon2" v-if="index==1"></span>
                        <span class="icon3" v-if="index==2"></span>
                    </div>
                </NuxtLink>
            </div>
            <div class="listNewsContentItem" v-for="(item,index) in component_style1_News1Array_2" :key="index">
                <NuxtLink 
                    :href="getLinkPathDetail(item)" 
                    :title="item.title"
                    :target="item.islink == 1 ? '_blank' : '_self'"
                >
                    <div class="listNewsContentItemLeft">
                        <img :src="item.imgurl" />
                    </div>
                    <div class="listNewsContentItemRight">
                        {{ item.title }}
                    </div>
                </NuxtLink>
            </div>
        </div>
        <!-- 样式9 -->
        <div class="listNewsContent listNewsStyle9" v-if="componentStyle == 9">
            <div class="listNewsContentItem" v-for="(item,index) in component_style1_News1Array_1" :key="index">
                <NuxtLink 
                    :href="getLinkPathDetail(item)" 
                    :title="item.title"
                    :target="item.islink == 1 ? '_blank' : '_self'"
                >
                    <div class="listNewsContentItemRight">
                        {{ item.title }}
                    </div>
                    <div class="listNewsContentItemLeft">
                        <img :src="item.imgurl" />
                        <span class="icon1" v-if="index==0"></span>
                        <span class="icon2" v-if="index==1"></span>
                        <span class="icon3" v-if="index==2"></span>
                    </div>
                </NuxtLink>
            </div>
            <div class="listNewsContentItem" v-for="(item,index) in component_style1_News1Array_2" :key="index">
                <NuxtLink 
                    :href="getLinkPathDetail(item)" 
                    :title="item.title"
                    :target="item.islink == 1 ? '_blank' : '_self'"
                >
                    <div class="listNewsContentItemLeft">
                        <img :src="item.imgurl" />
                    </div>
                    <div class="listNewsContentItemRight">
                        {{ item.title }}
                    </div>
                </NuxtLink>
            </div>
        </div>
        <!-- 样式10 -->
        <div class="listNewsContent listNewsStyle10" v-if="componentStyle == 10">
            <div class="listNewsContentItem" v-for="(item,index) in component_style1_News1Array_1" :key="index">
                <NuxtLink 
                    :href="getLinkPathDetail(item)" 
                    :title="item.title"
                    :target="item.islink == 1 ? '_blank' : '_self'"
                >
                    <div class="listNewsContentItemRight">
                        {{ item.title }}
                    </div>
                    <div class="listNewsContentItemLeft">
                        <img :src="item.imgurl" />
                        <span class="icon1" v-if="index==0"></span>
                        <span class="icon2" v-if="index==1"></span>
                        <span class="icon3" v-if="index==2"></span>
                    </div>
                </NuxtLink>
            </div>
            <div class="listNewsContentItem" v-for="(item,index) in component_style1_News1Array_2" :key="index">
                <NuxtLink 
                    :href="getLinkPathDetail(item)" 
                    :title="item.title"
                    :target="item.islink == 1 ? '_blank' : '_self'"
                >
                    <div class="listNewsContentItemLeft">
                        <img :src="item.imgurl" />
                    </div>
                    <div class="listNewsContentItemRight">
                        {{ item.title }}
                    </div>
                </NuxtLink>
            </div>
        </div>
        <!-- 样式11 -->
        <div class="listNewsContent listNewsStyle11" v-if="componentStyle == 11">
            <div class="listNewsContentItem" v-for="(item,index) in component_style1_News1Array_1" :key="index">
                <NuxtLink 
                    :href="getLinkPathDetail(item)" 
                    :title="item.title"
                    :target="item.islink == 1 ? '_blank' : '_self'"
                >
                    <div class="listNewsContentItemRight">
                        {{ item.title }}
                    </div>
                    <div class="listNewsContentItemLeft">
                        <img :src="item.imgurl" />
                        <span class="icon1" v-if="index==0"></span>
                        <span class="icon2" v-if="index==1"></span>
                        <span class="icon3" v-if="index==2"></span>
                    </div>
                </NuxtLink>
            </div>
            <div class="listNewsContentItem" v-for="(item,index) in component_style1_News1Array_2" :key="index">
                <NuxtLink 
                    :href="getLinkPathDetail(item)" 
                    :title="item.title"
                    :target="item.islink == 1 ? '_blank' : '_self'"
                >
                    <div class="listNewsContentItemLeft">
                        <img :src="item.imgurl" />
                    </div>
                    <div class="listNewsContentItemRight">
                        {{ item.title }}
                    </div>
                </NuxtLink>
            </div>
        </div>
        <!-- 样式12 -->
        <div class="listNewsContent listNewsStyle12" v-if="componentStyle == 12">
            <div class="listNewsContentItem" v-for="(item,index) in component_style1_News1Array_1" :key="index">
                <NuxtLink 
                    :href="getLinkPathDetail(item)" 
                    :title="item.title"
                    :target="item.islink == 1 ? '_blank' : '_self'"
                >
                    <div class="listNewsContentItemRight">
                        {{ item.title }}
                    </div>
                    <div class="listNewsContentItemLeft">
                        <img :src="item.imgurl" />
                        <span class="icon1" v-if="index==0"></span>
                        <span class="icon2" v-if="index==1"></span>
                        <span class="icon3" v-if="index==2"></span>
                    </div>
                </NuxtLink>
            </div>
            <div class="listNewsContentItem" v-for="(item,index) in component_style1_News1Array_2" :key="index">
                <NuxtLink 
                    :href="getLinkPathDetail(item)" 
                    :title="item.title"
                    :target="item.islink == 1 ? '_blank' : '_self'"
                >
                    <div class="listNewsContentItemLeft">
                        <img :src="item.imgurl" />
                    </div>
                    <div class="listNewsContentItemRight">
                        {{ item.title }}
                    </div>
                </NuxtLink>
            </div>
        </div>
        <!--样式13-->
        <div class="listNewsContent listNewsStyle13" v-if="componentStyle == 13">
            <div class="listNewsContentItem" v-for="(item,index) in component_style1_News1Array">
                <NuxtLink 
                    :href="getLinkPathDetail(item)" 
                    :title="item.title"
                    :target="item.islink == 1 ? '_blank' : '_self'"
                >
                    <div class="listNewsContentItemRight">
                        {{ item.title }}
                    </div>
                    <div class="listNewsContentItemLeft">
                        <img :src="item.imgurl" />
                        <span class="icon1" v-if="index==0"></span>
                        <span class="icon2" v-if="index==1"></span>
                        <span class="icon3" v-if="index==2"></span>
                    </div>
                </NuxtLink>
            </div>
        </div>
        <!--样式14-->
        <div class="listNewsContent listNewsStyle14" v-if="componentStyle == 14">
            <div class="listNewsContentItem" v-for="(item,index) in component_style1_News1Array">
                <NuxtLink 
                    :href="getLinkPathDetail(item)" 
                    :title="item.title"
                    :target="item.islink == 1 ? '_blank' : '_self'"
                >
                    <div class="listNewsContentItemRight">
                        {{ item.title }}
                    </div>
                    <div class="listNewsContentItemLeft">
                        <img :src="item.imgurl" />
                        <span class="icon1" v-if="index==0"></span>
                        <span class="icon2" v-if="index==1"></span>
                        <span class="icon3" v-if="index==2"></span>
                    </div>
                </NuxtLink>
            </div>
        </div>
        <!--样式15-->
        <div class="listNewsContent listNewsStyle15" v-if="componentStyle == 15">
            <div class="listNewsContentItem" v-for="(item,index) in component_style1_News1Array">
                <NuxtLink 
                    :href="getLinkPathDetail(item)" 
                    :title="item.title"
                    :target="item.islink == 1 ? '_blank' : '_self'"
                >
                    <div class="listNewsContentItemRight">
                        {{ item.title }}
                    </div>
                    <div class="listNewsContentItemLeft">
                        <img :src="item.imgurl" />
                        <span class="icon1" v-if="index==0"></span>
                        <span class="icon2" v-if="index==1"></span>
                        <span class="icon3" v-if="index==2"></span>
                    </div>
                </NuxtLink>
            </div>
        </div>
        <!--样式16-->
        <div class="listNewsContent listNewsStyle16" v-if="componentStyle == 16">
            <div class="listNewsContentItem" v-for="(item,index) in component_style1_News1Array">
                <NuxtLink 
                    :href="getLinkPathDetail(item)" 
                    :title="item.title"
                    :target="item.islink == 1 ? '_blank' : '_self'"
                >
                    <div class="listNewsContentItemRight">
                        {{ item.title }}
                    </div>
                    <div class="listNewsContentItemLeft">
                        <img :src="item.imgurl" />
                        <span class="icon1" v-if="index==0"></span>
                        <span class="icon2" v-if="index==1"></span>
                        <span class="icon3" v-if="index==2"></span>
                    </div>
                </NuxtLink>
            </div>
        </div>
        <!--样式17-->
        <div class="listNewsContent listNewsStyle17" v-if="componentStyle == 17">
            <div class="listNewsContentItem" v-for="(item,index) in component_style1_News1Array">
                <NuxtLink 
                    :href="getLinkPathDetail(item)" 
                    :title="item.title"
                    :target="item.islink == 1 ? '_blank' : '_self'"
                >
                    <div class="listNewsContentItemRight">
                        {{ item.title }}
                    </div>
                    <div class="listNewsContentItemLeft">
                        <img :src="item.imgurl" />
                        <span class="icon1" v-if="index==0"></span>
                        <span class="icon2" v-if="index==1"></span>
                        <span class="icon3" v-if="index==2"></span>
                    </div>
                </NuxtLink>
            </div>
        </div>
        <!--样式18-->
        <div class="listNewsContent listNewsStyle18" v-if="componentStyle == 18">
            <div class="listNewsContentItem" v-for="(item,index) in component_style1_News1Array">
                <NuxtLink 
                    :href="getLinkPathDetail(item)" 
                    :title="item.title"
                    :target="item.islink == 1 ? '_blank' : '_self'"
                >
                    <div class="listNewsContentItemRight">
                        {{ item.title }}
                    </div>
                    <div class="listNewsContentItemLeft">
                        <img :src="item.imgurl" />
                        <span class="icon1" v-if="index==0"></span>
                        <span class="icon2" v-if="index==1"></span>
                        <span class="icon3" v-if="index==2"></span>
                    </div>
                </NuxtLink>
            </div>
        </div>
    </div>
</template>

<script setup>
//引入vue
import {ref} from 'vue';
//获得新闻数据
const props = defineProps({
    titleLink:Object,//板块名称
    templateData:Array,//新闻数据
    componentStyle:Number,//样式编号
});
//样式1与样式2共用 start ---------------------------------------->
const component_style1_News1Array = ref({});
const component_style1_News1Array_1 = ref({});
const component_style1_News1Array_2 = ref({});
component_style1_News1Array.value = props.templateData.imgnum.slice(0,7);
component_style1_News1Array_1.value = props.templateData.imgnum.slice(0,3);
component_style1_News1Array_2.value = props.templateData.imgnum.slice(3,7);
//样式1与样式2共用 end ---------------------------------------->
</script>

<style lang="less" scoped>
//基本样式 start ---------------------------------------->
.listNewsBox {
    position: relative;
    .listNewsTitle {
        font-size:22px;
        font-weight:bold;
        height: 40px;
        line-height: 40px;
        border-bottom: 2px solid #004564;
        color:#004564;
        margin-bottom: 20px;
        box-sizing: border-box;
        a {
            color:#004564;
            display: block;
            height: 25px;
            line-height: 25px;
        }
    }
    .listNewsTitle_skin2 {
        font-size:22px;
        font-weight:bold;
        height: 40px;
        line-height: 40px;
        border-bottom: 2px solid #A91B33;
        color:#A91B33;
        margin-bottom: 20px;
        box-sizing: border-box;
        a {
            color:#A91B33;
            display: block;
            height: 25px;
            line-height: 25px;
        }
        span {
            color:#A91B33;
            height: 25px;
            line-height: 25px;
            border-left: 3px solid #A91B33;
            padding-left: 12px;
            display: block;
        }
    }
    .listNewsContent {
        .listNewsContentItem {
            width: 450px;
            height: 110px;
            margin-bottom: 20px;
            background: #F9FAFB;
            &:last-child {
                margin-bottom: 0;
            }
            a {
                display: flex;
                align-items: center;
                justify-content: space-between;
            }
            .listNewsContentItemLeft {
                width: 170px;
                height: 110px;
                position: relative;
                img {
                    display: block;
                    width: 170px;
                    height: 110px;
                }
                span {
                    position: absolute;
                    top: -3px;
                    left: 10px;
                    display: block;
                    width: 20px;
                    height: 20px;
                }
                span.icon1 {
                    background: url('http://img.bjzxtw.org.cn/pre/image/jpeg/20250609/1749437491337294.jpg') no-repeat center center;
                }
                span.icon2 {
                    background: url('http://img.bjzxtw.org.cn/pre/image/jpeg/20250609/1749437499146137.jpg') no-repeat center center;
                }
                span.icon3 {
                    background: url('http://img.bjzxtw.org.cn/pre/image/jpeg/20250609/1749437506412478.jpg') no-repeat center center;
                }
            }
            .listNewsContentItemRight {
                width: 280px;
                height: 110px;
                padding:15px 8px;
                box-sizing: border-box;
                font-size: 18px;
                color: #333333;
                overflow: hidden;
                text-overflow: ellipsis;
                display: -webkit-box;
                -webkit-box-orient: vertical;
                -webkit-line-clamp: 3;
            }
        }
    }
}
//基本样式 end ---------------------------------------->
//样式2 start ---------------------------------------->
.listNewsBox {
    .listNewsStyle2 {
        .listNewsContentItem {
            .listNewsContentItemLeft {
                span {
                    position: absolute;
                    top: 0;
                }
            }
        }
    }
}
//样式2 end ---------------------------------------->
//样式3
.listNewsBox {
    .listNewsStyle3 {
        .listNewsContentItem {
            .listNewsContentItemLeft {
                span {
                    position: absolute;
                    top: 0;
                    left: 0;
                }
            }
        }
    }
}
//样式4
.listNewsBox {
    .listNewsStyle4 {
        .listNewsContentItem {
            .listNewsContentItemLeft {
                span {
                    position: absolute;
                    top: 5px;
                    left: 0;
                }
            }
        }
    }
}
//样式5
.listNewsBox {
    .listNewsStyle5 {
        .listNewsContentItem {
            .listNewsContentItemLeft {
                span {
                    position: absolute;
                    top: 90px;
                    left: 0;
                }
            }
        }
    }
}
//样式6
.listNewsBox {
    .listNewsStyle6 {
        .listNewsContentItem {
            .listNewsContentItemLeft {
                span {
                    position: absolute;
                    top: 0;
                    left: 140px;
                }
            }
        }
    }
}
//样式7
.listNewsBox {
    .listNewsStyle7 {
        .listNewsContentItem {
            .listNewsContentItemLeft {
                span {
                    position: absolute;
                    top: -3px;
                    left: 140px;
                }
            }
        }
    }
}
//样式8
.listNewsBox {
    .listNewsStyle8 {
        .listNewsContentItem {
            .listNewsContentItemLeft {
                span {
                    position: absolute;
                    top: 0;
                    left: 140px;
                }
            }
        }
    }
}
//样式9
.listNewsBox {
    .listNewsStyle9 {
        .listNewsContentItem {
            .listNewsContentItemLeft {
                span {
                    position: absolute;
                    top: 0;
                    left: 150px;
                }
            }
        }
    }
}
//样式10
.listNewsBox {
    .listNewsStyle10 {
        .listNewsContentItem {
            .listNewsContentItemLeft {
                span {
                    position: absolute;
                    top: 5px;
                    left: 150px;
                }
            }
        }
    }
}
//样式11
.listNewsBox {
    .listNewsStyle11 {
        .listNewsContentItem {
            .listNewsContentItemLeft {
                span {
                    position: absolute;
                    top: 90px;
                    left: 150px;
                }
            }
        }
    }
}
//样式12
.listNewsBox {
    .listNewsStyle12 {
        .listNewsContentItem {
            .listNewsContentItemLeft {
                span {
                    position: absolute;
                    top: 0;
                    left: 10px;
                }
            }
        }
    }
}
//样式13
.listNewsBox {
    .listNewsStyle13 {
        .listNewsContentItem {
            .listNewsContentItemLeft {
                span {
                    position: absolute;
                    top: -3px;
                    left: 140px;
                }
            }
        }
    }
}
//样式14
.listNewsBox {
    .listNewsStyle14 {
        .listNewsContentItem {
            .listNewsContentItemLeft {
                span {
                    position: absolute;
                    top: 0;
                    left: 140px;
                }
            }
        }
    }
}
//样式15
.listNewsBox {
    .listNewsStyle15 {
        .listNewsContentItem {
            .listNewsContentItemLeft {
                span {
                    position: absolute;
                    top: 0;
                    left: 150px;
                }
            }
        }
    }
}
//样式16
.listNewsBox {
    .listNewsStyle16 {
        .listNewsContentItem {
            .listNewsContentItemLeft {
                span {
                    position: absolute;
                    top: 5px;
                    left: 150px;
                }
            }
        }
    }
}
//样式17
.listNewsBox {
    .listNewsStyle17 {
        .listNewsContentItem {
            .listNewsContentItemLeft {
                span {
                    position: absolute;
                    top: 90px;
                    left: 150px;
                }
            }
        }
    }
}
//样式18
.listNewsBox {
    .listNewsStyle18 {
        .listNewsContentItem {
            .listNewsContentItemLeft {
                span {
                    position: absolute;
                    top: 0px;
                    left: 10px;
                }
            }
        }
    }
}
</style>