<template>
  <div class="my-table">
      <div class="my-box">
           <i-Table stripe  :columns="columns1" :data="tableData" 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: ['tableData'],

  data () {
    return {
      itemsData: {},
      messageName: [],
      emailName: [],
      columns1: [
        {
          title: '资产名称',
          key: 'level'
        },
        {
          title: '资产编号',
          key: 'type'
        },
        {
          title: '设备类',
          key: 'content',
          sortable: true
        },
        {
          title: '未恢复的报警',
          key: 'ctime'
        },
        {
          title: '设备安装时间',
          key: 'duration',
          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('asset')
    }
  }

}
</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>
