<template>
  <div class="home-cell" id="quickVisit">
    <CellHeaderVue title="快速访问"> </CellHeaderVue>

    <el-scrollbar :style="{ height: scrollbarHeight + 'px' }">
      <div class="cell-content">
        <div
          class="content-wrapper"
          v-for="(item, index) in quickVisitItem"
          :key="index"
          :style="{ height: Math.floor(scrollbarHeight * 0.3) + 'px' }"
        >
          <div class="visit-item-wrapper">
            <div class="visit-item">
              <!-- <i class="el-icon-set-up"></i> -->
              <img :src="item.icon" alt="" />
              <span>{{ item.name }}</span>
            </div>
          </div>
        </div>
      </div>
    </el-scrollbar>
  </div>
</template>

<script>
import CellHeaderVue from "./CellHeader.vue";

export default {
  name: "QuickVisit",
  components: { CellHeaderVue },
  props: {
    cellScrollHeight: {
      type: Number,
      required: true,
    },
  },
  computed: {
    scrollbarHeight() {
      return window.document.body.clientHeight - this.cellScrollHeight;
    },
  },
  data() {
    return {
      quickVisitItem: [
        {
          name: "用户权限",
          icon: require("~/assets/icons/用户权限.svg"),
          url: "",
        },
        {
          name: "银行信息管理",
          icon: require("~/assets/icons/银行信息管理.svg"),
          url: "",
        },
        {
          name: "财务费用管理",
          icon: require("~/assets/icons/财务费用管理.svg"),
          url: "",
        },
        {
          name: "风险提示参数",
          icon: require("~/assets/icons/风险提示参数.svg"),
          url: "",
        },
        {
          name: "业务公共参数",
          icon: require("~/assets/icons/业务公共参数.svg"),
          url: "",
        },
        {
          name: "国内证开立",
          icon: require("~/assets/icons/国内证开立.svg"),
          url: "",
        },
        {
          name: "进口信用证开立",
          icon: require("~/assets/icons/进口信用证开立.svg"),
          url: "",
        },
        {
          name: "转让信用证开立",
          icon: require("~/assets/icons/转让信用证开立.svg"),
          url: "",
        },
        {
          name: "添加",
          icon: require("~/assets/icons/添加.svg"),
          url: "",
        },
      ],
    };
  },
};
</script>

<style scoped>
/* 快速访问 */
#quickVisit .cell-content {
  /* display: flex;
  flex-wrap: wrap; */
}
#quickVisit .content-wrapper {
  display: inline-block;
  width: 33%;
  /* height: 30%; */
}
#quickVisit .cell-content .visit-item-wrapper {
  display: flex;
  height: 100%;
  justify-content: center;
  align-items: center;
}
#quickVisit .cell-content .visit-item {
  /* padding-bottom: 16px; */
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}
#quickVisit .cell-content .visit-item i {
  color: #0088ff;
  font-size: 36px;
}
#quickVisit .cell-content .visit-item span {
  color: #303133;
  font-size: 14px;
  margin-top: 10px;
}
/* #quickVisit .cell-content .visit-item:hover i {
  color: var(--themecolor);
} */
#quickVisit .cell-content .visit-item:hover span {
  color: var(--themecolor);
}
</style>
