studentDetail-legacy-3a1898e9-1694078809672.js 12 KB

1
  1. System.register(["./index.module-legacy-7b43c8af-1694078809672.js","./api-legacy-86f8b9e5-1694078809672.js","./index-legacy-da1c415f-1694078809672.js","./index-legacy-18a26f43-1694078809672.js","./teacherIcon-legacy-3eeb62c3-1694078809672.js","./maleIcon-legacy-f2aee668-1694078809672.js","./evaluationRecords-legacy-c0698b1d-1694078809672.js","./api-legacy-9fec2442-1694078809672.js","./contants-legacy-0e1d5694-1694078809672.js","./index-legacy-858c391e-1694078809672.js","./index-legacy-d08d9fff-1694078809672.js","./index-legacy-97420f2b-1694078809672.js","./dateFormat-legacy-5de7e3c2-1694078809672.js","./searchArray-legacy-efafedef-1694078809672.js","./index-legacy-a9b7951a-1694078809672.js","./unqualified-legacy-0d5e0ffe-1694078809672.js","./contants-legacy-4ea2bc50-1694078809672.js","./index-legacy-29bcc766-1694078809672.js","./use-async-legacy-7f8ad843-1694078809672.js","./useECharts-legacy-dd9e6627-1694078809672.js","./index-legacy-c82e2503-1694078809672.js","./urlUtils-legacy-b652a21b-1694078809672.js","./Slider-legacy-f760b4cf-1694078809672.js"],(function(e,a){"use strict";var t,l,n,s,i,r,u,d,o,c,p,g,m,f,v,b,y,h,T,D,I,w,k,x,j,N,C,S,L,Y,U,M,q,G,R,A,E,B,V,W,H,F,$,O,z,J,P,X,Z,_,K,Q,ee,ae;return{setters:[e=>{t=e.s},e=>{l=e.n,n=e.o},e=>{s=e.d,i=e.b,r=e.c,u=e.r,d=e.e,o=e.y,c=e.f,p=e.N,g=e.cg,m=e.ch,f=e.g,v=e.h,b=e.W,y=e.w,h=e.j,T=e.k,D=e.v,I=e.n,w=e.t,k=e.V,x=e.a,j=e.x,N=e.c9,C=e.p,S=e.q},e=>{L=e.C},e=>{Y=e.d},e=>{U=e.m,M=e.f},e=>{q=e.P,G=e.E},e=>{R=e.s,A=e.r,E=e.b},e=>{B=e.g,V=e.c},e=>{W=e.C},e=>{H=e.P},e=>{F=e.C},e=>{$=e.g,O=e.a,z=e.b},e=>{J=e.t},e=>{P=e.T},e=>{X=e.n,Z=e.u,_=e.q},e=>{K=e.N,Q=e.e},e=>{ee=e.T},e=>{ae=e.s},null,null,null,null],execute:function(){const a=s({name:"setting-personInfo",props:{studentInfo:{type:Object,default:()=>({nickname:"",currentGradeNum:"",gender:null,phone:"",id:"",currentClass:""})}},setup(e){const a=i();r();const t=u(),l=d({sexs:[{label:"男",value:1,class:"option"},{label:"女",value:0,class:"option"}],areaList:[]}),n=u(),s=u(!1),I=d({nickname:e.studentInfo.nickname,phone:e.studentInfo.phone,gender:e.studentInfo.gender,id:e.studentInfo.id,currentGradeNum:e.studentInfo.currentGradeNum,currentClass:e.studentInfo.currentClass}),w=u(B()),k=u([...V]),x=d({disabled:!0,openChangePwd:!1,uploadShow:!0});o((()=>e.studentInfo),(e=>{I.nickname=e.nickname,I.phone=e.phone,I.gender=e.gender,I.id=e.id,I.currentGradeNum=e.currentGradeNum,I.currentClass=e.currentClass}));const j=()=>{t.value=!0,n.value.validate((async l=>{if(!l)try{await A({...e.studentInfo,...I}),x.disabled=!0,a.success("修改成功"),t.value=!1,s.value=!1}catch(n){t.value=!1}}))};return()=>c("div",{class:R.infoWrap},[c("div",{class:R.setInfo},[c(p,{ref:n,model:I,disabled:x.disabled},{default:()=>[c(g,{cols:4,"x-gap":"100"},{default:()=>[c(m,null,{default:()=>[c(f,{label:"姓名",path:"nickname",rule:{required:!0,message:"请填写学生姓名",trigger:"blur"}},{default:()=>[c(v,{bordered:!x.disabled,placeholder:"请填写学生姓名",value:I.nickname,"onUpdate:value":e=>I.nickname=e},null)]})]}),c(m,null,{default:()=>[c(f,{label:"手机号",path:"phone",rule:[{required:!0,message:"请填写学生手机号",trigger:"blur"},{pattern:/^1[3456789]\d{9}$/,message:"手机号格式不正确",trigger:"blur"}]},{default:()=>[c(v,{bordered:!x.disabled,placeholder:"请填写学生手机号",value:I.phone,"onUpdate:value":e=>I.phone=e},null)]})]}),c(m,null,{default:()=>[c(f,{label:"性别",path:"sex"},{default:()=>[c(b,{bordered:!x.disabled,class:R.select,showArrow:!x.disabled,placeholder:"请选择性别",options:l.sexs,value:I.gender,"onUpdate:value":e=>I.gender=e},null)]})]}),c(m,null,{default:()=>[c(f,{label:"年级",path:""},{default:()=>[c(b,{bordered:!x.disabled,class:R.select,showArrow:!x.disabled,placeholder:"请选择年级",options:w.value,value:I.currentGradeNum,"onUpdate:value":e=>I.currentGradeNum=e},null)]})]}),c(m,null,{default:()=>[c(f,{label:"班级",path:""},{default:()=>[c(b,{bordered:!x.disabled,class:R.select,showArrow:!x.disabled,placeholder:"请选择班级",options:k.value,value:I.currentClass,"onUpdate:value":e=>I.currentClass=e},null)]})]})]})]})]),x.disabled?c(y,{class:R.btnList,align:"center",justify:"end"},{default:()=>[c(h,{class:R.btn,strong:!0,color:"#f24433",onClick:()=>x.disabled=!1},{default:()=>[T("修改信息")]})]}):c(y,{class:R.btnList,align:"center",justify:"end"},{default:()=>[c(h,{class:R.btn,onClick:()=>(I.nickname=e.studentInfo.nickname,I.phone=e.studentInfo.phone,I.gender=e.studentInfo.gender,I.currentGradeNum=e.studentInfo.currentGradeNum,I.currentClass=e.studentInfo.currentClass,void(x.disabled=!0))},{default:()=>[T("取消")]}),c(h,{class:R.btn,type:"primary",onClick:()=>s.value=!0},{default:()=>[T("完成")]})]}),c(D,{show:s.value,"onUpdate:show":e=>s.value=e,preset:"card",class:["modalTitle",R.removeVisiable],title:"确认修改"},{default:()=>[c("div",{class:R.studentRemove},[c("p",null,[T("是否确认修改学员信息")]),c(y,{class:R.btnGroup,justify:"center"},{default:()=>[c(h,{round:!0,type:"primary",onClick:j,loading:t.value},{default:()=>[T("确定")]}),c(h,{round:!0,onClick:()=>s.value=!1},{default:()=>[T("取消")]})]})])]})])}}),te=s({props:{activeRow:{type:Object,default:()=>({id:""})},total:{type:Number,default:0},current:{type:Number,default:0}},name:"studentTraomomhDetails",emits:["close"],setup(e,{emit:a,expose:n}){d({uploading:!1});const s=u({teacherName:"",createTime:"",expireDate:"",teacherAvatar:"",studentLessonTrainingDetails:[]});i(),u();const r=async e=>{console.log(e,"getTrainingDetail");try{const a=await l({studentLessonTrainingId:e}),t=a.data.studentLessonTrainingDetails.map((e=>{const a=((e,a)=>{let t=[];return"EVALUATION"===e?(t=[`${Q[a.evaluateDifficult]}`,"全部小节",`${a.trainingTimes}分合格`],console.log("configJson.evaluateDifficult--",t)):(t=[`${a.practiceChapterBegin}-${a.practiceChapterEnd}小节`,`速度${a.practiceSpeed}`,`${a.trainingTimes}分钟`],console.log("configJson.evaluateDifficult",t)),t})(e.trainingType,JSON.parse(e.trainingContent));return{...e,coverImg:e.titleImg,allTimes:JSON.parse(e.trainingContent).trainingTimes,typeList:a||[]}}));console.log(t,"arr"),s.value={...a.data,studentLessonTrainingDetails:t}}catch(a){console.log(a)}};return n({getTrainingDetail:r}),I((()=>{r(e.activeRow.id)})),()=>c("div",{class:[t.trainingDetails]},[c("div",{class:t.studentList},[c("div",{class:t.studentHeaderWrap},[c("div",{class:t.studentHeader},[c("div",{class:t.studentHeaderBorder},[c(w,{class:t.studentHeaderImg,src:s.value.teacherAvatar?s.value.teacherAvatar:Y,previewDisabled:!0},null)])]),c("div",{class:t.workafterInfo},[c("h4",null,[s.value.teacherName," ",c("div",{class:[t.workafterInfoDot,t.workafterTeacherInfoDot]},[T("老师")])]),c("p",null,[T("开始时间:"),s.value.createTime?k(new Date(s.value.createTime)).format("YYYY-MM-DD"):"--"," ",T("| 结束时间:"),k(new Date(s.value.expireDate)).format("YYYY-MM-DD")])])]),"UNSUBMITTED"==s.value.trainingStatus?c(w,{previewDisabled:!0,class:t.workStatus,src:X},null):null,"SUBMITTED"==s.value.trainingStatus?c(w,{previewDisabled:!0,class:t.workStatus,src:Z},null):null,"TARGET"==s.value.trainingStatus?c(w,{previewDisabled:!0,class:t.workStatus,src:_},null):null]),c(K,{style:"max-height:400px",trigger:"none"},{default:()=>[c("div",{class:t.workList},[s.value.studentLessonTrainingDetails.map((e=>c(P,{style:{marginBottom:"20px"},isDisabled:!0,isDelete:!1,isCLassWork:!1,item:e},null)))])]})])}}),le=s({name:"student-studentList",setup(e,{emit:a}){const t=d({searchForm:{keyword:"",trainingStatus:null},loading:!1,pagination:{page:1,rows:10,pageTotal:4},tableList:[],workInfo:{createTime:"",expireDate:"",teacherAvatar:"",teacherName:""},detailVisiable:!1,activeRow:null,index:0}),l=u([$((new Date).getTime()),O((new Date).getTime())]),n=u(),s=x();u([{name:"班级管理",path:"/classList"},{name:s.query.name,path:"/classDetail"},{name:s.query.teacherName,path:"/afterWorkDetail"}]);const i=()=>{t.pagination.page=1,o(),console.log("search",t)},r=()=>{t.searchForm={keyword:"",trainingStatus:null},l.value=[$((new Date).getTime()),O((new Date).getTime())],i()},o=async()=>{t.loading=!0;try{const e=await E({studentId:s.query.studentId,...t.searchForm,...t.pagination,...z(l.value,["startTime","endTime"],"YYYY-MM-DD")});t.tableList=e.data.rows,t.pagination.pageTotal=e.data.total,t.loading=!1}catch(e){t.loading=!1,console.log(e)}};I((()=>{o()}));const g=()=>[{title:"布置老师",key:"teacherName"},{title:"布置时间",key:"createTime",render:e=>e.createTime?k(e.createTime).format("YYYY-MM-DD"):"--"},{title:"截止时间",key:"expireDate",render:e=>e.expireDate?k(e.expireDate).format("YYYY-MM-DD"):"--"},{title:"最后提交时间",key:"submitTime",render:e=>e.submitTime?k(e.submitTime).format("YYYY-MM-DD"):"--"},{title:"提交状态",key:"sex",render:e=>c("div",null,["UNSUBMITTED"==e.trainingStatus?c("p",{class:R.nosub,style:{color:"#aaa"}},[T("未提交")]):null,"SUBMITTED"==e.trainingStatus?c("p",{style:{color:"#EA4132"},class:R.ison},[T("不合格")]):null,"TARGET"==e.trainingStatus?c("p",{class:R.isok},[T("合格")]):null])},{title:"操作",key:"id",render:(e,a)=>c(h,{text:!0,type:"primary",onClick:()=>{((e,a)=>{console.log(a,"index"),t.index=a+1,t.activeRow=e,t.detailVisiable=!0})(e,a)}},{default:()=>[T("详情")]})}];return()=>c("div",null,[c("div",null,[c("div",{class:R.searchList},[c(p,{"label-placement":"left",inline:!0},{default:()=>[c(f,null,{default:()=>[c(F,{value:l.value,"onUpdate:value":e=>l.value=e,separator:"至",type:"daterange",timerValue:l.value},null)]}),c(f,null,{default:()=>[c(W,j({options:[{label:"提交状态",value:null},...J],placeholder:"提交状态",clearable:!0,inline:!0},{value:t.searchForm.trainingStatus,"onUpdate:value":e=>t.searchForm.trainingStatus=e}),null)]}),c(f,null,{default:()=>[c(y,{justify:"end"},{default:()=>[c(h,{type:"primary",class:"searchBtn",onClick:i},{default:()=>[T("搜索")]}),c(h,{type:"primary",ghost:!0,class:"resetBtn",onClick:r},{default:()=>[T("重置")]})]})]})]})]),c("div",null,[c(N,{class:R.classTable,loading:t.loading,columns:g(),data:t.tableList},{empty:()=>c(ee,null,null)}),c(H,{page:t.pagination.page,"onUpdate:page":e=>t.pagination.page=e,pageSize:t.pagination.rows,"onUpdate:pageSize":e=>t.pagination.rows=e,pageTotal:t.pagination.pageTotal,"onUpdate:pageTotal":e=>t.pagination.pageTotal=e,onList:o,sync:!0},null)])]),c(D,{show:t.detailVisiable,"onUpdate:show":e=>t.detailVisiable=e,preset:"card",class:["modalTitle background",R.wordDetailModel],title:"训练详情"},{default:()=>[c(te,{ref:n,onClose:()=>t.detailVisiable=!1,total:t.tableList.length,current:t.index,activeRow:t.activeRow},null)]})])}});e("default",s({name:"studentDetail",setup(e,{emit:l}){const s=d({studentInfo:{avatar:"",nickname:"",gender:null,subjectNames:"",classGroupName:""}}),i=u("baseInfo"),r=x();console.log(r.meta.isClass);const o=u(r.meta.isClass?[{name:"班级管理",path:"/classList"},{name:r.query.name,path:"/classDetail"},{name:r.query.studentName,path:"/classStudentRecode"}]:[{name:"学生管理",path:"/studentList"},{name:r.query.studentName,path:"/classStudentRecode"}]);return I((()=>{(async()=>{console.log(r.query.studentId);try{const e=await n({id:r.query.studentId});s.studentInfo={...e.data}}catch(e){console.log(e)}})()})),()=>c("div",null,[c(L,{list:o.value},null),c("div",{class:[t.listWrap,t.infoListWrap]},[c("div",{class:t.teacherList},[c("div",{class:t.teacherHeader},[c("div",{class:t.teacherHeaderBorder},[c(w,{class:t.teacherHeaderImg,src:s.studentInfo.avatar?s.studentInfo.avatar:Y,previewDisabled:!0},null)])]),c("div",{class:t.workafterInfo},[c("h4",{class:t.studentGender},[s.studentInfo.nickname," ",c(w,{previewDisabled:!0,src:s.studentInfo.gender?U:M},null)]),c("p",null,[s.studentInfo.classGroupName," ",s.studentInfo.subjectNames?"| "+s.studentInfo.subjectNames:" "])])]),c(C,{"onUpdate:value":[e=>(e=>{ae(e,"tabName",r)})(e),e=>i.value=e],class:t.customTabs,value:i.value,size:"large",animated:!1,"pane-wrapper-style":"margin: 0 -4px","pane-style":"padding-left: 4px; padding-right: 4px; box-sizing: border-box;"},{default:()=>[c(S,{name:"baseInfo",tab:"基本信息"},{default:()=>[c(a,{studentInfo:s.studentInfo},null)]}),c(S,{name:"afterWork",tab:"课后作业"},{default:()=>[c(le,null,null)]}),c(S,{name:"textRcode",tab:"练习记录"},{default:()=>[c(q,{studentId:r.query.studentId},null)]}),c(S,{name:"evaluatingRcode",tab:"评测记录"},{default:()=>[c(G,{studentId:r.query.studentId},null)]})]})])])}}))}}}));