subject-song-legacy.3c6d1b5f.js 4.0 KB

1
  1. !function(){function e(e,t,n,u,c,r,i){try{var o=e[r](i),a=o.value}catch(s){return void n(s)}o.done?t(a):Promise.resolve(a).then(u,c)}function t(t){return function(){var n=this,u=arguments;return new Promise((function(c,r){var i=t.apply(n,u);function o(t){e(i,c,r,o,a,"next",t)}function a(t){e(i,c,r,o,a,"throw",t)}o(void 0)}))}}var n=document.createElement("style");n.innerHTML="._subjectSong_hub7a_1{overflow:hidden}._subjectSong_hub7a_1 .van-sticky{background-color:#f6f8f9}._subjectSearch_hub7a_7{margin:.32rem .37333rem;width:auto!important;border-radius:.53333rem}._cellGroup_hub7a_12{border-radius:.32rem;overflow:hidden;margin:0 .37333rem}._cellGroup_hub7a_12 .van-cell{padding:.37333rem}._cellGroup_hub7a_12 .van-cell:first-child,._cellGroup_hub7a_12 .van-cell:last-child{margin-top:.05333rem}._cellGroup_hub7a_12 ._musicPic_hub7a_24{width:1.49333rem;height:1.49333rem;border-radius:.21333rem;overflow:hidden;margin-right:.26667rem;flex-shrink:0}._cellGroup_hub7a_12 ._musicName_hub7a_32{font-size:.42667rem;font-weight:600;color:#1a1a1a;line-height:.58667rem}._cellGroup_hub7a_12 ._labelClass_hub7a_38{font-size:.32rem;color:#999;line-height:.45333rem}\n",document.head.appendChild(n),System.register(["./index-legacy.b903c881.js","./index-legacy.b7f666cc.js","./index-legacy.5907f1a9.js","./index-legacy.3720be7c.js","./index-legacy.8abefd50.js","./index-legacy.5b93d63d.js","./index-legacy.885c229f.js","./index-legacy.e35b642f.js"],(function(e){"use strict";var n,u,c,r,i,o,a,s,l,f,d,h;return{setters:[function(e){n=e.d,u=e.w,c=e.j,r=e.z,i=e.aR,o=e.Z},function(e){a=e.C},function(e){s=e.C},function(){},function(e){l=e.S},function(e){f=e.I},function(e){d=e.C},function(e){h=e.P}],execute:function(){var b="_subjectSong_hub7a_1",m="_subjectSearch_hub7a_7",_="_cellGroup_hub7a_12",j="_musicPic_hub7a_24",v="_musicName_hub7a_32",p="_labelClass_hub7a_38";e("default",n({name:"subject-song",data:function(){var e=this.$route.query;return{id:e.id,subjectId:e.subjectId||"",showSubject:!1,columns:[],activeInfo:{}}},mounted:function(){var e=this;return t(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getMusicInfo();case 2:case"end":return t.stop()}}),t)})))()},methods:{getMusicInfo:function(){var e=this;return t(regeneratorRuntime.mark((function t(){var n,c,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,u.post("/api-student/open/activity/info/"+e.id);case 3:n=t.sent,e.activeInfo=n.data,c=n.data.subjectInfos||[],r=[],c.forEach((function(e){r.push({text:e.subjectName,value:e.subjectId})})),e.columns=r,e.subjectId=e.subjectId||c[0].subjectId,t.next=14;break;case 12:t.prev=12,t.t0=t.catch(0);case 14:case"end":return t.stop()}}),t,null,[[0,12]])})))()}},computed:{subjectName:function(){var e=this;if(!this.subjectId)return"";var t=this.columns.find((function(t){return t.value===e.subjectId}));return t?t.text:""},selectSubjectList:function(){var e=this;return(this.activeInfo.activityMusicVoList||[]).filter((function(t){return t.subjectId===e.subjectId}))}},render:function(){var e,t,n=this;return c("div",{class:b},[c(l,{position:"top"},{default:function(){return[c(d,null,null),c(a,{class:m,title:"".concat(n.subjectName," 声部"),isLink:!0,arrowDirection:"down",onClick:function(){n.showSubject=!0}},null)]}}),c(s,{inset:!0,class:_},(t=e=this.selectSubjectList.map((function(e){return c(a,{center:!0},{icon:function(){return c(f,{src:e.musicImage,class:j},null)},title:function(){return c("div",{class:v},[e.musicSheetName])},label:function(){return c("div",{class:p},[r("作者:"),e.composer])}})})),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!o(t)?e:{default:function(){return[e]}})),c(i,{position:"bottom",round:!0,show:this.showSubject,"onUpdate:show":function(e){return n.showSubject=e}},{default:function(){return[c(h,{title:"选择声部",columns:n.columns,onCancel:function(){n.showSubject=!1},onConfirm:function(e){n.subjectId=e.value,n.showSubject=!1}},null)]}})])}}))}}}))}();