classDetail-253976b3-1694078809672.js 17 KB

1
  1. import{s}from"./index.module-c55c31aa-1694078809672.js";import{d as k,e as N,b as $,a as I,u as V,n as L,f as e,N as A,g as f,x as F,w as b,j as d,k as i,c9 as q,F as v,r as C,t as P,V as T,v as z,cd as J,ce as K,aU as Q,cf as X,cg as Z,ch as x,p as ee,q as S}from"./index-ce8959eb-1694078809672.js";import{C as ae}from"./index-a9360116-1694078809672.js";import{S as G}from"./index-e67d25d4-1694078809672.js";import{C as j}from"./index-61124a6f-1694078809672.js";import{P as B}from"./index-1a2d0654-1694078809672.js";import{h as te,i as le,j as ne,k as se,l as re,m as ie}from"./api-89d51472-1694078809672.js";import{T as M}from"./index-b4d77148-1694078809672.js";import{C as O,N as E}from"./index-cb5ba51c-1694078809672.js";import{T as oe}from"./index-a771a6b5-1694078809672.js";import{d as H}from"./teacherIcon-b8e3946d-1694078809672.js";import{N as ue,e as ce}from"./contants-ee65eda7-1694078809672.js";import{g as _,a as U,b as W,c as Y,d as R}from"./dateFormat-d2ac9a16-1694078809672.js";import{a as de}from"./index-a9a10738-1694078809672.js";import"./Slider-0c64af90-1694078809672.js";import"./isCollaose-2ffd9935-1694078809672.js";import"./index-8084cfc3-1694078809672.js";import"./index-04d5089f-1694078809672.js";import"./catchData-3be69512-1694078809672.js";import"./index-4ed60982-1694078809672.js";const pe=k({name:"student-studentList",setup(u,{emit:y}){const t=N({searchForm:{keyword:"",gender:null},loading:!1,pagination:{page:1,rows:10,pageTotal:4},tableList:[]}),l=$(),p=I(),c=V(),r=()=>{t.pagination.page=1,o(),console.log("search",t)},n=()=>{t.searchForm={keyword:"",gender:null},r()},o=async()=>{t.loading=!0;try{const a=await te({classGroupId:p.query.id,...t.searchForm,...t.pagination});t.tableList=a.data.rows,t.pagination.pageTotal=a.data.total,t.loading=!1}catch(a){t.loading=!1,console.log(a)}};L(()=>{o()});const g=a=>{const D=document.createElement("input");D.value=a,document.body.appendChild(D),D.select(),D.setSelectionRange(0,D.value.length),document.execCommand("Copy"),document.body.removeChild(D),l.success("复制成功")},h=a=>{c.push({path:"/classStudentDetail",query:{...p.query,studentId:a.id,studentName:a.nickname}})},w=()=>[{title:"学生姓名",key:"nickname",render:a=>e("div",{style:{userSelect:"all",cursor:"pointer"},onClick:()=>g(a.nickname)},[a.nickname])},{title:"手机号",key:"phone",render:a=>e("div",{style:{userSelect:"all",cursor:"pointer"},onClick:()=>g(a.phone)},[a.phone])},{title:"性别",key:"gender",render(a){return e(v,null,[a.gender+""!="null"?a.gender=="0"?"女":"男":"--"])}},{title:"操作",key:"id",render(a){return e(d,{text:!0,type:"primary",onClick:()=>h(a)},{default:()=>[i("详情")]})}}];return()=>e("div",null,[e("div",{class:s.searchList},[e(A,{"label-placement":"left",inline:!0},{default:()=>[e(f,null,{default:()=>[e(G,F({placeholder:"请输入学生姓名"},{class:s.searchInput,searchWord:t.searchForm.keyword,onChangeValue:a=>t.searchForm.keyword=a}),null)]}),e(f,null,{default:()=>[e(j,F({options:[{label:"选择性别",value:null},{label:"男",value:"1"},{label:"女",value:"0"}],placeholder:"性别",clearable:!0,inline:!0},{value:t.searchForm.gender,"onUpdate:value":a=>t.searchForm.gender=a}),null)]}),e(f,null,{default:()=>[e(b,{justify:"end"},{default:()=>[e(d,{type:"primary",class:"searchBtn",onClick:r},{default:()=>[i("搜索")]}),e(d,{type:"primary",ghost:!0,class:"resetBtn",onClick:n},{default:()=>[i("重置")]})]})]})]})]),e("div",{class:s.tableWrap},[e(q,{class:s.classTable,loading:t.loading,columns:w(),data:t.tableList},{empty:()=>e(M,null,null)}),e(B,{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:o,sync:!0},null)])])}}),ge=k({props:{activeRow:{type:Object,default:()=>({id:""})},total:{type:Number,default:0},current:{type:Number,default:0}},name:"classTrainingDetails",emits:["close"],setup(u,{emit:y,expose:t}){N({uploading:!1});const l=C({teacherName:"",createTime:"",expireDate:"",teacherAvatar:"",studentLessonTrainingDetails:[]});$(),C();const p=(r,n)=>{let o=[];return r==="EVALUATION"?(o=[`${ce[n.evaluateDifficult]}`,"全部小节",`${n.trainingTimes}分合格`],console.log("configJson.evaluateDifficult--",o)):(o=[`${n.practiceChapterBegin}-${n.practiceChapterEnd}小节`,`速度${n.practiceSpeed}`,`${n.trainingTimes}分钟`],console.log("configJson.evaluateDifficult",o)),o},c=async r=>{try{const n=await le({trainingId:r}),o=n.data.studentLessonTrainingDetails.map(g=>{const h=p(g.trainingType,JSON.parse(g.trainingContent));return{...g,coverImg:g.titleImg,allTimes:JSON.parse(g.trainingContent).trainingTimes,typeList:h||[]}});l.value={...n.data,studentLessonTrainingDetails:o}}catch(n){console.log(n)}};return t({getTrainingDetail:c}),L(()=>{c(u.activeRow.id)}),()=>e("div",{class:[s.trainingDetails]},[e("div",{class:s.studentList},[e("div",{class:s.studentHeaderWrap},[e("div",{class:s.studentHeader},[e("div",{class:s.studentHeaderBorder},[e(P,{class:s.studentHeaderImg,src:l.value.teacherAvatar?l.value.teacherAvatar:H,previewDisabled:!0},null)])]),e("div",{class:s.workafterInfo},[e("h4",null,[l.value.teacherName," ",e("div",{class:[s.workafterInfoDot,s.workafterTeacherInfoDot]},[i("老师")])]),e("p",null,[i("开始时间:"),l.value.createTime?T(new Date(l.value.createTime)).format("YYYY-MM-DD"):"--"," ",i("| 结束时间:"),T(new Date(l.value.expireDate)).format("YYYY-MM-DD")])])])]),e(ue,{style:"max-height:400px",trigger:"none"},{default:()=>[e("div",{class:s.workList},[l.value.studentLessonTrainingDetails.map(r=>e(oe,{style:{marginBottom:"20px"},isDisabled:!0,isDelete:!1,isCLassWork:!0,item:r},null))])]})])}}),me=k({name:"afterWork",setup(u,{emit:y}){const t=C([_(new Date().getTime()),U(new Date().getTime())]),l=N({searchForm:{status:null},loading:!1,pagination:{page:1,rows:10,pageTotal:4},tableList:[],addWorkVisible:!1,activeRow:null,detailVisiable:!1}),p=V(),c=I(),r=()=>{l.pagination.page=1,o()},n=()=>{t.value=[_(new Date().getTime()),U(new Date().getTime())],l.searchForm={status:null},r()},o=async()=>{l.loading=!0;try{const a=await ne({classGroupId:c.query.id,...l.searchForm,...l.pagination,...W(t.value,["startTime","endTime"],"YYYY-MM-DD")});l.tableList=a.data.rows,l.pagination.pageTotal=a.data.total,l.loading=!1}catch(a){l.loading=!1,console.log(a)}};L(()=>{o()});const g=()=>[{title:"布置老师",key:"teacherName"},{title:"布置时间",key:"createTime",render(a){return e(v,null,[a.createTime])}},{title:"截止时间",key:"expireDate",render(a){return e(v,null,[a.expireDate])}},{title:"训练状态",key:"status",render(a){return a.status==0?e("div",{class:s.indDot},[" ",e("span",null,null),i(" 进行中")]):e("div",{class:s.endDot},[e("span",null,null),i("已结束")])}},{title:"布置人数",key:"expectNum"},{title:"提交人数",key:"trainingNum"},{title:"合格人数",key:"standardNum"},{title:"提交率",key:"trainingRate",render(a){return e(v,null,[a.trainingRate,i("%")])}},{title:"合格率",key:"qualifiedRate",render(a){return e(v,null,[a.qualifiedRate,i("%")])}},{title:"操作",key:"id",render(a){return e(b,null,{default:()=>[e(d,{text:!0,type:"primary",onClick:()=>h(a)},{default:()=>[i("详情")]}),e(d,{text:!0,type:"primary",onClick:()=>w(a)},{default:()=>[i("训练详情")]})]})}}],h=a=>{console.log(a),p.push({path:"/afterWorkDetail",query:{...c.query,teacherName:a.teacherName,trainingId:a.id}})},w=a=>{l.activeRow=a,l.detailVisiable=!0};return()=>e("div",null,[e("div",{class:s.searchList},[e(A,{"label-placement":"left",inline:!0},{default:()=>[e(f,null,{default:()=>[e(O,{value:t.value,"onUpdate:value":a=>t.value=a,separator:"至",type:"daterange",timerValue:t.value},null)]}),e(f,null,{default:()=>[e(j,F({options:[{label:"训练状态",value:null},{label:"已结束",value:1},{label:"进行中",value:0}],placeholder:"训练状态",clearable:!0,inline:!0},{value:l.searchForm.status,"onUpdate:value":a=>l.searchForm.status=a}),null)]}),e(f,null,{default:()=>[e(b,{justify:"end"},{default:()=>[e(d,{type:"primary",class:"searchBtn",onClick:r},{default:()=>[i("搜索")]}),e(d,{type:"primary",ghost:!0,class:"resetBtn",onClick:n},{default:()=>[i("重置")]})]})]})]})]),e(d,{class:s.addBtn,type:"primary",onClick:()=>l.addWorkVisible=!0},{default:()=>[i("布置作业")]}),e("div",{class:s.tableWrap},[e(q,{class:s.classTable,loading:l.loading,columns:g(),data:l.tableList},{empty:()=>e(M,null,null)}),e(B,{page:l.pagination.page,"onUpdate:page":a=>l.pagination.page=a,pageSize:l.pagination.rows,"onUpdate:pageSize":a=>l.pagination.rows=a,pageTotal:l.pagination.pageTotal,"onUpdate:pageTotal":a=>l.pagination.pageTotal=a,onList:o,sync:!0},null)]),e(z,{show:l.addWorkVisible,"onUpdate:show":a=>l.addWorkVisible=a,preset:"card",class:[s.attendClassModal,s.trainClassModal],title:"作业设置"},{default:()=>[e(de,{classGroupId:c.query.id,onClose:()=>{o(),l.addWorkVisible=!1}},null)]}),e(z,{show:l.detailVisiable,"onUpdate:show":a=>l.detailVisiable=a,preset:"card",class:["modalTitle background",s.wordDetailModel],title:"训练详情"},{default:()=>[e(ge,{onClose:()=>l.detailVisiable=!1,activeRow:l.activeRow},null)]})])}}),fe="_tableSpace_gafsc_1",ye="_tableContainer_gafsc_4",ve="_header_gafsc_10",Te="_time_gafsc_20",he="_ntag_gafsc_25",De="_content_gafsc_32",be="_navatar_gafsc_37",Ce="_userInfo_gafsc_47",ke="_subjectName_gafsc_58",we="_nowEmpty_gafsc_67",m={tableSpace:fe,tableContainer:ye,header:ve,time:Te,ntag:he,content:De,navatar:be,userInfo:Ce,subjectName:ke,nowEmpty:we};function Fe(u){return typeof u=="function"||Object.prototype.toString.call(u)==="[object Object]"&&!Q(u)}const Ne=k({name:"class-record",setup(){const u=I(),y=()=>{const r=u.query.gradeYear;if(r){const n=`${r}-9-1`,o=`${Number(r)+1}-8-31`;return[T(n).valueOf(),T(o).valueOf()]}else{const n=T().format("YYYY-MM-DD");return[T(n).subtract(1,"month").valueOf(),T(n).valueOf()]}},t=N({searchForm:{createTimer:y()},loading:!1,pagination:{page:1,rows:10,pageTotal:0},tableList:[]}),l=()=>{t.pagination.page=1,c()},p=()=>{t.searchForm={createTimer:y()},l()},c=async()=>{t.loading=!0;try{const{data:r}=await se({classGroupId:u.query.id,...X(t.searchForm.createTimer,["startTime","endTime"],"YYYY-MM-DD"),...t.pagination}),n=r.rows||[];n.forEach(o=>{o.lessonCourseware=o.lessonCoursewareJson?JSON.parse(o.lessonCoursewareJson):{}}),t.tableList=n,t.pagination.pageTotal=r.total,t.loading=!1}catch(r){t.loading=!1}};return L(()=>{c()}),()=>{let r;return e("div",null,[e("div",{class:m.searchList},[e(A,{"label-placement":"left",inline:!0},{default:()=>[e(f,null,{default:()=>[e(O,{value:t.searchForm.createTimer,"onUpdate:value":n=>t.searchForm.createTimer=n,timerValue:t.searchForm.createTimer,separator:"至",type:"daterange"},null)]}),e(f,null,{default:()=>[e(b,{justify:"end"},{default:()=>[e(d,{type:"primary",class:"searchBtn",onClick:l},{default:()=>[i("搜索")]}),e(d,{type:"primary",ghost:!0,class:"resetBtn",onClick:p},{default:()=>[i("重置")]})]})]})]})]),e("div",{class:m.tableWrap},[e(b,{class:m.tableSpace},Fe(r=t.tableList.map(n=>e("div",{class:m.tableContainer},[e("div",{class:m.header},[e("div",{class:m.time},[T(n.startTime).format("YYYY-MM-DD HH:mm")]),u.query.name&&e(J,{type:"primary",class:m.ntag,strong:!0},{default:()=>[u.query.name]})]),e("div",{class:m.content},[e(K,{class:m.navatar,round:!0,src:n.teacherAvatar||H},null),e("div",{class:m.userInfo},[e("h2",null,[n.teacherName]),e("p",null,[n.subjectName&&e("span",{class:m.subjectName},[n.subjectName]),n.lessonCourseware.lessonCoursewareName,i(" |")," ",n.lessonCourseware.lessonCoursewareDetailName,i("|")," ",n.lessonCourseware.lessonCoursewareKnowledgeDetailName])])])])))?r:{default:()=>[r]}),t.tableList.length>0&&e(B,{page:t.pagination.page,"onUpdate:page":n=>t.pagination.page=n,pageSize:t.pagination.rows,"onUpdate:pageSize":n=>t.pagination.rows=n,pageTotal:t.pagination.pageTotal,"onUpdate:pageTotal":n=>t.pagination.pageTotal=n,onList:c,sync:!0,saveKey:"classRecord-key"},null),t.tableList.length<=0&&e(M,{class:m.nowEmpty},null)])])}}}),Ie=k({name:"student-studentList",setup(u,{emit:y}){const t=N({searchForm:{keyword:"",trainingStatus:null,vipFlag:null},searchWord:"",orchestraType:null,courseTypeCode:null,subjectId:null,classId:null,studentType:null,loading:!1,pagination:{page:1,rows:10,pageTotal:4},tableList:[],memberNumber:0,testInfo:{practiceDurationAvg:0,vipUserCount:0,practiceUserCount:0},activeRow:null}),l=I(),p=V(),c=()=>{t.pagination.page=1,o()},r=C([_(new Date().getTime()),U(new Date().getTime())]),n=()=>{r.value=[_(new Date().getTime()),U(new Date().getTime())],t.searchForm={keyword:"",trainingStatus:null,vipFlag:null},c()},o=async()=>{t.loading=!0;try{const a=await re({classGroupId:l.query.id,...t.searchForm,...t.pagination,...W(r.value,["startTime","endTime"],"YYYY-MM-DD")});t.tableList=a.data.rows,t.pagination.pageTotal=a.data.total,t.loading=!1}catch(a){t.loading=!1,console.log(a)}},g=async()=>{try{const a=await ie({classGroupId:l.query.id,...W(r.value,["startTime","endTime"],"YYYY-MM-DD")});t.testInfo.practiceDurationAvg=a.data.practiceDurationAvg,t.testInfo.practiceUserCount=a.data.practiceUserCount,t.testInfo.vipUserCount=a.data.vipUserCount}catch(a){console.log(a)}};L(()=>{g(),o()});const h=a=>{p.push({path:"/classStudentRecode",query:{...l.query,studentId:a.studentId,studentName:a.studentName}})},w=()=>[{title:"姓名",key:"studentName"},{title:"手机号",key:"studentPhone"},{title:"性别",key:"sex",render(a){return e(v,null,[a.gender+""!="null"?a.gender=="0"?"女":"男":"--"])}},{title:"学生类型",key:"studentType",render(a){return e(v,null,[a.vipFlag?"会员":"普通"])}},{title:"练习天数",key:"practiceDays",render(a){return e(v,null,[a.practiceDays?a.practiceDays:0,i("天")])}},{title:"练习时长",key:"studentType",render(a){return e(v,null,[a.practiceDuration?Y(a.practiceDuration)>0?Y(a.practiceDuration)+"分"+R(a.practiceDuration)+"秒":R(a.practiceDuration)+"秒":0])}},{title:"操作",key:"id",render(a){return e(d,{text:!0,type:"primary",onClick:()=>{h(a)}},{default:()=>[i("详情")]})}}];return()=>e("div",null,[e("div",{class:s.searchList},[e(A,{"label-placement":"left",inline:!0},{default:()=>[e(f,null,{default:()=>[e(G,F({placeholder:"请输入学生姓名"},{class:s.searchInput,searchWord:t.searchForm.keyword,onChangeValue:a=>t.searchForm.keyword=a}),null)]}),e(f,null,{default:()=>[e(j,F({options:[{label:"学生类型",value:null},{label:"会员",value:!0},{label:"普通",value:!1}],placeholder:"学生类型",clearable:!0,inline:!0},{value:t.searchForm.vipFlag,"onUpdate:value":a=>t.searchForm.vipFlag=a}),null)]}),e(f,null,{default:()=>[e(O,{value:r.value,"onUpdate:value":a=>r.value=a,separator:"至",type:"daterange",timerValue:r.value},null)]}),e(f,null,{default:()=>[e(b,{justify:"end"},{default:()=>[e(d,{type:"primary",class:"searchBtn",onClick:c},{default:()=>[i("搜索")]}),e(d,{type:"primary",ghost:!0,class:"resetBtn",onClick:n},{default:()=>[i("重置")]})]})]})]})]),e("div",{class:["section-container"]},[e(Z,{"x-gap":"12",cols:8},{default:()=>[e(x,null,{default:()=>[e("div",{class:s.TrainDataItem},[e("div",null,[e("p",{class:s.TrainDataItemTitle},[e("span",null,[e(E,{from:0,to:t.testInfo.practiceUserCount},null)])," ",i("人")])]),e("p",{class:s.TrainDataItemsubTitle},[i("练习人数")])])]}),e(x,null,{default:()=>[e("div",{class:s.TrainDataItem},[e("p",{class:s.TrainDataItemTitle},[e("span",null,[e(E,{from:0,to:t.testInfo.vipUserCount},null)])," ",i("人")]),e("p",{class:s.TrainDataItemsubTitle},[i("会员人数")])])]}),e(x,null,{default:()=>[e("div",{class:s.TrainDataItem},[e("p",{class:s.TrainDataItemTitle},[Y(t.testInfo.practiceDurationAvg)>0?e("div",null,[e("span",null,[e(E,{from:0,to:Y(t.testInfo.practiceDurationAvg)},null)])," ",i("分")]):null,e("div",null,[e("span",null,[e(E,{from:0,to:R(t.testInfo.practiceDurationAvg)},null)])," ",i("秒")])]),e("p",{class:s.TrainDataItemsubTitle},[i("平均练习时长")])])]})]})]),e("div",{class:s.tableWrap},[e(q,{class:s.classTable,loading:t.loading,columns:w(),data:t.tableList},{empty:()=>e(M,null,null)}),e(B,{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:o,sync:!0},null)])])}}),Pe=k({name:"base-setting",setup(){const u=sessionStorage.getItem("classDetailTabs"),y=C(u||"student");sessionStorage.removeItem("classDetailTabs");const t=I(),l=C([{name:"班级管理",path:"/classList"},{name:t.query.name,path:"/classDetail"}]);return()=>e("div",null,[e(ae,{list:l.value},null),e("div",{class:[s.listWrap,s.infoListWrap]},[e(ee,{class:s.customTabs,value:y.value,"onUpdate:value":p=>y.value=p,size:"large",animated:!1,"pane-wrapper-style":"margin: 0 -4px","pane-style":"padding-left: 4px; padding-right: 4px; box-sizing: border-box;"},{default:()=>[e(S,{name:"student",tab:"学员名单"},{default:()=>[e(pe,null,null)]}),e(S,{name:"afterWork",tab:"课后作业"},{default:()=>[e(me,null,null)]}),e(S,{name:"practice",tab:"练习记录"},{default:()=>[e(Ie,null,null)]}),e(S,{name:"attendclass",tab:"上课记录"},{default:()=>[e(Ne,null,null)]})]})])])}});export{Pe as default};