<template>
  <div class="pressureTab">
    <el-table v-loading="loading" :data="childrenDataList">
      <el-table-column label="所属设备名称" align="center" prop="beyondDeviceName"/>
      <el-table-column label="设备名称" align="center" prop="deviceName"/>
      <el-table-column label="设备编号" align="center" prop="deviceNum"/>
      <el-table-column label="所属企业" align="center" prop="beyondEnterpriseName"/>
      <el-table-column label="压力(KPa)" align="center" prop="pressure" />
      <el-table-column label="上报时间" align="center" prop="createTime"/>
    </el-table>
    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />
  </div>

</template>

<script>
  import { listData, getData, delData, addData, updateData, exportData } from "@/api/operationMonitor/data";

export default {
  props:{
    childrenQueryParams: {}
  },
  name: "PressureTabData",
  components: {
  },
  data() {
    return {
      queryParams: {
        pageNum: 1,
        pageSize: 10
      },
      loading: true,
      childrenDataList: [],
      total: 0

    };
  },
  created() {
    this.getList();
  },
  methods: {
    getList() {
      this.loading = true;
      this.childrenQueryParams.pageNum = this.queryParams.pageNum;
      this.childrenQueryParams.pageSize =  this.queryParams.pageSize;
      this.childrenQueryParams.deviceType = '1';
      listData(this.childrenQueryParams).then(response => {
          this.childrenDataList = response.rows;
          this.total = response.total;
          this.loading = false;
      });
    },
    pressureHandleQuery(){
      this.queryParams.pageNum = 1;
      this.getList();
    }

  }
};
</script>
<style>
  .pressureTab{
    margin-bottom: 20px;
  }
</style>
