<template>
  <el-table
    ref="multipleTable"
    :data="tableData"
    tooltip-effect="dark"
    style="width: 100%"
    @selection-change="handleSelectionChange">
    <el-table-column
      type="selection"
      width="55">
    </el-table-column>
    <el-table-column
      label="日期"
      width="120">
      <template slot-scope="scope">{{ scope.row.date }}</template>
    </el-table-column>
    <el-table-column
      prop="name"
      label="图像"
      width="120">
    </el-table-column>
    <el-table-column
      prop="address"
      label="地址"
      show-overflow-tooltip>
    </el-table-column>
    <el-table-column
      prop="name"
      label="订单状态"
      width="120">
    </el-table-column>
    <el-table-column
      prop="name"
      label="充电时长"
      width="120">
    </el-table-column>
    <el-table-column
      prop="name"
      label="停止理由"
      width="120">
    </el-table-column>

    <el-table-column
      prop="name"
      label="昵称"
      width="120">
    </el-table-column>
    <el-table-column
      prop="name"
      label="站点"
      width="120">
    </el-table-column>
    <el-table-column
      prop="name"
      label="设备编号"
      width="120">
    </el-table-column>
    <el-table-column
      prop="name"
      label="接口/抢描述"
      width="120">
    </el-table-column>
    <el-table-column
      prop="name"
      label="支付状态"
      width="120">
    </el-table-column>
    <el-table-column
      prop="name"
      label="退款状态"
      width="120">
    </el-table-column>
    <el-table-column
      prop="name"
      label="补缴状态"
      width="120">
    </el-table-column>
    <el-table-column
      prop="name"
      label="结算状态"
      width="120">
    </el-table-column>
    <el-table-column
      prop="name"
      label="启动授权方式"
      width="120">
    </el-table-column>
    <el-table-column
      prop="name"
      label="充电费用(v)"
      width="120">
    </el-table-column>
    <el-table-column
      prop="name"
      label="结算金额(v)"
      width="120">
    </el-table-column>
    <el-table-column
      prop="name"
      label="电量(度)"
      width="120">
    </el-table-column>
    <el-table-column
      prop="name"
      label="开始电量(度)"
      width="120">
    </el-table-column>
    <el-table-column
      prop="name"
      label="停止电量(度)"
      width="120">
    </el-table-column>
    <el-table-column
      prop="name"
      label="集团名称"
      width="120">
    </el-table-column>
    <el-table-column
      prop="name"
      label="车牌号"
      width="120">
    </el-table-column>
    <el-table-column
      prop="name"
      label="启动SOC"
      width="120">
    </el-table-column>
    <el-table-column
      prop="name"
      label="停止SOC"
      width="120">
    </el-table-column>
    <el-table-column
      prop="name"
      label="创建时间"
      width="120">
    </el-table-column>
    <el-table-column
      prop="name"
      label="停止时间"
      width="120">
    </el-table-column>
  </el-table>
</template>

<script>
  export default {
    data() {
      return {
        tableData: [{
          date: '2016-05-03',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄'
        }, {
          date: '2016-05-02',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄'
        }, {
          date: '2016-05-04',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄'
        }, {
          date: '2016-05-01',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄'
        }, {
          date: '2016-05-08',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄'
        }, {
          date: '2016-05-06',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄'
        }, {
          date: '2016-05-07',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄'
        }],
        multipleSelection: []
      }
    },

    methods: {
      toggleSelection(rows) {
        if (rows) {
          rows.forEach(row => {
            this.$refs.multipleTable.toggleRowSelection(row);
          });
        } else {
          this.$refs.multipleTable.clearSelection();
        }
      },
      handleSelectionChange(val) {
        this.multipleSelection = val;
      }
    }
  }
</script>

<style>

</style>