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

51 lines
1.3 KiB
Vue
Raw Normal View History

2023-12-29 09:26:07 +08:00
<template>
<div style="flex: 1;">
2024-01-04 16:37:14 +08:00
<Container name="各工序缺陷汇总" size="small" style="">
2024-01-05 11:03:08 +08:00
<div style="padding: 5px 10px;">
2024-01-08 16:59:42 +08:00
<dv-scroll-board :config="config" style="width:575px;height:380px" ref='defectScrollBoard'/>
2024-01-05 11:03:08 +08:00
</div>
2023-12-29 09:26:07 +08:00
</Container>
</div>
</template>
<script>
import Container from '../components/Container.vue';
export default {
2024-01-04 16:37:14 +08:00
name: 'DefectSum',
2024-01-08 16:59:42 +08:00
components: { Container },
computed: {
defectSum() {
return this.$store.state.websocket.defectSum
}
},
2024-01-05 11:03:08 +08:00
data() {
return {
config: {
header: ['序号', '产线', '工序','损耗片数','缺陷类型'],
// headerHeight: '17',
headerBGC: 'rgba(32, 55, 96, 0.8)',
oddRowBGC: 'rgba(32, 55, 96, 0.8)',
evenRowBGC: 'rgba(14, 32, 62, 0.8)',
columnWidth: [60],
align: ['center'],
2024-01-08 16:59:42 +08:00
data: [],
2024-01-05 11:03:08 +08:00
rowNum: 10
}
}
2024-01-08 16:59:42 +08:00
},
watch:{
defectSum: {
handler(newVal, oldVal) {
let outArr = this.defectSum.map((item, index) => [
index+1,
item.productionLineName,
item.sectionName,
item.count,
item.inspectionTypeName
]);
this.config.data = outArr
this.$refs['defectScrollBoard'].updateRows(outArr)
}
}
2024-01-05 11:03:08 +08:00
}
2023-12-29 09:26:07 +08:00
}
</script>