活动统计

master
lion 3 weeks ago
parent f85dd9cf1f
commit 2ccccf6689

@ -27,6 +27,8 @@ type ScheduleCountBlock = {
}
type ActivityScheduleCountsBlock = ScheduleCountBlock & {
/** 账号可见场馆范围内,全部活动名下的 activity_days 条数之和 */
total_sessions: number
/** 至少有一场已发布(上架且审核通过)活动的去重场馆数 */
published_venues_count: number
}
@ -38,7 +40,13 @@ type TicketGrabScheduleCountBlock = ScheduleCountBlock & {
}
type LivePeopleRankRow = { venue_id: number; venue_name: string; live_count: number }
type ActivityPublishRankRow = { venue_id: number; venue_name: string; published_count: number }
type ActivityPublishRankRow = {
venue_id: number
venue_name: string
published_count: number
/** 「已发布」活动下的 activity_days 总条数 */
published_sessions_count: number
}
const stats = ref({
scope: {
@ -55,6 +63,7 @@ const stats = ref({
},
activity_schedule_counts: {
total: 0,
total_sessions: 0,
not_started: 0,
ongoing: 0,
ended: 0,
@ -592,7 +601,11 @@ onMounted(async () => {
<div class="dash-stat-grid dash-stat-grid--schedule-act">
<div class="dash-stat-cell dash-stat-cell--rose">
<div class="dash-stat-cell__value">{{ stats.activity_schedule_counts.total }}</div>
<div class="dash-stat-cell__label">总场数</div>
<div class="dash-stat-cell__label">活动数</div>
</div>
<div class="dash-stat-cell dash-stat-cell--violet">
<div class="dash-stat-cell__value">{{ stats.activity_schedule_counts.total_sessions }}</div>
<div class="dash-stat-cell__label">总场次</div>
</div>
<div class="dash-stat-cell dash-stat-cell--amber">
<div class="dash-stat-cell__value">{{ stats.activity_schedule_counts.not_started }}</div>
@ -676,7 +689,8 @@ onMounted(async () => {
<template #cell="{ rowIndex }">{{ rowIndex + 1 }}</template>
</a-table-column>
<a-table-column title="场馆名称" data-index="venue_name" :ellipsis="true" :tooltip="true" />
<a-table-column title="发布活动数" data-index="published_count" :width="120" align="right" />
<a-table-column title="发布活动数" data-index="published_count" :width="108" align="right" />
<a-table-column title="发布场次数" data-index="published_sessions_count" :width="108" align="right" />
</template>
</a-table>
</div>
@ -1140,7 +1154,7 @@ onMounted(async () => {
@media (min-width: 1000px) {
.dash-stat-grid.dash-stat-grid--schedule-act {
grid-template-columns: repeat(5, minmax(0, 1fr));
grid-template-columns: repeat(6, minmax(0, 1fr));
}
}

Loading…
Cancel
Save