<template>
    <div class="FeedingRecord">
        <el-button style="position: absolute; top: 40px; left: 66px;" size="medium" round icon="el-icon-back"
            @click="handleBack()">返回</el-button>
        <el-table :data="tableData" height="350px" style="width: 100%" :header-cell-class-name="HeaderCell" stripe
            border>
            <el-table-column label="序号" type="index" width="80" align="center">
            </el-table-column>
            <el-table-column label="投食重量" align="center">
                <template slot-scope="scope">
                    <span style="margin-left: 10px">{{ scope.row.weight
                        }}</span>
                </template>
            </el-table-column>
            <el-table-column label="投食时间" align="center">
                <template slot-scope="scope">
                    <span style="margin-left: 10px">{{ scope.row.time }}</span>
                </template>
            </el-table-column>


        </el-table>

    </div>
</template>
<script>
export default {
    data() {
        return {
            data: {
                name: "",
            },
            token: "",
            tableData: [
                {
                    time: "2025-05-06 12:25:06",
                    weight: "8955",
                },
                {
                    time: "2025-05-06 12:25:06",
                    weight: "66%",
                },
                {
                    time: "2025-05-06 12:25:06",
                    weight: "66%",
                },
                {
                    time: "2025-05-06 12:25:06",
                    weight: "66%",
                },
                {
                    time: "2025-05-06 12:25:06",
                    weight: "66%",
                }
            ]
        };
    },
    methods: {

        handleBack() {
            this.$router.push({
                name: 'deviceDetails'
            })
        },
        // 表头单元格样式
        HeaderCell() {
            return 'HeaderCellClass';
        },
    },
    mounted() {

    },
    created() {
    },
    computed: {

    },
};

</script>
<style lang="scss" scoped>
.FeedingRecord::v-deep {
    margin-top: 100px;
    padding: 10px;
    background-color: #fff;
    box-shadow: 0 0 5px #d0d0d0;
    border-radius: 5px;


    .HeaderCellClass {
        background: #859CB7;
        color: #fff;
    }


}
</style>