<template>
    <div>
        <el-table
                    :data="tableData"
                    tooltip-effect="dark"
                    style="width: 100%"
                >
                    <el-table-column prop="id" label="序号" width="60"></el-table-column>
                    <el-table-column label="入库日期">
                        <template v-slot="scope">
                            <span>{{ scope.row['inTime'].substr(0,10) }}</span>
                        </template>
                    </el-table-column>

                    <el-table-column label="购买人">
                        <template v-slot="scope">
                            <div v-for="item in $store.state['workerList']" :key="item.value">
                                <span v-if="item.id == scope.row['buyer']">{{ `${item.name}(${item.position})` }}</span>
                            </div>
                        </template>
                    </el-table-column>
                    
                    <el-table-column label="操作" width="150">
                        <template v-slot="scope">
                            <el-button @click="edit(scope.row)" type="text" size="small">编辑</el-button>
                            <el-popconfirm title="是否删除此设备的信息？" @onConfirm="del(scope.row)">
                                <el-button slot="reference" type="text" size="small">删除</el-button>
                            </el-popconfirm>
                        </template>
                    </el-table-column>
                </el-table>
    </div>
</template>


<script>
export default {
    name: "Af",
    data() {
        return {
            tableData: [],
        };
    },
    created() {},
    methods: {
        
    }
};
</script>
