<template>
  <div>
    <div class="row header">
      <span class="type">隐患类型</span>
      <span class="count">隐患数量</span>
      <span class="time">整改期限</span>
      <span class="unit">管理单位</span>
      <span class="is_notice">是否提示<br />管理单位</span>
    </div>
    <VueSeamlessScroll :data="list" :class-option="classOption" class="warp">
      <ul class="item">
        <li class="row" v-for="(item, index) in list" :key="index">
          <span class="type">{{ item[0] }}</span>
          <span class="count">{{ item[1] }}</span>
          <span class="time">{{ item[2] }}</span>
          <span class="unit">{{ item[3] }}</span>
          <span class="is_notice">{{ item[4] }}</span>
        </li>
      </ul>
    </VueSeamlessScroll>
  </div>
</template>

<script>
import VueSeamlessScroll from "vue-seamless-scroll";

export default {
  name: "HiddenDanger",
  data() {
    return {
      list: [
        ["电器火灾", "23", "15日", "重庆大剧院管理有限公司", "是"],
        ["安全出口堵塞", "48", "15日", "重庆大剧院管理有限公司", "是"],
        ["电器火灾", "23", "15日", "重庆大剧院管理有限公司", "是"],
        ["电器火灾", "23", "15日", "重庆大剧院管理有限公司", "是"],
        ["电器火灾", "23", "15日", "重庆大剧院管理有限公司", "是"],
        ["安全出口堵塞", "48", "15日", "重庆大剧院管理有限公司", "是"],
      ],
    };
  },
  components: {
    VueSeamlessScroll,
  },
  computed: {
    classOption() {
      return {
        singleHeight: 46,
      };
    },
  },
};
</script>

<style scoped lang="less">
.warp {
  height: 258px;
  margin: 0 auto;
  overflow: hidden;
  .item {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    cursor: pointer;
  }
}

.header {
  color: #fff !important;
  height: 38px !important;
  background-color: rgba(0, 163, 255, 0.3) !important;
  margin-top: 2px;
  .is_notice {
    line-height: 19px;
    font-size: 10px;
  }
}

li.row > span {
  text-align: center;
  font-size: 14x;
  position: relative;
  display: inline-block;
  &::before {
    position: absolute;
    content: "";
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background-color: #1d525f;
    height: 14px;
    width: 1px;
  }
  &:nth-child(1) {
    &::before {
      height: 0px;
      width: 0px;
    }
  }
}

li.row {
  border-bottom: 1px dotted #1d525f;
  box-sizing: border-box;
}

.row,
li,
a {
  display: block;
  height: 46px;
  line-height: 46px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  background-color: rgba(0, 0, 0, 0.2);
  color: #44f1ff;
  .time,
  .type,
  .count,
  .unit,
  .is_notice {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .time {
    flex: 0.15;
  }
  .type {
    flex: 0.2;
  }
  .count {
    flex: 0.15;
  }
  .unit {
    flex: 0.35;
  }
  .is_notice {
    flex: 0.15;
  }
}
</style>
