Explorar el Código

proposal init;

jimmylee hace 1 mes
padre
commit
a317549d90

+ 4 - 0
.gitignore

@@ -29,3 +29,7 @@ coverage
 *.sw?
 
 *.tsbuildinfo
+
+
+.claude
+

+ 2 - 0
openspec/changes/english-speaking/.openspec.yaml

@@ -0,0 +1,2 @@
+schema: spec-driven
+created: 2026-04-02

+ 93 - 0
openspec/changes/english-speaking/design.md

@@ -0,0 +1,93 @@
+## Context
+
+PPT 项目是基于 Vue 3 + TypeScript + Pinia 的课件编辑器,以 iframe 嵌入 cocorobo 父应用。编辑器使用 `CollapsibleToolbar/index2.vue` 作为左侧栏,已有"英语"tab 入口(`activeSubmenu === 'english'`)。
+
+enspeak demo(React/Next.js)`SpeakingPanelV2.tsx` 实现了三层页面结构:
+- Layer 1:英语学科主页(教材/年级/单元联动 + 练习类型选择)
+- Layer 2:口语子页面(创建方式切换 + 任务筛选 + 推荐卡片)
+- Layer 3:具体配置页(如 TopicDiscussionConfig)
+
+本次只迁移话题讨论(Topic Discussion)功能,只做左侧配置面板。
+
+## Goals / Non-Goals
+
+**Goals:**
+- 完整迁移 demo 三层页面结构到 Vue 3(Layer 1 + Layer 2 + Layer 3)
+- Layer 1:教材/年级/单元三级联动下拉框 + 单元信息卡 + 练习类型入口
+- Layer 2:创建方式切换(参照 demo)+ 推荐卡片列表(目前只有话题讨论类型)
+- Layer 3:TopicDiscussionConfig 话题讨论配置(讨论话题、学习目标、练习方式、高级配置)
+- AI 生成模式只迁移 UI 壳子,保留切换入口
+- 配置完成后通过 `parentWindow.addTool(77)` 集成到课件
+- 所有文案走 i18n(cn/en/hk)
+
+**Non-Goals:**
+- 不实现听力、阅读、写作的配置页(只做口语 - 话题讨论)
+- 不实现右侧主预览区域(由独立项目完成)
+- 不实现学生端练习界面
+- 不实现 AI 生成的后端功能(只保留 UI)
+- 不实现后端 API 对接(静态 JSON 数据,后续改接口)
+- 不实现 TTS/ASR
+- 不做 teacher-dashboard
+
+## Decisions
+
+### 1. 组件目录结构
+
+```
+src/views/Editor/EnglishSpeaking/
+  SpeakingPanel.vue              # 三层页面容器(管理 layer1/layer2/config 切换)
+  layers/
+    Layer1Home.vue               # 英语学科主页:联动下拉框 + 单元信息 + 练习类型入口
+    Layer2Speaking.vue            # 口语子页面:创建方式切换 + 推荐卡片
+  configs/
+    TopicDiscussionConfig.vue    # 话题讨论配置(Layer 3)
+  components/
+    CurriculumSelector.vue       # 教材/年级/单元三级联动下拉框
+    UnitInfoCard.vue             # 单元信息展示卡片
+    ExerciseTypeGrid.vue         # 练习类型网格(口语/听力/阅读/写作)
+    RecommendCard.vue            # 推荐任务卡片
+    CreationModeSwitch.vue       # 创建方式切换(智能推荐/AI生成/手动创建)
+    AIGenerationForm.vue         # AI 生成表单(仅 UI 壳子)
+  data/
+    curriculum.json              # 教材联动数据(来源 units-en.txt)
+    topicDiscussionTasks.json    # 话题讨论推荐任务(来源 task.txt)
+```
+
+**Why**: 按页面层级 + 职责拆分组件,而非按功能类型一股脑堆在一个文件里。layers/ 对应三层导航,configs/ 对应具体配置页,components/ 是复用的 UI 片段。符合用户要求的"合理分组件"。
+
+**Alternatives considered**: 全部平铺在 EnglishSpeaking/ 下 — 文件多了会混乱,层级不清晰。
+
+### 2. 页面状态管理:组件内 ref
+
+三层页面切换(`pageMode: 'layer1' | 'layer2' | 'config'`)由 `SpeakingPanel.vue` 内的 ref 管理,不需要放 Pinia store。
+
+**Why**: 页面导航状态是纯 UI 状态,只在 SpeakingPanel 内部使用。demo 中也是组件内 useState 管理。Store 只放需要跨组件共享的配置数据。
+
+### 3. 配置数据管理:Pinia store `src/store/speaking.ts`
+
+管理话题讨论配置状态(topic、learningGoals、practice、evaluation 等),对应 demo 中 `useTopicDiscussionConfig` hook 的逻辑。
+
+**Why**: 配置数据需要在 Layer 2(推荐卡片预填充)和 Layer 3(配置表单编辑)之间共享,也需要在"应用配置"时传给父窗口。
+
+### 4. 类型定义:`src/types/englishSpeaking.ts`
+
+从 enspeak `useTopicDiscussionConfig.ts` 移植话题讨论相关类型:TopicDiscussionConfig、PracticeSettings、EvaluationSettings、LearningGoals、Role 等。只移植话题讨论需要的,不搬整个 types/index.ts。
+
+### 5. 集成方式:替换英语 tab submenu 内容
+
+当前 `CollapsibleToolbar/index2.vue` 英语 tab 的 submenu 里只有 video 占位。替换为渲染 `SpeakingPanel` 组件。
+
+**Why**: 利用现有 submenu 面板机制,不需要改动 CollapsibleToolbar 的框架逻辑。
+
+### 6. 与父应用通信:`addTool(77)`
+
+配置完成 → 调用 `parentWindow.addTool(77)` → 父应用回调 `window.addContent(data)` → PPT 创建 `{ type: 'frame', toolType: 77 }` element 嵌入 slide。
+
+toolType 77 需要在 `BaseFrameElement.vue` 的 `getTypeLabel` 中注册。
+
+## Risks / Trade-offs
+
+- **[Tailwind → SCSS]** → Demo 用 Tailwind CSS,PPT 用 SCSS。需要逐个转换样式。→ 优先保证功能和布局一致,视觉细节可迭代。
+- **[只有 Unit 2 有推荐数据]** → `topicDiscussionTasks.json` 目前只有 Unit 2 的 4 条推荐。→ 选择其他 Unit 时推荐列表为空,UI 上显示空状态提示,后续补充数据。
+- **[AI 生成无后端]** → UI 壳子就绪但无实际功能。→ 点击生成后可显示"功能开发中"提示,不影响主流程。
+- **[父应用 addTool(77) 未对接]** → 父应用侧还没有注册 77 类型工具。→ PPT 侧先做完配置面板,addTool 调用就绪,等父应用配合对接。

