subject-song-legacy.27caa504.js 3.9 KB

12
  1. !function(){function e(e,t,n,u,r,c,i){try{var o=e[c](i),a=o.value}catch(s){return void n(s)}o.done?t(a):Promise.resolve(a).then(u,r)}function t(t){return function(){var n=this,u=arguments;return new Promise((function(r,c){var i=t.apply(n,u);function o(t){e(i,r,c,o,a,"next",t)}function a(t){e(i,r,c,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.fba2875c.js","./index-legacy.7dcec7b3.js","./index-legacy.f231f1c5.js","./index-legacy.9960fd48.js","./index-legacy.edb65d0c.js","./index-legacy.d92f7da7.js","./index-legacy.70851652.js"],(function(e){"use strict";var n,u,r,c,i,o,a,s,l,d,f;return{setters:[function(e){n=e.d,u=e.w,r=e.j,c=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){d=e.I},function(e){f=e.P}],execute:function(){var h="_subjectSong_hub7a_1",b="_subjectSearch_hub7a_7",m="_cellGroup_hub7a_12",_="_musicPic_hub7a_24",j="_musicName_hub7a_32",v="_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,r,c;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,r=n.data.subjectInfos||[],c=[],r.forEach((function(e){c.push({text:e.subjectName,value:e.subjectId})})),e.columns=c,e.subjectId=e.subjectId||r[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 r("div",{class:h},[r(l,{position:"top"},{default:function(){return[r(a,{class:b,title:"".concat(n.subjectName," 声部"),isLink:!0,arrowDirection:"down",onClick:function(){n.showSubject=!0}},null)]}}),r(s,{inset:!0,class:m},(t=e=this.selectSubjectList.map((function(e){return r(a,{center:!0},{icon:function(){return r(d,{src:e.musicImage,class:_},null)},title:function(){return r("div",{class:j},[e.musicSheetName])},label:function(){return r("div",{class:v},[c("作者:"),e.composer])}})})),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!o(t)?e:{default:function(){return[e]}})),r(i,{position:"bottom",round:!0,show:this.showSubject,"onUpdate:show":function(e){return n.showSubject=e}},{default:function(){return[r(f,{title:"选择声部",columns:n.columns,onCancel:function(){n.showSubject=!1},onConfirm:function(e){n.subjectId=e.value,n.showSubject=!1}},null)]}})])}}))}}}))}();