From 0b98dad3f1c462088eef4596f7c395272ab044b1 Mon Sep 17 00:00:00 2001 From: dengbw Date: Tue, 21 Mar 2023 15:00:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=BB=9F=E8=AE=A1=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E7=AC=AC=E4=B8=80=E4=B8=AA=E5=95=86=E5=93=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../groups-statistics/components/biz-table.vue | 15 ++++++++++++--- .../components/consultant-table.vue | 11 ++++++++--- .../components/customer-table.vue | 11 ++++++++--- .../groups-statistics/components/level-table.vue | 3 +++ src/views/sylive/groups-statistics/index.vue | 8 +++++++- 5 files changed, 38 insertions(+), 10 deletions(-) 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 }