<template>
  <div class="home-container">
    <el-card class="home-container__card">
      <div class="title">
        <span>
          审核数据
        </span>
        <span>
          <i
            class="el-icon-refresh-right"
            style="cursor: pointer;font-size:20px"
            @click="refresh"
          ></i>
        </span>
      </div>
      <div class="content" v-loading="loading">
        <div class="content-item" v-for="(item, index) in list" :key="index">
          <div class="card">
            <i :class="item.icon" style="font-size:30px;color:#409EFF"></i>
            <div class="card-content">
              <span class="card-content-num">{{ item.qty }}</span>
              <span class="card-content-text">{{ item.text }}</span>
            </div>
          </div>
        </div>
      </div>
    </el-card>
  </div>
</template>

<script>
export default {
  name: "basicContainer",
  data() {
    return {
      loading: false,
      list: [
        { icon: "el-icon-s-order", qty: "1", text: "销售订单/待审核" },
        { icon: "el-icon-s-goods", qty: "1", text: "采购订单/待审核" },
        { icon: "el-icon-s-home", qty: "1", text: "发货/待审核" },
        { icon: "el-icon-s-home", qty: "1", text: "收货/待审核" },
        { icon: "el-icon-s-finance", qty: "1", text: "申请付款/待审核" }
      ]
    };
  },
  methods: {
    refresh() {
      this.loading = true;
      setTimeout(() => {
        this.loading = false;
      }, 1000);
    }
  }
};
</script>

<style lang="scss" scoped>
.home-container {
  padding: 0px 5px 5px 5px;
  box-sizing: border-box;
  height: 100%;
  ::v-deep .el-card__body {
    padding: 10px 15px;
    font-size: 14px;
  }
  &__card {
    width: 100%;
    height: 100%;
  }
  .title {
    display: flex;
    justify-content: space-between;
  }
}
.content {
  display: flex;
  &-item {
    background-color: #f4f8ff;
    margin-top: 0.5vh;
    margin-right: 0.5vw;
    height: 13vh;
    width: 15vw;
    display: flex;
    align-items: center;
    padding-left: 1.5vw;
    .card {
      display: flex;
      align-items: center;
      &-content {
        padding-left: 1vw;
        display: flex;
        flex-direction: column;
        &-num {
          font-size: 20px;
          font-weight: 600;
        }
        &-text {
          color: #909399;
        }
      }
    }
  }
}
</style>
