select-subject-legacy.fb1088ff.js 4.4 KB

1
  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 a=null!=arguments[n]?arguments[n]:{};n%2?e(Object(a),!0).forEach((function(e){r(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):e(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,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,a,i,o){try{var c=e[i](o),s=c.value}catch(u){return void r(u)}c.done?t(s):Promise.resolve(s).then(n,a)}var a=document.createElement("style");a.innerHTML="._filterTitle_1bpah_1{font-size:.48rem;font-weight:500;color:#000;line-height:.66667rem;text-align:center;padding:.53333rem 0}._searchResult_1bpah_9{padding:0 .42667rem;overflow:hidden;margin-bottom:.53333rem}._searchResult_1bpah_9 ._searchTitle_1bpah_14{font-size:.42667rem;color:#333;line-height:.58667rem}._radio-group_1bpah_19{display:flex;margin-top:.26667rem;margin-bottom:.53333rem;flex-wrap:wrap}._radio-group_1bpah_19 ._radio_1bpah_19:first-child .van-radio__label{margin-left:0}._radio_1bpah_19 .van-radio__icon{display:none}._radio_1bpah_19 .van-tag--large{width:2.13333rem;height:.85333rem;font-size:.42667rem;text-align:center;display:flex;align-items:center;justify-content:center}._radio_1bpah_19 .van-tag{box-sizing:border-box}._radio_1bpah_19 .van-tag--default{color:var(--van-tag-text-default-color)}._radio_1bpah_19 .van-tag--primary{background-color:#fff}._organ-radio_1bpah_49 .van-tag--large{width:auto;padding:0 .32rem;margin-bottom:.21333rem;margin-right:.21333rem;font-size:.37333rem}._btn_1bpah_56{padding:.13333rem .37333rem}._btn_1bpah_56+._btn_1bpah_56{margin-left:.26667rem}\n",document.head.appendChild(a),System.register(["./index-legacy.e29ebc18.js","./index-legacy.9a585ba5.js","./index-legacy.34375aa8.js"],(function(e){"use strict";var r,a,i,o,c,s,u,l,p;return{setters:[function(e){r=e.d,a=e.g,i=e.w,o=e.j,c=e.z,s=e.F,u=e.B},function(e){l=e.T},function(e){p=e.S}],execute:function(){var f="_filterTitle_1bpah_1",d="_searchResult_1bpah_9",b="_searchTitle_1bpah_14",m="_radio-group_1bpah_19",_="_radio_1bpah_19",h="_organ-radio_1bpah_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"===a.platformType?"/api-student":"/api-teacher"}},mounted:function(){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,i.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(a,i){var o=e.apply(t,r);function c(e){n(o,a,i,c,s,"next",e)}function s(e){n(o,a,i,c,s,"throw",e)}c(void 0)}))})()}},render:function(){var e=this;return o(s,null,[o("div",{class:f},[c("全部声部")]),o("div",{class:d,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,_,h]},[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(p,{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("确 认")]}})])]}})])}}))}}}))}();