<template>
  <Container name="产线当日缺陷分类" size="middle">
    <SelectorBtnGroup class="typeToggle" :options="['Y61', 'Y62', 'Y63', 'Y64', 'Y65']" @emitFun='toggleType' :active='chartType' />
    <div class="chart" style="height: 375px; margin-top: 8px;">
      <DefectClassChart :chartType='chartType'/>
    </div>
  </Container>
</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>