feat(lesson-preparation): add AI evaluation, analytics, attachments, calendar, comments, review, substitutes, formative, and version diff

- Add actions-ai-evaluation, actions-analytics, actions-attachments, actions-calendar, actions-comments, actions-formative, actions-questions, actions-review, actions-substitutes

- Add corresponding data-access layers for each new action module

- Add calendar-view, curriculum-map-view, version-diff-viewer components

- Add editor-slice, selection-slice, version-slice hooks for state management

- Add document-diff and scope-check lib utilities

- Add default-question-service and external-questions-bridge services
This commit is contained in:
SpecialX
2026-07-03 10:25:21 +08:00
parent a16f09d3c3
commit 20023e13fd
75 changed files with 5131 additions and 1186 deletions

View File

@@ -18,7 +18,6 @@ import {
} from "../actions";
import { getKnowledgePointOptionsAction } from "../actions-kp";
import { publishLessonPlanHomeworkAction } from "../actions-publish";
import { getQuestionsAction } from "@/modules/questions/actions";
import type { LessonPlanDataService } from "../providers/lesson-plan-provider";
/**
@@ -28,7 +27,10 @@ import type { LessonPlanDataService } from "../providers/lesson-plan-provider";
*
* V3 扩展:新增 picker/dialog 组件所需方法createLessonPlan / getTextbooksForPicker /
* getChaptersForPicker / getLessonPlanTemplates / getKnowledgePointOptions /
* publishLessonPlanHomework / getQuestions)。
* publishLessonPlanHomework
*
* V4 P0-4 修复:移除 `getQuestions` 方法及其对 `@/modules/questions/actions` 的直接 import
* 改由独立的 `QuestionService`(见 default-question-service.ts注入。
*/
export function createDefaultDataService(): LessonPlanDataService {
return {
@@ -146,20 +148,5 @@ export function createDefaultDataService(): LessonPlanDataService {
}
return { success: false, message: res.message, errors: res.errors };
},
async getQuestions(params) {
const res = await getQuestionsAction(params);
if (res.success && res.data) {
// 从 questions 模块的返回结构中提取 picker 所需字段
const items = res.data.data.map((q) => ({
id: q.id,
type: q.type,
difficulty: q.difficulty,
content: q.content,
}));
return { success: true, data: { data: items } };
}
return { success: false, message: res.message };
},
};
}