2026-03-19 10:36:45 +08:00
|
|
|
<template>
|
|
|
|
|
<section class="overview-stats">
|
2026-03-27 14:52:12 +08:00
|
|
|
<div class="stats-grid">
|
|
|
|
|
<div
|
|
|
|
|
v-for="item in summary.stats || []"
|
|
|
|
|
:key="item.key"
|
|
|
|
|
class="stats-card"
|
|
|
|
|
>
|
|
|
|
|
<div class="stats-icon" :class="`stats-icon-${item.tone || 'blue'}`">
|
|
|
|
|
<i :class="item.icon || 'el-icon-data-analysis'" />
|
2026-03-19 10:36:45 +08:00
|
|
|
</div>
|
2026-03-27 14:52:12 +08:00
|
|
|
<div class="stats-content">
|
|
|
|
|
<div class="stats-label">{{ item.label }}</div>
|
|
|
|
|
<div class="stats-value">{{ item.value }}</div>
|
2026-03-19 10:36:45 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
export default {
|
|
|
|
|
name: "OverviewStats",
|
|
|
|
|
props: {
|
|
|
|
|
summary: {
|
|
|
|
|
type: Object,
|
|
|
|
|
default: () => ({}),
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.overview-stats {
|
|
|
|
|
margin-bottom: 16px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.stats-grid {
|
|
|
|
|
display: grid;
|
|
|
|
|
grid-template-columns: repeat(5, minmax(0, 1fr));
|
|
|
|
|
gap: 14px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.stats-card {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 14px;
|
|
|
|
|
padding: 18px 16px;
|
|
|
|
|
border: 1px solid #eef2ff;
|
2026-03-19 11:02:16 +08:00
|
|
|
border-radius: 0;
|
2026-03-19 10:36:45 +08:00
|
|
|
background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
|
2026-03-19 11:02:16 +08:00
|
|
|
box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
|
2026-03-19 10:36:45 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.stats-icon {
|
|
|
|
|
display: inline-flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
width: 42px;
|
|
|
|
|
height: 42px;
|
|
|
|
|
border-radius: 12px;
|
|
|
|
|
font-size: 18px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.stats-icon-blue {
|
|
|
|
|
color: #2563eb;
|
|
|
|
|
background: rgba(37, 99, 235, 0.12);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.stats-icon-red {
|
|
|
|
|
color: #ef4444;
|
|
|
|
|
background: rgba(239, 68, 68, 0.12);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.stats-icon-amber {
|
|
|
|
|
color: #f59e0b;
|
|
|
|
|
background: rgba(245, 158, 11, 0.14);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.stats-icon-green {
|
|
|
|
|
color: #10b981;
|
|
|
|
|
background: rgba(16, 185, 129, 0.14);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.stats-content {
|
|
|
|
|
min-width: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.stats-label {
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
color: #94a3b8;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.stats-value {
|
|
|
|
|
margin-top: 8px;
|
|
|
|
|
font-size: 26px;
|
|
|
|
|
line-height: 1;
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
color: #0f172a;
|
|
|
|
|
}
|
|
|
|
|
</style>
|