1 |
- import{d as m,a as t,g as a,b as E,H as f,I,B as C,G as A,j as r,e as h,F as v,l as N,q as b,y as L,x as M,J as T,n as R,p as P,K as w,L as O,N as k,S as D,z as H,C as G}from"./App.48db2533.js";import{I as j,T as W}from"./arrow-left.6b26b57a.js";import{P as V}from"./index.79aeaad2.js";const q={BEGINNER:"\u5165\u95E8\u7EA7",ADVANCED:"\u8FDB\u9636\u7EA7",PERFORMER:"\u5927\u5E08\u7EA7"};var g=m({name:"NoteSvg",props:{fill:String,shadow:{type:Boolean,defalut:!1},shadowStyle:{type:Object,defalut:{}},x:{type:Number,default:0},y:{type:Number,default:0}},render(){return this.shadow?t("svg",{width:"14px",height:"24px",viewBox:"0 0 14 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[t("title",null,[a("\u8282\u594F\u5FEB\u4E86")]),t("g",{id:"\u6700\u7EC8",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[t("g",{id:"\u8BC4\u6D4B\u62A5\u544A\uFF08\u589E\u52A0\u7C7B\u578B\uFF09",transform:"translate(-224.000000, -132.000000)"},[t("g",{id:"\u7F16\u7EC4-12\u5907\u4EFD",transform:"translate(80.000000, 132.000000)"},[t("g",{id:"\u8282\u594F\u5FEB\u4E86",transform:"translate(144.000000, 0.000000)"},[t("rect",{id:"\u77E9\u5F62\u5907\u4EFD-22",x:"0",y:"0",width:"14",height:"24"},null),t("g",{id:"\u7F16\u7EC4-2",transform:"translate(2.000000, 0.000000)"},[t("ellipse",{id:"\u692D\u5706\u5F62",fill:this.fill,transform:`translate(4.685927, 18.917813) scale(-1, -1) rotate(-32.000000) translate(${this.x+-4.685927}, ${this.y+-18.917813})`,cx:"4.68592654",cy:"18.9178127",rx:"3.70078457",ry:"2.92022453"},null),t("path",{d:"M4.95251677,0.68258909 C6.68583115,-0.400505943 8.78379192,-0.169765229 9.63844331,1.1979629 C10.4930947,2.56569103 9.78079761,4.55247575 8.04748323,5.63557079 C6.85503595,6.38069455 5.49000663,6.50399819 4.47594704,6.06306368 L4.47635248,22.0768926 L3.01624022,22.0768926 L3.0154716,4.11169688 C2.88257588,2.8976469 3.61236702,1.52000759 4.95251677,0.68258909 Z",id:"\u5F62\u72B6\u7ED3\u5408","fill-opacity":"0.7",fill:"#2DC7AA",transform:"translate(6.500000, 11.038446) scale(-1, -1) translate(-6.500000, -11.038446) "},null)])])])])])]):t("svg",{width:"7px",height:"23px",viewBox:"0 0 7 23",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[t("g",{id:"\u667A\u80FD\u6253\u5206",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[t("g",{id:"\u5F00\u59CB\u6F14\u594F\u5907\u4EFD",transform:"translate(-55.000000, -24.000000)"},[t("g",{id:"\u7F16\u7EC4-4",transform:"translate(55.000000, 24.000000)",fill:this.fill},[t("path",{d:"M1.95251677,0.68258909 C3.68583115,-0.400505943 5.78379192,-0.169765229 6.63844331,1.1979629 C7.4930947,2.56569103 6.78079761,4.55247575 5.04748323,5.63557079 C3.85503595,6.38069455 2.49000663,6.50399819 1.47594704,6.06306368 L1.47635248,22.0768926 L0.0162402201,22.0768926 L0.0154715991,4.11169688 C-0.117424115,2.8976469 0.612367024,1.52000759 1.95251677,0.68258909 Z",id:"\u5F62\u72B6\u7ED3\u5408",transform:"translate(3.500000, 11.038446) scale(-1, -1) translate(-3.500000, -11.038446) "},null)])])])])}});const $="_header_1i8uc_49",z="_ios_1i8uc_60",X="_android_1i8uc_63",Y="_title_1i8uc_66",Z="_back_1i8uc_75",J="_report_1i8uc_88",K="_content_1i8uc_96",U="_score_1i8uc_107",Q="_demos_1i8uc_123",tt="_right_1i8uc_139",et="_wrong_1i8uc_143",st="_notPlay_1i8uc_147",nt="_cadence_wrong_1i8uc_151",at="_cadence_fast_1i8uc_152",it="_cadence_slow_1i8uc_153",ot="_intonation_wrong_1i8uc_157",rt="_intonation_high_1i8uc_158",lt="_intonation_low_1i8uc_159",ct="_integrity_wrong_1i8uc_163",ut="_grid_1i8uc_167",dt="_gridinfo_1i8uc_184",ht="_gridname_1i8uc_189",gt="_btn_1i8uc_194";var e={header:$,ios:z,android:X,"title-info":"_title-info_1i8uc_66",title:Y,back:Z,report:J,content:K,score:U,demos:Q,right:tt,wrong:et,notPlay:st,cadence_wrong:nt,cadence_fast:at,cadence_slow:it,intonation_wrong:ot,intonation_high:rt,intonation_low:lt,integrity_wrong:ct,grid:ut,gridinfo:dt,gridname:ht,btn:gt};E();var _t=m({props:["data"],methods:{back(){f({api:"back"})}},render(){var n,i;return t("div",{class:"van-nav-bar--safe-area-inset-top"},[t("div",{class:I(e.header)},[t("div",{class:e["title-info"]},[t(C,{class:e.back,onClick:this.back,icon:j},null),t(W,{onClick:()=>{},title:(n=this.data)==null?void 0:n.sysMusicScoreName,rightView:!1},null)]),t("div",{class:e.grid},[t(A,{"column-num":r.isPercussion?2:5,style:{display:(i=this.data)!=null&&i.score?"":"none"}},{default:()=>[t(h,null,{icon:()=>{var s;return t("span",{class:e.gridinfo},[q[(s=this.data)==null?void 0:s.heardLevel]])},text:()=>t("span",{class:e.gridname},[a("\u96BE\u5EA6")])}),t(h,null,{icon:()=>{var s;return t("span",{class:e.gridinfo},[(s=this.data)==null?void 0:s.score,a("\u5206")])},text:()=>t("span",{class:e.gridname},[a("\u8BC4\u6D4B\u5206\u6570")])}),r.isPercussion?null:t(v,null,[t(h,null,{icon:()=>{var s;return t("span",{style:{color:"#A2FFEC"},class:e.gridinfo},[(s=this.data)==null?void 0:s.intonation,a("\u5206")])},text:()=>t("span",{class:e.gridname},[a("\u97F3\u51C6")])}),t(h,null,{icon:()=>{var s;return t("span",{style:{color:"#FFC865"},class:e.gridinfo},[(s=this.data)==null?void 0:s.cadence,a("\u5206")])},text:()=>t("span",{class:e.gridname},[a("\u8282\u594F")])}),t(h,null,{icon:()=>{var s;return t("span",{style:{color:"#FFF1B8"},class:e.gridinfo},[(s=this.data)==null?void 0:s.integrity,a("\u5206")])},text:()=>t("span",{class:e.gridname},[a("\u5B8C\u6210\u5EA6")])})])]})])])])}});const p=E(),pt={RIGHT:"#01C1B5",WRONG:"#FF4444",NOT_PLAY:"#AEAEAE"},S={RIGHT:e.right,WRONG:e.wrong,NOT_PLAY:e.notPlay,CADENCE_WRONG:e.cadence_wrong,INTONATION_WRONG:e.intonation_wrong,INTEGRITY_WRONG:e.integrity_wrong,CADENCE_FAST:e.cadence_fast,CADENCE_SLOW:e.cadence_slow,INTONATION_HIGH:e.intonation_high,INTONATION_LOW:e.intonation_low};var ft=m({name:"report",data(){return{data:null,score:null,allNote:[],allResNote:[],loading:!1,hasError:!1,empty:!1,paddingLeft:20,svgHeight:0,userMeasureScore:null,paddingTop:0}},created(){p.android&&f({api:"setBarStatus",content:{status:0}})},async mounted(){console.log(r),this.FetchList(),p.android?f({api:"getNavHeight"},n=>{const{content:i}=n,s=i.dpi||2;i.navHeight&&(this.paddingTop=i.navHeight/s,this.paddingLeft=i.navHeight/s)}):p.ios&&f({api:"isSpecialShapedScreen"},n=>{const i=n==null?void 0:n.content.notchHeight;this.paddingLeft=i||((n==null?void 0:n.content.isSpecialShapedScreen)&&p.ios?50:0)})},methods:{async FetchList(){var n,i;this.loading=!0,this.hasError=!1,this.empty=!1;try{const s=await N.get("/sysMusicRecord/getLastEvaluationMusicalNotesPlayStats",{params:{recordId:this.$route.params.id}});if(!s.data){this.empty=!0,this.loading=!1;return}const d=await N.get("/sysMusicScoreAccompaniment/queryPage",{params:{clientType:"SMART_PRACTICE",sysMusicScoreId:s.data.musicalNotesPlayStats.examSongId}}),c=(n=d.data[0])==null?void 0:n.parentCategoriesId;r.subjectId=(i=d.data[0])==null?void 0:i.subjectId;const{musicalNotesPlayStats:l,userMeasureScore:o,partIndex:u,..._}=s.data;r.partIndex=u||0,this.data=_,this.userMeasureScore=o,this.allResNote=l.notesData;const F=await b.get(l.xmlUrl,{mode:"cors"});this.score=L(M(F),r.partIndex);const x=c==26||c==43,y=r.partListNames[r.partIndex],B=x&&y?" - "+T(y):"";this.data.sysMusicScoreName=this.data.sysMusicScoreName+B}catch{this.hasError=!0}this.loading=!1},onRerender(n){var s,d;this.svgHeight=((d=(s=n==null?void 0:n.container)==null?void 0:s.querySelector("svg"))==null?void 0:d.getBoundingClientRect().height)||0,this.allNote=R(n),r.times=this.allNote;for(const c of this.allResNote){const l=this.allNote[c.musicalNotesIndex];setTimeout(()=>{const o=document.getElementById("vf-"+l.id);o==null||o.classList.add(S[c.musicalErrorType])},300)}const i=(c,l,o=!1)=>{const u=H(c);r.evaluatings={...r.evaluatings,[u.measureIndex]:{...u,...G(l.score),score:l.score,dontTransition:o}}};if(this.userMeasureScore){for(const c in this.userMeasureScore)if(Object.prototype.hasOwnProperty.call(this.userMeasureScore,c)){const l=this.userMeasureScore[c];for(const o of this.allNote)if(l.measureRenderIndex==o.noteElement.sourceMeasure.MeasureNumberXML-1)if(!o.noteElement.tie)i(o,l);else for(const u of o.noteElement.tie.notes){const _=P(u);!_||i(_,l,u!==o.noteElement.tie.StartNote)}}}}},render(){var n;return t("div",{class:e.report,style:{paddingTop:this.paddingTop/2+"px"}},[t(_t,{data:this.data},null),t("div",{class:e.content,style:{marginLeft:this.paddingLeft+"px"}},[this.hasError?t(w,{image:"error",description:"\u8BF7\u6C42\u9519\u8BEF"},{description:()=>t("span",null,[a("\u8BF7\u6C42\u9519\u8BEF")," ",t("a",{style:"color: #01C1B5;",href:"javascript:;",onClick:this.FetchList},[a("\u91CD\u65B0\u52A0\u8F7D")])])}):null,this.empty?t(w,{description:"\u6682\u65E0\u8BC4\u6D4B\u6570\u636E"},null):null,!this.hasError&&this.data?t("div",{class:e.demos},[t("div",null,[t(g,{fill:"#01C1B5"},null),t("span",null,[a("\u6F14\u594F\u6B63\u786E")])]),t("div",null,[t(g,{fill:"#067DD7"},null),t("span",null,[a("\u8282\u594F\u9519\u8BEF")])]),r.isPercussion?null:t(v,null,[t("div",null,[t(g,{fill:"#FFAB25"},null),t("span",null,[a("\u97F3\u51C6\u9519\u8BEF")])]),t("div",null,[t(g,{fill:"#CC75FF"},null),t("span",null,[a("\u5B8C\u6210\u5EA6\u4E0D\u8DB3")])])]),t("div",null,[t(g,{fill:"#000"},null),t("span",null,[a("\u672A\u6F14\u594F")])])]):null,t(O,{type:"report",top:40,left:0,style:{position:"absolute",width:"100%",height:this.svgHeight+"px"}},null),this.score?t(k,{class:e.score,score:this.score,onRerender:this.onRerender},null):this.loading?t(D,{row:6},null):null,(n=this.data)!=null&&n.videoFilePath?t(V,this.data,{default:()=>[t(C,{color:"#01c1b5",round:!0,size:"mini",icon:"replay",class:e.btn},{default:()=>[a("\u67E5\u770B\u56DE\u653E")]})]}):null])])}}),wt=Object.freeze(Object.defineProperty({__proto__:null,colors:pt,colorsClass:S,default:ft},Symbol.toStringTag,{value:"Module"}));export{g as N,S as c,q as h,wt as i};
|