1 |
- import{s as n}from"./index.module-42c945ce.js";import{d as k,e as I,b as G,a as N,u as V,n as L,f as e,N as _,g as m,x as w,w as b,j as d,k as r,ca as q,F as v,r as C,t as P,V as T,v as z,ce as J,cf as K,aV as Q,cg as X,ch as Z,ci as x,p as ee,q as E}from"./index-1f06293b.js";import{C as ae}from"./index-c61b52b1.js";import{S as $}from"./index-60e918ae.js";import{C as j}from"./index-8bc0aea8.js";import{P as A}from"./index-1c385238.js";import{h as te,i as le,j as ne,k as se,l as re,m as ie}from"./api-25354676.js";import{T as M}from"./index-fda8277d.js";import{C as O,N as S}from"./index-a2d437b1.js";import{T as oe}from"./index-c2037032.js";import{d as H}from"./teacherIcon-b8e3946d.js";import{N as ue,e as ce}from"./contants-0269fa06.js";import{g as Y,a as U,b as W,c as B,d as R}from"./dateFormat-984f90e0.js";import{a as de}from"./index-ef463105.js";import"./Slider-aaae637d.js";import"./isCollaose-839f20e9.js";import"./index-b1f4042e.js";import"./index-0eb46008.js";import"./catchData-cbf1d846.js";import"./index-070bfdf4.js";const pe=k({name:"student-studentList",setup(c,{emit:f}){const t=I({searchForm:{keyword:"",gender:null},loading:!1,pagination:{page:1,rows:10,pageTotal:4},tableList:[]}),l=G(),p=N(),u=V(),i=()=>{t.pagination.page=1,o(),console.log("search",t)},s=()=>{t.searchForm={keyword:"",gender:null},i()},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=>{u.push({path:"/classStudentDetail",query:{...p.query,studentId:a.id,studentName:a.nickname}})},F=()=>[{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:()=>[r("详情")]})}}];return()=>e("div",null,[e("div",{class:n.searchList},[e(_,{"label-placement":"left",inline:!0},{default:()=>[e(m,null,{default:()=>[e($,w({placeholder:"请输入学生姓名"},{class:n.searchInput,searchWord:t.searchForm.keyword,onChangeValue:a=>t.searchForm.keyword=a}),null)]}),e(m,null,{default:()=>[e(j,w({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(m,null,{default:()=>[e(b,{justify:"end"},{default:()=>[e(d,{type:"primary",class:"searchBtn",onClick:i},{default:()=>[r("搜索")]}),e(d,{type:"primary",ghost:!0,class:"resetBtn",onClick:s},{default:()=>[r("重置")]})]})]})]})]),e("div",{class:n.tableWrap},[e(q,{class:n.classTable,loading:t.loading,columns:F(),data:t.tableList},{empty:()=>e(M,null,null)}),e(A,{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(c,{emit:f,expose:t}){I({uploading:!1});const l=C({teacherName:"",createTime:"",expireDate:"",teacherAvatar:"",studentLessonTrainingDetails:[]});G(),C();const p=(i,s)=>{let o=[];return i==="EVALUATION"?(o=["".concat(ce[s.evaluateDifficult]),"全部小节","".concat(s.trainingTimes,"分合格")],console.log("configJson.evaluateDifficult--",o)):(o=["".concat(s.practiceChapterBegin,"-").concat(s.practiceChapterEnd,"小节"),"速度".concat(s.practiceSpeed),"".concat(s.trainingTimes,"分钟")],console.log("configJson.evaluateDifficult",o)),o},u=async i=>{try{const s=await le({trainingId:i}),o=s.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={...s.data,studentLessonTrainingDetails:o}}catch(s){console.log(s)}};return t({getTrainingDetail:u}),L(()=>{u(c.activeRow.id)}),()=>e("div",{class:[n.trainingDetails]},[e("div",{class:n.studentList},[e("div",{class:n.studentHeaderWrap},[e("div",{class:n.studentHeader},[e("div",{class:n.studentHeaderBorder},[e(P,{class:n.studentHeaderImg,src:l.value.teacherAvatar?l.value.teacherAvatar:H,previewDisabled:!0},null)])]),e("div",{class:n.workafterInfo},[e("h4",null,[l.value.teacherName," ",e("div",{class:[n.workafterInfoDot,n.workafterTeacherInfoDot]},[r("老师")])]),e("p",null,[r("开始时间:"),l.value.createTime?T(new Date(l.value.createTime)).format("YYYY-MM-DD"):"--"," ",r("| 结束时间:"),T(new Date(l.value.expireDate)).format("YYYY-MM-DD")])])])]),e(ue,{style:"max-height:400px",trigger:"none"},{default:()=>[e("div",{class:n.workList},[l.value.studentLessonTrainingDetails.map(i=>e(oe,{style:{marginBottom:"20px"},isDisabled:!0,isDelete:!1,isCLassWork:!0,item:i},null))])]})])}}),me=k({name:"afterWork",setup(c,{emit:f}){const t=C([Y(new Date().getTime()),U(new Date().getTime())]),l=I({searchForm:{status:null},loading:!1,pagination:{page:1,rows:10,pageTotal:4},tableList:[],addWorkVisible:!1,activeRow:null,detailVisiable:!1}),p=V(),u=N(),i=()=>{l.pagination.page=1,o()},s=()=>{t.value=[Y(new Date().getTime()),U(new Date().getTime())],l.searchForm={status:null},i()},o=async()=>{l.loading=!0;try{const a=await ne({classGroupId:u.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:n.indDot},[" ",e("span",null,null),r(" 进行中")]):e("div",{class:n.endDot},[e("span",null,null),r("已结束")])}},{title:"布置人数",key:"expectNum"},{title:"提交人数",key:"trainingNum"},{title:"合格人数",key:"standardNum"},{title:"提交率",key:"trainingRate",render(a){return e(v,null,[a.trainingRate,r("%")])}},{title:"合格率",key:"qualifiedRate",render(a){return e(v,null,[a.qualifiedRate,r("%")])}},{title:"操作",key:"id",render(a){return e(b,null,{default:()=>[e(d,{text:!0,type:"primary",onClick:()=>h(a)},{default:()=>[r("详情")]}),e(d,{text:!0,type:"primary",onClick:()=>F(a)},{default:()=>[r("训练详情")]})]})}}],h=a=>{console.log(a),p.push({path:"/afterWorkDetail",query:{...u.query,teacherName:a.teacherName,trainingId:a.id}})},F=a=>{l.activeRow=a,l.detailVisiable=!0};return()=>e("div",null,[e("div",{class:n.searchList},[e(_,{"label-placement":"left",inline:!0},{default:()=>[e(m,null,{default:()=>[e(O,{value:t.value,"onUpdate:value":a=>t.value=a,separator:"至",type:"daterange",timerValue:t.value},null)]}),e(m,null,{default:()=>[e(j,w({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(m,null,{default:()=>[e(b,{justify:"end"},{default:()=>[e(d,{type:"primary",class:"searchBtn",onClick:i},{default:()=>[r("搜索")]}),e(d,{type:"primary",ghost:!0,class:"resetBtn",onClick:s},{default:()=>[r("重置")]})]})]})]})]),e(d,{class:n.addBtn,type:"primary",onClick:()=>l.addWorkVisible=!0},{default:()=>[r("布置作业")]}),e("div",{class:n.tableWrap},[e(q,{class:n.classTable,loading:l.loading,columns:g(),data:l.tableList},{empty:()=>e(M,null,null)}),e(A,{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:[n.attendClassModal,n.trainClassModal],title:"作业设置"},{default:()=>[e(de,{classGroupId:u.query.id,onClose:()=>{o(),l.addWorkVisible=!1}},null)]}),e(z,{show:l.detailVisiable,"onUpdate:show":a=>l.detailVisiable=a,preset:"card",class:["modalTitle background",n.wordDetailModel],title:"训练详情"},{default:()=>[e(ge,{onClose:()=>l.detailVisiable=!1,activeRow:l.activeRow},null)]})])}}),fe="_tableSpace_iu3mc_1",ye="_tableContainer_iu3mc_4",ve="_header_iu3mc_10",Te="_time_iu3mc_20",he="_ntag_iu3mc_25",De="_content_iu3mc_32",be="_navatar_iu3mc_37",Ce="_userInfo_iu3mc_47",ke="_nowEmpty_iu3mc_58",y={tableSpace:fe,tableContainer:ye,header:ve,time:Te,ntag:he,content:De,navatar:be,userInfo:Ce,nowEmpty:ke};function Fe(c){return typeof c=="function"||Object.prototype.toString.call(c)==="[object Object]"&&!Q(c)}const we=k({name:"class-record",setup(){const c=N(),f=T().format("YYYY-MM-DD"),t=I({searchForm:{createTimer:[T(f).subtract(1,"month").valueOf(),T(f).valueOf()]},loading:!1,pagination:{page:1,rows:10,pageTotal:0},tableList:[]}),l=()=>{t.pagination.page=1,u()},p=()=>{t.searchForm={createTimer:[T(f).subtract(1,"month").valueOf(),T(f).valueOf()]},l()},u=async()=>{t.loading=!0;try{console.log(t.searchForm.createTimer,"state.searchForm.createTimer");const{data:i}=await se({classGroupId:c.query.id,...X(t.searchForm.createTimer,["startTime","endTime"],"YYYY-MM-DD"),...t.pagination}),s=i.rows||[];s.forEach(o=>{o.lessonCourseware=o.lessonCoursewareJson?JSON.parse(o.lessonCoursewareJson):{}}),t.tableList=s,t.pagination.pageTotal=i.total,t.loading=!1}catch(i){t.loading=!1}};return L(()=>{u()}),()=>{let i;return e("div",null,[e("div",{class:y.searchList},[e(_,{"label-placement":"left",inline:!0},{default:()=>[e(m,null,{default:()=>[e(O,{value:t.searchForm.createTimer,"onUpdate:value":s=>t.searchForm.createTimer=s,timerValue:t.searchForm.createTimer,separator:"至",type:"daterange"},null)]}),e(m,null,{default:()=>[e(b,{justify:"end"},{default:()=>[e(d,{type:"primary",class:"searchBtn",onClick:l},{default:()=>[r("搜索")]}),e(d,{type:"primary",ghost:!0,class:"resetBtn",onClick:p},{default:()=>[r("重置")]})]})]})]})]),e("div",{class:y.tableWrap},[e(b,{class:y.tableSpace},Fe(i=t.tableList.map(s=>e("div",{class:y.tableContainer},[e("div",{class:y.header},[e("div",{class:y.time},[T(s.startTime).format("YYYY-MM-DD HH:mm")]),c.query.name&&e(J,{type:"primary",class:y.ntag,strong:!0},{default:()=>[c.query.name]})]),e("div",{class:y.content},[e(K,{class:y.navatar,round:!0,src:s.teacherAvatar||H},null),e("div",{class:y.userInfo},[e("h2",null,[s.teacherName]),e("p",null,[s.lessonCourseware.lessonCoursewareName,r(" |")," ",s.lessonCourseware.lessonCoursewareDetailName,r("|")," ",s.lessonCourseware.lessonCoursewareKnowledgeDetailName])])])])))?i:{default:()=>[i]}),t.tableList.length>0&&e(A,{page:t.pagination.page,"onUpdate:page":s=>t.pagination.page=s,pageSize:t.pagination.rows,"onUpdate:pageSize":s=>t.pagination.rows=s,pageTotal:t.pagination.pageTotal,"onUpdate:pageTotal":s=>t.pagination.pageTotal=s,onList:u,sync:!0,saveKey:"classRecord-key"},null),t.tableList.length<=0&&e(M,{class:y.nowEmpty},null)])])}}}),Ie=k({name:"student-studentList",setup(c,{emit:f}){const t=I({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=N(),p=V(),u=()=>{t.pagination.page=1,o()},i=C([Y(new Date().getTime()),U(new Date().getTime())]),s=()=>{i.value=[Y(new Date().getTime()),U(new Date().getTime())],t.searchForm={keyword:"",trainingStatus:null,vipFlag:null},u()},o=async()=>{t.loading=!0;try{const a=await re({classGroupId:l.query.id,...t.searchForm,...t.pagination,...W(i.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(i.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}})},F=()=>[{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,r("天")])}},{title:"练习时长",key:"studentType",render(a){return e(v,null,[a.practiceDuration?B(a.practiceDuration)>0?B(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:()=>[r("详情")]})}}];return()=>e("div",null,[e("div",{class:n.searchList},[e(_,{"label-placement":"left",inline:!0},{default:()=>[e(m,null,{default:()=>[e($,w({placeholder:"请输入学生姓名"},{class:n.searchInput,searchWord:t.searchForm.keyword,onChangeValue:a=>t.searchForm.keyword=a}),null)]}),e(m,null,{default:()=>[e(j,w({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(m,null,{default:()=>[e(O,{value:i.value,"onUpdate:value":a=>i.value=a,separator:"至",type:"daterange",timerValue:i.value},null)]}),e(m,null,{default:()=>[e(b,{justify:"end"},{default:()=>[e(d,{type:"primary",class:"searchBtn",onClick:u},{default:()=>[r("搜索")]}),e(d,{type:"primary",ghost:!0,class:"resetBtn",onClick:s},{default:()=>[r("重置")]})]})]})]})]),e("div",{class:["section-container"]},[e(Z,{"x-gap":"12",cols:8},{default:()=>[e(x,null,{default:()=>[e("div",{class:n.TrainDataItem},[e("div",null,[e("p",{class:n.TrainDataItemTitle},[e("span",null,[e(S,{from:0,to:t.testInfo.practiceUserCount},null)])," ",r("人")])]),e("p",{class:n.TrainDataItemsubTitle},[r("练习人数")])])]}),e(x,null,{default:()=>[e("div",{class:n.TrainDataItem},[e("p",{class:n.TrainDataItemTitle},[e("span",null,[e(S,{from:0,to:t.testInfo.vipUserCount},null)])," ",r("人")]),e("p",{class:n.TrainDataItemsubTitle},[r("会员人数")])])]}),e(x,null,{default:()=>[e("div",{class:n.TrainDataItem},[e("p",{class:n.TrainDataItemTitle},[B(t.testInfo.practiceDurationAvg)>0?e("div",null,[e("span",null,[e(S,{from:0,to:B(t.testInfo.practiceDurationAvg)},null)])," ",r("分")]):null,e("div",null,[e("span",null,[e(S,{from:0,to:R(t.testInfo.practiceDurationAvg)},null)])," ",r("秒")])]),e("p",{class:n.TrainDataItemsubTitle},[r("平均练习时长")])])]})]})]),e("div",{class:n.tableWrap},[e(q,{class:n.classTable,loading:t.loading,columns:F(),data:t.tableList},{empty:()=>e(M,null,null)}),e(A,{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)])])}}),He=k({name:"base-setting",setup(){const c=sessionStorage.getItem("classDetailTabs"),f=C(c||"student");sessionStorage.removeItem("classDetailTabs");const t=N(),l=C([{name:"班级管理",path:"/classList"},{name:t.query.name,path:"/classDetail"}]);return()=>e("div",null,[e(ae,{list:l.value},null),e("div",{class:[n.listWrap,n.infoListWrap]},[e(ee,{class:n.customTabs,value:f.value,"onUpdate:value":p=>f.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(E,{name:"student",tab:"学员名单"},{default:()=>[e(pe,null,null)]}),e(E,{name:"afterWork",tab:"课后作业"},{default:()=>[e(me,null,null)]}),e(E,{name:"practice",tab:"练习记录"},{default:()=>[e(Ie,null,null)]}),e(E,{name:"attendclass",tab:"上课记录"},{default:()=>[e(we,null,null)]})]})])])}});export{He as default};
|