Explorar o código

两个 统计页面 完成一个 差一个

于添 hai 6 meses
pai
achega
238adeb61d

+ 643 - 0
public/html/knowledgePointAnalysis.html

@@ -0,0 +1,643 @@
+<!DOCTYPE html>
+<html lang="zh">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>知识点学习情况分析</title>
+    <!-- 引入Chart.js -->
+    <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
+    <style>
+        * {
+            margin: 0;
+            padding: 0;
+            box-sizing: border-box;
+        }
+
+        body {
+            font-family: 'Microsoft YaHei', Arial, sans-serif;
+            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
+            min-height: 100vh;
+            padding: 20px;
+        }
+
+        .container {
+            max-width: 1400px;
+            margin: 0 auto;
+            background: white;
+            border-radius: 15px;
+            box-shadow: 0 20px 40px rgba(0,0,0,0.1);
+            overflow: hidden;
+        }
+
+        header {
+            background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
+            color: white;
+            padding: 20px;
+            text-align: center;
+        }
+
+        h1 {
+            font-size: 28px;
+            margin-bottom: 10px;
+        }
+
+        .subtitle {
+            font-size: 16px;
+            opacity: 0.9;
+        }
+
+        .content {
+            display: flex;
+			//height : 950px;
+            //height: calc(100vh - 120px);
+        }
+
+        #chartContainer {
+            flex: 1;
+            padding: 30px;
+            border-right: 1px solid #eee;
+        }
+
+        #listContainer {
+            flex: 1;
+            padding: 30px;
+            display: flex;
+            flex-direction: column;
+        }
+
+        .chart-title {
+            font-size: 20px;
+            color: #333;
+            margin-bottom: 20px;
+            text-align: center;
+        }
+
+        .list-title {
+            font-size: 20px;
+            color: #333;
+            margin-bottom: 20px;
+            text-align: center;
+        }
+
+        /* 修复柱形图容器,避免变形 */
+        .chart-wrapper {
+            position: relative;
+            width: 100%;
+            height: 400px;
+        }
+
+        canvas {
+            width: 100% !important;
+            height: 100% !important;
+            max-width: 100%;
+        }
+
+        table {
+            width: 100%;
+            border-collapse: collapse;
+            box-shadow: 0 5px 15px rgba(0,0,0,0.08);
+            border-radius: 10px;
+            overflow: hidden;
+        }
+
+        th {
+            background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
+            color: white;
+            text-align: left;
+            padding: 15px;
+            font-weight: 600;
+            font-size: 14px;
+            text-transform: uppercase;
+            letter-spacing: 0.5px;
+        }
+
+        td {
+            padding: 12px 15px;
+            border-bottom: 1px solid #eee;
+            color: #555;
+        }
+
+        tr:hover {
+            background-color: #f8f9ff;
+            transform: translateY(-1px);
+            transition: all 0.3s ease;
+        }
+
+        tbody tr:last-child td {
+            border-bottom: none;
+        }
+
+        .no-data {
+            text-align: center;
+            padding: 40px;
+            color: #999;
+            font-style: italic;
+        }
+
+        .chartjs-tooltip {
+            background: rgba(0, 0, 0, 0.8) !important;
+            border: none !important;
+            border-radius: 8px !important;
+            padding: 10px !important;
+            color: white !important;
+            font-size: 14px !important;
+        }
+
+        .selected-knowledge {
+            background: #f0f8ff;
+            padding: 15px;
+            border-radius: 10px;
+            margin-bottom: 20px;
+            text-align: center;
+            font-weight: 600;
+            color: #4facfe;
+            border: 2px dashed #4facfe;
+        }
+
+        /* 分页样式 */
+        .pagination {
+            display: flex;
+            justify-content: center;
+            margin-top: 20px;
+            gap: 5px;
+        }
+
+        .pagination button {
+            background: white;
+            border: 1px solid #ddd;
+            color: #333;
+            padding: 8px 12px;
+            cursor: pointer;
+            border-radius: 4px;
+            font-size: 14px;
+            transition: all 0.3s ease;
+        }
+
+        .pagination button:hover {
+            background: #f0f0f0;
+            border-color: #999;
+        }
+
+        .pagination button.active {
+            background: #4facfe;
+            color: white;
+            border-color: #4facfe;
+        }
+
+        .pagination button:disabled {
+            background: #f5f5f5;
+            color: #ccc;
+            cursor: not-allowed;
+        }
+
+        .pagination-info {
+            text-align: center;
+            margin-top: 10px;
+            color: #666;
+            font-size: 14px;
+        }
+
+        @media (max-width: 768px) {
+            .content {
+                flex-direction: column;
+            }
+
+            #chartContainer {
+                border-right: none;
+                border-bottom: 1px solid #eee;
+            }
+
+            #listContainer {
+                height: 400px;
+            }
+
+            .pagination button {
+                padding: 6px 10px;
+                font-size: 12px;
+            }
+        }
+    </style>
+</head>
+<body>
+    <div class="container">
+        <header>
+            <h1>知识点学习情况分析</h1>
+            <div class="subtitle">实时监控学员学习进度与参与情况</div>
+        </header>
+
+        <div class="content">
+            <!-- 左侧柱形图 -->
+            <div id="chartContainer">
+                <div class="chart-title">各知识点学习人数统计</div>
+                <div class="chart-wrapper">
+                    <canvas id="myChart"></canvas>
+                </div>
+            </div>
+
+            <!-- 右侧列表 -->
+            <div id="listContainer">
+                <div class="list-title">学习人员名单</div>
+                <div id="selectedKnowledge" class="selected-knowledge">
+                    请选择左侧知识点查看学习人员
+                </div>
+                <div style="flex: 1; overflow-y: auto;">
+                    <table id="studentTable">
+                        <thead>
+                            <tr>
+                                <th>专业</th>
+                                <th>班级</th>
+                                <th>学号</th>
+                                <th>姓名</th>
+                            </tr>
+                        </thead>
+                        <tbody id="studentList">
+                            <tr><td colspan="4" class="no-data">暂无数据</td></tr>
+                        </tbody>
+                    </table>
+                </div>
+
+                <!-- 分页控件 -->
+                <div class="pagination-container">
+                    <div class="pagination" id="pagination">
+                        <!-- 分页按钮将通过JavaScript动态生成 -->
+                    </div>
+                    <div class="pagination-info" id="paginationInfo">
+                        <!-- 分页信息将通过JavaScript动态生成 -->
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+
+    <script>
+        // 示例数据
+        const knowledgeData = {
+            labels: ["电传操纵系统", "飞行控制律", "传感器技术", "故障诊断", "人机交互"],
+            datasets: [{
+                label: '学习人数',
+                data: [32, 25, 41, 18, 29],
+                backgroundColor: [
+                    'rgba(255, 99, 132, 0.8)',
+                    'rgba(54, 162, 235, 0.8)',
+                    'rgba(255, 206, 86, 0.8)',
+                    'rgba(75, 192, 192, 0.8)',
+                    'rgba(153, 102, 255, 0.8)'
+                ],
+                borderColor: [
+                    'rgba(255, 99, 132, 1)',
+                    'rgba(54, 162, 235, 1)',
+                    'rgba(255, 206, 86, 1)',
+                    'rgba(75, 192, 192, 1)',
+                    'rgba(153, 102, 255, 1)'
+                ],
+                borderWidth: 2,
+                borderRadius: 8,
+                borderSkipped: false
+            }]
+        };
+
+        // 学员数据
+        const studentData = [
+            // 电传操纵系统
+            [
+                { major: "航空航天工程", class: "飞控1班", studentId: "2023001", name: "张三" },
+                { major: "航空航天工程", class: "飞控1班", studentId: "2023002", name: "李四" },
+                { major: "航空航天工程", class: "飞控2班", studentId: "2023003", name: "王五" },
+                { major: "航空航天工程", class: "飞控2班", studentId: "2023004", name: "赵六" },
+                { major: "航空航天工程", class: "飞控3班", studentId: "2023005", name: "钱七" },
+                { major: "航空航天工程", class: "飞控3班", studentId: "2023006", name: "孙八" },
+                { major: "航空航天工程", class: "飞控1班", studentId: "2023007", name: "周九" },
+                { major: "航空航天工程", class: "飞控1班", studentId: "2023008", name: "吴十" },
+                { major: "航空航天工程", class: "飞控1班", studentId: "2023009", name: "郑一" },
+                { major: "航空航天工程", class: "飞控2班", studentId: "2023010", name: "王二" },
+                { major: "航空航天工程", class: "飞控2班", studentId: "2023011", name: "冯三" },
+                { major: "航空航天工程", class: "飞控3班", studentId: "2023012", name: "陈四" },
+                { major: "航空航天工程", class: "飞控3班", studentId: "2023013", name: "褚五" },
+                { major: "航空航天工程", class: "飞控1班", studentId: "2023014", name: "卫六" },
+                { major: "航空航天工程", class: "飞控1班", studentId: "2023015", name: "蒋七" },
+                { major: "航空航天工程", class: "飞控2班", studentId: "2023016", name: "沈八" },
+                { major: "航空航天工程", class: "飞控2班", studentId: "2023017", name: "韩九" },
+                { major: "航空航天工程", class: "飞控3班", studentId: "2023018", name: "杨十" },
+                { major: "航空航天工程", class: "飞控3班", studentId: "2023019", name: "朱一" },
+                { major: "航空航天工程", class: "飞控1班", studentId: "2023020", name: "秦二" },
+                { major: "航空航天工程", class: "飞控1班", studentId: "2023021", name: "尤三" },
+                { major: "航空航天工程", class: "飞控2班", studentId: "2023022", name: "许四" },
+                { major: "航空航天工程", class: "飞控2班", studentId: "2023023", name: "何五" },
+                { major: "航空航天工程", class: "飞控3班", studentId: "2023024", name: "吕六" },
+                { major: "航空航天工程", class: "飞控3班", studentId: "2023025", name: "施七" },
+                { major: "航空航天工程", class: "飞控1班", studentId: "2023026", name: "张八" },
+                { major: "航空航天工程", class: "飞控1班", studentId: "2023027", name: "孔九" },
+                { major: "航空航天工程", class: "飞控2班", studentId: "2023028", name: "曹十" },
+                { major: "航空航天工程", class: "飞控2班", studentId: "2023029", name: "严一" },
+                { major: "航空航天工程", class: "飞控3班", studentId: "2023030", name: "华二" },
+                { major: "航空航天工程", class: "飞控3班", studentId: "2023031", name: "金三" },
+                { major: "航空航天工程", class: "飞控1班", studentId: "2023032", name: "魏四" }
+            ],
+            // 飞行控制律
+            [
+                { major: "航空航天工程", class: "飞控1班", studentId: "2023033", name: "郑一" },
+                { major: "航空航天工程", class: "飞控2班", studentId: "2023034", name: "王二" },
+                { major: "航空航天工程", class: "飞控2班", studentId: "2023035", name: "冯三" },
+                { major: "航空航天工程", class: "飞控3班", studentId: "2023036", name: "陈四" },
+                { major: "航空航天工程", class: "飞控3班", studentId: "2023037", name: "褚五" },
+                { major: "航空航天工程", class: "飞控1班", studentId: "2023038", name: "卫六" },
+                { major: "航空航天工程", class: "飞控1班", studentId: "2023039", name: "蒋七" },
+                { major: "航空航天工程", class: "飞控2班", studentId: "2023040", name: "沈八" },
+                { major: "航空航天工程", class: "飞控2班", studentId: "2023041", name: "韩九" },
+                { major: "航空航天工程", class: "飞控3班", studentId: "2023042", name: "杨十" },
+                { major: "航空航天工程", class: "飞控3班", studentId: "2023043", name: "朱一" },
+                { major: "航空航天工程", class: "飞控1班", studentId: "2023044", name: "秦二" },
+                { major: "航空航天工程", class: "飞控1班", studentId: "2023045", name: "尤三" },
+                { major: "航空航天工程", class: "飞控2班", studentId: "2023046", name: "许四" },
+                { major: "航空航天工程", class: "飞控2班", studentId: "2023047", name: "何五" },
+                { major: "航空航天工程", class: "飞控3班", studentId: "2023048", name: "吕六" },
+                { major: "航空航天工程", class: "飞控3班", studentId: "2023049", name: "施七" },
+                { major: "航空航天工程", class: "飞控1班", studentId: "2023050", name: "张八" },
+                { major: "航空航天工程", class: "飞控1班", studentId: "2023051", name: "孔九" },
+                { major: "航空航天工程", class: "飞控2班", studentId: "2023052", name: "曹十" },
+                { major: "航空航天工程", class: "飞控2班", studentId: "2023053", name: "严一" },
+                { major: "航空航天工程", class: "飞控3班", studentId: "2023054", name: "华二" },
+                { major: "航空航天工程", class: "飞控3班", studentId: "2023055", name: "金三" },
+                { major: "航空航天工程", class: "飞控1班", studentId: "2023056", name: "魏四" }
+            ],
+            // 传感器技术
+            [
+                { major: "航空航天工程", class: "飞控1班", studentId: "2023057", name: "蒋七" },
+                { major: "航空航天工程", class: "飞控2班", studentId: "2023058", name: "沈八" },
+                { major: "航空航天工程", class: "飞控2班", studentId: "2023059", name: "韩九" },
+                { major: "航空航天工程", class: "飞控3班", studentId: "2023060", name: "杨十" },
+                { major: "航空航天工程", class: "飞控3班", studentId: "2023061", name: "朱一" },
+                { major: "航空航天工程", class: "飞控1班", studentId: "2023062", name: "秦二" },
+                { major: "航空航天工程", class: "飞控1班", studentId: "2023063", name: "尤三" },
+                { major: "航空航天工程", class: "飞控2班", studentId: "2023064", name: "许四" },
+                { major: "航空航天工程", class: "飞控2班", studentId: "2023065", name: "何五" },
+                { major: "航空航天工程", class: "飞控3班", studentId: "2023066", name: "吕六" },
+                { major: "航空航天工程", class: "飞控3班", studentId: "2023067", name: "施七" },
+                { major: "航空航天工程", class: "飞控1班", studentId: "2023068", name: "张八" },
+                { major: "航空航天工程", class: "飞控1班", studentId: "2023069", name: "孔九" },
+                { major: "航空航天工程", class: "飞控2班", studentId: "2023070", name: "曹十" },
+                { major: "航空航天工程", class: "飞控2班", studentId: "2023071", name: "严一" },
+                { major: "航空航天工程", class: "飞控3班", studentId: "2023072", name: "华二" },
+                { major: "航空航天工程", class: "飞控3班", studentId: "2023073", name: "金三" },
+                { major: "航空航天工程", class: "飞控1班", studentId: "2023074", name: "魏四" },
+                { major: "航空航天工程", class: "飞控1班", studentId: "2023075", name: "张三" },
+                { major: "航空航天工程", class: "飞控2班", studentId: "2023076", name: "李四" },
+                { major: "航空航天工程", class: "飞控2班", studentId: "2023077", name: "王五" },
+                { major: "航空航天工程", class: "飞控3班", studentId: "2023078", name: "赵六" },
+                { major: "航空航天工程", class: "飞控3班", studentId: "2023079", name: "钱七" },
+                { major: "航空航天工程", class: "飞控1班", studentId: "2023080", name: "孙八" },
+                { major: "航空航天工程", class: "飞控1班", studentId: "2023081", name: "周九" },
+                { major: "航空航天工程", class: "飞控2班", studentId: "2023082", name: "吴十" },
+                { major: "航空航天工程", class: "飞控2班", studentId: "2023083", name: "郑一" },
+                { major: "航空航天工程", class: "飞控3班", studentId: "2023084", name: "王二" },
+                { major: "航空航天工程", class: "飞控3班", studentId: "2023085", name: "冯三" }
+            ],
+            // 故障诊断
+            [
+                { major: "航空航天工程", class: "飞控2班", studentId: "2023086", name: "尤三" },
+                { major: "航空航天工程", class: "飞控3班", studentId: "2023087", name: "许四" },
+                { major: "航空航天工程", class: "飞控3班", studentId: "2023088", name: "何五" },
+                { major: "航空航天工程", class: "飞控1班", studentId: "2023089", name: "吕六" },
+                { major: "航空航天工程", class: "飞控1班", studentId: "2023090", name: "施七" },
+                { major: "航空航天工程", class: "飞控2班", studentId: "2023091", name: "张八" },
+                { major: "航空航天工程", class: "飞控2班", studentId: "2023092", name: "孔九" },
+                { major: "航空航天工程", class: "飞控3班", studentId: "2023093", name: "曹十" },
+                { major: "航空航天工程", class: "飞控3班", studentId: "2023094", name: "严一" },
+                { major: "航空航天工程", class: "飞控1班", studentId: "2023095", name: "华二" },
+                { major: "航空航天工程", class: "飞控1班", studentId: "2023096", name: "金三" },
+                { major: "航空航天工程", class: "飞控2班", studentId: "2023097", name: "魏四" },
+                { major: "航空航天工程", class: "飞控2班", studentId: "2023098", name: "张三" },
+                { major: "航空航天工程", class: "飞控3班", studentId: "2023099", name: "李四" },
+                { major: "航空航天工程", class: "飞控3班", studentId: "2023100", name: "王五" },
+                { major: "航空航天工程", class: "飞控1班", studentId: "2023101", name: "赵六" },
+                { major: "航空航天工程", class: "飞控1班", studentId: "2023102", name: "钱七" },
+                { major: "航空航天工程", class: "飞控2班", studentId: "2023103", name: "孙八" }
+            ],
+            // 人机交互
+            [
+                { major: "航空航天工程", class: "飞控1班", studentId: "2023104", name: "施七" },
+                { major: "航空航天工程", class: "飞控2班", studentId: "2023105", name: "张八" },
+                { major: "航空航天工程", class: "飞控2班", studentId: "2023106", name: "孔九" },
+                { major: "航空航天工程", class: "飞控3班", studentId: "2023107", name: "曹十" },
+                { major: "航空航天工程", class: "飞控3班", studentId: "2023108", name: "严一" },
+                { major: "航空航天工程", class: "飞控1班", studentId: "2023109", name: "华二" },
+                { major: "航空航天工程", class: "飞控1班", studentId: "2023110", name: "金三" },
+                { major: "航空航天工程", class: "飞控2班", studentId: "2023111", name: "魏四" },
+                { major: "航空航天工程", class: "飞控2班", studentId: "2023112", name: "张三" },
+                { major: "航空航天工程", class: "飞控3班", studentId: "2023113", name: "李四" },
+                { major: "航空航天工程", class: "飞控3班", studentId: "2023114", name: "王五" },
+                { major: "航空航天工程", class: "飞控1班", studentId: "2023115", name: "赵六" },
+                { major: "航空航天工程", class: "飞控1班", studentId: "2023116", name: "钱七" },
+                { major: "航空航天工程", class: "飞控2班", studentId: "2023117", name: "孙八" },
+                { major: "航空航天工程", class: "飞控2班", studentId: "2023118", name: "周九" },
+                { major: "航空航天工程", class: "飞控3班", studentId: "2023119", name: "吴十" },
+                { major: "航空航天工程", class: "飞控3班", studentId: "2023120", name: "郑一" },
+                { major: "航空航天工程", class: "飞控1班", studentId: "2023121", name: "王二" },
+                { major: "航空航天工程", class: "飞控1班", studentId: "2023122", name: "冯三" },
+                { major: "航空航天工程", class: "飞控2班", studentId: "2023123", name: "陈四" },
+                { major: "航空航天工程", class: "飞控2班", studentId: "2023124", name: "褚五" },
+                { major: "航空航天工程", class: "飞控3班", studentId: "2023125", name: "卫六" },
+                { major: "航空航天工程", class: "飞控3班", studentId: "2023126", name: "蒋七" },
+                { major: "航空航天工程", class: "飞控1班", studentId: "2023127", name: "沈八" },
+                { major: "航空航天工程", class: "飞控1班", studentId: "2023128", name: "韩九" },
+                { major: "航空航天工程", class: "飞控2班", studentId: "2023129", name: "杨十" },
+                { major: "航空航天工程", class: "飞控2班", studentId: "2023130", name: "朱一" },
+                { major: "航空航天工程", class: "飞控3班", studentId: "2023131", name: "秦二" },
+                { major: "航空航天工程", class: "飞控3班", studentId: "2023132", name: "尤三" }
+            ]
+        ];
+
+        // 每页显示的项目数量
+        const ITEMS_PER_PAGE = 10;
+
+        // 当前分页信息
+        let currentPage = 1;
+        let totalPages = 1;
+        let currentDataIndex = 0;
+
+        // 创建柱形图
+        const ctx = document.getElementById('myChart').getContext('2d');
+        const myChart = new Chart(ctx, {
+            type: 'bar',
+            data: knowledgeData,
+            options: {
+                responsive: true,
+                maintainAspectRatio: false,
+                plugins: {
+                    legend: {
+                        display: false
+                    },
+                    tooltip: {
+                        backgroundColor: 'rgba(0, 0, 0, 0.8)',
+                        titleColor: 'white',
+                        bodyColor: 'white',
+                        borderColor: 'rgba(255, 255, 255, 0.3)',
+                        borderWidth: 1,
+                        cornerRadius: 8,
+                        displayColors: false,
+                        callbacks: {
+                            label: function(context) {
+                                return `学习人数: ${context.parsed.y}人`;
+                            }
+                        }
+                    }
+                },
+                scales: {
+                    y: {
+                        beginAtZero: true,
+                        ticks: {
+                            stepSize: 5,
+                            color: '#666',
+                            font: {
+                                size: 12,
+                                family: 'Microsoft YaHei, Arial, sans-serif'
+                            }
+                        },
+                        grid: {
+                            color: 'rgba(0, 0, 0, 0.1)'
+                        }
+                    },
+                    x: {
+                        ticks: {
+                            color: '#666',
+                            font: {
+                                size: 12,
+                                family: 'Microsoft YaHei, Arial, sans-serif'
+                            },
+                            maxRotation: 45,
+                            minRotation: 45
+                        },
+                        grid: {
+                            display: false
+                        }
+                    }
+                },
+                onClick: (event, elements) => {
+                    if (elements.length > 0) {
+                        const index = elements[0].index;
+                        currentDataIndex = index;
+                        currentPage = 1; // 重置为第一页
+                        updateStudentList(index, 1);
+
+                        // 更新选中知识点显示
+                        document.getElementById('selectedKnowledge').innerHTML =
+                            `<strong>当前查看:</strong> ${knowledgeData.labels[index]}
+                             <span style="color: #666; font-weight: normal;">(${knowledgeData.datasets[0].data[index]}人学习)</span>`;
+                    }
+                },
+                interaction: {
+                    intersect: false,
+                    mode: 'index'
+                }
+            }
+        });
+
+        // 更新右侧列表(带分页)
+        function updateStudentList(index, page = 1) {
+            const listContainer = document.getElementById('studentList');
+            const students = studentData[index];
+            const paginationContainer = document.getElementById('pagination');
+            const paginationInfo = document.getElementById('paginationInfo');
+
+            if (students && students.length > 0) {
+                // 计算分页
+                totalPages = Math.ceil(students.length / ITEMS_PER_PAGE);
+                currentPage = page;
+
+                // 计算当前页的数据
+                const startIndex = (page - 1) * ITEMS_PER_PAGE;
+                const endIndex = Math.min(startIndex + ITEMS_PER_PAGE, students.length);
+                const currentPageData = students.slice(startIndex, endIndex);
+
+                // 清空列表并添加当前页数据
+                listContainer.innerHTML = '';
+                currentPageData.forEach(student => {
+                    const tr = document.createElement('tr');
+                    tr.innerHTML = `
+                        <td>${student.major}</td>
+                        <td>${student.class}</td>
+                        <td>${student.studentId}</td>
+                        <td>${student.name}</td>
+                    `;
+                    listContainer.appendChild(tr);
+                });
+
+                // 更新分页信息
+                paginationInfo.textContent = `共 ${students.length} 条记录,第 ${page} 页,共 ${totalPages} 页`;
+
+                // 生成分页按钮
+                generatePaginationButtons();
+            } else {
+                listContainer.innerHTML = '<tr><td colspan="4" class="no-data">暂无学习人员</td></tr>';
+                paginationContainer.innerHTML = '';
+                paginationInfo.textContent = '';
+            }
+        }
+
+        // 生成分页按钮
+        function generatePaginationButtons() {
+            const paginationContainer = document.getElementById('pagination');
+            paginationContainer.innerHTML = '';
+
+            // 上一页按钮
+            const prevButton = document.createElement('button');
+            prevButton.innerHTML = '&laquo;';
+            prevButton.disabled = currentPage === 1;
+            prevButton.addEventListener('click', () => {
+                if (currentPage > 1) {
+                    updateStudentList(currentDataIndex, currentPage - 1);
+                }
+            });
+            paginationContainer.appendChild(prevButton);
+
+            // 页码按钮(最多显示5个页码)
+            const maxVisiblePages = 5;
+            let startPage = Math.max(1, currentPage - Math.floor(maxVisiblePages / 2));
+            let endPage = Math.min(totalPages, startPage + maxVisiblePages - 1);
+
+            // 如果接近末尾,调整起始页
+            if (endPage - startPage + 1 < maxVisiblePages) {
+                startPage = Math.max(1, endPage - maxVisiblePages + 1);
+            }
+
+            for (let i = startPage; i <= endPage; i++) {
+                const pageButton = document.createElement('button');
+                pageButton.textContent = i;
+                pageButton.classList.toggle('active', i === currentPage);
+                pageButton.addEventListener('click', () => {
+                    updateStudentList(currentDataIndex, i);
+                });
+                paginationContainer.appendChild(pageButton);
+            }
+
+            // 下一页按钮
+            const nextButton = document.createElement('button');
+            nextButton.innerHTML = '&raquo;';
+            nextButton.disabled = currentPage === totalPages;
+            nextButton.addEventListener('click', () => {
+                if (currentPage < totalPages) {
+                    updateStudentList(currentDataIndex, currentPage + 1);
+                }
+            });
+            paginationContainer.appendChild(nextButton);
+        }
+
+        // 页面加载完成后,默认显示第一个知识点的人员列表
+        window.addEventListener('load', function() {
+            // 等待Chart.js完全渲染完成
+            setTimeout(() => {
+                // 默认选择第一个知识点
+                const firstIndex = 0;
+                currentDataIndex = firstIndex;
+                currentPage = 1;
+                updateStudentList(firstIndex, 1);
+
+                // 更新选中知识点显示
+                document.getElementById('selectedKnowledge').innerHTML =
+                    `<strong>当前查看:</strong> ${knowledgeData.labels[firstIndex]}
+                     <span style="color: #666; font-weight: normal;">(${knowledgeData.datasets[0].data[firstIndex]}人学习)</span>`;
+            }, 100);
+        });
+    </script>
+</body>
+</html>