+ 55 - 0
openspec/changes/english-speaking/proposal.md

@@ -0,0 +1,55 @@
+## Why
+
+PPT 项目需要集成英语口语练习功能。现有 demo(enspeak 项目,React/Next.js)已验证了完整的教师端配置界面和口语练习类型体系,包括:单词跟读、句子跟读、文章朗读、演讲练习、自由对话(闲聊/话题讨论/模拟访谈)、情境任务等。现在需要将口语部分功能用 Vue 重写,集成到 PPT 主项目中,使教师可以在课件中嵌入英语口语练习活动。
+
+## Scope
+
+- **本次只实现话题讨论**(Topic Discussion),其他口语子类型后续迭代
+- **只做左侧配置面板**,右侧主预览区域由独立项目实现
+- 所有文案走 i18n(cn/en/hk 三语言)
+- 推荐卡片目前只出现"话题讨论"类型的任务
+
+## What Changes
+
+- 完整迁移 demo 的三层页面结构到 Vue:
+  - **Layer 1 英语学科主页**:3 个联动下拉框(教材/年级/单元)+ 单元信息卡片 + 练习类型入口(口语/听力/阅读/写作,本次只有口语可点击)
+  - **Layer 2 口语子页面**:创建方式切换 + 任务类型筛选 tabs + 推荐卡片列表(参照 demo SpeakingPanelV2.tsx 的 layer2 实现)
+  - **Layer 3 话题讨论配置页**:TopicDiscussionConfig(讨论话题、学习目标、练习方式、高级配置)
+- AI 生成模式只迁移 UI 壳子,不实现后端功能,保留切换入口
+- 智能推荐卡片数据来自 `topicDiscussionTasks.json`(源数据:`task.txt`),目前只有话题讨论类型
+- 手动创建与 demo 一致,直接进入 TopicDiscussionConfig 空表单
+- 新增话题讨论相关 TypeScript 类型定义(从 enspeak demo 移植)
+- 配置完成后通过 `parentWindow.addTool(77)` 通知父应用创建英语口语工具,最终以 `type: 'frame', toolType: 77` 的 element 嵌入 slide(与选择题 45、AI 应用 72 等工具一致的机制)
+- 在 `getTypeLabel` 中注册 toolType 77 的标签显示
+- 静态教学资源数据以 JSON 文件存储(后续改为接口获取):
+  - `curriculum.json`: 教材 → 年级 → 单元三级联动数据(textbooks[] → grades[] → units[]),每个单元包含 id、number、title、description、vocabulary[]、sentences[],数据来源于 `units-en.txt`
+  - `topicDiscussionTasks.json`: 按单元 ID 索引的话题讨论推荐任务(titleZh/titleEn、subtitle、difficulty、rounds、durationMinutes、vocabulary、sentences),数据来源于 `task.txt`
+
+## Capabilities
+
+### New Capabilities
+- `speaking-panel`: 三层页面容器 — Layer 1 英语学科主页(联动下拉框 + 单元信息 + 练习类型入口)、Layer 2 口语子页面(创建方式切换 + 推荐卡片)、面包屑导航
+- `speaking-free-dialogue`: 话题讨论配置(Layer 3)— 讨论话题、学习目标(词汇/句型)、练习方式、高级配置(辅助功能/评估维度/评分方式)、应用配置触发 addTool(77)
+
+### Modified Capabilities
+<!-- 无需修改现有 spec -->
+
+## Integration Mechanism
+
+PPT 编辑器以 iframe 嵌入父应用(cocorobo 平台),工具通过双向通信集成:
+
+1. **PPT → 父应用**: 教师配置完话题讨论后,调用 `parentWindow.addTool(77)` 通知父应用
+2. **父应用 → PPT**: 父应用创建工具实例,生成 URL,通过 `window.addContent(data, type)` 回传
+3. **PPT 插入 slide**: 创建 `{ type: 'frame', url: '...', toolType: 77 }` 的 element
+
+现有 toolType 编号:15(问答题), 45(选择题), 72(AI应用), 73(H5页面), 74(视频), 75(B站/YouTube), 76(创作空间) → **77: 英语口语**
+
+## Impact
+
+- **入口**: `src/components/CollapsibleToolbar/index2.vue` — 英语 tab submenu,当前只有 video 占位,替换为话题讨论配置入口
+- **组件**: 新增 `src/views/Editor/EnglishSpeaking/` 目录下的 Vue 组件(话题讨论配置)
+- **类型**: 新增 `src/types/englishSpeaking.ts`,从 enspeak demo 移植话题讨论相关类型
+- **Store**: 新增 `src/store/speaking.ts` Pinia store 管理配置状态
+- **Frame 注册**: `BaseFrameElement.vue` 的 `getTypeLabel` 需注册 toolType 77
+- **i18n**: `cn.json`/`en.json`/`hk.json` 需新增话题讨论相关翻译 key
+- **依赖**: 无新外部依赖,复用项目现有 Vue 3 + TypeScript + Pinia 技术栈

