<template>
  <div class="home-cell" id="hall">
    <CellHeaderVue title="电子大厅">
      <span class="el-icon-refresh" title="刷新"></span>
      <span class="el-icon-more" title="操作"></span>
    </CellHeaderVue>
    <div class="cell-content">
      <div class="card-item" v-for="(item, idx) in itemList" :key="idx">
        <div class="dept-name">
          <div
            class="first-word"
            :style="{ 'background-color': item.backColor }"
          >
            {{ 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 CellHeaderVue from "./CellHeader.vue";

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

<style scoped>
#hall .cell-content {
  display: flex;
  flex-wrap: wrap;
}
#hall .cell-content {
  justify-content: space-around;
  align-items: center;
}
#hall .cell-content .card-item {
  width: 45%;
  height: 45%;
  background-color: #e6e8ef;
  border-radius: 12px;
  padding: 10px 10px 10px 15px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 14px;
}
.dept-name {
  display: flex;
  align-items: center;
}
.dept-name,
.type-count {
  flex: 1;
}
.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;
  font-size: 20px;
}
.dz-title {
  margin-left: 10px;
  font-weight: bold;
}

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