<template>
  <div>
    <div class="home-top">
      <div class="home-top-left"> <img src="@/assets/2-主界面/logo.png" alt=""> </div>
      <div class="home-top-mid"><img src="@/assets/rms/mianoverview.png" alt=""></div>
      <div class="home-top-right"><img class="home-top-right-img" src="@/assets/2-主界面/关闭.png" alt=""></div>
    </div>
    <div class="home-content">
      <div class="home-pic">
        <div class="home-pic-item" @click="picClick('reagent')"><img src="@/assets/2-主界面/试剂管理.png" alt=""></div>
        <div key="2" class="home-pic-item"><img src="@/assets/2-主界面/standard.png" alt=""></div>
        <div key="3" class="home-pic-item"><img src="@/assets/2-主界面/耗材管理.png" alt=""></div>
        <div key="4" class="home-pic-item"><img src="@/assets/2-主界面/instrument.png" alt=""></div>
        <div key="5" class="home-pic-item" @click="picClick('user')"><img src="@/assets/2-主界面/用户管理.png" alt=""></div>
      </div>
      <div class="home-menu">
        <div v-for="item in 8" :key="item" class="home-menu-item">
          <div class="home-menu-item-img"><img src="@/assets/2-主界面/库存盘点.png" alt=""></div>
          <div class="home-menu-item-text">库存盘点</div>
        </div>
        <div class="home-menu-item" @click="$router.push('/shortcut')">
          <div class="home-menu-item-img"><img src="@/assets/2-主界面/更多.png" alt=""></div>
          <div class="home-menu-item-text">更多</div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Home',
  methods: {
    picClick(name) {
      const r = this.$store.getters.opts.find(item => item.name === name)
      this.$router.push(r.router.path)
    }
  }
}
</script>

<style lang="scss" scoped>
.home-top{
  height: 6rem;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-right: 2rem;
  margin-left: 2rem;
  .home-top-left{
    img{
      height: 6rem;
    }
  }
  .home-top-mid{
    margin-right: 11.25rem;
    img{
      width: 31.25rem;
    }
  }
  .home-top-right{
    img{
      height: 2.5rem;
    }
  }
}

.home-content{
  background: #F7F7F7;
  height:calc(100vh - 6rem);
  .home-pic{
    padding-top: 4.5625rem;
    display: flex;
    justify-content: center;
    .home-pic-item img{
      width: 19.75rem;
      margin: 0px 20px;
    }
  };
  .home-menu{
    border-radius: 20px 20px 0px 0px;
    opacity: 1;
    border: 4px solid #FFFFFF;
    margin-top: 4.9rem;
    display: flex;
    justify-content: space-between;
    margin-right: 4rem;
    margin-left: 4rem;
    .home-menu-item{
      margin: 1rem 2.375rem;
      .home-menu-item-img{
        img{
          width: 7.75rem;
        }
      }
      .home-menu-item-text{
        text-align: center;
        font-size: 1.75rem;
        font-weight: 400;
        color: #606266;
      }
    }
  }
}

</style>
