<template>
  <a-table :columns="columns" :data-source="data" row-key="id" size="small" bordered :loading="loading" />
</template>
<script>
export default {
  name: 'DevicePrediction',
  data() {
    return {
      loading: false,
      data: [],
      columns: [
        { title: '预测项', align:"center",dataIndex: 'item' },
        { title: '预测值', align:"center",dataIndex: 'value' },
        { title: '预测时间', align:"center",dataIndex: 'time' }
      ]
    }
  },
  mounted() { this.fetchData() },
  methods: {
    fetchData() {
      this.loading = true
      // TODO: 加载设备预测数据
      setTimeout(() => {
        this.data = []
        this.loading = false
      }, 1000)
    }
  }
}
</script>
