afterWorkDetail-legacy-bd9e4362-1715840129614.js 5.7 KB

1
  1. System.register(["./index.module-legacy-1ef1eaf5-1715840129614.js","./index-legacy-dce325e0-1715840129614.js","./index-legacy-42112fac-1715840129614.js","./index-legacy-84c89aec-1715840129614.js","./api-legacy-c1f38ec7-1715840129614.js","./index-legacy-f35addb7-1715840129614.js","./index-legacy-8c0b7d9b-1715840129614.js","./teacherIcon-legacy-3eeb62c3-1715840129614.js","./dateFormat-legacy-30a125a5-1715840129614.js","./searchArray-legacy-a3ad31a9-1715840129614.js","./TrainingDetails-legacy-fca568a8-1715840129614.js","./index-legacy-2f080daf-1715840129614.js","./index-legacy-a9df44f2-1715840129614.js","./Slider-legacy-ab6e576b-1715840129614.js","./urlUtils-legacy-133e91cc-1715840129614.js","./index-legacy-892e2080-1715840129614.js","./icon_default-legacy-fa9bb009-1715840129614.js","./icon-plus-t-legacy-9d0f221a-1715840129614.js","./api-legacy-f6612378-1715840129614.js","./icon-pan-legacy-9492b61b-1715840129614.js","./api-legacy-dac26997-1715840129614.js","./index-legacy-f7171940-1715840129614.js","./api-legacy-fad13c4d-1715840129614.js","./Scrollbar-legacy-f600a812-1715840129614.js"],(function(e,a){"use strict";var t,l,n,i,s,r,o,c,g,d,u,p,y,m,h,w,v,f,T,x,j,k,b,D,I,S,L,Y,M,R;return{setters:[e=>{t=e.s},e=>{l=e.S},e=>{n=e.C},e=>{i=e.P},e=>{s=e.q,r=e.r},e=>{o=e.d,c=e.e,g=e.r,d=e.a,u=e.p,p=e.S,y=e.f,m=e.v,h=e.k,w=e.M,v=e.N,f=e.g,T=e.x,x=e.w,j=e.j,k=e.aE,b=e.l},e=>{D=e.C},e=>{I=e.d},e=>{S=e.g,L=e.a},e=>{Y=e.t},e=>{M=e.T},e=>{R=e.T},null,null,null,null,null,null,null,null,null,null,null,null],execute:function(){e("default",o({name:"student-studentList",setup(e,{emit:a}){const o=c({searchForm:{keyword:"",trainingStatus:""},loading:!1,pagination:{page:1,rows:10,pageTotal:4},tableList:[],workInfo:{createTime:"",expireDate:"",teacherAvatar:"",teacherName:""},detailVisiable:!1,activeRow:null,index:0}),U=g([S((new Date).getTime()),L((new Date).getTime())]),F=g(),N=d(),q=g([{name:"班级管理",path:"/classList"},{name:N.query.name,path:"/classDetail"},{name:N.query.teacherName,path:"/afterWorkDetail"}]),C=()=>{o.pagination.page=1,V(),console.log("search",o)},H=()=>{o.searchForm={keyword:"",trainingStatus:""},U.value=[S((new Date).getTime()),L((new Date).getTime())],C()},V=async(e,a)=>{o.loading=!0;try{const t=await s({classGroupId:N.query.classGroupId||"",trainingId:N.query.trainingId,...o.searchForm,...o.pagination,page:a||o.pagination.page});o.tableList=t.data.rows,o.pagination.page=t.data.current,o.pagination.pageTotal=t.data.total,o.loading=!1,"next"===e?(o.index=0,A()):"prev"===e&&(o.index=o.tableList.length+1,W())}catch(t){o.loading=!1,console.log(t)}};u((()=>{(async()=>{try{const e=await r({trainingId:N.query.trainingId});o.workInfo={...e.data}}catch(e){console.log(e)}})(),V()}));const B=()=>[{title:"学生姓名",key:"studentName"},{title:"最后提交时间",key:"submitTime",render:e=>e.submitTime?w(e.submitTime).format("YYYY-MM-DD"):"--"},{title:"作业状态",key:"sex",render:e=>y("div",null,["UNSUBMITTED"==e.trainingStatus?y("p",{class:t.nosub},[h("未提交")]):null,"SUBMITTED"==e.trainingStatus?y("p",{class:t.ison},[h("不合格")]):null,"TARGET"==e.trainingStatus?y("p",{class:t.isok},[h("合格")]):null])},{title:"操作",key:"id",render:(e,a)=>y(j,{text:!0,type:"primary",onClick:()=>{((e,a)=>{o.index=a+1,o.activeRow=e,o.detailVisiable=!0})(e,a)}},{default:()=>[h("详情")]})}],A=()=>{o.index>=o.tableList.length?V("next",o.pagination.page+1):(++o.index,o.activeRow=o.tableList[o.index-1],F.value.getTrainingDetail(o.activeRow.studentLessonTrainingId))},W=()=>{1===o.index&&1!==o.pagination.page?V("prev",o.pagination.page-1):(--o.index,o.activeRow=o.tableList[o.index-1],F.value.getTrainingDetail(o.activeRow.studentLessonTrainingId))},E=p((()=>o.index+(o.pagination.page-1)*o.pagination.rows));return()=>y("div",null,[y(D,{list:q.value},null),y("div",{class:t.listWrap},[y("div",{class:t.teacherList},[y("div",{class:t.teacherHeader},[y("div",{class:t.teacherHeaderBorder},[y(m,{class:t.teacherHeaderImg,src:o.workInfo.teacherAvatar?o.workInfo.teacherAvatar:I,previewDisabled:!0},null)])]),y("div",{class:t.workafterInfo},[y("h4",null,[o.workInfo.teacherName]),y("p",null,[h("布置时间:"),o.workInfo.createTime?w(o.workInfo.createTime).format("YYYY-MM-DD HH:mm"):"--"," ",h("|")," ",y("span",null,[h("截止时间:"),o.workInfo.expireDate?w(o.workInfo.expireDate).format("YYYY-MM-DD HH:mm"):"--"])])])]),y("div",{class:t.searchList},[y(v,{"label-placement":"left",inline:!0},{default:()=>[y(f,null,{default:()=>[y(l,T({placeholder:"请输入学生姓名"},{class:t.searchInput,searchWord:o.searchForm.keyword,onChangeValue:e=>o.searchForm.keyword=e}),null)]}),y(f,null,{default:()=>[y(n,T({options:[{label:"全部状态",value:""},...Y],placeholder:"作业状态",clearable:!0,inline:!0},{value:o.searchForm.trainingStatus,"onUpdate:value":e=>o.searchForm.trainingStatus=e}),null)]}),y(f,null,{default:()=>[y(x,{justify:"end"},{default:()=>[y(j,{type:"primary",class:"searchBtn",onClick:C},{default:()=>[h("搜索")]}),y(j,{type:"primary",ghost:!0,class:"resetBtn",onClick:H},{default:()=>[h("重置")]})]})]})]})]),y("div",{class:t.tableWrap},[y(k,{class:t.classTable,loading:o.loading,columns:B(),data:o.tableList},{empty:()=>y(R,null,null)}),y(i,{page:o.pagination.page,"onUpdate:page":e=>o.pagination.page=e,pageSize:o.pagination.rows,"onUpdate:pageSize":e=>o.pagination.rows=e,pageTotal:o.pagination.pageTotal,"onUpdate:pageTotal":e=>o.pagination.pageTotal=e,onList:V,sync:!0},null)])]),y(b,{show:o.detailVisiable,"onUpdate:show":e=>o.detailVisiable=e,preset:"card",class:["modalTitle background",t.wordDetailModel],title:"作业详情"},{default:()=>[y(M,{onNext:()=>A(),onPre:()=>W(),ref:F,onClose:()=>o.detailVisiable=!1,total:o.pagination.pageTotal,current:E.value,activeRow:o.activeRow},null)]})])}}))}}}));