1 |
- import{d as a,a as e,S as n,C as u,y as l,I as r,j as b,x as m,P as d,af as h}from"./vendor.939d1c77.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{r as j}from"./index.e4f61670.js";const p="_subjectSong_hub7a_1",f="_subjectSearch_hub7a_7",I="_cellGroup_hub7a_12",S="_musicPic_hub7a_24",_="_musicName_hub7a_32",v="_labelClass_hub7a_38";var c={subjectSong:p,subjectSearch:f,cellGroup:I,musicPic:S,musicName:_,labelClass:v};function w(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!m(t)}var G=a({name:"subject-song",data(){const t=this.$route.query;return{id:t.id,subjectId:t.subjectId||"",showSubject:!1,columns:[],activeInfo:{}}},async mounted(){await this.getMusicInfo()},methods:{async getMusicInfo(){try{const t=await j.post("/api-student/open/activity/info/"+this.id);this.activeInfo=t.data;const s=t.data.subjectInfos||[],i=[];s.forEach(o=>{i.push({text:o.subjectName,value:o.subjectId})}),this.columns=i,this.subjectId=this.subjectId||s[0].subjectId}catch{}}},computed:{subjectName(){if(!this.subjectId)return"";const s=this.columns.find(i=>i.value===this.subjectId);return s?s.text:""},selectSubjectList(){return(this.activeInfo.activityMusicVoList||[]).filter(o=>o.subjectId===this.subjectId)}},render(){let t;return e("div",{class:c.subjectSong},[e(n,{position:"top"},{default:()=>[e(u,{class:c.subjectSearch,title:`${this.subjectName} \u58F0\u90E8`,isLink:!0,arrowDirection:"down",onClick:()=>{this.showSubject=!0}},null)]}),e(l,{inset:!0,class:c.cellGroup},w(t=this.selectSubjectList.map(s=>e(u,{center:!0},{icon:()=>e(r,{src:s.musicImage,class:c.musicPic},null),title:()=>e("div",{class:c.musicName},[s.musicSheetName]),label:()=>e("div",{class:c.labelClass},[b("\u4F5C\u8005\uFF1A"),s.composer])})))?t:{default:()=>[t]}),e(d,{position:"bottom",round:!0,show:this.showSubject,"onUpdate:show":s=>this.showSubject=s},{default:()=>[e(h,{title:"\u9009\u62E9\u58F0\u90E8",columns:this.columns,onCancel:()=>{this.showSubject=!1},onConfirm:s=>{this.subjectId=s.value,this.showSubject=!1}},null)]})])}});export{G as default};
|