diff --git a/src/views/stationOperation/index.vue b/src/views/stationOperation/index.vue index 10993c5..9c9f022 100644 --- a/src/views/stationOperation/index.vue +++ b/src/views/stationOperation/index.vue @@ -184,16 +184,23 @@ export default { watch: { $route: { handler: function (val, oldVal) { - if (val.name !== 'station-operation') { - this.$message.destroy() - clearInterval(this.timer) - this.timer = null + console.log('fasdfasde12312', val) + console.log('8765432', oldVal) + if (val.name === 'station-operation') { + this.getDataProvisionEfficiency(this.markerList_clone) } }, deep: true, - immediate: true, + // immediate: true, }, }, + deactivated() { + //等同于 销毁的生命周期 + console.log('切换出发了3') + this.$message.destroy() + clearInterval(this.timer) + this.timer = null + }, data() { return { activeKey: '1',