yudao-dev/src/views/databoard/wholePlant/DefectClass.vue
2024-01-04 16:37:14 +08:00

38 lines
975 B
Vue

<template>
<div style="flex: 1;">
<Container name="产线当日缺陷分类" size="small">
<SelectorBtnGroup class="typeToggle" :options="['Y61', 'Y62', 'Y63', 'Y64', 'Y65']" @emitFun='toggleType' :active='chartType' />
<div class="chart" style="height: 370px; margin-top: 8px;">
<DefectClassChart :chartType='chartType'/>
</div>
</Container>
</div>
</template>
<script>
import Container from '../components/Container';
import SelectorBtnGroup from '../components/SelectorBtnGroup';
import DefectClassChart from '../components/DefectClassChart';
export default {
name: 'DefectClass',
components: { Container, SelectorBtnGroup, DefectClassChart },
data() {
return {
chartType:'Y61'
}
},
methods: {
// 切换产线
toggleType(val) {
console.log('产线' + val)
this.chartType = val
}
}
}
</script>
<style lang='scss' scoped>
.typeToggle {
position: absolute;
right: 20px;
top: 30px;
}
</style>