<template>
    <section class="homeGT">
        <div class="htaTitle"><span class="TitleTab"><em v-for='(item,index) in titleArr' :key='index' @click='titleClick(item,index)' :class='inx==index?"active":""'>{{item.name}}</em></span><span class="more" @click='more'>查看更多>></span></div>
        <div class="htaBox">
            <div class="tableContent">
                 <el-table
                :data="tableData"
                style="width: 100%">
                <el-table-column
                    width="100"
                    prop="item_time"
                    label="日期">
                 </el-table-column>  
                <el-table-column                   
                    prop="item_filename"
                    label="文件名称"
                    show-overflow-tooltip
                    >
                </el-table-column>                  
                 </el-table>
            </div>
        </div>
    </section>
</template>
<script>
export default {
    data(){
        return{
          titleArr:[
              {name:'系统日程巡查',type:1},
          ],
          inx:0,
           params:{//搜索条件
            pageIndex:1,
            pageSize:3,
            total:0
          },
          type:1,
          tableData:[],
        }
    },
    mounted() {
        this.xtrcxclist()
    },
    methods: {
        titleClick(item,index){
           this.inx=index
           this.type=item.type
        },
        xtrcxclist(){
            this.$api.xtrcxclistApi(this.params,{
                onSucess: response => {
                    console.log(response)
                    this.tableData=response.data.data
                }
            })
        },
        more(){
            if(this.type==1){
                let appId='__RQ48OKrJhq16UaygCrf'
                let name='系统日程巡查'
                let flag=1
                this.$store.dispatch("loadMenus", {appId, name,flag});
            }         
        },
    },
}
</script>
<style lang="scss" scoped>
.homeGT{
    display: flex; 
    flex-direction: column;
    .htaTitle{
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
        font-size: 18px;
        color: rgba(0, 0, 0, 0.85);
        padding: 16px;
        display: flex;
        align-items: center;
        .TitleTab{
          flex:1;
          em{
              margin-right: 15px;
              font-size: 16px;
              padding-bottom:16px;
              cursor: pointer;
              &.active{
                 border-bottom: 1px solid #0076f6;  
                 color: #0076f6;
              }
          }
        }
        .more{
            flex-wrap: 150px;
            font-size: 14px;
            cursor: pointer;
        }
    }
    .htaBox{
        padding: 16px 0 16px 16px;
        ul{
            display: flex;
            flex-wrap: wrap;
            align-content: flex-start;
            
            li{
                background: #fff;
                width: 140px;
                height: 100px;
                border-radius: 4px;
                display: flex;
                flex-direction: column;
                padding: 16px;
                margin-right:16px;
                margin-bottom: 16px;
                align-items: center;
                text-align: center;
                span{
                  margin-bottom: 8px;  
                   img{
                     width: 48px;
                     height:48px;
                   }
                   strong{                      
                       color: rgba(0, 0, 0, 0.85);
                       font-size: 14px;
                       font-weight: normal;
                   }
                }
            }
        }
    }
}
</style>