<template>
  <div class="flowmeterTab">
    <el-table v-loading="loading" :data="childrenDataList">
      <el-table-column label="所属设备名称" align="center" prop="beyondDeviceName" width="155"/>
      <el-table-column label="设备名称" align="center" prop="deviceName" width="155"/>
      <el-table-column label="设备编号" align="center" prop="deviceNum" width="155"/>
      <el-table-column label="所属企业" align="center" prop="beyondEnterpriseName" />
      <el-table-column label="标况累计量(m³)" align="center" prop="standardConditionAccumulation"/>
      <el-table-column label="工况累计量(m³)" align="center" prop="workingConditionAccumulation" />
      <el-table-column label="逆向标况累计量(m³)" align="center" prop="backingStandardConditionAccumulation" />
      <el-table-column label="剩余量(m³)" align="center" prop="residualQuantity" />
      <el-table-column label="标况流量(m³/h)" align="center" prop="standardConditionFlow" />
      <el-table-column label="工况流量(m³/h)" align="center" prop="workingConditionFlow" />
      <el-table-column label="温度(℃)" align="center" prop="temperature" />
      <el-table-column label="压力(KPa)" align="center" prop="pressure" />
      <el-table-column label="上报时间" align="center" prop="createTime" width="180" />
    </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: "FlowmeterTabData",
  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 = '2';
      listData(this.childrenQueryParams).then(response => {
          this.childrenDataList = response.rows;
          this.total = response.total;
          this.loading = false;
      });
    },
    flowmeterHandleQuery(){
      this.queryParams.pageNum = 1;
      this.getList();
    }

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