1 |
- import{S as Y}from"./index-b291caa1-1716977058336.js";import{C as R}from"./index-13e9b31e-1716977058336.js";import{C as p}from"./index-416ee6d1-1716977058336.js";import{a as M}from"./add-efe8238e-1716977058336.js";import{d as x,O as h,e as V,r as j,b as W,u as P,a as U,p as K,f as e,N as H,g as u,x as c,w,j as d,k as s,F as $,v as G,D as q,aL as z,U as k,b7 as F,l as L,K as J,y as Q,aC as X}from"./index-70c8ab8f-1716977058336.js";import{g as Z,b as ee}from"./api-29fe75de-1716977058336.js";import{i as ae,s as y}from"./use-async-46582991-1716977058336.js";import{g as te,c as re}from"./contants-0e55b6b3-1716977058336.js";import{d as se}from"./teacherIcon-b8e3946d-1716977058336.js";import{P as oe}from"./index-502e1a8f-1716977058336.js";import{a as le,b as ne}from"./api-6883e8b9-1716977058336.js";import{T as ie}from"./index-32c8a13d-1716977058336.js";import{b as ue,R as ce}from"./index-c2dc14a6-1716977058336.js";import{u as pe}from"./index-1e0585d5-1716977058336.js";import{b as de}from"./browser-504037ee-1716977058336.js";import{P as me}from"./index-6bb1858e-1716977058336.js";import{e as he}from"./index-a5c2a8ef-1716977058336.js";import"./urlUtils-a03c114e-1716977058336.js";import"./Slider-b7891db6-1716977058336.js";import"./api-01aa0f20-1716977058336.js";import"./icon-collect-active-4272e308-1716977058336.js";import"./index-ac3f97d9-1716977058336.js";import"./ding-8e9054d5-1716977058336.js";import"./catchData-cc91cb99-1716977058336.js";import"./Scrollbar-dc599640-1716977058336.js";import"./searchArray-dc035967-1716977058336.js";import"./index-7941bfe4-1716977058336.js";import"./index-04f2ff28-1716977058336.js";import"./index-7b7d2eef-1716977058336.js";import"./api-812fd62f-1716977058336.js";import"./api-ca0eac7b-1716977058336.js";import"./Cascader-437e4278-1716977058336.js";import"./index-4f5cb7cf-1716977058336.js";import"./icon_default-d1bcaf5f-1716977058336.js";import"./icon-plus-t-35f4cdeb-1716977058336.js";import"./api-41353e77-1716977058336.js";import"./icon-pan-16e35a82-1716977058336.js";import"./api-6161fdfd-1716977058336.js";const ve="_listWrap_4lv81_1",ge="_searchList_4lv81_6",fe="_searchInput_4lv81_6",_e="_infoListWrap_4lv81_15",we="_addBtnIcon_4lv81_18",Fe="_addBtn_4lv81_18",Ce="_btnGroup_4lv81_29",be="_addClass_4lv81_36",Te="_workVisiable_4lv81_48",ke="_workContainer_4lv81_51",Le="_workTrain_4lv81_55",ye="_resourceMain_4lv81_68",Ie="_removeVisiable_4lv81_73",Ee="_studentRemove_4lv81_79",Se="_listSection_4lv81_97",Ne="_theTooltip_4lv81_107",Ae="_item_4lv81_110",Be="_header_4lv81_119",De="_navatar_4lv81_124",Oe="_userInfo_4lv81_137",Ye="_ing_4lv81_152",Re="_over_4lv81_153",Me="_content_4lv81_169",xe="_homeTitle_4lv81_175",Ve="_CLASSWORK_4lv81_192",je="_HOMEWORK_4lv81_193",We="_homeContent_4lv81_208",Pe="_homeworkText_4lv81_211",Ue="_pSection_4lv81_215",Ke="_p1_4lv81_218",He="_p2_4lv81_219",$e="_title_4lv81_242",Ge="_text_4lv81_247",qe="_errorBtn_4lv81_257",r={listWrap:ve,searchList:ge,searchInput:fe,infoListWrap:_e,addBtnIcon:we,addBtn:Fe,btnGroup:Ce,addClass:be,workVisiable:Te,workContainer:ke,workTrain:Le,resourceMain:ye,removeVisiable:Ie,studentRemove:Ee,listSection:Se,theTooltip:Ne,item:Ae,header:Be,navatar:De,userInfo:Oe,ing:Ye,over:Re,content:Me,homeTitle:xe,CLASSWORK:Ve,HOMEWORK:je,homeContent:We,homeworkText:Pe,pSection:Ue,p1:Ke,p2:He,title:$e,text:Ge,errorBtn:qe},Da=()=>[h().startOf("month").valueOf(),h().endOf("month").valueOf()],Oa=x({name:"homework-record",setup(){const t=V({workVisiable:!1,resetVisiable:!1,resetItem:{},searchForm:{keyword:null,currentClass:"",homeworkType:"",currentGradeNum:"",subjectId:"",gradeYear:"",gradeLevel:"",homeworkObj:"",status:"",timer:null,selfFlag:!0},loading:!1,pagination:{page:1,rows:10,pageTotal:6},gradeNumList:[],tableList:[],studentVisible:!1,activeRow:null,showaddClass:!1,popSelectYearList:[],popSelectLevelList:[],previewModal:!1,previewParams:{type:"",courseId:"",subjectId:"",detailId:""}}),I=j(),E=W(),C=P(),b=U(),T=()=>{t.pagination.page=1,m(),y({current:t.searchForm,saveKey:b.path})};t.gradeNumList=te();const S=()=>{t.searchForm={keyword:null,homeworkType:"",currentClass:"",currentGradeNum:"",subjectId:"",gradeYear:"",gradeLevel:"",homeworkObj:"",status:"",timer:null,selfFlag:!0},t.popSelectYearList.length>0&&(t.searchForm.gradeYear=t.popSelectYearList[2].id),y({current:t.searchForm,saveKey:b.path}),t.pagination.page=1,m()},N=()=>{pe(document.querySelector("#model-homework-height"),a=>{const o=a[0],{height:l}=o.contentRect;document.documentElement.style.setProperty("--window-page-lesson-height",l+"px")})},m=async()=>{t.loading=!0;try{const a=await le({...t.searchForm,...t.pagination,...J(t.searchForm.timer,["startTime","endTime"],"YYYY-MM-DD")});(a.data.rows||[]).forEach(l=>{let v="",g="";l.studentLessonTrainingDetails&&l.studentLessonTrainingDetails.length>0&&l.studentLessonTrainingDetails.forEach(n=>{const i=n.trainingContent?JSON.parse(n.trainingContent):null;if(n.trainingType==="PRACTICE"&&n.musicName&&(v+=v?"《"+n.musicName+"》":"练习曲目:《"+n.musicName+"》",i)){const _=["".concat(i.practiceChapterBegin,"-").concat(i.practiceChapterEnd,"小节"),"速度".concat(i.practiceSpeed),"".concat(i.trainingTimes,"分钟")];v+=_.join(" | ")+";"}if(n.trainingType==="EVALUATION"&&n.musicName&&(g+=g?"《"+n.musicName+"》":"评测曲目:《"+n.musicName+"》",i)){const _=["".concat(he[i.evaluateDifficult]),i.practiceChapterBegin||i.practiceChapterEnd?"".concat(i.practiceChapterBegin,"-").concat(i.practiceChapterEnd,"小节"):"全部小节","".concat(i.trainingTimes,"分合格")];g+=_.join(" | ")+";"}}),l.pTitle=v,l.eTitle=g;let f=l.homeworkObjName;if(l.homeworkObjName){const n=l.homeworkObjName.split(",");n.length>5?f=n.slice(0,5).join("、")+"...等".concat(n.length).concat(l.homeworkObj==="CLASS"?"个班级":"人"):f=n.join("、")}l.studentName=f}),t.tableList=a.data.rows,t.pagination.pageTotal=a.data.total,t.loading=!1}catch(a){t.loading=!1,console.log(a)}},A=async()=>{try{const{data:a}=await Z(),o=a||[];o.forEach(l=>{l.name=l.name+"学年"}),o.unshift({id:"",name:"全部学年"}),t.popSelectYearList=o||[],o.length>0&&!t.searchForm.gradeYear&&(t.searchForm.gradeYear=o[2].id)}catch(a){}},B=async()=>{try{const{data:a}=await ee(),o=a||[];o.forEach(l=>{l.name=l.name+"级"}),o.unshift({id:"",name:"全部学级"}),t.popSelectLevelList=o||[],o.length>0&&!t.searchForm.gradeLevel&&(t.searchForm.gradeLevel=o[0].id)}catch(a){}};ae({current:t.searchForm,callBack:a=>{t.searchForm=a}});const D=async()=>{try{await ne({lessonTrainingId:t.resetItem.id}),E.success("撤回成功"),t.resetVisiable=!1,T()}catch(a){}},O=a=>{if(window.matchMedia("(display-mode: standalone)").matches)Q.application=window.matchMedia("(display-mode: standalone)").matches,t.previewModal=!0,X(),t.previewParams={type:"preview",courseId:a.chapterLessonCoursewareId,subjectId:null,detailId:a.lessonCoursewareKnowledgeDetailId,lessonCourseId:a.lessonCoursewareId};else{const{href:o}=C.resolve({path:"/attend-class",query:{type:"preview",courseId:a.chapterLessonCoursewareId,instrumentId:null,detailId:a.lessonCoursewareKnowledgeDetailId,lessonCourseId:a.lessonCoursewareId}});window.open(o,+new Date+"")}};return K(async()=>{t.loading=!0,await A(),await B(),await m(),t.loading=!1}),()=>e("div",{class:r.listWrap},[e("div",{class:r.searchList},[e(H,{"label-placement":"left",inline:!0,ref:I},{default:()=>[e(u,null,{default:()=>[e(Y,c({placeholder:"请输入作业标题关键词"},{class:r.searchInput,searchWord:t.searchForm.keyword,onChangeValue:a=>t.searchForm.keyword=a}),null)]}),e(u,null,{default:()=>[e(p,c({options:[{id:"",name:"全部类型"},{id:"CLASSWORK",name:"课外作业"},{id:"HOMEWORK",name:"课后作业"}],placeholder:"选择类型",clearable:!0,inline:!0,labelField:"name",valueField:"id"},{value:t.searchForm.homeworkType,"onUpdate:value":a=>t.searchForm.homeworkType=a}),null)]}),e(u,null,{default:()=>[e(p,c({options:[{id:"",name:"作业对象"},{id:"PERSON",name:"个人"},{id:"CLASS",name:"班级"}],placeholder:"选择作业对象",clearable:!0,inline:!0,labelField:"name",valueField:"id"},{value:t.searchForm.homeworkObj,"onUpdate:value":a=>t.searchForm.homeworkObj=a}),null)]}),e(u,null,{default:()=>[e(p,c({options:t.popSelectYearList,placeholder:"选择学年",clearable:!0,inline:!0,labelField:"name",valueField:"id"},{value:t.searchForm.gradeYear,"onUpdate:value":a=>t.searchForm.gradeYear=a}),null)]}),e(u,null,{default:()=>[e(p,c({options:t.popSelectLevelList,placeholder:"选择学级",clearable:!0,inline:!0,labelField:"name",valueField:"id"},{value:t.searchForm.gradeLevel,"onUpdate:value":a=>t.searchForm.gradeLevel=a}),null)]}),e(u,null,{default:()=>[e(p,c({options:t.gradeNumList,placeholder:"选择年级",clearable:!0,inline:!0},{value:t.searchForm.currentGradeNum,"onUpdate:value":a=>t.searchForm.currentGradeNum=a}),null)]}),e(u,null,{default:()=>[e(p,c({options:re,placeholder:"选择班级",clearable:!0,inline:!0},{value:t.searchForm.currentClass,"onUpdate:value":a=>t.searchForm.currentClass=a}),null)]}),e(u,null,{default:()=>[e(p,c({options:[{value:"",label:"全部状态"},{value:0,label:"进行中"},{value:1,label:"已结束"}],placeholder:"选择状态",clearable:!0,inline:!0},{value:t.searchForm.status,"onUpdate:value":a=>t.searchForm.status=a}),null)]}),e(u,null,{default:()=>[e(R,{class:r.CDatePickerItem,separator:"-",type:"daterange",value:t.searchForm.timer,"onUpdate:value":a=>t.searchForm.timer=a,timerValue:t.searchForm.timer},null)]}),e(u,null,{default:()=>[e(w,{justify:"end"},{default:()=>[e(d,{type:"primary",class:"searchBtn",onClick:T},{default:()=>[s("搜索")]}),e(d,{type:"primary",ghost:!0,class:"resetBtn",onClick:S},{default:()=>[s("重置")]})]})]})]})]),e(d,{class:r.addBtn,type:"primary",onClick:()=>{t.workVisiable=!0,de.nextTick(()=>{N()})}},{default:()=>[s("布置作业")],icon:()=>e($,null,[e(G,{class:r.addBtnIcon,previewDisabled:!0,src:M},null)])}),e("div",{class:r.tableWrap},[e(q,{show:t.loading},{default:()=>[e("div",{style:{minHeight:"40vh"}},[e("div",{class:r.listSection},[t.tableList.map(a=>e("div",{class:r.item,onClick:()=>{C.push({path:"/homework-record-detail",query:{id:a.id,name:a.name}})}},[e("div",{class:r.header},[e(z,{class:r.navatar,round:!0,src:a.teacherAvatar||se},null),e("div",{class:r.userInfo},[e("h2",null,[a.teacherName]),e("p",null,[s("布置时间:"),h(a.createTime).format("YYYY-MM-DD HH:mm"),e("span",null,[s(" | ")]),e("span",null,[s("截止时间:"),h(a.expireDate).format("YYYY-MM-DD HH:mm")])])]),e("div",{class:a.status?r.over:r.ing},null)]),e("div",{class:r.content},[e("div",{class:r.homeTitle},[e("p",null,[e("span",{class:r[a.homeworkType]},[a.homeworkType==="CLASSWORK"?"课外":"课后"]),a.name]),e(w,null,{default:()=>[a.chapterLessonCoursewareId&&e(d,{class:r.errorBtn,text:!0,color:"#1677FF",onClick:o=>{o.stopPropagation(),O(a)}},{default:()=>[s("查看课件")]}),!a.status&&e(d,{class:r.errorBtn,text:!0,color:"#1677FF",onClick:o=>{o.stopPropagation(),t.resetVisiable=!0,t.resetItem=a}},{default:()=>[s("撤回")]})]})]),e("div",{class:r.homeContent},[e("span",{class:r.title},[s("作业对象:")]),e("span",{class:r.text},[a.studentName])]),e("div",{class:[r.homeContent,r.homeworkText]},[e("span",{class:r.title},[s("作业内容:")]),e("div",{class:r.pSection},[a.pTitle&&e(k,{trigger:"hover",class:r.theTooltip,delay:500},{trigger:()=>e("p",{class:[r.text,r.p1,r.theTooltip]},[a.pTitle]),default:()=>a.pTitle}),a.eTitle&&e(k,{trigger:"hover",class:r.theTooltip,delay:500},{trigger:()=>e("p",{class:[r.text,r.p2,r.theTooltip]},[a.eTitle]),default:()=>a.eTitle})])]),e("div",{class:r.homeSubmit},[e("span",{class:r.title},[s("已提交:")]),e("span",{class:r.text},[a.trainingNum||0,s("/"),a.expectNum||0,s("人")]),e(F,{vertical:!0},null),e("span",{class:r.title},[s("提交率:")]),e("span",{class:r.text},[a.trainingRate||0,s("%")]),e(F,{vertical:!0},null),e("span",{class:r.title},[s("合格人数:")]),e("span",{class:r.text},[a.standardNum||0,s("人")]),e(F,{vertical:!0},null),e("span",{class:r.title},[s("合格率:")]),e("span",{class:r.text},[a.qualifiedRate||0,s("%")])])])]))]),t.tableList.length<=0&&!t.loading&&e(ie,{class:r.nowEmpty},null)])]}),t.tableList.length>0&&e(oe,{page:t.pagination.page,"onUpdate:page":a=>t.pagination.page=a,pageSize:t.pagination.rows,"onUpdate:pageSize":a=>t.pagination.rows=a,pageTotal:t.pagination.pageTotal,"onUpdate:pageTotal":a=>t.pagination.pageTotal=a,onList:m},null)]),e(L,{show:t.resetVisiable,"onUpdate:show":a=>t.resetVisiable=a,preset:"card",class:["modalTitle",r.removeVisiable],title:"撤回作业"},{default:()=>[e("div",{class:r.studentRemove},[e("p",null,[s("撤回作业后,此条作业将被删除,是否确认撤回【"),t.resetItem.name,s("】?")]),e(w,{class:r.btnGroup,justify:"center"},{default:()=>[e(d,{round:!0,onClick:()=>t.resetVisiable=!1},{default:()=>[s("取消")]}),e(d,{round:!0,type:"primary",onClick:D},{default:()=>[s("确定")]})]})])]}),e(L,{show:t.workVisiable,"onUpdate:show":a=>t.workVisiable=a,preset:"card",class:["modalTitle background",r.workVisiable],title:"作业详情"},{default:()=>[e("div",{id:"model-homework-height",class:r.workContainer},[e("div",{class:r.workTrain},[e(ue,{lessonPreTraining:{title:h().format("YYYY年MM月DD日")+"-课外作业"},cardType:"homeworkRecord",onChange:a=>{t.workVisiable=a.status,m()}},null)]),e("div",{class:r.resourceMain},[e(ce,{cardType:"homerowk-record"},null)])])]}),e(me,{show:t.previewModal,"onUpdate:show":a=>t.previewModal=a,type:"attend",params:t.previewParams},null)])}});export{Oa as default,Da as getCurrentMonth};
|