1 |
- !function(){function e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function t(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?e(Object(i),!0).forEach((function(e){r(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function r(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n(e,t,r,n,i,a,o){try{var c=e[a](o),s=c.value}catch(u){return void r(u)}c.done?t(s):Promise.resolve(s).then(n,i)}var i=document.createElement("style");i.innerHTML="._filterTitle_g9vbz_1{font-size:.48rem;font-weight:500;color:#000;line-height:.66667rem;text-align:center;padding:.53333rem 0}._searchResult_g9vbz_9{padding:0 .42667rem;overflow:hidden;margin-bottom:.53333rem}._searchResult_g9vbz_9 ._searchTitle_g9vbz_14{font-size:.42667rem;color:#333;line-height:.58667rem}._radio-group_g9vbz_19{display:flex;margin-top:.26667rem;margin-bottom:.53333rem;flex-wrap:wrap}._radio-group_g9vbz_19 ._radio_g9vbz_19:first-child .van-radio__label{margin-left:0}._radio_g9vbz_19 .van-radio__icon{display:none}._radio_g9vbz_19 .van-tag--large{width:2.13333rem;height:.85333rem;font-size:.42667rem;text-align:center;display:flex;align-items:center;justify-content:center}._radio_g9vbz_19 .van-tag{box-sizing:border-box}._radio_g9vbz_19 .van-tag--default{color:var(--van-tag-text-default-color)}._radio_g9vbz_19 .van-tag--primary{background-color:var(--tag-bg-color)}._organ-radio_g9vbz_49 .van-tag--large{width:auto;padding:0 .32rem;margin-bottom:.21333rem;margin-right:.21333rem;font-size:.37333rem}._btn_g9vbz_56{padding:.13333rem .37333rem}._btn_g9vbz_56+._btn_g9vbz_56{margin-left:.26667rem}\n",document.head.appendChild(i),System.register(["./index-legacy.fba2875c.js","./index-legacy.78361179.js","./index-legacy.edb65d0c.js"],(function(e){"use strict";var r,i,a,o,c,s,u,l,d;return{setters:[function(e){r=e.d,i=e.g,a=e.w,o=e.j,c=e.z,s=e.F,u=e.B},function(e){l=e.T},function(e){d=e.S}],execute:function(){var f="_filterTitle_g9vbz_1",g="_searchResult_g9vbz_9",b="_searchTitle_g9vbz_14",m="_radio-group_g9vbz_19",_="_radio_g9vbz_19",p="_organ-radio_g9vbz_49";e("S",r({name:"selectSubject",props:{isReset:{type:Boolean,default:!1},searchParams:{type:Object,default:{name:"",id:""}},type:{type:String,default:"MUSIC"},onComfirm:{type:Function,default:function(e){}}},data:function(){return{subject:{name:"全部声部",id:""},subjectList:[],apiSuffix:"STUDENT"===i.platformType?"/api-student":"/api-teacher"}},mounted:function(){console.log(this.subject,"12"),this.subject={name:this.searchParams.id?this.searchParams.name:"全部声部",id:this.searchParams.id||""},this.getList()},methods:{getList:function(){var e,t=this;return(e=regeneratorRuntime.mark((function e(){var r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.get("".concat(t.apiSuffix,"/subject/subjectSelect?type=").concat(t.type));case 2:r=e.sent,n=r.data,Array.isArray(n)&&(t.subjectList=n);case 5:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(i,a){var o=e.apply(t,r);function c(e){n(o,i,a,c,s,"next",e)}function s(e){n(o,i,a,c,s,"throw",e)}c(void 0)}))})()}},render:function(){var e=this;return o(s,null,[o("div",{class:f},[c("全部声部")]),o("div",{class:g,style:{maxHeight:"45vh",overflowY:"auto"}},[this.subjectList.map((function(r){return r.subjects&&r.subjects.length>0&&o(s,null,[o("div",{class:b},[r.name]),o("div",{class:[m,_,p]},[r.subjects.map((function(r){var n=r.id===Number(e.subject.id);return o(l,{size:"large",plain:n,type:n?"primary":"default",round:!0,onClick:function(){e.subject=t({},r)}},{default:function(){return[r.name]}})}))])])}))]),o(d,{position:"bottom",offsetBottom:0},{default:function(){return[o("div",{class:["btnGroup",e.isReset?"btnMore":""]},[e.isReset&&o(u,{type:"primary",plain:!0,round:!0,onClick:function(){e.subject.name="全部声部",e.subject.id="",e.onComfirm(t({},e.subject))}},{default:function(){return[c("重 置")]}}),o(u,{type:"primary",round:!0,block:!0,onClick:function(){e.onComfirm(t({},e.subject))}},{default:function(){return[c("确 认")]}})])]}})])}}))}}}))}();
|