<template>
    <div class="timeline-container">
        <div class="timeline-content">
            <div class="timeline-entry-list">
                <div class="entry-list-container">
                    <!-- <div class="tab-header">
                        <span class="tab-title">勋章墙</span>
                    </div> -->
                    <el-empty :image-size="200" v-if="dataList.length < 1"></el-empty>
                    <div v-else class="content-body">
                        <div class="serie" v-for="item in dataList" :key="item.index">
                            <div class="serie-title">
                                <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAGCAYAAACFIR03AAAACXBIWXMAACE4AAAhOAFFljFgAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAGnSURBVHgBbVNLdsIwDBwpOK+PRRflAt33Ej0al+yqGy7Arp9XIFZHloxDqR9BijSWRp8I9qbPwPzxhXLaouwK5QllEsyXCUUN81RRhHKhVNqE+CopgY1L4XutlMSYNl/3t1hGO2g3C7uFv1S/6zbedxu6TwYWoc+SfpeJLYo3yOEJhh3wSMsnn4fCK45cIDNuz4XPIsS7tJB+alcmQLVprCX8lTgWDLOBdV+/YxkvsvI+NRYlLCIs1mTP5WGsK7p/4cs7nH8723MPA5wmYirk5MQrcRv4DxMD3pCn7pwlidRgZo1IJBO9JQiVkeeGqERxXlQvGBlXIoIElHUTrXtO4HUHOR5p+RlB+wTOCpuDjWS3muRayJRJtQ4fO22KMQHLhBXXHkq10BV/jhPtdovqe6c76R4liwnswf9yBGy3fTvqMopx8r5wvj8crbUVWlZJp+y6P7RXxXUCvWcrsqZpq1hNDXfFOPEgK/jvtFW6xu0rZDPu4Jy/8YNuK+THV8hJO72mLwOrPqlk4xOQ2rq63nHf/WZV5Jqkni1efRpRh6P7MJrdRo2/AqrHkeBWUykAAAAASUVORK5CYII=" alt="" class="series-left"> 
                                <div class="title">{{ item.name }}</div> 
                                <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAGCAYAAACFIR03AAAACXBIWXMAACE4AAAhOAFFljFgAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAGgSURBVHgBbVNBbtwwDBzSyuaQHgr0XLTn/qfvaf7T9yRA7rkmlyBA1rLFDEmtLS8iQCJFkWMOScvPf7aIoBpQAcyC0GfqVdIWdst72EM3btnfDu9GnI6pjXZFXZG28PdY2m3CrNSNetP8rq4pp4k2ypWy0LZU1HqDejqjfvuO+emZ3/pBfIKCgIdFk5u3y3a6tNixKKxdxfpSCf+MUaAhI1pLqa4rdWKRGFZNe+nxRSG2DnvpWO8EvYW9vKTfvWP15O2Yb1hkyMk2D6YvcngDSZgOIG3A7MmLv6v2uMa7Y5DQxOs04JWSLZdpyKmkfndHsFP6/n6D3D8ETpTbpcmRyZHanrJYt5J8APSKR+ewryNJP1avGKT1ikODxOa3+OZxg5zFUM7Ax8dOQs499hfwt0P0XMbiY+uA9cR0T9w2nyHVNphUdhjt1Y/FcjfJbnVWBt3jygB58qPGyOC2YOuRzamVV9j/P471xQxfkhoJ+Zg4kXblY5deDSPXNppJbCTHi1y64YTiZY0pyApfZeREzqy+lfyO/wP8ebFwhPAI+QRgPNl+sExIwgAAAABJRU5ErkJggg==" alt="" class="series-right">
                            </div>
                            <div class="badge-icon-list">
                                <div v-for="childItem in item.medalTypeVos" :key="childItem.index" class="badge-icon-item">
                                    <div class="badge-item-icon">
                                        <img :src="childItem.imgUrl" :class="{'not-obtain':childItem.isHave==1}">
                                    </div> 
                                    <div class="badge-desc">{{ childItem.levelName }}</div> 
                                    <div class="obtain-date">
                                        {{ childItem.isHave==0 ? childItem.createTime:'未获得'  }}
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- <SiderInfo></SiderInfo> -->
        </div>
    </div>
</template>
<script scoped>
import { medalList } from "@/api/allApi";
import SiderInfo from '@/components/SiderInfo.vue'
export default{
  components: {
    SiderInfo
  },
  data() {
    return {
        dataList:[],
    };
  },
  created(){
    this.getDataList();
  },
  methods:{
    getDataList(){
        medalList().then(response=>{
            console.log(response);
            this.dataList = response.data.data;
        })
    },
   
  },
}
</script>
<style scoped>
.timeline-container{
    margin: 0 auto;
}
.timeline-entry-list{
    margin-right: 17.5rem;
    border-radius: 2px;
    /* width: 720px; */
    width: 100%;
    position: relative;
}
.entry-list-container{
    background-color: #fff;
    border-radius: 4px;
    min-height: 500px;
}
.entry-list-container .tab-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
    border-bottom: 1px solid #e5e6eb;
    overflow: hidden;
}

.tab-header .tab-title {
    white-space: nowrap;
    font-size: 18px;
    font-weight: 600;
}
.content-body {
  padding: 10px 20px 16px;
}
.serie{
    margin: 0 0 24px;
}
.serie .serie-title{
    height: 32px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}
.serie .serie-title .title{
    font-style: normal;
    font-weight: 600;
    font-size: 20px;
    color: #1d2129;
    margin: 0 16px;
}
.serie .serie-title .series-left, .serie .serie-title .series-right{
    width: 16px;
    height: 2px;
}
img {
    border-style: none;
}
.serie .badge-icon-list{
    display: flex;
    justify-content: space-between;
    grid-template-columns: repeat(auto-fill,118px);
    grid-gap: 10px 20px;
    flex-wrap: wrap;
}
.serie .badge-icon-list .badge-icon-item{
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    width: 118px;
    font-style: normal;
    font-weight: 400;
}
.serie .badge-icon-list .badge-icon-item .badge-item-icon{
    width: 118px;
    height: 118px;
}
.serie .badge-icon-list .badge-icon-item .badge-item-icon .not-obtain{
    filter: grayscale(100%);
}
.serie .badge-icon-list .badge-icon-item .badge-item-icon img{
    width: 100%;
    height: 100%;
}
.serie .badge-icon-list .badge-icon-item .badge-desc{
    margin-top: -10px;
    text-align: center;
    color: #1d2129;
    font-size: 16px;
    line-height: 28px;
}
.serie .badge-icon-list .badge-icon-item .obtain-date{
    font-size: 14px;
    text-align: center;
    color: #86909c;
    height: 24px;
    line-height: 24px;
}
</style>