<template>
  <table class="info_table">
    <tr>
      <td class="cell_title" colspan="2">前小车</td>
      <td class="cell_title" colspan="2">后小车</td>
    </tr>
    <tr>
      <td class="cell_title">行走速度</td>
      <td class="cell_title">行走位置</td>
      <td class="cell_title">行走速度</td>
      <td class="cell_title">行走位置</td>
    </tr>
    <tr>
      <td class="cell_data"><span class="fontSpan">{{ grider.beforeCarSpeed }}</span>m/s</td>
      <td class="cell_data"><span class="fontSpan">{{ grider.beforeCarPosition }}</span>m</td>
      <td class="cell_data"><span class="fontSpan">{{ grider.afterCarSpeed }}</span>m/s</td>
      <td class="cell_data"><span class="fontSpan">{{ grider.afterCarPosition }}</span>m</td>
    </tr>
    <tr>
      <td class="cell_title" colspan="4">吊钩信息</td>
    </tr>
    <tr>
      <td class="cell_title">吊钩序号</td>
      <td class="cell_title">吊钩重量</td>
      <td class="cell_title">吊钩高度</td>
      <td class="cell_title">吊钩横移量</td>
    </tr>
    <tr v-for="item in grider.slingSys" :key="item.id">
      <td class="cell_title"><span class="fontSpan">{{ item.no }}</span>#</td>
      <td class="cell_title"><span class="fontSpan">{{ item.weight }}</span></td>
      <td class="cell_title"><span class="fontSpan">{{ item.height }}</span></td>
      <td class="cell_title"><span class="fontSpan">{{ item.quantity }}</span></td>
    </tr>
  </table>
</template>

<script>
export default {
  name: 'TacklingSysMng',
  data() {
    return {
      grider: {}
    }
  },
  methods: {
    show(data) {
      if (data) {
        this.grider = data
      }
    }
  }
}
</script>

<style lang="scss" scoped>
.info_table {
    position: relative;
    overflow: hidden;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    width: 100%;
    max-width: 100%;
    //background-color: #FFFFFF;
    font-size: 14px;
    color: white;
    table-layout:fixed;
    .cell_title{
      //background-color: #f7f7f7 !important;
      text-align: center;
      width: 25%;
    }
    .cell_data{
      text-align: center;
      width: 25%;
    }
    td {
    border: 1px solid #dfe6ec;
    padding: 9px 0;
    min-width: 0;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    text-overflow: ellipsis;
    vertical-align: middle;
    position: relative;
    text-align: left;
    // white-space:nowrap;
    // text-overflow:
    // ellipsis;
    // overflow: hidden;
  }
  .fontSpan{
    font-weight: 900;
    color: green;
  }
}

</style>
