-
未来关键发展能力分析占位 - 具体内容后续实现
+
+
8、未来关键发展能力
+
+
+
+
+
+
+
+
最强能力解读
+
+ @if (Model.StrongestConclusion != null)
+ {
+ @Html.Raw(Model.StrongestConclusion.Content?.Replace("\\n", "
").Replace("\n", "
") ?? "暂无结论")
+ }
+ else
+ {
+ 暂无结论数据
+ }
+
+
+
+
较弱能力解读
+
+ @if (Model.WeakestConclusion != null)
+ {
+ @Html.Raw(Model.WeakestConclusion.Content?.Replace("\\n", "
").Replace("\n", "
") ?? "暂无结论")
+ }
+ else
+ {
+ 暂无结论数据
+ }
+
+
+
}
+
+@section Styles {
+
+}
+
+@section Scripts {
+
+
+}
diff --git a/server/MiAssessment/src/MiAssessment.Api/Pages/Report/FutureAbilities.cshtml.cs b/server/MiAssessment/src/MiAssessment.Api/Pages/Report/FutureAbilities.cshtml.cs
index c607e5f..9510548 100644
--- a/server/MiAssessment/src/MiAssessment.Api/Pages/Report/FutureAbilities.cshtml.cs
+++ b/server/MiAssessment/src/MiAssessment.Api/Pages/Report/FutureAbilities.cshtml.cs
@@ -1,14 +1,111 @@
+using Microsoft.EntityFrameworkCore;
using MiAssessment.Core.Interfaces;
+using MiAssessment.Model.Data;
+using MiAssessment.Model.Models.Report;
namespace MiAssessment.Api.Pages.Report;
///
-/// 未来关键发展能力分析 PageModel
+/// 未来关键发展能力分析页 PageModel
+/// 路由:/report/future-abilities?recordId=3
+/// CategoryType=8:10项未来能力
///
public class FutureAbilitiesModel : ReportPageModelBase
{
- public FutureAbilitiesModel(IReportDataService reportDataService)
+ ///
+ /// 按 CategoryId 排序(雷达图用)
+ ///
+ public List
Items { get; set; } = new();
+
+ ///
+ /// 按分数降序(柱状图用)
+ ///
+ public List ItemsByScore { get; set; } = new();
+
+ ///
+ /// 总分(环形图百分比计算用)
+ ///
+ public decimal TotalScore { get; set; }
+
+ ///
+ /// 最强能力名称
+ ///
+ public string StrongestName { get; set; } = "";
+
+ ///
+ /// 最强能力结论
+ ///
+ public ConclusionDataDto? StrongestConclusion { get; set; }
+
+ ///
+ /// 较弱能力名称
+ ///
+ public string WeakestName { get; set; } = "";
+
+ ///
+ /// 较弱能力结论
+ ///
+ public ConclusionDataDto? WeakestConclusion { get; set; }
+
+ private readonly MiAssessmentDbContext _dbContext;
+
+ public FutureAbilitiesModel(IReportDataService reportDataService, MiAssessmentDbContext dbContext)
: base(reportDataService)
{
+ _dbContext = dbContext;
+ }
+
+ protected override async Task OnDataLoadedAsync()
+ {
+ if (ReportData?.ResultsByType == null ||
+ !ReportData.ResultsByType.TryGetValue(8, out var allItems))
+ {
+ ErrorMessage = "缺少未来关键发展能力数据";
+ return;
+ }
+
+ Items = allItems.OrderBy(x => x.CategoryId).ToList();
+ if (Items.Count == 0)
+ {
+ ErrorMessage = "未找到未来关键发展能力数据";
+ return;
+ }
+
+ ItemsByScore = Items.OrderByDescending(x => x.Score).ToList();
+ TotalScore = Items.Sum(x => x.Score);
+
+ // 最强结论
+ var strongest = ItemsByScore.First();
+ StrongestName = strongest.CategoryName;
+ if (ReportData.ConclusionsByCategory.TryGetValue(strongest.CategoryId, out var sc))
+ StrongestConclusion = sc;
+ else
+ StrongestConclusion = await GetTemplateConclusionAsync(strongest.CategoryId, 1);
+
+ // 较弱结论
+ var weakest = ItemsByScore.Last();
+ WeakestName = weakest.CategoryName;
+ if (ReportData.ConclusionsByCategory.TryGetValue(weakest.CategoryId, out var wc))
+ WeakestConclusion = wc;
+ else
+ WeakestConclusion = await GetTemplateConclusionAsync(weakest.CategoryId, 4);
+ }
+
+ private async Task GetTemplateConclusionAsync(long categoryId, int conclusionType)
+ {
+ var template = await _dbContext.ReportConclusions
+ .AsNoTracking()
+ .FirstOrDefaultAsync(t =>
+ t.CategoryId == categoryId &&
+ t.ConclusionType == conclusionType &&
+ !t.IsDeleted);
+ if (template == null) return null;
+ return new ConclusionDataDto
+ {
+ CategoryId = template.CategoryId,
+ ConclusionType = template.ConclusionType,
+ Title = template.Title,
+ Content = template.Content
+ };
}
}
diff --git a/server/MiAssessment/src/MiAssessment.Api/Pages/Report/LearningAbilitiesConclusion.cshtml b/server/MiAssessment/src/MiAssessment.Api/Pages/Report/LearningAbilitiesConclusion.cshtml
new file mode 100644
index 0000000..3455744
--- /dev/null
+++ b/server/MiAssessment/src/MiAssessment.Api/Pages/Report/LearningAbilitiesConclusion.cshtml
@@ -0,0 +1,39 @@
+@page "/report/learning-abilities-conclusion"
+@model MiAssessment.Api.Pages.Report.LearningAbilitiesConclusionModel
+@{
+ ViewData["Title"] = "学习关键能力";
+ ViewData["PageTitle"] = null;
+ ViewData["PageNumber"] = null;
+}
+
+@if (!Model.IsSuccess)
+{
+
+}
+else
+{
+
+
+
+
+
学习关键能力
+
+
+
+ @Html.Raw(Model.ConclusionContent.Replace("\\n", "
").Replace("\n", "
"))
+
+
+
+}
+
+@section Styles {
+
+}
+
+@section Scripts {
+
+}
diff --git a/server/MiAssessment/src/MiAssessment.Api/Pages/Report/LearningAbilitiesConclusion.cshtml.cs b/server/MiAssessment/src/MiAssessment.Api/Pages/Report/LearningAbilitiesConclusion.cshtml.cs
new file mode 100644
index 0000000..19fdb3d
--- /dev/null
+++ b/server/MiAssessment/src/MiAssessment.Api/Pages/Report/LearningAbilitiesConclusion.cshtml.cs
@@ -0,0 +1,71 @@
+using Microsoft.EntityFrameworkCore;
+using MiAssessment.Core.Interfaces;
+using MiAssessment.Model.Data;
+using MiAssessment.Model.Models.Report;
+
+namespace MiAssessment.Api.Pages.Report;
+
+///
+/// 学习关键能力结论页 PageModel
+/// 路由:/report/learning-abilities-conclusion?recordId=3
+/// 展示最弱学习能力的详细结论
+///
+public class LearningAbilitiesConclusionModel : ReportPageModelBase
+{
+ ///
+ /// 最弱能力名称
+ ///
+ public string WeakestName { get; set; } = "";
+
+ ///
+ /// 结论内容
+ ///
+ public string ConclusionContent { get; set; } = "";
+
+ private readonly MiAssessmentDbContext _dbContext;
+
+ public LearningAbilitiesConclusionModel(IReportDataService reportDataService, MiAssessmentDbContext dbContext)
+ : base(reportDataService)
+ {
+ _dbContext = dbContext;
+ }
+
+ protected override async Task OnDataLoadedAsync()
+ {
+ if (ReportData?.ResultsByType == null ||
+ !ReportData.ResultsByType.TryGetValue(5, out var allItems))
+ {
+ ErrorMessage = "缺少学习关键能力数据";
+ return;
+ }
+
+ var items = allItems.OrderByDescending(x => x.Score).ToList();
+ if (items.Count == 0)
+ {
+ ErrorMessage = "未找到学习关键能力数据";
+ return;
+ }
+
+ // 最弱能力
+ var weakest = items.Last();
+ WeakestName = weakest.CategoryName;
+
+ // 从测评记录结论中查找
+ if (ReportData.ConclusionsByCategory.TryGetValue(weakest.CategoryId, out var wc) && wc.Content != null)
+ {
+ ConclusionContent = wc.Content;
+ }
+ else
+ {
+ // fallback: 从模板表查 ConclusionType=4
+ var template = await _dbContext.ReportConclusions
+ .AsNoTracking()
+ .FirstOrDefaultAsync(t =>
+ t.CategoryId == weakest.CategoryId &&
+ t.ConclusionType == 4 &&
+ !t.IsDeleted);
+
+ ConclusionContent = template?.Content ?? "";
+ }
+ }
+}
diff --git a/server/MiAssessment/src/MiAssessment.Api/wwwroot/css/pages/brain-types.css b/server/MiAssessment/src/MiAssessment.Api/wwwroot/css/pages/brain-types.css
new file mode 100644
index 0000000..b1d52c8
--- /dev/null
+++ b/server/MiAssessment/src/MiAssessment.Api/wwwroot/css/pages/brain-types.css
@@ -0,0 +1,102 @@
+/* ============================================
+ 科学大脑类型分析页
+ 页面固定尺寸:1309×926px
+ 三图(环形+雷达+柱状)+ 两结论卡片
+ ============================================ */
+
+.bt-page {
+ display: flex;
+ flex-direction: column;
+ width: 100%;
+ height: 100%;
+ gap: 16px;
+}
+
+.bt-section-title {
+ font-size: 22px;
+ font-weight: 700;
+ color: #E67E73;
+}
+
+/* ---- 上半部分:三图并排 ---- */
+.bt-charts {
+ display: flex;
+ gap: 20px;
+ align-items: flex-start;
+}
+
+.bt-chart-panel {
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+}
+
+.bt-panel-donut {
+ flex: 0.9;
+}
+
+.bt-chart-title {
+ font-size: 16px;
+ font-weight: 700;
+ color: #E67E73;
+ margin-bottom: 4px;
+ text-align: center;
+}
+
+/* ---- 下半部分:结论卡片 ---- */
+.bt-conclusions {
+ display: flex;
+ gap: 30px;
+ flex: 1;
+ min-height: 0;
+}
+
+.bt-conclusion-card {
+ flex: 1;
+ border: 3px solid;
+ border-radius: 12px;
+ padding: 34px 20px 14px;
+ position: relative;
+ display: flex;
+ flex-direction: column;
+}
+
+.bt-card-strong {
+ border-color: #E67E73;
+ background: #FFF5F5;
+}
+
+.bt-card-weak {
+ border-color: #E67E73;
+ background: #FFF5F5;
+}
+
+.bt-badge {
+ position: absolute;
+ top: 0px;
+ left: 50%;
+ transform: translateX(-50%) translateY(-1px);
+ padding: 5px 24px;
+ border-radius: 0 0 8px 8px;
+ font-size: 16px;
+ font-weight: 700;
+ color: #fff;
+ white-space: nowrap;
+ letter-spacing: 2px;
+}
+
+.bt-badge-strong { background: #C0392B; }
+.bt-badge-weak { background: #C0392B; }
+
+.bt-conclusion-content {
+ font-size: 13px;
+ line-height: 1.7;
+ color: var(--text-secondary);
+ font-weight: 600;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ display: -webkit-box;
+ -webkit-line-clamp: 9;
+ -webkit-box-orient: vertical;
+}
diff --git a/server/MiAssessment/src/MiAssessment.Api/wwwroot/css/pages/character-types.css b/server/MiAssessment/src/MiAssessment.Api/wwwroot/css/pages/character-types.css
new file mode 100644
index 0000000..d906b2e
--- /dev/null
+++ b/server/MiAssessment/src/MiAssessment.Api/wwwroot/css/pages/character-types.css
@@ -0,0 +1,102 @@
+/* ============================================
+ 性格类型分析页
+ 页面固定尺寸:1309×926px
+ 三图(环形+雷达+柱状)+ 两结论卡片
+ ============================================ */
+
+.ct-page {
+ display: flex;
+ flex-direction: column;
+ width: 100%;
+ height: 100%;
+ gap: 16px;
+}
+
+.ct-section-title {
+ font-size: 22px;
+ font-weight: 700;
+ color: #E67E73;
+}
+
+/* ---- 上半部分:三图并排 ---- */
+.ct-charts {
+ display: flex;
+ gap: 20px;
+ align-items: flex-start;
+}
+
+.ct-chart-panel {
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+}
+
+.ct-panel-donut {
+ flex: 0.9;
+}
+
+.ct-chart-title {
+ font-size: 16px;
+ font-weight: 700;
+ color: #E67E73;
+ margin-bottom: 4px;
+ text-align: center;
+}
+
+/* ---- 下半部分:结论卡片 ---- */
+.ct-conclusions {
+ display: flex;
+ gap: 30px;
+ flex: 1;
+ min-height: 0;
+}
+
+.ct-conclusion-card {
+ flex: 1;
+ border: 3px solid;
+ border-radius: 12px;
+ padding: 34px 20px 14px;
+ position: relative;
+ display: flex;
+ flex-direction: column;
+}
+
+.ct-card-strong {
+ border-color: #E67E73;
+ background: #FFF5F5;
+}
+
+.ct-card-weak {
+ border-color: #999999;
+ background: #F8F8F8;
+}
+
+.ct-badge {
+ position: absolute;
+ top: 0px;
+ left: 50%;
+ transform: translateX(-50%) translateY(-1px);
+ padding: 5px 24px;
+ border-radius: 0 0 8px 8px;
+ font-size: 16px;
+ font-weight: 700;
+ color: #fff;
+ white-space: nowrap;
+ letter-spacing: 2px;
+}
+
+.ct-badge-strong { background: #C0392B; }
+.ct-badge-weak { background: #999999; }
+
+.ct-conclusion-content {
+ font-size: 13px;
+ line-height: 1.7;
+ color: var(--text-secondary);
+ font-weight: 600;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ display: -webkit-box;
+ -webkit-line-clamp: 9;
+ -webkit-box-orient: vertical;
+}
diff --git a/server/MiAssessment/src/MiAssessment.Api/wwwroot/css/pages/future-abilities.css b/server/MiAssessment/src/MiAssessment.Api/wwwroot/css/pages/future-abilities.css
new file mode 100644
index 0000000..1531847
--- /dev/null
+++ b/server/MiAssessment/src/MiAssessment.Api/wwwroot/css/pages/future-abilities.css
@@ -0,0 +1,98 @@
+/* ============================================
+ 未来关键发展能力分析页
+ 页面固定尺寸:1309×926px
+ 雷达图 + 横向柱状图 + 两结论卡片
+ ============================================ */
+
+.fa-page {
+ display: flex;
+ flex-direction: column;
+ width: 100%;
+ height: 100%;
+ gap: 16px;
+}
+
+.fa-section-title {
+ font-size: 22px;
+ font-weight: 700;
+ color: #E67E73;
+}
+
+/* ---- 上半部分:两图并排 ---- */
+.fa-charts {
+ display: flex;
+ gap: 20px;
+ align-items: flex-start;
+}
+
+.fa-chart-panel {
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+}
+
+.fa-chart-title {
+ font-size: 16px;
+ font-weight: 700;
+ color: #E67E73;
+ margin-bottom: 4px;
+ text-align: center;
+}
+
+/* ---- 下半部分:结论卡片 ---- */
+.fa-conclusions {
+ display: flex;
+ gap: 30px;
+ flex: 1;
+ min-height: 0;
+}
+
+.fa-conclusion-card {
+ flex: 1;
+ border: 3px solid;
+ border-radius: 12px;
+ padding: 34px 20px 14px;
+ position: relative;
+ display: flex;
+ flex-direction: column;
+}
+
+.fa-card-strong {
+ border-color: #E67E73;
+ background: #FFF5F5;
+}
+
+.fa-card-weak {
+ border-color: #999999;
+ background: #F8F8F8;
+}
+
+.fa-badge {
+ position: absolute;
+ top: 0px;
+ left: 50%;
+ transform: translateX(-50%) translateY(-1px);
+ padding: 5px 24px;
+ border-radius: 0 0 8px 8px;
+ font-size: 16px;
+ font-weight: 700;
+ color: #fff;
+ white-space: nowrap;
+ letter-spacing: 2px;
+}
+
+.fa-badge-strong { background: #C0392B; }
+.fa-badge-weak { background: #999999; }
+
+.fa-conclusion-content {
+ font-size: 13px;
+ line-height: 1.7;
+ color: var(--text-secondary);
+ font-weight: 600;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ display: -webkit-box;
+ -webkit-line-clamp: 9;
+ -webkit-box-orient: vertical;
+}
diff --git a/server/MiAssessment/src/MiAssessment.Api/wwwroot/css/pages/learning-abilities-conclusion.css b/server/MiAssessment/src/MiAssessment.Api/wwwroot/css/pages/learning-abilities-conclusion.css
new file mode 100644
index 0000000..aa385fe
--- /dev/null
+++ b/server/MiAssessment/src/MiAssessment.Api/wwwroot/css/pages/learning-abilities-conclusion.css
@@ -0,0 +1,48 @@
+/* ============================================
+ 学习关键能力结论页
+ 页面固定尺寸:1309×926px
+ 全页红色边框卡片 + 顶部红色badge
+ ============================================ */
+
+.lac-page {
+ display: flex;
+ width: 100%;
+ height: 100%;
+ padding: 20px 0 0;
+}
+
+/* 全页卡片 */
+.lac-card {
+ flex: 1;
+ border: 3px solid #C0392B;
+ border-radius: 12px;
+ padding: 44px 36px 28px;
+ position: relative;
+ display: flex;
+ flex-direction: column;
+}
+
+/* 顶部红色 badge */
+.lac-badge {
+ position: absolute;
+ top: 0px;
+ left: 50%;
+ transform: translateX(-50%) translateY(-1px);
+ padding: 6px 40px;
+ border-radius: 0 0 10px 10px;
+ font-size: 20px;
+ font-weight: 700;
+ color: #fff;
+ background: #C0392B;
+ white-space: nowrap;
+ letter-spacing: 3px;
+}
+
+/* 结论文字 */
+.lac-content {
+ font-size: 16px;
+ line-height: 2;
+ color: #333;
+ font-weight: 500;
+ overflow: hidden;
+}