대시보드, 통계 정리

This commit is contained in:
2025-06-09 15:35:05 +09:00
parent 141a0de6d0
commit 05312c7d93
4 changed files with 321 additions and 182 deletions
+176 -74
View File
@@ -106,75 +106,78 @@
</div>
</div>
<!-- ===== 추가 통계 표시 영역 ===== -->
<!-- 1. 회원별 최고/최저/총점 -->
<h3>회원별 최고/최저/총점</h3>
<table>
<thead>
<tr><th>이름</th><th>최고점</th><th>최저점</th><th>총점</th></tr>
</thead>
<tbody>
<tr v-for="m in stats.memberScoreStats" :key="m.memberId">
<td>{{ m.name }}</td>
<td>{{ m.maxScore }}</td>
<td>{{ m.minScore }}</td>
<td>{{ m.totalScore }}</td>
</tr>
</tbody>
</table>
<!-- 2. 모임별 최고/최저/평균점수 -->
<h3>모임별 점수 통계(확장)</h3>
<table>
<thead>
<tr><th>모임명</th><th>최고점</th><th>최저점</th><th>평균점</th></tr>
</thead>
<tbody>
<tr v-for="e in stats.meetingScoreStats" :key="e.eventId">
<td>{{ e.title }}</td>
<td>{{ e.maxScore }}</td>
<td>{{ e.minScore }}</td>
<td>{{ e.avgScore }}</td>
</tr>
</tbody>
</table>
<!-- 4. 참가자 변화 추이 (그래프) -->
<h3>참가자 변화 추이</h3>
<LineChart v-if="participantTrendChartData" :data="participantTrendChartData" />
<!-- 5. 회원별 모임 참가 횟수 -->
<h3>회원별 모임 참가 횟수</h3>
<table>
<thead>
<tr><th>이름</th><th>참가 횟수</th></tr>
</thead>
<tbody>
<tr v-for="m in stats.memberAttendanceStats" :key="m.memberId">
<td>{{ m.name }}</td>
<td>{{ m.attendCount }}</td>
</tr>
</tbody>
</table>
<!-- 6. 팀별 통계 -->
<h3>팀별 통계</h3>
<table>
<thead>
<tr><th>이벤트ID</th><th>팀ID</th><th>평균점수</th><th>최고점</th><th>참가자수</th></tr>
</thead>
<tbody>
<tr v-for="t in stats.teamStats" :key="`${t.eventId}-${t.teamId}`">
<td>{{ t.eventId }}</td>
<td>{{ t.teamId }}</td>
<td>{{ t.avgScore }}</td>
<td>{{ t.maxScore }}</td>
<td>{{ t.memberCount }}</td>
</tr>
</tbody>
</table>
<!-- ===== 추가 통계 표시 영역 (정리) ===== -->
<div class="continued-stats-container">
<div class="continued-stats-card">
<h3>회원별 최고/최저/총점</h3>
<table>
<thead>
<tr><th>이름</th><th>최고점</th><th>최저점</th><th>총점</th></tr>
</thead>
<tbody>
<tr v-for="m in stats.memberScoreStats" :key="m.memberId">
<td>{{ m.name }}</td>
<td>{{ m.maxScore }}</td>
<td>{{ m.minScore }}</td>
<td>{{ m.totalScore }}</td>
</tr>
</tbody>
</table>
</div>
<div class="continued-stats-card">
<h3>모임별 점수 통계(확장)</h3>
<table>
<thead>
<tr><th>모임명</th><th>최고점</th><th>최저점</th><th>평균점</th></tr>
</thead>
<tbody>
<tr v-for="e in stats.meetingScoreStats" :key="e.eventId">
<td>{{ e.title }}</td>
<td>{{ e.maxScore }}</td>
<td>{{ e.minScore }}</td>
<td>{{ e.avgScore }}</td>
</tr>
</tbody>
</table>
</div>
<div class="continued-stats-card">
<h3>참가자 변화 추이</h3>
<LineChart v-if="participantTrendChartData" :data="participantTrendChartData" />
</div>
<div class="continued-stats-card">
<h3>회원별 모임 참가 횟수</h3>
<table>
<thead>
<tr><th>이름</th><th>참가 횟수</th></tr>
</thead>
<tbody>
<tr v-for="m in stats.memberAttendanceStats" :key="m.memberId">
<td>{{ m.name }}</td>
<td>{{ m.attendCount }}</td>
</tr>
</tbody>
</table>
</div>
<div class="continued-stats-card">
<h3>팀별 통계</h3>
<table>
<thead>
<tr><th>이벤트ID</th><th>팀ID</th><th>평균점수</th><th>최고점</th><th>참가자수</th></tr>
</thead>
<tbody>
<tr v-for="t in stats.teamStats" :key="`${t.eventId}-${t.teamId}`">
<td>{{ t.eventId }}</td>
<td>{{ t.teamId }}</td>
<td>{{ t.avgScore }}</td>
<td>{{ t.maxScore }}</td>
<td>{{ t.memberCount }}</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- ===== 추가 통계 표시 영역 ===== -->
</div>
</div>
</template>
@@ -319,9 +322,42 @@ export default {
<style scoped>
.statistics-container {
padding: 20px;
max-width: 1200px;
margin: 0 auto;
padding: 32px 16px;
}
@media (max-width: 900px) {
.statistics-container {
padding: 12px 2px;
}
.stats-summary,
.rankings-container,
.meetings-container,
.charts-container {
grid-template-columns: 1fr !important;
gap: 12px;
display: block !important;
}
.stat-card, .rankings-card, .meetings-card, .chart-card {
max-width: 100%;
min-width: 0;
}
.stat-card table,
.rankings-card table,
.meetings-card table {
min-width: 320px;
display: block;
overflow-x: auto;
}
table {
min-width: 320px;
font-size: 13px;
}
}
.loading {
display: flex;
flex-direction: column;
@@ -354,20 +390,27 @@ export default {
border: 1px solid #ddd;
}
.stats-summary {
.stats-summary,
.rankings-container,
.meetings-container {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 20px;
margin-bottom: 30px;
grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
gap: 24px;
margin-bottom: 32px;
}
.stat-card {
background: white;
padding: 20px;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
min-width: 0;
display: flex;
flex-direction: column;
}
.stat-card h3 {
margin-top: 0;
margin-bottom: 15px;
@@ -376,18 +419,33 @@ export default {
.charts-container {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
gap: 20px;
margin-bottom: 30px;
width: 100%;
box-sizing: border-box;
}
.chart-card {
background: white;
padding: 20px;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
min-width: 0;
overflow-x: auto;
}
.stat-card table,
.rankings-card table,
.meetings-card table {
width: 100%;
min-width: unset;
display: table;
overflow-x: unset;
}
.chart-card h3 {
margin-top: 0;
margin-bottom: 15px;
@@ -409,10 +467,16 @@ export default {
table {
width: 100%;
min-width: 400px;
border-collapse: collapse;
margin-top: 10px;
background: #fff;
border-radius: 8px;
overflow-x: auto;
display: block;
}
th, td {
padding: 12px;
text-align: left;
@@ -427,4 +491,42 @@ th {
tr:hover {
background-color: #f9f9f9;
}
.continued-stats-container {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
gap: 24px;
margin-bottom: 40px;
}
.continued-stats-card {
background: #fff;
border-radius: 10px;
box-shadow: 0 2px 6px rgba(0,0,0,0.06);
padding: 20px;
min-width: 0;
margin-bottom: 0;
display: flex;
flex-direction: column;
}
.continued-stats-card table {
width: 100%;
min-width: unset;
display: table;
overflow-x: unset;
}
@media (max-width: 900px) {
.continued-stats-container {
grid-template-columns: 1fr;
gap: 12px;
}
.continued-stats-card {
padding: 12px;
}
.continued-stats-card table {
min-width: 320px;
display: block;
overflow-x: auto;
}
}
</style>