From b3edf33de93e27b4ae39c9795d8ee8c0e38496ca Mon Sep 17 00:00:00 2001 From: shijing Date: Thu, 18 Jan 2024 14:58:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=B7=E6=96=99=E5=B0=8F=E6=95=B0=E7=82=B9&#?= =?UTF-8?q?117?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/bigScreen/index_photon.vue | 49 ++++++++++++++++++---------- src/views/wpm/mlog_hun.vue | 6 ++++ src/views/wpm/worktask_form.vue | 6 +++- 3 files changed, 42 insertions(+), 19 deletions(-) diff --git a/src/views/bigScreen/index_photon.vue b/src/views/bigScreen/index_photon.vue index 5061dd3f..b6db9f8c 100644 --- a/src/views/bigScreen/index_photon.vue +++ b/src/views/bigScreen/index_photon.vue @@ -350,23 +350,26 @@ export default { that.showTime(); }, 1000); that.notokTimer = setInterval(() => { - if (that.deptName == '10车间') { - that.deptName = '7车间' - } else { - that.deptName = '10车间' - } - let deptData = []; - if (that.deptName == '7车间') { - deptData = that.dept7Data; - } else { - deptData = that.dept10Data; - } - that.pieoption.series.data = deptData; - let pieoption = that.pieoption; let pieDom = document.getElementById('pie'); - let pieChart = echarts.init(pieDom); - pieChart.clear(); - pieChart.setOption(pieoption, true); + if(pieDom){ + if (that.deptName == '10车间') { + that.deptName = '7车间' + } else { + that.deptName = '10车间' + } + let deptData = []; + if (that.deptName == '7车间') { + deptData = that.dept7Data; + } else { + deptData = that.dept10Data; + } + that.pieoption.series.data = deptData; + let pieoption = that.pieoption; + + let pieChart = echarts.init(pieDom); + pieChart.clear(); + pieChart.setOption(pieoption, true); + } }, 5000); that.initChart(); @@ -1599,9 +1602,19 @@ export default { this.currentObj.deptName = ''; }, }, + beforeUnmount() { + let that = this; + clearInterval(that.timerTime); + clearInterval(that.notokTimer); + that.timerTime = null; + that.notokTimer = null; + }, beforeDestoryed() { - clearInterval(timerTime); - this.timerTime = null; + let that = this; + clearInterval(that.timerTime); + clearInterval(that.notokTimer); + that.timerTime = null; + that.notokTimer = null; }, } diff --git a/src/views/wpm/mlog_hun.vue b/src/views/wpm/mlog_hun.vue index 2eeb62c6..7efdc0c6 100644 --- a/src/views/wpm/mlog_hun.vue +++ b/src/views/wpm/mlog_hun.vue @@ -22,6 +22,9 @@ +