diff --git a/core/frontend/src/i18n/lang/en.json b/core/frontend/src/i18n/lang/en.json index e7b1da15..5c1b7192 100644 --- a/core/frontend/src/i18n/lang/en.json +++ b/core/frontend/src/i18n/lang/en.json @@ -136,6 +136,7 @@ "clicked": "Clicked", "bounced": "Bounced", "delayedQueue": "Delayed Queue", + "metricCount": "{count} mails", "mailProviders": "Mail Providers", "sendStats": "Send Statistics", "provider": { diff --git a/core/frontend/src/i18n/lang/ja.json b/core/frontend/src/i18n/lang/ja.json index 19db9dad..8011c20d 100644 --- a/core/frontend/src/i18n/lang/ja.json +++ b/core/frontend/src/i18n/lang/ja.json @@ -127,6 +127,7 @@ "clicked": "クリック済み", "bounced": "バウンス(送信失敗)", "delayedQueue": "遅延キュー", + "metricCount": "{count} 通", "mailProviders": "メールプロバイダー", "sendStats": "送信統計", "provider": { diff --git a/core/frontend/src/i18n/lang/zh.json b/core/frontend/src/i18n/lang/zh.json index 3c4aa430..ef9eebf5 100644 --- a/core/frontend/src/i18n/lang/zh.json +++ b/core/frontend/src/i18n/lang/zh.json @@ -138,6 +138,7 @@ "clicked": "已点击", "bounced": "已退回", "delayedQueue": "延迟队列", + "metricCount": "{count} 封邮件", "mailProviders": "邮件提供商", "sendStats": "发送统计", "provider": { diff --git a/core/frontend/src/views/market/task/analytics.vue b/core/frontend/src/views/market/task/analytics.vue index d6244848..eefe199c 100644 --- a/core/frontend/src/views/market/task/analytics.vue +++ b/core/frontend/src/views/market/task/analytics.vue @@ -23,6 +23,7 @@ :key="key" :title="item.label" :value="item.value" + :count="item.count" :unit="item.unit"> @@ -70,10 +71,10 @@ const dateRange = ref(getDayTimeRange()) const providers = ref([]) const rateData = reactive({ - delivery_rate: { label: t('overview.delivered'), value: 0, unit: '%' }, - open_rate: { label: t('overview.opened'), value: 0, unit: '%' }, - click_rate: { label: t('overview.clicked'), value: 0, unit: '%' }, - bounce_rate: { label: t('overview.bounced'), value: 0, unit: '%' }, + delivery_rate: { label: t('overview.delivered'), value: 0, unit: '%', count: 0 }, + open_rate: { label: t('overview.opened'), value: 0, unit: '%', count: 0 }, + click_rate: { label: t('overview.clicked'), value: 0, unit: '%', count: 0 }, + bounce_rate: { label: t('overview.bounced'), value: 0, unit: '%', count: 0 }, }) const sendMail = ref({ @@ -110,6 +111,11 @@ const updateRateData = (dashboard: MailOverview['dashboard']) => { rateData[key].value = value } }) + + rateData.delivery_rate.count = dashboard.delivered + rateData.open_rate.count = dashboard.opened + rateData.click_rate.count = dashboard.clicked + rateData.bounce_rate.count = dashboard.bounced } async function fetchOverviewData() { diff --git a/core/frontend/src/views/overview/components/MetricCard.vue b/core/frontend/src/views/overview/components/MetricCard.vue index cd4240ae..f592fa11 100644 --- a/core/frontend/src/views/overview/components/MetricCard.vue +++ b/core/frontend/src/views/overview/components/MetricCard.vue @@ -1,12 +1,41 @@ diff --git a/core/frontend/src/views/overview/index.vue b/core/frontend/src/views/overview/index.vue index 0a8d18c3..c8488f04 100644 --- a/core/frontend/src/views/overview/index.vue +++ b/core/frontend/src/views/overview/index.vue @@ -16,6 +16,7 @@ :key="key" :title="item.label" :value="item.value" + :count="item.count" :unit="item.unit"> ([]) const rateData = reactive({ - delivery_rate: { label: t('overview.delivered'), value: 0, unit: '%' }, - open_rate: { label: t('overview.opened'), value: 0, unit: '%' }, - click_rate: { label: t('overview.clicked'), value: 0, unit: '%' }, - bounce_rate: { label: t('overview.bounced'), value: 0, unit: '%' }, + delivery_rate: { label: t('overview.delivered'), value: 0, unit: '%', count: 0 }, + open_rate: { label: t('overview.opened'), value: 0, unit: '%', count: 0 }, + click_rate: { label: t('overview.clicked'), value: 0, unit: '%', count: 0 }, + bounce_rate: { label: t('overview.bounced'), value: 0, unit: '%', count: 0 }, }) const delayedQueue = ref(0) @@ -139,6 +140,12 @@ const updateRateData = (dashboard: MailOverview['dashboard']) => { rateData[key].value = value } }) + + rateData.delivery_rate.count = dashboard.delivered + rateData.open_rate.count = dashboard.opened + rateData.click_rate.count = dashboard.clicked + rateData.bounce_rate.count = dashboard.bounced + delayedQueue.value = dashboard.delayed_queue } diff --git a/core/frontend/src/views/overview/types/index.ts b/core/frontend/src/views/overview/types/index.ts index 5e00f2fa..781f89b9 100644 --- a/core/frontend/src/views/overview/types/index.ts +++ b/core/frontend/src/views/overview/types/index.ts @@ -77,6 +77,7 @@ interface RateItem { label: string value: number unit: string + count?: number } // 定义rate数据