|
|
@@ -1,13 +1,19 @@
|
|
|
<template>
|
|
|
<div class="dashboard-container">
|
|
|
- <h2 class="page-title">数据面板</h2>
|
|
|
+ <!-- 页面标题 -->
|
|
|
+ <div class="page-header">
|
|
|
+ <h2 class="page-title">数据面板</h2>
|
|
|
+ <div class="page-subtitle">实时监控和分析平台关键数据指标</div>
|
|
|
+ </div>
|
|
|
|
|
|
<!-- 统计卡片 -->
|
|
|
- <el-row :gutter="20" class="stats-row">
|
|
|
+ <el-row :gutter="24" class="stats-row">
|
|
|
<el-col :xs="24" :sm="12" :md="6">
|
|
|
- <el-card shadow="hover" class="stat-card">
|
|
|
+ <el-card shadow="hover" class="stat-card stat-card--primary">
|
|
|
<div class="stat-content">
|
|
|
- <el-icon class="stat-icon" color="#409EFF"><User /></el-icon>
|
|
|
+ <div class="stat-icon-wrapper">
|
|
|
+ <el-icon class="stat-icon"><User /></el-icon>
|
|
|
+ </div>
|
|
|
<div class="stat-info">
|
|
|
<p class="stat-label">总用户数</p>
|
|
|
<h3 class="stat-value">{{ stats.totalUsers }}</h3>
|
|
|
@@ -17,9 +23,11 @@
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :xs="24" :sm="12" :md="6">
|
|
|
- <el-card shadow="hover" class="stat-card">
|
|
|
+ <el-card shadow="hover" class="stat-card stat-card--success">
|
|
|
<div class="stat-content">
|
|
|
- <el-icon class="stat-icon" color="#67C23A"><Calendar /></el-icon>
|
|
|
+ <div class="stat-icon-wrapper">
|
|
|
+ <el-icon class="stat-icon"><Calendar /></el-icon>
|
|
|
+ </div>
|
|
|
<div class="stat-info">
|
|
|
<p class="stat-label">活动数量</p>
|
|
|
<h3 class="stat-value">{{ stats.totalActivities }}</h3>
|
|
|
@@ -29,9 +37,11 @@
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :xs="24" :sm="12" :md="6">
|
|
|
- <el-card shadow="hover" class="stat-card">
|
|
|
+ <el-card shadow="hover" class="stat-card stat-card--warning">
|
|
|
<div class="stat-content">
|
|
|
- <el-icon class="stat-icon" color="#E6A23C"><TrophyBase /></el-icon>
|
|
|
+ <div class="stat-icon-wrapper">
|
|
|
+ <el-icon class="stat-icon"><TrophyBase /></el-icon>
|
|
|
+ </div>
|
|
|
<div class="stat-info">
|
|
|
<p class="stat-label">成功案例</p>
|
|
|
<h3 class="stat-value">{{ stats.totalCases }}</h3>
|
|
|
@@ -41,9 +51,11 @@
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :xs="24" :sm="12" :md="6">
|
|
|
- <el-card shadow="hover" class="stat-card">
|
|
|
+ <el-card shadow="hover" class="stat-card stat-card--danger">
|
|
|
<div class="stat-content">
|
|
|
- <el-icon class="stat-icon" color="#F56C6C"><Reading /></el-icon>
|
|
|
+ <div class="stat-icon-wrapper">
|
|
|
+ <el-icon class="stat-icon"><Reading /></el-icon>
|
|
|
+ </div>
|
|
|
<div class="stat-info">
|
|
|
<p class="stat-label">课程数量</p>
|
|
|
<h3 class="stat-value">{{ stats.totalCourses }}</h3>
|
|
|
@@ -54,20 +66,24 @@
|
|
|
</el-row>
|
|
|
|
|
|
<!-- 图表区域 -->
|
|
|
- <el-row :gutter="20" class="charts-row">
|
|
|
+ <el-row :gutter="24" class="charts-row">
|
|
|
<el-col :xs="24" :md="12">
|
|
|
- <el-card shadow="hover">
|
|
|
+ <el-card shadow="hover" class="chart-card">
|
|
|
<template #header>
|
|
|
- <span>用户增长趋势</span>
|
|
|
+ <div class="card-header">
|
|
|
+ <span class="card-title">用户增长趋势</span>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
<div ref="userTrendChart" class="chart-container"></div>
|
|
|
</el-card>
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :xs="24" :md="12">
|
|
|
- <el-card shadow="hover">
|
|
|
+ <el-card shadow="hover" class="chart-card">
|
|
|
<template #header>
|
|
|
- <span>活动报名统计</span>
|
|
|
+ <div class="card-header">
|
|
|
+ <span class="card-title">活动报名统计</span>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
<div ref="activityStatsChart" class="chart-container"></div>
|
|
|
</el-card>
|
|
|
@@ -75,28 +91,41 @@
|
|
|
</el-row>
|
|
|
|
|
|
<!-- 最近活动 -->
|
|
|
- <el-card shadow="hover" class="recent-activities">
|
|
|
+ <el-card shadow="hover" class="table-card">
|
|
|
<template #header>
|
|
|
- <span>最近活动</span>
|
|
|
+ <div class="card-header">
|
|
|
+ <span class="card-title">最近活动</span>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
- <el-table :data="recentActivities" stripe style="width: 100%">
|
|
|
- <el-table-column prop="name" label="活动名称" />
|
|
|
- <el-table-column prop="type" label="类型" width="100">
|
|
|
+ <el-table :data="recentActivities" style="width: 100%" class="dashboard-table">
|
|
|
+ <el-table-column prop="name" label="活动名称" min-width="200">
|
|
|
<template #default="{ row }">
|
|
|
- <el-tag :type="row.type === 1 ? 'success' : 'primary'" size="small">
|
|
|
+ <div class="activity-name">{{ row.name }}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="type" label="类型" width="120">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <el-tag :type="row.type === 1 ? 'success' : 'primary'" size="small" effect="light">
|
|
|
{{ row.type === 1 ? '线上' : '线下' }}
|
|
|
</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="participants" label="报名人数" width="100" />
|
|
|
- <el-table-column prop="status" label="状态" width="100">
|
|
|
+ <el-table-column prop="participants" label="报名人数" width="120" align="center" />
|
|
|
+ <el-table-column prop="status" label="状态" width="120" align="center">
|
|
|
<template #default="{ row }">
|
|
|
- <el-tag :type="getStatusType(row.status)" size="small">
|
|
|
+ <el-tag :type="getStatusType(row.status)" size="small" effect="light">
|
|
|
{{ getStatusText(row.status) }}
|
|
|
</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="startTime" label="开始时间" width="180" />
|
|
|
+ <el-table-column prop="startTime" label="开始时间" width="200" align="center" />
|
|
|
+ <el-table-column label="操作" width="120" align="center">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <el-button type="primary" size="small" link>
|
|
|
+ 查看
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
</el-card>
|
|
|
</div>
|
|
|
@@ -104,7 +133,7 @@
|
|
|
|
|
|
<script setup>
|
|
|
import { ref, onMounted, onUnmounted, nextTick } from 'vue'
|
|
|
-import { User, Calendar, TrophyBase, Reading } from '@element-plus/icons-vue'
|
|
|
+import { User, Calendar, TrophyBase, Reading, ArrowUp, Plus } from '@element-plus/icons-vue'
|
|
|
import * as echarts from 'echarts'
|
|
|
import request from '@/utils/request'
|
|
|
|
|
|
@@ -401,252 +430,621 @@ onUnmounted(() => {
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
+/* ==================== 全局变量 ==================== */
|
|
|
+:root {
|
|
|
+ --primary-gradient: linear-gradient(135deg, #409EFF 0%, #66B1FF 100%);
|
|
|
+ --success-gradient: linear-gradient(135deg, #67C23A 0%, #85CE61 100%);
|
|
|
+ --warning-gradient: linear-gradient(135deg, #E6A23C 0%, #F0C14B 100%);
|
|
|
+ --danger-gradient: linear-gradient(135deg, #F56C6C 0%, #F78989 100%);
|
|
|
+ --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
|
|
|
+ --card-shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.12);
|
|
|
+ --transition-fast: 0.2s ease;
|
|
|
+ --transition-normal: 0.3s ease;
|
|
|
+ --transition-slow: 0.4s ease;
|
|
|
+}
|
|
|
+
|
|
|
/* ==================== 仪表盘容器 ==================== */
|
|
|
.dashboard-container {
|
|
|
- padding: 0;
|
|
|
- animation: fadeIn 0.5s ease-out;
|
|
|
+ padding: 24px;
|
|
|
+ background-color: #f8f9fa;
|
|
|
+ min-height: 100vh;
|
|
|
+ animation: fadeIn 0.6s ease-out;
|
|
|
}
|
|
|
|
|
|
/* 页面标题 */
|
|
|
+.page-header {
|
|
|
+ margin-bottom: 32px;
|
|
|
+}
|
|
|
+
|
|
|
.page-title {
|
|
|
- font-size: var(--font-3xl);
|
|
|
- font-weight: var(--font-bold);
|
|
|
- color: var(--text-primary);
|
|
|
- margin: 0 0 var(--spacing-xl) 0;
|
|
|
- position: relative;
|
|
|
- padding-bottom: var(--spacing-md);
|
|
|
+ font-size: 28px;
|
|
|
+ font-weight: 700;
|
|
|
+ color: #2c3e50;
|
|
|
+ margin: 0 0 8px 0;
|
|
|
+ letter-spacing: -0.5px;
|
|
|
}
|
|
|
|
|
|
-.page-title::after {
|
|
|
- content: '';
|
|
|
- position: absolute;
|
|
|
- left: 0;
|
|
|
- bottom: 0;
|
|
|
- width: 60px;
|
|
|
- height: 4px;
|
|
|
- background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
|
|
|
- border-radius: 2px;
|
|
|
+.page-subtitle {
|
|
|
+ font-size: 14px;
|
|
|
+ color: #909399;
|
|
|
+ font-weight: 400;
|
|
|
}
|
|
|
|
|
|
/* ==================== 统计卡片区域 ==================== */
|
|
|
.stats-row {
|
|
|
- margin-bottom: var(--spacing-xl);
|
|
|
+ margin-bottom: 28px;
|
|
|
}
|
|
|
|
|
|
.stat-card {
|
|
|
cursor: pointer;
|
|
|
- transition: all var(--transition-base);
|
|
|
- border: 1px solid var(--border-color);
|
|
|
- background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
|
|
|
- position: relative;
|
|
|
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
|
+ border: none;
|
|
|
+ border-radius: 16px;
|
|
|
+ background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
|
|
|
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.2);
|
|
|
overflow: hidden;
|
|
|
+ position: relative;
|
|
|
+ animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
|
|
|
}
|
|
|
|
|
|
+/* 卡片渐变边框效果 */
|
|
|
.stat-card::before {
|
|
|
content: '';
|
|
|
position: absolute;
|
|
|
top: 0;
|
|
|
+ left: 0;
|
|
|
right: 0;
|
|
|
- width: 100px;
|
|
|
- height: 100px;
|
|
|
- background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
|
|
|
- transform: translate(20px, -20px);
|
|
|
- transition: all var(--transition-slow);
|
|
|
+ height: 4px;
|
|
|
+ opacity: 0.9;
|
|
|
+ z-index: 2;
|
|
|
}
|
|
|
|
|
|
-.stat-card:hover {
|
|
|
- transform: translateY(-8px);
|
|
|
- box-shadow: var(--shadow-lg);
|
|
|
- border-color: var(--primary-light);
|
|
|
+.stat-card--primary::before {
|
|
|
+ background: linear-gradient(135deg, #409EFF 0%, #66B1FF 100%);
|
|
|
}
|
|
|
|
|
|
-.stat-card:hover::before {
|
|
|
- transform: translate(10px, -10px) scale(1.2);
|
|
|
+.stat-card--success::before {
|
|
|
+ background: linear-gradient(135deg, #67C23A 0%, #85CE61 100%);
|
|
|
+}
|
|
|
+
|
|
|
+.stat-card--warning::before {
|
|
|
+ background: linear-gradient(135deg, #E6A23C 0%, #F0C14B 100%);
|
|
|
+}
|
|
|
+
|
|
|
+.stat-card--danger::before {
|
|
|
+ background: linear-gradient(135deg, #F56C6C 0%, #F78989 100%);
|
|
|
+}
|
|
|
+
|
|
|
+/* 卡片发光效果 */
|
|
|
+.stat-card::after {
|
|
|
+ content: '';
|
|
|
+ position: absolute;
|
|
|
+ top: -2px;
|
|
|
+ left: -2px;
|
|
|
+ right: -2px;
|
|
|
+ bottom: -2px;
|
|
|
+ background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.1) 100%);
|
|
|
+ border-radius: 16px;
|
|
|
+ opacity: 0;
|
|
|
+ transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
|
+ z-index: 1;
|
|
|
+}
|
|
|
+
|
|
|
+.stat-card:hover::after {
|
|
|
+ opacity: 1;
|
|
|
+}
|
|
|
+
|
|
|
+.stat-card:hover {
|
|
|
+ transform: translateY(-8px) scale(1.02);
|
|
|
+ box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
|
|
|
}
|
|
|
|
|
|
/* 统计卡片内容 */
|
|
|
.stat-content {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
- gap: var(--spacing-xl);
|
|
|
- padding: var(--spacing-md);
|
|
|
+ gap: 24px;
|
|
|
+ padding: 32px;
|
|
|
position: relative;
|
|
|
- z-index: 1;
|
|
|
+ z-index: 3;
|
|
|
}
|
|
|
|
|
|
-.stat-icon {
|
|
|
- font-size: 52px;
|
|
|
+.stat-icon-wrapper {
|
|
|
+ width: 72px;
|
|
|
+ height: 72px;
|
|
|
+ border-radius: 12px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
flex-shrink: 0;
|
|
|
- transition: transform var(--transition-base);
|
|
|
- filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
|
|
|
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
|
+ position: relative;
|
|
|
+ overflow: hidden;
|
|
|
}
|
|
|
|
|
|
-.stat-card:hover .stat-icon {
|
|
|
+.stat-icon-wrapper::before {
|
|
|
+ content: '';
|
|
|
+ position: absolute;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
|
|
|
+ opacity: 0.6;
|
|
|
+}
|
|
|
+
|
|
|
+.stat-card--primary .stat-icon-wrapper {
|
|
|
+ background: linear-gradient(135deg, rgba(64, 158, 255, 0.1) 0%, rgba(102, 177, 255, 0.05) 100%);
|
|
|
+ box-shadow: 0 4px 16px rgba(64, 158, 255, 0.2);
|
|
|
+}
|
|
|
+
|
|
|
+.stat-card--success .stat-icon-wrapper {
|
|
|
+ background: linear-gradient(135deg, rgba(103, 194, 58, 0.1) 0%, rgba(133, 206, 97, 0.05) 100%);
|
|
|
+ box-shadow: 0 4px 16px rgba(103, 194, 58, 0.2);
|
|
|
+}
|
|
|
+
|
|
|
+.stat-card--warning .stat-icon-wrapper {
|
|
|
+ background: linear-gradient(135deg, rgba(230, 162, 60, 0.1) 0%, rgba(240, 193, 75, 0.05) 100%);
|
|
|
+ box-shadow: 0 4px 16px rgba(230, 162, 60, 0.2);
|
|
|
+}
|
|
|
+
|
|
|
+.stat-card--danger .stat-icon-wrapper {
|
|
|
+ background: linear-gradient(135deg, rgba(245, 108, 108, 0.1) 0%, rgba(247, 137, 137, 0.05) 100%);
|
|
|
+ box-shadow: 0 4px 16px rgba(245, 108, 108, 0.2);
|
|
|
+}
|
|
|
+
|
|
|
+.stat-card:hover .stat-icon-wrapper {
|
|
|
transform: scale(1.1) rotate(5deg);
|
|
|
}
|
|
|
|
|
|
+.stat-icon {
|
|
|
+ font-size: 36px;
|
|
|
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
|
+ position: relative;
|
|
|
+ z-index: 1;
|
|
|
+}
|
|
|
+
|
|
|
+.stat-card--primary .stat-icon {
|
|
|
+ color: #409EFF;
|
|
|
+ text-shadow: 0 4px 12px rgba(64, 158, 255, 0.2);
|
|
|
+}
|
|
|
+
|
|
|
+.stat-card--success .stat-icon {
|
|
|
+ color: #67C23A;
|
|
|
+ text-shadow: 0 4px 12px rgba(103, 194, 58, 0.2);
|
|
|
+}
|
|
|
+
|
|
|
+.stat-card--warning .stat-icon {
|
|
|
+ color: #E6A23C;
|
|
|
+ text-shadow: 0 4px 12px rgba(230, 162, 60, 0.2);
|
|
|
+}
|
|
|
+
|
|
|
+.stat-card--danger .stat-icon {
|
|
|
+ color: #F56C6C;
|
|
|
+ text-shadow: 0 4px 12px rgba(245, 108, 108, 0.2);
|
|
|
+}
|
|
|
+
|
|
|
+.stat-card:hover .stat-icon {
|
|
|
+ transform: scale(1.2);
|
|
|
+}
|
|
|
+
|
|
|
.stat-info {
|
|
|
flex: 1;
|
|
|
min-width: 0;
|
|
|
}
|
|
|
|
|
|
.stat-label {
|
|
|
- font-size: var(--font-sm);
|
|
|
- color: var(--text-secondary);
|
|
|
- margin: 0 0 var(--spacing-sm) 0;
|
|
|
- font-weight: var(--font-medium);
|
|
|
+ font-size: 13px;
|
|
|
+ color: #909399;
|
|
|
+ margin: 0 0 10px 0;
|
|
|
+ font-weight: 600;
|
|
|
text-transform: uppercase;
|
|
|
- letter-spacing: 0.5px;
|
|
|
+ letter-spacing: 0.8px;
|
|
|
+ opacity: 0.8;
|
|
|
}
|
|
|
|
|
|
.stat-value {
|
|
|
- font-size: var(--font-4xl);
|
|
|
- font-weight: var(--font-bold);
|
|
|
- color: var(--text-primary);
|
|
|
+ font-size: 36px;
|
|
|
+ font-weight: 800;
|
|
|
+ color: #2c3e50;
|
|
|
margin: 0;
|
|
|
- line-height: 1.2;
|
|
|
- /* 移除渐变文字效果,确保数字清晰可见 */
|
|
|
+ line-height: 1.1;
|
|
|
+ letter-spacing: -1px;
|
|
|
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
|
+ position: relative;
|
|
|
+}
|
|
|
+
|
|
|
+.stat-card:hover .stat-value {
|
|
|
+ transform: translateX(5px);
|
|
|
}
|
|
|
|
|
|
/* ==================== 图表区域 ==================== */
|
|
|
.charts-row {
|
|
|
- margin-bottom: var(--spacing-xl);
|
|
|
+ margin-bottom: 28px;
|
|
|
}
|
|
|
|
|
|
-.charts-row .el-card {
|
|
|
+.chart-card {
|
|
|
height: 100%;
|
|
|
- border: 1px solid var(--border-color);
|
|
|
- transition: all var(--transition-base);
|
|
|
+ border: none;
|
|
|
+ border-radius: 16px;
|
|
|
+ background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
|
|
|
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.2);
|
|
|
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
|
+ overflow: hidden;
|
|
|
+ animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
|
|
|
+ position: relative;
|
|
|
+}
|
|
|
+
|
|
|
+.chart-card::before {
|
|
|
+ content: '';
|
|
|
+ position: absolute;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ right: 0;
|
|
|
+ height: 3px;
|
|
|
+ background: linear-gradient(90deg, #409EFF, #67C23A);
|
|
|
+ opacity: 0.8;
|
|
|
+}
|
|
|
+
|
|
|
+.chart-card:hover {
|
|
|
+ box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
|
|
|
+ transform: translateY(-6px) scale(1.01);
|
|
|
+}
|
|
|
+
|
|
|
+/* 卡片头部 */
|
|
|
+.card-header {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ width: 100%;
|
|
|
+ gap: 16px;
|
|
|
}
|
|
|
|
|
|
-.charts-row .el-card:hover {
|
|
|
- box-shadow: var(--shadow-md);
|
|
|
- transform: translateY(-2px);
|
|
|
+.card-title {
|
|
|
+ font-size: 17px;
|
|
|
+ font-weight: 700;
|
|
|
+ color: #2c3e50;
|
|
|
+ letter-spacing: -0.3px;
|
|
|
+ position: relative;
|
|
|
+ padding-left: 12px;
|
|
|
}
|
|
|
|
|
|
-.charts-row .el-card :deep(.el-card__header) {
|
|
|
- background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
|
|
|
- font-size: var(--font-md);
|
|
|
- font-weight: var(--font-semibold);
|
|
|
- color: var(--text-primary);
|
|
|
- border-bottom: 2px solid var(--border-color);
|
|
|
+.card-title::before {
|
|
|
+ content: '';
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ top: 50%;
|
|
|
+ transform: translateY(-50%);
|
|
|
+ width: 4px;
|
|
|
+ height: 16px;
|
|
|
+ background: linear-gradient(135deg, #409EFF 0%, #66B1FF 100%);
|
|
|
+ border-radius: 2px;
|
|
|
+}
|
|
|
+
|
|
|
+.chart-card :deep(.el-card__header) {
|
|
|
+ background: transparent;
|
|
|
+ font-size: 17px;
|
|
|
+ font-weight: 700;
|
|
|
+ color: #2c3e50;
|
|
|
+ border-bottom: 1px solid rgba(235, 238, 245, 0.8);
|
|
|
+ padding: 24px 28px;
|
|
|
}
|
|
|
|
|
|
.chart-container {
|
|
|
width: 100%;
|
|
|
- height: 320px;
|
|
|
- padding: var(--spacing-md);
|
|
|
+ height: 380px;
|
|
|
+ padding: 24px;
|
|
|
+ background: radial-gradient(circle at top right, rgba(64, 158, 255, 0.03) 0%, transparent 50%);
|
|
|
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
|
}
|
|
|
|
|
|
-/* ==================== 最近活动表格 ==================== */
|
|
|
-.recent-activities {
|
|
|
- margin-top: var(--spacing-xl);
|
|
|
- border: 1px solid var(--border-color);
|
|
|
- transition: all var(--transition-base);
|
|
|
+.chart-card:hover .chart-container {
|
|
|
+ background: radial-gradient(circle at top right, rgba(64, 158, 255, 0.06) 0%, transparent 50%);
|
|
|
}
|
|
|
|
|
|
-.recent-activities:hover {
|
|
|
- box-shadow: var(--shadow-md);
|
|
|
+/* ==================== 表格卡片 ==================== */
|
|
|
+.table-card {
|
|
|
+ border: none;
|
|
|
+ border-radius: 16px;
|
|
|
+ background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
|
|
|
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.2);
|
|
|
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
|
+ overflow: hidden;
|
|
|
+ animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both;
|
|
|
+ position: relative;
|
|
|
}
|
|
|
|
|
|
-.recent-activities :deep(.el-card__header) {
|
|
|
- background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
|
|
|
- font-size: var(--font-md);
|
|
|
- font-weight: var(--font-semibold);
|
|
|
- color: var(--text-primary);
|
|
|
- border-bottom: 2px solid var(--border-color);
|
|
|
+.table-card::before {
|
|
|
+ content: '';
|
|
|
+ position: absolute;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ right: 0;
|
|
|
+ height: 3px;
|
|
|
+ background: linear-gradient(90deg, #67C23A, #E6A23C);
|
|
|
+ opacity: 0.8;
|
|
|
+}
|
|
|
+
|
|
|
+.table-card:hover {
|
|
|
+ box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
|
|
|
+ transform: translateY(-4px);
|
|
|
+}
|
|
|
+
|
|
|
+.table-card :deep(.el-card__header) {
|
|
|
+ background: transparent;
|
|
|
+ font-size: 17px;
|
|
|
+ font-weight: 700;
|
|
|
+ color: #2c3e50;
|
|
|
+ border-bottom: 1px solid rgba(235, 238, 245, 0.8);
|
|
|
+ padding: 24px 28px;
|
|
|
}
|
|
|
|
|
|
/* 表格样式增强 */
|
|
|
-.recent-activities :deep(.el-table) {
|
|
|
- font-size: var(--font-sm);
|
|
|
+.dashboard-table {
|
|
|
+ font-size: 14px;
|
|
|
+ border-radius: 0 0 16px 16px;
|
|
|
+ overflow: hidden;
|
|
|
+}
|
|
|
+
|
|
|
+.dashboard-table :deep(.el-table__header-wrapper) {
|
|
|
+ background: linear-gradient(135deg, #fafafa 0%, #f0f2f5 100%);
|
|
|
+}
|
|
|
+
|
|
|
+.dashboard-table :deep(.el-table th) {
|
|
|
+ background-color: transparent;
|
|
|
+ color: #606266;
|
|
|
+ font-weight: 700;
|
|
|
+ height: 56px;
|
|
|
+ padding: 0 20px;
|
|
|
+ border-bottom: 1px solid rgba(235, 238, 245, 0.8);
|
|
|
+ font-size: 13px;
|
|
|
+ letter-spacing: 0.5px;
|
|
|
+}
|
|
|
+
|
|
|
+.dashboard-table :deep(.el-table td) {
|
|
|
+ color: #606266;
|
|
|
+ height: 52px;
|
|
|
+ padding: 0 20px;
|
|
|
+ border-bottom: 1px solid rgba(240, 240, 240, 0.6);
|
|
|
+ transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
|
}
|
|
|
|
|
|
-.recent-activities :deep(.el-table__header-wrapper) {
|
|
|
- border-radius: var(--radius-base) var(--radius-base) 0 0;
|
|
|
+.dashboard-table :deep(.el-table__row) {
|
|
|
+ transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
|
+ position: relative;
|
|
|
+ overflow: hidden;
|
|
|
+}
|
|
|
+
|
|
|
+.dashboard-table :deep(.el-table__row)::after {
|
|
|
+ content: '';
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ top: 0;
|
|
|
+ height: 100%;
|
|
|
+ width: 0;
|
|
|
+ background: linear-gradient(90deg, rgba(64, 158, 255, 0.05) 0%, transparent 100%);
|
|
|
+ transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
|
}
|
|
|
|
|
|
-.recent-activities :deep(.el-table th) {
|
|
|
- background-color: var(--bg-tertiary);
|
|
|
- color: var(--text-primary);
|
|
|
- font-weight: var(--font-semibold);
|
|
|
+.dashboard-table :deep(.el-table__row:hover) {
|
|
|
+ background-color: #f8fafc;
|
|
|
+ transform: translateX(5px);
|
|
|
+ box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
|
|
|
}
|
|
|
|
|
|
-.recent-activities :deep(.el-table td) {
|
|
|
- color: var(--text-secondary);
|
|
|
+.dashboard-table :deep(.el-table__row:hover::after) {
|
|
|
+ width: 100%;
|
|
|
+}
|
|
|
+
|
|
|
+.dashboard-table :deep(.el-table__body-wrapper) {
|
|
|
+ overflow-x: auto;
|
|
|
+ border-radius: 0 0 16px 16px;
|
|
|
+}
|
|
|
+
|
|
|
+/* 活动名称 */
|
|
|
+.activity-name {
|
|
|
+ color: #409EFF;
|
|
|
+ font-weight: 600;
|
|
|
+ transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
|
+ position: relative;
|
|
|
+ display: inline-block;
|
|
|
+ padding: 2px 0;
|
|
|
+}
|
|
|
+
|
|
|
+.activity-name::after {
|
|
|
+ content: '';
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ bottom: 0;
|
|
|
+ width: 0;
|
|
|
+ height: 2px;
|
|
|
+ background: linear-gradient(135deg, #409EFF 0%, #66B1FF 100%);
|
|
|
+ transition: width 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
|
}
|
|
|
|
|
|
-.recent-activities :deep(.el-table__row:hover) {
|
|
|
- background-color: var(--bg-hover);
|
|
|
+.activity-name:hover {
|
|
|
+ color: #66B1FF;
|
|
|
+ transform: translateX(3px);
|
|
|
+}
|
|
|
+
|
|
|
+.activity-name:hover::after {
|
|
|
+ width: 100%;
|
|
|
}
|
|
|
|
|
|
/* 标签样式 */
|
|
|
-.recent-activities :deep(.el-tag) {
|
|
|
- font-weight: var(--font-medium);
|
|
|
- border-radius: var(--radius-sm);
|
|
|
- padding: 4px 12px;
|
|
|
+.dashboard-table :deep(.el-tag) {
|
|
|
+ font-weight: 600;
|
|
|
+ border-radius: 16px;
|
|
|
+ padding: 6px 16px;
|
|
|
+ font-size: 12px;
|
|
|
+ transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
|
+ border: none;
|
|
|
+}
|
|
|
+
|
|
|
+.dashboard-table :deep(.el-tag--success) {
|
|
|
+ background: linear-gradient(135deg, rgba(103, 194, 58, 0.15) 0%, rgba(133, 206, 97, 0.05) 100%);
|
|
|
+ color: #67C23A;
|
|
|
+ box-shadow: 0 2px 8px rgba(103, 194, 58, 0.2);
|
|
|
+}
|
|
|
+
|
|
|
+.dashboard-table :deep(.el-tag--primary) {
|
|
|
+ background: linear-gradient(135deg, rgba(64, 158, 255, 0.15) 0%, rgba(102, 177, 255, 0.05) 100%);
|
|
|
+ color: #409EFF;
|
|
|
+ box-shadow: 0 2px 8px rgba(64, 158, 255, 0.2);
|
|
|
+}
|
|
|
+
|
|
|
+.dashboard-table :deep(.el-tag--info) {
|
|
|
+ background: linear-gradient(135deg, rgba(144, 147, 153, 0.15) 0%, rgba(166, 168, 173, 0.05) 100%);
|
|
|
+ color: #909399;
|
|
|
+ box-shadow: 0 2px 8px rgba(144, 147, 153, 0.2);
|
|
|
+}
|
|
|
+
|
|
|
+.dashboard-table :deep(.el-tag--warning) {
|
|
|
+ background: linear-gradient(135deg, rgba(230, 162, 60, 0.15) 0%, rgba(240, 193, 75, 0.05) 100%);
|
|
|
+ color: #E6A23C;
|
|
|
+ box-shadow: 0 2px 8px rgba(230, 162, 60, 0.2);
|
|
|
+}
|
|
|
+
|
|
|
+/* 按钮样式 */
|
|
|
+.dashboard-table :deep(.el-button--primary.is-text) {
|
|
|
+ color: #409EFF;
|
|
|
+ font-size: 13px;
|
|
|
+ font-weight: 600;
|
|
|
+ padding: 0;
|
|
|
+ transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
|
+}
|
|
|
+
|
|
|
+.dashboard-table :deep(.el-button--primary.is-text:hover) {
|
|
|
+ color: #66B1FF;
|
|
|
+ background: transparent;
|
|
|
+ transform: translateX(3px);
|
|
|
+}
|
|
|
+
|
|
|
+/* ==================== 动画效果 ==================== */
|
|
|
+@keyframes fadeIn {
|
|
|
+ from {
|
|
|
+ opacity: 0;
|
|
|
+ transform: translateY(20px);
|
|
|
+ }
|
|
|
+ to {
|
|
|
+ opacity: 1;
|
|
|
+ transform: translateY(0);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+@keyframes fadeInUp {
|
|
|
+ from {
|
|
|
+ opacity: 0;
|
|
|
+ transform: translateY(30px) scale(0.95);
|
|
|
+ }
|
|
|
+ to {
|
|
|
+ opacity: 1;
|
|
|
+ transform: translateY(0) scale(1);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+@keyframes slideInLeft {
|
|
|
+ from {
|
|
|
+ opacity: 0;
|
|
|
+ transform: translateX(-30px);
|
|
|
+ }
|
|
|
+ to {
|
|
|
+ opacity: 1;
|
|
|
+ transform: translateX(0);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/* ==================== 响应式设计 ==================== */
|
|
|
|
|
|
/* 平板设备 */
|
|
|
@media (max-width: 1024px) {
|
|
|
+ .dashboard-container {
|
|
|
+ padding: 20px;
|
|
|
+ }
|
|
|
+
|
|
|
.page-title {
|
|
|
- font-size: var(--font-2xl);
|
|
|
+ font-size: 28px;
|
|
|
}
|
|
|
|
|
|
.stat-value {
|
|
|
- font-size: var(--font-3xl);
|
|
|
+ font-size: 32px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .stat-icon-wrapper {
|
|
|
+ width: 64px;
|
|
|
+ height: 64px;
|
|
|
}
|
|
|
|
|
|
.stat-icon {
|
|
|
- font-size: 44px;
|
|
|
+ font-size: 32px;
|
|
|
}
|
|
|
|
|
|
.chart-container {
|
|
|
- height: 280px;
|
|
|
+ height: 340px;
|
|
|
+ padding: 20px;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/* 移动设备 */
|
|
|
@media (max-width: 768px) {
|
|
|
+ .dashboard-container {
|
|
|
+ padding: 16px;
|
|
|
+ }
|
|
|
+
|
|
|
.page-title {
|
|
|
- font-size: var(--font-xl);
|
|
|
- margin-bottom: var(--spacing-lg);
|
|
|
+ font-size: 24px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .page-header {
|
|
|
+ margin-bottom: 24px;
|
|
|
}
|
|
|
|
|
|
.stats-row {
|
|
|
- margin-bottom: var(--spacing-lg);
|
|
|
+ margin-bottom: 20px;
|
|
|
}
|
|
|
|
|
|
.stat-content {
|
|
|
- gap: var(--spacing-md);
|
|
|
- padding: var(--spacing-sm);
|
|
|
+ gap: 20px;
|
|
|
+ padding: 24px;
|
|
|
}
|
|
|
|
|
|
- .stat-icon {
|
|
|
- font-size: 36px;
|
|
|
+ .stat-icon-wrapper {
|
|
|
+ width: 56px;
|
|
|
+ height: 56px;
|
|
|
}
|
|
|
|
|
|
- .stat-value {
|
|
|
- font-size: var(--font-2xl);
|
|
|
+ .stat-icon {
|
|
|
+ font-size: 28px;
|
|
|
}
|
|
|
|
|
|
- .stat-label {
|
|
|
- font-size: var(--font-xs);
|
|
|
+ .stat-value {
|
|
|
+ font-size: 28px;
|
|
|
}
|
|
|
|
|
|
.chart-container {
|
|
|
- height: 240px;
|
|
|
- padding: var(--spacing-sm);
|
|
|
+ height: 300px;
|
|
|
+ padding: 16px;
|
|
|
}
|
|
|
|
|
|
.charts-row {
|
|
|
- margin-bottom: var(--spacing-lg);
|
|
|
+ margin-bottom: 20px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .card-header {
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: flex-start;
|
|
|
+ gap: 12px;
|
|
|
}
|
|
|
|
|
|
- .recent-activities :deep(.el-table) {
|
|
|
- font-size: var(--font-xs);
|
|
|
+ .chart-card :deep(.el-card__header),
|
|
|
+ .table-card :deep(.el-card__header) {
|
|
|
+ padding: 20px 24px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .dashboard-table :deep(.el-table th),
|
|
|
+ .dashboard-table :deep(.el-table td) {
|
|
|
+ padding: 0 16px;
|
|
|
+ font-size: 13px;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -655,22 +1053,32 @@ onUnmounted(() => {
|
|
|
.stat-content {
|
|
|
flex-direction: column;
|
|
|
text-align: center;
|
|
|
- gap: var(--spacing-sm);
|
|
|
+ gap: 16px;
|
|
|
}
|
|
|
|
|
|
.chart-container {
|
|
|
- height: 200px;
|
|
|
+ height: 260px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .dashboard-table :deep(.el-table th),
|
|
|
+ .dashboard-table :deep(.el-table td) {
|
|
|
+ padding: 0 12px;
|
|
|
+ font-size: 12px;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/* 超大屏幕 */
|
|
|
@media (min-width: 1920px) {
|
|
|
+ .dashboard-container {
|
|
|
+ padding: 40px;
|
|
|
+ }
|
|
|
+
|
|
|
.chart-container {
|
|
|
- height: 380px;
|
|
|
+ height: 450px;
|
|
|
}
|
|
|
|
|
|
.stat-value {
|
|
|
- font-size: var(--font-5xl);
|
|
|
+ font-size: 42px;
|
|
|
}
|
|
|
}
|
|
|
</style>
|