diff --git a/src/views/sylive/activity/statistics-team/components/biz-table.vue b/src/views/sylive/activity/statistics-team/components/biz-table.vue index 8cba337..5e79a3e 100644 --- a/src/views/sylive/activity/statistics-team/components/biz-table.vue +++ b/src/views/sylive/activity/statistics-team/components/biz-table.vue @@ -155,6 +155,20 @@ updateValue() { this.$refs.table.reload({ page: 1 }); } + }, + watch: { + $route: { + handler(route) { + const { path } = route; + if (path !== '/sylive/activity/statistics-team') { + return; + } + if (this.$refs.table) { + this.$refs.table.reload({ page: 1 }); + } + }, + immediate: true + } } }; diff --git a/src/views/sylive/activity/statistics-team/components/consultant-table.vue b/src/views/sylive/activity/statistics-team/components/consultant-table.vue index 968d2b2..72807bc 100644 --- a/src/views/sylive/activity/statistics-team/components/consultant-table.vue +++ b/src/views/sylive/activity/statistics-team/components/consultant-table.vue @@ -139,6 +139,20 @@ updateValue() { this.$refs.table.reload({ page: 1 }); } + }, + watch: { + $route: { + handler(route) { + const { path } = route; + if (path !== '/sylive/activity/statistics-team') { + return; + } + if (this.$refs.table) { + this.$refs.table.reload({ page: 1 }); + } + }, + immediate: true + } } }; diff --git a/src/views/sylive/activity/statistics/components/area-table.vue b/src/views/sylive/activity/statistics/components/area-table.vue index 2e3b4b2..430d923 100644 --- a/src/views/sylive/activity/statistics/components/area-table.vue +++ b/src/views/sylive/activity/statistics/components/area-table.vue @@ -292,6 +292,21 @@ updateValue() { this.$refs.table.reload({ page: 1 }); } + }, + watch: { + $route: { + handler(route) { + const { path } = route; + if (path !== '/sylive/activity/statistics') { + return; + } + if (this.$refs.table) { + this.$refs.table.reload({ page: 1 }); + this.getStatisticsStackedArea(); + } + }, + immediate: true + } } }; diff --git a/src/views/sylive/activity/statistics/components/biz-table.vue b/src/views/sylive/activity/statistics/components/biz-table.vue index badb9e8..41ea7d3 100644 --- a/src/views/sylive/activity/statistics/components/biz-table.vue +++ b/src/views/sylive/activity/statistics/components/biz-table.vue @@ -155,6 +155,20 @@ updateValue() { this.$refs.table.reload({ page: 1 }); } + }, + watch: { + $route: { + handler(route) { + const { path } = route; + if (path !== '/sylive/activity/statistics') { + return; + } + if (this.$refs.table) { + this.$refs.table.reload({ page: 1 }); + } + }, + immediate: true + } } }; diff --git a/src/views/sylive/activity/statistics/components/consultant-table.vue b/src/views/sylive/activity/statistics/components/consultant-table.vue index 1d116f1..aa50bc7 100644 --- a/src/views/sylive/activity/statistics/components/consultant-table.vue +++ b/src/views/sylive/activity/statistics/components/consultant-table.vue @@ -139,6 +139,20 @@ updateValue() { this.$refs.table.reload({ page: 1 }); } + }, + watch: { + $route: { + handler(route) { + const { path } = route; + if (path !== '/sylive/activity/statistics') { + return; + } + if (this.$refs.table) { + this.$refs.table.reload({ page: 1 }); + } + }, + immediate: true + } } }; diff --git a/src/views/sylive/activity/statistics/components/watchOrder-linechart.vue b/src/views/sylive/activity/statistics/components/watchOrder-linechart.vue index 933fe67..6e813d8 100644 --- a/src/views/sylive/activity/statistics/components/watchOrder-linechart.vue +++ b/src/views/sylive/activity/statistics/components/watchOrder-linechart.vue @@ -45,9 +45,6 @@ } //折线图 }; }, - created() { - this.getStatisticsStackedWatchOrder(); - }, methods: { //区域统计折线图 getStatisticsStackedWatchOrder() { @@ -88,6 +85,18 @@ }; }); } + }, + watch: { + $route: { + handler(route) { + const { path } = route; + if (path !== '/sylive/activity/statistics') { + return; + } + this.getStatisticsStackedWatchOrder(); + }, + immediate: true + } } };