index.vue 2.31 KB
<template>
  <div class="manage-wrapper manage-container" style="box-sizing: border-box;padding-top: 20px">
    <el-button type="primary" class="primary-btn analysis-collapse-btn" size="small" 
      style="margin: 0 0 15px 40px"
      @click="resetRefresh">{{$t('button.refresh')}}</el-button>
    <!-- <mix-charts chartId="messagecenter" class="rank-chart-box" :chartData="chartData" chartType="Bar" /> -->
    <el-table
      :data="tableData"
      :max-height="tableHeight"
      style="width: 100%"
      header-row-class-name="manage-tab-head"
    >
      <el-table-column prop="faceData" align="center" label="人次未处理数据量">
      </el-table-column>
      <el-table-column prop="faceFeatureData" align="center" label="人数提特征未处理数据量">
      </el-table-column>
      <el-table-column prop="faceMatchData" align="center" label="人数比对未处理数据量">
      </el-table-column>
      <el-table-column prop="countData" align="center" label="客流未处理数据量">
      </el-table-column>
      <el-table-column prop="heatmapData" align="center" label="热力图未处理数据量">
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
  data() {
    return {
      tableData: []
    };
  },
  computed: {
		tableHeight() {
      const windowInnerHeight = window.innerHeight
      return windowInnerHeight - windowInnerHeight * 0.24
		},
	},
  mounted() {
    this.getData();
  },
  methods: {
    getData() {
      this.$api.management.getUntreatedData().then(res => {
        if (res.status === 200) {
          this.tableData = [
            {
              faceData: res.data.data.faceData,
              countData: res.data.data.countData,
              faceFeatureData: res.data.data.faceFeatureData,
              faceMatchData: res.data.data.faceMatchData,
              heatmapData: res.data.data.heatmapData
            }
          ]
        } else {
          this.tableData = [
            {
              faceData: 0,
              countData: 0,
              faceFeatureData: 0,
              faceMatchData: 0,
              heatmapData: 0
            }
          ]
        }
      })
    },
    resetRefresh() {
      this.getData()
    }
  }
};
</script>

<style>
.manage-wrapper {
  width: 100%;
  /* box-sizing: border-box;
  padding-top: 100px; */
}
</style>