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 @@ +