1 |
- import{h as j,i as h,d as q,t as V,c as e,j as t,I as Q,F as B,S as U,w as K,k as D,o as z,f as $,e as J,g as Z}from"./preload-helper.2cc7ecb4.js";import"./lib-flexible.08f197e6.js";/* empty css */import{u as P,B as ee,G as O,a as d,P as te,p as M,b as ae,s as S,M as se,r as H,c as G,g as le,d as oe,e as ue,f as ne,h as re,o as ie,i as ce,j as de}from"./index.b2ed37ae.js";import{s as w,E as pe}from"./index.b6276527.js";import{h as Ae,N as A,c as _}from"./index.ac97f00d.js";import{P as me}from"./index.8b4fe77c.js";import{s as ve}from"./state.012518e3.js";import{B as fe}from"./index.97016a5f.js";import{S as he}from"./index.07eac4de.js";import"./index.e035f3d2.js";import"./index.3c1a241a.js";import"./music.b35eb5be.js";import"./index.f499c5ea.js";function Ye(){import("data:text/javascript,")}const Fe="_musicSheet_1x0kx_1",ge="_btn_1x0kx_8",ye="_btnCont_1x0kx_15",Ce="_popup_1x0kx_21";var Ee={musicSheet:Fe,btn:ge,btnCont:ye,popup:Ce};const xe="_header_18vsl_1",_e="_center_18vsl_4",Se="_info_18vsl_20",Ne="_demos_18vsl_29",be="_maininfo_18vsl_51",Ie="_line_18vsl_102",we="_back_18vsl_116",Be="_btns_18vsl_123",De="_pop_18vsl_132",Oe="_close_18vsl_168",Te="_trybtn_18vsl_189";var m={header:xe,center:_e,info:Se,demos:Ne,maininfo:be,line:Ie,back:we,btns:Be,pop:De,close:Oe,try:"_try_18vsl_183",trybtn:Te},Le="/orchestra-music-score/assets/again.78a8b607.svg",Re="/orchestra-music-score/assets/explain.9e197a0a.svg",ke="/orchestra-music-score/assets/replay.402515a7.svg",Me="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAALCAYAAAHeq0ewAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAC6ADAAQAAAABAAAACwAAAACBvloGAAABH0lEQVQYGW1Ru0oDURA9s27EQrETEbv8g3+RSgub7IoELASF7CYGbbYQFHLjB4gI2WAT8LPEWjCd7Hjm3t1VwWnmdeacmXsFo3SMSi9iqF4CuodgRRGLj7K+YqvbAbLkru4hYrAD69CY6Ckgz1gu1wR5ck+qK1/wDUJmC4ngyonBA9o8J/410vg2qd4wne9DRDFKrqFYl0aVxQfqDIl8FAYmXHk6wSvc4ijC+GTa8isODRShqjJ4RGlHgOd/whZvkXVgfO8c2Q05d3XzQdgkdZ7FGoIVDnrb9QLp089xNU3jTHKze4yi+ArPao08mdUnNDD6X0qWIe/f8PDbFmFMKh9/lOwtXJnFxHcguuLACz/t3OT8oOqAlzoOnTHfsNo35fxqh9SRnu4AAAAASUVORK5CYII=";const He=j(),b=P(),f=h("pitch"),N=h(!1);var Ge=q({name:"ColexiuReportHeader",props:{detail:{type:Object},record:{type:Object},className:{type:String}},emits:["activeChange"],setup(x,{emit:r,expose:g}){const i=()=>{M({api:"back"})},F=()=>{localStorage.getItem("explain-view")!="1"&&(N.value=!0,setTimeout(()=>{N.value=!1,localStorage.setItem("explain-view","1")},5e3))},p=()=>{if(b.source==="evaluation")i();else{const y=sessionStorage.getItem("behaviorId")||""+new Date().valueOf(),l=U.stringifyUrl({url:location.origin+"/accompany",query:{id:b.id,behaviorId:y,client:He.isTeacher?"teacher":"student"}});M({api:"openAccompanyWebView",content:{url:l,orientation:0,isHideTitle:!0,statusBarTextColor:!1,isOpenLight:!0}})}};return g({autoShow:F}),()=>{var C;const{detail:y,record:l}=V(x);return e("header",{class:[m.header,m.className]},[e("div",{class:m.info},[b.source!=="web"?e(fe,{onClick:i,class:m.back},{default:()=>[e("img",{src:ee,alt:"back"},null)]}):null,e("div",{class:[m.maininfo,"van-ellipsis"]},null),l.value&&((C=l.value)==null?void 0:C.heardLevel)?e(O,{class:m.center,columnNum:5},{default:()=>[e(d,{class:"van-hairline--right"},{text:()=>e("span",null,[t("\u96BE\u5EA6")]),icon:()=>{var o;return e("span",null,[Ae[(o=l.value)==null?void 0:o.heardLevel]])}}),e(d,{class:"van-hairline--right"},{text:()=>e("span",null,[t("\u8BC4\u6D4B\u5206\u6570")]),icon:()=>{var o;return e("span",null,[(o=l.value)==null?void 0:o.score,t("\u5206")])}}),e(d,{class:"van-hairline--right",onClick:()=>{f.value="pitch",r("activeChange","pitch")}},{text:()=>e("span",{class:["switch",{active:f.value==="pitch"}]},[t("\u97F3\u51C6")]),icon:()=>{var o;return e("span",{style:{color:"#2DC7AA"}},[(o=l.value)==null?void 0:o.intonation,t("\u5206")])}}),e(d,{class:"van-hairline--right",onClick:()=>{f.value="rhythm",r("activeChange","rhythm")}},{text:()=>e("span",{class:["switch",{active:f.value==="rhythm"}]},[t("\u8282\u594F")]),icon:()=>{var o;return e("span",{style:{color:"#FF4E19"}},[(o=l.value)==null?void 0:o.cadence,t("\u5206")])}}),e(d,{onClick:()=>{f.value="completion",r("activeChange","completion")}},{text:()=>e("span",{class:["switch",{active:f.value==="completion"}]},[t("\u65F6\u503C")]),icon:()=>{var o;return e("span",{style:{color:"#FFC459"}},[(o=l.value)==null?void 0:o.integrity,t("\u5206")])}})]}):null,e(O,{columnNum:3,class:m.btns},{default:()=>{var o,I;return[((o=l.value)==null?void 0:o.videoFilePath)&&((I=l.value)==null?void 0:I.expire)===0&&b.source!=="web"?e(me,Q(l.value,{btnClass:m.btn,popupClass:m.popup}),{default:()=>[e(d,null,{text:()=>e("span",null,[t("\u56DE\u653E")]),icon:()=>e("img",{src:ke},null)})]}):null,e(d,{onClick:()=>N.value=!0},{text:()=>e("span",null,[t("\u91CA\u4E49")]),icon:()=>e("img",{src:Re},null)}),b.source!=="web"?e(d,{onClick:p},{text:()=>e("span",null,[t("\u518D\u6765\u4E00\u904D")]),icon:()=>e("img",{src:Le},null)}):null]}})]),l.value?e("div",{class:m.demos},[f.value==="pitch"&&e(B,null,[e("div",null,[e(A,{fill:"#FFAB25",shadow:!0,x:-3,y:0},null),e("span",null,[t("\u97F3\u9AD8\u4E86")])]),e("div",null,[e(A,{fill:"#FFAB25",shadow:!0,x:-1,y:-2},null),e("span",null,[t("\u97F3\u4F4E\u4E86")])])]),ve.isPercussion?null:e(B,null,[f.value==="rhythm"&&e(B,null,[e("div",null,[e(A,{fill:"#FF4444",shadow:!0,x:0},null),e("span",null,[t("\u8282\u594F\u5FEB\u4E86")])]),e("div",null,[e(A,{fill:"#FF4444",shadow:!0,x:-3,y:-2},null),e("span",null,[t("\u8282\u594F\u6162\u4E86")])])]),f.value==="completion"&&e("div",null,[e(A,{fill:"#CC75FF"},null),e("span",null,[t("\u65F6\u503C\u4E0D\u8DB3")])])])]):null,e(te,{teleport:"body",show:N.value,class:m.pop,style:{width:"60vw"},onClickOverlay:()=>N.value=!1},{default:()=>[e("div",{class:m.close,onClick:()=>N.value=!1},[e("img",{src:Me},null)]),e("h2",null,[t("\u56FE\u6807\u91CA\u4E49")]),e(O,{columnNum:2,class:m.btns,border:!1},{default:()=>[e(d,null,{text:()=>e("span",null,[t("\u7EFF\u8272\u97F3\u7B26\uFF1A\u6F14\u594F\u6B63\u786E")]),icon:()=>e(A,{fill:"#01C1B5"},null)}),e(d,null,{text:()=>e("span",null,[t("\u7EA2\u8272\u97F3\u7B26\uFF1A\u9519\u97F3")]),icon:()=>e(A,{fill:"#FF4444"},null)}),e(d,null,{text:()=>e("span",null,[t("\u97F3\u7B26\u91CD\u5F71(\u7EA2\u8272\u5728\u524D)\uFF1A\u8282\u594F\u8FC7\u5FEB")]),icon:()=>e(A,{fill:"#FF4444",shadow:!0,x:0},null)}),e(d,null,{text:()=>e("span",null,[t("\u97F3\u7B26\u91CD\u5F71(\u7EA2\u8272\u5728\u540E)\uFF1A\u8282\u594F\u6162\u4E86")]),icon:()=>e(A,{fill:"#FF4444",shadow:!0,x:-3,y:-2},null)}),e(d,null,{text:()=>e("span",null,[t("\u97F3\u7B26\u91CD\u5F71(\u9EC4\u8272\u5728\u4E0A)\uFF1A\u97F3\u9AD8\u4E86")]),icon:()=>e(A,{fill:"#FFAB25",shadow:!0,x:-3,y:0},null)}),e(d,null,{text:()=>e("span",null,[t("\u97F3\u7B26\u91CD\u5F71(\u9EC4\u8272\u5728\u4E0B)\uFF1A\u97F3\u4F4E\u4E86")]),icon:()=>e(A,{fill:"#FFAB25",shadow:!0,x:-1,y:-2},null)}),e(d,null,{text:()=>e("span",null,[t("\u7D2B\u8272\u97F3\u7B26\uFF1A\u5B8C\u6574\u5EA6\u4E0D\u8DB3")]),icon:()=>e(A,{fill:"#CC75FF"},null)}),e(d,null,{text:()=>e("span",null,[t("\u7070\u8272\u97F3\u7B26\uFF1A\u672A\u6F14\u594F")]),icon:()=>e(A,{fill:"#AEAEAE"},null)})]})]})])}}});const T=P(),qe=async(x,r)=>{const g=await ue(x);let i=h("");const F=ne(g);i.value=re(F.parsedXML,{title:r.musicSheetName});const p=Number(T["part-index"])||0;return i.value=ie(i.value,p),i},Pe=x=>{const r=h("loading"),g=h({}),i=h({});return z(async()=>{var F;r.value="loading";try{const p=await H.get("/sysMusicRecord/getLastEvaluationMusicalNotesPlayStats",{params:{recordId:T.id}});if(!p.data){r.value="error";return}i.value=p.data,console.log(i.value);const y=await H.get(`/music/sheet/detail/${(F=i.value)==null?void 0:F.musicalNotesPlayStats.examSongId}`);g.value=y.data,S.partIndex=p.data.partIndex||0,r.value="success"}catch(p){r.value="error",console.log(p)}}),[r,g,i]};var We=q({name:"Colexiu",setup(){const x=h(),r=h(!0),g=h(!1),i=h(""),F=h([]),p=h([]),[y,l,C]=Pe(T.id);K(y,async()=>{if(y.value==="success"&&l.value.xmlFileUrl){const a=await qe(l.value.xmlFileUrl,l.value);i.value=a.value}}),ae();const o=a=>{switch(a){case"CADENCE_FAST":return"translateX(2px)";case"CADENCE_SLOW":return"translateX(-2px)";case"INTONATION_HIGH":return"translateY(-2px)";case"INTONATION_LOW":return"translateY(2px)";default:return""}},I=()=>{const a=["RIGHT","WRONG","CADENCE_WRONG"];return f.value==="pitch"?a.push("CADENCE_FAST","CADENCE_SLOW"):f.value==="rhythm"?a.push("INTONATION_HIGH","INTONATION_LOW"):f.value==="completion"&&a.push("INTEGRITY_WRONG"),C.value.musicalNotesPlayStats.notesData.filter(n=>a.includes(n.musicalErrorType))},L=()=>{W(),r.value=!1;for(const a of I()){const n=p.value[a.musicalNotesIndex];setTimeout(()=>{if(F.value.includes(n.id))return;F.value.push(n.id);const s=document.getElementById("vf-"+n.id),u=document.getElementById("vf-"+n.id+"-stem"),c=a.musicalErrorType,E=["INTONATION_HIGH","INTONATION_LOW","CADENCE_FAST","CADENCE_SLOW"].includes(c);if(u==null||u.classList.add(_[c]),s==null||s.classList.add(_[c]),s&&E){u==null||u.classList.remove(_[c]),u==null||u.classList.add(_.RIGHT),s==null||s.classList.remove(_[c]),s==null||s.classList.add(_.RIGHT);const v=s.querySelector(".vf-notehead").cloneNode(!0);v.style.transform=o(c),s.style.opacity=".7",u&&(u.style.opacity=".7"),v.id="vf-"+n.id+"-copy",v==null||v.classList.add(_[c]),osmd==null||osmd.container.querySelector("svg").insertAdjacentElement("afterbegin",v)}},300)}},R=a=>{if(!a)return;const n=a.classList.values();for(const s of n)(s==null?void 0:s.indexOf("vf-"))!==0&&a.classList.remove(s)},W=()=>{for(const a of F.value){R(document.getElementById("vf-"+a)),R(document.getElementById("vf-"+a+"-stem"));const n="vf-"+a+"-copy",s=document.getElementById(n);s&&s.remove()}F.value=[]},Y=a=>{var s;r.value=!1,(s=x.value)==null||s.autoShow(),setTimeout(()=>{var u;for(const c of Array.from(document.querySelectorAll(".vf-beam")))(u=c.querySelector("path"))==null||u.setAttribute("fill","#aeaeae")}),G.osmd=a,p.value=le(G.osmd),L();const n=(u,c,E=!0)=>{const v=ce(u);S.evaluatings={...S.evaluatings,[v.measureIndex]:{...v,...de(c.score),score:c.score,dontTransition:E}}};if(C.value.userMeasureScore){for(const u in C.value.userMeasureScore)if(Object.prototype.hasOwnProperty.call(C.value.userMeasureScore,u)){const c=C.value.userMeasureScore[u];for(const E of p.value)if(c.measureRenderIndex==E.noteElement.sourceMeasure.MeasureNumberXML-1)if(!E.noteElement.tie)n(E,c);else for(const v of E.noteElement.tie.notes){const k=oe(v);!k||n(k,c,v!==E.noteElement.tie.StartNote)}}}},X=()=>{g.value=!0,r.value=!1};return()=>{const a=r.value||y.value==="loading",n=g.value||y.value==="error";return e("div",{class:[w.container,D.sett.eyeProtection&&"eyeProtection",D.sett.camera&&"openCamera"]},[e(Ge,{className:w.header,detail:l.value,record:C,ref:x,style:{paddingLeft:S.isSpecialShapedScreen?S.notchHeight/2+"px":"auto"},onActiveChange:()=>L()},null),e("div",{id:"colexiu-detail-music-sheet",class:[w.musicSheet,Ee.musicSheet],style:{paddingLeft:S.isSpecialShapedScreen?S.notchHeight/2+"px":"auto"}},[a&&!n&&e(he,{class:w.skeleton,rowWidth:"80%",title:!0,row:3},null),n&&e(pe,null,null),i.value&&e(B,null,[e("h3",{style:{fontSize:"24px",fontWeight:"normal",textAlign:"center",padding:"0 10px",marginTop:"36px",marginBottom:"0px",marginLeft:"auto"},class:"van-ellipsis"},[l.value.musicSheetName]),e(se,{score:i.value,showSection:!0,opotions:{drawTitle:!1,drawComposer:!1,drawLyricist:!1,drawMetronomeMarks:!0,drawMeasureNumbers:!0,autoResize:!1},EngravingRules:{DefaultColorNotehead:"#aeaeae",DefaultColorRest:"#aeaeae",DefaultColorMusic:"#aeaeae",DefaultColorStem:"#aeaeae",DefaultColorChordSymbol:"#aeaeae",DefaultColorLabel:"#aeaeae",DYMusicScoreType:D.sett.type},onRerender:Y,onRenderError:X},null)])])])}}});document.body.style.setProperty("--osdm-zoom",""+$());J();Z(We).mount("#app");export{Ye as __vite_legacy_guard};
|