1 |
- import{S as q}from"./index-649eea9c-1715235715601.js";import{C as z}from"./index-c3ad7647-1715235715601.js";import{C as c}from"./index-0d13e876-1715235715601.js";import{a as B}from"./add-efe8238e-1715235715601.js";import{d as Y,M as m,e as D,r as M,b as O,u as R,a as x,p as V,f as e,N as j,g as i,x as u,w as g,j as d,k as r,F as W,v as P,C as U,aK as K,b5 as w,l as C,J as H,aB as G}from"./index-87f0ccd8-1715235715601.js";import{g as $,b as J}from"./api-0a7c8704-1715235715601.js";import{i as Q,s as k}from"./use-async-545e8290-1715235715601.js";import{g as X,c as Z}from"./contants-0dd30099-1715235715601.js";import{d as ee}from"./teacherIcon-b8e3946d-1715235715601.js";import{P as ae}from"./index-dfb57ae1-1715235715601.js";import{a as te,b as se}from"./api-fbc1f62a-1715235715601.js";import{T as re}from"./index-d2b77ddd-1715235715601.js";import{c as oe,R as ne}from"./index-86b60204-1715235715601.js";import{u as le}from"./index-9373edcb-1715235715601.js";import{b as ie}from"./browser-504037ee-1715235715601.js";import{P as ue}from"./index-e51158ab-1715235715601.js";import{s as ce}from"./state-8b714401-1715235715601.js";import"./urlUtils-ae95598a-1715235715601.js";import"./index-5b28f511-1715235715601.js";import"./Slider-a113e213-1715235715601.js";import"./index-4c0a6eac-1715235715601.js";import"./icon_default-d1bcaf5f-1715235715601.js";import"./icon-plus-t-35f4cdeb-1715235715601.js";import"./api-d1a4d565-1715235715601.js";import"./icon-pan-16e35a82-1715235715601.js";import"./api-86302a73-1715235715601.js";import"./ding-8e9054d5-1715235715601.js";import"./catchData-4db15d90-1715235715601.js";import"./Scrollbar-9e37a29f-1715235715601.js";import"./searchArray-2151d9dd-1715235715601.js";import"./index-d6ebab02-1715235715601.js";import"./api-082ea32b-1715235715601.js";import"./icon-collect-active-4272e308-1715235715601.js";import"./index-a7d62168-1715235715601.js";import"./index-ae438cc3-1715235715601.js";import"./api-d06a41d0-1715235715601.js";import"./index-f38970b6-1715235715601.js";import"./api-55aee601-1715235715601.js";import"./Cascader-0081f993-1715235715601.js";const de="_listWrap_qz3fv_1",pe="_searchList_qz3fv_6",me="_searchInput_qz3fv_6",he="_infoListWrap_qz3fv_15",fe="_addBtnIcon_qz3fv_18",ve="_addBtn_qz3fv_18",ge="_btnGroup_qz3fv_29",we="_addClass_qz3fv_36",_e="_workVisiable_qz3fv_48",Fe="_workContainer_qz3fv_51",be="_workTrain_qz3fv_55",Ce="_resourceMain_qz3fv_68",ke="_removeVisiable_qz3fv_73",Le="_studentRemove_qz3fv_79",Te="_listSection_qz3fv_97",ye="_item_qz3fv_107",Ie="_header_qz3fv_116",Se="_navatar_qz3fv_121",Ae="_userInfo_qz3fv_134",Ee="_ing_qz3fv_149",Ne="_over_qz3fv_150",qe="_content_qz3fv_166",ze="_homeTitle_qz3fv_172",Be="_CLASSWORK_qz3fv_189",Ye="_HOMEWORK_qz3fv_190",De="_homeContent_qz3fv_205",Me="_homeworkText_qz3fv_208",Oe="_pSection_qz3fv_212",Re="_p1_qz3fv_215",xe="_p2_qz3fv_216",Ve="_title_qz3fv_239",je="_text_qz3fv_244",We="_errorBtn_qz3fv_250",s={listWrap:de,searchList:pe,searchInput:me,infoListWrap:he,addBtnIcon:fe,addBtn:ve,btnGroup:ge,addClass:we,workVisiable:_e,workContainer:Fe,workTrain:be,resourceMain:Ce,removeVisiable:ke,studentRemove:Le,listSection:Te,item:ye,header:Ie,navatar:Se,userInfo:Ae,ing:Ee,over:Ne,content:qe,homeTitle:ze,CLASSWORK:Be,HOMEWORK:Ye,homeContent:De,homeworkText:Me,pSection:Oe,p1:Re,p2:xe,title:Ve,text:je,errorBtn:We},Aa=()=>[m().startOf("month").valueOf(),m().endOf("month").valueOf()],Ea=Y({name:"homework-record",setup(){const t=D({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:""}}),L=M(),T=O(),_=R(),F=x(),b=()=>{t.pagination.page=1,p(),k({current:t.searchForm,saveKey:F.path})};t.gradeNumList=X();const y=()=>{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),k({current:t.searchForm,saveKey:F.path}),t.pagination.page=1,p()},I=()=>{le(document.querySelector("#model-homework-height"),a=>{const o=a[0],{height:n}=o.contentRect;document.documentElement.style.setProperty("--window-page-lesson-height",n+"px")})},p=async()=>{t.loading=!0;try{const a=await te({...t.searchForm,...t.pagination,...H(t.searchForm.timer,["startTime","endTime"],"YYYY-MM-DD")});(a.data.rows||[]).forEach(n=>{let h="",f="";n.studentLessonTrainingDetails&&n.studentLessonTrainingDetails.length>0&&n.studentLessonTrainingDetails.forEach(l=>{l.trainingType==="PRACTICE"&&l.musicName&&(h+=h?"、《"+l.musicName+"》":"练习曲目《"+l.musicName+"》"),l.trainingType==="EVALUATION"&&l.musicName&&(f+=f?"、《"+l.musicName+"》":"评测曲目《"+l.musicName+"》")}),n.pTitle=h,n.eTitle=f;let v=n.homeworkObjName;if(n.homeworkObjName){const l=n.homeworkObjName.split(",");l.length>5?v=l.slice(0,5).join("、")+"...等".concat(l.length).concat(n.homeworkObj==="CLASS"?"个班级":"人"):v=l.join("、")}n.studentName=v}),t.tableList=a.data.rows,t.pagination.pageTotal=a.data.total,t.loading=!1}catch(a){t.loading=!1,console.log(a)}},S=async()=>{try{const{data:a}=await $(),o=a||[];o.forEach(n=>{n.name=n.name+"学年"}),o.unshift({id:"",name:"全部学年"}),t.popSelectYearList=o||[],o.length>0&&!t.searchForm.gradeYear&&(t.searchForm.gradeYear=o[2].id)}catch(a){}},A=async()=>{try{const{data:a}=await J(),o=a||[];o.forEach(n=>{n.name=n.name+"级"}),o.unshift({id:"",name:"全部学级"}),t.popSelectLevelList=o||[],o.length>0&&!t.searchForm.gradeLevel&&(t.searchForm.gradeLevel=o[0].id)}catch(a){}};Q({current:t.searchForm,callBack:a=>{t.searchForm=a}});const E=async()=>{try{await se({lessonTrainingId:t.resetItem.id}),T.success("撤回成功"),t.resetVisiable=!1,b()}catch(a){}},N=a=>{if(window.matchMedia("(display-mode: standalone)").matches)ce.application=window.matchMedia("(display-mode: standalone)").matches,t.previewModal=!0,G(),t.previewParams={type:"preview",courseId:a.chapterLessonCoursewareId,subjectId:null,detailId:a.lessonCoursewareKnowledgeDetailId,lessonCourseId:a.lessonCoursewareId};else{const{href:o}=_.resolve({path:"/attend-class",query:{type:"preview",courseId:a.chapterLessonCoursewareId,instrumentId:null,detailId:a.lessonCoursewareKnowledgeDetailId,lessonCourseId:a.lessonCoursewareId}});window.open(o,+new Date+"")}};return V(async()=>{t.loading=!0,await S(),await A(),await p(),t.loading=!1}),()=>e("div",{class:s.listWrap},[e("div",{class:s.searchList},[e(j,{"label-placement":"left",inline:!0,ref:L},{default:()=>[e(i,null,{default:()=>[e(q,u({placeholder:"请输入作业标题关键词"},{class:s.searchInput,searchWord:t.searchForm.keyword,onChangeValue:a=>t.searchForm.keyword=a}),null)]}),e(i,null,{default:()=>[e(c,u({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(i,null,{default:()=>[e(c,u({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(i,null,{default:()=>[e(c,u({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(i,null,{default:()=>[e(c,u({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(i,null,{default:()=>[e(c,u({options:t.gradeNumList,placeholder:"选择年级",clearable:!0,inline:!0},{value:t.searchForm.currentGradeNum,"onUpdate:value":a=>t.searchForm.currentGradeNum=a}),null)]}),e(i,null,{default:()=>[e(c,u({options:Z,placeholder:"选择班级",clearable:!0,inline:!0},{value:t.searchForm.currentClass,"onUpdate:value":a=>t.searchForm.currentClass=a}),null)]}),e(i,null,{default:()=>[e(c,u({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(i,null,{default:()=>[e(z,{class:s.CDatePickerItem,separator:"-",type:"daterange",value:t.searchForm.timer,"onUpdate:value":a=>t.searchForm.timer=a,timerValue:t.searchForm.timer},null)]}),e(i,null,{default:()=>[e(g,{justify:"end"},{default:()=>[e(d,{type:"primary",class:"searchBtn",onClick:b},{default:()=>[r("搜索")]}),e(d,{type:"primary",ghost:!0,class:"resetBtn",onClick:y},{default:()=>[r("重置")]})]})]})]})]),e(d,{class:s.addBtn,type:"primary",onClick:()=>{t.workVisiable=!0,ie.nextTick(()=>{I()})}},{default:()=>[r("布置作业")],icon:()=>e(W,null,[e(P,{class:s.addBtnIcon,previewDisabled:!0,src:B},null)])}),e("div",{class:s.tableWrap},[e(U,{show:t.loading},{default:()=>[e("div",{style:{minHeight:"40vh"}},[e("div",{class:s.listSection},[t.tableList.map(a=>e("div",{class:s.item,onClick:()=>{_.push({path:"/homework-record-detail",query:{id:a.id,name:a.name}})}},[e("div",{class:s.header},[e(K,{class:s.navatar,round:!0,src:a.teacherAvatar||ee},null),e("div",{class:s.userInfo},[e("h2",null,[a.teacherName]),e("p",null,[r("布置时间:"),m(a.createTime).format("YYYY-MM-DD HH:mm"),e("span",null,[r(" | ")]),e("span",null,[r("截止时间:"),m(a.expireDate).format("YYYY-MM-DD HH:mm")])])]),e("div",{class:a.status?s.over:s.ing},null)]),e("div",{class:s.content},[e("div",{class:s.homeTitle},[e("p",null,[e("span",{class:s[a.homeworkType]},[a.homeworkType==="CLASSWORK"?"课外":"课后"]),a.name]),e(g,null,{default:()=>[a.chapterLessonCoursewareId&&e(d,{class:s.errorBtn,text:!0,color:"#1677FF",onClick:o=>{o.stopPropagation(),N(a)}},{default:()=>[r("查看课件")]}),!a.status&&e(d,{class:s.errorBtn,text:!0,color:"#1677FF",onClick:o=>{o.stopPropagation(),t.resetVisiable=!0,t.resetItem=a}},{default:()=>[r("撤回")]})]})]),e("div",{class:s.homeContent},[e("span",{class:s.title},[r("作业对象:")]),e("span",{class:s.text},[a.studentName])]),e("div",{class:[s.homeContent,s.homeworkText]},[e("span",{class:s.title},[r("作业内容:")]),e("div",{class:s.pSection},[a.pTitle&&e("p",{class:[s.text,s.p1]},[a.pTitle]),a.eTitle&&e("p",{class:[s.text,s.p2]},[a.eTitle])])]),e("div",{class:s.homeSubmit},[e("span",{class:s.title},[r("已提交:")]),e("span",{class:s.text},[a.trainingNum||0,r("/"),a.expectNum||0,r("人")]),e(w,{vertical:!0},null),e("span",{class:s.title},[r("提交率:")]),e("span",{class:s.text},[a.trainingRate||0,r("%")]),e(w,{vertical:!0},null),e("span",{class:s.title},[r("合格人数:")]),e("span",{class:s.text},[a.standardNum||0,r("人")]),e(w,{vertical:!0},null),e("span",{class:s.title},[r("合格率:")]),e("span",{class:s.text},[a.qualifiedRate||0,r("%")])])])]))]),t.tableList.length<=0&&!t.loading&&e(re,{class:s.nowEmpty},null)])]}),t.tableList.length>0&&e(ae,{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:p},null)]),e(C,{show:t.resetVisiable,"onUpdate:show":a=>t.resetVisiable=a,preset:"card",class:["modalTitle",s.removeVisiable],title:"撤回作业"},{default:()=>[e("div",{class:s.studentRemove},[e("p",null,[r("撤回作业后,此条作业将被删除,是否确认撤回【"),t.resetItem.name,r("】?")]),e(g,{class:s.btnGroup,justify:"center"},{default:()=>[e(d,{round:!0,onClick:()=>t.resetVisiable=!1},{default:()=>[r("取消")]}),e(d,{round:!0,type:"primary",onClick:E},{default:()=>[r("确定")]})]})])]}),e(C,{show:t.workVisiable,"onUpdate:show":a=>t.workVisiable=a,preset:"card",class:["modalTitle background",s.workVisiable],title:"作业详情"},{default:()=>[e("div",{id:"model-homework-height",class:s.workContainer},[e("div",{class:s.workTrain},[e(oe,{lessonPreTraining:{title:m().format("YYYY年MM月DD日")+"-课外作业"},cardType:"homeworkRecord",onChange:a=>{t.workVisiable=a.status,p()}},null)]),e("div",{class:s.resourceMain},[e(ne,{cardType:"homerowk-record"},null)])])]}),e(ue,{show:t.previewModal,"onUpdate:show":a=>t.previewModal=a,type:"attend",params:t.previewParams},null)])}});export{Ea as default,Aa as getCurrentMonth};
|