1 |
- import{H as J,d as I,r as D,u as at,a as X,e as T,U as K,q as L,f as t,k as i,aG as W,F as y,j as z,x as H,S as Z,V as k,$ as h,C as V,T as st,a0 as it,a1 as lt,t as nt,v as N,y as rt}from"./index-b48b51d2-1720699367816.js";import{g as ot,a as ut}from"./use-async-6da85328-1720699367816.js";import{C as ct}from"./index-d625d9c9-1720699367816.js";import{s as a}from"./index2.module-582a9210-1720699367816.js";import{u as $}from"./useECharts-08a6985a-1720699367816.js";import{P as _}from"./index-3d012fb0-1720699367816.js";import{N as E,b as R,c as B,d as S,g as j,a as Q}from"./dateFormat-e2371de5-1720699367816.js";import{j as dt,s as pt,l as gt}from"./api-8195f6bd-1720699367816.js";import{T as M}from"./index-a2dc20f3-1720699367816.js";import{g as O,s as C}from"./index-db345329-1720699367816.js";import{g as mt,s as q}from"./api-53c4c1b8-1720699367816.js";import"./index-966150e9-1720699367816.js";const At="_listWrap_x49zf_1",ft="_customTabs_x49zf_7",ht="_searchBtn_x49zf_28",yt="_resetBtn_x49zf_33",x={listWrap:At,customTabs:ft,searchBtn:ht,resetBtn:yt},vt=v=>J.post("/edu-app/lessonTraining/trainingStat",{data:v}),Dt=v=>J.post("/edu-app/musicPracticeRecordStat/trainingStat",{data:v}),Tt=I({name:"home-trainData",props:{timer:{type:Array,defaut:()=>[]}},setup(v,{expose:w}){const l=D(null),{setOptions:o}=$(l),u=D(!0),g=D(!0),m=at();X();const d=T({height:"360px",width:"100%",studentNum:0,paymentAmount:0,dateList:[],studentList:[],payInfoList:[]}),p=D({qualifiedRate:0,qualifiedStudentCount:0,submitStudentCount:0,totalStudentCount:0,trainingCount:0,trainingRate:0}),r=T({loading:!1,pagination:{page:1,rows:10,pageTotal:4},tableList:[],goCourseVisiable:!1}),c=K(()=>v.timer),n=()=>[{title:"布置老师",key:"teacherName"},{title:"布置时间",key:"createTime",render(s){return t(y,null,[s.createTime])}},{title:"截止时间",key:"expireDate",render(s){return t(y,null,[s.expireDate])}},{title:"训练状态",key:"status",render(s){return s.status==0?t("div",{class:a.indDot},[" ",t("span",null,null),i(" 进行中")]):t("div",{class:a.endDot},[t("span",null,null),i("已结束")])}},{title:"布置人数",key:"expectNum"},{title:"提交人数",key:"trainingNum"},{title:"合格人数",key:"standardNum"},{title:"提交率",key:"trainingRate",render(s){return t(y,null,[s.trainingRate,i("%")])}},{title:"合格率",key:"qualifiedRate",render(s){return t(y,null,[s.qualifiedRate,i("%")])}},{title:"操作",key:"id",render(s){return t(H,null,{default:()=>[t(z,{text:!0,type:"primary",onClick:()=>e(s)},{default:()=>[i("详情")]})]})}}],e=s=>{console.log(s),m.push({path:"/homework-record-detail",query:{id:s.id,name:s.name}})},A=async()=>{try{const s=await vt({...R(c.value,["startTime","endTime"],"YYYY-MM-DD")});p.value={...s.data},d.dateList=s.data.trainingStatDetails.map(f=>f.date),d.payInfoList=s.data.trainingStatDetails.map(f=>f.qualifiedStudentCount),d.studentList=s.data.trainingStatDetails.map(f=>f.unqualifiedStudentCount),b()}catch(s){console.log(s)}try{const s=await dt({...r.pagination,...R(c.value,["startTime","endTime"],"YYYY-MM-DD")});r.tableList=s.data.rows,r.pagination.pageTotal=s.data.total,r.loading=!1}catch(s){r.loading=!1,console.log(s)}};w({getList:A});const b=()=>{o({tooltip:{trigger:"axis",axisPointer:{lineStyle:{width:2,color:"#A9C7FF"}}},legend:{show:!1,selected:{合格人数:u.value,不合格人数:g.value}},xAxis:{type:"category",boundaryGap:!0,axisLabel:{show:!0},data:d.dateList},yAxis:[{type:"value",axisLabel:{formatter:"{value}人"},axisTick:{show:!1},splitArea:{show:!1,areaStyle:{color:["rgba(255,255,255,0.2)"]}},minInterval:1,splitNumber:5}],grid:{left:"1%",right:"1%",top:"2 %",bottom:0,containLabel:!0},series:[{data:d.studentList,symbolSize:10,type:"line",name:"不合格人数",symbol:"circle",smooth:!0,itemStyle:{color:"#FF7AA7",borderColor:"#fff",borderWidth:3},lineStyle:{width:3},areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"rgba(255, 243, 246, 1)"},{offset:1,color:"rgba(255, 246, 248, 0)"}]}},emphasis:{disabled:!0}},{data:d.payInfoList,type:"line",name:"合格人数",symbolSize:10,symbol:"circle",smooth:!0,itemStyle:{color:"#198CFE",borderColor:"#fff",borderWidth:3},lineStyle:{width:2},areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"rgba(212, 231, 255, 1)"},{offset:1,color:"rgba(221, 235, 254, 0)"}]}},emphasis:{disabled:!0}}],formatter:s=>Array.isArray(s)?[s[0].axisValueLabel,...s.map(f=>"<br/>".concat(f.marker,'<span style="margin-top:10px;margin-left:5px;font-size: 13px;font-weight: 500;\n color: #333333;\n line-height: 18px;">').concat(f.seriesName,": ").concat(f.value,"人 </span>"))].join(""):s})};return L(()=>{A()}),()=>t(y,null,[t("div",{class:a.homeTrainData},[t("div",{class:a.TrainDataTop},[t("div",{class:a.TrainDataTopLeft},[t("div",{class:a.TrainDataItem},[t("p",{class:a.TrainDataItemTitle},[t("div",null,[t("span",null,[t(E,{from:0,to:p.value.trainingCount},null)]),i("次")])]),t("p",{class:a.TrainDataItemsubTitle},[i("作业次数")])]),t("div",{class:a.TrainDataItem},[t("p",{class:a.TrainDataItemTitle},[t("div",null,[t("span",null,[t(E,{from:0,to:p.value.totalStudentCount},null)]),i("人次")])]),t("p",{class:a.TrainDataItemsubTitle},[i("应交总人次")])]),t("div",{class:a.TrainDataItem},[t("p",{class:a.TrainDataItemTitle},[t("div",null,[t("span",null,[t(E,{from:0,to:p.value.submitStudentCount},null)]),i("人次")])]),t("p",{class:a.TrainDataItemsubTitle},[i("提交总人次")])]),t("div",{class:a.TrainDataItem},[t("p",{class:a.TrainDataItemTitle},[t("div",null,[t("span",null,[t(E,{from:0,to:p.value.qualifiedStudentCount},null)]),i("人次")])]),t("p",{class:a.TrainDataItemsubTitle},[i("合格总人次")])]),t("div",{class:a.TrainDataItem},[t("p",{class:a.TrainDataItemTitle},[t("div",null,[t("span",null,[t(E,{from:0,to:p.value.trainingRate},null)]),i("%")])]),t("p",{class:a.TrainDataItemsubTitle},[i("作业提交率")])]),t("div",{class:a.TrainDataItem},[t("p",{class:a.TrainDataItemTitle},[t("div",null,[t("span",null,[t(E,{from:0,to:p.value.qualifiedRate},null)]),i("%")])]),t("p",{class:a.TrainDataItemsubTitle},[i("作业合格率")])])]),t("div",{class:a.TrainDataTopRight},[t("div",{onClick:()=>{u.value=!u.value,b()},class:[a.DataTopRightItem,u.value?"":a.DataTopRightItemDis]},[t("div",{class:a.DataTopRightDot},null),t("p",null,[i("合格人数")])]),t("div",{onClick:()=>{g.value=!g.value,b()},class:[a.DataTopRightItem,g.value?"":a.DataTopRightItemDis]},[t("div",{class:[a.DataTopRightDot,a.red]},null),t("p",null,[i("不合格人数")])])])]),t("div",{class:a.chatrs},[t("div",{ref:l,style:{height:d.height,width:d.width}},null)]),t("div",{class:a.tableWrap},[t(W,{class:a.classTable,loading:r.loading,columns:n(),data:r.tableList},{empty:()=>t(M,null,null)}),t(_,{page:r.pagination.page,"onUpdate:page":s=>r.pagination.page=s,pageSize:r.pagination.rows,"onUpdate:pageSize":s=>r.pagination.rows=s,pageTotal:r.pagination.pageTotal,"onUpdate:pageTotal":s=>r.pagination.pageTotal=s,onList:A,sync:!0},null)])])])}}),bt=I({name:"home-practiceData",props:{timer:{type:Array,defaut:()=>[]}},setup(v,{expose:w}){const l=D(null),{setOptions:o}=$(l),u=D(!0),g=T({height:"360px",width:"100%",practiceUserCount:0,paymentAmount:0,practiceDurationAvg:0,practiceDays:0,practiceDurationTotal:0,dateList:[],timeList:[]}),m=T({loading:!1,pagination:{page:1,rows:10,pageTotal:4},tableList:[],goCourseVisiable:!1}),d=K(()=>v.timer),p=()=>[{title:"日期",key:"date"},{title:"练习人数",key:"practiceUserCount",render(n){return t(y,null,[n.practiceUserCount,i("人")])}},{title:"平均每天练习时长",key:"practiceDuration",render(n){return t(y,null,[" ",t(y,null,[n.practiceDuration?B(n.practiceDuration)>0?B(n.practiceDuration)+"分"+S(n.practiceDuration)+"秒":S(n.practiceDuration)+"秒":"0分钟"])])}}],r=async()=>{try{const n=await pt({page:1,rows:999,...R(d.value,["startTime","endTime"],"YYYY-MM-DD")}),e=await Dt({page:1,rows:999,...R(d.value,["startTime","endTime"],"YYYY-MM-DD")});m.tableList=n.data.rows,g.practiceDurationAvg=e.data.practiceDurationAvg,g.practiceUserCount=e.data.practiceUserCount,g.dateList=e.data.trainingStatDetailList.map(A=>A.date),g.timeList=e.data.trainingStatDetailList.map(A=>A.practiceUserCount),c()}catch(n){console.log(n)}};w({getList:r});const c=()=>{o({tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},legend:{show:!1,selected:{练习人数:u.value}},xAxis:{type:"category",boundaryGap:!0,axisLabel:{show:!0},data:g.dateList},yAxis:[{type:"value",axisLabel:{formatter:"{value}人"},axisTick:{show:!1},splitArea:{show:!1,areaStyle:{color:["rgba(255,255,255,0.2)"]}},minInterval:1,splitNumber:5}],grid:{left:"1%",right:"1%",top:"2%",bottom:0,containLabel:!0},series:[{data:g.timeList,symbolSize:10,type:"line",symbol:"circle",smooth:!0,itemStyle:{normal:{barBorderRadius:[8,8,0,0],color:"#3583FA"},emphasis:{color:"#3583FA"}}}],formatter:n=>Array.isArray(n)?[n[0].axisValueLabel,...n.map(e=>"<br/>".concat(e.marker,'<span style="margin-top:10px;margin-left:5px;font-size: 13px;font-weight: 500;\n color: #131415;font-weight: 600;\n margin-top:12px\n line-height: 18px;">练习人数: ').concat(e.value,"人 </span>"))].join(""):n})};return L(()=>{r()}),()=>t(y,null,[t("div",{class:a.homeTrainData},[t("div",{class:a.TrainDataTop},[t("div",{class:a.TrainDataTopLeft},[t("div",{class:a.TrainDataItem},[t("p",{class:a.TrainDataItemTitle},[t("div",null,[t("span",null,[t(E,{from:0,to:g.practiceUserCount},null)]),i("人")])]),t("p",{class:a.TrainDataItemsubTitle},[i("练习人数")])]),t("div",{class:a.TrainDataItem},[t("p",{class:a.TrainDataItemTitle},[B(g.practiceDurationAvg)>0?t("div",null,[t("span",null,[t(E,{from:0,to:B(g.practiceDurationAvg)},null)]),i("分")]):null,t("div",null,[t("span",null,[t(E,{from:0,to:S(g.practiceDurationAvg)},null)]),i("秒")])]),t("p",{class:a.TrainDataItemsubTitle},[i("平均每天练习时长")])])]),t("div",{class:a.TrainDataTopRight},null)]),t("div",{class:a.chatrs},[t("div",{ref:l,style:{height:g.height,width:g.width}},null)]),t("div",{class:a.tableWrap},[t(W,{class:a.classTable,loading:m.loading,columns:p(),data:m.tableList},{empty:()=>t(M,null,null)})])])])}}),Y="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAaVJREFUWEft1i9oVlEYx/HPKwoiE7dgGCz5BwymgW0MlkSzjAVBTMKKCCLojE5hC5tBbBajZWAxGMbQJLLgwCBiELWYnJPhBL0Hbrjhdfc55w7eslvP8/x+3/Occ5/z9Az46w3Y3z5AlwoM4RbW8LL0KEsBDuEmTuEvHmG9BKIEIOVcw7mG4W8s4FMuRAnAJVzoY/QD8/ieA5ELMFnt8souBl/xoLobv6IQOQBncR0HWsTfYxl/IhBRgDHcxuGIKF7jSSQ2AjBc7eYuRiKCjZgVPG/LiQDcwck2of+sL2Fjt9wIwGkcLQBI/eFD1S9+dgUo8I6nRCoQVyuI3AeIVOAijhVUN6W8wueul/Bq9dxOFABs4z6+dAU4iBs4kwGRfsGHeNeWEzmCpHEEqSGNtgnW60+xGomNAiSt45gLNKUXeBYxTzE5ACn+RD2GpYmo3/cWj+spKcSQC5BExzHbB/4jFqsq7YSc66ASgJR6HtMNozQF3cNmjnnJETT1L2MKW/UU9C3XvCtAmoxm8KZ+9Ur8sy9hkUnXRrTnpk3B0ku4Z1ADB/gHdk40IWFOgVEAAAAASUVORK5CYII=",G="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAfNJREFUWEftlj1oVEEUhb+bzSZr4Q8KSVTSGO0shIBgZStWKmohSEAQ0com4iYigay+1UJsRLSwECwUA0EEGwvFdEJsJEVEDG4WURTREJEQ381OiLDIZufOPCHN3vbde843Z4aZJ6xxyRr70wLIksB64ALwEngeu5WxAHlgENgJKHALmIyBiAFwM2eAvXWGC8A14EMoRAzAUeBgA6OfQAn4GgIRCrC/tsqBJgZVIKmdjV9WiBCA3cB5oM0jPgXcBBYtEFaAXqAIFCyiwARwz9JrAdhUW80lYLNFsK5nHHjim7EADAN9PqFVvt8A3jabtQDsAjZEALj74R0wlxUgwts+YknArhbR2QLwJtBT1LMoXcHpKtrRxuOPibiLadXyAwzpdU05HgwA8+0FDldHZDoTQP8dzc/OcB9lnxlCSfPCqdmyvPDNeBNwAjvKunH+O2PI8vvvLc0x/OWKPPA2gv2fcFtJe9M5xlXY0lRYuPs5kasWc9djSuCv2PYh3fMn5aFCZyMDgWefEs6JiLsFTRUE4BS3XtQDKdxuAD+5rsCJmRH5bXJeaQoGcHPdRT2N4h6p5RKo5IRD1US+hZgHb0G9eHdRR1FOAj862jlSKcn7UPNMAMceae7VGy7nlaeVsryOMc8EEGv471zUGfhf5q0EXAJLvU1qIfWKMrsAAAAASUVORK5CYII=",P="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAfBJREFUWEftlj9oU1EUxn+nDSlFA5ZCtGIF/wydraMU3ERcpFCyqOBS6ijUxGTJIG2COGigq4Kg0krBTVwEEZfQRTdblza1FQUhKMRac3wXEqiY9P5JoUveer9zvt/7zn3vXmGfH9lnf7oAwQkcz+jAL3gm8HSzII9CRxkEcPqB9lXXeSLCKKC9MPm5IK9CILwBVFWGspRUudQ0FKjFepiozMh7XwhvgCMZTStM/WekfI31c3k9LxUfCC+Aw1lNUafQ1kBZTvQzvpKXqiuEM8BwWse2hIdAr6X5u2MnuLY0Kb9dIJwAjt7WkT/Kc+CgU1NhYXNWpp20NtGpvCZ/1HgBDNm0/6wr974UpWSrsSaQTOuiCGdsjVqtx5Wra0V5s1utFWA4p2e3lUFfAKmjMSivFuR7RwC+xr56awK+DX31XQCXBC4Ch3yjNYcU8BZY63QTXgfOBQDUgBlg17PBJYEYcBMY8YCoA/eBD7YaFwDT4wCQ9fgbPgZe28zNuiuA0SaBHJCwNH4JzLuY+wIY/UngVjTbeBuDpQh0rrEBnRh8Emg2NNewGy3S+xSN6m40qi0n54YoBMCUXgAmdhh9A+5Em9X5ItKsDQUw9VeA88DPxue24fPmewFgbkYpoAx8DDEP2YShPm3rOhnBnsB0Af4CGTRoIX3GdrkAAAAASUVORK5CYII=",Ct=I({name:"student-studentList",props:{timer:{type:Array,defaut:()=>[]}},setup(v,{emit:w,expose:l}){const o=T({searchWord:"",orchestraType:null,courseTypeCode:null,subjectId:null,classId:null,studentType:null,loading:!1,pagination:{page:1,rows:10,pageTotal:4},tableList:[]}),u=T({ase:0,sortType:1}),g=K(()=>(console.log("ranking===>"),v.timer)),m=async()=>{o.loading=!0;try{const e=await gt({...o.pagination,...u,...R(g.value,["startTime","endTime"],"YYYY-MM-DD")});o.tableList=e.data.rows,o.pagination.pageTotal=e.data.total,o.loading=!1}catch(e){o.loading=!1,console.log(e)}};l({getList:m}),L(async()=>{await m(),Z(()=>{document.querySelectorAll(".n-data-table-sorter").forEach(A=>{A.style.display="none"})})});const d=e=>{if(!e)u.ase=0,u.sortType=1,p.sortOrder=!1,r.sortOrder=!1,c.sortOrder=!1;else{const A={practiceDuration:1,practiceDays:2,practiceDurationAvg:3};u.sortType=A[e.columnKey],e.columnKey=="practiceDuration"&&(r.sortOrder=e.order,p.sortOrder=!1,c.sortOrder=!1),e.columnKey=="practiceDays"&&(p.sortOrder=e.order,r.sortOrder=!1,c.sortOrder=!1),e.columnKey=="practiceDurationAvg"&&(c.sortOrder=e.order,p.sortOrder=!1,r.sortOrder=!1),u.ase=e.order=="ascend"?1:0}m()},p=T({title(){return t(k,{showArrow:!1,placement:"top-start"},{trigger:()=>t("div",{class:a.cell},[i("练习天数"),t("img",{class:a.sortIcon,src:p.sortOrder==="descend"?G:p.sortOrder==="ascend"?P:Y},null)]),default:p.sortOrder==="descend"?"点击升序":p.sortOrder==="ascend"?"取消排序":"点击降序"})},key:"practiceDays",sorter:!0,sortOrder:!1,render(e){return t(y,null,[e.practiceDays?e.practiceDays:0,i("天")])}}),r=T({title(){return t(k,{showArrow:!1,placement:"top-start"},{trigger:()=>t("div",{class:a.cell},[i("练习总时长"),t("img",{class:a.sortIcon,src:r.sortOrder==="descend"?G:r.sortOrder==="ascend"?P:Y},null)]),default:r.sortOrder==="descend"?"点击升序":r.sortOrder==="ascend"?"取消排序":"点击降序"})},key:"practiceDuration",sorter:!0,sortOrder:!1,render(e){return t(y,null,[e.practiceDuration?B(e.practiceDuration)>0?B(e.practiceDuration)+"分"+S(e.practiceDuration)+"秒":S(e.practiceDuration)+"秒":0])}}),c=T({title(){return t(k,{showArrow:!1,placement:"top-start"},{trigger:()=>t("div",{class:a.cell},[i("平均每天练习时长"),t("img",{class:a.sortIcon,src:c.sortOrder==="descend"?G:c.sortOrder==="ascend"?P:Y},null)]),default:c.sortOrder==="descend"?"点击升序":c.sortOrder==="ascend"?"取消排序":"点击降序"})},key:"practiceDurationAvg",sorter:!0,sortOrder:!1,render(e){return t(y,null,[e.practiceDurationAvg?B(e.practiceDurationAvg)>0?B(e.practiceDurationAvg)+"分"+S(e.practiceDurationAvg)+"秒":S(e.practiceDurationAvg)+"秒":0])}}),n=()=>[{title:"姓名",key:"studentName"},{title:"手机号",key:"studentPhone"},p,r,c];return()=>t("div",{class:a.listWrap},[t("div",{class:a.tableWrap},[t(W,{class:a.classTable,loading:o.loading,columns:n(),data:o.tableList,"onUpdate:sorter":d},{empty:()=>t(M,null,null)}),t(_,{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:m,sync:!0},null)])])}}),Et=I({name:"data-guide",emits:["close"],setup(v,{emit:w}){const l=T({box:{height:"0px"},show:!1,steps:[{ele:"",eleRect:{},img:O("data1.png"),handStyle:{top:"0.91rem"},imgStyle:{top:h(-4),left:h(-100),width:h(472),height:h(256)},btnsStyle:{bottom:h(30),left:h(-110)},boxStyle:{borderRadius:"25px"},eleRectPadding:{left:14,top:14,width:28,height:28}},{ele:"",img:O("data2.png"),imgStyle:{top:h(-4),left:h(-100),width:h(509),height:h(230)},btnsStyle:{bottom:h(30),left:h(-110)},boxStyle:{borderRadius:"25px"},eleRectPadding:{left:14,top:14,width:28,height:28}},{ele:"",img:O("data3.png"),imgStyle:{top:"100%",left:h(-105),width:h(438),height:h(230)},btnsStyle:{bottom:h(30),left:h(-115)},boxStyle:{borderRadius:"25px"},eleRectPadding:{left:14,top:14,width:28,height:28}}],step:0}),o=D(!1),u=D({});(async()=>{var n;try{const e=await mt({guideTag:"teacher-guideInfo"});e.data?u.value=JSON.parse((n=e.data)==null?void 0:n.guideValue)||null:u.value={},u.value&&u.value.dataGuide?o.value=!1:o.value=!0}catch(e){console.log(e)}})();const m=()=>{var e,A,b,s;const n=document.getElementById("data-".concat(l.step));if(n){const f=n.getBoundingClientRect(),F=((e=l.steps[l.step].eleRectPadding)==null?void 0:e.left)||0,U=((A=l.steps[l.step].eleRectPadding)==null?void 0:A.top)||0,tt=((b=l.steps[l.step].eleRectPadding)==null?void 0:b.width)||0,et=((s=l.steps[l.step].eleRectPadding)==null?void 0:s.height)||0;l.box={left:f.x-F+"px",top:f.y-U+"px",width:f.width+tt+"px",height:f.height+et+"px"}}else r()},d=async n=>{try{if(n!=="data-module")return;u.value?u.value.dataGuide=!1:u.value={dataGuide:!1};try{await q({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(u.value)})}catch(e){console.log(e)}l.step=0,m(),o.value=!0}catch(e){}};L(()=>{m(),window.addEventListener("resize",p),V.on("teacher-guideInfo",d)});const p=()=>{m()};st(()=>{window.removeEventListener("resize",p),V.off("teacher-guideInfo",d)});const r=()=>{if(l.step>=4){c();return}l.step=l.step+1,m()},c=async()=>{u.value?u.value.dataGuide=!0:u.value={dataGuide:!0};try{const n=await q({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(u.value)})}catch(n){console.log(n)}o.value=!1};return()=>{var n;return t(y,null,[o.value?it(t("div",{"onUpdate:show":e=>o.value=e,class:["n-modal-mask","n-modal-mask-guide"]},[t("div",{class:C.content,onClick:()=>r()},[t("div",{class:C.backBtn,onClick:e=>{e.stopPropagation(),c()}},[i("跳过")]),t("div",{class:C.box,style:{...l.box,...(n=l.steps[l.step])==null?void 0:n.boxStyle},id:"modeType-".concat(l.step)},[l.steps.map((e,A)=>{var b,s,f,F;return t("div",{onClick:U=>U.stopPropagation(),class:C.item,style:e.type=="bottom"?{display:A===l.step?"":"none",left:"".concat((b=e.eleRect)==null?void 0:b.left,"px"),top:"-".concat((s=e.imgStyle)==null?void 0:s.height)}:{display:A===l.step?"":"none",left:"".concat((f=e.eleRect)==null?void 0:f.left,"px"),top:"".concat((F=l.box)==null?void 0:F.height)}},[t("img",{class:C.img,style:e.imgStyle,src:e.img},null),t("div",{class:C.btns,style:e.btnsStyle},[l.step+1==l.steps.length?t(y,null,[t("div",{class:[C.endBtn],onClick:()=>c()},[i("完成")]),t("div",{class:C.nextBtn,onClick:()=>{l.step=0,m()}},[i("再看一遍")])]):t("div",{class:C.btn,onClick:()=>r()},[i("下一步 ("),l.step+1,i("/"),l.steps.length,i(")")])])])})])])]),[[lt,o.value,"show"]]):null])}}}),Yt=I({name:"data-module",setup(){const v=D("training"),w=X();ot(c=>{c.form.tabName&&(v.value=c.form.tabName)});const l=D(),o=D(),u=D(),g=c=>{ut(c,"tabName",w)},m=D(!1),d=D([j(new Date().getTime()),Q(new Date().getTime())]),p=()=>{console.log(d.value),l.value&&l.value.getList(),o.value&&o.value.getList(),u.value&&u.value.getList()},r=()=>{console.log("点击重置"),d.value=[j(new Date().getTime()),Q(new Date().getTime())],Z(()=>{p()})};return L(()=>{setTimeout(()=>{m.value=!0},800)}),()=>t("div",null,[t("div",{class:x.listWrap},[t(nt,{"onUpdate:value":[c=>g(c),c=>v.value=c],class:x.customTabs,value:v.value,size:"large",animated:!1,"pane-wrapper-style":"margin: 0 -4px","pane-style":"padding-left: 4px; padding-right: 4px; box-sizing: border-box;"},{default:()=>[t(N,{name:"training",tab:"作业统计"},{default:()=>[t(Tt,{ref:l,timer:d.value},null)],tab:()=>t("span",{id:"data-0"},[i("作业统计")])}),t(N,{name:"practice",tab:"学练数据"},{default:()=>[t(bt,{ref:o,timer:d.value},null)],tab:()=>t("span",{id:"data-1"},[i("学练数据")])}),t(N,{name:"ranking",tab:"学练排行"},{default:()=>[t(Ct,{ref:u,timer:d.value},null)],tab:()=>t("span",{id:"data-2"},[i("学练排行")])})],suffix:()=>t(y,null,[t("div",{class:x.homeStudyInfoDate},[t(H,null,{default:()=>[t(ct,rt({clearable:!1},{value:d.value,"onUpdate:value":c=>d.value=c,separator:"-",type:"daterange",timerValue:d.value}),null),t(z,{type:"primary",class:x.searchBtn,onClick:()=>p()},{default:()=>[i("搜索")]}),t(z,{type:"primary",onClick:()=>r(),ghost:!0,class:x.resetBtn},{default:()=>[i("重置")]})]})])])}),m.value?t(Et,null,null):null])])}});export{Yt as default};
|