index.6b37c357.js 9.6 KB

1
  1. import{d as m,a as e,g as a,b as w,H as f,I,B as E,G as A,j as r,e as h,F as C,l as x,q as b,y as L,x as M,J as T,n as R,p as P,K as N,L as O,N as k,S as D,z as H,C as G}from"./App.56029e96.js";import{I as j,T as W}from"./arrow-left.0dc84acc.js";import{P as V}from"./index.7d4ffad7.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?e("svg",{width:"14px",height:"24px",viewBox:"0 0 14 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[e("title",null,[a("\u8282\u594F\u5FEB\u4E86")]),e("g",{id:"\u6700\u7EC8",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e("g",{id:"\u8BC4\u6D4B\u62A5\u544A\uFF08\u589E\u52A0\u7C7B\u578B\uFF09",transform:"translate(-224.000000, -132.000000)"},[e("g",{id:"\u7F16\u7EC4-12\u5907\u4EFD",transform:"translate(80.000000, 132.000000)"},[e("g",{id:"\u8282\u594F\u5FEB\u4E86",transform:"translate(144.000000, 0.000000)"},[e("rect",{id:"\u77E9\u5F62\u5907\u4EFD-22",x:"0",y:"0",width:"14",height:"24"},null),e("g",{id:"\u7F16\u7EC4-2",transform:"translate(2.000000, 0.000000)"},[e("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),e("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)])])])])])]):e("svg",{width:"7px",height:"23px",viewBox:"0 0 7 23",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[e("g",{id:"\u667A\u80FD\u6253\u5206",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e("g",{id:"\u5F00\u59CB\u6F14\u594F\u5907\u4EFD",transform:"translate(-55.000000, -24.000000)"},[e("g",{id:"\u7F16\u7EC4-4",transform:"translate(55.000000, 24.000000)",fill:this.fill},[e("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_aenox_49",z="_ios_aenox_60",X="_android_aenox_63",Y="_title_aenox_66",Z="_back_aenox_75",J="_report_aenox_88",K="_content_aenox_96",U="_score_aenox_107",Q="_demos_aenox_123",ee="_right_aenox_139",te="_wrong_aenox_143",se="_notPlay_aenox_147",ne="_cadence_wrong_aenox_151",ae="_cadence_fast_aenox_152",oe="_cadence_slow_aenox_153",ie="_intonation_wrong_aenox_157",re="_intonation_high_aenox_158",le="_intonation_low_aenox_159",ce="_integrity_wrong_aenox_163",de="_grid_aenox_167",ue="_gridinfo_aenox_184",he="_gridname_aenox_189",ge="_btn_aenox_194";var t={header:$,ios:z,android:X,"title-info":"_title-info_aenox_66",title:Y,back:Z,report:J,content:K,score:U,demos:Q,right:ee,wrong:te,notPlay:se,cadence_wrong:ne,cadence_fast:ae,cadence_slow:oe,intonation_wrong:ie,intonation_high:re,intonation_low:le,integrity_wrong:ce,grid:de,gridinfo:ue,gridname:he,btn:ge};w();var _e=m({props:["data"],methods:{back(){f({api:"back"})}},render(){var n,o;return e("div",{class:"van-nav-bar--safe-area-inset-top"},[e("div",{class:I(t.header)},[e("div",{class:t["title-info"]},[e(E,{class:t.back,onClick:this.back,icon:j},null),e(W,{onClick:()=>{},title:(n=this.data)==null?void 0:n.sysMusicScoreName,rightView:!1},null)]),e("div",{class:t.grid},[e(A,{"column-num":r.isPercussion?2:5,style:{display:(o=this.data)!=null&&o.score?"":"none"}},{default:()=>[e(h,null,{icon:()=>{var s;return e("span",{class:t.gridinfo},[q[(s=this.data)==null?void 0:s.heardLevel]])},text:()=>e("span",{class:t.gridname},[a("\u96BE\u5EA6")])}),e(h,null,{icon:()=>{var s;return e("span",{class:t.gridinfo},[(s=this.data)==null?void 0:s.score,a("\u5206")])},text:()=>e("span",{class:t.gridname},[a("\u8BC4\u6D4B\u5206\u6570")])}),r.isPercussion?null:e(C,null,[e(h,null,{icon:()=>{var s;return e("span",{style:{color:"#A2FFEC"},class:t.gridinfo},[(s=this.data)==null?void 0:s.intonation,a("\u5206")])},text:()=>e("span",{class:t.gridname},[a("\u97F3\u51C6")])}),e(h,null,{icon:()=>{var s;return e("span",{style:{color:"#FFC865"},class:t.gridinfo},[(s=this.data)==null?void 0:s.cadence,a("\u5206")])},text:()=>e("span",{class:t.gridname},[a("\u8282\u594F")])}),e(h,null,{icon:()=>{var s;return e("span",{style:{color:"#FFF1B8"},class:t.gridinfo},[(s=this.data)==null?void 0:s.integrity,a("\u5206")])},text:()=>e("span",{class:t.gridname},[a("\u5B8C\u6210\u5EA6")])})])]})])])])}});const p=w(),pe={RIGHT:"#01C1B5",WRONG:"#FF4444",NOT_PLAY:"#AEAEAE"},v={RIGHT:t.right,WRONG:t.wrong,NOT_PLAY:t.notPlay,CADENCE_WRONG:t.cadence_wrong,INTONATION_WRONG:t.intonation_wrong,INTEGRITY_WRONG:t.integrity_wrong,CADENCE_FAST:t.cadence_fast,CADENCE_SLOW:t.cadence_slow,INTONATION_HIGH:t.intonation_high,INTONATION_LOW:t.intonation_low};var fe=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:o}=n,s=o.dpi||2;o.navHeight&&(this.paddingTop=o.navHeight/s,this.paddingLeft=o.navHeight/s)}):p.ios&&f({api:"isSpecialShapedScreen"},n=>{const o=n==null?void 0:n.content.notchHeight;this.paddingLeft=o||((n==null?void 0:n.content.isSpecialShapedScreen)&&p.ios?50:0)})},methods:{async FetchList(){var n,o;this.loading=!0,this.hasError=!1,this.empty=!1;try{const s=await x.get("/sysMusicRecord/getLastEvaluationMusicalNotesPlayStats",{params:{recordId:this.$route.params.id}});if(!s.data){this.empty=!0,this.loading=!1;return}const u=await x.get("/sysMusicScoreAccompaniment/queryPage",{params:{clientType:"SMART_PRACTICE",sysMusicScoreId:s.data.musicalNotesPlayStats.examSongId}}),c=(n=u.data[0])==null?void 0:n.parentCategoriesId;r.subjectId=(o=u.data[0])==null?void 0:o.subjectId;const{musicalNotesPlayStats:l,userMeasureScore:i,partIndex:d,..._}=s.data;r.partIndex=d||0,this.data=_,this.userMeasureScore=i,this.allResNote=l.notesData;const S=await b.get(l.xmlUrl,{mode:"cors"});this.score=L(M(S),r.partIndex);const F=c==26||c==43,y=r.partListNames[r.partIndex],B=F&&y?" - "+T(y):"";this.data.sysMusicScoreName=this.data.sysMusicScoreName+B}catch{this.hasError=!0}this.loading=!1},onRerender(n){var s,u;this.svgHeight=((u=(s=n==null?void 0:n.container)==null?void 0:s.querySelector("svg"))==null?void 0:u.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 i=document.getElementById("vf-"+l.id);i==null||i.classList.add(v[c.musicalErrorType])},300)}const o=(c,l,i=!1)=>{const d=H(c);r.evaluatings={...r.evaluatings,[d.measureIndex]:{...d,...G(l.score),score:l.score,dontTransition:i}}};if(this.userMeasureScore){for(const c in this.userMeasureScore)if(Object.prototype.hasOwnProperty.call(this.userMeasureScore,c)){const l=this.userMeasureScore[c];for(const i of this.allNote)if(l.measureRenderIndex==i.noteElement.sourceMeasure.MeasureNumberXML-1)if(!i.noteElement.tie)o(i,l);else for(const d of i.noteElement.tie.notes){const _=P(d);!_||o(_,l,d!==i.noteElement.tie.StartNote)}}}}},render(){var n;return e("div",{class:t.report,style:{paddingTop:this.paddingTop/2+"px"}},[e(_e,{data:this.data},null),e("div",{class:t.content,style:{marginLeft:this.paddingLeft+"px"}},[this.hasError?e(N,{image:"error",description:"\u8BF7\u6C42\u9519\u8BEF"},{description:()=>e("span",null,[a("\u8BF7\u6C42\u9519\u8BEF")," ",e("a",{style:"color: #01C1B5;",href:"javascript:;",onClick:this.FetchList},[a("\u91CD\u65B0\u52A0\u8F7D")])])}):null,this.empty?e(N,{description:"\u6682\u65E0\u8BC4\u6D4B\u6570\u636E"},null):null,!this.hasError&&this.data?e("div",{class:t.demos},[e("div",null,[e(g,{fill:"#01C1B5"},null),e("span",null,[a("\u6F14\u594F\u6B63\u786E")])]),e("div",null,[e(g,{fill:"#067DD7"},null),e("span",null,[a("\u8282\u594F\u9519\u8BEF")])]),r.isPercussion?null:e(C,null,[e("div",null,[e(g,{fill:"#FFAB25"},null),e("span",null,[a("\u97F3\u51C6\u9519\u8BEF")])]),e("div",null,[e(g,{fill:"#CC75FF"},null),e("span",null,[a("\u5B8C\u6210\u5EA6\u4E0D\u8DB3")])])]),e("div",null,[e(g,{fill:"#000"},null),e("span",null,[a("\u672A\u6F14\u594F")])])]):null,e(O,{type:"report",top:40,left:0,style:{position:"absolute",width:"100%",height:this.svgHeight+"px"}},null),this.score?e(k,{class:t.score,score:this.score,onRerender:this.onRerender},null):this.loading?e(D,{row:6},null):null,(n=this.data)!=null&&n.videoFilePath?e(V,this.data,{default:()=>[e(E,{color:"#01c1b5",round:!0,size:"mini",icon:"replay",class:t.btn},{default:()=>[a("\u67E5\u770B\u56DE\u653E")]})]}):null])])}}),Ne=Object.freeze(Object.defineProperty({__proto__:null,colors:pe,colorsClass:v,default:fe},Symbol.toStringTag,{value:"Module"}));export{g as N,v as c,q as h,Ne as i};