<template>
  <Card title="模型列表">
    <div class="videos">
      <div class="videosList">
        <span style="margin-left: 45px">模型名称</span>
      </div>
      <div
        class="video"
        v-for="(item, index) in threeData"
        :key="index"
        @click="threeBtn(item, index)"
        :class="index == noIndex ? 'active' : ''"
      >
        <span style="margin-right: 20px; margin-left: 10px">{{
          item.typesss
        }}</span>
        <span>{{ item.bulidingName }}</span>
      </div>
      <div class="video">
        <span style="margin-right: 20px; margin-left: 10px">5</span>
        <span>EHE-CP—AS0301—S—B1航空基地宿舍楼...</span>
      </div>
      <div class="video">
        <span style="margin-right: 20px; margin-left: 10px">6</span>
        <span>EHE-CP—AS0301—S—B1航空基地宿舍楼...</span>
      </div>
      <div class="video">
        <span style="margin-right: 20px; margin-left: 10px">7</span>
        <span>EHE-CP—AS0301—S—B1航空基地宿舍楼...</span>
      </div>
      <div class="video">
        <span style="margin-right: 20px; margin-left: 10px">8</span>
        <span>EHE-CP—AS0301—S—B1航空基地宿舍楼...</span>
      </div>
      <div class="video">
        <span style="margin-right: 20px; margin-left: 10px">9</span>
        <span>EHE-CP—AS0301—S—B1航空基地宿舍楼...</span>
      </div>
      <div class="video">
        <span style="margin-right: 20px; margin-left: 10px">10</span>
        <span>EHE-CP—AS0301—S—B1航空基地宿舍楼...</span>
      </div>

      <!-- <div class="video">
        <span style="margin-right: 20px; margin-left: 10px">02</span>
        <span>EHE-CP—AS0301—S—B1航空基地宿舍楼...</span>
      </div>
      <div class="video">
        <span style="margin-right: 20px; margin-left: 10px">03</span>
        <span>EHE-CP—AS0301—S—B1航空基地宿舍楼...</span>
      </div>
      <div class="video">
        <span style="margin-right: 20px; margin-left: 10px">04</span>
        <span>EHE-CP—AS0301—S—B1航空基地宿舍楼...</span>
      </div>
      <div class="video">
        <span style="margin-right: 20px; margin-left: 10px">05</span>
        <span>EHE-CP—AS0301—S—B1航空基地宿舍楼...</span>
      </div>
      <div class="video">
        <span style="margin-right: 20px; margin-left: 10px">06</span>
        <span>EHE-CP—AS0301—S—B1航空基地宿舍楼...</span>
      </div>
      <div class="video">
        <span style="margin-right: 20px; margin-left: 10px">07</span>
        <span>EHE-CP—AS0301—S—B1航空基地宿舍楼...</span>
      </div>
      <div class="video">
        <span style="margin-right: 20px; margin-left: 10px">08</span>
        <span>EHE-CP—AS0301—S—B1航空基地宿舍楼...</span>
      </div>
      <div class="video">
        <span style="margin-right: 20px; margin-left: 10px">09</span>
        <span>EHE-CP—AS0301—S—B1航空基地宿舍楼...</span>
      </div>
      <div class="video">
        <span style="margin-right: 20px; margin-left: 10px">10</span>
        <span>EHE-CP—AS0301—S—B1航空基地宿舍楼...</span> -->
      <!-- </div> -->
    </div>
  </Card>
</template>

<script>
import bus from "@/util/eventBus.js";
import Card from "../components/Card.vue";
export default {
  components: { Card },
  data() {
    return {
      threeData: [
        {
          typesss: 1,
          bulidingName:
            "ZJSJ-CP-XXXXX-S-B3_中建四局广州市国际金融城东区AT091429地块项目结构底板混凝土模型_V1_0",
          url: "http://share-xt.hwbim.com/qlh/73c2b5ecc5724d168ce225ffc8f46698",
        },
        {
          typesss: 2,
          bulidingName:
            "ZJSJ-CP-XXXXX-S-B3_中建四局广州市国际金融城东区AT091429地块项目结构底板钢筋模型_V1_0",
          url: "http://share-xt.hwbim.com/qlh/a0247006a78b4d67882982a5df6cd820",
        },
        {
          typesss: 3,
          bulidingName:
            "ZJSJ-CP-XXXXX-S-B3_中建四局广州市国际金融城东区AT091429地块项目底板承台与柱墩钢筋模型_V1_0",
          url: "http://share-xt.hwbim.com/qlh/2429ffcb07034ac3bc2cc4396e57a19a",
        },
        {
          typesss: 4,
          bulidingName:
            "ZZJSJ-CP-XXXXX-S-B3_中建四局广州市国际金融城东区AT091429地块项目结构底板插筋模型_V1_0",
          url: "http://share-xt.hwbim.com/qlh/7009cb73dc0b43e1a3e6122af306dcbd",
        },
      ],
      url: [],
      noIndex: 0,
    };
  },
  created() {
    this.$nextTick(() => {
      this.threeBtn(this.threeData[0],0);
    });

    // this.getData()
  },
  methods: {
    getData() {
      this.threeData.forEach((res) => {
        this.url = res.url;
      });
    },
    threeBtn(item, index) {
      bus.$emit("threeData", item.url);
      this.noIndex = index;
    },
  },
};
</script>

<style lang="less" scoped>
.videos {
  box-sizing: border-box;
  padding-top: 10px;
  width: 100%;
  height: 100%;
  .video {
    width: 350px;
    border-bottom: 2px solid #ccc;
    margin: 0px 0 0 8px;
    height: 32px;
    line-height: 32px;
    font-size: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
  }
  .videosList {
    width: 350px;
    height: 32px;
    line-height: 32px;
    background-color: #66d3d8;
    color: #00292a;
    margin: 14px 0 0 8px;
    font-size: 14px;
  }
  .active {
    color: #66d3d8 !important;
  }
}
</style>
