
<template>
  <el-card>
    <div class="search-box">
      <el-input
        v-model="batchId"
        placeholder="请输入批次id查询处理结果"
        style="width:240px"
        clearable
      />
      <el-button
        type="primary"
        style="margin-left: 10px;"
        size="mini"
        @click="search"
      >查询</el-button>
    </div>
    <div class="cont">
      <el-table
        :data="tableData"
        stripe
        style="width: 100%"
      >
        <el-table-column
          prop="date"
          label="日期"
          width="180"
        />
        <el-table-column
          prop="name"
          label="姓名"
          width="180"
        />
        <el-table-column
          prop="address"
          label="地址"
        />
      </el-table>
    </div>
  </el-card>
</template>
<script>
import { getLogById } from '@/api'
export default {
  name: 'ReceiveUnit',
  data() {
    return {
      batchId: undefined,
      tableData: []
    }
  },
  methods: {
    search() {
      this.getLogById()
    },
    getLogById() {
      getLogById({
        batchId: this.batchId
      }).then((result) => {
        this.tableData = result.data
      })
    }
  }
}
</script>
<style lang="scss" scoped>
.cont{
  margin-top: 15px;
  min-height: 81vh;
  overflow-y: auto;
}
</style>
