<template>
  <div>
    <div class="page">
      <el-form :model="search" ref="headerForm" label-width="100px" size="mini">
        <el-form-item label="检测环节：" style="width:300px">
          <el-input v-model="search.codeAndFond" placeholder="请输入检测环节" clearable></el-input>
        </el-form-item>
        <el-form-item label="数据类型：" style="width:300px">
          <el-input v-model="search.codeAndFond" placeholder="请输入数据类型" clearable></el-input>
        </el-form-item>
        <el-form-item label="接收时间：" style="width:300px">
          <el-input v-model="search.codeAndFond" placeholder="请输入接收时间" clearable></el-input>
        </el-form-item>

        <div class="btn">
          <el-button type="primary" size="mini" @click="getData"><i class="iconfont icon-sousuo"></i>查询</el-button>
          <el-button type="info" size="mini" @click="resetClick"><i class="iconfont icon-sousuo"></i>重置</el-button>
        </div>
      </el-form>
    </div>
    <el-table height="550px" border>
      <el-table-column label="检测环节"></el-table-column>
      <el-table-column label="数据类型"></el-table-column>
      <el-table-column label="检测路径"></el-table-column>
      <el-table-column label="总条数"></el-table-column>
      <el-table-column label="失败项数"></el-table-column>
      <el-table-column label="检测时间"></el-table-column>
    </el-table>
    <el-pagination @current-change="handleCurrentChange" @size-change="handleSizeChange"
      layout="total, prev, pager, next, sizes" :page-size="pagination.pageSize" :page-sizes="[10, 20, 30, 50]"
      :current-page="pagination.pageNum" :total="pagination.total">
    </el-pagination>
  </div>
</template>
<script>
  import {
    message,
    clearObjValue
  } from "@/utils/common";
  export default {
    data() {
      return {
        search: {
          jchj: "",
          statusType: "",
          time: ""
        },
        params: {},
        tableData: [],
        loading: false,
        pagination: {
          pageSize: 10,
          pageNum: 1,
          total: 0,
        },
      }
    },
    methods: {
      getData() {
        this.params = {
          jchj: this.params.jchj,
          statusType: this.params.statusType,
          time: this.params.time,
          page: this.pagination.pageNum,
          limit: this.pagination.pageSize,
        }
        // this.$store.dispatch('dataReception/getDataFrist', this.params).then(res => {

        // })
      },
      resetClick() {
        clearObjValue(this.params)
      },
      handleCurrentChange() {

      },
      handleSizeChange() {

      }
    },
    created() {
      this.getData()
    }
  }

</script>
<style lang="scss" scoped>
  .page {
    width: 100%;
    background-color: #fff;
    padding: 10px;
    box-sizing: border-box;

    .el-form {
      display: flex;
      flex-wrap: wrap;

      .el-form-item {
        margin-bottom: 10px;
      }

      .btn {
        margin-left: 10px;
      }
    }
  }

</style>
