<template>
  <Card title="危大工程">
    <div class="tabs">
      <div
        class="tab"
        :class="{ checked: index === tabIndex }"
        v-for="(tab, index) in tabs"
        :key="index"
        @click="changeTab(index)"
      >{{ tab }}</div>
    </div>
    <div class="list" v-if="tabIndex==0">
      <div class="thead">
        <div class="row">
          <div class="td">序号</div>
          <div class="td">验收项目</div>
          <div class="td">验收要求</div>
          <div class="td">专业承包单位</div>
          <div class="td">验收结果</div>
          <div class="td">防护责任人</div>
          <div class="td">验收日期</div>
        </div>
      </div>
      <!-- <div class="tbody">
        <vue-scroll>
          <div class="row" v-for="i in 4" :key="i">
            <div class="td">{{i}}</div>
            <div class="td">深基坑临边防护</div>
            <div class="td">砌筑200mm以上挡水墙</div>
            <div class="td">中国建筑第四工程局有限公司</div>
            <div class="td">符合要求</div>
            <div class="td">王明</div>
            <div class="td">2022-09-01</div>
          </div>
        </vue-scroll>
      </div> -->
      <div class="tbody">
        <div class="dataImg">
          <img src="@/assets/images/noData3.png" alt srcset />
          <p>{{$t('message.dataBoard.nodata')}}</p>
        </div>
      </div>
    </div>
    <div class="list" v-if="tabIndex==1">
      <div class="thead">
        <div class="row">
          <div class="td">设备名称</div>
          <div class="td">载重</div>
          <div class="td">位移</div>
          <div class="td">倾斜X</div>
          <div class="td">倾斜Y</div>
        </div>
      </div>
      <div class="tbody">
        <div class="dataImg">
          <img src="@/assets/images/noData3.png" alt srcset />
          <p>{{$t('message.dataBoard.nodata')}}</p>
        </div>
      </div>
    </div>
    <div class="list" v-if="tabIndex==2">
      <div class="thead">
        <div class="row">
          <div class="td">基坑名称</div>
          <div class="td">测点名称</div>
          <div class="td">传感器类型</div>
          <div class="td">测点值</div>
          <div class="td">变化速率</div>
          <div class="td">监测时间</div>
          <div class="td">报警状态</div>
        </div>
      </div>
      <!-- <div class="tbody">
        <vue-scroll>
          <div class="row" v-for="i in 4" :key="i">
            <div class="td">中建四项目深基坑</div>
            <div class="td">沉降监测3号</div>
            <div class="td">深层水平位移</div>
            <div class="td">-0.77</div>
            <div class="td">-1.04</div>
            <div class="td">2022-09-01</div>
            <div class="td">正常</div>
          </div>
        </vue-scroll>
      </div> -->
      <div class="tbody">
        <div class="dataImg">
          <img src="@/assets/images/noData3.png" alt srcset />
          <p>{{$t('message.dataBoard.nodata')}}</p>
        </div>
      </div>
    </div>
    <div class="list" v-if="tabIndex==3">
      <div class="thead">
        <div class="row">
          <div class="td">设备名称</div>
          <div class="td">监测位置</div>
          <div class="td">监测时间</div>
          <div class="td">模版沉降</div>
          <div class="td">支杆应力</div>
          <div class="td">杆件倾斜</div>
          <div class="td">压力监测</div>
          <div class="td">水位移位</div>
        </div>
      </div>
      <div class="tbody">
        <div class="dataImg">
          <img src="@/assets/images/noData3.png" alt srcset />
          <p>{{$t('message.dataBoard.nodata')}}</p>
        </div>
      </div>
    </div>
  </Card>
</template>

<script>
import Card from "../components/Card.vue";
export default {
  components: { Card },
  data() {
    return {
      tabIndex: 0,
      tabs: ["临边防护", "卸料平台", "深基坑检测", "高支模检测"]
    };
  },
  methods: {
    changeTab(index) {
      this.tabIndex = index;
    }
  }
};
</script>

<style lang="less" scoped>
.tabs {
  padding: 10px;
  display: flex;
  .tab {
    margin-right: 20px;
    width: 90px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    color: #6ee4f0;
    background: url(../assets/images/sourse/bg-car-count.png) no-repeat;
    background-size: 100% 100%;
    cursor: pointer;
    &.checked {
      color: #fff;
    }
  }
}
.list {
  width: 100%;
  height: calc(100% - 80px);
  .thead {
    font-size: 14px;
    color: #6ee4f0;
  }
  .tbody {
    height: calc(100% - 40px);
    font-size: 12px;
    color: #ccc;
  }

  .thead .row, .tbody .row{
    display: flex;
    text-align: center;
    justify-content: left;
    height: 40px;
    line-height: 40px;
    .td {
      &:nth-child(1) {
        width: 120px;
      }
      &:nth-child(2) {
        flex: 1;
      }
      &:nth-child(3) {
        flex: 1;
      }
      &:nth-child(4) {
        flex: 1.5;
      }
      &:nth-child(5) {
        flex:1;
      }
      &:nth-child(6) {
        flex:1;
      }
      &:nth-child(7) {
        flex:1;
      }
    }
  }
  .dataImg {
    margin-left: 500px;
    margin-top: 50px;
    p {
      margin-left: 4%;
    }
  }
}
</style>
