定时任务
This commit is contained in:
@@ -81,6 +81,12 @@ export default {
|
||||
this.currentBgColor2 = "#00D4AA";
|
||||
this.getData("china");
|
||||
//this.getData("440000");
|
||||
|
||||
// 监听事件总线的刷新事件
|
||||
this.$eventBus.$on('refresh-all-data', () => {
|
||||
this.getYearData();
|
||||
this.getData(this.code);
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
changeShow1() {
|
||||
@@ -768,6 +774,10 @@ export default {
|
||||
destroyed() {
|
||||
// 销毁事件监听
|
||||
this.$refs.CenterMap.chart.off("click");
|
||||
|
||||
// 移除事件总线的刷新事件监听
|
||||
this.$eventBus.$off('refresh-all-data');
|
||||
|
||||
if (this.charts) {
|
||||
this.echarts.dispose();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user