mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-24 05:49:20 +08:00
feat: 更新店铺概览和公司概览页面标题显示格式
- 店铺概览:显示「店铺经营概览(店铺名)」 - 公司概览:显示「公司经营概览(公司名)」 - 统一 title 显示风格
This commit is contained in:
@@ -56,7 +56,10 @@ const activeTimeRange = ref<
|
||||
>('30days');
|
||||
|
||||
// 自定义日期范围
|
||||
const customDateRange = ref<[dayjs.Dayjs, dayjs.Dayjs] | undefined>(undefined);
|
||||
const customDateRange = ref<[dayjs.Dayjs, dayjs.Dayjs] | undefined>([
|
||||
dateRange.value[0],
|
||||
dateRange.value[1],
|
||||
]);
|
||||
const lastRequestKey = ref('');
|
||||
const isSyncingRouteQuery = ref(false);
|
||||
|
||||
@@ -96,6 +99,7 @@ const switchTimeRange = (
|
||||
}
|
||||
|
||||
dateRange.value = [startDate, endDate];
|
||||
customDateRange.value = [startDate, endDate];
|
||||
};
|
||||
|
||||
// 自定义日期范围变化
|
||||
@@ -133,25 +137,25 @@ const setTimeRangeTypeByDates = (
|
||||
|
||||
if (daysDiff === 0 && startDate.isSame(today, 'day')) {
|
||||
activeTimeRange.value = 'today';
|
||||
customDateRange.value = undefined;
|
||||
customDateRange.value = [startDate, endDate];
|
||||
return;
|
||||
}
|
||||
|
||||
if (daysDiff === 0 && startDate.isSame(dayjs().subtract(1, 'day'), 'day')) {
|
||||
activeTimeRange.value = 'yesterday';
|
||||
customDateRange.value = undefined;
|
||||
customDateRange.value = [startDate, endDate];
|
||||
return;
|
||||
}
|
||||
|
||||
if (isEndDateToday && isStartDate7DaysAgo) {
|
||||
activeTimeRange.value = '7days';
|
||||
customDateRange.value = undefined;
|
||||
customDateRange.value = [startDate, endDate];
|
||||
return;
|
||||
}
|
||||
|
||||
if (isEndDateToday && isStartDate30DaysAgo) {
|
||||
activeTimeRange.value = '30days';
|
||||
customDateRange.value = undefined;
|
||||
customDateRange.value = [startDate, endDate];
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -54,7 +54,10 @@ const activeTimeRange = ref<
|
||||
>('7days');
|
||||
|
||||
// 自定义日期范围
|
||||
const customDateRange = ref<[dayjs.Dayjs, dayjs.Dayjs] | undefined>(undefined);
|
||||
const customDateRange = ref<[dayjs.Dayjs, dayjs.Dayjs] | undefined>([
|
||||
dateRange.value[0],
|
||||
dateRange.value[1],
|
||||
]);
|
||||
const lastRequestKey = ref('');
|
||||
const isSyncingRouteQuery = ref(false);
|
||||
|
||||
@@ -94,6 +97,7 @@ const switchTimeRange = (
|
||||
}
|
||||
|
||||
dateRange.value = [startDate, endDate];
|
||||
customDateRange.value = [startDate, endDate];
|
||||
};
|
||||
|
||||
// 自定义日期范围变化
|
||||
@@ -130,25 +134,25 @@ const setTimeRangeTypeByDates = (
|
||||
|
||||
if (daysDiff === 0 && startDate.isSame(today, 'day')) {
|
||||
activeTimeRange.value = 'today';
|
||||
customDateRange.value = undefined;
|
||||
customDateRange.value = [startDate, endDate];
|
||||
return;
|
||||
}
|
||||
|
||||
if (daysDiff === 0 && startDate.isSame(dayjs().subtract(1, 'day'), 'day')) {
|
||||
activeTimeRange.value = 'yesterday';
|
||||
customDateRange.value = undefined;
|
||||
customDateRange.value = [startDate, endDate];
|
||||
return;
|
||||
}
|
||||
|
||||
if (isEndDateToday && isStartDate7DaysAgo) {
|
||||
activeTimeRange.value = '7days';
|
||||
customDateRange.value = undefined;
|
||||
customDateRange.value = [startDate, endDate];
|
||||
return;
|
||||
}
|
||||
|
||||
if (isEndDateToday && isStartDate30DaysAgo) {
|
||||
activeTimeRange.value = '30days';
|
||||
customDateRange.value = undefined;
|
||||
customDateRange.value = [startDate, endDate];
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user