<template>
  <div class="container">
    <h3 style="text-align: center;color:#ffffff;margin-bottom: 40px;">数据导航</h3>

    <div class="wrapper" v-for="route in routes" :key="route.label">
      <el-button type="info" plain @click="goRouter($event,route.link)">{{route.label}}
        <i class="el-icon-right"></i>
      </el-button>
    </div>
  </div>
</template>

<script>
export default {
  data(){
    return {
      routes:[
        {label:'业绩报表',link:'/?path=results'},
        {label:'利润看板',link:'/?path=report'},
        {label:'应收账款',link:'/?path=accountsReceivable'}
        // {label:'数据统计',link:'/newReport'},
      ]
    }
  },
  mounted(){
    document.title = "数据导航"
  },
  methods:{
    goRouter(e,link){
      e.stopPropagation()
      window.location.hash = link
    }
  }
}
</script>

<style lang="scss">
.container {
  width:100%;
  height: 100vh;
  position: fixed;
  background-image: url(/welcome.jpg);
  background-size: cover;
  background-position: 35%;
}

.wrapper{
  display: flex;
  padding: 10px;
  flex-direction: column;
  margin-bottom: 20px;

  button{
    margin: 0px !important;
  }
}
</style>