+ 81 - 0
openspec/changes/english-speaking/specs/speaking-free-dialogue/spec.md

@@ -0,0 +1,81 @@
+## ADDED Requirements
+
+### Requirement: Topic discussion configuration
+The TopicDiscussionConfig SHALL allow teacher to configure a topic discussion exercise, matching the demo `TopicDiscussionConfig.tsx` implementation.
+
+#### Scenario: Set discussion topic
+- **WHEN** teacher opens TopicDiscussionConfig
+- **THEN** teacher can input a discussion topic text
+
+### Requirement: Learning goals - vocabulary
+The TopicDiscussionConfig SHALL allow teacher to manage practice vocabulary.
+
+#### Scenario: Add vocabulary
+- **WHEN** teacher clicks the add button and types a word
+- **THEN** the word is added as a tag to the vocabulary list
+
+#### Scenario: Remove vocabulary
+- **WHEN** teacher clicks the remove button on a vocabulary tag
+- **THEN** the word is removed from the vocabulary list
+
+#### Scenario: Batch paste vocabulary and sentences
+- **WHEN** teacher clicks the batch paste button
+- **THEN** a dialog opens allowing teacher to paste multiple vocabulary items and sentences at once
+
+### Requirement: Learning goals - sentences
+The TopicDiscussionConfig SHALL allow teacher to manage practice sentences.
+
+#### Scenario: Add sentence
+- **WHEN** teacher clicks the add button and types a sentence
+- **THEN** the sentence is added to the sentence list
+
+#### Scenario: Edit sentence
+- **WHEN** teacher double-clicks a sentence
+- **THEN** the sentence becomes editable inline
+
+#### Scenario: Remove sentence
+- **WHEN** teacher clicks the remove button on a sentence
+- **THEN** the sentence is removed from the list
+
+### Requirement: Practice mode configuration
+The TopicDiscussionConfig SHALL allow teacher to set practice mode (time-limited or round-limited) with a slider.
+
+#### Scenario: Set time-limited mode
+- **WHEN** teacher selects "限制时长" mode
+- **THEN** a slider appears for setting duration (1-60 minutes)
+
+#### Scenario: Set round-limited mode
+- **WHEN** teacher selects "限制轮次" mode
+- **THEN** a slider appears for setting rounds (1-60 rounds)
+
+### Requirement: Show learning report toggle
+The TopicDiscussionConfig SHALL allow teacher to toggle whether to show the learning report to students.
+
+#### Scenario: Toggle learning report
+- **WHEN** teacher toggles the "展示学习报告" switch
+- **THEN** the report display setting is updated
+
+### Requirement: Advanced configuration - assistance
+The TopicDiscussionConfig SHALL provide an expandable advanced configuration section with assistance toggles.
+
+#### Scenario: Configure assistance options
+- **WHEN** teacher expands "高级配置" and views "辅助功能"
+- **THEN** teacher can toggle: 显示英文, 任务提示, 卡顿提示
+
+### Requirement: Advanced configuration - evaluation
+The TopicDiscussionConfig SHALL provide evaluation dimension checkboxes and score mode selection.
+
+#### Scenario: Configure evaluation dimensions
+- **WHEN** teacher views "评估详情"
+- **THEN** teacher can toggle dimensions: 准确度, 流畅度, 完整度, 节奏韵律
+
+#### Scenario: Configure score mode
+- **WHEN** teacher views "评分方式"
+- **THEN** teacher can select: 字母评分 (A-D), 量化评分 (0-100), or 仅展示评语
+
+### Requirement: Apply configuration
+The TopicDiscussionConfig SHALL have an "应用配置" button that triggers tool integration.
+
+#### Scenario: Apply configuration
+- **WHEN** teacher clicks "应用配置"
+- **THEN** the system calls `parentWindow.addTool(77)` to notify the parent application

+ 74 - 0
openspec/changes/english-speaking/specs/speaking-panel/spec.md

