1 |
- !function(){function e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function n(n){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?e(Object(a),!0).forEach((function(e){t(n,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(a)):e(Object(a)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(a,e))}))}return n}function t(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function r(e,n,t,r,a,o,i){try{var u=e[o](i),c=u.value}catch(s){return void t(s)}u.done?n(c):Promise.resolve(c).then(r,a)}function a(e){return function(){var n=this,t=arguments;return new Promise((function(a,o){var i=e.apply(n,t);function u(e){r(i,a,o,u,c,"next",e)}function c(e){r(i,a,o,u,c,"throw",e)}u(void 0)}))}}System.register(["./index-legacy.90c82f08.js","./index-legacy.02f13b7a.js","./index.module-legacy.9b2d2c6b.js","./index-legacy.84457c4c.js","./index-legacy.e11fad33.js","./index-legacy.6c608356.js","./index-legacy.789a0824.js","./index-legacy.55839436.js","./index-legacy.f3e5e283.js","./index-legacy.c8871c95.js","./index-legacy.3c5580aa.js","./use-tab-status-legacy.bafe466c.js","./Picker-legacy.aeff9f1a.js","./index-legacy.fe10c814.js","./index-legacy.64e3b474.js","./index-legacy.f9492e3a.js"],(function(e){"use strict";var t,r,o,i,u,c,s,l,d,m,p,f,g,h,v,y,b,C,x,S,T,w,j,B,O,k,A,H,L,R;return{setters:[function(e){t=e.d,r=e.ah,o=e.R,i=e.g,u=e.r,c=e.y,s=e.$,l=e.c,d=e.aj,m=e.F,p=e.a5,f=e.ak,g=e.P,h=e.al,v=e.m,y=e._,b=e.e,C=e.bq,x=e.bf},function(e){S=e.O},function(e){T=e.g,w=e.s},function(e){j=e.O},function(e){B=e.O},function(e){O=e.D,k=e.a},function(e){A=e.L},function(e){H=e.C},function(e){L=e.C},function(e){R=e.P},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var P={"Acoustic Grand Piano":"大钢琴","Bright Acoustic Piano":"明亮的钢琴","Electric Grand Piano":"电钢琴","Rhodes Piano":"柔和的电钢琴","Chorused Piano":"加合唱效果的电钢琴",Harpsichord:"羽管键琴",Clavichord:"科拉维科特琴",Celesta:"钢片琴",Glockenspiel:"钢片琴","Music box":"八音盒",Vibraphone:"颤音琴",Marimba:"马林巴",Xylophone:"木琴","Tubular Bells":"管钟",Dulcimer:"大扬琴","Hammond Organ":"击杆风琴","Percussive Organ":"打击式风琴","Rock Organ":"摇滚风琴","Church Organ":"教堂风琴","Reed Organ":"簧管风琴",Accordian:"手风琴",Harmonica:"口琴","Tango Accordian":"探戈手风琴","Acoustic Guitar":"钢弦吉他","Electric Guitar":"闷音电吉他","Overdriven Guitar":"加驱动效果的电吉他","Distortion Guitar":"加失真效果的电吉他","Guitar Harmonics":"吉他和音","Acoustic Bass":"大贝司","Electric Bass":"电贝司","Fretless Bass":"无品贝司","Slap Bass":"掌击","Synth Bass":"电子合成",Violin:"小提琴",Viola:"中提琴",Cello:"大提琴",Contrabass:"低音大提琴","Tremolo Strings":"弦乐群颤音音色","Pizzicato Strings":"弦乐群拨弦音色","Orchestral Harp":"竖琴",Timpani:"定音鼓","String Ensemble":"弦乐合奏音色","Synth Strings":"合成弦乐合奏音色","Choir Aahs":"人声合唱","Voice Oohs":"人声","Synth Voice":"合成人声","Orchestra Hit":"管弦乐敲击齐奏",Trumpet:"小号",Trombone:"长号",Tuba:"大号","Muted Trumpet":"加弱音器小号","French Horn":"法国号","Brass Section":"铜管组","Synth Brass":"合成铜管音色","Soprano Sax":"高音萨克斯管","Alto Sax":"中音萨克斯管","Tenor Sax":"次中音萨克斯管","Baritone Sax":"低音萨克斯管",Oboe:"双簧管","English Horn":"英国管",Bassoon:"巴松",Clarinet:"单簧管","Soprano Saxophone":"高音萨克斯管","Alto Saxophone":"中音萨克斯管","Tenor Saxophone":"次中音萨克斯管","Baritone Saxophone":"低音萨克斯管",Piccolo:"短笛",Flute:"长笛",Recorder:"竖笛","Soprano Recorder":"高音竖笛","Pan Flute":"排箫","Bottle Blow":"瓶木管",Whistle:"口哨声",Ocarina:"陶笛",Lead:"合成主音","Lead lead":"合成主音","Pad age":"合成音色",Pad:"合成音色",FX:"合成效果 科幻",Sitar:"西塔尔",Banjo:"班卓琴",Shamisen:"三昧线",Koto:"十三弦筝",Kalimba:"卡林巴",Bagpipe:"风笛",Fiddle:"民族提琴",Shanai:"山奈","Tinkle Bell":"叮当铃",Agogos:"阿戈戈铃","Steel Drums":"钢鼓","Taiko Drum":"太鼓","Melodic Toms":"嗵嗵鼓","Synth Drums":"合成鼓","Reverse Cymbals":"反向镲","Agogo Bells":"阿戈戈铃","Taiko Drums":"太鼓",Bongos:"邦戈鼓","Bongo Bell":"邦戈铃",Congas:"康加鼓",Guiro:"刮壶","Guitar Fret Noise":"吉他换把杂音","Breath Noise":"呼吸声",Seashore:"海浪声","Bird Tweet":"鸟鸣","Telephone Ring":"电话铃",Helicopter:"直升机",Applause:"鼓掌声",Gunshot:"枪声","Acoustic Bass Drum":"大鼓","Bass Drum":"大鼓","Side Drum":"小鼓鼓边","Acoustic Snare":"小鼓","Hand Claps":"拍手","Electric Snare":"小鼓","Low Floor Tom":"低音嗵鼓","Closed Hi-Hat":"闭合踩镲","High Floor Tom":"高音落地嗵鼓","Pedal Hi-Hat":"脚踏踩镲","Low Tom":"低音嗵鼓","Open Hi-Hat":"开音踩镲","Low-Mid Tom":"中低音嗵鼓","Hi Mid Tom":"高音鼓","Crash Cymbals":"对镲","High Tom":"高音嗵鼓","Ride Cymbals":"叮叮镲","Chinese Cymbals":"中国镲","Ride Bell":"圆铃",Tambourine:"铃鼓","Splash Cymbal":"溅音镲",Cowbell:"牛铃","Crash Cymbal":"强音钹","Vibra-Slap":"颤音器","Ride Cymbal":"打点钹","Hi Bongo":"高音邦戈鼓","Low Bongo":"低音邦戈鼓","Mute Hi Conga":"弱音高音康加鼓","Open Hi Conga":"强音高音康加鼓","Low Conga":"低音康加鼓","High Timbale":"高音天巴鼓","Low Timbale":"低音天巴鼓","High Agogo":"高音阿戈戈铃","Low Agogo":"低音阿戈戈铃",Cabasa:"卡巴萨",Maracas:"沙锤","Short Whistle":"短口哨","Long Whistle":"长口哨","Short Guiro":"短刮壶","Long Guiro":"长刮壶",Claves:"响棒","Hi Wood Block":"高音木鱼","Low Wood Block":"低音木鱼","Mute Triangle":"弱音三角铁","Open Triangle":"强音三角铁","Drum Set":"架子鼓","Hulusi flute":"葫芦丝",Melodica:"口风琴","Snare Drum":"小军鼓",Cymbal:"镲",Cymbals:"镲","Horn in F":"圆号",Triangle:"三角铁",Vibrato:"颤音琴","Suspend Cymbals":"吊镲","Suspended Cymbals":"吊镲","Tom-Toms":"嗵嗵鼓",Bell:"铃铛",Bells:"铃铛","Alto Clarinet":"中音单簧管","Bass Clarinet":"低音单簧管",Cornet:"短号",Euphonium:"上低音号","crash cymbals":"对镲",Castanets:"响板",Shaker:"沙锤","Mark tree":"音树",Chimes:"管钟","Mark Tree":"音树","Tom-toms":"嗵嗵鼓","Hi-Hat":"踩镲","Sleigh Bells":"雪橇铃",Flexatone:"弹音器","Brake drum":"闸鼓",Gong:"锣","concert tom":"音乐会嗵嗵鼓","brake drum":"车轮鼓","finger cymbal":"指钹","ride cymbal":"叮叮镲","Concert Toms":"音乐会嗵嗵鼓",Vibraslap:"弹音器","Wood Blocks":"木鱼","Temple Blocks":"木鱼","Wood Block":"木鱼","Field Drum":"军鼓","Quad-Toms":"筒鼓",Quads:"筒鼓","Drums set":"架子鼓","High Bongo":"邦戈",Timbales:"天巴鼓","rain stick":"雨棒","String Bass":"弦乐低音","Floor Tom":"侧嗵鼓","Brake Drum":"闸鼓","Tam-tam":"大锣"},D=function(e){for(var n=e.replace(/ /g," ").toLocaleLowerCase(),t=Object.keys(P),r=0;r<t.length;r++){if(t[r].replace(/ /g," ").toLocaleLowerCase()===n)return P[t[r]]||""}for(var a=0;a<t.length;a++){var o=t[a].replace(/ /g," ").toLocaleLowerCase();if(n.includes(o))return P[t[a]]||""}return""};e("default",t({name:"accompany-music-list",props:{musicTree:{type:Array,default:function(){return[]}}},setup:function(){var e,t,P,E,V,F,G=r(),M=T("icon-music.svg"),N=o({}),U=(null===(e=i.user)||void 0===e||null===(t=e.data)||void 0===t?void 0:t.phone)||"accompany-music-list-subject",I=localStorage.getItem(U)||(null===(P=i.user)||void 0===P||null===(E=P.data)||void 0===E||null===(V=E.subjectId)||void 0===V||null===(F=V.split(","))||void 0===F?void 0:F[0])||"",W=u({loading:!1,firstRender:!1,finished:!1,refreshing:!1,musicTree:[],pagenation:{page:1,rows:20},value1:null,value2:null,PopoverOpen:!1,list:[],keyword:"",musicSubject:I,subjectList:[]}),X=function(){var e=a(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,v.get(i.platformApi+"/musicSheetCategories/queryTree?enable=true");case 3:n=e.sent,Array.isArray(null==n?void 0:n.data)&&(W.musicTree=n.data),y((function(){$()})),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),console.log(e.t0);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(){return e.apply(this,arguments)}}(),q=function(){var e=a(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,v.post(i.platformApi+"/open/subjectBasicConfig/page",{data:{enableFlag:!0,page:1,rows:100}});case 3:n=e.sent,(n.data.rows||[]).forEach((function(e){W.subjectList.push({text:e.subjectName,value:e.subjectId+""})})),e.next=10;break;case 8:e.prev=8,e.t0=e.catch(0);case 10:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(){return e.apply(this,arguments)}}(),z=function(){var e=a(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,v.get("/api-student/student/member");case 3:n=e.sent,N.value=n.data||{},e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.log(e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}(),K=c((function(){var e=W.musicTree.find((function(e){return e.id==G.query.categorieid}));return Array.isArray(null==e?void 0:e.musicSheetCategoriesList)?e.musicSheetCategoriesList.map((function(e){return W.value1||(W.value1=e.id,W.value2=null),{text:e.name,value:e.id}})):[]})),Q=c((function(){var e=W.musicTree.find((function(e){return e.id==G.query.categorieid}));if(Array.isArray(null==e?void 0:e.musicSheetCategoriesList)){var n=e.musicSheetCategoriesList.find((function(e){return e.id==W.value1}));if(Array.isArray(null==n?void 0:n.musicSheetCategoriesList))return[{text:"全部",value:null}].concat(n.musicSheetCategoriesList.map((function(e){return{text:e.name,value:e.id}})))}return[{text:"全部",value:null}]})),$=function(){var e=a(regeneratorRuntime.mark((function e(){var t,r,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!W.loading){e.next=2;break}return e.abrupt("return");case 2:return W.loading=!0,t=n(n({},W.pagenation),{},{keyword:W.keyword,musicSheetCategoriesId:W.value2||W.value1,status:1}),"TEACHER"==i.platformType&&(t.musicSubject=W.musicSubject),e.prev=5,e.next=8,v.post(i.platformApi+"/musicSheet/page",{data:t,hideLoading:!0});case 8:a=e.sent,Array.isArray(null==a||null===(r=a.data)||void 0===r?void 0:r.rows)?(W.list=[].concat(W.list,a.data.rows),W.pagenation.page+=1,W.finished=a.data.rows.length<W.pagenation.rows):W.finished=!0,e.next=15;break;case 12:e.prev=12,e.t0=e.catch(5),W.finished=!0;case 15:W.loading=!1,W.refreshing=!1,W.firstRender=!0;case 18:case"end":return e.stop()}}),e,null,[[5,12]])})));return function(){return e.apply(this,arguments)}}(),_=function(){W.pagenation.page=1,W.list=[],W.finished=!1,W.list=[],$()},J=function(){var e=a(regeneratorRuntime.mark((function e(n){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t="".concat(location.origin,"/orchestra-music-score/?id=").concat(n.id,"&part-index=").concat(Y.partIndex),console.log("🚀 ~ src:",t),b({api:"openAccompanyWebView",content:{url:t,orientation:0,isHideTitle:!0,statusBarTextColor:!1,isOpenLight:!0}});case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();s((function(){"STUDENT"==i.platformType&&z(),"TEACHER"==i.platformType&&q(),X()}));var Y=u({open:!1,musicXml:{},instrumentName:"",partIndex:0,partList:[]}),Z=function(){var e=a(regeneratorRuntime.mark((function e(n){var t,r,a,o,i,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=[],C("加载中..."),e.prev=2,e.next=5,fetch(n).then((function(e){return e.text()}));case 5:for(r=e.sent,a=(new DOMParser).parseFromString(r,"text/xml"),o=(o=Array.from(a.getElementsByTagName("part-name"))).filter((function(e){var n,t;return!(null!==(n=e.textContent)&&void 0!==n&&null!==(t=n.toLocaleUpperCase())&&void 0!==t&&t.includes("COMMON"))})),i=0;i<o.length;i++)u=D(o[i].textContent||""),t.push({text:u?o[i].textContent+"(".concat(u,")"):"",value:i});x(),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(2),console.log(e.t0);case 16:return console.log("🚀 ~ partNames:",t),e.abrupt("return",t);case 18:case"end":return e.stop()}}),e,null,[[2,13]])})));return function(n){return e.apply(this,arguments)}}(),ee=function(){var e=a(regeneratorRuntime.mark((function e(n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Y.musicXml[n.id]){e.next=4;break}return Y.instrumentName=n.id,Y.open=!0,e.abrupt("return",Promise.resolve());case 4:return e.next=6,Z(n.xmlFileUrl);case 6:Y.musicXml[n.id]=e.sent,Y.instrumentName=n.id,Y.open=!0;case 9:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();return function(){var e;return l("div",{class:w["accompany-music-list"]},[l(j,{mode:"sticky",class:w.heade,onGetHeight:function(e){document.documentElement.style.setProperty("--header-height",e+"px")}},{default:function(){return[l(d,{border:!1},null),l("div",null,[l(O,{activeColor:"var(--van-primary)"},{default:function(){return[l(k,{modelValue:W.value1,"onUpdate:modelValue":function(e){return W.value1=e},options:K.value,onChange:function(){W.value2=null,_()}},null),l(k,{modelValue:W.value2,"onUpdate:modelValue":function(e){return W.value2=e},options:Q.value,onChange:function(){return _()}},null)]}}),l("div",{class:w.filter},[l(B,{class:w.filterBox,onSearch:function(e){W.keyword=e,_()}},{left:function(){return l(m,null,["TEACHER"==i.platformType?l(O,{activeColor:"var(--van-primary)"},{default:function(){return[l(k,{modelValue:W.musicSubject,"onUpdate:modelValue":function(e){return W.musicSubject=e},options:W.subjectList,onChange:function(){localStorage.setItem(U,W.musicSubject),_()}},null)]}}):null])}})])])]}}),l(S,{modelValue:W.refreshing,"onUpdate:modelValue":function(e){return W.refreshing=e},onRefresh:_,style:"min-height: calc(100vh - var(--header-height))"},{default:function(){return[l(A,{"loading-text":" ",immediateCheck:!1,loading:W.loading,finished:W.finished,"onUpdate:finished":function(e){return W.finished=e},finishedText:" ",onLoad:function(){$()}},{default:function(){return[l(H,{inset:!0},(n=e=W.list.map((function(e){return l(L,{size:"large",center:!0,title:e.musicSheetName,isLink:!0,onClick:function(){"CONCERT"!=e.musicSheetType?J(e):ee(e)}},{icon:function(){return l(p,{style:{marginRight:"12px"},size:40,name:M},null)}})})),"function"==typeof n||"[object Object]"===Object.prototype.toString.call(n)&&!h(n)?e:{default:function(){return[e]}})),l("div",{style:{height:"40px"}},null)];var n}}),W.firstRender&&!W.loading&&!W.list.length&&l(f,{tips:"暂无曲谱"},null)]}}),l(g,{teleport:"body",position:"bottom",round:!0,show:Y.open,"onUpdate:show":function(e){return Y.open=e}},{default:function(){return[l(R,{columns:Y.musicXml[Y.instrumentName],onConfirm:function(e){Y.open=!1,Y.partIndex=e.selectedValues[0],J({id:Y.instrumentName})},onCancel:function(){return Y.open=!1}},null)]}})])}}}))}}}))}();
|