<template>
  <div class="home-item" id="hall">
    <ItemHeaderVue title="电子大厅">
      <span class="el-icon-refresh-right" title="刷新"></span>
    </ItemHeaderVue>
    <div class="item-content">
      <div class="card-item" v-for="(item, idx) in itemList" :key="idx">
        <div class="dept-name">
          <div class="first-word" :style="{ 'background-image': item.backImg }">
            {{ item.title.substr(0, 1) }}
          </div>
          <div class="dz-title">{{ item.title }}</div>
        </div>
        <div class="type-count">
          <div class="count-item">
            操作处理类 <span class="count-number">26</span>
          </div>
          <div class="count-item">
            提示信息类 <span class="count-number">3</span>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import ItemHeaderVue from "./ItemHeader.vue";

export default {
  name: "Hall",
  components: { ItemHeaderVue },
  data() {
    return {
      itemList: [
        { title: "资产管理大厅", backImg: "linear-gradient(#2073ef, #bec2f3" },
        {
          title: "我行发布资产大厅",
          backImg: "linear-gradient(rgb(28 190 241), rgb(201 229 237))",
        },
        {
          title: "他行发布资产大厅",
          backImg: "linear-gradient(rgb(243, 195, 12), rgb(239 228 197))",
        },
        {
          title: "资金发布大厅",
          backImg: "linear-gradient(#ff9800, rgb(251 234 210))",
        },
      ],
    };
  },
};
</script>

<style scoped>
#hall .item-content {
  display: flex;
  flex-wrap: wrap;
}
#hall .item-content {
  justify-content: space-around;
  align-items: center;
}
#hall .item-content .card-item {
  width: 45%;
  height: 45%;
  background-color: #e6e8ef;
  border-radius: 12px;
  padding: 20px 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.dept-name {
  display: flex;
  align-items: center;
}
.first-word {
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-weight: bolder;
  font-family: emoji;
  border-radius: 8px;
}
.dz-title {
  margin-left: 20px;
  margin-left: 20px;
  font-weight: bold;
}

.type-count .count-item {
  display: flex;
  align-items: center;
  font-weight: 400;
  color: #6c6f72;
}
.type-count .count-number {
  font-size: 25px;
  margin-left: 20px;
  color: #000;
}
</style>