@@ -0,0 +1,74 @@
+## ADDED Requirements
+
+### Requirement: Three-layer page navigation
+The SpeakingPanel SHALL manage a three-layer page structure with breadcrumb navigation: Layer 1 (英语学科主页) → Layer 2 (口语子页面) → Layer 3 (配置页).
+
+#### Scenario: Navigate from Layer 1 to Layer 2
+- **WHEN** teacher clicks the "口语" exercise type on Layer 1
+- **THEN** the panel transitions to Layer 2 (口语子页面)
+- **THEN** the breadcrumb shows "英语学科 > 口语"
+
+#### Scenario: Navigate back via breadcrumb
+- **WHEN** teacher clicks "英语学科" in the breadcrumb on Layer 2
+- **THEN** the panel returns to Layer 1
+
+### Requirement: Curriculum cascading selectors
+Layer 1 SHALL display three cascading dropdown selectors for textbook, grade, and unit, loaded from `curriculum.json`.
+
+#### Scenario: Select textbook, grade, and unit
+- **WHEN** teacher selects a textbook, grade, and unit from the dropdowns
+- **THEN** the unit info card updates to show the selected unit's title and description
+
+### Requirement: Unit info card
+Layer 1 SHALL display a card showing the selected unit's title and learning description.
+
+#### Scenario: View unit info
+- **WHEN** a unit is selected
+- **THEN** the card displays the unit's title (e.g., "Going to school") and its description
+
+### Requirement: Exercise type grid
+Layer 1 SHALL display a grid of exercise types: 口语, 听力, 阅读, 写作.
+
+#### Scenario: Click speaking exercise type
+- **WHEN** teacher clicks "口语"
+- **THEN** the panel navigates to Layer 2
+
+#### Scenario: Click non-speaking exercise type
+- **WHEN** teacher clicks "听力", "阅读", or "写作"
+- **THEN** nothing happens (not implemented yet, visually disabled or show "coming soon")
+
+### Requirement: Creation mode switch on Layer 2
+Layer 2 SHALL support creation mode switching as implemented in the demo SpeakingPanelV2.tsx.
+
+#### Scenario: Switch between creation modes
+- **WHEN** teacher switches between 智能推荐, AI生成, and 手动创建
+- **THEN** the Layer 2 content updates to show the corresponding view
+
+### Requirement: Smart recommendation cards
+Layer 2 in 智能推荐 mode SHALL display recommendation cards from `topicDiscussionTasks.json`, filtered by selected unit ID.
+
+#### Scenario: View recommendations for a unit
+- **WHEN** Unit 2 is selected and 智能推荐 mode is active
+- **THEN** the panel displays 4 topic discussion recommendation cards with titleZh, subtitle, difficulty, rounds, durationMinutes
+
+#### Scenario: Click a recommendation card
+- **WHEN** teacher clicks a recommendation card
+- **THEN** the panel navigates to Layer 3 (TopicDiscussionConfig) pre-filled with the card's vocabulary and sentences
+
+#### Scenario: No recommendations for a unit
+- **WHEN** a unit with no recommendation data is selected
+- **THEN** the panel displays an empty state message
+
+### Requirement: AI generation UI shell
+Layer 2 in AI生成 mode SHALL display the AI generation form UI without backend functionality.
+
+#### Scenario: View AI generation form
+- **WHEN** teacher switches to AI生成 mode
+- **THEN** the AI generation form is displayed (UI only, no actual generation)
+
+### Requirement: Manual creation
+Layer 2 in 手动创建 mode SHALL navigate directly to the TopicDiscussionConfig with default/empty values.
+
+#### Scenario: Enter manual creation
+- **WHEN** teacher switches to 手动创建 mode
+- **THEN** the panel navigates to Layer 3 (TopicDiscussionConfig) with empty/default configuration

+ 38 - 0
openspec/changes/english-speaking/tasks.md

@@ -0,0 +1,38 @@
+## 1. 基础设施
+
+- [ ] 1.1 创建 `src/types/englishSpeaking.ts`,从 enspeak `useTopicDiscussionConfig.ts` 移植话题讨论相关类型(TopicDiscussionConfig, PracticeSettings, EvaluationSettings, LearningGoals, Role, PracticeMode, ScoreMode 等)
+- [ ] 1.2 创建 `src/store/speaking.ts` Pinia store,管理话题讨论配置状态(对应 demo 的 useTopicDiscussionConfig hook)
+- [ ] 1.3 在 i18n 文件(cn.json/en.json/hk.json)中新增英语口语相关翻译 key
+
+## 2. Layer 1 — 英语学科主页
+
+- [ ] 2.1 创建 `SpeakingPanel.vue` 三层页面容器,管理 pageMode(layer1/layer2/config)切换和面包屑导航
+- [ ] 2.2 创建 `CurriculumSelector.vue` 教材/年级/单元三级联动下拉框,数据从 `curriculum.json` 读取
+- [ ] 2.3 创建 `UnitInfoCard.vue` 单元信息展示卡片(标题 + 描述)
+- [ ] 2.4 创建 `ExerciseTypeGrid.vue` 练习类型网格(口语/听力/阅读/写作四个入口,本次只有口语可点击进入 Layer 2)
+- [ ] 2.5 创建 `Layer1Home.vue` 组合以上组件
+
+## 3. Layer 2 — 口语子页面
+
+- [ ] 3.1 创建 `CreationModeSwitch.vue` 创建方式切换组件(智能推荐/AI生成/手动创建),参照 demo 实现
+- [ ] 3.2 创建 `RecommendCard.vue` 推荐任务卡片组件(标题、副标题、难度、轮次、时长)
+- [ ] 3.3 创建 `AIGenerationForm.vue` AI 生成表单(仅 UI 壳子,不实现后端功能)
+- [ ] 3.4 创建 `Layer2Speaking.vue` 组合以上组件,实现:任务类型筛选 tabs、推荐卡片列表(数据从 `topicDiscussionTasks.json` 读取)、点击卡片进入 Layer 3 配置页
+
+## 4. Layer 3 — 话题讨论配置
+
+- [ ] 4.1 创建 `TopicDiscussionConfig.vue` 主框架,参照 demo `TopicDiscussionConfig.tsx`
+- [ ] 4.2 实现讨论话题输入 + 学习目标(练习词汇标签增删 + 练习句型列表增删编辑 + 批量粘贴)
+- [ ] 4.3 实现练习方式配置(限制时长/限制轮次切换 + 滑块)+ 展示学习报告开关
+- [ ] 4.4 实现高级配置(辅助功能 checkbox + 评估维度 checkbox + 评分方式 radio)
+- [ ] 4.5 实现底部"应用配置"按钮,调用 `parentWindow.addTool(77)`
+
+## 5. 编辑器集成
+
+- [ ] 5.1 将 `CollapsibleToolbar/index2.vue` 英语 tab submenu 内容替换为 `SpeakingPanel` 组件
+- [ ] 5.2 在 `BaseFrameElement.vue` 的 `getTypeLabel` 中注册 toolType 77
+
+## 6. 样式与验证
+
+- [ ] 6.1 将 demo Tailwind 样式转换为 SCSS,适配 PPT 项目样式体系
+- [ ] 6.2 端到端验证:英语 tab → Layer 1 选单元 → 点口语 → Layer 2 选推荐卡片 → Layer 3 配置 → 应用配置

