fix(admin): include overview metrics in mobile report cards
This commit is contained in:
@@ -231,6 +231,13 @@ const runningCountsLabel = computed(() => {
|
||||
return `运行中 ${runningCount} / 排队 ${queuingCount} / 并发上限 ${maxGlobal || maxConcurrentGlobal.value || '-'}`
|
||||
})
|
||||
|
||||
const overviewModuleItems = computed(() =>
|
||||
overviewCards.value.map((item) => ({
|
||||
label: item.label,
|
||||
value: item.sub ? `${item.value}(${item.sub})` : item.value,
|
||||
})),
|
||||
)
|
||||
|
||||
const taskModuleItems = computed(() => [
|
||||
{ label: '今日总任务', value: normalizeCount(taskToday.value.total_tasks) },
|
||||
{ label: '今日成功', value: normalizeCount(taskToday.value.success_tasks) },
|
||||
@@ -293,6 +300,13 @@ const configModuleItems = computed(() => [
|
||||
])
|
||||
|
||||
const mobileModules = computed(() => [
|
||||
{
|
||||
key: 'overview',
|
||||
title: '平台概览',
|
||||
desc: lastUpdatedAt.value ? `更新 ${lastUpdatedAt.value}` : '核心指标',
|
||||
tone: 'blue',
|
||||
items: overviewModuleItems.value,
|
||||
},
|
||||
{
|
||||
key: 'task',
|
||||
title: '任务概览',
|
||||
@@ -421,7 +435,7 @@ onUnmounted(() => {
|
||||
|
||||
</div>
|
||||
|
||||
<MetricGrid :items="overviewCards" :loading="loading" :min-width="165" />
|
||||
<MetricGrid class="hero-overview-grid" :items="overviewCards" :loading="loading" :min-width="165" />
|
||||
</section>
|
||||
|
||||
<section class="mobile-report">
|
||||
@@ -1156,6 +1170,10 @@ onUnmounted(() => {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.hero-overview-grid {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.resource-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user