diff --git a/docs/报告页面开发清单.md b/docs/报告页面开发清单.md index 46d2e3e..23d967d 100644 --- a/docs/报告页面开发清单.md +++ b/docs/报告页面开发清单.md @@ -16,7 +16,7 @@ | 8.2 | 细分能力精准分析(×8) | `/report/sub-ability-detail?recordId=3&parentId=1` | 网页截图 | 单智能5项子能力雷达图+柱状图+结论 | ✅ 已完成 | | 8.3 | 细分能力精准分析-竖向柱状图(×8) | `/report/sub-ability-detail-v?recordId=3&parentId=8` | 网页截图 | 单智能5项子能力雷达图+竖向柱状图+结论 | ✅ 已完成 | | 9 | 先天学习类型分析 | `/report/learning-types?recordId=3` | 网页截图 | CategoryType=4 雷达图+竖向柱状图(多色)+结论 | ✅ 已完成 | -| 10 | 学习关键能力分析 | `/report/learning-abilities` | 网页截图 | CategoryType=5 结果+结论 | ⬜ 骨架 | +| 10 | 学习关键能力分析 | `/report/learning-abilities?recordId=3` | 网页截图 | CategoryType=5 雷达图+竖向柱状图(多色) | ✅ 已完成 | | 11 | 科学大脑类型分析 | `/report/brain-types` | 网页截图 | CategoryType=6 结果+结论 | ⬜ 骨架 | | 12 | 性格类型分析 | `/report/character-types` | 网页截图 | CategoryType=7 结果+结论 | ⬜ 骨架 | | 13 | 未来关键发展能力分析 | `/report/future-abilities` | 网页截图 | CategoryType=8 结果+结论 | ⬜ 骨架 | diff --git a/server/MiAssessment/src/MiAssessment.Api/Pages/Report/LearningAbilities.cshtml b/server/MiAssessment/src/MiAssessment.Api/Pages/Report/LearningAbilities.cshtml index 8149f7c..62aeba1 100644 --- a/server/MiAssessment/src/MiAssessment.Api/Pages/Report/LearningAbilities.cshtml +++ b/server/MiAssessment/src/MiAssessment.Api/Pages/Report/LearningAbilities.cshtml @@ -1,8 +1,9 @@ @page "/report/learning-abilities" @model MiAssessment.Api.Pages.Report.LearningAbilitiesModel @{ - ViewData["Title"] = "学习关键能力分析"; - ViewData["PageTitle"] = "学习关键能力分析"; + ViewData["Title"] = "学习的关键能力"; + ViewData["PageTitle"] = null; + ViewData["PageNumber"] = null; } @if (!Model.IsSuccess) @@ -13,7 +14,178 @@ } else { -
-

学习关键能力分析占位 - 具体内容后续实现

+
+ +
5、学习的关键能力
+ + +
+ +
+
学习的关键能力
+ +
+ + +
+
学习的关键能力排名
+ +
+
} + +@section Styles { + +} + +@section Scripts { + + +} diff --git a/server/MiAssessment/src/MiAssessment.Api/Pages/Report/LearningAbilities.cshtml.cs b/server/MiAssessment/src/MiAssessment.Api/Pages/Report/LearningAbilities.cshtml.cs index 8a57623..dd0cbf2 100644 --- a/server/MiAssessment/src/MiAssessment.Api/Pages/Report/LearningAbilities.cshtml.cs +++ b/server/MiAssessment/src/MiAssessment.Api/Pages/Report/LearningAbilities.cshtml.cs @@ -1,14 +1,48 @@ using MiAssessment.Core.Interfaces; +using MiAssessment.Model.Models.Report; namespace MiAssessment.Api.Pages.Report; /// -/// 学习关键能力分析 PageModel +/// 学习的关键能力分析页 PageModel +/// 路由:/report/learning-abilities?recordId=3 +/// CategoryType=5 的5种能力:学习专注力、学习思考力、学习转化力、学习记忆力、学习动机力 /// public class LearningAbilitiesModel : ReportPageModelBase { + /// + /// 能力列表(按 CategoryId 排序,雷达图用) + /// + public List Items { get; set; } = new(); + + /// + /// 按分数降序排列(柱状图用) + /// + public List ItemsByScore { get; set; } = new(); + public LearningAbilitiesModel(IReportDataService reportDataService) : base(reportDataService) { } + + protected override Task OnDataLoadedAsync() + { + if (ReportData?.ResultsByType == null || + !ReportData.ResultsByType.TryGetValue(5, out var allItems)) + { + ErrorMessage = "缺少学习关键能力数据"; + return Task.CompletedTask; + } + + Items = allItems.OrderBy(x => x.CategoryId).ToList(); + + if (Items.Count == 0) + { + ErrorMessage = "未找到学习关键能力数据"; + return Task.CompletedTask; + } + + ItemsByScore = Items.OrderByDescending(x => x.Score).ToList(); + return Task.CompletedTask; + } } diff --git a/server/MiAssessment/src/MiAssessment.Api/wwwroot/css/pages/learning-abilities.css b/server/MiAssessment/src/MiAssessment.Api/wwwroot/css/pages/learning-abilities.css new file mode 100644 index 0000000..22e9618 --- /dev/null +++ b/server/MiAssessment/src/MiAssessment.Api/wwwroot/css/pages/learning-abilities.css @@ -0,0 +1,44 @@ +/* ============================================ + 学习的关键能力分析页 + 页面固定尺寸:1309×926px + 只有雷达图+竖向柱状图,无结论卡片 + ============================================ */ + +.la-page { + display: flex; + flex-direction: column; + width: 100%; + height: 100%; + gap: 20px; +} + +/* 板块标题 */ +.la-section-title { + font-size: 22px; + font-weight: 700; + color: #E67E73; +} + +/* ---- 雷达图 + 柱状图并排 ---- */ +.la-charts { + display: flex; + gap: 40px; + align-items: flex-start; + flex: 1; +} + +.la-chart-panel { + flex: 1; + display: flex; + flex-direction: column; + align-items: center; +} + +/* 图表小标题 */ +.la-chart-title { + font-size: 18px; + font-weight: 700; + color: #E67E73; + margin-bottom: 8px; + text-align: center; +}