yudao-dev/src/views/databoard/wholePlant/DefectClass.vue

51 lines
1.3 KiB
Vue
Raw Normal View History

2024-01-04 16:37:14 +08:00
<template>
2024-01-11 13:44:38 +08:00
<Container name="产线当日缺陷分类" size="middle">
2024-01-18 14:05:39 +08:00
<TimePrompt class="timeShow" :timestr="timestr" />
<DropDownBtn class="typeToggle" :options="['Y61', 'Y62', 'Y63', 'Y64', 'Y65']" @emitFun='toggleType' :active='chartType' />
2024-01-11 13:44:38 +08:00
<div class="chart" style="height: 375px; margin-top: 8px;">
2024-01-18 14:05:39 +08:00
<DefectClassChart :chartType='chartType' @emitFun='dateUpdate'/>
2024-01-11 13:44:38 +08:00
</div>
</Container>
2024-01-04 16:37:14 +08:00
</template>
<script>
import Container from '../components/Container';
2024-01-18 14:05:39 +08:00
import DropDownBtn from '../components/DropDownBtn';
2024-01-04 16:37:14 +08:00
import DefectClassChart from '../components/DefectClassChart';
2024-01-18 14:05:39 +08:00
import TimePrompt from '../components/TimePrompt';
import { switchShowTime } from '../utils'
2024-01-04 16:37:14 +08:00
export default {
name: 'DefectClass',
2024-01-18 14:05:39 +08:00
components: { Container, DropDownBtn, DefectClassChart, TimePrompt },
2024-01-04 16:37:14 +08:00
data() {
return {
2024-01-18 14:05:39 +08:00
chartType:'Y61',
timestr: ''
2024-01-04 16:37:14 +08:00
}
},
2024-01-18 14:05:39 +08:00
mounted() {
this.timestr = switchShowTime('日')
},
2024-01-04 16:37:14 +08:00
methods: {
// 切换产线
toggleType(val) {
this.chartType = val
2024-01-18 14:05:39 +08:00
},
// 数据更新
dateUpdate() {
this.timestr = switchShowTime('日')
}
2024-01-04 16:37:14 +08:00
}
}
</script>
<style lang='scss' scoped>
2024-01-18 14:05:39 +08:00
.timeShow {
position: absolute;
top: 18px;
left: 260px;
}
2024-01-04 16:37:14 +08:00
.typeToggle {
position: absolute;
right: 20px;
2024-01-18 14:05:39 +08:00
top: 15px;
2024-01-04 16:37:14 +08:00
}
</style>