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 i=null!=arguments[r]?arguments[r]:{};r%2?e(Object(i),!0).forEach((function(e){t(n,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,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,i,a,u){try{var o=e[a](u),c=o.value}catch(s){return void t(s)}o.done?n(c):Promise.resolve(c).then(r,i)}function i(e){return function(){var n=this,t=arguments;return new Promise((function(i,a){var u=e.apply(n,t);function o(e){r(u,i,a,o,c,"next",e)}function c(e){r(u,i,a,o,c,"throw",e)}o(void 0)}))}}System.register(["./ResizeObserver.es-legacy.e62567a1.js","./index-legacy.908c9486.js","./index-legacy.95d68339.js","./index.module-legacy.55a8bd96.js","./index-legacy.fbead75e.js","./index-legacy.984e5063.js","./index-legacy.bbccff13.js","./index-legacy.f728db6d.js","./index-legacy.34409e15.js","./index-legacy.f6652b3b.js","./index-legacy.3a736364.js","./music-img-default-legacy.4c9588f0.js","./index-legacy.9fdc9b85.js","./index-legacy.e1f2bd25.js","./index-legacy.4b442e3b.js","./use-tab-status-legacy.ef69028a.js","./Picker-legacy.73e878a8.js","./index-legacy.57898c1d.js","./index-legacy.8e53f0b1.js","./index-legacy.683362c3.js"],(function(e){"use strict";var t,r,a,u,o,c,s,l,f,d,p,m,g,v,y,h,b,x,j,w,O,k,C,S,T,A,R,P,L,E;return{setters:[function(e){t=e.d,r=e.aj,a=e.ai,u=e.U,o=e.g,c=e.r,s=e.G,l=e.a1,f=e.c,d=e.al,p=e.F,m=e.f,g=e.e,v=e.a7,y=e.am,h=e.P,b=e.an,x=e.n,j=e.a0},function(e){w=e.O},function(e){O=e.g},function(e){k=e.s},function(e){C=e.O},function(e){S=e.O},function(e){T=e.D,A=e.a},function(e){R=e.L},function(e){P=e.C},function(e){L=e.C},function(e){E=e.P},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){e("default",t({name:"accompany-music-list",props:{musicTree:{type:Array,default:function(){return[]}}},setup:function(){var e,t,V,I,D,U,H=r(),N=a(),B=O("icon-music.svg"),q=u({}),z=(null===(e=o.user)||void 0===e||null===(t=e.data)||void 0===t?void 0:t.phone)||"accompany-music-list-subject",F=localStorage.getItem(z)||(null===(V=o.user)||void 0===V||null===(I=V.data)||void 0===I||null===(D=I.subjectId)||void 0===D||null===(U=D.split(","))||void 0===U?void 0:U[0])||"",G=c({loading:!1,firstRender:!1,finished:!1,refreshing:!1,musicTree:[],pagenation:{page:1,rows:20},value1:null,value2:null,PopoverOpen:!1,list:[],keyword:"",musicSubject:F,subjectList:[]}),W=function(){var e=i(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,x.post(o.platformApi+"/musicSheetCategories/queryTreeByParentId",{data:{parentId:H.query.categorieid,enable:!0}});case 3:n=e.sent,Array.isArray(null==n?void 0:n.data)&&(G.musicTree=n.data),j((function(){Q()})),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)}}(),X=function(){var e=i(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,x.get(o.platformApi+"/subject/musicList",{params:{enableFlag:!0,page:1,rows:100}});case 3:n=e.sent,(n.data||[]).forEach((function(e){G.subjectList.push({text:e.name,value:e.id+""})})),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)}}(),J=function(){var e=i(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,x.get("/api-student/student/member");case 3:n=e.sent,q.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=s((function(){var e=G.musicTree;return Array.isArray(e)?e.map((function(e){return G.value1||(G.value1=e.id,G.value2=null),{text:e.name,value:e.id}})):[]})),M=s((function(){var e=G.musicTree;if(console.log(e,"---"),Array.isArray(e)){var n=null==e?void 0:e.find((function(e){return e.id==G.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}]})),Q=function(){var e=i(regeneratorRuntime.mark((function e(){var t,r,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!G.loading){e.next=2;break}return e.abrupt("return");case 2:return G.loading=!0,t=n(n({},G.pagenation),{},{keyword:G.keyword,musicSheetCategoriesId:G.value2||G.value1,status:1}),"TEACHER"==o.platformType&&(t.musicSubject=G.musicSubject),e.prev=5,e.next=8,x.post(o.platformApi+"/musicSheet/page",{data:t,hideLoading:!0});case 8:i=e.sent,Array.isArray(null==i||null===(r=i.data)||void 0===r?void 0:r.rows)?(G.list=[].concat(G.list,i.data.rows),G.pagenation.page+=1,G.finished=i.data.rows.length<G.pagenation.rows):G.finished=!0,e.next=15;break;case 12:e.prev=12,e.t0=e.catch(5),G.finished=!0;case 15:G.loading=!1,G.refreshing=!1,G.firstRender=!0;case 18:case"end":return e.stop()}}),e,null,[[5,12]])})));return function(){return e.apply(this,arguments)}}(),Y=function(){G.pagenation.page=1,G.list=[],G.finished=!1,G.list=[],Q()},Z=function(){var e=i(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($.partIndex),console.log("🚀 ~ src:",t),g({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)}}();l((function(){"STUDENT"==o.platformType&&J(),"TEACHER"==o.platformType&&X(),W()}));var $=c({open:!1,musicXml:{},instrumentName:"",partIndex:0,partList:[]});return function(){var e;return f("div",{class:k["accompany-music-list"]},[f(C,{mode:"sticky",class:k.heade,onGetHeight:function(e){document.documentElement.style.setProperty("--header-height",e+"px")}},{default:function(){return[f(d,{border:!1},null),f("div",null,[f(T,{activeColor:"var(--van-primary)"},{default:function(){return[f(A,{modelValue:G.value1,"onUpdate:modelValue":function(e){return G.value1=e},options:K.value,onChange:function(){G.value2=null,Y()}},null),f(A,{modelValue:G.value2,"onUpdate:modelValue":function(e){return G.value2=e},options:M.value,onChange:function(){return Y()}},null)]}}),f("div",{class:k.filter},[f(S,{class:k.filterBox,onSearch:function(e){G.keyword=e,Y()}},{left:function(){return f(p,null,["TEACHER"==o.platformType?f(T,{activeColor:"var(--van-primary)"},{default:function(){return[f(A,{modelValue:G.musicSubject,"onUpdate:modelValue":function(e){return G.musicSubject=e},options:G.subjectList,onChange:function(){localStorage.setItem(z,G.musicSubject),Y()}},null)]}}):null])}})])])]}}),f(w,{modelValue:G.refreshing,"onUpdate:modelValue":function(e){return G.refreshing=e},onRefresh:Y,style:"min-height: calc(100vh - var(--header-height))"},{default:function(){return[f(R,{"loading-text":" ",immediateCheck:!1,loading:G.loading,finished:G.finished,"onUpdate:finished":function(e){return G.finished=e},finishedText:" ",onLoad:function(){Q()}},{default:function(){return[f(P,{inset:!0},(n=e=G.list.map((function(e){return f(L,{size:"large",center:!0,title:e.musicSheetName,isLink:!0,onClick:function(){if(m().isApp){var n="".concat(location.origin).concat(location.pathname,"#/musicDetail?id=").concat(e.id);g({api:"openWebView",content:{url:n,orientation:1,isHideTitle:!0,statusBarTextColor:!1,isOpenLight:!1}})}else N.push({path:"/musicDetail",query:{id:e.id}})}},{icon:function(){return f(v,{style:{marginRight:"12px"},size:40,name:B},null)}})})),"function"==typeof n||"[object Object]"===Object.prototype.toString.call(n)&&!b(n)?e:{default:function(){return[e]}})),f("div",{style:{height:"40px"}},null)];var n}}),G.firstRender&&!G.loading&&!G.list.length&&f(y,{tips:"暂无曲谱"},null)]}}),f(h,{teleport:"body",position:"bottom",round:!0,show:$.open,"onUpdate:show":function(e){return $.open=e}},{default:function(){return[f(E,{columns:$.musicXml[$.instrumentName],onConfirm:function(e){$.open=!1,$.partIndex=e.selectedValues[0],Z({id:$.instrumentName})},onCancel:function(){return $.open=!1}},null)]}})])}}}))}}}))}();
|