数据统计默认第一个商品

This commit is contained in:
dengbw
2023-03-21 15:00:26 +08:00
parent fc222664ef
commit 0b98dad3f1
5 changed files with 38 additions and 10 deletions
@@ -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
}
@@ -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
}
@@ -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
@@ -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 });
+7 -1
View File
@@ -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
}