index-legacy.7b06ffaa.js 12 KB

1
  1. !function(){var e=document.createElement("style");e.innerHTML="._coursewareGroup_1z06z_1{margin:0 .34667rem .34667rem;border-radius:.26667rem;overflow:hidden}._coursewareGroup_1z06z_1 .van-cell:after{transform:scale(1)}._coursewareGroup_1z06z_1 ._top1_1z06z_9{padding:.32rem;font-size:.34667rem;color:#777!important}._coursewareGroup_1z06z_1 ._top2_1z06z_14{font-size:.32rem;color:#777!important;padding:.37333rem .32rem .53333rem}._coursewareGroup_1z06z_1 ._userLogo_1z06z_19{width:1.25333rem;height:1.25333rem;border-radius:50%;overflow:hidden;margin-right:.16rem}._coursewareGroup_1z06z_1 ._courseName_1z06z_26,._coursewareGroup_1z06z_1 ._userName_1z06z_27{max-width:2.93333rem}._coursewareGroup_1z06z_1 ._userName_1z06z_27{font-size:.42667rem;font-weight:600;color:#333;line-height:.58667rem}._coursewareGroup_1z06z_1 ._courseRange_1z06z_36{font-size:.42667rem;font-family:DINA;color:#333;line-height:.50667rem}._coursewareGroup_1z06z_1 ._courseRange_1z06z_36 span{color:#f44541}._coursewareGroup_1z06z_1 ._courseName_1z06z_26,._coursewareGroup_1z06z_1 ._courseRangeTips_1z06z_46{line-height:1.2;padding-top:.10667rem}._exerciseRecord_1z06z_50 .van-haptics-feedback:active{opacity:1}._searchMore_1z06z_53{line-height:1.2!important}._searchMore_1z06z_53 .van-dropdown-item{z-index:99}._searchMore_1z06z_53 .van-dropdown-menu__bar{box-shadow:none;height:var(--van-nav-bar-height)}._searchMore_1z06z_53 .van-dropdown-item__content{border-radius:0 0 .32rem .32rem;max-height:100%}._searchMore_1z06z_53 .van-button+.van-button{margin-left:.4rem}._searchMore_1z06z_53 ._searchContainer_1z06z_70{max-height:10.66667rem;overflow-y:auto;box-sizing:border-box;padding-bottom:.42667rem;background:var(--van-popup-background);transition:var(--van-popup-transition)}._searchMore_1z06z_53 ._searchMoreGroup_1z06z_78{display:flex;align-items:center;padding:.48rem .34667rem;background-color:#fff}._searchMore_1z06z_53 ._searchTitle_1z06z_84{padding:.4rem .34667rem .05333rem;font-size:.4rem;font-weight:600;color:#333;line-height:.56rem;text-align:left}._searchMore_1z06z_53 ._searchTypeGroup_1z06z_92{display:flex;align-items:center;padding:0 .34667rem;flex-wrap:wrap;justify-content:space-between}._searchMore_1z06z_53 ._searchTypeFlex_1z06z_99 ._searchTypeItem_1z06z_99{width:49%}._searchMore_1z06z_53 ._searchTypeFlex1_1z06z_102{justify-content:flex-start}._searchMore_1z06z_53 ._searchTypeFlex1_1z06z_102 ._searchTypeItem_1z06z_99{width:31%}._searchMore_1z06z_53 ._searchTypeFlex1_1z06z_102 ._searchTypeItem_1z06z_99:nth-child(3n + 1){margin-right:2.333%}._searchMore_1z06z_53 ._searchTypeFlex1_1z06z_102 ._searchTypeItem_1z06z_99:nth-child(3n + 3){margin-left:2.333%}._searchMore_1z06z_53 ._searchTypeFlex2_1z06z_114 ._searchTypeItem_1z06z_99{width:45%}._searchMore_1z06z_53 ._searchTypeItemLine_1z06z_117{margin-top:.26667rem;width:.42667rem;height:.02667rem;background:#d8d8d8}._searchMore_1z06z_53 ._searchTypeItem_1z06z_99{box-sizing:border-box;margin-top:.26667rem;height:.85333rem;line-height:.85333rem;background:#f6f6f6;border:.02667rem solid #f6f6f6;border-radius:.42667rem;font-size:.34667rem;color:#333;padding:0 .18667rem;text-align:center}._searchMore_1z06z_53 ._searchTypeItem_1z06z_99._is-active_1z06z_136{background:#fff5f2;border:.02667rem solid #ffb097;color:#f67146}._searchPreview_1z06z_141{margin:0 .34667rem;padding-bottom:.32rem;padding-top:.32rem;white-space:nowrap;overflow-y:auto}._searchPreview_1z06z_141 ._searchPreviewItem_1z06z_148{display:inline-flex;align-items:center;line-height:.74667rem;background:#f6f6f6;border-radius:.42667rem;margin-right:.21333rem;padding:.02667rem .26667rem 0;font-size:.34667rem;color:#333}._searchPreview_1z06z_141 ._searchPreviewItem_1z06z_148:last-child{margin-right:0}._searchPreview_1z06z_141 ._searchPreviewItem_1z06z_148 ._cross_1z06z_162{font-size:.21333rem;margin-left:.16rem;color:#aaa}\n",document.head.appendChild(e),System.register(["./index-legacy.eb062188.js","./index-legacy.ad813f4d.js","./isBetween-legacy.1e441451.js","./index-legacy.d64e5695.js","./icon_teacher-legacy.07765f44.js","./index-legacy.4e015ad0.js","./index-legacy.b13fd1c4.js","./index-legacy.8d528f30.js","./index-legacy.fad72574.js","./index-legacy.148f784c.js","./index-legacy.918b8c74.js","./index-legacy.fecc738b.js","./index-legacy.ac7c51db.js","./use-tab-status-legacy.91417466.js","./index-legacy.fab451f1.js","./index-legacy.10d8486a.js","./utils-legacy.6e8de97c.js","./Picker-legacy.95f03705.js"],(function(e){"use strict";var r,a,s,o,t,c,i,n,l,_,u,m,d,h,p,z,v,g,f,y,T,w,x,b,M,Y,I,N,k,P;return{setters:[function(e){r=e.d,a=e.R,s=e.g,o=e.ag,t=e.r,c=e.ai,i=e.$,n=e.m,l=e.o,_=e.c,u=e.aj,m=e.F,d=e.q,h=e.B,p=e._,z=e.a5,v=e.ak,g=e.al},function(e){f=e.O},function(e){y=e.i},function(e){T=e.O},function(e){w=e.i},function(e){x=e.c},function(e){b=e.C},function(e){M=e.D,Y=e.a},function(e){I=e.L},function(e){N=e.C},function(e){k=e.C},function(e){P=e.I},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var D={coursewareGroup:"_coursewareGroup_1z06z_1",top1:"_top1_1z06z_9",top2:"_top2_1z06z_14",userLogo:"_userLogo_1z06z_19",courseName:"_courseName_1z06z_26",userName:"_userName_1z06z_27",courseRange:"_courseRange_1z06z_36",courseRangeTips:"_courseRangeTips_1z06z_46",exerciseRecord:"_exerciseRecord_1z06z_50",searchMore:"_searchMore_1z06z_53",searchContainer:"_searchContainer_1z06z_70",searchMoreGroup:"_searchMoreGroup_1z06z_78",searchTitle:"_searchTitle_1z06z_84",searchTypeGroup:"_searchTypeGroup_1z06z_92",searchTypeFlex:"_searchTypeFlex_1z06z_99",searchTypeItem:"_searchTypeItem_1z06z_99",searchTypeFlex1:"_searchTypeFlex1_1z06z_102",searchTypeFlex2:"_searchTypeFlex2_1z06z_114",searchTypeItemLine:"_searchTypeItemLine_1z06z_117","is-active":"_is-active_1z06z_136",searchPreview:"_searchPreview_1z06z_141",searchPreviewItem:"_searchPreviewItem_1z06z_148",cross:"_cross_1z06z_162"};c.extend(y);e("default",r({name:"exercise-record",setup(){const e=a(s.platformApi);o();const r=t({showSearchStatus:!0,showPopoverTime:!1,actions:[],subjects:[]}),y=t({startTime:c().day(1).format("YYYY-MM-DD"),endTime:c().day(7).format("YYYY-MM-DD"),orchestraId:"",orchestraName:"",courseType:"",courseTypeName:"",coursewareErr:null,coursewareErrName:"",keyword:"",page:1,rows:20}),G=a(!1),C=a(!1),j=a(!1),E=a(!0),F=a([]),R=async()=>{try{G.value&&(y.page=1,F.value=[],G.value=!1);const{endTime:r,startTime:a,...s}=y,o=await n.post(`${e.value}/courseSchedule/coursewareErrPage`,{data:{...s,endTime:r+" 23:59:59",startTime:a+" 00:00:00"}});if(F.value.length>0&&1===o.data.pages)return;F.value=F.value.concat(o.data.rows||[]),j.value=o.data.current>=o.data.pages,E.value=F.value.length>0,y.page=o.data.current+1,C.value=!1}catch(r){const e=r.message;l(e),E.value=!1,j.value=!0}};i((()=>{R(),S()}));const S=async()=>{try{const a=await n.post(`${e.value}/orchestra/page`,{data:{page:1,rows:9999,status:"DONE"}});r.actions=a.data.rows.map((e=>({name:e.name,value:e.id})))}catch(a){const e=a.message;l(e)}},L=()=>{j.value=!1,C.value=!0,R()},O=e=>{if(e.length>11){return e.substring(0,6)+"..."+e.substring(e.length-5,e.length)}return e},H=e=>{if(e){const r=Math.floor(e/60),a=e%60;return(r>=10?r:"0"+r)+":"+(a>=10?a:"0"+a)}return"00:00"},U=a(),A=a(),B=()=>{var e;y.startTime=c().day(1).format("YYYY-MM-DD"),y.endTime=c().day(7).format("YYYY-MM-DD"),y.orchestraId="",y.orchestraName="",y.courseType="",y.courseTypeName="",y.coursewareErr=null,y.coursewareErrName="",null===(e=A.value)||void 0===e||e.toggle(),G.value=!0,R()},V=()=>{var e;null===(e=A.value)||void 0===e||e.toggle(),G.value=!0,R()};return()=>{let e;return _("div",{class:[E.value?"":"emptyRootContainer",D.exerciseRecord]},[_(f,{position:"top",background:"#F8F8F8",onGetHeight:e=>{document.documentElement.style.setProperty("--header-height",e+"px")}},{default:()=>[_(u,{border:!1},{right:()=>_(M,{class:D.searchMore,closeOnClickOverlay:!1,closeOnClickOutside:!1,ref:U},{default:()=>[_(Y,{title:"筛选",modelValue:r.showSearchStatus,"onUpdate:modelValue":e=>r.showSearchStatus=e,ref:A},{default:()=>[_("div",{class:D.searchContainer},[r.actions.length>0&&_(m,null,[_("div",{class:D.searchTitle},[d("乐团")]),_("div",{class:[D.searchTypeGroup,D.searchTypeFlex]},[r.actions.map((e=>_("div",{class:[D.searchTypeItem,e.value===y.orchestraId&&D["is-active"]],onClick:()=>{return r=e,y.orchestraId=r.value,void(y.orchestraName=r.name);var r}},[O(e.name)])))])]),_("div",{class:D.searchTitle},[d("时间段")]),_("div",{class:[D.searchTypeGroup,D.searchTypeFlex2]},[_("div",{class:D.searchTypeItem,onClick:()=>r.showPopoverTime=!0},[y.startTime]),_("div",{class:D.searchTypeItemLine,onClick:()=>r.showPopoverTime=!0},null),_("div",{class:D.searchTypeItem,onClick:()=>r.showPopoverTime=!0},[y.endTime])]),_("div",{class:D.searchTitle},[d("课程类型")]),_("div",{class:[D.searchTypeGroup,D.searchTypeFlex1]},[Object.keys(x).map((e=>_("div",{class:[D.searchTypeItem,e===y.courseType&&D["is-active"]],onClick:()=>{var r;r={name:x[e],value:e},y.courseType=r.value,y.courseTypeName=r.name}},[x[e]])))]),_("div",{class:D.searchTitle},[d("课件使用状态")]),_("div",{class:[D.searchTypeGroup,D.searchTypeFlex]},[[{name:"正常",value:!1},{name:"异常",value:!0}].map((e=>_("div",{class:[D.searchTypeItem,y.coursewareErr===e.value&&D["is-active"]],onClick:()=>{return r=e,console.log(r,"val"),y.coursewareErr=r.value,void(y.coursewareErrName=r.name);var r}},[e.name])))])]),_("div",{class:[D.searchMoreGroup,"van-hairline--top"]},[_(h,{type:"default",block:!0,round:!0,onClick:B},{default:()=>[d("重置")]}),_(h,{type:"primary",block:!0,round:!0,onClick:V},{default:()=>[d("查询")]})])]})]})}),_("div",{style:{backgroundColor:"#fff"}},[_("div",{class:D.searchPreview},[_("div",{class:D.searchPreviewItem,onClick:()=>{var e;null===(e=A.value)||void 0===e||e.toggle(),p((()=>{document.querySelectorAll(".van-dropdown-item--down")[0].style.top=`calc(var(--van-nav-bar-height) + ${s.navBarHeight}px`}))}},[y.startTime,d("~"),y.endTime]),y.orchestraId&&_("div",{class:D.searchPreviewItem},[O(y.orchestraName),_(z,{name:"cross",class:D.cross,onClick:e=>{y.orchestraId="",y.orchestraName="",e.stopPropagation(),G.value=!0,R()}},null)]),y.courseType&&_("div",{class:D.searchPreviewItem},[y.courseTypeName,_(z,{name:"cross",class:D.cross,onClick:e=>{y.courseType="",y.courseTypeName="",e.stopPropagation(),G.value=!0,R()}},null)]),null!=y.coursewareErr&&_("div",{class:D.searchPreviewItem},[y.coursewareErrName,_(z,{name:"cross",class:D.cross,onClick:e=>{y.coursewareErr=null,y.coursewareErrName="",e.stopPropagation(),G.value=!0,R()}},null)])])])]}),E.value?_(T,{modelValue:G.value,"onUpdate:modelValue":e=>G.value=e,onRefresh:L,style:{minHeight:"calc(100vh - var(--header-height))"}},{default:()=>{return[_(I,{"loading-text":" ",finished:j.value,style:{paddingTop:"12px"},"finished-text":" ",immediateCheck:!1,onLoad:R},(r=e=F.value.map((e=>_(N,{inset:!0,class:D.coursewareGroup},{default:()=>[_(k,{class:D.top1},{title:()=>_(m,null,[c(e.startTime).format("YYYY-MM-DD HH:mm"),d("~"),c(e.endTime).format("HH:mm")]),value:()=>_(m,null,[O(e.orchestraName)])}),_(k,{class:D.top2,center:!0},{icon:()=>_(P,{class:D.userLogo,src:e.teacherAvatar||w,fit:"cover"},null),title:()=>_("div",{class:D.userInfo},[_("p",{class:[D.userName,"van-ellipsis"]},[e.teacherName]),_("p",{class:[D.courseName,"van-ellipsis"]},[["INSTRUMENTAL_ENSEMBLE","EUPHONIUM_SINGLE"].includes(e.type)?x[e.type]:x[e.type]+"单技课"])]),value:()=>_("div",{class:D.courseCount},[_("p",{class:D.courseRange},[_("span",{style:{color:e.coursewarePlayTime>=e.adviseStudyTimeSecond?"#333":"#f44541"}},[H(e.coursewarePlayTime)]),d("/"),H(e.adviseStudyTimeSecond)]),_("p",{class:D.courseRangeTips},[d("使用时长/标准时长")])])})]}))),"function"==typeof r||"[object Object]"===Object.prototype.toString.call(r)&&!g(r)?e:{default:()=>[e]}))];var r}}):_(v,{tips:"暂无课件记录"},null),_(b,{show:r.showPopoverTime,"onUpdate:show":e=>r.showPopoverTime=e,firstDayOfWeek:1,showConfirm:!1,type:"range",maxRange:7,minDate:new Date("2023-02-27"),defaultDate:[c(y.startTime).toDate(),c(y.endTime).toDate()],style:{height:"70%"},onSelect:e=>{if(y.startTime="",y.endTime="",!c(e[0]).isBetween(c(y.startTime),c(y.endTime))){const r=c(e[0]).day();0===r?(y.startTime=c(e[0]).subtract(6,"day").format("YYYY-MM-DD"),y.endTime=c(e[0]).format("YYYY-MM-DD")):1===r?(y.startTime=c(e[0]).format("YYYY-MM-DD"),y.endTime=c(e[0]).add(6,"day").format("YYYY-MM-DD")):(y.startTime=c(e[0]).subtract(r-1,"day").format("YYYY-MM-DD"),y.endTime=c(e[0]).add(7-r,"day").format("YYYY-MM-DD"))}r.showPopoverTime=!1}},null)])}}}))}}}))}();