1 |
- import{S}from"./index-54c7ecd2-1709546248219.js";import{C as B}from"./index-ef291f7c-1709546248219.js";import{C as m}from"./index-f8ede596-1709546248219.js";import{a as I}from"./add-efe8238e-1709546248219.js";import{d as D,L as _,e as V,r as M,b as R,u as U,a as O,p as P,f as e,N as j,g as u,x as p,w as T,j as h,k as s,F as G,v as W,B as H,a8 as z,bs as b,l as C,H as K}from"./index-272deb89-1709546248219.js";import{g as J,b as Q}from"./api-f3b2f88a-1709546248219.js";import{i as X,s as L}from"./use-async-937fc27e-1709546248219.js";import{g as Z,c as $}from"./contants-806cac61-1709546248219.js";import{d as ee}from"./teacherIcon-b8e3946d-1709546248219.js";import{P as te}from"./index-f2685a19-1709546248219.js";import{a as ae,b as re}from"./api-0c5c1a19-1709546248219.js";import{T as se}from"./index-6c16f4bf-1709546248219.js";import{T as oe,R as ne}from"./index-c50daaee-1709546248219.js";import{u as ie}from"./index-e0e56e91-1709546248219.js";import"./index-bd15cc43-1709546248219.js";import"./api-4f7da3d4-1709546248219.js";import"./icon-collect-active-4272e308-1709546248219.js";import"./index-84916650-1709546248219.js";import"./index-879ba1d6-1709546248219.js";import"./Slider-ab734baa-1709546248219.js";import"./urlUtils-080cac35-1709546248219.js";import"./index-2b3c05f3-1709546248219.js";import"./catchData-b52b99ab-1709546248219.js";import"./index-a628006f-1709546248219.js";import"./Scrollbar-c14fca94-1709546248219.js";import"./index-aabff934-1709546248219.js";import"./api-16cb6453-1709546248219.js";import"./searchArray-c7af0ccc-1709546248219.js";const le="_listWrap_1q3rk_1",ue="_searchList_1q3rk_6",ce="_searchInput_1q3rk_6",de="_infoListWrap_1q3rk_15",pe="_addBtnIcon_1q3rk_18",me="_addBtn_1q3rk_18",he="_btnGroup_1q3rk_29",ge="_addClass_1q3rk_36",fe="_workVisiable_1q3rk_48",_e="_workContainer_1q3rk_51",ve="_workTrain_1q3rk_55",we="_resourceMain_1q3rk_68",ke="_removeVisiable_1q3rk_73",Fe="_studentRemove_1q3rk_79",be="_listSection_1q3rk_97",Te="_item_1q3rk_107",Ce="_header_1q3rk_113",Le="_navatar_1q3rk_118",ye="_userInfo_1q3rk_131",Ee="_ing_1q3rk_146",Ae="_over_1q3rk_150",Ne="_content_1q3rk_154",qe="_homeTitle_1q3rk_162",Ye="_homeContent_1q3rk_169",xe="_homeworkText_1q3rk_172",Se="_pSection_1q3rk_176",Be="_p1_1q3rk_179",Ie="_p2_1q3rk_180",De="_title_1q3rk_203",Ve="_text_1q3rk_208",Me="_errorBtn_1q3rk_214",r={listWrap:le,searchList:ue,searchInput:ce,infoListWrap:de,addBtnIcon:pe,addBtn:me,btnGroup:he,addClass:ge,workVisiable:fe,workContainer:_e,workTrain:ve,resourceMain:we,removeVisiable:ke,studentRemove:Fe,listSection:be,item:Te,header:Ce,navatar:Le,userInfo:ye,ing:Ee,over:Ae,content:Ne,homeTitle:qe,homeContent:Ye,homeworkText:xe,pSection:Se,p1:Be,p2:Ie,title:De,text:Ve,errorBtn:Me};var E={exports:{}},d=E.exports={};d.nextTick=function(){var t=typeof window<"u"&&window.setImmediate,w=typeof window<"u"&&window.postMessage&&window.addEventListener;if(t)return function(i){return window.setImmediate(i)};if(w){var g=[];return window.addEventListener("message",function(i){var l=i.source;if((l===window||l===null)&&i.data==="process-tick"&&(i.stopPropagation(),g.length>0)){var v=g.shift();v()}},!0),function(l){g.push(l),window.postMessage("process-tick","*")}}return function(l){setTimeout(l,0)}}();d.title="browser";d.browser=!0;d.env={};d.argv=[];d.binding=function(t){throw new Error("process.binding is not supported")};d.cwd=function(){return"/"};d.chdir=function(t){throw new Error("process.chdir is not supported")};var Re=E.exports;const y=()=>[_().startOf("month").valueOf(),_().endOf("month").valueOf()],ht=D({name:"homework-record",setup(){const t=V({workVisiable:!1,resetVisiable:!1,resetItem:{},searchForm:{keyword:null,currentClass:"",currentGradeNum:"",subjectId:"",gradeYear:"",gradeLevel:"",homeworkObj:"",status:"",timer:y(),selfFlag:!0},loading:!1,pagination:{page:1,rows:10,pageTotal:6},gradeNumList:[],tableList:[],studentVisible:!1,activeRow:null,showaddClass:!1,popSelectYearList:[],popSelectLevelList:[]}),w=M(),g=R(),i=U(),l=O(),v=()=>{t.pagination.page=1,f(),L({current:t.searchForm,saveKey:l.path})};t.gradeNumList=Z();const A=()=>{t.searchForm={keyword:null,currentClass:"",currentGradeNum:"",subjectId:"",gradeYear:"",gradeLevel:"",homeworkObj:"",status:"",timer:y(),selfFlag:!0},t.popSelectYearList.length>0&&(t.searchForm.gradeYear=t.popSelectYearList[1].id),L({current:t.searchForm,saveKey:l.path}),f()},N=()=>{ie(document.querySelector("#model-homework-height"),a=>{const o=a[0],{height:n}=o.contentRect;document.documentElement.style.setProperty("--window-page-lesson-height",n+"px")})},f=async()=>{t.loading=!0;try{const a=await ae({...t.searchForm,...t.pagination,...K(t.searchForm.timer,["startTime","endTime"],"YYYY-MM-DD")});(a.data.rows||[]).forEach(n=>{let k="",F="";n.studentLessonTrainingDetails&&n.studentLessonTrainingDetails.length>0&&n.studentLessonTrainingDetails.forEach(c=>{c.trainingType==="PRACTICE"&&c.musicName&&(k+=k?"、"+c.musicName:c.musicName),c.trainingType==="EVALUATION"&&c.musicName&&(F+=F?"、"+c.musicName:c.musicName)}),n.pTitle=k,n.eTitle=F}),t.tableList=a.data.rows,t.pagination.pageTotal=a.data.total,t.loading=!1}catch(a){t.loading=!1,console.log(a)}},q=async()=>{try{const{data:a}=await J(),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[1].id)}catch(a){}},Y=async()=>{try{const{data:a}=await Q(),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){}};X({current:t.searchForm,callBack:a=>{t.searchForm=a}});const x=async()=>{try{await re({lessonTrainingId:t.resetItem.id}),g.success("撤回成功"),t.resetVisiable=!1,v()}catch(a){}};return P(async()=>{t.loading=!0,await q(),await Y(),await f(),t.loading=!1}),()=>e("div",{class:r.listWrap},[e("div",{class:r.searchList},[e(j,{"label-placement":"left",inline:!0,ref:w},{default:()=>[e(u,null,{default:()=>[e(S,p({placeholder:"请输入作业标题关键词"},{class:r.searchInput,searchWord:t.searchForm.keyword,onChangeValue:a=>t.searchForm.keyword=a}),null)]}),e(u,null,{default:()=>[e(m,p({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(m,p({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(m,p({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(m,p({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(m,p({options:$,placeholder:"选择班级",clearable:!0,inline:!0},{value:t.searchForm.currentClass,"onUpdate:value":a=>t.searchForm.currentClass=a}),null)]}),e(u,null,{default:()=>[e(m,p({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(B,{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(T,{justify:"end"},{default:()=>[e(h,{type:"primary",class:"searchBtn",onClick:v},{default:()=>[s("搜索")]}),e(h,{type:"primary",ghost:!0,class:"resetBtn",onClick:A},{default:()=>[s("重置")]})]})]})]})]),e(h,{class:r.addBtn,type:"primary",onClick:()=>{t.workVisiable=!0,Re.nextTick(()=>{N()})}},{default:()=>[s("布置作业")],icon:()=>e(G,null,[e(W,{class:r.addBtnIcon,previewDisabled:!0,src:I},null)])}),e("div",{class:r.tableWrap},[e(H,{show:t.loading},{default:()=>[e("div",{style:{minHeight:"40vh"}},[e("div",{class:r.listSection},[t.tableList.map(a=>e("div",{class:r.item,onClick:()=>{i.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||ee},null),e("div",{class:r.userInfo},[e("h2",null,[a.teacherName]),e("p",null,[s("布置时间:"),_(a.createTime).format("YYYY-MM-DD HH:mm"),e("span",null,[s(" | ")]),e("span",{style:{color:"#EA4132"}},[s("截止时间:"),_(a.expireDate).format("YYYY-MM-DD HH:mm")])])]),e("div",{class:a.status?r.over:r.ing},[a.status?"已结束":"进行中"])]),e("div",{class:r.content},[e("div",null,[e("div",{class:r.homeTitle},[a.name]),e("div",{class:r.homeContent},[e("span",{class:r.title},[s("作业对象:")]),e("span",{class:r.text},[a.homeworkObjName])]),e("div",{class:[r.homeContent,r.homeworkText]},[e("span",{class:r.title},[s("作业内容:")]),e("div",{class:r.pSection},[a.pTitle&&e("p",{class:[r.text,r.p1]},[a.pTitle]),a.eTitle&&e("p",{class:[r.text,r.p2]},[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(b,{vertical:!0},null),e("span",{class:r.title},[s("提交率:")]),e("span",{class:r.text},[a.trainingRate||0,s("%")]),e(b,{vertical:!0},null),e("span",{class:r.title},[s("合格人数:")]),e("span",{class:r.text},[a.standardNum||0,s("人")]),e(b,{vertical:!0},null),e("span",{class:r.title},[s("合格率:")]),e("span",{class:r.text},[a.qualifiedRate||0,s("%")])])]),!a.status&&e(h,{class:r.errorBtn,type:"error",color:"#F94D50",onClick:o=>{o.stopPropagation(),t.resetVisiable=!0,t.resetItem=a}},{default:()=>[s("撤回")]})])]))]),t.tableList.length<=0&&!t.loading&&e(se,{class:r.nowEmpty},null)])]}),t.tableList.length>0&&e(te,{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:f,sync:!0},null)]),e(C,{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(T,{class:r.btnGroup,justify:"center"},{default:()=>[e(h,{round:!0,onClick:()=>t.resetVisiable=!1},{default:()=>[s("取消")]}),e(h,{round:!0,type:"primary",onClick:x},{default:()=>[s("确定")]})]})])]}),e(C,{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(oe,{lessonPreTraining:{title:_().format("YYYY年MM月DD日")+"-课后作业"},cardType:"homeworkRecord",onChange:a=>{t.workVisiable=a.status,f()}},null)]),e("div",{class:r.resourceMain},[e(ne,{cardType:"homerowk-record"},null)])])]})])}});export{ht as default,y as getCurrentMonth};
|