+ 20 - 0
openspec/config.yaml

@@ -0,0 +1,20 @@
+schema: spec-driven
+
+# Project context (optional)
+# This is shown to AI when creating artifacts.
+# Add your tech stack, conventions, style guides, domain knowledge, etc.
+# Example:
+#   context: |
+#     Tech stack: TypeScript, React, Node.js
+#     We use conventional commits
+#     Domain: e-commerce platform
+
+# Per-artifact rules (optional)
+# Add custom rules for specific artifacts.
+# Example:
+#   rules:
+#     proposal:
+#       - Keep proposals under 500 words
+#       - Always include a "Non-goals" section
+#     tasks:
+#       - Break tasks into chunks of max 2 hours

+ 113 - 0
src/views/Editor/EnglishSpeaking/data/curriculum.json

@@ -0,0 +1,113 @@
+{
+  "textbooks": [
+    {
+      "id": "shep",
+      "name": "沪教版(上海教育出版社)",
+      "grades": [
+        {
+          "id": "grade5-1",
+          "name": "五年级",
+          "semester": "上",
+          "units": [
+            {
+              "id": "SHEP-5-上-Unit1",
+              "number": "Unit 1",
+              "title": "My future",
+              "description": "学习描述职业和未来理想。掌握词汇 want, pilot, teach, cook, taxi driver, job, become 等;能用 \"What do you want to be?\" 询问,用 \"I want to be a pilot.\" 回答",
+              "vocabulary": ["want", "pilot", "teach", "cook", "taxi driver", "job", "become", "singer", "fall", "lifeguard", "save", "(be) good at"],
+              "sentences": ["What do you want to be?", "I want to be a pilot."]
+            },
+            {
+              "id": "SHEP-5-上-Unit2",
+              "number": "Unit 2",
+              "title": "Going to school",
+              "description": "学习描述上学方式和交通工具。掌握核心词汇 by, walk, Ms, underground, take, after, hour(目录 Key words);认读词汇包括 journey, primary school, station, bus stop, by bus, on foot, by bike, by car, get off 等;语音重点:辅音组合 sp(wasp, crisp)",
+              "vocabulary": ["by", "walk", "Ms", "underground", "take", "after", "hour", "journey", "primary school", "station", "bus stop", "by bus", "far from", "on foot", "by bike", "by car", "get off"],
+              "sentences": ["How do you come to school?", "I come to school by bus.", "I come to school on foot.", "Do you live near school?", "I live far from school.", "How long does it take?", "My father goes to work by...", "In my class, ... students come to school on foot."]
+            },
+            {
+              "id": "SHEP-5-上-Unit3",
+              "number": "Unit 3",
+              "title": "My birthday",
+              "description": "学习描述生日和日期。掌握词汇 party, when, begin, bring, thing, favourite, interesting, hat 等;能用 \"When's your birthday?\" 询问,用 \"It's on 26th September.\" 回答",
+              "vocabulary": ["party", "when", "begin", "bring", "thing", "favourite", "interesting", "hat", "have fun"],
+              "sentences": ["When's your birthday?", "It's on 26th September."]
+            },
+            {
+              "id": "SHEP-5-上-Unit4",
+              "number": "Unit 4",
+              "title": "Grandparents",
+              "description": "学习描述与祖父母的日常活动及频率。掌握词汇 usually, often, visit, sometimes, always, never 等;能用 \"What do you usually do with your grandparents?\" 询问,用 \"I usually play chess with my grandpa.\" 回答",
+              "vocabulary": ["usually", "often", "visit", "sometimes", "always", "never", "play sport", "go shopping"],
+              "sentences": ["What do you usually do with your grandparents?", "I usually play chess with my grandpa."]
+            },
+            {
+              "id": "SHEP-5-上-Unit5",
+              "number": "Unit 5",
+              "title": "Friends",
+              "description": "学习描述朋友特点和共同爱好。掌握词汇 clever, same, class, both, heavy, different, word, easy, say, ask, answer 等;能用 \"We both like sport.\" 描述共同爱好",
+              "vocabulary": ["clever", "same", "class", "both", "heavy", "different", "word", "easy", "say", "ask", "answer", "cross", "carry", "bored", "soon", "each other", "make phone calls", "tell a story"],
+              "sentences": ["We both like sport."]
+            },
+            {
+              "id": "SHEP-5-上-Unit6",
+              "number": "Unit 6",
+              "title": "Family life",
+              "description": "学习描述家庭日常生活和家居场所。掌握词汇 living room, bedroom, kitchen, bathroom, their, light, watch, TV, before 等;能用 \"I'm doing my homework.\" 描述正在进行的动作",
+              "vocabulary": ["living room", "bedroom", "kitchen", "bathroom", "their", "light", "watch", "TV", "before", "bedtime", "do homework", "turn off", "watch TV", "model plane", "life"],
+              "sentences": ["I'm doing my homework."]
+            },
+            {
+              "id": "SHEP-5-上-Unit7",
+              "number": "Unit 7",
+              "title": "At the beach",
+              "description": "学习描述海滩活动和现在进行时。掌握词汇 beach, enjoy, collect, sea, letter, put, know, year 等;能用 \"Is Paul collecting shells? Yes, he is.\" 描述他人正在进行的活动",
+              "vocabulary": ["beach", "enjoy", "collect", "sea", "letter", "put", "know", "year", "shell", "sunshine", "on holiday", "have a good time"],
+              "sentences": ["Is Paul collecting shells?", "Yes, he is."]
+            },
+            {
+              "id": "SHEP-5-上-Unit8",
+              "number": "Unit 8",
+              "title": "An outing",
+              "description": "学习描述外出活动和询问他人活动。掌握词汇 map, hill, find, another, lake, key, think 等;能用 \"What are you doing? I'm reading the map.\" 进行问答",
+              "vocabulary": ["map", "hill", "find", "another", "lake", "key", "think", "outing", "diamond", "funny", "hole", "at the top of", "get through"],
+              "sentences": ["What are you doing?", "I'm reading the map."]
+            },
+            {
+              "id": "SHEP-5-上-Unit9",
+              "number": "Unit 9",
+              "title": "Around the city",
+              "description": "学习描述城市方位和问路指路。掌握词汇 post office, quite, along, turn, left, right, between, flower shop, hospital, toy shop 等;能用 \"Walk along Winter Street. Turn left at Spring Street.\" 描述路线",
+              "vocabulary": ["post office", "quite", "along", "turn", "left", "right", "between", "flower shop", "hospital", "toy shop", "road", "get to", "straight"],
+              "sentences": ["Walk along Winter Street.", "Turn left at Spring Street."]
+            },
+            {
+              "id": "SHEP-5-上-Unit10",
+              "number": "Unit 10",
+              "title": "Wind",
+              "description": "学习描述风的特征和副词用法。掌握词汇 blow, gently, softly, strongly, happily, move, slowly, quickly, sound, paper, quiet 等;能用 \"The children are flying their kites happily.\" 描述动作方式",
+              "vocabulary": ["blow", "gently", "softly", "strongly", "happily", "move", "slowly", "quickly", "sound", "paper", "quiet", "windmill", "wind-bell", "cut"],
+              "sentences": ["The children are flying their kites happily."]
+            },
+            {
+              "id": "SHEP-5-上-Unit11",
+              "number": "Unit 11",
+              "title": "Water",
+              "description": "学习描述水的用途和自然现象。掌握词汇 use, clothes, farmer, useful, up, shine, over, tree, ground 等;能用 \"We use water to wash our hands.\" 表达用途",
+              "vocabulary": ["use", "clothes", "farmer", "useful", "up", "shine", "over", "tree", "ground", "tap", "vegetable", "drop", "mountain", "inside", "grow crops", "put out fires"],
+              "sentences": ["We use water to wash our hands."]
+            },
+            {
+              "id": "SHEP-5-上-Unit12",
+              "number": "Unit 12",
+              "title": "Fire",
+              "description": "学习描述火灾安全和情态动词 must/mustn't。掌握词汇 fire, hurt, must, careful, smoke, hate 等;能用 \"We must be careful with fire. We mustn't play with matches.\" 表达规则",
+              "vocabulary": ["fire", "hurt", "must", "careful", "smoke", "hate", "burn", "safety", "match", "heat", "burn down", "(be) careful with", "not at all"],
+              "sentences": ["We must be careful with fire.", "We mustn't play with matches."]
+            }
+          ]
+        }
+      ]
+    }
+  ]
+}

