1 |
- !function(){var e=document.createElement("style");e.innerHTML="._unitLesson_qa46k_1{min-height:100vh;background-color:#ffe8ce;padding:.26667rem 0;box-sizing:border-box}\n",document.head.appendChild(e),System.register(["./index-legacy.eb062188.js","./index-legacy.3d6106b0.js","./index-legacy.ad813f4d.js"],(function(e){"use strict";var t,s,r,a,o,n,u,l,i,c,d,m,g;return{setters:[function(e){t=e.d,s=e.ah,r=e.ag,a=e.R,o=e.r,n=e.$,u=e.c,l=e.aj,i=e.ak,c=e.m,d=e.g},function(e){m=e.C},function(e){g=e.O}],execute:function(){var p="_unitLesson_qa46k_1";e("default",t({name:"unit-Lesson",setup(){const e=s(),t=r(),h=a({}),y=o({loading:!0,list:[]});n((()=>{h.value={...JSON.parse(sessionStorage.getItem("unit-create")||"{}")},(async()=>{y.loading=!0;try{const t=await c.post(d.platformApi+"/courseSchedule/getCoursewareByClassId",{requestType:"form",data:{classGroupId:e.query.classGroupId}});if(Array.isArray(null==t?void 0:t.data)){const e=t.data.filter((e=>e.unitTestNum)).map((e=>({...e,coverImg:e.coverImg,name:e.coursewareName,id:e.lessonCoursewareId,courseNum:e.coursewareNum,courseNumName:`共${e.coursewareNum}次测验`})));y.list=(e=>{const t={};for(let s=0;s<e.length;s++)t[e[s].sortNo]?t[e[s].sortNo].push(e[s]):t[e[s].sortNo]=[e[s]];return t})(e)}}catch(t){console.log(t)}y.loading=!1})()}));return()=>u("div",{class:[p,Object.values(y.list).length?"":"emptyRootContainer"]},[u(g,{onGetHeight:e=>{document.documentElement.style.setProperty("--header-height",e+"px")}},{default:()=>[u(l,{border:!1,background:"rgba(255, 232, 206, 1)",color:"rgba(124, 61, 18, 1)",title:"选择教材"},null)]}),Object.keys(y.list).map((e=>u(m,{term:e,list:y.list[e],onItemClick:e=>{return s=e,h.value.coursewareName=s.coursewareName,h.value.lessonCoursewareId=s.lessonCoursewareId,sessionStorage.setItem("unit-create",JSON.stringify(h.value)),void t.push({path:"/uni-test",query:{lessonCoursewareId:s.lessonCoursewareId}});var s}},null))),!y.loading&&!Object.values(y.list).length&&u(i,{btnStatus:!1,tips:"暂无教材"},null)])}}))}}}))}();
|