10/11

<template>
<div>
<el-table :data="workReportRecords" style="width: 100%; margin-top: 20px;">
<el-table-column prop="workOrderId" label="工单ID" width="120"></el-table-column>
<el-table-column prop="batchNumber" label="批次号" width="180"></el-table-column>
<el-table-column prop="processName" label="工序名称" width="150"></el-table-column>
<el-table-column prop="moldName" label="模具名称" width="180"></el-table-column>
<el-table-column prop="employeeName" label="职工姓名" width="180"></el-table-column>
<el-table-column prop="startTime" label="开始时间" width="180"></el-table-column>
<el-table-column prop="endTime" label="结束时间" width="180"></el-table-column>
</el-table>
</div>
</template>

<script>
import axios from 'axios';

export default {
data() {
return {
workReportRecords: [],
};
},
created() {
this.fetchWorkReports();
},
methods: {
async fetchWorkReports() {
try {
const response = await axios.post('http://localhost:80/mes/select'); // 根据实际接口路径修改
this.workReportRecords = response.data;
} catch (error) {
console.error('获取报工单数据失败:', error);
}
},
},
};
</script>

<style scoped>
.el-table {
margin-top: 20px;
}
</style>
posted on 2024-10-11 20:24  清荣峻茂  阅读(14)  评论(0)    收藏  举报