<template>
  <div class="my-table">
      <div class="my-box">
           <i-Table stripe  :columns="columns1" :data="serveData" size="large"></i-Table>
      </div>
  </div>
</template>

<script>

// import { formatTime, toHourMinute} from '../../tools/formatTime.js'
// import {mapActions, mapMutations, mapGetters, mapState} from 'vuex'
// import axios from 'axios'
export default {
  components: {

  },

  mixins: [],

  props: ['serveData'],

  data () {
    return {
      itemsData: {},
      messageName: [],
      emailName: [],
      columns1: [
        {
          title: '设备名称',
          key: 'eqName',
          width: 300
        },
        {
          title: '设备编号',
          key: 'eqId'
        },
        {
          title: '设备类',
          key: 'category',
          sortable: true
        },
        {
          title: '未恢复的报警',
          key: 'alarmLength'
        },
        {
          title: '安装位置',
          key: 'location',
          className: 'description-td'
        },
        {
          title: '操作',
          key: 'deal',
          render: (h, params) => {
            return h('div', [
              h('Button', {
                props: {
                  size: 'small'
                },
                style: {
                  marginRight: '5px',
                  color: '#728DEE',
                  border: '1px solid #728DEE'
                },
                on: {
                  click: () => {
                    this.handleClick(params.row)
                  }
                }
              }, '设备详情')
            ])
          }
        }
      ]
    }
  },

  computed: {

  },

  mounted () {

  },

  methods: {
    handleClick (row) {
      this.$router.push({path: 'spread', query: {id: row.id}})
    }
  }

}
</script>

<style scoped lang="less" >
.my-table {
    .my-box{
       background: #fff;
    }
}
</style>
<style lang="less">
.my-table{
    .ivu-table-wrapper {
    border: none;
  }
  .ivu-table td,
  .ivu-table th {
    border: none;
  }
  .ivu-table:before{
      height: 0;
  }
  .ivu-table:after{
      width:0;
  }
  .ivu-table-row .description-td>.ivu-table-cell>span{
        // overflow: hidden;
        // text-overflow: ellipsis;
        // white-space: nowrap;
        max-height: 100px;
        display: inline-block;
    }
}

</style>
