<template>
  <div class="stat-cards-container">
    <div class="stat-card" v-for="(item, idx) in props.numberList" :key="idx">
      <div class="stat-card-title">{{ item.title }}</div>
      <div class="stat-card-value">{{ item.value }}</div>
      <div class="amount">
        <div>
          <p class="amount-title">实际完成金额</p>
          <p class="amount-value">
            {{ item.actualValue
            }}<span v-if="item.actualValue !== '*'">亿元</span>
          </p>
        </div>
        <div>
          <p class="amount-title">计划完成金额</p>
          <p class="amount-value">
            {{ item.planValue }}<span v-if="item.planValue !== '*'">亿元</span>
          </p>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
const props = defineProps({
  numberList: {
    type: Array,
    default: () => [],
  },
});
</script>

<style scoped lang="less">
.stat-cards-container {
  display: flex;
  .stat-card {
    .vw(width, 180);
    .vw(border-radius, 5);
    .vw(padding, 10);
    .vw(margin-right,10);
    background-image: url("@/assets/images/total2.png");
    background-repeat: no-repeat;
    background-size: 100% 100%;
    .stat-card-title {
      .font(12);
    }
    .stat-card-value {
      .font(18);
      color: @Color;
      font-family: "DIN";
    }
    .amount {
      display: flex;
      justify-content: space-between;
      .amount-title {
        .font(10);
      }
      .amount-value {
        .font(16);
        color: @Color;
        font-family: "DIN";
        font-weight: 100;
        span {
          .font(10);
          font-weight: 400;
        }
      }
    }
  }
}
</style>
