diff --git a/src/views/sylive/groups-statistics/components/biz-table.vue b/src/views/sylive/groups-statistics/components/biz-table.vue index 30eef47..d82d475 100644 --- a/src/views/sylive/groups-statistics/components/biz-table.vue +++ b/src/views/sylive/groups-statistics/components/biz-table.vue @@ -78,6 +78,7 @@ day: '', itemId: '', selection: [], + isUpdateValue: false, // 表格列配置 columns: [ { @@ -174,6 +175,9 @@ methods: { /* 表格数据源 */ datasource({ page, limit, order }) { + if (!this.itemId && this.data.goods[1]) { + this.itemId = this.data.goods[1]['value']; + } return getGroupsStatisticsBiz({ ...order, page, @@ -261,9 +265,14 @@ return; } this.activityId = activityId; - if (this.$refs.table) { - this.$refs.table.reload({ page: 1 }); - } + setTimeout(() => { + if (!this.itemId && this.data.goods[1]) { + this.itemId = this.data.goods[1]['value']; + } + if (this.$refs.table) { + this.$refs.table.reload({ page: 1 }); + } + }, 1500); }, immediate: true } diff --git a/src/views/sylive/groups-statistics/components/consultant-table.vue b/src/views/sylive/groups-statistics/components/consultant-table.vue index b048e63..055471b 100644 --- a/src/views/sylive/groups-statistics/components/consultant-table.vue +++ b/src/views/sylive/groups-statistics/components/consultant-table.vue @@ -227,9 +227,14 @@ return; } this.activityId = activityId; - if (this.$refs.table) { - this.$refs.table.reload({ page: 1 }); - } + setTimeout(() => { + if (!this.itemId && this.data.goods[1]) { + this.itemId = this.data.goods[1]['value']; + } + if (this.$refs.table) { + this.$refs.table.reload({ page: 1 }); + } + }, 1600); }, immediate: true } diff --git a/src/views/sylive/groups-statistics/components/customer-table.vue b/src/views/sylive/groups-statistics/components/customer-table.vue index ce0dee7..585feb1 100644 --- a/src/views/sylive/groups-statistics/components/customer-table.vue +++ b/src/views/sylive/groups-statistics/components/customer-table.vue @@ -287,9 +287,14 @@ return; } this.activityId = activityId; - if (this.$refs.table) { - this.$refs.table.reload({ page: 1 }); - } + setTimeout(() => { + if (!this.itemId && this.data.goods[1]) { + this.itemId = this.data.goods[1]['value']; + } + if (this.$refs.table) { + this.$refs.table.reload({ page: 1 }); + } + }, 1700); this.groupsQuery(); }, immediate: true diff --git a/src/views/sylive/groups-statistics/components/level-table.vue b/src/views/sylive/groups-statistics/components/level-table.vue index 473890a..9f2da4d 100644 --- a/src/views/sylive/groups-statistics/components/level-table.vue +++ b/src/views/sylive/groups-statistics/components/level-table.vue @@ -299,6 +299,9 @@ return; } this.activityId = activityId; + if (!this.itemId && this.data.goods[1]) { + this.itemId = this.data.goods[1]['value']; + } this.getStatisticsStackedArea(); if (this.$refs.table) { this.$refs.table.reload({ page: 1 }); diff --git a/src/views/sylive/groups-statistics/index.vue b/src/views/sylive/groups-statistics/index.vue index 37c7389..2f53eef 100644 --- a/src/views/sylive/groups-statistics/index.vue +++ b/src/views/sylive/groups-statistics/index.vue @@ -214,6 +214,11 @@ this.$util.assignObject(this.statistics, { ...data }); + if (data.tableData.goods[1]) { + this.itemIdPreheating = data.tableData.goods[1]['value']; + this.itemIdLive = data.tableData.goods[1]['value']; + } + this.queryFunnel(); // 修改页签标题 if (this.$route.path === ROUTE_PATH) { setPageTabTitle(data.title + '的分组数据统计'); @@ -230,6 +235,8 @@ itemId = this.itemIdPreheating; } else if (show == 'right') { itemId = this.itemIdLive; + } else { + itemId = this.itemIdPreheating; } getGroupsStatisticsFunnel({ activityId: this.activityId, @@ -348,7 +355,6 @@ } this.activityId = activityId; this.query(); - this.queryFunnel(); }, immediate: true }