+ 52 - 0
src/views/Editor/EnglishSpeaking/data/topicDiscussionTasks.json

@@ -0,0 +1,52 @@
+{
+  "SHEP-5-上-Unit2": [
+    {
+      "id": "td-unit2-1",
+      "titleZh": "我的上学方式",
+      "titleEn": "How I get to school",
+      "subtitle": "和 AI 聊聊你每天怎么上学",
+      "difficulty": 1,
+      "rounds": 6,
+      "durationMinutes": 4,
+      "vocabulary": ["on foot", "by bus", "by bike", "by car", "by underground", "bus stop", "near", "far from"],
+      "sentences": ["How do you come to school?", "I come to school by bus.", "Do you live near school?", "I live far from school.", "How long does it take?"],
+      "note": "核心句型:How do you come to school? I come to school by/on..."
+    },
+    {
+      "id": "td-unit2-2",
+      "titleZh": "比较交通方式",
+      "titleEn": "Comparing ways to travel",
+      "subtitle": "讨论不同交通方式的优缺点",
+      "difficulty": 2,
+      "rounds": 8,
+      "durationMinutes": 5,
+      "vocabulary": ["fast", "slow", "cheap", "expensive", "safe", "convenient", "crowded", "on foot", "by bus", "by underground"],
+      "sentences": ["Which is faster, bus or underground?", "I think... is more convenient.", "Going by bike is good for health."],
+      "note": "对比 on foot, by bus, by bike, by underground 等方式"
+    },
+    {
+      "id": "td-unit2-3",
+      "titleZh": "家人的出行方式",
+      "titleEn": "How my family gets around",
+      "subtitle": "介绍家人上班上学的交通方式",
+      "difficulty": 2,
+      "rounds": 7,
+      "durationMinutes": 5,
+      "vocabulary": ["goes to work", "takes the bus", "drives", "walk to", "by underground", "far from", "near", "every day"],
+      "sentences": ["My father/mother goes to work by...", "How does your father come to work?", "I go to school on foot.", "We live near the school."],
+      "note": "句型:My father/mother goes to work by... I go to school..."
+    },
+    {
+      "id": "td-unit2-4",
+      "titleZh": "上学路上的见闻",
+      "titleEn": "Things I see on my way to school",
+      "subtitle": "分享上学路上看到的有趣事物",
+      "difficulty": 3,
+      "rounds": 8,
+      "durationMinutes": 6,
+      "vocabulary": ["bus stop", "traffic lights", "road", "cross", "walk", "along", "turn", "corner", "shop", "people"],
+      "sentences": ["On my way to school, I can see...", "I walk along...", "I turn left/right at...", "It takes me ... minutes to get to school."],
+      "note": "综合运用本单元词汇和句型,培养叙事能力"
+    }
+  ]
+}

