pressureTab.vue 1.81 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
<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>