PageSourceSearch

http://kuailejibu.com/assets/MoocAiTools-BNAa5rey.js

js kuailejibu.com collected 2026-10-02 16:11:50 UTC 7,803 bytes, 1 lines download raw bytes

1import{e,h as l,q as a,s as t,r as u,aM as o,g as d,aO as s,aP as n,v as r,aK as i,aJ as c,z as p,A as m,b6 as f,I as v,p as _,j as V,G as b,H as y,K as h,L as g,J as w,E as x}from"./core-vendor-B6OQKjbl.js";import{c as k}from"./index-CvlyshJw.js";import{_ as U}from"./_plugin-vue_export-helper-BCo6x5W8.js";import"./vendor-CPNr084b.js";const C={class:"ai-tools-page"},j={key:0,class:"result-box"},A={class:"result-header"},q={class:"result-pre"},S={key:0,class:"result-box"},z={class:"result-header"},N={class:"result-pre"},D={key:0,class:"result-box"},I={class:"result-header"},L={class:"result-pre"},J={key:0,class:"result-box"},P={class:"result-pre"},K=U(e({__name:"MoocAiTools",setup(e){const U=u("outline"),K=w({courseName:"",subject:"",gradeLevel:"",chapterCount:5}),M=u(""),O=u(!1);async function T(){var e;if(K.courseName){O.value=!0;try{const{data:l}=await k.post("/mooc-ai/generate/outline",K);M.value=(null==(e=l.data)?void 0:e.outline)||""}catch{x.error("生成失败")}finally{O.value=!1}}else x.warning("请填写课程名称")}const E=w({topic:"",count:5,difficulty:"中等",types:"单选,多选,判断"}),G=u(""),H=u(!1);async function W(){var e;if(E.topic){H.value=!0;try{const{data:l}=await k.post("/mooc-ai/generate/quiz",E);G.value=(null==(e=l.data)?void 0:e.questions)||""}catch{x.error("生成失败")}finally{H.value=!1}}else x.warning("请填写主题")}const B=w({taskDescription:"",totalScore:100}),F=u(""),Q=u(!1);async function R(){var e;if(B.taskDescription){Q.value=!0;try{const{data:l}=await k.post("/mooc-ai/generate/rubric",B);F.value=(null==(e=l.data)?void 0:e.rubric)||""}catch{x.error("生成失败")}finally{Q.value=!1}}else x.warning("请填写任务描述")}const X=w({rubric:"",studentAnswer:"",maxScore:100}),Y=u(""),Z=u(!1);async function $(){var e;if(X.studentAnswer){Z.value=!0;try{const{data:l}=await k.post("/mooc-ai/grade/essay",X);Y.value=(null==(e=l.data)?void 0:e.review)||""}catch{x.error("批改失败")}finally{Z.value=!1}}else x.warning("请填写学生答案")}function ee(e){navigator.clipboard.writeText(e).catch(()=>{}),x.success("已复制")}return(e,u)=>{const w=m,x=p,k=c,le=f,ae=i,te=v,ue=r,oe=n,de=s,se=g,ne=h,re=o;return d(),l("div",C,[a(re,{modelValue:U.value,"onUpdate:modelValue":u[16]||(u[16]=e=>U.value=e)},{default:t(()=>[a(de,{label:"📖 课程大纲",name:"outline"},{default:t(()=>[a(oe,{shadow:"never",class:"tool-card"},{default:t(()=>[a(ue,{model:K,"label-width":"100px"},{default:t(()=>[a(ae,{gutter:16},{default:t(()=>[a(k,{span:12},{default:t(()=>[a(x,{label:"课程名称",required:""},{default:t(()=>[a(w,{modelValue:K.courseName,"onUpdate:modelValue":u[0]||(u[0]=e=>K.courseName=e),placeholder:"如:Python 编程入门"},null,8,["modelValue"])]),_:1})]),_:1}),a(k,{span:12},{default:t(()=>[a(x,{label:"学科类型"},{default:t(()=>[a(w,{modelValue:K.subject,"onUpdate:modelValue":u[1]||(u[1]=e=>K.subject=e),placeholder:"如:计算机科学"},null,8,["modelValue"])]),_:1})]),_:1}),a(k,{span:12},{default:t(()=>[a(x,{label:"适用年级"},{default:t(()=>[a(w,{modelValue:K.gradeLevel,"onUpdate:modelValue":u[2]||(u[2]=e=>K.gradeLevel=e),placeholder:"如:初中三年级"},null,8,["modelValue"])]),_:1})]),_:1}),a(k,{span:12},{default:t(()=>[a(x,{label:"章节数量"},{default:t(()=>[a(le,{modelValue:K.chapterCount,"onUpdate:modelValue":u[3]||(u[3]=e=>K.chapterCount=e),min:2,max:15},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),a(x,null,{default:t(()=>[a(te,{type:"primary",loading:O.value,onClick:T},{default:t(()=>[...u[17]||(u[17]=[_(" 🚀 生成大纲 ",-1)])]),_:1},8,["loading"])]),_:1})]),_:1},8,["model"]),M.value?(d(),l("div",j,[V("div",A,[u[19]||(u[19]=V("span",null,"生成结果",-1)),a(te,{size:"small",text:"",onClick:u[4]||(u[4]=e=>ee(M.value))},{default:t(()=>[...u[18]||(u[18]=[_("复制",-1)])]),_:1})]),V("pre",q,b(M.value),1)])):y("",!0)]),_:1})]),_:1}),a(de,{label:"📝 测验题目",name:"quiz"},{default:t(()=>[a(oe,{shadow:"never",class:"tool-card"},{default:t(()=>[a(ue,{model:E,"label-width":"100px"},{default:t(()=>[a(ae,{gutter:16},{default:t(()=>[a(k,{span:16},{default:t(()=>[a(x,{label:"主题/知识点",required:""},{default:t(()=>[a(w,{modelValue:E.topic,"onUpdate:modelValue":u[5]||(u[5]=e=>E.topic=e),placeholder:"如:Python 列表操作"},null,8,["modelValue"])]),_:1})]),_:1}),a(k,{span:8},{default:t(()=>[a(x,{label:"题目数量"},{default:t(()=>[a(le,{modelValue:E.count,"onUpdate:modelValue":u[6]||(u[6]=e=>E.count=e),min:2,max:20},null,8,["modelValue"])]),_:1})]),_:1}),a(k,{span:12},{default:t(()=>[a(x,{label:"难度"},{default:t(()=>[a(ne,{modelValue:E.difficulty,"onUpdate:modelValue":u[7]||(u[7]=e=>E.difficulty=e)},{default:t(()=>[a(se,{label:"简单",value:"简单"}),a(se,{label:"中等",value:"中等"}),a(se,{label:"困难",value:"困难"})]),_:1},8,["modelValue"])]),_:1})]),_:1}),a(k,{span:12},{default:t(()=>[a(x,{label:"题型"},{default:t(()=>[a(w,{modelValue:E.types,"onUpdate:modelValue":u[8]||(u[8]=e=>E.types=e),placeholder:"单选,多选,判断,填空"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),a(x,null,{default:t(()=>[a(te,{type:"primary",loading:H.value,onClick:W},{default:t(()=>[...u[20]||(u[20]=[_(" 🚀 生成题目 ",-1)])]),_:1},8,["loading"])]),_:1})]),_:1},8,["model"]),G.value?(d(),l("div",S,[V("div",z,[u[22]||(u[22]=V("span",null,"生成结果(JSON 格式,可复制后导入)",-1)),a(te,{size:"small",text:"",onClick:u[9]||(u[9]=e=>ee(G.value))},{default:t(()=>[...u[21]||(u[21]=[_("复制",-1)])]),_:1})]),V("pre",N,b(G.value),1)])):y("",!0)]),_:1})]),_:1}),a(de,{label:"📊 评分标准",name:"rubric"},{default:t(()=>[a(oe,{shadow:"never",class:"tool-card"},{default:t(()=>[a(ue,{model:B,"label-width":"100px"},{default:t(()=>[a(x,{label:"任务描述",required:""},{default:t(()=>[a(w,{modelValue:B.taskDescription,"onUpdate:modelValue":u[10]||(u[10]=e=>B.taskDescription=e),type:"textarea",rows:4,placeholder:"详细描述作业/项目要求…"},null,8,["modelValue"])]),_:1}),a(x,{label:"总分"},{default:t(()=>[a(le,{modelValue:B.totalScore,"onUpdate:modelValue":u[11]||(u[11]=e=>B.totalScore=e),min:10,max:200,step:10}
1,null,8,["modelValue"])]),_:1}),a(x,null,{default:t(()=>[a(te,{type:"primary",loading:Q.value,onClick:R},{default:t(()=>[...u[23]||(u[23]=[_(" 🚀 生成评分标准 ",-1)])]),_:1},8,["loading"])]),_:1})]),_:1},8,["model"]),F.value?(d(),l("div",D,[V("div",I,[u[25]||(u[25]=V("span",null,"生成结果",-1)),a(te,{size:"small",text:"",onClick:u[12]||(u[12]=e=>ee(F.value))},{default:t(()=>[...u[24]||(u[24]=[_("复制",-1)])]),_:1})]),V("pre",L,b(F.value),1)])):y("",!0)]),_:1})]),_:1}),a(de,{label:"🎯 AI 批改",name:"grade"},{default:t(()=>[a(oe,{shadow:"never",class:"tool-card"},{default:t(()=>[a(ue,{model:X,"label-width":"100px"},{default:t(()=>[a(x,{label:"评分标准"},{default:t(()=>[a(w,{modelValue:X.rubric,"onUpdate:modelValue":u[13]||(u[13]=e=>X.rubric=e),type:"textarea",rows:3,placeholder:"粘贴评分标准…"},null,8,["modelValue"])]),_:1}),a(x,{label:"学生作答"},{default:t(()=>[a(w,{modelValue:X.studentAnswer,"onUpdate:modelValue":u[14]||(u[14]=e=>X.studentAnswer=e),type:"textarea",rows:5,placeholder:"粘贴学生答案…"},null,8,["modelValue"])]),_:1}),a(x,{label:"满分"},{default:t(()=>[a(le,{modelValue:X.maxScore,"onUpdate:modelValue":u[15]||(u[15]=e=>X.maxScore=e),min:10,max:200},null,8,["modelValue"])]),_:1}),a(x,null,{default:t(()=>[a(te,{type:"primary",loading:Z.value,onClick:$},{default:t(()=>[...u[26]||(u[26]=[_(" 🎯 AI 批改 ",-1)])]),_:1},8,["loading"])]),_:1})]),_:1},8,["model"]),Y.value?(d(),l("div",J,[u[27]||(u[27]=V("div",{class:"result-header"},[V("span",null,"批改结果")],-1)),V("pre",P,b(Y.value),1)])):y("",!0)]),_:1})]),_:1})]),_:1},8,["modelValue"])])}}}),[["__scopeId","data-v-94180b02"]]);export{K as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.