afterWorkDetail-legacy-2b30670a-1715419951123.js 5.7 KB

1
  1. System.register(["./index.module-legacy-990676cd-1715419951123.js","./index-legacy-f4aa998d-1715419951123.js","./index-legacy-7414362f-1715419951123.js","./index-legacy-1aeb4fa5-1715419951123.js","./api-legacy-03791afe-1715419951123.js","./index-legacy-ecee8a57-1715419951123.js","./index-legacy-f0c05a5d-1715419951123.js","./teacherIcon-legacy-3eeb62c3-1715419951123.js","./dateFormat-legacy-6a0f8456-1715419951123.js","./searchArray-legacy-6749cd28-1715419951123.js","./TrainingDetails-legacy-9f050eba-1715419951123.js","./index-legacy-a52277fe-1715419951123.js","./index-legacy-fac1efba-1715419951123.js","./Slider-legacy-28f2442d-1715419951123.js","./urlUtils-legacy-133e91cc-1715419951123.js","./index-legacy-e7302b65-1715419951123.js","./icon_default-legacy-fa9bb009-1715419951123.js","./icon-plus-t-legacy-9d0f221a-1715419951123.js","./api-legacy-c592e1f5-1715419951123.js","./icon-pan-legacy-9492b61b-1715419951123.js","./api-legacy-b145cd07-1715419951123.js","./index-legacy-5216755a-1715419951123.js","./index-legacy-790d5509-1715419951123.js","./api-legacy-9ebff7fe-1715419951123.js","./Scrollbar-legacy-85369023-1715419951123.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,x,T,j,k,b,D,I,S,L,Y,M,U;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,x=e.x,T=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=>{U=e.T},null,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}),R=g([S((new Date).getTime()),L((new Date).getTime())]),F=g(),C=d(),H=g([{name:"班级管理",path:"/classList"},{name:C.query.name,path:"/classDetail"},{name:C.query.teacherName,path:"/afterWorkDetail"}]),N=()=>{o.pagination.page=1,q(),console.log("search",o)},V=()=>{o.searchForm={keyword:"",trainingStatus:""},R.value=[S((new Date).getTime()),L((new Date).getTime())],N()},q=async(e,a)=>{o.loading=!0;try{const t=await s({classGroupId:C.query.classGroupId||"",trainingId:C.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:C.query.trainingId});o.workInfo={...e.data}}catch(e){console.log(e)}})(),q()}));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?q("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?q("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:H.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,x({placeholder:"请输入学生姓名"},{class:t.searchInput,searchWord:o.searchForm.keyword,onChangeValue:e=>o.searchForm.keyword=e}),null)]}),y(f,null,{default:()=>[y(n,x({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(T,{justify:"end"},{default:()=>[y(j,{type:"primary",class:"searchBtn",onClick:N},{default:()=>[h("搜索")]}),y(j,{type:"primary",ghost:!0,class:"resetBtn",onClick:V},{default:()=>[h("重置")]})]})]})]})]),y("div",{class:t.tableWrap},[y(k,{class:t.classTable,loading:o.loading,columns:B(),data:o.tableList},{empty:()=>y(U,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:q,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)]})])}}))}}}));