<template>
  <div class="color-list">
    <div class="list-item" v-for="(item, index) in colorListL" :key="index">
      <div class="item-name">
        <ColorCell
          :item="item"
          v-if="item.color"
          size="small"
          class="color-item"
        />
        <span>
          {{ item.name }}
          <span v-show="item.name == '户籍'"
            >(空关{{ colorListL[2].house }}户)</span
          >
          <span v-show="item.name == '流动'"
            >(空关{{ colorListL[6].house }}户)</span
          >
        </span>
      </div>
      <div class="item-value">
        <span>{{ item.house }}</span>
        <span> 户 </span>
        <span>{{ item.person }}</span>
        <span> 人 </span>
      </div>
    </div>
  </div>
</template>

<script>
import { mapGetters } from "vuex";
import ColorCell from "@/components/ColorCell";
export default {
  components: {
    ColorCell,
  },
  data() {
    return {};
  },
  computed: {
    ...mapGetters(["colorListL"]),
  },
};
</script>

<style lang="scss" scoped>
.color-list {
  margin-top: 10px;
  flex: 1;
  background: url("~@/assets/images/ui/colorList_bg.png");
  background-size: 100% 100%;
  display: flex;
  flex-direction: column;
  padding: 25px;
  padding-bottom: 23px;
  .list-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0, 156, 255, 0.2);
    .item-name {
      display: flex;
      align-items: center;
      font-size: 15px;
      color: #abc7ed;
      font-family: "Alibaba-PuHuiTi-Regular.otf";
    }
    .item-value {
      span:nth-child(odd) {
        font-size: 15px;
        color: #52ccff;
        font-family: "DIN-Medium-2.otf";
      }
      span:nth-child(even) {
        font-size: 14px;
        color: #c9e1f5;
      }
    }
  }
  & > .list-item:last-child {
    border: 0;
  }
  .list-item:nth-child(9) .item-value,
  .list-item:nth-child(10) .item-value {
    span:nth-child(odd) {
      font-size: 15px;
      color: #ffb400;
      font-family: "DIN-Medium-2.otf";
    }
  }
  .list-item:nth-child(9),
  .list-item:nth-child(10) {
    .item-name {
      color: #fff;
    }
  }
  .list-item:nth-child(10) {
    border: 0;
  }
}
.color-item {
  margin-right: 10px;
}
</style>