+ 5 - 0
task.txt

@@ -0,0 +1,5 @@
+单元ID	一级分类	二级分类	任务标题(中文)	任务话题(英文)	任务副标题	练习词汇	练习句型	难度等级	轮次	预计时长(分钟)	备注
+SHEP-5-上-Unit2	口语	话题讨论	我的上学方式	How I get to school	和 AI 聊聊你每天怎么上学	on foot, by bus, by bike, by car, by underground, bus stop, near, far from	How do you come to school?; I come to school by bus.; Do you live near school?; I live far from school.; How long does it take?	初级	6	4	核心句型:How do you come to school? I come to school by/on...
+SHEP-5-上-Unit2	口语	话题讨论	比较交通方式	Comparing ways to travel	讨论不同交通方式的优缺点	fast, slow, cheap, expensive, safe, convenient, crowded, on foot, by bus, by underground	Which is faster, bus or underground?; I think... is more convenient.; Going by bike is good for health.	中级	8	5	对比 on foot, by bus, by bike, by underground 等方式
+SHEP-5-上-Unit2	口语	话题讨论	家人的出行方式	How my family gets around	介绍家人上班上学的交通方式	goes to work, takes the bus, drives, walk to, by underground, far from, near, every day	My father/mother goes to work by...; How does your father come to work?; I go to school on foot.; We live near the school.	中级	7	5	句型:My father/mother goes to work by... I go to school...
+SHEP-5-上-Unit2	口语	话题讨论	上学路上的见闻	Things I see on my way to school	分享上学路上看到的有趣事物	bus stop, traffic lights, road, cross, walk, along, turn, corner, shop, people	On my way to school, I can see...; I walk along...; I turn left/right at...; It takes me ... minutes to get to school.	中高级	8	6	综合运用本单元词汇和句型,培养叙事能力

+ 14 - 0
units-en copy 2.txt

@@ -0,0 +1,14 @@
+单元ID	一级分类	二级分类	任务标题	任务副标题	难度等级	轮次	预计时长(分钟)	备注
+SHEP-5-上-Unit2	听力	听说练习	Listen and say	听 Jill/Joe/Alice/Kitty/Peter 的上学对话并跟读				教材 p.8,核心句型:How do you come to school?
+SHEP-5-上-Unit2	写作	填写练习	Complete Jill's notes	根据对话内容填写 Jill 的笔记				教材 p.9,补全 Joe/Alice/Kitty/Peter 的上学方式
+SHEP-5-上-Unit2	阅读	阅读理解	Look and read	阅读 Ms Guo 的上学路线故事并回答问题				教材 p.10-11,故事:Ms Guo's journey to work
+SHEP-5-上-Unit2	阅读	图文配对	Complete the map	根据故事内容完成路线地图填空				教材 p.12
+SHEP-5-上-Unit2	口语	情景任务	Draw and say	画出自己的上学路线图并描述				教材 p.12,句型:I live far from/near my school. I go to school ...
+SHEP-5-上-Unit2	口语	调查活动	Do a survey	调查同学的上学方式并完成统计图				教材 p.13,句型:How do you come to school? / In my class, ... students come to school on foot.
+SHEP-5-上-Unit2	写作	看图写话	Think and write	看图写出家人的出行方式				教材 p.14,句型:My father goes to work ... / I go to school ...
+SHEP-5-上-Unit2	听力	语音学习	Learn the sounds	学习辅音组合 sp 的发音(wasp, crisp)				教材 p.15,phonics:sp
+单元ID	一级分类	二级分类	任务标题(中文)	任务话题(英文)	任务副标题	练习词汇	练习句型	难度等级	轮次	预计时长(分钟)	备注
+SHEP-5-上-Unit2	口语	话题讨论	我的上学方式	How I get to school	和 AI 聊聊你每天怎么上学	on foot, by bus, by bike, by car, by underground, bus stop, near, far from	How do you come to school?; I come to school by bus.; Do you live near school?; I live far from school.; How long does it take?	初级	6	4	核心句型:How do you come to school? I come to school by/on...
+SHEP-5-上-Unit2	口语	话题讨论	比较交通方式	Comparing ways to travel	讨论不同交通方式的优缺点	fast, slow, cheap, expensive, safe, convenient, crowded, on foot, by bus, by underground	Which is faster, bus or underground?; I think... is more convenient.; Going by bike is good for health.	中级	8	5	对比 on foot, by bus, by bike, by underground 等方式
+SHEP-5-上-Unit2	口语	话题讨论	家人的出行方式	How my family gets around	介绍家人上班上学的交通方式	goes to work, takes the bus, drives, walk to, by underground, far from, near, every day	My father/mother goes to work by...; How does your father come to work?; I go to school on foot.; We live near the school.	中级	7	5	句型:My father/mother goes to work by... I go to school...
+SHEP-5-上-Unit2	口语	话题讨论	上学路上的见闻	Things I see on my way to school	分享上学路上看到的有趣事物	bus stop, traffic lights, road, cross, walk, along, turn, corner, shop, people	On my way to school, I can see...; I walk along...; I turn left/right at...; It takes me ... minutes to get to school.	中高级	8	6	综合运用本单元词汇和句型,培养叙事能力

+ 13 - 0
units-en.txt