+ 579 - 0
public/html/resourceStatistics.html

@@ -0,0 +1,579 @@
+<!DOCTYPE html>
+<html lang="zh-CN">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>资源库统计分析</title>
+    <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
+    <style>
+        body {
+            font-family: 'Arial', sans-serif;
+            margin: 0;
+            padding: 20px;
+            background-color: #f5f5f5;
+            color: #333;
+        }
+        .container {
+            max-width: 1200px;
+            margin: 0 auto;
+            background-color: white;
+            padding: 30px;
+            border-radius: 10px;
+            box-shadow: 0 0 10px rgba(0,0,0,0.1);
+        }
+        h1, h2, h3 {
+            color: #2c3e50;
+            border-bottom: 2px solid #3498db;
+            padding-bottom: 10px;
+            margin-bottom: 20px;
+        }
+        .chart-container {
+            margin-bottom: 40px;
+            padding: 20px;
+            background-color: #f9f9f9;
+            border-radius: 8px;
+            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
+        }
+        .row {
+            display: flex;
+            flex-wrap: wrap;
+            gap: 20px;
+            margin-bottom: 30px;
+        }
+        .col {
+            flex: 1;
+            min-width: 300px;
+        }
+        .summary-box {
+            background-color: #ecf0f1;
+            padding: 15px;
+            border-radius: 8px;
+            margin-bottom: 20px;
+            text-align: center;
+        }
+        .summary-box h3 {
+            margin: 0 0 10px 0;
+            color: #2c3e50;
+        }
+        .summary-box p {
+            margin: 0;
+            font-size: 24px;
+            font-weight: bold;
+            color: #3498db;
+        }
+        .filters {
+            margin-bottom: 20px;
+            padding: 15px;
+            background-color: #f1f8ff;
+            border-radius: 8px;
+        }
+        .filters label {
+            margin-right: 15px;
+            font-weight: bold;
+        }
+        .filters select {
+            padding: 5px;
+            border: 1px solid #ddd;
+            border-radius: 4px;
+        }
+        footer {
+            text-align: center;
+            margin-top: 40px;
+            color: #7f8c8d;
+            font-size: 14px;
+        }
+        .storage-info {
+            background-color: #e8f4fc;
+            padding: 15px;
+            border-radius: 8px;
+            margin-bottom: 20px;
+        }
+        .storage-info h3 {
+            margin: 0 0 10px 0;
+            color: #2980b9;
+        }
+        .storage-info p {
+            margin: 0;
+            font-size: 18px;
+        }
+    </style>
+</head>
+<body>
+    <div class="container">
+        <h1>资源库统计分析</h1>
+        
+        <!-- 摘要信息 -->
+        <div class="row">
+            <div class="col summary-box">
+                <h3>总资源数</h3>
+                <p id="total-resources">1,247</p>
+            </div>
+            <div class="col summary-box">
+                <h3>总存储空间</h3>
+                <p id="total-storage">4.2 TB</p>
+            </div>
+            <div class="col summary-box">
+                <h3>总观看人数</h3>
+                <p id="total-views">89,532</p>
+            </div>
+            <div class="col summary-box">
+                <h3>总收藏人数</h3>
+                <p id="total-favorites">15,678</p>
+            </div>
+        </div>
+
+        <!-- 存储空间信息 -->
+        <div class="storage-info">
+            <h3>资源库存储空间使用情况</h3>
+            <p>当前资源库总容量:10 TB | 已使用:4.2 TB | 使用率:42%</p>
+        </div>
+
+        <!-- 筛选器 -->
+        <div class="filters">
+            <label for="department-filter">筛选院系:</label>
+            <select id="department-filter">
+                <option value="all">全部院系</option>
+                <option value="aviation">航空学院</option>
+                <option value="military">军事管理系</option>
+                <option value="politics">政治工作部</option>
+                <option value="maintenance">地面维修中心</option>
+                <option value="other">其他部门</option>
+            </select>
+            
+            <label for="time-filter">时间范围:</label>
+            <select id="time-filter">
+                <option value="all">全部时间</option>
+                <option value="30">最近30天</option>
+                <option value="90">最近90天</option>
+                <option value="180">最近180天</option>
+                <option value="365">最近1年</option>
+            </select>
+        </div>
+
+        <!-- 资源类型分布 -->
+        <div class="chart-container">
+            <h2>资源类型分布</h2>
+            <div class="row">
+                <div class="col">
+                    <canvas id="typeChart"></canvas>
+                </div>
+                <div class="col">
+                    <canvas id="departmentChart"></canvas>
+                </div>
+            </div>
+        </div>
+
+        <!-- 资源可见性与热度 -->
+        <div class="chart-container">
+            <h2>资源可见性与热度</h2>
+            <div class="row">
+                <div class="col">
+                    <canvas id="visibilityChart"></canvas>
+                </div>
+                <div class="col">
+                    <canvas id="hotnessChart"></canvas>
+                </div>
+            </div>
+        </div>
+
+        <!-- 文件格式分布 -->
+        <div class="chart-container">
+            <h2>文件格式分布</h2>
+            <div class="row">
+                <div class="col">
+                    <canvas id="formatChart"></canvas>
+                </div>
+                <div class="col">
+                    <canvas id="storageChart"></canvas>
+                </div>
+            </div>
+        </div>
+
+        <!-- 资源使用情况分析 -->
+        <div class="chart-container">
+            <h2>资源使用情况分析</h2>
+            <div class="row">
+                <div class="col">
+                    <canvas id="viewsChart"></canvas>
+                </div>
+                <div class="col">
+                    <canvas id="engagementChart"></canvas>
+                </div>
+            </div>
+        </div>
+
+        <!-- 时间趋势分析 -->
+        <div class="chart-container">
+            <h2>上传与访问时间趋势</h2>
+            <canvas id="trendChart"></canvas>
+        </div>
+
+        <footer>
+            <p>数据更新时间: 2025年8月18日 | 资源库统计分析系统</p>
+        </footer>
+    </div>
+
+    <script>
+        // 模拟数据 - 包含文件数量和存储空间数据
+        const mockData = {
+            // 资源类型数据
+            types: ['航空教学', '部队管理', '政治工作', '地面维修', '其他'],
+            typeCounts: [345, 278, 192, 231, 201],
+            typeStorage: [1.2, 0.8, 0.6, 0.9, 0.7], // TB
+            
+            // 院系数据
+            departments: ['航空学院', '军事管理系', '政治工作部', '地面维修中心', '其他部门'],
+            departmentCounts: [412, 289, 176, 223, 147],
+            departmentStorage: [1.5, 0.9, 0.5, 0.8, 0.5], // TB
+            
+            // 可见性数据
+            visibility: ['公开', '非公开'],
+            visibilityCounts: [987, 260],
+            
+            // 热度数据
+            hotness: ['热门', '非热门'],
+            hotnessCounts: [312, 935],
+            recommended: ['已推荐', '未推荐'],
+            recommendedCounts: [187, 1060],
+            
+            // 文件格式数据 - 包含文件数量和平均文件大小
+            formats: ['mp4', 'pdf', 'docx', 'pptx', 'xlsx', 'jpg', 'avi', 'wmv', 'mkv', 'other'],
+            formatCounts: [320, 312, 135, 189, 98, 167, 56, 67, 41, 163],
+            formatStorage: [2.1, 0.3, 0.15, 0.25, 0.1, 0.08, 0.4, 0.3, 0.2, 0.12], // TB
+            formatAvgSize: ['6.6GB', '960MB', '1.1MB', '1.3MB', '1.0MB', '500KB', '7.1GB', '4.5GB', '4.9GB', '750KB'],
+            
+            // 用户参与度数据
+            engagement: ['观看', '收藏', '分享'],
+            engagementCounts: [89532, 15678, 7892],
+            
+            // 时间趋势数据
+            trendLabels: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月'],
+            uploadTrend: [120, 95, 140, 110, 135, 150, 130, 80],
+            viewTrend: [8500, 7200, 9800, 9200, 10500, 11200, 10800, 12300]
+        };
+
+        // 资源类型分布图
+        new Chart(document.getElementById('typeChart'), {
+            type: 'pie',
+            data: {
+                labels: mockData.types,
+                datasets: [{
+                    data: mockData.typeCounts,
+                    backgroundColor: [
+                        '#3498db', '#e74c3c', '#2ecc71', '#f39c12', '#9b59b6'
+                    ],
+                    borderWidth: 2
+                }]
+            },
+            options: {
+                responsive: true,
+                plugins: {
+                    title: {
+                        display: true,
+                        text: '按资源类型分类 (数量)'
+                    },
+                    legend: {
+                        position: 'bottom'
+                    }
+                }
+            }
+        });
+
+        // 院系分布图
+        new Chart(document.getElementById('departmentChart'), {
+            type: 'doughnut',
+            data: {
+                labels: mockData.departments,
+                datasets: [{
+                    data: mockData.departmentCounts,
+                    backgroundColor: [
+                        '#1abc9c', '#3498db', '#8e44ad', '#e67e22', '#e74c3c'
+                    ],
+                    borderWidth: 2
+                }]
+            },
+            options: {
+                responsive: true,
+                plugins: {
+                    title: {
+                        display: true,
+                        text: '按院系分布 (数量)'
+                    },
+                    legend: {
+                        position: 'bottom'
+                    }
+                }
+            }
+        });
+
+        // 可见性分析
+        new Chart(document.getElementById('visibilityChart'), {
+            type: 'bar',
+            data: {
+                labels: mockData.visibility,
+                datasets: [{
+                    label: '资源数量',
+                    data: mockData.visibilityCounts,
+                    backgroundColor: [
+                        'rgba(46, 204, 113, 0.8)',
+                        'rgba(231, 76, 60, 0.8)'
+                    ],
+                    borderColor: [
+                        '#2ecc71', '#e74c3c'
+                    ],
+                    borderWidth: 1
+                }]
+            },
+            options: {
+                responsive: true,
+                scales: {
+                    y: {
+                        beginAtZero: true,
+                        title: {
+                            display: true,
+                            text: '资源数量'
+                        }
+                    }
+                },
+                plugins: {
+                    title: {
+                        display: true,
+                        text: '资源公开情况'
+                    }
+                }
+            }
+        });
+
+        // 热度分析
+        new Chart(document.getElementById('hotnessChart'), {
+            type: 'polarArea',
+            data: {
+                labels: ['热门资源', '推荐资源', '热门且推荐'],
+                datasets: [{
+                    label: '资源数量',
+                    data: [312, 187, 89],
+                    backgroundColor: [
+                        'rgba(231, 76, 60, 0.7)',
+                        'rgba(52, 152, 219, 0.7)',
+                        'rgba(155, 89, 182, 0.7)'
+                    ],
+                    borderColor: [
+                        'rgba(231, 76, 60, 1)',
+                        'rgba(52, 152, 219, 1)',
+                        'rgba(155, 89, 182, 1)'
+                    ],
+                    borderWidth: 1
+                }]
+            },
+            options: {
+                responsive: true,
+                plugins: {
+                    title: {
+                        display: true,
+                        text: '资源热度分析'
+                    }
+                }
+            }
+        });
+
+        // 文件数量分布 - 水平条形图
+        new Chart(document.getElementById('formatChart'), {
+            type: 'bar',
+            data: {
+                labels: mockData.formats,
+                datasets: [{
+                    label: '文件数量',
+                    data: mockData.formatCounts,
+                    backgroundColor: 'rgba(52, 73, 94, 0.7)',
+                    borderColor: 'rgba(52, 73, 94, 1)',
+                    borderWidth: 1
+                }]
+            },
+            options: {
+                indexAxis: 'y',
+                responsive: true,
+                scales: {
+                    x: {
+                        beginAtZero: true,
+                        title: {
+                            display: true,
+                            text: '文件数量'
+                        }
+                    }
+                },
+                plugins: {
+                    title: {
+                        display: true,
+                        text: '不同文件格式的数量分布'
+                    }
+                }
+            }
+        });
+
+        // 存储空间占用分布 - 饼图
+        new Chart(document.getElementById('storageChart'), {
+            type: 'pie',
+            data: {
+                labels: mockData.formats,
+                datasets: [{
+                    label: '存储空间 (TB)',
+                    data: mockData.formatStorage,
+                    backgroundColor: [
+                        '#e74c3c', '#3498db', '#2ecc71', '#f39c12', 
+                        '#9b59b6', '#1abc9c', '#34495e', '#d35400', 
+                        '#8e44ad', '#7f8c8d'
+                    ],
+                    borderWidth: 2
+                }]
+            },
+            options: {
+                responsive: true,
+                plugins: {
+                    title: {
+                        display: true,
+                        text: '不同文件格式的存储空间占用'
+                    },
+                    tooltip: {
+                        callbacks: {
+                            label: function(context) {
+                                const label = context.label || '';
+                                const value = context.parsed;
+                                const count = mockData.formatCounts[context.dataIndex];
+                                const avgSize = mockData.formatAvgSize[context.dataIndex];
+                                return [
+                                    `${label}: ${value} TB`,
+                                    `文件数量: ${count}`,
+                                    `平均大小: ${avgSize}`
+                                ];
+                            }
+                        }
+                    }
+                }
+            }
+        });
+
+        // 观看情况分析
+        new Chart(document.getElementById('viewsChart'), {
+            type: 'bar',
+            data: {
+                labels: mockData.types,
+                datasets: [{
+                    label: '平均观看人数',
+                    data: [1250, 890, 620, 980, 450],
+                    backgroundColor: 'rgba(41, 128, 185, 0.7)',
+                    borderColor: 'rgba(41, 128, 185, 1)',
+                    borderWidth: 1
+                }]
+            },
+            options: {
+                responsive: true,
+                scales: {
+                    y: {
+                        beginAtZero: true,
+                        title: {
+                            display: true,
+                            text: '平均观看人数'
+                        }
+                    }
+                },
+                plugins: {
+                    title: {
+                        display: true,
+                        text: '各类资源平均观看人数'
+                    }
+                }
+            }
+        });
+
+        // 用户参与度分析
+        new Chart(document.getElementById('engagementChart'), {
+            type: 'bar',
+            data: {
+                labels: ['观看人数', '收藏人数', '分享次数'],
+                datasets: [{
+                    label: '用户参与度',
+                    data: mockData.engagementCounts,
+                    backgroundColor: 'rgba(155, 89, 182, 0.7)',
+                    borderColor: 'rgba(155, 89, 182, 1)',
+                    borderWidth: 1
+                }]
+            },
+            options: {
+                responsive: true,
+                scales: {
+                    y: {
+                        beginAtZero: true,
+                        title: {
+                            display: true,
+                            text: '数量'
+                        }
+                    }
+                },
+                plugins: {
+                    title: {
+                        display: true,
+                        text: '资源使用情况统计'
+                    }
+                }
+            }
+        });
+
+        // 时间趋势分析
+        new Chart(document.getElementById('trendChart'), {
+            type: 'line',
+            data: {
+                labels: mockData.trendLabels,
+                datasets: [
+                    {
+                        label: '资源上传数量',
+                        data: mockData.uploadTrend,
+                        borderColor: '#3498db',
+                        backgroundColor: 'rgba(52, 152, 219, 0.1)',
+                        fill: true,
+                        tension: 0.4
+                    },
+                    {
+                        label: '资源观看人数',
+                        data: mockData.viewTrend,
+                        borderColor: '#e74c3c',
+                        backgroundColor: 'rgba(231, 76, 60, 0.1)',
+                        fill: true,
+                        tension: 0.4
+                    }
+                ]
+            },
+            options: {
+                responsive: true,
+                interaction: {
+                    mode: 'index',
+                    intersect: false
+                },
+                scales: {
+                    y: {
+                        beginAtZero: true,
+                        title: {
+                            display: true,
+                            text: '数量'
+                        }
+                    }
+                },
+                plugins: {
+                    title: {
+                        display: true,
+                        text: '资源上传与访问趋势 (2025年)'
+                    }
+                }
+            }
+        });
+
+        // 筛选器交互功能
+        document.getElementById('department-filter').addEventListener('change', function() {
+            console.log('筛选院系:', this.value);
+        });
+
+        document.getElementById('time-filter').addEventListener('change', function() {
+            console.log('时间范围:', this.value);
+        });
+    </script>
+</body>
+</html>

