فهرست منبع

Merge branch 'dev'

skyline 1 روز پیش
والد
کامیت
2aa8496224
2فایلهای تغییر یافته به همراه4 افزوده شده و 9 حذف شده
  1. 2 5
      admin-web/src/views/admin/statistics/daily-stat.vue
  2. 2 4
      admin-web/src/views/admin/statistics/month-stat.vue

+ 2 - 5
admin-web/src/views/admin/statistics/daily-stat.vue

@@ -155,13 +155,10 @@ const state = reactive({
 })
 
 onMounted(() => {
-  // 默认查询昨天数据
+  // 同步日期默认昨天
   const yesterday = new Date();
   yesterday.setDate(yesterday.getDate() - 1);
-  const yesterdayStr = yesterday.toISOString().split('T')[0];
-  state.formQuery.startDate = yesterdayStr;
-  state.formQuery.endDate = yesterdayStr;
-  state.syncDate = yesterdayStr;
+  state.syncDate = yesterday.toISOString().split('T')[0];
 
   loadData();
 

+ 2 - 4
admin-web/src/views/admin/statistics/month-stat.vue

@@ -144,12 +144,10 @@ const state = reactive({
 })
 
 onMounted(() => {
-  // 默认查询上月数据
+  // 同步月份默认上月
   const now = new Date();
   const lastMonth = new Date(now.getFullYear(), now.getMonth() - 1, 1);
-  const lastMonthStr = lastMonth.getFullYear() + '-' + String(lastMonth.getMonth() + 1).padStart(2, '0');
-  state.formQuery.statMonth = lastMonthStr;
-  state.syncMonth = lastMonthStr;
+  state.syncMonth = lastMonth.getFullYear() + '-' + String(lastMonth.getMonth() + 1).padStart(2, '0');
 
   loadData();