<template>
  <div style="padding:10px">
    <div class="header_button">
      <span>检测时间</span>
      <el-date-picker
        v-model="value"
        type="daterange"
        range-separator="至"
        start-placeholder="开始日期"
        end-placeholder="结束日期"
        unlink-panels
      >
      </el-date-picker>
      <el-button> 清空</el-button>
      <el-button>查询</el-button>
      <el-button>新增</el-button>
    </div>

    <el-table :data="warehouseData" stripe style="width: 100%" border>
      <!-- <el-table-column label="序号" type="index" align="center">
          </el-table-column> -->
      <el-table-column prop="recordTime" label="记录时间" align="center">
      </el-table-column>
      <el-table-column prop="testResults" label="检测结果" align="center">
      </el-table-column>

      <el-table-column label="操作" align="center">
        <template slot-scope="scope">
          <el-button
            @click="checkPoliceSystem(scope.row)"
            type="text"
            size="small"
            >查看</el-button
          >
          <el-button type="text" size="small">修改</el-button>
          <el-button type="text" size="small">删除</el-button>
        </template>
      </el-table-column>
    </el-table>
    <pagination
      v-show="total > 0"
      :total="total"
      :page.sync="listQuery.page"
      :limit.sync="listQuery.limit"
      @pagination="getList"
    />
  </div>
</template>
<script>
//引入分页
import Pagination from "@/components/Pagination"
export default {
      components: { Pagination },
  data() {
    return {
      value: "",
      pickerOptions: {
        shortcuts: [
          {
            text: "最近一周",
            onClick(picker) {
              const end = new Date()
              const start = new Date()
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
              picker.$emit("pick", [start, end])
            },
          },
        ],
      },
      //入库质量数据
      warehouseData: [
        {
          recordTime: "2020-2-1",
          testResults: "sssssssss",
        },
         {
          recordTime: "2020-3-1",
          testResults: "sssssssss",
        },
      ],
      //   分页
      total: 30,
      listLoading: true,
      listQuery: {
        page: 1,
        limit: 10,
        importance: undefined,
        title: undefined,
        type: undefined,
        sort: "+id",
      },
    }
  },
  methods: {
      getList(){}
  },
}
</script>
<style  scoped>
.header_button {
  padding: 10px 5px;
}
span {
  padding-right: 10px;
}
el-button {
  padding: 0 10px;
}
</style>