yonge 1 tydzień temu
rodzic
commit
0c27c3d51c

+ 1 - 1
dist/assets/index-AV00OC_I.js → dist/assets/index-BQbc2p8e.js

@@ -1,4 +1,4 @@
-import{cF as dw,cG as hw,aG as vw,cH as pw,cI as gw,cJ as mw,cK as yw,ah as Yt,cL as Sw,cM as bw,cN as xw,cO as Cw,aM as ww,aF as Tw,cP as Iw,aB as c1,bg as _w,cQ as Aw,cR as Ew,cS as Pw,cT as Mw,cU as Rw,cV as Dw,cW as Lw,aE as kw,cX as Ow,s as Ae,bl as Bw,al as je,ag as ze,af as ve,ak as Z,cY as Nw,cZ as Fw,c_ as $w,c$ as zw,bk as Uw,cw as ul,aS as Cv,aq as Ye,d0 as Hw,d1 as Vw,a5 as $e,d2 as Gw,d3 as Ww,d4 as jw,d5 as Kw,d6 as Xw,d7 as Yw,d8 as Zw,d9 as Qw,da as Jw,db as qw,dc as eT,v as tT,dd as rT,de as nT,df as iT,aW as aT,dg as oT,dh as sT,di as lT,dj as uT,dk as cT,ay as sr,dl as fT,dm as dT,dn as hT,dp as vT,A as pT,dq as gT,dr as mT,bq as yT,ds as ST,dt as bT,du as xT,ap as CT,ac as f1,ai as dt,dv as wT,au as Ce,dw as TT,X as d1,y as IT,dx as _T,aP as AT,dy as ET,w as _r,dz as PT,dA as MT,H as RT,dB as DT,bA as hn,aD as LT,ae as ie,bN as ea,$ as wc,dC as kT,bM as ta,dD as OT,aC as BT,aO as NT,R as fe,dE as FT,br as rh,b3 as Lr,aj as Hs,b1 as lt,b2 as Ua,an as wv,dF as $T,dG as zT,dH as UT,dI as HT,dJ as VT,dK as GT,dL as WT,Q as jT,dM as KT,dN as XT,dO as YT,at as Mt,dP as ZT,aR as QT,aY as JT,ad as cl,aZ as qT,dQ as eI,dR as tI,dS as rI,P as le,a6 as nI,dT as iI,dU as aI,dV as oI,dW as sI,a7 as lI,dX as uI,dY as cI,dZ as fI,d_ as dI,d$ as hI,b4 as vI,aA as Tv,e0 as pI,e1 as gI,E as gr,x as mI,e2 as yI,e3 as SI,e4 as bI,am as _n,e5 as xI,az as hr,aU as nh,e6 as CI,as as jr,e7 as wI,e8 as Iv,cE as mr,by as ih,ct as ah,bI as TI,bH as Ve,bu as oh,bv as _v,bx as Wt,bB as Tc,bL as di,e9 as wu,bE as hi,ea as II,bJ as ra,bC as _I,bw as Bt,eb as AI,ec as ui,cu as EI,ed as PI,ee as MI,ef as RI,eg as DI,bK as Zp,eh as LI,bF as Qp,cB as Ic,cA as kI,ei as Hu,ej as Il}from"./index-Dfvg3Po0.js";/**
+import{cF as dw,cG as hw,aG as vw,cH as pw,cI as gw,cJ as mw,cK as yw,ah as Yt,cL as Sw,cM as bw,cN as xw,cO as Cw,aM as ww,aF as Tw,cP as Iw,aB as c1,bg as _w,cQ as Aw,cR as Ew,cS as Pw,cT as Mw,cU as Rw,cV as Dw,cW as Lw,aE as kw,cX as Ow,s as Ae,bl as Bw,al as je,ag as ze,af as ve,ak as Z,cY as Nw,cZ as Fw,c_ as $w,c$ as zw,bk as Uw,cw as ul,aS as Cv,aq as Ye,d0 as Hw,d1 as Vw,a5 as $e,d2 as Gw,d3 as Ww,d4 as jw,d5 as Kw,d6 as Xw,d7 as Yw,d8 as Zw,d9 as Qw,da as Jw,db as qw,dc as eT,v as tT,dd as rT,de as nT,df as iT,aW as aT,dg as oT,dh as sT,di as lT,dj as uT,dk as cT,ay as sr,dl as fT,dm as dT,dn as hT,dp as vT,A as pT,dq as gT,dr as mT,bq as yT,ds as ST,dt as bT,du as xT,ap as CT,ac as f1,ai as dt,dv as wT,au as Ce,dw as TT,X as d1,y as IT,dx as _T,aP as AT,dy as ET,w as _r,dz as PT,dA as MT,H as RT,dB as DT,bA as hn,aD as LT,ae as ie,bN as ea,$ as wc,dC as kT,bM as ta,dD as OT,aC as BT,aO as NT,R as fe,dE as FT,br as rh,b3 as Lr,aj as Hs,b1 as lt,b2 as Ua,an as wv,dF as $T,dG as zT,dH as UT,dI as HT,dJ as VT,dK as GT,dL as WT,Q as jT,dM as KT,dN as XT,dO as YT,at as Mt,dP as ZT,aR as QT,aY as JT,ad as cl,aZ as qT,dQ as eI,dR as tI,dS as rI,P as le,a6 as nI,dT as iI,dU as aI,dV as oI,dW as sI,a7 as lI,dX as uI,dY as cI,dZ as fI,d_ as dI,d$ as hI,b4 as vI,aA as Tv,e0 as pI,e1 as gI,E as gr,x as mI,e2 as yI,e3 as SI,e4 as bI,am as _n,e5 as xI,az as hr,aU as nh,e6 as CI,as as jr,e7 as wI,e8 as Iv,cE as mr,by as ih,ct as ah,bI as TI,bH as Ve,bu as oh,bv as _v,bx as Wt,bB as Tc,bL as di,e9 as wu,bE as hi,ea as II,bJ as ra,bC as _I,bw as Bt,eb as AI,ec as ui,cu as EI,ed as PI,ee as MI,ef as RI,eg as DI,bK as Zp,eh as LI,bF as Qp,cB as Ic,cA as kI,ei as Hu,ej as Il}from"./index-QfGvh56f.js";/**
 * vue v3.4.34
 * (c) 2018-present Yuxi (Evan) You and Vue contributors
 * @license MIT

+ 1 - 1
dist/assets/index-DgNDSzoq.js → dist/assets/index-BTaoV6AE.js

@@ -1 +1 @@
-import{_ as t}from"./404-R0y5dkvZ.js";import{E as c}from"./index-DiO6wLJJ.js";import{a5 as n,ae as i,af as r,ak as o,aq as _,am as d,P as l,aS as p,bM as m,bN as f,bH as u}from"./index-Dfvg3Po0.js";const s=a=>(m("data-v-340bbdaa"),a=a(),f(),a),h={class:"login"},b={class:"error"},g=s(()=>o("img",{src:t,class:"img",alt:""},null,-1)),k=s(()=>o("div",{class:"tit"},"登录已过期或服务器错误!",-1)),v=n({__name:"login",setup(a){function e(){window.close()}return(x,B)=>(i(),r("div",h,[o("div",b,[g,k,_(l(c),{class:"backBtn",type:"primary",plain:"",onClick:e},{default:d(()=>[p("关闭页面")]),_:1})])]))}}),S=u(v,[["__scopeId","data-v-340bbdaa"]]);export{S as default};
+import{_ as t}from"./404-R0y5dkvZ.js";import{E as c}from"./index-BTt4Ga5a.js";import{a5 as n,ae as i,af as r,ak as o,aq as _,am as d,P as l,aS as p,bM as m,bN as f,bH as u}from"./index-QfGvh56f.js";const s=a=>(m("data-v-340bbdaa"),a=a(),f(),a),h={class:"login"},b={class:"error"},g=s(()=>o("img",{src:t,class:"img",alt:""},null,-1)),k=s(()=>o("div",{class:"tit"},"登录已过期或服务器错误!",-1)),v=n({__name:"login",setup(a){function e(){window.close()}return(x,B)=>(i(),r("div",h,[o("div",b,[g,k,_(l(c),{class:"backBtn",type:"primary",plain:"",onClick:e},{default:d(()=>[p("关闭页面")]),_:1})])]))}}),S=u(v,[["__scopeId","data-v-340bbdaa"]]);export{S as default};

Plik diff jest za duży
+ 0 - 0
dist/assets/index-BTt4Ga5a.js


Plik diff jest za duży
+ 0 - 0
dist/assets/index-C7tzRCFc.css


Plik diff jest za duży
+ 0 - 0
dist/assets/index-CDzf_H5e.js


Plik diff jest za duży
+ 0 - 0
dist/assets/index-CQ5ffcXX.css


Plik diff jest za duży
+ 0 - 0
dist/assets/index-DaIPj8X3.js


+ 1 - 1
dist/assets/index-CnpK3sR9.js → dist/assets/index-DbaM6D9B.js

@@ -1 +1 @@
-import{_ as a}from"./404-R0y5dkvZ.js";import{a5 as o,en as t,ae as r,af as c,bM as _,bN as d,ak as s,bH as p}from"./index-Dfvg3Po0.js";const i=e=>(_("data-v-dda25179"),e=e(),d(),e),n={class:"errorPage"},m=i(()=>s("div",{class:"error"},[s("img",{src:a,class:"img",alt:""}),s("div",{class:"tit"},"页面找不到了~")],-1)),l=[m],f=o({__name:"errorPage",setup(e){return t(),(u,h)=>(r(),c("div",n,l))}}),I=p(f,[["__scopeId","data-v-dda25179"]]);export{I as default};
+import{_ as a}from"./404-R0y5dkvZ.js";import{a5 as o,en as t,ae as r,af as c,bM as _,bN as d,ak as s,bH as p}from"./index-QfGvh56f.js";const i=e=>(_("data-v-dda25179"),e=e(),d(),e),n={class:"errorPage"},m=i(()=>s("div",{class:"error"},[s("img",{src:a,class:"img",alt:""}),s("div",{class:"tit"},"页面找不到了~")],-1)),l=[m],f=o({__name:"errorPage",setup(e){return t(),(u,h)=>(r(),c("div",n,l))}}),I=p(f,[["__scopeId","data-v-dda25179"]]);export{I as default};

+ 1 - 1
dist/assets/index-CfTnRDko.js → dist/assets/index-Dr4QGPNx.js

@@ -1 +1 @@
-import{u as s,af as r}from"./index-AV00OC_I.js";import{a5 as c,cB as n,R as p,ae as t,af as _,al as u,ag as i,bH as f}from"./index-Dfvg3Po0.js";const l={class:"pptScreen"},m=c({__name:"pptScreen",setup(d){const a=n(),e=p(!0),o=s();return a.setScreenMode("pptScreen"),o.initPPTData().then(()=>{e.value=!1}),(S,k)=>(t(),_("div",l,[e.value?i("",!0):(t(),u(r,{key:0}))]))}}),P=f(m,[["__scopeId","data-v-678905e9"]]);export{P as default};
+import{u as s,af as r}from"./index-BQbc2p8e.js";import{a5 as c,cB as n,R as p,ae as t,af as _,al as u,ag as i,bH as f}from"./index-QfGvh56f.js";const l={class:"pptScreen"},m=c({__name:"pptScreen",setup(d){const a=n(),e=p(!0),o=s();return a.setScreenMode("pptScreen"),o.initPPTData().then(()=>{e.value=!1}),(S,k)=>(t(),_("div",l,[e.value?i("",!0):(t(),u(r,{key:0}))]))}}),P=f(m,[["__scopeId","data-v-678905e9"]]);export{P as default};

Plik diff jest za duży
+ 1 - 1
dist/assets/index-QfGvh56f.js


+ 1 - 1
dist/assets/index-CyI7BBbx.js → dist/assets/index-bBMzNlm8.js

@@ -1 +1 @@
-import{u as c,af as l}from"./index-AV00OC_I.js";import{w as p,bA as d,a5 as g,cB as m,R as t,ae as r,af as u,al as f,ag as w,bH as k}from"./index-Dfvg3Po0.js";import"./shapes-BYgDLQBI.js";const S=()=>{function o(a){if(window.parent===window)return;const{api:e,playState:n}=a.data||{};e==="headerTogge"?window.parent.postMessage({api:"headerTogge",playState:n},"*"):e==="changeTogge"?window.parent.postMessage({api:"changeTogge"},"*"):["clickTempo","clickViewFigner"].includes(e)&&window.parent.postMessage({api:e},"*")}p(()=>{window.addEventListener("message",o)}),d(()=>{window.removeEventListener("message",o)})},_=g({__name:"mobileScreen",setup(o){S();const a=m(),e=t(!0),n=t(!1),i=c();return a.setScreenMode("mobileScreen"),i.initPPTData().then(()=>{e.value=!1}),(v,s)=>(r(),u("div",{class:"mobileScreen",onClick:s[0]||(s[0]=b=>n.value=!1)},[e.value?w("",!0):(r(),f(l,{key:0}))]))}}),B=k(_,[["__scopeId","data-v-90b2692a"]]);export{B as default};
+import{u as c,af as l}from"./index-BQbc2p8e.js";import{w as p,bA as d,a5 as g,cB as m,R as t,ae as r,af as u,al as f,ag as w,bH as k}from"./index-QfGvh56f.js";import"./shapes-CMKeeEjK.js";const S=()=>{function o(a){if(window.parent===window)return;const{api:e,playState:n}=a.data||{};e==="headerTogge"?window.parent.postMessage({api:"headerTogge",playState:n},"*"):e==="changeTogge"?window.parent.postMessage({api:"changeTogge"},"*"):["clickTempo","clickViewFigner"].includes(e)&&window.parent.postMessage({api:e},"*")}p(()=>{window.addEventListener("message",o)}),d(()=>{window.removeEventListener("message",o)})},_=g({__name:"mobileScreen",setup(o){S();const a=m(),e=t(!0),n=t(!1),i=c();return a.setScreenMode("mobileScreen"),i.initPPTData().then(()=>{e.value=!1}),(v,s)=>(r(),u("div",{class:"mobileScreen",onClick:s[0]||(s[0]=b=>n.value=!1)},[e.value?w("",!0):(r(),f(l,{key:0}))]))}}),B=k(_,[["__scopeId","data-v-90b2692a"]]);export{B as default};

+ 1 - 1
dist/assets/shapes-BYgDLQBI.js → dist/assets/shapes-CMKeeEjK.js

@@ -1,4 +1,4 @@
-import{cE as k,bB as $1}from"./index-Dfvg3Po0.js";import{ag as Z,ah as H1,ai as U,aj as n0,ak as c0,al as i0,am as j1,an as K1,ao as Y1,ap as R}from"./index-AV00OC_I.js";var z1={exports:{}};/*!
+import{cE as k,bB as $1}from"./index-QfGvh56f.js";import{ag as Z,ah as H1,ai as U,aj as n0,ak as c0,al as i0,am as j1,an as K1,ao as Y1,ap as R}from"./index-BQbc2p8e.js";var z1={exports:{}};/*!
  * clipboard.js v2.0.11
  * https://clipboardjs.com/
  *

+ 1 - 1
dist/index.html

@@ -10,7 +10,7 @@
     <meta name="description" content="ppt编辑器" />
     <meta name="keywords" content="ppt,powerpoint,office powerpoint,在线ppt,幻灯片,演示文稿,ppt在线制作,Vue3,TypeScript" />
     <title>PPT</title>
-    <script type="module" crossorigin src="./assets/index-Dfvg3Po0.js"></script>
+    <script type="module" crossorigin src="./assets/index-QfGvh56f.js"></script>
     <link rel="stylesheet" crossorigin href="./assets/index-AavUEaYy.css">
   </head>
   <body>

+ 14 - 0
src/api/aiCourseware.ts

@@ -29,6 +29,7 @@ export interface AiCoursewarePage {
   title: string
   subtitle?: string
   bullets: string[]
+  teachingPurpose?: string
   studentContent?: {
     headline?: string
     points?: string[]
@@ -37,14 +38,27 @@ export interface AiCoursewarePage {
     task?: string
     steps?: string[]
   }
+  classroomAction?: {
+    teacherInstruction?: string
+    studentTask?: string
+    interactionType?: string
+  }
   visual?: {
     layout?: string
     style?: string
     mainVisual?: string
     imageKeywords?: string[]
   }
+  visualPlan?: {
+    layout?: string
+    mainVisual?: string
+    elements?: string[]
+    imageKeywords?: string[]
+    style?: string
+  }
   designRequirement?: string
   teacherTips?: string
+  speakerNotes?: string
   interaction?: {
     type: string
     question: string

+ 60 - 25
src/utils/aiCoursewareToSlides.ts

@@ -39,7 +39,7 @@ export function aiCoursewareToSlides(outline: AiCoursewareOutline, options: AiCo
 }
 
 function buildSlide(page: AiCoursewarePage, outline: AiCoursewareOutline, palette: Palette, options: AiCoursewareVisualOptions): Slide {
-  const type = `${page.type || ""} ${page.visual?.layout || ""}`
+  const type = pageKind(page)
   const elements = baseElements(palette, options)
 
   if (type.includes("cover") || page.pageNo === 1) {
@@ -64,7 +64,7 @@ function buildSlide(page: AiCoursewarePage, outline: AiCoursewareOutline, palett
     id: nanoid(10),
     elements,
     background: backgroundConfig(palette, options),
-    remark: page.teacherTips || ""
+    remark: slideRemark(page)
   }
 }
 
@@ -88,8 +88,8 @@ function contentLayout(page: AiCoursewarePage, outline: AiCoursewareOutline, pal
   addTitle(elements, page, outline, palette)
   const headline = studentHeadline(page)
   if (headline && headline !== page.title) {
-    elements.push(shapeElement({ left: 96, top: 178, width: 740, height: 86, fill: palette.primary, radius: 24, shadow: softShadow() }))
-    elements.push(textElement({ left: 134, top: 204, width: 664, height: 38, content: escapeHtml(headline), fontSize: 30, color: "#FFFFFF", bold: true }))
+    elements.push(shapeElement({ left: 96, top: 178, width: 760, height: 78, fill: palette.panelAlt, radius: 18 }))
+    elements.push(textElement({ left: 130, top: 202, width: 692, height: 34, content: escapeHtml(headline), fontSize: 29, color: palette.text, bold: true }))
   }
   elements.push(...mainVisual(page, palette, { left: 960, top: 178, width: 470, height: 470, mode: "photo" }))
   elements.push(...bulletCards(studentPoints(page, 4), palette, { left: 98, top: headline && headline !== page.title ? 300 : 190, width: 760, itemHeight: 78, fontSize: 26, mark: "•" }))
@@ -116,12 +116,13 @@ function goalLayout(page: AiCoursewarePage, outline: AiCoursewareOutline, palett
 function listenLayout(page: AiCoursewarePage, outline: AiCoursewareOutline, palette: Palette): PPTElement[] {
   const elements: PPTElement[] = []
   addTitle(elements, page, outline, palette)
-  elements.push(shapeElement({ left: 92, top: 190, width: 640, height: 438, fill: "#FFFFFF", radius: 28, shadow: softShadow() }))
-  elements.push(textElement({ left: 132, top: 232, width: 520, height: 46, content: escapeHtml(studentHeadline(page) || "听赏任务"), fontSize: 34, color: palette.primary, bold: true }))
-  elements.push(...soundWave(150, 328, palette))
-  elements.push(...bulletCards(studentPoints(page, 3), palette, { left: 132, top: 442, width: 520, itemHeight: 58, fontSize: 24, mark: "听" }))
+  const task = activityTask(page) || studentHeadline(page) || "听一听:音乐中出现了哪些有特点的声音?"
+  elements.push(shapeElement({ left: 92, top: 184, width: 660, height: 150, fill: palette.primary, radius: 24, shadow: softShadow() }))
+  elements.push(textElement({ left: 132, top: 224, width: 570, height: 64, content: escapeHtml(task), fontSize: 34, color: "#FFFFFF", bold: true, lineHeight: 1.25 }))
+  elements.push(...soundWave(128, 382, palette, 530, 118))
+  elements.push(...bulletCards(studentPoints(page, 3), palette, { left: 96, top: 548, width: 620, itemHeight: 58, fontSize: 24, mark: "听" }))
   elements.push(...mainVisual(page, palette, { left: 835, top: 178, width: 560, height: 500, mode: "photo" }))
-  addPrompt(elements, page, palette, 112, 716, 1200, page.interaction?.question || activityTask(page) || "听一听:音乐中出现了哪些有特点的声音?")
+  addPrompt(elements, page, palette, 112, 716, 1200, page.interaction?.question || page.classroomAction?.studentTask || "听完后,请说一说你听到了什么。")
   return elements
 }
 
@@ -182,9 +183,9 @@ function baseElements(palette: Palette, options: AiCoursewareVisualOptions): PPT
   if (options.backgroundImage) {
     elements.push(shapeElement({ left: 0, top: 0, width: SLIDE_WIDTH, height: SLIDE_HEIGHT, fill: "rgba(255, 255, 255, 0.78)", opacity: 0.94 }))
   }
-  elements.push(shapeElement({ left: 0, top: 0, width: 18, height: SLIDE_HEIGHT, fill: palette.primary, radius: 0 }))
-  elements.push(shapeElement({ left: 1260, top: 78, width: 250, height: 250, fill: palette.panelAlt, opacity: 0.7, radius: 100 }))
-  elements.push(shapeElement({ left: 1370, top: 675, width: 120, height: 120, fill: palette.warm, opacity: 0.5, radius: 60 }))
+  elements.push(shapeElement({ left: 0, top: 0, width: 12, height: SLIDE_HEIGHT, fill: palette.primary, radius: 0 }))
+  elements.push(shapeElement({ left: 1260, top: 72, width: 210, height: 210, fill: palette.panelAlt, opacity: 0.38, radius: 100 }))
+  elements.push(shapeElement({ left: 1380, top: 690, width: 90, height: 90, fill: palette.warm, opacity: 0.38, radius: 44 }))
   return elements
 }
 
@@ -196,22 +197,30 @@ function addTitle(elements: PPTElement[], page: AiCoursewarePage, outline: AiCou
 function mainVisual(page: AiCoursewarePage, palette: Palette, rect: { left: number; top: number; width: number; height: number; mode: "hero" | "photo" | "compact" }): PPTElement[] {
   if (page.image?.url) {
     return [
-      shapeElement({ left: rect.left - 18, top: rect.top + 20, width: rect.width, height: rect.height, fill: palette.warm, opacity: 0.62, radius: 34 }),
+      shapeElement({ left: rect.left - 16, top: rect.top + 18, width: rect.width, height: rect.height, fill: palette.warm, opacity: 0.48, radius: 30 }),
       imageElement({ left: rect.left, top: rect.top, width: rect.width, height: rect.height, src: page.image.url, radius: rect.mode === "compact" ? 28 : 34 })
     ]
   }
-  return fallbackVisualElements(page, palette, rect)
+  return teachingVisualElements(page, palette, rect)
 }
 
-function fallbackVisualElements(page: AiCoursewarePage, palette: Palette, rect: { left: number; top: number; width: number; height: number; mode: "hero" | "photo" | "compact" }): PPTElement[] {
+function teachingVisualElements(page: AiCoursewarePage, palette: Palette, rect: { left: number; top: number; width: number; height: number; mode: "hero" | "photo" | "compact" }): PPTElement[] {
   const elements: PPTElement[] = []
   const visual = visualConfig(page, palette)
-  elements.push(shapeElement({ left: rect.left, top: rect.top, width: rect.width, height: rect.height, fill: visual.light, radius: 34, shadow: softShadow() }))
-  elements.push(shapeElement({ left: rect.left + rect.width * 0.18, top: rect.top + rect.height * 0.13, width: rect.width * 0.64, height: rect.height * 0.64, fill: "#FFFFFF", opacity: 0.88, radius: 90 }))
-  elements.push(textElement({ left: rect.left + rect.width * 0.36, top: rect.top + rect.height * 0.18, width: rect.width * 0.28, height: 100, content: visual.icon, fontSize: rect.mode === "compact" ? 68 : 90, color: visual.color, bold: true }))
-  elements.push(...soundWave(rect.left + rect.width * 0.24, rect.top + rect.height * 0.58, palette, rect.width * 0.48, rect.mode === "compact" ? 82 : 110))
-  elements.push(shapeElement({ left: rect.left + rect.width * 0.26, top: rect.top + rect.height * 0.78, width: rect.width * 0.48, height: 44, fill: "#FFFFFF", opacity: 0.82, radius: 22 }))
-  elements.push(textElement({ left: rect.left + rect.width * 0.3, top: rect.top + rect.height * 0.8, width: rect.width * 0.4, height: 30, content: visual.label, fontSize: rect.mode === "compact" ? 18 : 22, color: visual.color, bold: true }))
+  const title = visualMain(page) || visual.label
+  const chips = visualElements(page).slice(0, rect.mode === "compact" ? 2 : 4)
+  elements.push(shapeElement({ left: rect.left, top: rect.top, width: rect.width, height: rect.height, fill: visual.light, radius: 30, shadow: softShadow() }))
+  elements.push(shapeElement({ left: rect.left + rect.width * 0.11, top: rect.top + rect.height * 0.12, width: rect.width * 0.78, height: rect.height * 0.42, fill: "#FFFFFF", opacity: 0.92, radius: 34 }))
+  elements.push(textElement({ left: rect.left + rect.width * 0.43, top: rect.top + rect.height * 0.18, width: rect.width * 0.16, height: 76, content: visual.icon, fontSize: rect.mode === "compact" ? 54 : 74, color: visual.color, bold: true }))
+  elements.push(textElement({ left: rect.left + rect.width * 0.12, top: rect.top + rect.height * 0.42, width: rect.width * 0.76, height: 44, content: escapeHtml(title), fontSize: rect.mode === "compact" ? 18 : 24, color: visual.color, bold: true }))
+  elements.push(...soundWave(rect.left + rect.width * 0.2, rect.top + rect.height * 0.58, palette, rect.width * 0.58, rect.mode === "compact" ? 56 : 78))
+  chips.forEach((chip, index) => {
+    const chipWidth = rect.mode === "compact" ? rect.width * 0.66 : rect.width * 0.38
+    const chipLeft = rect.left + rect.width * 0.12 + (rect.mode === "compact" ? 0 : (index % 2) * rect.width * 0.43)
+    const chipTop = rect.top + rect.height * 0.76 + Math.floor(index / (rect.mode === "compact" ? 1 : 2)) * 44
+    elements.push(shapeElement({ left: chipLeft, top: chipTop, width: chipWidth, height: 32, fill: "#FFFFFF", opacity: 0.9, radius: 16 }))
+    elements.push(textElement({ left: chipLeft + 14, top: chipTop + 7, width: chipWidth - 28, height: 20, content: escapeHtml(trimText(chip, 12)), fontSize: rect.mode === "compact" ? 15 : 18, color: palette.text }))
+  })
   return elements
 }
 
@@ -269,15 +278,31 @@ function studentPoints(page: AiCoursewarePage, limit: number): string[] {
 }
 
 function activityTask(page: AiCoursewarePage) {
-  return String(page.activity?.task || "").trim()
+  return String(page.classroomAction?.studentTask || page.activity?.task || "").trim()
 }
 
 function activitySteps(page: AiCoursewarePage, limit: number): string[] {
-  const steps = (page.activity?.steps || []).filter(Boolean).map(item => item.trim()).filter(Boolean)
+  const steps = [
+    page.classroomAction?.studentTask,
+    ...(page.activity?.steps || [])
+  ].filter(Boolean).map(item => String(item).trim()).filter(Boolean)
   const result = steps.length ? steps.slice(0, limit) : studentPoints(page, limit)
   return result.map(item => trimText(item, 46))
 }
 
+function pageKind(page: AiCoursewarePage) {
+  return `${page.type || ""} ${page.visualPlan?.layout || ""} ${page.visual?.layout || ""}`.toLowerCase()
+}
+
+function slideRemark(page: AiCoursewarePage) {
+  return [page.speakerNotes, page.teacherTips, page.classroomAction?.teacherInstruction, page.teachingPurpose]
+    .filter(Boolean)
+    .map(item => String(item).trim())
+    .filter(Boolean)
+    .filter((item, index, array) => array.indexOf(item) === index)
+    .join("\n")
+}
+
 function backgroundConfig(palette: Palette, options: AiCoursewareVisualOptions): SlideBackground {
   if (options.backgroundImage) {
     return {
@@ -318,8 +343,8 @@ function buildPalette(style: string): Palette {
 }
 
 function visualConfig(page: AiCoursewarePage, palette: Palette) {
-  const type = `${page.type || ""} ${page.visual?.layout || ""}`
-  const visualLabel = trimText(page.visual?.mainVisual || page.visual?.style || "", 8)
+  const type = pageKind(page)
+  const visualLabel = trimText(visualMain(page) || page.visual?.style || "", 10)
   if (type.includes("interaction") || type.includes("activity")) return { icon: "?", label: visualLabel || "课堂互动", color: palette.accent, light: "#EEF2FF" }
   if (type.includes("summary")) return { icon: "✓", label: visualLabel || "课堂小结", color: "#2E7D32", light: "#EAF7EC" }
   if (type.includes("goal")) return { icon: "◎", label: visualLabel || "学习目标", color: "#7B1FA2", light: "#F3E8FF" }
@@ -328,6 +353,16 @@ function visualConfig(page: AiCoursewarePage, palette: Palette) {
   return { icon: "♫", label: visualLabel || "音乐课堂", color: palette.primary, light: palette.warm }
 }
 
+function visualMain(page: AiCoursewarePage) {
+  return String(page.visualPlan?.mainVisual || page.visual?.mainVisual || "").trim()
+}
+
+function visualElements(page: AiCoursewarePage) {
+  const elements = (page.visualPlan?.elements || []).filter(Boolean).map(item => item.trim()).filter(Boolean)
+  const keywords = (page.visualPlan?.imageKeywords || page.visual?.imageKeywords || page.imageKeywords || []).filter(Boolean).map(item => item.trim()).filter(Boolean)
+  return elements.length ? elements : keywords
+}
+
 function textElement(params: {
   left: number
   top: number

+ 25 - 2
src/views/Editor/EditorHeader/AiCoursewareDialog.vue

@@ -54,6 +54,16 @@
             </div>
           </div>
 
+          <div class="purpose-card">
+            <div class="field-title">教学目的</div>
+            <input
+              v-model="selectedPage.teachingPurpose"
+              :disabled="working"
+              class="purpose-input"
+              placeholder="这一页在课堂中要解决的教学目标"
+            />
+          </div>
+
           <div class="field-grid">
             <div class="field-card">
               <div class="field-title">学生看到的内容</div>
@@ -75,7 +85,7 @@
             <div class="field-card">
               <div class="field-title">课堂活动</div>
               <input
-                :value="selectedPage.activity?.task || ''"
+                :value="activityTask"
                 :disabled="working"
                 class="headline-input"
                 placeholder="课堂任务,例如:听辨山谷和小鸟的声音"
@@ -202,6 +212,7 @@ const studentPoints = computed(() => {
   if (!selectedPage.value) return []
   return selectedPage.value.studentContent?.points?.length ? selectedPage.value.studentContent.points : selectedPage.value.bullets || []
 })
+const activityTask = computed(() => selectedPage.value?.classroomAction?.studentTask || selectedPage.value?.activity?.task || "")
 
 watch(
   () => props.visible,
@@ -317,7 +328,10 @@ function updateStudentPoints(page: AiCoursewarePage, event: Event) {
 
 function updateActivityTask(page: AiCoursewarePage, event: Event) {
   if (!page.activity) page.activity = { task: "", steps: [] }
-  page.activity.task = (event.target as HTMLInputElement).value.trim()
+  if (!page.classroomAction) page.classroomAction = { teacherInstruction: "", studentTask: "", interactionType: "" }
+  const value = (event.target as HTMLInputElement).value.trim()
+  page.activity.task = value
+  page.classroomAction.studentTask = value
 }
 
 function updateActivitySteps(page: AiCoursewarePage, event: Event) {
@@ -511,6 +525,9 @@ function shortProgressLabel(message?: string) {
 .title-editor {
   max-width: 460px;
 }
+.purpose-card {
+  margin-top: 12px;
+}
 .field-grid {
   margin-top: 12px;
   display: grid;
@@ -533,6 +550,7 @@ function shortProgressLabel(message?: string) {
   font-weight: 600;
 }
 .page-title,
+.purpose-input,
 .headline-input,
 .page-bullets,
 .page-design,
@@ -550,6 +568,11 @@ function shortProgressLabel(message?: string) {
   font-size: 16px;
   font-weight: 600;
 }
+.purpose-input {
+  height: 36px;
+  padding: 0 10px;
+  font-size: 14px;
+}
 .headline-input {
   height: 36px;
   padding: 0 10px;

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików