index.d46fada7.js 10 KB

1
  1. var O=Object.defineProperty,k=Object.defineProperties;var D=Object.getOwnPropertyDescriptors;var p=Object.getOwnPropertySymbols;var v=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;var C=(e,n,s)=>n in e?O(e,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[n]=s,f=(e,n)=>{for(var s in n||(n={}))v.call(n,s)&&C(e,s,n[s]);if(p)for(var s of p(n))S.call(n,s)&&C(e,s,n[s]);return e},N=(e,n)=>k(e,D(n));var F=(e,n)=>{var s={};for(var o in e)v.call(e,o)&&n.indexOf(o)<0&&(s[o]=e[o]);if(e!=null&&p)for(var o of p(e))n.indexOf(o)<0&&S.call(e,o)&&(s[o]=e[o]);return s};import{d as w,c as t,f as i,D as I,t as y,B as A,b as l,F as b,r as x,C as G,b0 as H}from"./base.d7a641ab.js";import{c as W}from"./index.7de565cb.js";import{I as j,T as V,M as $}from"./index.b892a4d8.js";import{Q as q,R as h,Y as X,X as Y,G as Z,T as z,Z as U,U as Q,V as J}from"./index.181476b5.js";import{P as K}from"./index.aaf143c8.js";import{E as B}from"./index.6829aadf.js";import{S as tt}from"./index.8a8e6a58.js";const et={BEGINNER:"\u5165\u95E8\u7EA7",ADVANCED:"\u8FDB\u9636\u7EA7",PERFORMER:"\u5927\u5E08\u7EA7"};var g=w({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,[i("\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 st="_header_1i8uc_49",nt="_ios_1i8uc_60",at="_android_1i8uc_63",it="_title_1i8uc_66",ot="_back_1i8uc_75",rt="_report_1i8uc_88",lt="_content_1i8uc_96",ct="_score_1i8uc_107",ut="_demos_1i8uc_123",dt="_right_1i8uc_139",ht="_wrong_1i8uc_143",gt="_notPlay_1i8uc_147",_t="_cadence_wrong_1i8uc_151",pt="_cadence_fast_1i8uc_152",ft="_cadence_slow_1i8uc_153",mt="_intonation_wrong_1i8uc_157",yt="_intonation_high_1i8uc_158",Nt="_intonation_low_1i8uc_159",wt="_integrity_wrong_1i8uc_163",Et="_grid_1i8uc_167",Ct="_gridinfo_1i8uc_184",vt="_gridname_1i8uc_189",St="_btn_1i8uc_194";var a={header:st,ios:nt,android:at,"title-info":"_title-info_1i8uc_66",title:it,back:ot,report:rt,content:lt,score:ct,demos:ut,right:dt,wrong:ht,notPlay:gt,cadence_wrong:_t,cadence_fast:pt,cadence_slow:ft,intonation_wrong:mt,intonation_high:yt,intonation_low:Nt,integrity_wrong:wt,grid:Et,gridinfo:Ct,gridname:vt,btn:St};I();var Ft=w({props:["data"],methods:{back(){y({api:"back"})}},render(){var e,n;return t("div",{class:"van-nav-bar--safe-area-inset-top"},[t("div",{class:W(a.header)},[t("div",{class:a["title-info"]},[t(A,{class:a.back,onClick:this.back,icon:j},null),t(V,{onClick:()=>{},title:(e=this.data)==null?void 0:e.sysMusicScoreName,rightView:!1},null)]),t("div",{class:a.grid},[t(q,{"column-num":l.isPercussion?2:5,style:{display:(n=this.data)!=null&&n.score?"":"none"}},{default:()=>[t(h,null,{icon:()=>{var s;return t("span",{class:a.gridinfo},[et[(s=this.data)==null?void 0:s.heardLevel]])},text:()=>t("span",{class:a.gridname},[i("\u96BE\u5EA6")])}),t(h,null,{icon:()=>{var s;return t("span",{class:a.gridinfo},[(s=this.data)==null?void 0:s.score,i("\u5206")])},text:()=>t("span",{class:a.gridname},[i("\u8BC4\u6D4B\u5206\u6570")])}),l.isPercussion?null:t(b,null,[t(h,null,{icon:()=>{var s;return t("span",{style:{color:"#A2FFEC"},class:a.gridinfo},[(s=this.data)==null?void 0:s.intonation,i("\u5206")])},text:()=>t("span",{class:a.gridname},[i("\u97F3\u51C6")])}),t(h,null,{icon:()=>{var s;return t("span",{style:{color:"#FFC865"},class:a.gridinfo},[(s=this.data)==null?void 0:s.cadence,i("\u5206")])},text:()=>t("span",{class:a.gridname},[i("\u8282\u594F")])}),t(h,null,{icon:()=>{var s;return t("span",{style:{color:"#FFF1B8"},class:a.gridinfo},[(s=this.data)==null?void 0:s.integrity,i("\u5206")])},text:()=>t("span",{class:a.gridname},[i("\u5B8C\u6210\u5EA6")])})])]})])])])}});const m=I(),xt={RIGHT:"#01C1B5",WRONG:"#FF4444",NOT_PLAY:"#AEAEAE"},L={RIGHT:a.right,WRONG:a.wrong,NOT_PLAY:a.notPlay,CADENCE_WRONG:a.cadence_wrong,INTONATION_WRONG:a.intonation_wrong,INTEGRITY_WRONG:a.integrity_wrong,CADENCE_FAST:a.cadence_fast,CADENCE_SLOW:a.cadence_slow,INTONATION_HIGH:a.intonation_high,INTONATION_LOW:a.intonation_low};var Bt=w({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(){m.android&&y({api:"setBarStatus",content:{status:0}})},async mounted(){console.log(l),this.FetchList(),m.android?y({api:"getNavHeight"},e=>{const{content:n}=e,s=n.dpi||2;n.navHeight&&(this.paddingTop=n.navHeight/s,this.paddingLeft=n.navHeight/s)}):m.ios&&y({api:"isSpecialShapedScreen"},e=>{const n=e==null?void 0:e.content.notchHeight;this.paddingLeft=n||((e==null?void 0:e.content.isSpecialShapedScreen)&&m.ios?50:0)})},methods:{async FetchList(){var e,n;this.loading=!0,this.hasError=!1,this.empty=!1;try{const o=await x.get("/sysMusicRecord/getLastEvaluationMusicalNotesPlayStats",{params:{recordId:this.$route.params.id}});if(!o.data){this.empty=!0,this.loading=!1;return}const u=await x.get("/sysMusicScoreAccompaniment/queryPage",{params:{clientType:"SMART_PRACTICE",sysMusicScoreId:o.data.musicalNotesPlayStats.examSongId}}),c=(e=u.data[0])==null?void 0:e.parentCategoriesId;l.subjectId=(n=u.data[0])==null?void 0:n.subjectId;const s=o.data,{musicalNotesPlayStats:r,userMeasureScore:d,partIndex:_}=s,M=F(s,["musicalNotesPlayStats","userMeasureScore","partIndex"]);l.partIndex=_||0,this.data=M,this.userMeasureScore=d,this.allResNote=r.notesData;const T=await G.get(r.xmlUrl,{mode:"cors"});this.score=X(Y(T),l.partIndex);const R=c==26||c==43,E=l.partListNames[l.partIndex],P=R&&E?" - "+H(E):"";this.data.sysMusicScoreName=this.data.sysMusicScoreName+P}catch{this.hasError=!0}this.loading=!1},onRerender(e){var s,o;this.svgHeight=((o=(s=e==null?void 0:e.container)==null?void 0:s.querySelector("svg"))==null?void 0:o.getBoundingClientRect().height)||0,this.allNote=Z(e),l.times=this.allNote;for(const u of this.allResNote){const c=this.allNote[u.musicalNotesIndex];setTimeout(()=>{const r=document.getElementById("vf-"+c.id);r==null||r.classList.add(L[u.musicalErrorType])},300)}const n=(u,c,r=!1)=>{const d=Q(u);l.evaluatings=N(f({},l.evaluatings),{[d.measureIndex]:N(f(f({},d),J(c.score)),{score:c.score,dontTransition:r})})};if(this.userMeasureScore){for(const u in this.userMeasureScore)if(Object.prototype.hasOwnProperty.call(this.userMeasureScore,u)){const c=this.userMeasureScore[u];for(const r of this.allNote)if(c.measureRenderIndex==r.noteElement.sourceMeasure.MeasureNumberXML-1)if(!r.noteElement.tie)n(r,c);else for(const d of r.noteElement.tie.notes){const _=z(d);!_||n(_,c,d!==r.noteElement.tie.StartNote)}}}}},render(){var e;return t("div",{class:a.report,style:{paddingTop:this.paddingTop/2+"px"}},[t(Ft,{data:this.data},null),t("div",{class:a.content,style:{marginLeft:this.paddingLeft+"px"}},[this.hasError?t(B,{image:"error",description:"\u8BF7\u6C42\u9519\u8BEF"},{description:()=>t("span",null,[i("\u8BF7\u6C42\u9519\u8BEF")," ",t("a",{style:"color: #01C1B5;",href:"javascript:;",onClick:this.FetchList},[i("\u91CD\u65B0\u52A0\u8F7D")])])}):null,this.empty?t(B,{description:"\u6682\u65E0\u8BC4\u6D4B\u6570\u636E"},null):null,!this.hasError&&this.data?t("div",{class:a.demos},[t("div",null,[t(g,{fill:"#01C1B5"},null),t("span",null,[i("\u6F14\u594F\u6B63\u786E")])]),t("div",null,[t(g,{fill:"#067DD7"},null),t("span",null,[i("\u8282\u594F\u9519\u8BEF")])]),l.isPercussion?null:t(b,null,[t("div",null,[t(g,{fill:"#FFAB25"},null),t("span",null,[i("\u97F3\u51C6\u9519\u8BEF")])]),t("div",null,[t(g,{fill:"#CC75FF"},null),t("span",null,[i("\u5B8C\u6210\u5EA6\u4E0D\u8DB3")])])]),t("div",null,[t(g,{fill:"#000"},null),t("span",null,[i("\u672A\u6F14\u594F")])])]):null,t(U,{type:"report",top:40,left:0,style:{position:"absolute",width:"100%",height:this.svgHeight+"px"}},null),this.score?t($,{class:a.score,score:this.score,onRerender:this.onRerender},null):this.loading?t(tt,{row:6},null):null,(e=this.data)!=null&&e.videoFilePath?t(K,this.data,{default:()=>[t(A,{color:"#01c1b5",round:!0,size:"mini",icon:"replay",class:a.btn},{default:()=>[i("\u67E5\u770B\u56DE\u653E")]})]}):null])])}}),Ot=Object.freeze(Object.defineProperty({__proto__:null,colors:xt,colorsClass:L,default:Bt},Symbol.toStringTag,{value:"Module"}));export{g as N,L as c,et as h,Ot as i};