index-legacy.8dd361e0.js 16 KB

1
  1. !function(){var t=["musicalNotesPlayStats","userMeasureScore","partIndex"];function e(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function n(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?e(Object(i),!0).forEach((function(e){r(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,l=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return l=t.done,t},e:function(t){c=!0,o=t},f:function(){try{l||null==n.return||n.return()}finally{if(c)throw o}}}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function o(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n,r,i={},a=Object.keys(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function l(t,e,n,r,i,a,o){try{var l=t[a](o),c=l.value}catch(s){return void n(s)}l.done?e(c):Promise.resolve(c).then(r,i)}function c(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var a=t.apply(e,n);function o(t){l(a,r,i,o,c,"next",t)}function c(t){l(a,r,i,o,c,"throw",t)}o(void 0)}))}}var s=document.createElement("style");s.innerHTML="body{--screen: 1}@media screen and (orientation: landscape){body{--screen: 1}}.ipad{padding-top:10PX}.van-toast--text{min-width:100PX!important;padding:8PX 15PX!important}.van-toast--text .van-toast__text{font-size:14PX!important}.van-toast--top{top:10%!important}.van-toast--loading{width:100PX!important;padding:10PX 20PX!important}.van-toast--loading .van-toast__text{margin-top:8PX!important;font-size:14PX!important}.van-dialog{max-width:50%!important}.van-dialog .van-dialog__message{padding:20PX!important;font-size:16PX!important}.van-dialog .van-dialog__content--isolated{min-height:30PX!important}.van-dialog .van-button__text{font-size:16PX!important}.van-nav-bar .van-icon{color:#1a1a1a!important}.van-nav-bar__title{color:#333!important}._header_1i8uc_49{padding:calc(.16rem * var(--screen));display:flex;height:calc(1.06667rem * var(--screen));align-items:center;overflow:hidden;padding-bottom:0;justify-content:space-between;padding-right:20PX;background-color:#01c1b5}._header_1i8uc_49._ios_1i8uc_60{padding-top:calc(.53333rem * var(--screen))}._header_1i8uc_49._android_1i8uc_63{padding-top:calc(.66667rem * var(--screen))}._header_1i8uc_49 ._title-info_1i8uc_66{display:flex;align-items:center;width:35%}._header_1i8uc_49 ._title-info_1i8uc_66 ._title_1i8uc_66{font-size:calc(.32rem * var(--screen));flex:1}._header_1i8uc_49 ._title-info_1i8uc_66 ._back_1i8uc_75{width:.64rem}._header_1i8uc_49 .van-button{border:none;width:calc(.53333rem * var(--screen));height:calc(.53333rem * var(--screen));background-color:transparent}._header_1i8uc_49 .van-grid-item__content{background-color:transparent;color:#fff}._report_1i8uc_88{height:100vh;display:flex;width:100%;flex-direction:column;background-color:#01c1b5;box-sizing:border-box}._content_1i8uc_96{flex:1;margin:0 20PX 20PX;overflow:hidden;overflow-y:auto;position:relative;display:flex;background-color:#fff;border-radius:.21333rem}._content_1i8uc_96 ._score_1i8uc_107{padding-top:40PX;border-radius:.13333rem;flex:1}._content_1i8uc_96 .van-empty{padding:1vh 0;margin:auto}._content_1i8uc_96 .van-empty__image{width:40vh;height:40vh}._content_1i8uc_96 .van-empty__description{font-size:16PX}._demos_1i8uc_123{display:flex;position:absolute;top:20PX;left:55PX}._demos_1i8uc_123>div{margin-left:10PX;display:flex;align-items:flex-end}._demos_1i8uc_123>div>span{display:inline-block;margin-left:5PX;font-size:14PX}._right_1i8uc_139 path{fill:#01c1b5;stroke:#01c1b5}._wrong_1i8uc_143 path{fill:#f44;stroke:#f44}._notPlay_1i8uc_147 path{fill:#aeaeae;stroke:#aeaeae}._cadence_wrong_1i8uc_151 path,._cadence_fast_1i8uc_152 path,._cadence_slow_1i8uc_153 path{fill:#f44;stroke:#f44}._intonation_wrong_1i8uc_157 path,._intonation_high_1i8uc_158 path,._intonation_low_1i8uc_159 path{fill:#ffab25;stroke:#ffab25}._integrity_wrong_1i8uc_163 path{fill:#cc75ff;stroke:#cc75ff}._grid_1i8uc_167{padding:20PX 0;max-width:340PX;flex:1}._grid_1i8uc_167 .van-grid-item__content{padding:0}._grid_1i8uc_167 .van-grid-item__content:after{border-bottom:none}._grid_1i8uc_167 .van-hairline--top:after{border:none}._grid_1i8uc_167 .van-grid-item:last-child .van-grid-item__content:after{border:none}._grid_1i8uc_167 ._gridinfo_1i8uc_184{font-size:14PX;font-weight:700;color:#fff}._grid_1i8uc_167 ._gridname_1i8uc_189{font-weight:400;font-size:12PX;color:#fff}._btn_1i8uc_194{font-size:14PX!important;min-width:100PX;position:fixed!important;bottom:10vh;left:50%;transform:translate(-50%)}\n",document.head.appendChild(s),System.register(["./App-legacy.e9a3d8ec.js","./index-legacy.0542c63e.js","./index-legacy.b6041c09.js"],(function(e){"use strict";var a,l,s,u,d,_,f,p,g,h,v,m,y,b,w,x,P,O,N,S,C,E,I,j,X,k,A;return{setters:[function(t){a=t.d,l=t.a,s=t.g,u=t.b,d=t.H,_=t.I,f=t.B,p=t.G,g=t.j,h=t.e,v=t.F,m=t.l,y=t.q,b=t.y,w=t.x,x=t.J,P=t.n,O=t.p,N=t.K,S=t.L,C=t.S,E=t.z,I=t.C},function(t){j=t.I,X=t.T,k=t.M},function(t){A=t.P}],execute:function(){var R=e("h",{BEGINNER:"入门级",ADVANCED:"进阶级",PERFORMER:"大师级"}),T=e("N",a({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:function(){return this.shadow?l("svg",{width:"14px",height:"24px",viewBox:"0 0 14 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[l("title",null,[s("节奏快了")]),l("g",{id:"最终",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[l("g",{id:"评测报告(增加类型)",transform:"translate(-224.000000, -132.000000)"},[l("g",{id:"编组-12备份",transform:"translate(80.000000, 132.000000)"},[l("g",{id:"节奏快了",transform:"translate(144.000000, 0.000000)"},[l("rect",{id:"矩形备份-22",x:"0",y:"0",width:"14",height:"24"},null),l("g",{id:"编组-2",transform:"translate(2.000000, 0.000000)"},[l("ellipse",{id:"椭圆形",fill:this.fill,transform:"translate(4.685927, 18.917813) scale(-1, -1) rotate(-32.000000) translate(".concat(this.x+-4.685927,", ").concat(this.y+-18.917813,")"),cx:"4.68592654",cy:"18.9178127",rx:"3.70078457",ry:"2.92022453"},null),l("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:"形状结合","fill-opacity":"0.7",fill:"#2DC7AA",transform:"translate(6.500000, 11.038446) scale(-1, -1) translate(-6.500000, -11.038446) "},null)])])])])])]):l("svg",{width:"7px",height:"23px",viewBox:"0 0 7 23",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[l("g",{id:"智能打分",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[l("g",{id:"开始演奏备份",transform:"translate(-55.000000, -24.000000)"},[l("g",{id:"编组-4",transform:"translate(55.000000, 24.000000)",fill:this.fill},[l("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:"形状结合",transform:"translate(3.500000, 11.038446) scale(-1, -1) translate(-3.500000, -11.038446) "},null)])])])])}})),M="_header_1i8uc_49",L="_title-info_1i8uc_66",F="_back_1i8uc_75",z="_report_1i8uc_88",H="_content_1i8uc_96",B="_score_1i8uc_107",D="_demos_1i8uc_123",G="_right_1i8uc_139",W="_wrong_1i8uc_143",q="_notPlay_1i8uc_147",Y="_cadence_wrong_1i8uc_151",U="_cadence_fast_1i8uc_152",V="_cadence_slow_1i8uc_153",Z="_intonation_wrong_1i8uc_157",$="_intonation_high_1i8uc_158",J="_intonation_low_1i8uc_159",K="_integrity_wrong_1i8uc_163",Q="_grid_1i8uc_167",tt="_gridinfo_1i8uc_184",et="_gridname_1i8uc_189",nt="_btn_1i8uc_194";u();var rt=a({props:["data"],methods:{back:function(){d({api:"back"})}},render:function(){var t,e,n=this;return l("div",{class:"van-nav-bar--safe-area-inset-top"},[l("div",{class:_(M)},[l("div",{class:L},[l(f,{class:F,onClick:this.back,icon:j},null),l(X,{onClick:function(){},title:null===(t=this.data)||void 0===t?void 0:t.sysMusicScoreName,rightView:!1},null)]),l("div",{class:Q},[l(p,{"column-num":g.isPercussion?2:5,style:{display:null!==(e=this.data)&&void 0!==e&&e.score?"":"none"}},{default:function(){return[l(h,null,{icon:function(){var t;return l("span",{class:tt},[R[null===(t=n.data)||void 0===t?void 0:t.heardLevel]])},text:function(){return l("span",{class:et},[s("难度")])}}),l(h,null,{icon:function(){var t;return l("span",{class:tt},[null===(t=n.data)||void 0===t?void 0:t.score,s("分")])},text:function(){return l("span",{class:et},[s("评测分数")])}}),g.isPercussion?null:l(v,null,[l(h,null,{icon:function(){var t;return l("span",{style:{color:"#A2FFEC"},class:tt},[null===(t=n.data)||void 0===t?void 0:t.intonation,s("分")])},text:function(){return l("span",{class:et},[s("音准")])}}),l(h,null,{icon:function(){var t;return l("span",{style:{color:"#FFC865"},class:tt},[null===(t=n.data)||void 0===t?void 0:t.cadence,s("分")])},text:function(){return l("span",{class:et},[s("节奏")])}}),l(h,null,{icon:function(){var t;return l("span",{style:{color:"#FFF1B8"},class:tt},[null===(t=n.data)||void 0===t?void 0:t.integrity,s("分")])},text:function(){return l("span",{class:et},[s("完成度")])}})])]}})])])])}}),it=u(),at=e("c",{RIGHT:G,WRONG:W,NOT_PLAY:q,CADENCE_WRONG:Y,INTONATION_WRONG:Z,INTEGRITY_WRONG:K,CADENCE_FAST:U,CADENCE_SLOW:V,INTONATION_HIGH:$,INTONATION_LOW:J}),ot=a({name:"report",data:function(){return{data:null,score:null,allNote:[],allResNote:[],loading:!1,hasError:!1,empty:!1,paddingLeft:20,svgHeight:0,userMeasureScore:null,paddingTop:0}},created:function(){it.android&&d({api:"setBarStatus",content:{status:0}})},mounted:function(){var t=this;return c(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:console.log(g),t.FetchList(),it.android?d({api:"getNavHeight"},(function(e){var n=e.content,r=n.dpi||2;n.navHeight&&(t.paddingTop=n.navHeight/r,t.paddingLeft=n.navHeight/r)})):it.ios&&d({api:"isSpecialShapedScreen"},(function(e){var n=null==e?void 0:e.content.notchHeight;t.paddingLeft=n||(null!=e&&e.content.isSpecialShapedScreen&&it.ios?50:0)}));case 3:case"end":return e.stop()}}),e)})))()},methods:{FetchList:function(){var e=this;return c(regeneratorRuntime.mark((function n(){var r,i,a,l,c,s,u,d,_,f,p,h,v,P;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e.loading=!0,e.hasError=!1,e.empty=!1,n.prev=3,n.next=6,m.get("/sysMusicRecord/getLastEvaluationMusicalNotesPlayStats",{params:{recordId:e.$route.params.id}});case 6:if((a=n.sent).data){n.next=11;break}return e.empty=!0,e.loading=!1,n.abrupt("return");case 11:return n.next=13,m.get("/sysMusicScoreAccompaniment/queryPage",{params:{clientType:"SMART_PRACTICE",sysMusicScoreId:a.data.musicalNotesPlayStats.examSongId}});case 13:return l=n.sent,c=null===(r=l.data[0])||void 0===r?void 0:r.parentCategoriesId,g.subjectId=null===(i=l.data[0])||void 0===i?void 0:i.subjectId,s=a.data,u=s.musicalNotesPlayStats,d=s.userMeasureScore,_=s.partIndex,f=o(s,t),g.partIndex=_||0,e.data=f,e.userMeasureScore=d,e.allResNote=u.notesData,n.next=23,y.get(u.xmlUrl,{mode:"cors"});case 23:p=n.sent,e.score=b(w(p),g.partIndex),h=26==c||43==c,v=g.partListNames[g.partIndex],P=h&&v?" - "+x(v):"",e.data.sysMusicScoreName=e.data.sysMusicScoreName+P,n.next=34;break;case 31:n.prev=31,n.t0=n.catch(3),e.hasError=!0;case 34:e.loading=!1;case 35:case"end":return n.stop()}}),n,null,[[3,31]])})))()},onRerender:function(t){var e,a,o=this;this.svgHeight=(null==t||null===(e=t.container)||void 0===e||null===(a=e.querySelector("svg"))||void 0===a?void 0:a.getBoundingClientRect().height)||0,this.allNote=P(t),g.times=this.allNote;var l,c=i(this.allResNote);try{var s=function(){var t=l.value,e=o.allNote[t.musicalNotesIndex];setTimeout((function(){var n=document.getElementById("vf-"+e.id);null==n||n.classList.add(at[t.musicalErrorType])}),300)};for(c.s();!(l=c.n()).done;)s()}catch(w){c.e(w)}finally{c.f()}var u=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=E(t);g.evaluatings=n(n({},g.evaluatings),{},r({},a.measureIndex,n(n(n({},a),I(e.score)),{},{score:e.score,dontTransition:i})))};if(this.userMeasureScore)for(var d in this.userMeasureScore)if(Object.prototype.hasOwnProperty.call(this.userMeasureScore,d)){var _,f=this.userMeasureScore[d],p=i(this.allNote);try{for(p.s();!(_=p.n()).done;){var h=_.value;if(f.measureRenderIndex==h.noteElement.sourceMeasure.MeasureNumberXML-1)if(h.noteElement.tie){var v,m=i(h.noteElement.tie.notes);try{for(m.s();!(v=m.n()).done;){var y=v.value,b=O(y);b&&u(b,f,y!==h.noteElement.tie.StartNote)}}catch(w){m.e(w)}finally{m.f()}}else u(h,f)}}catch(w){p.e(w)}finally{p.f()}}}},render:function(){var t,e=this;return l("div",{class:z,style:{paddingTop:this.paddingTop/2+"px"}},[l(rt,{data:this.data},null),l("div",{class:H,style:{marginLeft:this.paddingLeft+"px"}},[this.hasError?l(N,{image:"error",description:"请求错误"},{description:function(){return l("span",null,[s("请求错误")," ",l("a",{style:"color: #01C1B5;",href:"javascript:;",onClick:e.FetchList},[s("重新加载")])])}}):null,this.empty?l(N,{description:"暂无评测数据"},null):null,!this.hasError&&this.data?l("div",{class:D},[l("div",null,[l(T,{fill:"#01C1B5"},null),l("span",null,[s("演奏正确")])]),l("div",null,[l(T,{fill:"#067DD7"},null),l("span",null,[s("节奏错误")])]),g.isPercussion?null:l(v,null,[l("div",null,[l(T,{fill:"#FFAB25"},null),l("span",null,[s("音准错误")])]),l("div",null,[l(T,{fill:"#CC75FF"},null),l("span",null,[s("完成度不足")])])]),l("div",null,[l(T,{fill:"#000"},null),l("span",null,[s("未演奏")])])]):null,l(S,{type:"report",top:40,left:0,style:{position:"absolute",width:"100%",height:this.svgHeight+"px"}},null),this.score?l(k,{class:B,score:this.score,onRerender:this.onRerender},null):this.loading?l(C,{row:6},null):null,null!==(t=this.data)&&void 0!==t&&t.videoFilePath?l(A,this.data,{default:function(){return[l(f,{color:"#01c1b5",round:!0,size:"mini",icon:"replay",class:nt},{default:function(){return[s("查看回放")]}})]}}):null])])}}),lt=Object.freeze(Object.defineProperty({__proto__:null,colors:{RIGHT:"#01C1B5",WRONG:"#FF4444",NOT_PLAY:"#AEAEAE"},colorsClass:at,default:ot},Symbol.toStringTag,{value:"Module"}));e("i",lt)}}}))}();