exercis-detail.058b41c7.js 12 KB

1
  1. import{t as O,w as N,d as k,R as m,r as x,aP as Y,aH as H,a0 as $,W as U,Z as G,ac as z,ay as X,c as e,a5 as R,an as W,aV as L,aI as Z,a1 as J,D as K,q as u,F as V,e as Q,ag as ee,ah as te,g as P,ai as B,$ as ae,_ as oe,b1 as se,aj as ne,ak as ie,P as le,b2 as ue,b3 as ce,al as re,m as S}from"./index.5f7ffb46.js";import{O as me}from"./index.7790de2a.js";import{O as pe}from"./index.1d6ac2c5.js";import{q as de}from"./quest-icon.f1b2f4e3.js";import{i as fe}from"./icon_student.660125da.js";import{D as ge}from"./index.af85409e.js";import{I as ve}from"./index.276a5d68.js";import{L as he}from"./index.9ef28852.js";import"./utils.0f86fc1f.js";import"./Picker.148c9d83.js";import"./index.6bbd7daa.js";import"./use-tab-status.69b57a37.js";import"./index.99e0cf1f.js";import"./index.61ab9823.js";import"./index.de1f78a6.js";const[_e,w]=O("notice-bar"),De={text:String,mode:String,color:String,delay:N(1),speed:N(60),leftIcon:String,wrapable:Boolean,background:String,scrollable:{type:Boolean,default:null}};var ye=k({name:_e,props:De,emits:["close","replay"],setup(a,{emit:f,slots:o}){let s=0,c=0,C;const E=m(),b=m(),i=x({show:!0,offset:0,duration:0}),I=()=>{if(o["left-icon"])return o["left-icon"]();if(a.leftIcon)return e(R,{class:w("left-icon"),name:a.leftIcon},null)},D=()=>{if(a.mode==="closeable")return"cross";if(a.mode==="link")return"arrow"},y=p=>{a.mode==="closeable"&&(i.show=!1,f("close",p))},r=()=>{if(o["right-icon"])return o["right-icon"]();const p=D();if(p)return e(R,{name:p,class:w("right-icon"),onClick:y},null)},g=()=>{i.offset=s,i.duration=0,Z(()=>{L(()=>{i.offset=-c,i.duration=(c+s)/+a.speed,f("replay")})})},T=()=>{const p=a.scrollable===!1&&!a.wrapable,h={transform:i.offset?`translateX(${i.offset}px)`:"",transitionDuration:`${i.duration}s`};return e("div",{ref:E,role:"marquee",class:w("wrap")},[e("div",{ref:b,style:h,class:[w("content"),{"van-ellipsis":p}],onTransitionend:g},[o.default?o.default():a.text])])},v=()=>{const{delay:p,speed:h,scrollable:_}=a,j=J(p)?+p*1e3:0;s=0,c=0,i.offset=0,i.duration=0,clearTimeout(C),C=setTimeout(()=>{if(!E.value||!b.value||_===!1)return;const F=W(E).width,M=W(b).width;(_||M>F)&&L(()=>{s=F,c=M,i.offset=-c,i.duration=c/+h})},j)};return Y(v),H(v),$("pageshow",v),U({reset:v}),G(()=>[a.text,a.scrollable],v),()=>{const{color:p,wrapable:h,background:_}=a;return z(e("div",{role:"alert",class:w({wrapable:h}),style:{color:p,background:_}},[I(),T(),r()]),[[X,i.show]])}}});const Te=K(ye),Ee="_itemWrap_d4ln4_1",be="_itemTop_d4ln4_7",we="_itemTopLeft_d4ln4_15",Ce="_itemTopMain_d4ln4_15",Ie="_itemTopSub_d4ln4_23",Fe="_itemTopRight_d4ln4_29",Me="_imgWrap_d4ln4_34",Be="_imgIcon_d4ln4_44",Re="_itemBottom_d4ln4_49",je="_itemBottomDot_d4ln4_57",Se="_dotMain_d4ln4_60",xe="_dotSub_d4ln4_75";var n={itemWrap:Ee,itemTop:be,itemTopLeft:we,itemTopMain:Ce,itemTopSub:Ie,itemTopRight:Fe,imgWrap:Me,imgIcon:Be,itemBottom:Re,itemBottomDot:je,dotMain:Se,dotSub:xe},We="./assets/Image1.cbe96dac.png",ke="./assets/Image2.0b12593f.png",Ae="./assets/Image3.d7139ab6.png",Ne="./assets/Image4.4870f6bf.png",Le="./assets/Image5.150ad63a.png";const Pe={1:{img:We,tips:"\u4F60\u7684\u6F14\u594F\u4E0D\u592A\u597D\uFF0C\u97F3\u51C6\u548C\u5B8C\u6574\u6027\u8FD8\u9700\u52A0\u5F3A\uFF0C\u518D\u7EC3\u4E00\u7EC3\u5427\uFF5E",mome:"\u6562\u4E8E\u5C1D\u8BD5"},2:{img:ke,tips:"\u4F60\u7684\u6F14\u594F\u8FD8\u4E0D\u719F\u7EC3\uFF0C\u97F3\u51C6\u548C\u5B8C\u6574\u6027\u8FD8\u9700\u52A0\u5F3A\uFF0C\u52A0\u7D27\u8BAD\u7EC3\u624D\u80FD\u6709\u597D\u6210\u7EE9\u54E6\uFF5E",mome:"\u8FD8\u8981\u52A0\u6CB9\u54E6\uFF5E"},3:{img:Ae,tips:"\u4F60\u7684\u6F14\u594F\u8FD8\u4E0D\u6D41\u7545\uFF0C\u97F3\u51C6\u548C\u8282\u594F\u8FD8\u9700\u52A0\u5F3A\uFF0C\u79D1\u5B66\u7684\u7EC3\u4E60\u624D\u80FD\u66F4\u5B8C\u7F8E\u54E6\uFF5E",mome:"\u7A81\u7834\u81EA\u6211"},4:{img:Ne,tips:"\u4F60\u7684\u6F14\u594F\u8FD8\u4E0D\u9519\uFF0C\u7EE7\u7EED\u52A0\u6CB9\u5427\uFF0C\u52A0\u5F3A\u97F3\u51C6\uFF0C\u79BB\u5B8C\u7F8E\u5C31\u5DEE\u4E00\u6B65\u5566\uFF5E",mome:"\u5D2D\u9732\u5934\u89D2"},5:{img:Le,tips:"\u4F60\u7684\u6F14\u594F\u975E\u5E38\u4E0D\u9519\uFF0C\u97F3\u51C6\u7684\u628A\u63E1\u548C\u8282\u594F\u7A0D\u6709\u7455\u75B5\uFF0C\u5B8C\u6574\u6027\u628A\u63E1\u7684\u5F88\u597D~",mome:"\u4F60\u5F88\u68D2"}};var Ve=k({props:["item"],name:"detail-item",setup(a){const f=s=>{if(!s&&typeof s!="number")return{};let c=1;return s>20&&s<=40?c=2:s>40&&s<=60?c=3:s>60&&s<=80?c=4:s>80&&(c=5),c},o=()=>{const s=window.location.origin+`/orchestra-music-score/colexiu-report.html?id=${a.item.id}`;Q({api:"openWebView",content:{url:s,orientation:0,isHideTitle:!0,statusBarTextColor:!1,isOpenLight:!0}})};return()=>e(V,null,[e("div",null,[e("div",{class:n.itemWrap,onClick:s=>{s.stopPropagation(),o()}},[e("div",{class:n.itemTop},[e("div",{class:n.itemTopLeft},[e("p",{class:n.itemTopMain},[a.item.musicSheetName]),e("p",{class:n.itemTopSub},[a.item.createTime])]),e("div",{class:n.itemTopRight},[e("div",{class:n.imgWrap},[e("img",{src:Pe[f(a.item.score||0)].img,alt:""},null)]),e(R,{name:"arrow",class:n.imgIcon},null)])]),e("div",{class:n.itemBottom},[e("div",{class:n.itemBottomDot},[e("p",{class:n.dotMain,style:{color:"#F67146"}},[a.item.score||0,e("span",null,[u("\u5206")])," "]),e("p",{class:n.dotSub},[u(" \u7EFC\u5408\u5F97\u5206")])]),e("div",{class:n.itemBottomDot},[e("p",{class:n.dotMain},[a.item.intonation||0,e("span",null,[u("\u5206")])," "]),e("p",{class:n.dotSub},[u("\u97F3\u51C6 ")])]),e("div",{class:n.itemBottomDot},[e("p",{class:n.dotMain},[a.item.cadence||0,e("span",null,[u("\u5206")])," "]),e("p",{class:n.dotSub},[u("\u8282\u594F ")])]),e("div",{class:n.itemBottomDot},[e("p",{class:n.dotMain},[a.item.integrity||0,e("span",null,[u("\u5206")])," "]),e("p",{class:n.dotSub},[u("\u5B8C\u6210\u5EA6 ")])])])])])])}});const qe="_exercisContainer_1j6m1_1",Oe="_topWrap_1j6m1_5",Ye="_topInfo_1j6m1_5",He="_topInfoLeft_1j6m1_13",$e="_headWrap_1j6m1_19",Ue="_infoMsg_1j6m1_26",Ge="_tag_1j6m1_38",ze="_topInfoRight_1j6m1_51",Xe="_infoDay_1j6m1_58",Ze="_infoDayMain_1j6m1_61",Je="_infoDaysub_1j6m1_77",Ke="_chioseWrap_1j6m1_84",Qe="_DialogTitle_1j6m1_94",et="_DialogConent_1j6m1_114",tt="_teacherSubject_1j6m1_131";var l={exercisContainer:qe,topWrap:Oe,topInfo:Ye,topInfoLeft:He,headWrap:$e,infoMsg:Ue,tag:Ge,topInfoRight:ze,infoDay:Xe,infoDayMain:Ze,infoDaysub:Je,chioseWrap:Ke,DialogTitle:Qe,DialogConent:et,teacherSubject:tt};function at(a){return typeof a=="function"||Object.prototype.toString.call(a)==="[object Object]"&&!re(a)}var _t=k({name:"exercis-detail",setup(){ee();const a=te(),f=m(P.platformApi),o=x({showPopoverTime:!1,showPopoverOrchestra:!1,currentDate:[B().format("YYYY"),B().format("MM")],actions:[{text:"\u5168\u90E8\u4E50\u56E2",color:"var(--van-primary-color)"},{text:"\u4EA4\u4ED8\u56E2"},{text:"\u664B\u5347\u56E2"}],id:a.query.id,heightV:0,scrollTop:0,isClick:!1}),s=x({practiceMonth:a.query.practiceMonth?a.query.practiceMonth:o.currentDate[0]+""+o.currentDate[1],practiceMonthName:a.query.practiceMonthName?a.query.practiceMonthName:o.currentDate[0]+"\u5E74"+o.currentDate[1]+"\u6708",orchestraId:"",orchestraName:"",page:1,rows:20,userId:a.query.id,clientType:a.query.clientType?a.query.clientType:P.platformType}),c=m(!1),C=m(new Date(B().subtract(10,"year").format("YYYY-MM-DD"))),E=m(new Date(B().add(10,"year").format("YYYY-MM-DD"))),b=m(["year","month"]),i=m(!1),I=m(!1),D=m(!1),y=m(!1),r=m({}),g=m([]),T=async()=>{if(!o.isClick){o.isClick=!0,i.value&&(g.value=[],s.page=1,i.value=!1);try{const t=await S.post(`${f.value}/musicPracticeRecord/page`,{data:{...s,feature:"EVALUATION"}});if(g.value.length>0&&t.data.current===1)return;g.value=g.value.concat(t.data.rows||[]),s.page=t.data.current+1,y.value=g.value.length>0,I.value=!1,console.log(t.data,t.data.current>=t.data.pages),D.value=t.data.current>=t.data.pages}catch(t){t.message,y.value=!1,D.value=!0}o.isClick=!1}},v=async()=>{if(s.clientType==="TEACHER")try{const t=await S.post(`${f.value}/teacher/detail`,{data:{teacherId:o.id}});r.value={...t.data},r.value.subjectNames=t.data.subjectName.split(",")}catch(t){t.message}else try{const t=await S.get(`${f.value}/student/detail/${o.id}`);console.log(t),r.value={...t.data}}catch(t){t.message}},p=m(),h=m(0);ae(async()=>{await T(),await v(),window.addEventListener("scroll",_),oe(()=>{const{height:t}=W(p.value);h.value=t})}),se(()=>{window.removeEventListener("scroll",_)});const _=()=>{const t=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;o.scrollTop=t},j=t=>{o.heightV=t,console.log(t,"dataHeight")},F=t=>{s.practiceMonth=t.selectedValues[0]+t.selectedValues[1],s.practiceMonthName=t.selectedValues[0]+"\u5E74"+t.selectedValues[1]+"\u6708",o.showPopoverTime=!1,i.value=!0,T()},M=()=>{D.value=!1,I.value=!0,T()};return()=>{let t;return e(V,null,[e("div",{class:[l.exercisContainer,!y.value&&"emptyRootContainer"]},[e("div",{class:l.topWrap,ref:p},[e(me,{position:"top",background:"#F8F8F8",onGetHeight:j},{default:()=>[e(ne,{border:!1,background:o.heightV>o.scrollTop?"transparent":"#fff"},{right:()=>e(R,{name:de,size:22,color:"#333",onClick:()=>{c.value=!0}},null)})]}),e("div",{class:l.topInfo},[e("div",{class:l.topInfoLeft},[e("div",{class:l.headWrap},[e(ve,{src:r.value.avatar?r.value.avatar:fe,fit:"cover",width:"68px",height:"68px"},null)]),e("div",{class:l.infoMsg},[e("p",null,[r.value.nickname]),s.clientType==="TEACHER"?e(Te,{class:l.teacherSubject},{default:()=>{var d,A;return[(A=(d=r.value)==null?void 0:d.subjectNames)==null?void 0:A.map(q=>e("div",{class:l.tag},[q]))]}}):e("div",{class:l.tag},[r.value.subjectNames?r.value.subjectNames:"\u6682\u65E0\u58F0\u90E8"])])]),e("div",{class:l.topInfoRight},[e("div",{class:l.infoDay},[e("p",{class:l.infoDayMain},[r.value.practiceDays?r.value.practiceDays:0,"",e("span",null,[u("\u5929")])]),e("p",{class:l.infoDaysub},[u("\u7EC3\u4E60\u5929\u6570")])]),e("div",{class:l.infoTime},[e("p",{class:l.infoDayMain},[r.value.practiceTimes?r.value.practiceTimes:0,"",e("span",null,[u("\u5206\u949F")])]),e("p",{class:l.infoDaysub},[u("\u7EC3\u4E60\u65F6\u957F")])])])]),e("div",{class:"searchGroup-single",style:"padding-top: 0 !important;"},[e("div",{class:["searchItem",o.showPopoverTime?"searchItem-active":""],onClick:()=>{o.showPopoverTime=!0}},[e("span",null,[s.practiceMonthName])])])]),y.value?e(pe,{modelValue:i.value,"onUpdate:modelValue":d=>i.value=d,onRefresh:M,style:"min-height: 100vh;"},{default:()=>[e(he,{"loading-text":" ",finished:D.value,"finished-text":"\u6CA1\u6709\u66F4\u591A\u4E86",onLoad:T},at(t=g.value.map(d=>e(Ve,{item:d},null)))?t:{default:()=>[t]})]}):e(ie,{tips:"\u6682\u65E0\u7EC3\u4E60\u7EDF\u8BA1"},null)]),e(le,{show:o.showPopoverTime,"onUpdate:show":d=>o.showPopoverTime=d,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[e(ge,{onCancel:()=>{o.showPopoverTime=!1},onConfirm:F,modelValue:o.currentDate,"onUpdate:modelValue":d=>o.currentDate=d,minDate:C.value,maxDate:E.value,formatter:ue,columnsType:b.value},null)]}),e(ce,{class:"exercisDetailDialog",show:c.value,"onUpdate:show":d=>c.value=d,title:"\u63D0\u793A\u6846",confirmButtonText:"\u6211\u77E5\u9053\u4E86"},{title:()=>e("div",{class:l.DialogTitle},[e("span",null,null),e("p",null,[u("\u4EC0\u4E48\u662F\u7EC3\u4E60\u6570\u636E")])]),default:()=>e("div",{class:l.DialogConent},[e("p",null,[u("\u7EC3\u4E60\u6570\u636E\u662F"),s.clientType=="TEACHER"?"":"\u5B66\u5458",u("\u901A\u8FC7\u4E91\u6559\u7EC3\u81EA\u4E3B\u7EC3\u4E60\u7684\u6570\u636E\u7EDF\u8BA1\uFF0C\u53EF\u6839\u636E\u65F6\u95F4\u6BB5\u67E5\u8BE2"),s.clientType=="TEACHER"?"":"\u5B66\u5458",u("\u7684\u7EC3\u4E60\u5929\u6570\u548C\u7EC3\u4E60\u65F6\u957F")," "]),e("p",null,[u("\u7EC3\u4E60\u5929\u6570\uFF1A\u5F53\u5929\u6709\u66F2\u76EE\u64AD\u653E\u6216\u6D4B\u8BC4\u8BB0\u5F55\u5373\u7B97\u7EC3\u4E60")]),e("p",null,[u("\u7EC3\u4E60\u65F6\u957F\uFF1A\u66F2\u76EE\u64AD\u653E\u548C\u66F2\u76EE\u6D4B\u8BC4\u7684\u65F6\u957F\u603B\u548C")])])})])}}});export{_t as default};