<script setup>
import Table from "@/components/customUI/Table.vue";
import { inject } from "vue";

const columns = [
  {
    title: "廠區",
    key: "building_name",
    sort: true,
  },
  {
    title: "設備名稱",
    key: "device_name",
    width: "30%",
    // filter: true,
    // sort: true,
  },
  {
    title: "點位",
    key: "item_name",
  },
  {
    title: "數值",
    key: "value",
    // sort: true,
    // filter: true,
  },
  {
    title: "記錄時間",
    key: "timestamp",
    width: "20%",
    sort: true,
  },
];
const { tableData, loading } = inject("history_table_data");
</script>

<template>
  <Table :loading="loading" :columns="columns" :dataSource="tableData"></Table>
</template>

<style lang="scss" scoped></style>