+ 2 - 0
src/api/course/courseDetail.js

@@ -90,3 +90,5 @@ export const mockStudentDetail = {
 export function getStudentDetail() {
 	return Promise.resolve(mockStudentDetail)
 }
+
+export const selectKnowledgeByCourseId = (p) => request('disk/chapterknowledge/selectKnowledgeByCourseId', p, 'get')

+ 1 - 0
src/router/fullPage.js

@@ -32,6 +32,7 @@ const portal = [
 		path: '/tlogin',
 		component: () => import('@/views/tlogin/login.vue'),
 	},
+
 	// {
 	// 	name: 'classManagement',
 	// 	path: '/classManagement',

+ 4 - 0
src/router/whiteList.js

@@ -197,6 +197,10 @@ const constRouters = [
 	{
 		path: '/announcementLookManagement',
 		component: () => import('@/views/announcementLookManagement/index.vue'),
+	},
+	{
+		path: '/resourceStatistics',
+		component: () => import('@/views/resourceStatistics/index.vue'),
 	}
 	// {
 	// 	path: '/answerManagement',

+ 3 - 46
src/views/answerManagement/components/DialogView.vue

@@ -1,7 +1,7 @@
 <template>
 	<a-modal v-model:visible="visible" width="30%" height="70%" title="回复" @ok="handleOk">
 		<div style="height: 300px; overflow-y: auto">
-			<template v-for="(item,index) in recordChildList" :key = index>
+			<template v-for="(item,index) in recordList" :key = index>
 				<TallItemView :name="item.userIdName" :data="item.info"   style="margin-top: 10px"></TallItemView>
 			</template>
 		</div>
@@ -28,7 +28,7 @@ import {reactive, ref} from 'vue'
 import resourceAuditApi from '@/api/resourceAudit.js'
 import TallItemView from './TallItemView.vue'
 
-const recordChildList = ref([]) //专业
+const recordList = ref([]) //专业
 const formRef = ref() //专业
 const mode = ref('add') //专业
 import {addItem, detail, editItem} from '@/api/answer'
@@ -67,50 +67,7 @@ const edit = (item) => {
 		if(res.code == 200){
 			formState.pid = item.id
 			formState.hourId = item.hourId
-			recordChildList.value = item.recordChildList
-
-
-
-			// recordChildList.value.push(item.recordChildList[0])
-			// recordChildList.value.push(item.recordChildList[0])
-			// recordChildList.value.push(item.recordChildList[0])
-			// recordChildList.value.push(item.recordChildList[0])
-			// recordChildList.value.push(item.recordChildList[0])
-			// recordChildList.value.push(item.recordChildList[0])
-			// recordChildList.value.push(item.recordChildList[0])
-			// recordChildList.value.push(item.recordChildList[0])
-			// recordChildList.value.push(item.recordChildList[0])
-			// recordChildList.value.push(item.recordChildList[0])
-			// recordChildList.value.push(item.recordChildList[0])
-			// recordChildList.value.push(item.recordChildList[0])
-			// recordChildList.value.push(item.recordChildList[0])
-			// recordChildList.value.push(item.recordChildList[0])
-			// recordChildList.value.push(item.recordChildList[0])
-			// recordChildList.value.push(item.recordChildList[0])
-			// recordChildList.value.push(item.recordChildList[0])
-			// recordChildList.value.push(item.recordChildList[0])
-			// recordChildList.value.push(item.recordChildList[0])
-			// recordChildList.value.push(item.recordChildList[0])
-			// recordChildList.value.push(item.recordChildList[0])
-			// recordChildList.value.push(item.recordChildList[0])
-			// recordChildList.value.push(item.recordChildList[0])
-			// recordChildList.value.push(item.recordChildList[0])
-			// recordChildList.value.push(item.recordChildList[0])
-			// recordChildList.value.push(item.recordChildList[0])
-			// recordChildList.value.push(item.recordChildList[0])
-			// recordChildList.value.push(item.recordChildList[0])
-			// recordChildList.value.push(item.recordChildList[0])
-			// recordChildList.value.push(item.recordChildList[0])
-			// recordChildList.value.push(item.recordChildList[0])
-			// recordChildList.value.push(item.recordChildList[0])
-			// recordChildList.value.push(item.recordChildList[0])
-			// recordChildList.value.push(item.recordChildList[0])
-			// recordChildList.value.push(item.recordChildList[0])
-			// recordChildList.value.push(item.recordChildList[0])
-			// recordChildList.value.push(item.recordChildList[0])
-			// recordChildList.value.push(item.recordChildList[0])
-			// recordChildList.value.push(item.recordChildList[0])
-			// recordChildList.value.push(item.recordChildList[0])
+			recordList.value = item.recordList
 		}
 	})
 

+ 20 - 3
src/views/courseAdd/components/courseProduction/addClassHours.vue

@@ -3,7 +3,16 @@
 		<a-form-item label="课时名称:" name="title" required>
 			<a-input v-model:value="form.title" placeholder="输入内容"/>
 		</a-form-item>
-		<a-form-item label="选择视频:" required name="video">
+		<a-form-item label="知识点" name="knowledgeIds">
+			<a-select   mode="multiple" v-model:value="form.knowledgeIds" placeholder="请选择知识点"
+						style="width: 220px; ">
+				<a-select-option v-for="(item, index) in knowledgeOptions" :key="index" :value="item.value">{{
+						item.label
+					}}
+				</a-select-option>
+			</a-select>
+		</a-form-item>
+		<a-form-item label="选择资源:" required name="video">
 			<div class="video-select-row">
 				<a-button type="primary" @click="()=>{emit('handlerSelect')}">选择资源</a-button>
 				<a-button type="primary" @click="()=>{emit('handlerUpSelect')}">新上传资源</a-button>
@@ -36,12 +45,13 @@ import UpLoadDoc from '@/components/UpLoadDoc/index.vue'
 import UpLoadSrt from '@/components/UpLoadSrt/index.vue'
 import FileName from './fileName.vue'
 import {add, detail} from '@/api/hour/index'
+import tool from "@/utils/tool";
 
 const props = defineProps({
 	visible: Boolean
 })
 const emit = defineEmits(['update:visible', 'ok', 'handlerUpSelect', 'handlerNewSelect','handlerEx','handlerExs'])
-
+const knowledgeOptions = tool.dictList('knowledge')
 const fileNameRef = ref(null)
 const upLoadImgRef = ref(null)
 const upLoadDocRef = ref(null)
@@ -57,7 +67,8 @@ const form = reactive({
 	video: '',
 	coverUrl: '',
 	docUrl: '',
-	srtUrl: ''
+	srtUrl: '',
+	knowledgeIds : []
 })
 
 const rules = {
@@ -66,6 +77,7 @@ const rules = {
 	coverUrl: [{required: true, message: '请上传封面'}],
 	docUrl: [{required: true, message: '请上传讲义'}],
 	srtUrl: [{required: true, message: '请上传字幕'}],
+	knowledgeIds: [{required: true, message: '请选择知识点', trigger: 'blur'}],
 }
 
 
@@ -96,6 +108,7 @@ const getData = (callBack) => {
 		let data = {}
 
 		data.name = form.title
+		data.knowledgeIds = form.knowledgeIds
 		data.courseRelates = []
 		//todo :0封面 1视频资源,2讲义,3字幕,4作业,5测验
 		data.courseRelates.push({funcType: 0, relateId: form.coverUrl})
@@ -143,6 +156,7 @@ const reset = () => {
 		form.coverUrl = ''
 		form.docUrl = ''
 		form.srtUrl = ''
+		form.courseRelates = []
 
 		upLoadImgRef.value.setData({id: "", url: ""})
 		fileNameRef.value.setData({id: "", name: ""})
@@ -169,6 +183,9 @@ const edit = (item) => {
 			if (res.code == 200) {
 				let data = res.data
 				form.title = data.name
+				form.knowledgeIds = data.knowledgeIds
+
+
 				for (let i = 0; i < data.courseRelates.length; i++) {
 					let itemi = data.courseRelates[i]
 					console.log('每条数据', itemi)

+ 13 - 13
src/views/courseAdd/components/courseProduction/index.vue

@@ -61,15 +61,15 @@
 				<a-form-item label="章节名称" name="chapterName">
 					<a-input v-model:value="formState.chapterName" placeholder="请输入章节名称"/>
 				</a-form-item>
-				<a-form-item label="知识点" name="knowledgeIds">
-					<a-select   mode="multiple" v-model:value="formState.knowledgeIds" placeholder="请选择知识点"
-							  style="width: 220px; ">
-						<a-select-option v-for="(item, index) in knowledgeOptions" :key="index" :value="item.value">{{
-								item.label
-							}}
-						</a-select-option>
-					</a-select>
-				</a-form-item>
+<!--				<a-form-item label="知识点" name="knowledgeIds">-->
+<!--					<a-select   mode="multiple" v-model:value="formState.knowledgeIds" placeholder="请选择知识点"-->
+<!--							  style="width: 220px; ">-->
+<!--						<a-select-option v-for="(item, index) in knowledgeOptions" :key="index" :value="item.value">{{-->
+<!--								item.label-->
+<!--							}}-->
+<!--						</a-select-option>-->
+<!--					</a-select>-->
+<!--				</a-form-item>-->
 			</a-form>
 		</a-modal>
 		<!-- 添加课时模态框 -->
@@ -131,7 +131,7 @@ const formState = reactive({
 })
 const rules = {
 	chapterName: [{required: true, message: '请输入章节名称', trigger: 'blur'}],
-	knowledgeIds: [{required: true, message: '请选择知识点', trigger: 'blur'}],
+	// knowledgeIds: [{required: true, message: '请选择知识点', trigger: 'blur'}],
 }
 const pagination = reactive({
 	pageSize: 10,
@@ -162,7 +162,7 @@ const handleOk = () => {
 				.add({
 					courseId: courseInfoId,
 					name: formState.chapterName,
-					knowledgeIds : formState.knowledgeIds
+					// knowledgeIds : formState.knowledgeIds
 				})
 				.then((res) => {
 					console.log(res, '章节添加')
@@ -181,7 +181,7 @@ const handleOk = () => {
 					id: formState.id,
 					courseId: courseInfoId,
 					name: formState.chapterName,
-					knowledgeIds : formState.knowledgeIds
+					// knowledgeIds : formState.knowledgeIds
 				})
 				.then((res) => {
 					console.log(res, '章节添加')
@@ -216,7 +216,7 @@ const editChapter = (chapterIndex) => {
 
 	formState.id = item.id
 	formState.chapterName = item.name
-	formState.knowledgeIds = item.knowledeges
+	// formState.knowledgeIds = item.knowledeges
 
 }
 

+ 671 - 0
src/views/courseDetails/components/tab/knowledgePointAnalysis.vue

@@ -0,0 +1,671 @@
+<template>
+	<div class="container">
+		<header>
+			<h1>知识点学习情况分析</h1>
+			<div class="subtitle">实时监控学员学习进度与参与情况</div>
+		</header>
+
+		<div class="content">
+
+			<!-- 左侧柱形图 -->
+			<div id="chartContainer">
+				<div class="chart-title">各知识点学习人数统计</div>
+				<div class="chart-wrapper">
+					<div ref="myChart" style="width: 100%; height: 600px;"></div>
+				</div>
+			</div>
+
+			<!-- 右侧列表 -->
+			<div id="listContainer">
+				<div class="list-title">学习人员名单</div>
+				<div id="selectedKnowledge" class="selected-knowledge">
+					请选择左侧知识点查看学习人员
+				</div>
+				<div style="flex: 1; overflow-y: auto;">
+					<table id="studentTable">
+						<thead>
+						<tr>
+							<th>专业</th>
+							<th>班级</th>
+							<th>学号</th>
+							<th>姓名</th>
+						</tr>
+						</thead>
+						<tbody id="studentList">
+						<tr><td colspan="4" class="no-data">暂无数据</td></tr>
+						</tbody>
+					</table>
+				</div>
+
+				<!-- 分页控件 -->
+				<div class="pagination-container">
+					<div class="pagination" id="pagination">
+						<!-- 分页按钮将通过JavaScript动态生成 -->
+					</div>
+					<div class="pagination-info" id="paginationInfo">
+						<!-- 分页信息将通过JavaScript动态生成 -->
+					</div>
+				</div>
+			</div>
+		</div>
+	</div>
+</template>
+<script setup>
+
+// 示例数据
+import {ref,reactive, onMounted,nextTick} from "vue";
+import * as echarts from 'echarts'
+import {selectKnowledgeByCourseId } from '@/api/course/courseDetail.js'
+const myChart = ref(null)
+import { useRouter, useRoute } from 'vue-router'
+
+const router = useRouter()
+const route = useRoute()
+
+let myChartInstance = null
+// 每页显示的项目数量
+const ITEMS_PER_PAGE = 10;
+
+// 当前分页信息
+let currentPage = 1;
+let totalPages = 1;
+let currentDataIndex = 0;
+
+
+// 示例数据
+const knowledgeData = {
+	labels: ["电传操纵系统", "飞行控制律", "传感器技术", "故障诊断", "人机交互"],
+	datasets: [{
+		label: '学习人数',
+		data: [32, 25, 41, 18, 29],
+		backgroundColor: [
+			'rgba(255, 99, 132, 0.8)',
+			'rgba(54, 162, 235, 0.8)',
+			'rgba(255, 206, 86, 0.8)',
+			'rgba(75, 192, 192, 0.8)',
+			'rgba(153, 102, 255, 0.8)'
+		],
+		borderColor: [
+			'rgba(255, 99, 132, 1)',
+			'rgba(54, 162, 235, 1)',
+			'rgba(255, 206, 86, 1)',
+			'rgba(75, 192, 192, 1)',
+			'rgba(153, 102, 255, 1)'
+		],
+		borderWidth: 2,
+		borderRadius: 8,
+		borderSkipped: false
+	}]
+};
+
+// 学员数据
+const studentData = [
+	// 电传操纵系统
+	[
+		{ major: "航空航天工程", class: "飞控1班", studentId: "2023001", name: "张三" },
+		{ major: "航空航天工程", class: "飞控1班", studentId: "2023002", name: "李四" },
+		{ major: "航空航天工程", class: "飞控2班", studentId: "2023003", name: "王五" },
+		{ major: "航空航天工程", class: "飞控2班", studentId: "2023004", name: "赵六" },
+		{ major: "航空航天工程", class: "飞控3班", studentId: "2023005", name: "钱七" },
+		{ major: "航空航天工程", class: "飞控3班", studentId: "2023006", name: "孙八" },
+		{ major: "航空航天工程", class: "飞控1班", studentId: "2023007", name: "周九" },
+		{ major: "航空航天工程", class: "飞控1班", studentId: "2023008", name: "吴十" },
+		{ major: "航空航天工程", class: "飞控1班", studentId: "2023009", name: "郑一" },
+		{ major: "航空航天工程", class: "飞控2班", studentId: "2023010", name: "王二" },
+		{ major: "航空航天工程", class: "飞控2班", studentId: "2023011", name: "冯三" },
+		{ major: "航空航天工程", class: "飞控3班", studentId: "2023012", name: "陈四" },
+		{ major: "航空航天工程", class: "飞控3班", studentId: "2023013", name: "褚五" },
+		{ major: "航空航天工程", class: "飞控1班", studentId: "2023014", name: "卫六" },
+		{ major: "航空航天工程", class: "飞控1班", studentId: "2023015", name: "蒋七" },
+		{ major: "航空航天工程", class: "飞控2班", studentId: "2023016", name: "沈八" },
+		{ major: "航空航天工程", class: "飞控2班", studentId: "2023017", name: "韩九" },
+		{ major: "航空航天工程", class: "飞控3班", studentId: "2023018", name: "杨十" },
+		{ major: "航空航天工程", class: "飞控3班", studentId: "2023019", name: "朱一" },
+		{ major: "航空航天工程", class: "飞控1班", studentId: "2023020", name: "秦二" },
+		{ major: "航空航天工程", class: "飞控1班", studentId: "2023021", name: "尤三" },
+		{ major: "航空航天工程", class: "飞控2班", studentId: "2023022", name: "许四" },
+		{ major: "航空航天工程", class: "飞控2班", studentId: "2023023", name: "何五" },
+		{ major: "航空航天工程", class: "飞控3班", studentId: "2023024", name: "吕六" },
+		{ major: "航空航天工程", class: "飞控3班", studentId: "2023025", name: "施七" },
+		{ major: "航空航天工程", class: "飞控1班", studentId: "2023026", name: "张八" },
+		{ major: "航空航天工程", class: "飞控1班", studentId: "2023027", name: "孔九" },
+		{ major: "航空航天工程", class: "飞控2班", studentId: "2023028", name: "曹十" },
+		{ major: "航空航天工程", class: "飞控2班", studentId: "2023029", name: "严一" },
+		{ major: "航空航天工程", class: "飞控3班", studentId: "2023030", name: "华二" },
+		{ major: "航空航天工程", class: "飞控3班", studentId: "2023031", name: "金三" },
+		{ major: "航空航天工程", class: "飞控1班", studentId: "2023032", name: "魏四" }
+	],
+	// 飞行控制律
+	[
+		{ major: "航空航天工程", class: "飞控1班", studentId: "2023033", name: "郑一" },
+		{ major: "航空航天工程", class: "飞控2班", studentId: "2023034", name: "王二" },
+		{ major: "航空航天工程", class: "飞控2班", studentId: "2023035", name: "冯三" },
+		{ major: "航空航天工程", class: "飞控3班", studentId: "2023036", name: "陈四" },
+		{ major: "航空航天工程", class: "飞控3班", studentId: "2023037", name: "褚五" },
+		{ major: "航空航天工程", class: "飞控1班", studentId: "2023038", name: "卫六" },
+		{ major: "航空航天工程", class: "飞控1班", studentId: "2023039", name: "蒋七" },
+		{ major: "航空航天工程", class: "飞控2班", studentId: "2023040", name: "沈八" },
+		{ major: "航空航天工程", class: "飞控2班", studentId: "2023041", name: "韩九" },
+		{ major: "航空航天工程", class: "飞控3班", studentId: "2023042", name: "杨十" },
+		{ major: "航空航天工程", class: "飞控3班", studentId: "2023043", name: "朱一" },
+		{ major: "航空航天工程", class: "飞控1班", studentId: "2023044", name: "秦二" },
+		{ major: "航空航天工程", class: "飞控1班", studentId: "2023045", name: "尤三" },
+		{ major: "航空航天工程", class: "飞控2班", studentId: "2023046", name: "许四" },
+		{ major: "航空航天工程", class: "飞控2班", studentId: "2023047", name: "何五" },
+		{ major: "航空航天工程", class: "飞控3班", studentId: "2023048", name: "吕六" },
+		{ major: "航空航天工程", class: "飞控3班", studentId: "2023049", name: "施七" },
+		{ major: "航空航天工程", class: "飞控1班", studentId: "2023050", name: "张八" },
+		{ major: "航空航天工程", class: "飞控1班", studentId: "2023051", name: "孔九" },
+		{ major: "航空航天工程", class: "飞控2班", studentId: "2023052", name: "曹十" },
+		{ major: "航空航天工程", class: "飞控2班", studentId: "2023053", name: "严一" },
+		{ major: "航空航天工程", class: "飞控3班", studentId: "2023054", name: "华二" },
+		{ major: "航空航天工程", class: "飞控3班", studentId: "2023055", name: "金三" },
+		{ major: "航空航天工程", class: "飞控1班", studentId: "2023056", name: "魏四" }
+	],
+	// 传感器技术
+	[
+		{ major: "航空航天工程", class: "飞控1班", studentId: "2023057", name: "蒋七" },
+		{ major: "航空航天工程", class: "飞控2班", studentId: "2023058", name: "沈八" },
+		{ major: "航空航天工程", class: "飞控2班", studentId: "2023059", name: "韩九" },
+		{ major: "航空航天工程", class: "飞控3班", studentId: "2023060", name: "杨十" },
+		{ major: "航空航天工程", class: "飞控3班", studentId: "2023061", name: "朱一" },
+		{ major: "航空航天工程", class: "飞控1班", studentId: "2023062", name: "秦二" },
+		{ major: "航空航天工程", class: "飞控1班", studentId: "2023063", name: "尤三" },
+		{ major: "航空航天工程", class: "飞控2班", studentId: "2023064", name: "许四" },
+		{ major: "航空航天工程", class: "飞控2班", studentId: "2023065", name: "何五" },
+		{ major: "航空航天工程", class: "飞控3班", studentId: "2023066", name: "吕六" },
+		{ major: "航空航天工程", class: "飞控3班", studentId: "2023067", name: "施七" },
+		{ major: "航空航天工程", class: "飞控1班", studentId: "2023068", name: "张八" },
+		{ major: "航空航天工程", class: "飞控1班", studentId: "2023069", name: "孔九" },
+		{ major: "航空航天工程", class: "飞控2班", studentId: "2023070", name: "曹十" },
+		{ major: "航空航天工程", class: "飞控2班", studentId: "2023071", name: "严一" },
+		{ major: "航空航天工程", class: "飞控3班", studentId: "2023072", name: "华二" },
+		{ major: "航空航天工程", class: "飞控3班", studentId: "2023073", name: "金三" },
+		{ major: "航空航天工程", class: "飞控1班", studentId: "2023074", name: "魏四" },
+		{ major: "航空航天工程", class: "飞控1班", studentId: "2023075", name: "张三" },
+		{ major: "航空航天工程", class: "飞控2班", studentId: "2023076", name: "李四" },
+		{ major: "航空航天工程", class: "飞控2班", studentId: "2023077", name: "王五" },
+		{ major: "航空航天工程", class: "飞控3班", studentId: "2023078", name: "赵六" },
+		{ major: "航空航天工程", class: "飞控3班", studentId: "2023079", name: "钱七" },
+		{ major: "航空航天工程", class: "飞控1班", studentId: "2023080", name: "孙八" },
+		{ major: "航空航天工程", class: "飞控1班", studentId: "2023081", name: "周九" },
+		{ major: "航空航天工程", class: "飞控2班", studentId: "2023082", name: "吴十" },
+		{ major: "航空航天工程", class: "飞控2班", studentId: "2023083", name: "郑一" },
+		{ major: "航空航天工程", class: "飞控3班", studentId: "2023084", name: "王二" },
+		{ major: "航空航天工程", class: "飞控3班", studentId: "2023085", name: "冯三" }
+	],
+	// 故障诊断
+	[
+		{ major: "航空航天工程", class: "飞控2班", studentId: "2023086", name: "尤三" },
+		{ major: "航空航天工程", class: "飞控3班", studentId: "2023087", name: "许四" },
+		{ major: "航空航天工程", class: "飞控3班", studentId: "2023088", name: "何五" },
+		{ major: "航空航天工程", class: "飞控1班", studentId: "2023089", name: "吕六" },
+		{ major: "航空航天工程", class: "飞控1班", studentId: "2023090", name: "施七" },
+		{ major: "航空航天工程", class: "飞控2班", studentId: "2023091", name: "张八" },
+		{ major: "航空航天工程", class: "飞控2班", studentId: "2023092", name: "孔九" },
+		{ major: "航空航天工程", class: "飞控3班", studentId: "2023093", name: "曹十" },
+		{ major: "航空航天工程", class: "飞控3班", studentId: "2023094", name: "严一" },
+		{ major: "航空航天工程", class: "飞控1班", studentId: "2023095", name: "华二" },
+		{ major: "航空航天工程", class: "飞控1班", studentId: "2023096", name: "金三" },
+		{ major: "航空航天工程", class: "飞控2班", studentId: "2023097", name: "魏四" },
+		{ major: "航空航天工程", class: "飞控2班", studentId: "2023098", name: "张三" },
+		{ major: "航空航天工程", class: "飞控3班", studentId: "2023099", name: "李四" },
+		{ major: "航空航天工程", class: "飞控3班", studentId: "2023100", name: "王五" },
+		{ major: "航空航天工程", class: "飞控1班", studentId: "2023101", name: "赵六" },
+		{ major: "航空航天工程", class: "飞控1班", studentId: "2023102", name: "钱七" },
+		{ major: "航空航天工程", class: "飞控2班", studentId: "2023103", name: "孙八" }
+	],
+	// 人机交互
+	[
+		{ major: "航空航天工程", class: "飞控1班", studentId: "2023104", name: "施七" },
+		{ major: "航空航天工程", class: "飞控2班", studentId: "2023105", name: "张八" },
+		{ major: "航空航天工程", class: "飞控2班", studentId: "2023106", name: "孔九" },
+		{ major: "航空航天工程", class: "飞控3班", studentId: "2023107", name: "曹十" },
+		{ major: "航空航天工程", class: "飞控3班", studentId: "2023108", name: "严一" },
+		{ major: "航空航天工程", class: "飞控1班", studentId: "2023109", name: "华二" },
+		{ major: "航空航天工程", class: "飞控1班", studentId: "2023110", name: "金三" },
+		{ major: "航空航天工程", class: "飞控2班", studentId: "2023111", name: "魏四" },
+		{ major: "航空航天工程", class: "飞控2班", studentId: "2023112", name: "张三" },
+		{ major: "航空航天工程", class: "飞控3班", studentId: "2023113", name: "李四" },
+		{ major: "航空航天工程", class: "飞控3班", studentId: "2023114", name: "王五" },
+		{ major: "航空航天工程", class: "飞控1班", studentId: "2023115", name: "赵六" },
+		{ major: "航空航天工程", class: "飞控1班", studentId: "2023116", name: "钱七" },
+		{ major: "航空航天工程", class: "飞控2班", studentId: "2023117", name: "孙八" },
+		{ major: "航空航天工程", class: "飞控2班", studentId: "2023118", name: "周九" },
+		{ major: "航空航天工程", class: "飞控3班", studentId: "2023119", name: "吴十" },
+		{ major: "航空航天工程", class: "飞控3班", studentId: "2023120", name: "郑一" },
+		{ major: "航空航天工程", class: "飞控1班", studentId: "2023121", name: "王二" },
+		{ major: "航空航天工程", class: "飞控1班", studentId: "2023122", name: "冯三" },
+		{ major: "航空航天工程", class: "飞控2班", studentId: "2023123", name: "陈四" },
+		{ major: "航空航天工程", class: "飞控2班", studentId: "2023124", name: "褚五" },
+		{ major: "航空航天工程", class: "飞控3班", studentId: "2023125", name: "卫六" },
+		{ major: "航空航天工程", class: "飞控3班", studentId: "2023126", name: "蒋七" },
+		{ major: "航空航天工程", class: "飞控1班", studentId: "2023127", name: "沈八" },
+		{ major: "航空航天工程", class: "飞控1班", studentId: "2023128", name: "韩九" },
+		{ major: "航空航天工程", class: "飞控2班", studentId: "2023129", name: "杨十" },
+		{ major: "航空航天工程", class: "飞控2班", studentId: "2023130", name: "朱一" },
+		{ major: "航空航天工程", class: "飞控3班", studentId: "2023131", name: "秦二" },
+		{ major: "航空航天工程", class: "飞控3班", studentId: "2023132", name: "尤三" }
+	]
+];
+
+
+
+const initChart = () => {
+
+
+	myChartInstance = echarts.init(myChart.value);
+	let option = {
+		xAxis: {
+			type: 'category',
+			data: knowledgeData.labels
+		},
+		yAxis: {
+			type: 'value'
+		},
+		series: [
+			{
+				data: [
+				],
+				type: 'bar'
+			}
+		],
+			// onClick: (event, elements) => {
+			// 	if (elements.length > 0) {
+			// 		const index = elements[0].index;
+			// 		currentDataIndex = index;
+			// 		currentPage = 1; // 重置为第一页
+			// 		updateStudentList(index, 1);
+			//
+			// 		// 更新选中知识点显示
+			// 		document.getElementById('selectedKnowledge').innerHTML =
+			// 			`<strong>当前查看:</strong> ${knowledgeData.labels[index]}
+		    //                      <span style="color: #666; font-weight: normal;">(${knowledgeData.datasets[0].data[index]}人学习)</span>`;
+			// 	}
+			// },
+	};
+
+	option.series[0].data = []
+	let nums = [32, 25, 41, 18, 29]
+	let backgroundColors = [
+		'rgba(255, 99, 132, 0.8)',
+		'rgba(54, 162, 235, 0.8)',
+		'rgba(255, 206, 86, 0.8)',
+		'rgba(75, 192, 192, 0.8)',
+		'rgba(153, 102, 255, 0.8)']
+
+	let borderColors = [
+			'rgba(255, 99, 132, 1)',
+			'rgba(54, 162, 235, 1)',
+			'rgba(255, 206, 86, 1)',
+			'rgba(75, 192, 192, 1)',
+			'rgba(153, 102, 255, 1)'
+		]
+	for (let i = 0; i < nums.length; i++) {
+		option.series[0].data.push({
+			value: nums[i],
+			itemStyle: {
+				color: backgroundColors[i],
+				borderColor : borderColors[i],
+				barBorderRadius: 5,
+				borderWidth: 2,
+			},
+
+		})
+	}
+
+
+	myChartInstance.setOption(option);
+
+	myChartInstance.on('click', function (param) {
+		console.log('点击柱状图', param)
+
+		const index = param.dataIndex;
+		currentDataIndex = index;
+		currentPage = 1; // 重置为第一页
+		updateStudentList(index, 1);
+
+		// 更新选中知识点显示
+		document.getElementById('selectedKnowledge').innerHTML =
+			`<strong>当前查看:</strong> ${knowledgeData.labels[index]}
+		                         <span style="color: #666; font-weight: normal;">(${knowledgeData.datasets[0].data[index]}人学习)</span>`;
+	});
+
+
+	window.addEventListener('resize', myChartInstance.resize);
+	console.log('都经过了吗',myChartInstance)
+};
+
+
+// 更新右侧列表(带分页)
+const updateStudentList = (index, page = 1) => {
+	const listContainer = document.getElementById('studentList');
+	const students = studentData[index];
+	const paginationContainer = document.getElementById('pagination');
+	const paginationInfo = document.getElementById('paginationInfo');
+
+	if (students && students.length > 0) {
+		// 计算分页
+		totalPages = Math.ceil(students.length / ITEMS_PER_PAGE);
+		currentPage = page;
+
+		// 计算当前页的数据
+		const startIndex = (page - 1) * ITEMS_PER_PAGE;
+		const endIndex = Math.min(startIndex + ITEMS_PER_PAGE, students.length);
+		const currentPageData = students.slice(startIndex, endIndex);
+
+		// 清空列表并添加当前页数据
+		listContainer.innerHTML = '';
+		currentPageData.forEach(student => {
+			const tr = document.createElement('tr');
+			tr.innerHTML = `
+                        <td>${student.major}</td>
+                        <td>${student.class}</td>
+                        <td>${student.studentId}</td>
+                        <td>${student.name}</td>
+                    `;
+			listContainer.appendChild(tr);
+		});
+
+		// 更新分页信息
+		paginationInfo.textContent = `共 ${students.length} 条记录,第 ${page} 页,共 ${totalPages} 页`;
+
+		// 生成分页按钮
+		generatePaginationButtons();
+	} else {
+		listContainer.innerHTML = '<tr><td colspan="4" class="no-data">暂无学习人员</td></tr>';
+		paginationContainer.innerHTML = '';
+		paginationInfo.textContent = '';
+	}
+}
+
+// 生成分页按钮
+const generatePaginationButtons = () => {
+	const paginationContainer = document.getElementById('pagination');
+	paginationContainer.innerHTML = '';
+
+	// 上一页按钮
+	const prevButton = document.createElement('button');
+	prevButton.innerHTML = '&laquo;';
+	prevButton.disabled = currentPage === 1;
+	prevButton.addEventListener('click', () => {
+		if (currentPage > 1) {
+			updateStudentList(currentDataIndex, currentPage - 1);
+		}
+	});
+	paginationContainer.appendChild(prevButton);
+
+	// 页码按钮(最多显示5个页码)
+	const maxVisiblePages = 5;
+	let startPage = Math.max(1, currentPage - Math.floor(maxVisiblePages / 2));
+	let endPage = Math.min(totalPages, startPage + maxVisiblePages - 1);
+
+	// 如果接近末尾,调整起始页
+	if (endPage - startPage + 1 < maxVisiblePages) {
+		startPage = Math.max(1, endPage - maxVisiblePages + 1);
+	}
+
+	for (let i = startPage; i <= endPage; i++) {
+		const pageButton = document.createElement('button');
+		pageButton.textContent = i;
+		pageButton.classList.toggle('active', i === currentPage);
+		pageButton.addEventListener('click', () => {
+			updateStudentList(currentDataIndex, i);
+		});
+		paginationContainer.appendChild(pageButton);
+	}
+
+	// 下一页按钮
+	const nextButton = document.createElement('button');
+	nextButton.innerHTML = '&raquo;';
+	nextButton.disabled = currentPage === totalPages;
+	nextButton.addEventListener('click', () => {
+		if (currentPage < totalPages) {
+			updateStudentList(currentDataIndex, currentPage + 1);
+		}
+	});
+	paginationContainer.appendChild(nextButton);
+}
+
+onMounted(()=>{
+	nextTick(() => {
+
+		selectKnowledgeByCourseId({ courseId  : route.query.id}).then((res)=>{
+			console.log('知识点统计数据返回',res)
+		})
+
+
+
+		initChart();
+			setTimeout(() => {
+		// 默认选择第一个知识点
+		const firstIndex = 0;
+		currentDataIndex = firstIndex;
+		currentPage = 1;
+		updateStudentList(firstIndex, 1);
+
+		// 更新选中知识点显示
+		document.getElementById('selectedKnowledge').innerHTML =
+			`<strong>当前查看:</strong> ${knowledgeData.labels[firstIndex]}
+                     <span style="color: #666; font-weight: normal;">(${knowledgeData.datasets[0].data[firstIndex]}人学习)</span>`;
+	}, 100);
+	});
+})
+// 页面加载完成后,默认显示第一个知识点的人员列表
+// window.addEventListener('load', function() {
+// 	// 等待Chart.js完全渲染完成
+// 	setTimeout(() => {
+// 		// 默认选择第一个知识点
+// 		const firstIndex = 0;
+// 		currentDataIndex = firstIndex;
+// 		currentPage = 1;
+// 		updateStudentList(firstIndex, 1);
+//
+// 		// 更新选中知识点显示
+// 		document.getElementById('selectedKnowledge').innerHTML =
+// 			`<strong>当前查看:</strong> ${knowledgeData.labels[firstIndex]}
+//                      <span style="color: #666; font-weight: normal;">(${knowledgeData.datasets[0].data[firstIndex]}人学习)</span>`;
+// 	}, 100);
+// });
+
+</script>
+<style >
+
+
+	.container {
+		max-width: 100%;
+		width: 89%;
+		margin: 0 auto;
+		background: white;
+		border-radius: 15px;
+		box-shadow: 0 20px 40px rgba(0,0,0,0.1);
+		overflow: hidden;
+	}
+
+	.container header {
+		background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
+		color: white;
+		padding: 20px;
+		text-align: center;
+	}
+
+	.container h1 {
+		font-size: 28px;
+		margin-bottom: 10px;
+	}
+
+	.subtitle {
+		font-size: 16px;
+		opacity: 0.9;
+	}
+
+	.content {
+		display: flex;
+		height: calc(100vh - 120px);
+	}
+
+	#chartContainer {
+		flex: 1;
+		padding: 30px;
+		border-right: 1px solid #eee;
+	}
+
+	 #listContainer {
+		flex: 1;
+		padding: 30px;
+		display: flex;
+		flex-direction: column;
+	}
+
+	.chart-title {
+		font-size: 20px;
+		color: #333;
+		margin-bottom: 20px;
+		text-align: center;
+	}
+
+	.container .list-title {
+		font-size: 20px;
+		color: #333;
+		margin-bottom: 20px;
+		text-align: center;
+	}
+
+	/* 修复柱形图容器,避免变形 */
+	.container .chart-wrapper {
+		position: relative;
+		width: 100%;
+		height: 400px;
+	}
+
+	.container canvas {
+		width: 100% !important;
+		height: 100% !important;
+		max-width: 100%;
+	}
+
+	.container table {
+		width: 100%;
+		border-collapse: collapse;
+		box-shadow: 0 5px 15px rgba(0,0,0,0.08);
+		border-radius: 10px;
+		overflow: hidden;
+	}
+
+	.container th {
+		background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
+		color: white;
+		text-align: left;
+		padding: 15px;
+		font-weight: 600;
+		font-size: 14px;
+		text-transform: uppercase;
+		letter-spacing: 0.5px;
+	}
+
+	.container td {
+		padding: 12px 15px;
+		border-bottom: 1px solid #eee;
+		color: #555;
+	}
+
+	.container tr:hover {
+		background-color: #f8f9ff;
+		transform: translateY(-1px);
+		transition: all 0.3s ease;
+	}
+
+	.container tbody tr:last-child td {
+		border-bottom: none;
+	}
+
+	.container .no-data {
+		text-align: center;
+		padding: 40px;
+		color: #999;
+		font-style: italic;
+	}
+
+	.container .chartjs-tooltip {
+		background: rgba(0, 0, 0, 0.8) !important;
+		border: none !important;
+		border-radius: 8px !important;
+		padding: 10px !important;
+		color: white !important;
+		font-size: 14px !important;
+	}
+
+	.container .selected-knowledge {
+		background: #f0f8ff;
+		padding: 15px;
+		border-radius: 10px;
+		margin-bottom: 20px;
+		text-align: center;
+		font-weight: 600;
+		color: #4facfe;
+		border: 2px dashed #4facfe;
+	}
+
+	/* 分页样式 */
+	.container .pagination {
+		display: flex;
+		justify-content: center;
+		margin-top: 20px;
+		gap: 5px;
+	}
+
+	.pagination button {
+		background: white;
+		border: 1px solid #ddd;
+		color: #333;
+		padding: 8px 12px;
+		cursor: pointer;
+		border-radius: 4px;
+		font-size: 14px;
+		transition: all 0.3s ease;
+	}
+
+	.pagination button:hover {
+		background: #f0f0f0;
+		border-color: #999;
+	}
+
+	.pagination button.active {
+		background: #4facfe;
+		color: white;
+		border-color: #4facfe;
+	}
+
+	.pagination button:disabled {
+		background: #f5f5f5;
+		color: #ccc;
+		cursor: not-allowed;
+	}
+
+	.pagination-info {
+		text-align: center;
+		margin-top: 10px;
+		color: #666;
+		font-size: 14px;
+	}
+
+	@media (max-width: 768px) {
+		.content {
+			flex-direction: column;
+		}
+
+		#chartContainer {
+			border-right: none;
+			border-bottom: 1px solid #eee;
+		}
+
+		#listContainer {
+			height: 400px;
+		}
+
+		.pagination button {
+			padding: 6px 10px;
+			font-size: 12px;
+		}
+	}
+</style>

+ 12 - 0
src/views/courseDetails/components/tab/statice.vue

@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<template>
+	<div style="display: flex; justify-content: center; align-items: center; ">
+		<iframe src="../../../../../public/html/knowledgePointAnalysis.html" style="width: 88%; height: 950px;"></iframe>
+	</div>
+</template>
+<script setup>
+
+
+</script>
+<style scoped>
+</style>

+ 4 - 0
src/views/courseDetails/index.vue

@@ -46,6 +46,7 @@
 		<!-- tab 导航 -->
 		<a-tabs v-model:activeKey="activeTab" class="course-tabs">
 			<a-tab-pane key="detail" tab="课程详情" />
+			<a-tab-pane key="statice" tab="学习统计" />
 <!--			<a-tab-pane key="homework" tab="批改作业" />-->
 <!--			<a-tab-pane key="test" tab="批改测试" />-->
 <!--			<a-tab-pane key="student" tab="学员详情" />-->
@@ -65,6 +66,7 @@
 		/>
 		<StudentDetails :courseInfoId="courseInfoId" v-if="activeTab === 'student'" />
 		<LearningStatistics v-if="activeTab === 'stat'" />
+		<KnowledgePointAnalysis v-if="activeTab === 'statice'" />
 
 		<!-- 编辑课程弹窗 -->
 		<a-modal v-model:visible="editVisible" title="新建工单" :footer="null" width="700px" @cancel="editVisible = false">
@@ -81,6 +83,8 @@
 	import { message, Modal } from 'ant-design-vue'
 	import AddClassHours from './components/AddClassHours.vue'
 	import LessonDetails from './components/tab/LessonDetails.vue'
+	import KnowledgePointAnalysis from './components/tab/knowledgePointAnalysis.vue'
+	import Statice from './components/tab/statice.vue'
 	// import StudentDetails from './components/tab/StudentDetails.vue'
 	import StudentDetails from '@/views/courseAdd/components/StudentDetails.vue'
 	import LearningStatistics from './components/tab/LearningStatistics.vue'

+ 5 - 5
src/views/courseManagement/components/QueryView.vue

@@ -1,11 +1,11 @@
 <template>
-	<div style="display: flex; justify-content: space-between; align-items: center">
-		<div>
+	<div style="display: flex; justify-content: space-between; ">
+		<div style="width: 80%;">
 			<a-form layout="inline" :model="formState">
-				<a-form-item label="" style="width: 30%">
+				<a-form-item label="" style="width: 20%">
 					<a-input v-model:value="formState.courseName" placeholder="请输入课程名称" allowClear />
 				</a-form-item>
-				<a-form-item label="" style="width: 30%">
+				<a-form-item label="" style="width: 20%">
 <!--					<a-cascader-->
 <!--						v-model:value="formState.loacl"-->
 <!--						:options="options"-->
@@ -22,7 +22,7 @@
 						allowClear
 					/>
 				</a-form-item>
-				<a-form-item label="" style="width: 30%">
+				<a-form-item label="" style="width: 20%">
 <!--					<a-input v-model:value="formState.type" placeholder="选择课程类型" allowClear />-->
 					<a-select
 						ref="select"

+ 6 - 0
src/views/myResources/coverUpload/index.vue

@@ -157,4 +157,10 @@
 </script>
 
 <style lang="less">
+.preview-area{
+	.ant-image-img{
+		width: 200px;
+		height: 120px;
+	}
+}
 </style>

+ 20 - 12
src/views/myResources/myResources.vue

@@ -11,9 +11,9 @@
 		<!-- 搜索和操作区域 -->
 		<a-row :gutter="12" style="margin-bottom: 16px">
 			<a-col :span="18">
-				<a-input v-model:value="formState.fileName" placeholder="请输入资源名称" style="width: 140px" />
+				<a-input v-model:value="formState.fileName" placeholder="请输入资源名称" style="width: 17%" />
 				<a-cascader
-					style="width: 150px; margin-left: 8px"
+					style="width: 17%; margin-left: 8px"
 					v-model:value="majorIdName"
 					:options="collegeMajorOptions"
 					:fieldNames="{ label: 'name', value: 'id', children: 'children' }"
@@ -29,7 +29,7 @@
 					placeholder="请选择专业"
 				/> -->
 				<a-cascader
-					style="width: 150px; margin-left: 8px"
+					style="width: 17%; margin-left: 8px"
 					v-model:value="resourceName"
 					:options="resourceTypeOptions"
 					:fieldNames="{ label: 'name', value: 'id', children: 'children' }"
@@ -46,7 +46,7 @@
 				/> -->
 				<a-select
 					v-model:value="formState.suffix"
-					style="width: 100px; margin-left: 8px"
+					style="width: 17%; margin-left: 8px"
 					:options="fileformatOptions"
 					:fieldNames="{ label: 'fileExtendName', value: 'fileExtendName', children: 'children' }"
 					placeholder="请选择资源格式"
@@ -55,7 +55,7 @@
 					v-if="['0,3', '0', '3'].includes(formState.verifyStatus)"
 					v-model:value="isVerifyStatus"
 					placeholder="请选择资源状态"
-					style="width: 150px; margin-left: 8px"
+					style="width: 17%; margin-left: 8px"
 				>
 					<a-select-option value="0">未发布</a-select-option>
 					<a-select-option value="3">未通过</a-select-option>
@@ -66,8 +66,7 @@
 					:options="suffixTypeOptions"
 					placeholder="请选择课件格式"
 				/> -->
-				<a-button type="primary" style="margin-left: 8px" @click="handleSearch">查询</a-button>
-				<a-button style="margin-left: 8px" @click="handleReset">重置</a-button>
+
 			</a-col>
 			<a-col :span="6" style="text-align: right">
 				<a-button
@@ -82,7 +81,10 @@
 				<a-button type="primary" v-if="!pageType" @click="showUploadModal">+ 上传资源</a-button>
 			</a-col>
 		</a-row>
-
+		<div>
+			<a-button type="primary" style="margin-left: 0px" @click="handleSearch">查询</a-button>
+			<a-button style="margin-left: 8px" @click="handleReset">重置</a-button>
+		</div>
 		<!-- 表格 -->
 		<a-table
 			:columns="columnsPending"
@@ -253,7 +255,7 @@
 		<!-- 发布模态框 -->
 		<releaseModal v-if="releaseVisible" @close="releaseVisible = false" @confirm="releaseConfirm"></releaseModal>
 		<div style="height: 20px"></div>
-		<span>容量</span><span style="color: #6abe39"> {{bToMb(storageMin)}}MB</span><span>/</span><span style="color: red">{{bToMb(storageMax)}}MB</span>
+		<span>容量</span><span style="color: #6abe39"> {{bToGb(storageMin)}} GB</span><span> / </span><span style="color: red">{{bToGb(storageMax)}} GB</span>
 	</a-card>
 
 </template>
@@ -554,11 +556,17 @@
 			})
 	}
 
-	const bToMb = (kb) =>{
-		if (typeof kb !== 'number' || kb < 0) {
+	const bToMb = (b) =>{
+		if (typeof b !== 'number' || b < 0) {
+			throw new Error('请输入有效的非负数字');
+		}
+		return (b / (1024*1024)).toFixed(2); // 保留两位小数
+	}
+	const bToGb = (b) =>{
+		if (typeof b !== 'number' || b < 0) {
 			throw new Error('请输入有效的非负数字');
 		}
-		return (kb / (1024*1024)).toFixed(2); // 保留两位小数
+		return (b / (1024 * 1024 * 1024)).toFixed(2); // 保留两位小数
 	}
 
 

+ 11 - 3
src/views/portal/components/Header.vue

@@ -6,9 +6,17 @@
 		<div style="display: flex; width: 100vw; justify-content: space-between; align-items: center; position: relative">
 			<div style="display: flex; padding-left: 10%; ">
 				<a-menu v-model:selectedKeys="current"  mode="horizontal" theme="light"  >
-					<a-menu-item style="margin-left: 1px; margin-right: 1px" key="">资源中心</a-menu-item>
-					<a-menu-item style="margin-left: 1px; margin-right: 1px" key="portal/personalResources">个人资源</a-menu-item>
-					<a-sub-menu  key="">
+					<a-sub-menu  key="res">
+						<template #title>
+							<!-- 使用 Ant Design Vue 的图标 -->
+							<span>资源相关</span>
+						</template>
+						<a-menu-item style="margin-left: 1px; margin-right: 1px" key="">资源中心</a-menu-item>
+						<a-menu-item style="margin-left: 1px; margin-right: 1px" key="portal/personalResources">个人资源</a-menu-item>
+						<a-menu-item style="margin-left: 1px; margin-right: 1px" key="resourceStatistics">资源统计</a-menu-item>
+					</a-sub-menu>
+
+					<a-sub-menu  key="course">
 						<template #title>
 							<!-- 使用 Ant Design Vue 的图标 -->
 							<span>课程相关</span>

+ 860 - 0
src/views/resourceStatistics/index.vue

@@ -0,0 +1,860 @@
+<!DOCTYPE html>
+<template>
+		<div style="display: flex; justify-content: center; align-items: center; ">
+			<iframe src="../../../public/html/resourceStatistics.html" style="width: 100%; height: 100vh"></iframe>
+		</div>
+<!--	<div class="container">-->
+<!--		<h1>资源库统计分析</h1>-->
+
+<!--		&lt;!&ndash; 摘要信息 &ndash;&gt;-->
+<!--		<div class="row">-->
+<!--			<div class="col summary-box">-->
+<!--				<h3>总资源数</h3>-->
+<!--				<p id="total-resources">1,247</p>-->
+<!--			</div>-->
+<!--			<div class="col summary-box">-->
+<!--				<h3>总存储空间</h3>-->
+<!--				<p id="total-storage">4.2 TB</p>-->
+<!--			</div>-->
+<!--			<div class="col summary-box">-->
+<!--				<h3>总观看人数</h3>-->
+<!--				<p id="total-views">89,532</p>-->
+<!--			</div>-->
+<!--			<div class="col summary-box">-->
+<!--				<h3>总收藏人数</h3>-->
+<!--				<p id="total-favorites">15,678</p>-->
+<!--			</div>-->
+<!--		</div>-->
+
+<!--		&lt;!&ndash; 存储空间信息 &ndash;&gt;-->
+<!--		<div class="storage-info">-->
+<!--			<h3>资源库存储空间使用情况</h3>-->
+<!--			<p>当前资源库总容量:10 TB | 已使用:4.2 TB | 使用率:42%</p>-->
+<!--		</div>-->
+
+<!--		&lt;!&ndash; 筛选器 &ndash;&gt;-->
+<!--		<div class="filters">-->
+<!--			<label for="department-filter">筛选院系:</label>-->
+<!--			<select id="department-filter">-->
+<!--				<option value="all">全部院系</option>-->
+<!--				<option value="aviation">航空学院</option>-->
+<!--				<option value="military">军事管理系</option>-->
+<!--				<option value="politics">政治工作部</option>-->
+<!--				<option value="maintenance">地面维修中心</option>-->
+<!--				<option value="other">其他部门</option>-->
+<!--			</select>-->
+
+<!--			<label for="time-filter">时间范围:</label>-->
+<!--			<select id="time-filter">-->
+<!--				<option value="all">全部时间</option>-->
+<!--				<option value="30">最近30天</option>-->
+<!--				<option value="90">最近90天</option>-->
+<!--				<option value="180">最近180天</option>-->
+<!--				<option value="365">最近1年</option>-->
+<!--			</select>-->
+<!--		</div>-->
+
+<!--		&lt;!&ndash; 资源类型分布 &ndash;&gt;-->
+<!--		<div class="chart-container">-->
+<!--			<h2>资源类型分布</h2>-->
+<!--			<div class="row">-->
+<!--				<div class="col">-->
+<!--					<div ref="typeChart" style="width: 100%; height: 500px;"></div>-->
+<!--				</div>-->
+<!--				<div class="col">-->
+<!--					<div ref="departmentChart" style="width: 100%; height: 500px;"></div>-->
+<!--				</div>-->
+<!--			</div>-->
+<!--		</div>-->
+
+<!--		&lt;!&ndash; 资源可见性与热度 &ndash;&gt;-->
+<!--		<div class="chart-container">-->
+<!--			<h2>资源可见性与热度</h2>-->
+<!--			<div class="row">-->
+<!--				<div class="col">-->
+<!--					<div ref="visibilityChart" style="width: 100%; height: 500px;"></div>-->
+<!--				</div>-->
+<!--				<div class="col">-->
+<!--					<div ref="hotnessChart" style="width: 100%; height: 500px;"></div>-->
+<!--				</div>-->
+<!--			</div>-->
+<!--		</div>-->
+
+<!--		&lt;!&ndash; 文件格式分布 &ndash;&gt;-->
+<!--		<div class="chart-container">-->
+<!--			<h2>文件格式分布</h2>-->
+<!--			<div class="row">-->
+<!--				<div class="col">-->
+<!--					<canvas id="formatChart"></canvas>-->
+<!--				</div>-->
+<!--				<div class="col">-->
+<!--					<canvas id="storageChart"></canvas>-->
+<!--				</div>-->
+<!--			</div>-->
+<!--		</div>-->
+
+<!--		&lt;!&ndash; 资源使用情况分析 &ndash;&gt;-->
+<!--		<div class="chart-container">-->
+<!--			<h2>资源使用情况分析</h2>-->
+<!--			<div class="row">-->
+<!--				<div class="col">-->
+<!--					<canvas id="viewsChart"></canvas>-->
+<!--				</div>-->
+<!--				<div class="col">-->
+<!--					<canvas id="engagementChart"></canvas>-->
+<!--				</div>-->
+<!--			</div>-->
+<!--		</div>-->
+
+<!--		&lt;!&ndash; 时间趋势分析 &ndash;&gt;-->
+<!--		<div class="chart-container">-->
+<!--			<h2>上传与访问时间趋势</h2>-->
+<!--			<canvas id="trendChart"></canvas>-->
+<!--		</div>-->
+
+<!--		<footer>-->
+<!--			<p>数据更新时间: 2025年8月18日 | 资源库统计分析系统</p>-->
+<!--		</footer>-->
+<!--	</div>-->
+
+
+</template>
+<script setup>
+// 模拟数据 - 包含文件数量和存储空间数据
+import * as echarts from "echarts";
+
+const typeChart = ref(null)
+let typeChartInstance = null
+
+const departmentChart = ref(null)
+let departmentChartInstance = null
+
+const visibilityChart = ref(null)
+let visibilityChartInstance = null
+
+const hotnessChart = ref(null)
+let hotnessChartInstance = null
+
+
+// const visibilityChart = ref(null)
+// let visibilityChartInstance = null
+//
+
+
+const mockData = {
+	// 资源类型数据
+	types: ['航空教学', '部队管理', '政治工作', '地面维修', '其他'],
+	typeCounts: [345, 278, 192, 231, 201],
+	typeStorage: [1.2, 0.8, 0.6, 0.9, 0.7], // TB
+
+	// 院系数据
+	departments: ['航空学院', '军事管理系', '政治工作部', '地面维修中心', '其他部门'],
+	departmentCounts: [412, 289, 176, 223, 147],
+	departmentStorage: [1.5, 0.9, 0.5, 0.8, 0.5], // TB
+
+	// 可见性数据
+	visibility: ['公开', '非公开'],
+	visibilityCounts: [987, 260],
+
+	// 热度数据
+	hotness: ['热门', '非热门'],
+	hotnessCounts: [312, 935],
+	recommended: ['已推荐', '未推荐'],
+	recommendedCounts: [187, 1060],
+
+	// 文件格式数据 - 包含文件数量和平均文件大小
+	formats: ['mp4', 'pdf', 'docx', 'pptx', 'xlsx', 'jpg', 'avi', 'wmv', 'mkv', 'other'],
+	formatCounts: [320, 312, 135, 189, 98, 167, 56, 67, 41, 163],
+	formatStorage: [2.1, 0.3, 0.15, 0.25, 0.1, 0.08, 0.4, 0.3, 0.2, 0.12], // TB
+	formatAvgSize: ['6.6GB', '960MB', '1.1MB', '1.3MB', '1.0MB', '500KB', '7.1GB', '4.5GB', '4.9GB', '750KB'],
+
+	// 用户参与度数据
+	engagement: ['观看', '收藏', '分享'],
+	engagementCounts: [89532, 15678, 7892],
+
+	// 时间趋势数据
+	trendLabels: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月'],
+	uploadTrend: [120, 95, 140, 110, 135, 150, 130, 80],
+	viewTrend: [8500, 7200, 9800, 9200, 10500, 11200, 10800, 12300]
+};
+
+
+//
+// // 可见性分析
+// new Chart(document.getElementById('visibilityChart'), {
+// 	type: 'bar',
+// 	data: {
+// 		labels: mockData.visibility,
+// 		datasets: [{
+// 			label: '资源数量',
+// 			data: mockData.visibilityCounts,
+// 			backgroundColor: [
+// 				'rgba(46, 204, 113, 0.8)',
+// 				'rgba(231, 76, 60, 0.8)'
+// 			],
+// 			borderColor: [
+// 				'#2ecc71', '#e74c3c'
+// 			],
+// 			borderWidth: 1
+// 		}]
+// 	},
+// 	options: {
+// 		responsive: true,
+// 		scales: {
+// 			y: {
+// 				beginAtZero: true,
+// 				title: {
+// 					display: true,
+// 					text: '资源数量'
+// 				}
+// 			}
+// 		},
+// 		plugins: {
+// 			title: {
+// 				display: true,
+// 				text: '资源公开情况'
+// 			}
+// 		}
+// 	}
+// });
+//
+
+// // 文件数量分布 - 水平条形图
+// new Chart(document.getElementById('formatChart'), {
+// 	type: 'bar',
+// 	data: {
+// 		labels: mockData.formats,
+// 		datasets: [{
+// 			label: '文件数量',
+// 			data: mockData.formatCounts,
+// 			backgroundColor: 'rgba(52, 73, 94, 0.7)',
+// 			borderColor: 'rgba(52, 73, 94, 1)',
+// 			borderWidth: 1
+// 		}]
+// 	},
+// 	options: {
+// 		indexAxis: 'y',
+// 		responsive: true,
+// 		scales: {
+// 			x: {
+// 				beginAtZero: true,
+// 				title: {
+// 					display: true,
+// 					text: '文件数量'
+// 				}
+// 			}
+// 		},
+// 		plugins: {
+// 			title: {
+// 				display: true,
+// 				text: '不同文件格式的数量分布'
+// 			}
+// 		}
+// 	}
+// });
+//
+// // 存储空间占用分布 - 饼图
+// new Chart(document.getElementById('storageChart'), {
+// 	type: 'pie',
+// 	data: {
+// 		labels: mockData.formats,
+// 		datasets: [{
+// 			label: '存储空间 (TB)',
+// 			data: mockData.formatStorage,
+// 			backgroundColor: [
+// 				'#e74c3c', '#3498db', '#2ecc71', '#f39c12',
+// 				'#9b59b6', '#1abc9c', '#34495e', '#d35400',
+// 				'#8e44ad', '#7f8c8d'
+// 			],
+// 			borderWidth: 2
+// 		}]
+// 	},
+// 	options: {
+// 		responsive: true,
+// 		plugins: {
+// 			title: {
+// 				display: true,
+// 				text: '不同文件格式的存储空间占用'
+// 			},
+// 			tooltip: {
+// 				callbacks: {
+// 					label: function(context) {
+// 						const label = context.label || '';
+// 						const value = context.parsed;
+// 						const count = mockData.formatCounts[context.dataIndex];
+// 						const avgSize = mockData.formatAvgSize[context.dataIndex];
+// 						return [
+// 							`${label}: ${value} TB`,
+// 							`文件数量: ${count}`,
+// 							`平均大小: ${avgSize}`
+// 						];
+// 					}
+// 				}
+// 			}
+// 		}
+// 	}
+// });
+//
+// // 观看情况分析
+// new Chart(document.getElementById('viewsChart'), {
+// 	type: 'bar',
+// 	data: {
+// 		labels: mockData.types,
+// 		datasets: [{
+// 			label: '平均观看人数',
+// 			data: [1250, 890, 620, 980, 450],
+// 			backgroundColor: 'rgba(41, 128, 185, 0.7)',
+// 			borderColor: 'rgba(41, 128, 185, 1)',
+// 			borderWidth: 1
+// 		}]
+// 	},
+// 	options: {
+// 		responsive: true,
+// 		scales: {
+// 			y: {
+// 				beginAtZero: true,
+// 				title: {
+// 					display: true,
+// 					text: '平均观看人数'
+// 				}
+// 			}
+// 		},
+// 		plugins: {
+// 			title: {
+// 				display: true,
+// 				text: '各类资源平均观看人数'
+// 			}
+// 		}
+// 	}
+// });
+//
+// // 用户参与度分析
+// new Chart(document.getElementById('engagementChart'), {
+// 	type: 'bar',
+// 	data: {
+// 		labels: ['观看人数', '收藏人数', '分享次数'],
+// 		datasets: [{
+// 			label: '用户参与度',
+// 			data: mockData.engagementCounts,
+// 			backgroundColor: 'rgba(155, 89, 182, 0.7)',
+// 			borderColor: 'rgba(155, 89, 182, 1)',
+// 			borderWidth: 1
+// 		}]
+// 	},
+// 	options: {
+// 		responsive: true,
+// 		scales: {
+// 			y: {
+// 				beginAtZero: true,
+// 				title: {
+// 					display: true,
+// 					text: '数量'
+// 				}
+// 			}
+// 		},
+// 		plugins: {
+// 			title: {
+// 				display: true,
+// 				text: '资源使用情况统计'
+// 			}
+// 		}
+// 	}
+// });
+//
+// // 时间趋势分析
+// new Chart(document.getElementById('trendChart'), {
+// 	type: 'line',
+// 	data: {
+// 		labels: mockData.trendLabels,
+// 		datasets: [
+// 			{
+// 				label: '资源上传数量',
+// 				data: mockData.uploadTrend,
+// 				borderColor: '#3498db',
+// 				backgroundColor: 'rgba(52, 152, 219, 0.1)',
+// 				fill: true,
+// 				tension: 0.4
+// 			},
+// 			{
+// 				label: '资源观看人数',
+// 				data: mockData.viewTrend,
+// 				borderColor: '#e74c3c',
+// 				backgroundColor: 'rgba(231, 76, 60, 0.1)',
+// 				fill: true,
+// 				tension: 0.4
+// 			}
+// 		]
+// 	},
+// 	options: {
+// 		responsive: true,
+// 		interaction: {
+// 			mode: 'index',
+// 			intersect: false
+// 		},
+// 		scales: {
+// 			y: {
+// 				beginAtZero: true,
+// 				title: {
+// 					display: true,
+// 					text: '数量'
+// 				}
+// 			}
+// 		},
+// 		plugins: {
+// 			title: {
+// 				display: true,
+// 				text: '资源上传与访问趋势 (2025年)'
+// 			}
+// 		}
+// 	}
+// });
+
+const initHotnessChart = () => {
+	hotnessChartInstance = echarts.init(hotnessChart.value);
+
+
+	let option = {
+		title: {
+			text: '资源热度分析',
+			left: 'center'
+		},
+		xAxis: {
+			type: 'category',
+			data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
+		},
+		yAxis: {
+			type: 'value'
+		},
+		series: [
+			{
+				data: [120, 200, 150, 80, 70, 110, 130],
+				type: 'bar'
+			}
+		]
+	};
+	option.series[0].data = []
+	option.xAxis.data = []
+	let backgroundColors = [
+		'rgba(255, 99, 132, 0.8)',
+		'rgba(54, 162, 235, 0.8)',
+		'rgba(255, 206, 86, 0.8)',
+		'rgba(75, 192, 192, 0.8)',
+		'rgba(153, 102, 255, 0.8)']
+
+
+
+	for (let i = 0; i < mockData.visibility.length; i++) {
+		option.series[0].data.push({
+			value: mockData.visibilityCounts[i],
+			name : mockData.visibility[i],
+			itemStyle: {
+				color: backgroundColors[i],
+			},
+		})
+
+		option.xAxis.data.push(mockData.visibility[i])
+	}
+
+
+	hotnessChartInstance.setOption(option);
+
+// // 热度分析
+// new Chart(document.getElementById('hotnessChart'), {
+// 	type: 'polarArea',
+// 	data: {
+// 		labels: ['热门资源', '推荐资源', '热门且推荐'],
+// 		datasets: [{
+// 			label: '资源数量',
+// 			data: [312, 187, 89],
+// 			backgroundColor: [
+// 				'rgba(231, 76, 60, 0.7)',
+// 				'rgba(52, 152, 219, 0.7)',
+// 				'rgba(155, 89, 182, 0.7)'
+// 			],
+// 			borderColor: [
+// 				'rgba(231, 76, 60, 1)',
+// 				'rgba(52, 152, 219, 1)',
+// 				'rgba(155, 89, 182, 1)'
+// 			],
+// 			borderWidth: 1
+// 		}]
+// 	},
+// 	options: {
+// 		responsive: true,
+// 		plugins: {
+// 			title: {
+// 				display: true,
+// 				text: '资源热度分析'
+// 			}
+// 		}
+// 	}
+// });
+//
+}
+
+
+
+
+const initTypeChart = () => {
+	typeChartInstance = echarts.init(typeChart.value);
+	let option = {
+		title: {
+			text: '按资源类型分类 (数量)',
+			left: 'center'
+		},
+		tooltip: {
+			trigger: 'item'
+		},
+		legend: {
+			bottom: 10,
+		},
+		series: [
+			{
+				type: 'pie',
+				radius: '50%',
+				data: [
+					{value: 1048, name: 'Search Engine'},
+					{value: 735, name: 'Direct'},
+					{value: 580, name: 'Email'},
+					{value: 484, name: 'Union Ads'},
+					{value: 300, name: 'Video Ads'}
+				],
+				emphasis: {
+					itemStyle: {
+						shadowBlur: 10,
+						shadowOffsetX: 0,
+						shadowColor: 'rgba(0, 0, 0, 0.5)'
+					}
+				}
+			}
+		]
+	};
+	option.series[0].data = []
+	for (let i = 0; i < mockData.types.length; i++) {
+		option.series[0].data.push({
+			value: mockData.typeCounts[i],
+			name: mockData.types[i]
+
+		})
+	}
+
+
+	typeChartInstance.setOption(option);
+
+
+// 资源类型分布图
+// 	new Chart(document.getElementById('typeChart'), {
+// 		type: 'pie',
+// 		data: {
+// 			labels: mockData.types,
+// 			datasets: [{
+// 				data: mockData.typeCounts,
+// 				backgroundColor: [
+// 					'#3498db', '#e74c3c', '#2ecc71', '#f39c12', '#9b59b6'
+// 				],
+// 				borderWidth: 2
+// 			}]
+// 		},
+// 		options: {
+// 			responsive: true,
+// 			plugins: {
+// 				title: {
+// 					display: true,
+// 					text: '按资源类型分类 (数量)'
+// 				},
+// 				legend: {
+// 					position: 'bottom'
+// 				}
+// 			}
+// 		}
+// 	});
+}
+const initDepartmentChart = () => {
+	departmentChartInstance = echarts.init(departmentChart.value);
+	let option = {
+		title: {
+			text: '按院系分布 (数量)',
+			top: 'center'
+		},
+		tooltip: {
+			trigger: 'item'
+		},
+		legend: {
+			bottom: 10,
+		},
+		series: [
+			{
+				type: 'pie',
+				data: [
+					{value: 1048, name: 'Search Engine'},
+					{value: 735, name: 'Direct'},
+					{value: 580, name: 'Email'},
+					{value: 484, name: 'Union Ads'},
+					{value: 300, name: 'Video Ads'}
+				],
+				emphasis: {
+					itemStyle: {
+						shadowBlur: 10,
+						shadowOffsetX: 0,
+						shadowColor: 'rgba(0, 0, 0, 0.5)'
+					}
+				}
+			}
+		]
+	};
+	option.series[0].data = []
+	let backgroundColors = [
+		'rgba(255, 99, 132, 0.8)',
+		'rgba(54, 162, 235, 0.8)',
+		'rgba(255, 206, 86, 0.8)',
+		'rgba(75, 192, 192, 0.8)',
+		'rgba(153, 102, 255, 0.8)']
+	for (let i = 0; i < mockData.departments.length; i++) {
+		option.series[0].data.push({
+			value: mockData.departmentCounts[i],
+			name: mockData.departments[i],
+			itemStyle: {
+				color: backgroundColors[i],
+			},
+		})
+	}
+
+
+
+	departmentChartInstance.setOption(option);
+
+
+// // 院系分布图
+// new Chart(document.getElementById('departmentChart'), {
+// 	type: 'doughnut',
+// 	data: {
+// 		labels: mockData.departments,
+// 		datasets: [{
+// 			data: mockData.departmentCounts,
+// 			backgroundColor: [
+// 				'#1abc9c', '#3498db', '#8e44ad', '#e67e22', '#e74c3c'
+// 			],
+// 			borderWidth: 2
+// 		}]
+// 	},
+// 	options: {
+// 		responsive: true,
+// 		plugins: {
+// 			title: {
+// 				display: true,
+// 				text: '按院系分布 (数量)'
+// 			},
+// 			legend: {
+// 				position: 'bottom'
+// 			}
+// 		}
+// 	}
+// });
+}
+
+
+const initVisibilityChart = () => {
+	visibilityChartInstance = echarts.init(visibilityChart.value);
+
+
+	let option = {
+		title: {
+			text: '资源公开情况',
+			left: 'center'
+		},
+		xAxis: {
+			type: 'category',
+			data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
+		},
+		yAxis: {
+			type: 'value'
+		},
+		series: [
+			{
+				data: [120, 200, 150, 80, 70, 110, 130],
+				type: 'bar'
+			}
+		]
+	};
+	option.series[0].data = []
+	option.xAxis.data = []
+	let backgroundColors = [
+		'rgba(255, 99, 132, 0.8)',
+		'rgba(54, 162, 235, 0.8)',
+		'rgba(255, 206, 86, 0.8)',
+		'rgba(75, 192, 192, 0.8)',
+		'rgba(153, 102, 255, 0.8)']
+
+
+
+	for (let i = 0; i < mockData.visibility.length; i++) {
+		option.series[0].data.push({
+			value: mockData.visibilityCounts[i],
+			name : mockData.visibility[i],
+			itemStyle: {
+				color: backgroundColors[i],
+			},
+		})
+
+		option.xAxis.data.push(mockData.visibility[i])
+	}
+
+
+	visibilityChartInstance.setOption(option);
+
+
+// // 院系分布图
+// new Chart(document.getElementById('departmentChart'), {
+// 	type: 'doughnut',
+// 	data: {
+// 		labels: mockData.departments,
+// 		datasets: [{
+// 			data: mockData.departmentCounts,
+// 			backgroundColor: [
+// 				'#1abc9c', '#3498db', '#8e44ad', '#e67e22', '#e74c3c'
+// 			],
+// 			borderWidth: 2
+// 		}]
+// 	},
+// 	options: {
+// 		responsive: true,
+// 		plugins: {
+// 			title: {
+// 				display: true,
+// 				text: '按院系分布 (数量)'
+// 			},
+// 			legend: {
+// 				position: 'bottom'
+// 			}
+// 		}
+// 	}
+// });
+}
+
+
+
+//
+// // 筛选器交互功能
+// document.getElementById('department-filter').addEventListener('change', function() {
+// 	console.log('筛选院系:', this.value);
+// });
+//
+// document.getElementById('time-filter').addEventListener('change', function() {
+// 	console.log('时间范围:', this.value);
+// });
+onMounted(() => {
+	nextTick(() => {
+		// initTypeChart()
+		// initDepartmentChart()
+		// initVisibilityChart()
+		// initHotnessChart()
+	})
+})
+</script>
+<style scoped>
+body {
+	font-family: 'Arial', sans-serif;
+	margin: 0;
+	padding: 20px;
+	background-color: #f5f5f5;
+	color: #333;
+}
+
+.container {
+	max-width: 1200px;
+	margin: 0 auto;
+	background-color: white;
+	padding: 30px;
+	border-radius: 10px;
+	box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
+}
+
+h1, h2, h3 {
+	color: #2c3e50;
+	border-bottom: 2px solid #3498db;
+	padding-bottom: 10px;
+	margin-bottom: 20px;
+}
+
+.chart-container {
+	margin-bottom: 40px;
+	padding: 20px;
+	background-color: #f9f9f9;
+	border-radius: 8px;
+	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
+}
+
+.row {
+	display: flex;
+	flex-wrap: wrap;
+	gap: 20px;
+	margin-bottom: 30px;
+}
+
+.col {
+	flex: 1;
+	min-width: 300px;
+}
+
+.summary-box {
+	background-color: #ecf0f1;
+	padding: 15px;
+	border-radius: 8px;
+	margin-bottom: 20px;
+	text-align: center;
+}
+
+.summary-box h3 {
+	margin: 0 0 10px 0;
+	color: #2c3e50;
+}
+
+.summary-box p {
+	margin: 0;
+	font-size: 24px;
+	font-weight: bold;
+	color: #3498db;
+}
+
+.filters {
+	margin-bottom: 20px;
+	padding: 15px;
+	background-color: #f1f8ff;
+	border-radius: 8px;
+}
+
+.filters label {
+	margin-right: 15px;
+	font-weight: bold;
+}
+
+.filters select {
+	padding: 5px;
+	border: 1px solid #ddd;
+	border-radius: 4px;
+}
+
+footer {
+	text-align: center;
+	margin-top: 40px;
+	color: #7f8c8d;
+	font-size: 14px;
+}
+
+.storage-info {
+	background-color: #e8f4fc;
+	padding: 15px;
+	border-radius: 8px;
+	margin-bottom: 20px;
+}
+
+.storage-info h3 {
+	margin: 0 0 10px 0;
+	color: #2980b9;
+}
+
+.storage-info p {
+	margin: 0;
+	font-size: 18px;
+}
+</style>

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
stats.html


Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio