| | |
| | | import * as echarts from 'echarts' |
| | | const route = useRoute() |
| | | const enterprise = useCounterStore() |
| | | let mainTimer = ref(null) |
| | | let planTimer = ref(null) |
| | | let reportTimer = ref(null) |
| | | let planContainer = ref(null) |
| | |
| | | onBeforeUnmount(() => { |
| | | clearTimeout(planTimer.value) |
| | | clearTimeout(reportTimer.value) |
| | | clearTimeout(mainTimer.value) |
| | | }) |
| | | onMounted(() => { |
| | | initData() |
| | | mainTimer.value = setInterval(() => { |
| | | initData() |
| | | }, 6000) |
| | | }) |
| | | |
| | | |
| | | onUnmounted(() => { |
| | | clearTimeout(planTimer.value) |
| | | clearTimeout(reportTimer.value) |
| | | clearTimeout(mainTimer.value) |
| | | }) |
| | | |
| | | function initData() { |
| | |
| | | let option; |
| | | option = { |
| | | title: { |
| | | text: ' 近七日不良品总数:67', |
| | | text: ` 近七日不良品总数:${data.allBad}`, |
| | | textStyle: { |
| | | color: '#fff', |
| | | fontSize: 12 |