yudao-dev/src/views/databoard/deepProcessing/WorkOrderMonitoring.vue

54 lines
1.4 KiB
Vue
Raw Normal View History

2023-12-29 09:26:07 +08:00
<template>
2024-01-11 13:44:38 +08:00
<Container name="工单监控" size="middle" style="">
<div style="padding: 5px 10px;" class="WOMonitoring">
2024-01-12 09:45:36 +08:00
<dv-scroll-board :config="config" style="width:900px;height:380px" ref='worderScrollBoard'/>
2024-01-11 13:44:38 +08:00
</div>
</Container>
2023-12-29 09:26:07 +08:00
</template>
<script>
import Container from '../components/Container.vue';
2024-01-12 09:45:36 +08:00
import { formatDate } from '@/utils'
2023-12-29 09:26:07 +08:00
export default {
2024-01-04 16:37:14 +08:00
name: 'WorkOrderMonitoring',
2024-01-08 16:59:42 +08:00
components: { Container },
computed: {
order() {
return this.$store.state.websocket.workOrder
}
},
2024-01-05 11:03:08 +08:00
data() {
return {
2024-01-12 09:45:36 +08:00
config: {
header: ['序号', '工单名称', '规格','产线','工单状态', '计划完成时间','计划产量','实际产量'],
headerBGC: 'rgba(32, 55, 96, 0.8)',
oddRowBGC: 'rgba(32, 55, 96, 0.8)',
evenRowBGC: 'rgba(14, 32, 62, 0.8)',
columnWidth: [60, 120, 120, 60, 100, 150],
align: ['center'],
data: [],
rowNum:10
}
2024-01-05 11:03:08 +08:00
}
2024-01-08 16:59:42 +08:00
},
2024-01-11 13:44:38 +08:00
methods:{
},
2024-01-12 09:45:36 +08:00
watch:{
order: {
handler(newVal, oldVal) {
let outArr = this.order.map((item, index) => [
index+1,
item.name,
item.specifications,
item.lines,
['等待','已下发','已完成'][item.status],
formatDate(item.planFinishTime),
item.planQuantity,
item.planAssignQuantity
]);
this.config.data = outArr
this.$refs['worderScrollBoard'].updateRows(outArr)
}
}
2024-01-05 11:03:08 +08:00
}
2023-12-29 09:26:07 +08:00
}
2024-01-12 09:45:36 +08:00
</script>