@@ -0,0 +1,13 @@
+单元ID	教材	年级	学期	单元编号	单元标题	学习目标描述	练习词汇(逗号分隔)	练习句型(分号分隔)
+SHEP-5-上-Unit1	沪教版(上海教育出版社)	五年级	上	Unit 1	My future	"学习描述职业和未来理想。掌握词汇 want, pilot, teach, cook, taxi driver, job, become 等;能用 ""What do you want to be?"" 询问,用 ""I want to be a pilot."" 回答"	want, pilot, teach, cook, taxi driver, job, become, singer, fall, lifeguard, save, (be) good at	What do you want to be?; I want to be a pilot.
+SHEP-5-上-Unit2	沪教版(上海教育出版社)	五年级	上	Unit 2	Going to school	学习描述上学方式和交通工具。掌握核心词汇 by, walk, Ms, underground, take, after, hour(目录 Key words);认读词汇包括 journey, primary school, station, bus stop, by bus, on foot, by bike, by car, get off 等;语音重点:辅音组合 sp(wasp, crisp)	by, walk, Ms, underground, take, after, hour, journey, primary school, station, bus stop, by bus, far from, on foot, by bike, by car, get off	How do you come to school?; I come to school by bus.; I come to school on foot.; Do you live near school?; I live far from school.; How long does it take?; My father goes to work by...; In my class, ... students come to school on foot.
+SHEP-5-上-Unit3	沪教版(上海教育出版社)	五年级	上	Unit 3	My birthday	"学习描述生日和日期。掌握词汇 party, when, begin, bring, thing, favourite, interesting, hat 等;能用 ""When's your birthday?"" 询问,用 ""It's on 26th September."" 回答"	party, when, begin, bring, thing, favourite, interesting, hat, have fun	When's your birthday?; It's on 26th September.
+SHEP-5-上-Unit4	沪教版(上海教育出版社)	五年级	上	Unit 4	Grandparents	"学习描述与祖父母的日常活动及频率。掌握词汇 usually, often, visit, sometimes, always, never 等;能用 ""What do you usually do with your grandparents?"" 询问,用 ""I usually play chess with my grandpa."" 回答"	usually, often, visit, sometimes, always, never, play sport, go shopping	What do you usually do with your grandparents?; I usually play chess with my grandpa.
+SHEP-5-上-Unit5	沪教版(上海教育出版社)	五年级	上	Unit 5	Friends	"学习描述朋友特点和共同爱好。掌握词汇 clever, same, class, both, heavy, different, word, easy, say, ask, answer 等;能用 ""We both like sport."" 描述共同爱好"	clever, same, class, both, heavy, different, word, easy, say, ask, answer, cross, carry, bored, soon, each other, make phone calls, tell a story	We both like sport.
+SHEP-5-上-Unit6	沪教版(上海教育出版社)	五年级	上	Unit 6	Family life	"学习描述家庭日常生活和家居场所。掌握词汇 living room, bedroom, kitchen, bathroom, their, light, watch, TV, before 等;能用 ""I'm doing my homework."" 描述正在进行的动作"	living room, bedroom, kitchen, bathroom, their, light, watch, TV, before, bedtime, do homework, turn off, watch TV, model plane, life	I'm doing my homework.
+SHEP-5-上-Unit7	沪教版(上海教育出版社)	五年级	上	Unit 7	At the beach	"学习描述海滩活动和现在进行时。掌握词汇 beach, enjoy, collect, sea, letter, put, know, year 等;能用 ""Is Paul collecting shells? Yes, he is."" 描述他人正在进行的活动"	beach, enjoy, collect, sea, letter, put, know, year, shell, sunshine, on holiday, have a good time	Is Paul collecting shells?; Yes, he is.
+SHEP-5-上-Unit8	沪教版(上海教育出版社)	五年级	上	Unit 8	An outing	"学习描述外出活动和询问他��活动。掌握词汇 map, hill, find, another, lake, key, think 等;能用 ""What are you doing? I'm reading the map."" 进行问答"	map, hill, find, another, lake, key, think, outing, diamond, funny, hole, at the top of, get through	What are you doing?; I'm reading the map.
+SHEP-5-上-Unit9	沪教版(上海教育出版社)	五年级	上	Unit 9	Around the city	"学习描述城市方位和问路指路。掌握词汇 post office, quite, along, turn, left, right, between, flower shop, hospital, toy shop 等;能用 ""Walk along Winter Street. Turn left at Spring Street."" 描述路线"	post office, quite, along, turn, left, right, between, flower shop, hospital, toy shop, road, get to, straight	Walk along Winter Street.; Turn left at Spring Street.
+SHEP-5-上-Unit10	沪教版(上海教育出版社)	五年级	上	Unit 10	Wind	"学习描述风的特征和副词用法。掌握词汇 blow, gently, softly, strongly, happily, move, slowly, quickly, sound, paper, quiet 等;能用 ""The children are flying their kites happily."" 描述动作方式"	blow, gently, softly, strongly, happily, move, slowly, quickly, sound, paper, quiet, windmill, wind-bell, cut	The children are flying their kites happily.
+SHEP-5-上-Unit11	沪教版(上海教育出版社)	五年级	上	Unit 11	Water	"学习描述水的用途和自然现象。掌握词汇 use, clothes, farmer, useful, up, shine, over, tree, ground 等;能用 ""We use water to wash our hands."" 表达用途"	use, clothes, farmer, useful, up, shine, over, tree, ground, tap, vegetable, drop, mountain, inside, grow crops, put out fires	We use water to wash our hands.
+SHEP-5-上-Unit12	沪教版(上海教育出版社)	五年级	上	Unit 12	Fire	"学习描述火灾安全和情态动词 must/mustn't。掌握词汇 fire, hurt, must, careful, smoke, hate 等;能用 ""We must be careful with fire. We mustn't play with matches."" 表达规则"	fire, hurt, must, careful, smoke, hate, burn, safety, match, heat, burn down, (be) careful with, not at all	We must be careful with fire.; We mustn't play with matches.