index.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017
  1. <template>
  2. <div class="learning-behavior-analysis">
  3. <!-- 页面头部 -->
  4. <div class="header">
  5. <h1>📊 学习行为分析</h1>
  6. <p>全面分析学院教学情况和学员学习行为</p>
  7. </div>
  8. <!-- 导航标签 -->
  9. <div class="nav-tabs">
  10. <div class="nav-tab" :class="{ active: activeTab === 'college' }" @click="switchTab('college')">
  11. 🏫 学院维度分析
  12. </div>
  13. <div class="nav-tab" :class="{ active: activeTab === 'student' }" @click="switchTab('student')">
  14. 👤 学员维度分析
  15. </div>
  16. </div>
  17. <!-- 学院维度分析 -->
  18. <div v-show="activeTab === 'college'" class="tab-content">
  19. <!-- 筛选条件 -->
  20. <div class="filter-section">
  21. <h3>🔍 数据筛选</h3>
  22. <div class="filter-controls">
  23. <div class="filter-group">
  24. <label>选择学院</label>
  25. <a-select v-model:value="collegeFilters.collegeId" placeholder="全部学院" @change="updateCollegeData">
  26. <a-select-option v-for="college in collegeList" :key="college.id" :value="college.id">
  27. {{ college.name }}
  28. </a-select-option>
  29. </a-select>
  30. </div>
  31. <div class="filter-group">
  32. <label>时间范围</label>
  33. <a-select v-model:value="collegeFilters.timeRange" @change="updateCollegeData">
  34. <a-select-option :value="7">最近7天</a-select-option>
  35. <a-select-option :value="30">最近30天</a-select-option>
  36. <a-select-option :value="90">最近90天</a-select-option>
  37. <a-select-option :value="365">最近一年</a-select-option>
  38. </a-select>
  39. </div>
  40. <div class="filter-group">
  41. <a-button type="primary" @click="updateCollegeData">查询</a-button>
  42. </div>
  43. </div>
  44. </div>
  45. <!-- 学院整体统计 -->
  46. <div class="stats-grid">
  47. <div class="stat-card">
  48. <h3>📚 课程访问统计</h3>
  49. <div class="stat-number">{{ collegeStats.totalCourses }}</div>
  50. <div class="stat-label">总课程数</div>
  51. <div class="stat-number">{{ collegeStats.activeCourses }}</div>
  52. <div class="stat-label">活跃课程数</div>
  53. <div class="stat-number">{{ collegeStats.courseAccessRate }}%</div>
  54. <div class="stat-label">课程访问率</div>
  55. </div>
  56. <div class="stat-card">
  57. <h3>👥 用户登录统计</h3>
  58. <div class="stat-number">{{ collegeStats.totalLogins.toLocaleString() }}</div>
  59. <div class="stat-label">总登录人次</div>
  60. <div class="stat-number">{{ collegeStats.uniqueUsers.toLocaleString() }}</div>
  61. <div class="stat-label">独立用户数</div>
  62. <div class="stat-number">{{ collegeStats.avgLoginPerUser }}</div>
  63. <div class="stat-label">人均登录次数</div>
  64. </div>
  65. <div class="stat-card">
  66. <h3>⏰ 观看时长统计</h3>
  67. <div class="stat-number">{{ collegeStats.totalOnlineTime }}h</div>
  68. <div class="stat-label">总观看时长</div>
  69. <div class="stat-number">{{ collegeStats.avgSessionTime }}min</div>
  70. <div class="stat-label">平均时长</div>
  71. <div class="stat-number">{{ collegeStats.peakOnlineUsers }}</div>
  72. <div class="stat-label">峰值观看人数</div>
  73. </div>
  74. </div>
  75. <!-- 登录时段分析图表 -->
  76. <div class="chart-container">
  77. <h3>⏰ 用户登录时段分布</h3>
  78. <div ref="loginTimeChart" class="chart"></div>
  79. </div>
  80. <!-- 课程访问热度图表 -->
  81. <div class="chart-container">
  82. <h3>🔥 课程访问热度排行</h3>
  83. <div ref="courseHeatChart" class="chart"></div>
  84. </div>
  85. <!-- 学院课程详细统计 -->
  86. <div class="data-table">
  87. <h3>📊 学院课程详细统计</h3>
  88. <a-table
  89. :columns="collegeColumns"
  90. :data-source="collegeTableData"
  91. :pagination="{ pageSize: 10 }"
  92. row-key="id"
  93. />
  94. </div>
  95. </div>
  96. <!-- 学员维度分析 -->
  97. <div v-show="activeTab === 'student'" class="tab-content">
  98. <!-- 学员搜索 -->
  99. <div class="filter-section">
  100. <h3>🔍 学员搜索</h3>
  101. <div class="filter-controls">
  102. <div class="filter-group">
  103. <label>学员姓名/学号</label>
  104. <a-input v-model:value="studentSearch" placeholder="输入学员姓名或学号" @pressEnter="searchStudent" />
  105. </div>
  106. <div class="filter-group">
  107. <a-button type="primary" @click="searchStudent">搜索</a-button>
  108. </div>
  109. <div class="filter-group">
  110. <a-button @click="clearSearch">清除</a-button>
  111. </div>
  112. </div>
  113. </div>
  114. <!-- 学员学习行为卡片 -->
  115. <div class="student-cards">
  116. <div
  117. v-for="student in filteredStudents"
  118. :key="student.id"
  119. class="student-card"
  120. :class="{ highlighted: student.highlighted }"
  121. >
  122. <div class="student-header">
  123. <div class="student-info">
  124. <h4>{{ student.name }} ({{ student.studentId }})</h4>
  125. <div class="student-meta">{{ student.college }} | {{ student.major }} | {{ student.grade }}</div>
  126. </div>
  127. <div class="student-stats">
  128. <div class="stat-item">
  129. <div class="stat-value">{{ student.overallProgress }}%</div>
  130. <div class="stat-label">总体进度</div>
  131. </div>
  132. </div>
  133. </div>
  134. <div class="course-progress">
  135. <div v-for="course in student.courses" :key="course.id" class="course-item">
  136. <div class="course-name">{{ course.name }}</div>
  137. <div class="course-stats">
  138. <div class="stat-item">
  139. <div class="stat-value">{{ course.progress }}%</div>
  140. <div class="stat-label">学习进度</div>
  141. </div>
  142. <div class="stat-item">
  143. <div class="stat-value">{{ course.completedAssignments }}/{{ course.totalAssignments }}</div>
  144. <div class="stat-label">作业完成</div>
  145. </div>
  146. <div class="stat-item">
  147. <div class="stat-value">{{ course.discussionParticipation }}</div>
  148. <div class="stat-label">讨论参与</div>
  149. </div>
  150. <div class="stat-item">
  151. <div class="stat-value">{{ course.questionCount }}</div>
  152. <div class="stat-label">提问次数</div>
  153. </div>
  154. </div>
  155. </div>
  156. </div>
  157. </div>
  158. </div>
  159. </div>
  160. </div>
  161. </template>
  162. <script setup>
  163. import { ref, reactive, computed, onMounted, nextTick, onUnmounted } from 'vue'
  164. import * as echarts from 'echarts'
  165. import {
  166. getCollegeList,
  167. getCollegeStats,
  168. getLoginTimeDistribution,
  169. getCourseHeat,
  170. getCollegeCourseDetails,
  171. searchStudents
  172. } from '@/api/statisticalAnalysis/analysisLearningBehaviors'
  173. // 当前活动标签
  174. const activeTab = ref('college')
  175. // 学院维度筛选条件
  176. const collegeFilters = reactive({
  177. collegeId: '',
  178. timeRange: 30
  179. })
  180. // 学院列表
  181. const collegeList = ref([])
  182. // 学院统计数据
  183. const collegeStats = reactive({
  184. totalCourses: 156,
  185. activeCourses: 142,
  186. courseAccessRate: 91.0,
  187. totalLogins: 12456,
  188. uniqueUsers: 3234,
  189. avgLoginPerUser: 3.85,
  190. totalOnlineTime: 2456,
  191. avgSessionTime: 45.2,
  192. peakOnlineUsers: 234
  193. })
  194. // 图表引用
  195. const loginTimeChart = ref(null)
  196. const courseHeatChart = ref(null)
  197. let loginTimeChartInstance = null
  198. let courseHeatChartInstance = null
  199. // 学院表格列定义
  200. const collegeColumns = [
  201. {
  202. title: '学院名称',
  203. dataIndex: 'name',
  204. key: 'name'
  205. },
  206. {
  207. title: '课程数量',
  208. dataIndex: 'courseCount',
  209. key: 'courseCount'
  210. },
  211. {
  212. title: '总访问量',
  213. dataIndex: 'totalVisits',
  214. key: 'totalVisits'
  215. },
  216. {
  217. title: '平均完成率',
  218. dataIndex: 'avgCompletionRate',
  219. key: 'avgCompletionRate',
  220. customRender: ({ text }) => `${text}%`
  221. },
  222. {
  223. title: '作业提交率',
  224. dataIndex: 'assignmentSubmissionRate',
  225. key: 'assignmentSubmissionRate',
  226. customRender: ({ text }) => `${text}%`
  227. },
  228. {
  229. title: '退课率',
  230. dataIndex: 'dropoutRate',
  231. key: 'dropoutRate',
  232. customRender: ({ text }) => `${text}%`
  233. }
  234. ]
  235. // 学院表格数据
  236. const collegeTableData = ref([
  237. {
  238. id: 1,
  239. name: '计算机学院',
  240. courseCount: 45,
  241. totalVisits: 5234,
  242. avgCompletionRate: 78.5,
  243. assignmentSubmissionRate: 85.2,
  244. dropoutRate: 10.2
  245. },
  246. {
  247. id: 2,
  248. name: '商学院',
  249. courseCount: 38,
  250. totalVisits: 4567,
  251. avgCompletionRate: 72.3,
  252. assignmentSubmissionRate: 79.8,
  253. dropoutRate: 12.5
  254. },
  255. {
  256. id: 3,
  257. name: '艺术学院',
  258. courseCount: 28,
  259. totalVisits: 3123,
  260. avgCompletionRate: 68.9,
  261. assignmentSubmissionRate: 76.4,
  262. dropoutRate: 15.2
  263. },
  264. {
  265. id: 4,
  266. name: '理学院',
  267. courseCount: 35,
  268. totalVisits: 3890,
  269. avgCompletionRate: 75.2,
  270. assignmentSubmissionRate: 82.1,
  271. dropoutRate: 13.8
  272. }
  273. ])
  274. // 学员搜索
  275. const studentSearch = ref('')
  276. // 学员数据
  277. const studentsData = ref([
  278. {
  279. id: 1,
  280. name: '张三',
  281. studentId: '2021001',
  282. college: '计算机学院',
  283. major: '计算机科学与技术',
  284. grade: '大三',
  285. overallProgress: 85.6,
  286. highlighted: false,
  287. courses: [
  288. {
  289. id: 1,
  290. name: 'JavaScript程序设计',
  291. progress: 92,
  292. completedAssignments: 8,
  293. totalAssignments: 10,
  294. discussionParticipation: 15,
  295. questionCount: 5
  296. },
  297. {
  298. id: 2,
  299. name: '数据结构与算法',
  300. progress: 78,
  301. completedAssignments: 6,
  302. totalAssignments: 8,
  303. discussionParticipation: 12,
  304. questionCount: 3
  305. }
  306. ]
  307. },
  308. {
  309. id: 2,
  310. name: '李四',
  311. studentId: '2021002',
  312. college: '商学院',
  313. major: '工商管理',
  314. grade: '大二',
  315. overallProgress: 72.3,
  316. highlighted: false,
  317. courses: [
  318. {
  319. id: 3,
  320. name: '管理学原理',
  321. progress: 85,
  322. completedAssignments: 7,
  323. totalAssignments: 9,
  324. discussionParticipation: 8,
  325. questionCount: 2
  326. },
  327. {
  328. id: 4,
  329. name: '市场营销学',
  330. progress: 65,
  331. completedAssignments: 4,
  332. totalAssignments: 7,
  333. discussionParticipation: 6,
  334. questionCount: 1
  335. }
  336. ]
  337. },
  338. {
  339. id: 3,
  340. name: '王五',
  341. studentId: '2021003',
  342. college: '艺术学院',
  343. major: '视觉传达设计',
  344. grade: '大一',
  345. overallProgress: 91.2,
  346. highlighted: false,
  347. courses: [
  348. {
  349. id: 5,
  350. name: '设计基础',
  351. progress: 95,
  352. completedAssignments: 10,
  353. totalAssignments: 10,
  354. discussionParticipation: 20,
  355. questionCount: 8
  356. },
  357. {
  358. id: 6,
  359. name: '色彩构成',
  360. progress: 88,
  361. completedAssignments: 8,
  362. totalAssignments: 9,
  363. discussionParticipation: 15,
  364. questionCount: 6
  365. }
  366. ]
  367. }
  368. ])
  369. // 过滤后的学员数据
  370. const filteredStudents = computed(() => {
  371. if (!studentSearch.value.trim()) {
  372. return studentsData.value.map((student) => ({ ...student, highlighted: false }))
  373. }
  374. const searchTerm = studentSearch.value.trim().toLowerCase()
  375. return studentsData.value
  376. .filter((student) => {
  377. const matchName = student.name.toLowerCase().includes(searchTerm)
  378. const matchId = student.studentId.includes(searchTerm)
  379. return matchName || matchId
  380. })
  381. .map((student) => ({ ...student, highlighted: true }))
  382. })
  383. // 切换标签
  384. const switchTab = (tabName) => {
  385. activeTab.value = tabName
  386. if (tabName === 'college') {
  387. nextTick(async () => {
  388. await initCollegeCharts()
  389. })
  390. }
  391. }
  392. // 更新学院数据
  393. const updateCollegeData = async () => {
  394. try {
  395. // 获取学院统计数据
  396. const statsResponse = await getCollegeStats({
  397. collegeId: collegeFilters.collegeId,
  398. timeRange: collegeFilters.timeRange
  399. })
  400. Object.assign(collegeStats, statsResponse)
  401. // 获取课程详细统计
  402. const detailsResponse = await getCollegeCourseDetails({
  403. collegeId: collegeFilters.collegeId,
  404. timeRange: collegeFilters.timeRange
  405. })
  406. collegeTableData.value = detailsResponse
  407. // 重新初始化图表
  408. await initCollegeCharts()
  409. } catch (error) {
  410. console.error('获取学院数据失败:', error)
  411. }
  412. }
  413. // 搜索学员
  414. const searchStudent = async () => {
  415. try {
  416. const response = await searchStudents({
  417. keyword: studentSearch.value.trim()
  418. })
  419. studentsData.value = response.map((student) => ({
  420. ...student,
  421. highlighted: !!studentSearch.value.trim()
  422. }))
  423. if (response.length === 0 && studentSearch.value.trim()) {
  424. alert(`未找到包含"${studentSearch.value}"的学员`)
  425. }
  426. } catch (error) {
  427. console.error('搜索学员失败:', error)
  428. }
  429. }
  430. // 清除搜索
  431. const clearSearch = async () => {
  432. studentSearch.value = ''
  433. await searchStudent()
  434. }
  435. // 初始化学院维度图表
  436. const initCollegeCharts = async () => {
  437. await initLoginTimeChart()
  438. await initCourseHeatChart()
  439. }
  440. // 登录时段分布图表
  441. const initLoginTimeChart = async () => {
  442. if (!loginTimeChart.value) return
  443. if (loginTimeChartInstance) {
  444. loginTimeChartInstance.dispose()
  445. }
  446. loginTimeChartInstance = echarts.init(loginTimeChart.value)
  447. try {
  448. const response = await getLoginTimeDistribution({
  449. collegeId: collegeFilters.collegeId,
  450. timeRange: collegeFilters.timeRange
  451. })
  452. const { hours, loginCounts } = response
  453. const option = {
  454. title: {
  455. text: '24小时登录时段分布',
  456. left: 'center',
  457. textStyle: {
  458. color: '#2c3e50',
  459. fontSize: 16,
  460. fontWeight: 'bold'
  461. }
  462. },
  463. tooltip: {
  464. trigger: 'axis',
  465. backgroundColor: 'rgba(255, 255, 255, 0.95)',
  466. borderColor: '#3498db',
  467. borderWidth: 1,
  468. textStyle: {
  469. color: '#333'
  470. }
  471. },
  472. xAxis: {
  473. type: 'category',
  474. data: hours,
  475. axisLine: {
  476. lineStyle: {
  477. color: '#bdc3c7'
  478. }
  479. },
  480. axisLabel: {
  481. color: '#2c3e50'
  482. }
  483. },
  484. yAxis: {
  485. type: 'value',
  486. name: '登录人次',
  487. nameTextStyle: {
  488. color: '#2c3e50'
  489. },
  490. axisLine: {
  491. lineStyle: {
  492. color: '#bdc3c7'
  493. }
  494. },
  495. axisLabel: {
  496. color: '#2c3e50'
  497. },
  498. splitLine: {
  499. lineStyle: {
  500. color: '#ecf0f1'
  501. }
  502. }
  503. },
  504. series: [
  505. {
  506. name: '登录人次',
  507. type: 'bar',
  508. data: loginCounts,
  509. itemStyle: {
  510. color: {
  511. type: 'linear',
  512. x: 0,
  513. y: 0,
  514. x2: 0,
  515. y2: 1,
  516. colorStops: [
  517. {
  518. offset: 0,
  519. color: '#3498db'
  520. },
  521. {
  522. offset: 1,
  523. color: '#2980b9'
  524. }
  525. ]
  526. }
  527. },
  528. emphasis: {
  529. itemStyle: {
  530. color: '#e74c3c'
  531. }
  532. }
  533. }
  534. ]
  535. }
  536. loginTimeChartInstance.setOption(option)
  537. } catch (error) {
  538. console.error('获取登录时段数据失败:', error)
  539. }
  540. }
  541. // 课程访问热度图表
  542. const initCourseHeatChart = async () => {
  543. if (!courseHeatChart.value) return
  544. if (courseHeatChartInstance) {
  545. courseHeatChartInstance.dispose()
  546. }
  547. courseHeatChartInstance = echarts.init(courseHeatChart.value)
  548. try {
  549. const response = await getCourseHeat({
  550. collegeId: collegeFilters.collegeId,
  551. timeRange: collegeFilters.timeRange
  552. })
  553. const { courses, visits } = response
  554. const option = {
  555. title: {
  556. text: '课程访问热度TOP8',
  557. left: 'center',
  558. textStyle: {
  559. color: '#2c3e50',
  560. fontSize: 16,
  561. fontWeight: 'bold'
  562. }
  563. },
  564. tooltip: {
  565. trigger: 'axis',
  566. backgroundColor: 'rgba(255, 255, 255, 0.95)',
  567. borderColor: '#3498db',
  568. borderWidth: 1,
  569. textStyle: {
  570. color: '#333'
  571. }
  572. },
  573. xAxis: {
  574. type: 'value',
  575. name: '访问量',
  576. nameTextStyle: {
  577. color: '#2c3e50'
  578. },
  579. axisLine: {
  580. lineStyle: {
  581. color: '#bdc3c7'
  582. }
  583. },
  584. axisLabel: {
  585. color: '#2c3e50'
  586. },
  587. splitLine: {
  588. lineStyle: {
  589. color: '#ecf0f1'
  590. }
  591. }
  592. },
  593. yAxis: {
  594. type: 'category',
  595. data: courses,
  596. axisLine: {
  597. lineStyle: {
  598. color: '#bdc3c7'
  599. }
  600. },
  601. axisLabel: {
  602. color: '#2c3e50'
  603. }
  604. },
  605. series: [
  606. {
  607. name: '访问量',
  608. type: 'bar',
  609. data: visits,
  610. itemStyle: {
  611. color: {
  612. type: 'linear',
  613. x: 0,
  614. y: 0,
  615. x2: 1,
  616. y2: 0,
  617. colorStops: [
  618. {
  619. offset: 0,
  620. color: '#e74c3c'
  621. },
  622. {
  623. offset: 1,
  624. color: '#f39c12'
  625. }
  626. ]
  627. }
  628. },
  629. emphasis: {
  630. itemStyle: {
  631. color: '#3498db'
  632. }
  633. }
  634. }
  635. ]
  636. }
  637. courseHeatChartInstance.setOption(option)
  638. } catch (error) {
  639. console.error('获取课程热度数据失败:', error)
  640. }
  641. }
  642. // 响应式处理
  643. const handleResize = () => {
  644. loginTimeChartInstance?.resize()
  645. courseHeatChartInstance?.resize()
  646. }
  647. // 初始化数据
  648. const initData = async () => {
  649. try {
  650. // 获取学院列表
  651. const colleges = await getCollegeList()
  652. collegeList.value = colleges
  653. // 获取初始学员数据
  654. await searchStudent()
  655. // 获取学院数据
  656. await updateCollegeData()
  657. } catch (error) {
  658. console.error('初始化数据失败:', error)
  659. }
  660. }
  661. // 组件挂载后初始化
  662. onMounted(() => {
  663. nextTick(async () => {
  664. await initData()
  665. window.addEventListener('resize', handleResize)
  666. })
  667. })
  668. // 组件卸载时清理
  669. onUnmounted(() => {
  670. window.removeEventListener('resize', handleResize)
  671. loginTimeChartInstance?.dispose()
  672. courseHeatChartInstance?.dispose()
  673. })
  674. </script>
  675. <style scoped>
  676. .learning-behavior-analysis {
  677. padding: 20px;
  678. }
  679. .header {
  680. background: rgba(255, 255, 255, 0.95);
  681. backdrop-filter: blur(10px);
  682. border-radius: 15px;
  683. padding: 30px;
  684. margin-bottom: 30px;
  685. box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  686. text-align: center;
  687. }
  688. .header h1 {
  689. color: #2c3e50;
  690. font-size: 2.5em;
  691. margin-bottom: 10px;
  692. }
  693. .header p {
  694. color: #7f8c8d;
  695. font-size: 1.1em;
  696. }
  697. .nav-tabs {
  698. display: flex;
  699. background: rgba(255, 255, 255, 0.95);
  700. backdrop-filter: blur(10px);
  701. border-radius: 15px;
  702. padding: 5px;
  703. margin-bottom: 30px;
  704. box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  705. }
  706. .nav-tab {
  707. flex: 1;
  708. padding: 15px 20px;
  709. text-align: center;
  710. cursor: pointer;
  711. border-radius: 10px;
  712. transition: all 0.3s ease;
  713. font-weight: 600;
  714. color: #7f8c8d;
  715. }
  716. .nav-tab.active {
  717. background: linear-gradient(135deg, #3498db, #2980b9);
  718. color: white;
  719. box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
  720. }
  721. .nav-tab:hover:not(.active) {
  722. background: rgba(52, 152, 219, 0.1);
  723. color: #3498db;
  724. }
  725. .tab-content {
  726. display: block;
  727. }
  728. .filter-section {
  729. background: rgba(255, 255, 255, 0.95);
  730. backdrop-filter: blur(10px);
  731. border-radius: 15px;
  732. padding: 25px;
  733. margin-bottom: 30px;
  734. box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  735. }
  736. .filter-section h3 {
  737. color: #2c3e50;
  738. margin-bottom: 20px;
  739. font-size: 1.5em;
  740. }
  741. .filter-controls {
  742. display: grid;
  743. grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  744. gap: 15px;
  745. align-items: end;
  746. }
  747. .filter-group {
  748. display: flex;
  749. flex-direction: column;
  750. }
  751. .filter-group label {
  752. margin-bottom: 8px;
  753. color: #2c3e50;
  754. font-weight: 600;
  755. }
  756. .stats-grid {
  757. display: grid;
  758. grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  759. gap: 25px;
  760. margin-bottom: 30px;
  761. }
  762. .stat-card {
  763. background: rgba(255, 255, 255, 0.95);
  764. backdrop-filter: blur(10px);
  765. border-radius: 15px;
  766. padding: 25px;
  767. box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  768. transition: transform 0.3s ease, box-shadow 0.3s ease;
  769. }
  770. .stat-card:hover {
  771. transform: translateY(-5px);
  772. box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  773. }
  774. .stat-card h3 {
  775. color: #2c3e50;
  776. margin-bottom: 15px;
  777. font-size: 1.2em;
  778. border-bottom: 2px solid #3498db;
  779. padding-bottom: 10px;
  780. }
  781. .stat-number {
  782. font-size: 2.2em;
  783. font-weight: bold;
  784. color: #3498db;
  785. margin-bottom: 8px;
  786. }
  787. .stat-label {
  788. color: #7f8c8d;
  789. font-size: 0.9em;
  790. }
  791. .chart-container {
  792. background: rgba(255, 255, 255, 0.95);
  793. backdrop-filter: blur(10px);
  794. border-radius: 15px;
  795. padding: 25px;
  796. margin-bottom: 30px;
  797. box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  798. }
  799. .chart-container h3 {
  800. color: #2c3e50;
  801. margin-bottom: 20px;
  802. font-size: 1.5em;
  803. }
  804. .chart {
  805. height: 400px;
  806. border-radius: 10px;
  807. }
  808. .data-table {
  809. background: rgba(255, 255, 255, 0.95);
  810. backdrop-filter: blur(10px);
  811. border-radius: 15px;
  812. padding: 25px;
  813. margin-bottom: 30px;
  814. box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  815. }
  816. .data-table h3 {
  817. color: #2c3e50;
  818. margin-bottom: 20px;
  819. font-size: 1.5em;
  820. }
  821. .student-cards {
  822. display: flex;
  823. flex-direction: column;
  824. gap: 20px;
  825. }
  826. .student-card {
  827. background: rgba(255, 255, 255, 0.95);
  828. backdrop-filter: blur(10px);
  829. border-radius: 15px;
  830. padding: 20px;
  831. box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  832. transition: transform 0.3s ease;
  833. }
  834. .student-card:hover {
  835. transform: translateY(-3px);
  836. }
  837. .student-card.highlighted {
  838. border: 2px solid #3498db;
  839. box-shadow: 0 8px 32px rgba(52, 152, 219, 0.2);
  840. }
  841. .student-header {
  842. display: flex;
  843. justify-content: space-between;
  844. align-items: center;
  845. margin-bottom: 15px;
  846. padding-bottom: 10px;
  847. border-bottom: 2px solid #ecf0f1;
  848. }
  849. .student-info h4 {
  850. color: #2c3e50;
  851. font-size: 1.3em;
  852. margin-bottom: 5px;
  853. }
  854. .student-meta {
  855. color: #7f8c8d;
  856. font-size: 0.9em;
  857. }
  858. .course-progress {
  859. margin-bottom: 15px;
  860. }
  861. .course-item {
  862. display: flex;
  863. justify-content: space-between;
  864. align-items: center;
  865. padding: 10px 0;
  866. border-bottom: 1px solid #ecf0f1;
  867. }
  868. .course-name {
  869. font-weight: 600;
  870. color: #2c3e50;
  871. }
  872. .course-stats {
  873. display: flex;
  874. gap: 20px;
  875. font-size: 0.9em;
  876. }
  877. .stat-item {
  878. text-align: center;
  879. }
  880. .stat-value {
  881. font-weight: bold;
  882. color: #3498db;
  883. }
  884. .stat-label {
  885. color: #7f8c8d;
  886. font-size: 0.8em;
  887. }
  888. :deep(.completion-rate) {
  889. color: #27ae60;
  890. font-weight: bold;
  891. }
  892. :deep(.low-engagement) {
  893. color: #e74c3c;
  894. font-weight: bold;
  895. }
  896. @media (max-width: 768px) {
  897. .stats-grid {
  898. grid-template-columns: 1fr;
  899. }
  900. .filter-controls {
  901. grid-template-columns: 1fr;
  902. }
  903. .header h1 {
  904. font-size: 2em;
  905. }
  906. .nav-tabs {
  907. flex-direction: column;
  908. }
  909. .student-header {
  910. flex-direction: column;
  911. align-items: flex-start;
  912. }
  913. .course-stats {
  914. flex-direction: column;
  915. gap: 10px;
  916. }
  917. }
  918. </style>